« first day (787 days earlier)      last day (4456 days later) » 

00:05
? it prints elsif?
yes
And if you want to return a boolen, lets say if a character is inside a string:
if user_input.include? "foo"
Strange language. Optimization in the wrong side
And while seems to be named unless ... mkay
00:18
Aha. Ruby can't i++ ... it's i = i + 1 #epicfail
o_0
well ruby is at its heart a bastardised version of python with some bits of other languages stolen for good measure
ruby eggs, python gems, etc etc
Found out you can i += 1 ... still not short as Ruby states, but def. shorter
00:36
@kaiser shorter != better.
I think i++ is not good style. Why should adding 1 use a completely different syntax than adding 2?
Because I can easily differ between incrementing by custom value and step interpolation.
But without having a strong opinion on that one, here are some really funky syntax examples from Ruby.
Another funny fact: Arrays are numerical Arrays. Associative Arrays are Hashes. Multidimensional Arrays are Arrays of Arrays and everything is an Object. :D
Is there some smiliey that says rolling eyes ?
Hash tables, not hashes?
In PHP it is the same, it is just not visible.
Hash = Associative array.
And a new (empty) assoc Array/Hash gets done with Hash.new.
@kaiser This construct is usually called a hash table. They mean the same thing.
Yeah, but I find the naming funny. Considering that Ruby isn't that old and took a lot from other languages.
00:44
In computing, a hash table (also hash map) is a data structure used to implement an associative array, a structure that can map keys to values. A hash table uses a hash function to compute an index into an array of buckets, from which the correct value can be found. Ideally, the hash function should map each possible key to a unique slot index, but this ideal is rarely achievable in practice (unless the hash keys are fixed; i.e. new entries are never added to the table after it is created). Instead, most hash table designs assume that hash collisions—different keys that map to the sa...
And I got no idea how to write an empty Array (numeric) aside from new_array = []
@toscho you already showed me that once (only reason I know about it). question: a hash-tree is a multidimensional hash-table?
@kaiser Not exactly. The parent keys are hashes of the sibling hashes plus values.
hm... you're confusing me. not exactly you, but more the unexpected (opposite) answer to that question :)
Just imagine gzipped gzip archives.
it's just the fact that the parent key/value pair is a hash table for the keys and another one for the values. hard to imagine what the reason behind that is.
00:53
data integrity. If you change the value of grandchild the top parent will be notified immediately.
ok. makes sense. merci
$a = array();
$b = (array) NULL;
$c = [];
$d = compact( NULL );
How to create an empty array in PHP. :D
:)
flexible
func_get_args() for unknown number of args has an equivalent in Ruby: *
def foo ( name, * )
     # do stuff
end
> Remember, it's a Ruby best practice to end method names that produce boolean values with a question mark.
Great. question marks are also used to actually question things and return boolean.
01:24
wtf did you guys just see that x-mas sled move across the screen
01:41
everytime someone leaves
wanna see it? good night @Wyck
@kaiser ah ok im not going crazy:)
 
3 hours later…
05:04
I am back after one month of vacation! :) So, whats new?
05:56
me
welcome back
@kaiser thanks :)
06:12
good morning
na da schau her :)
 
1 hour later…
07:28
@toscho You didn't offer any explanation for charset meta tag yesterday. Care to explain briefly?
08:24
Ok, not only shoot me. Run over me with a train. Or a herde of pregnant reindeers.
Done, means you are not able to write / speak / whatever.
08:50
@kaiser The server wins anyway, and no one needs that meta. So it either useless or wrong.
09:04
placeholder not working in ie how to change the default search text ? kitchco-dev.com/about/our-team/courtnay-d-bazemore
@srini Ask on Stack Overflow.
@toscho ok
@kaiser facepalm
09:39
@TomJNowell multiple times
10:39
@TomJNowell you got a downvote :P
10:53
Wow. Now we got wp-sass too!
Most useless functions in WP core - out of their Top10: get_archives_link().
11:27
@TomJNowell But the -4 comes from 2 downvotes on his answer. Guess the downvoter on your Q was the OP.
hmmm
the original poster lacks the reputation to downvote? No negative reputation is recorded on their profile anyway
it must have been a 3rd/4th party
 
2 hours later…
13:35
@TomJNowell Wow. The mother is getting more condemned than the perpetrators.
13:56
@kaiser Can you come back and leave, want to see the sled :)
Maybe if I leave...
Nope.
This is like the fridge door all over again. Does the light really go out?
We're aware of the #stackoverflow instability, the servers are running under extremely heavy load and will be more stable in a few minutes.
did i miss the sled again?
@ungestaltbar Nope
ah thanks. and the light in the fridge goes out, tried it personally.
anu
anu
14:14
is get_pages() as nasty as get_posts()?
@anu nasty in what way?
anu
anu
@Rarst sighs, having one of those days - confusing get_posts and query_posts()
@anu in both cases I would defer to WP_Query
heh... get_pages() doesn't got through WP_Query... don't remember what the reason for it
anu
anu
@TomJNowell yeah, that's what i'm going to do, was looking for a wp function to return child pages of a given page, and only saw get_page_children, which needs all page objects passed to it (I think).
14:23
"Tutorial: Inserting Widgets With Shortcodes" oh dear...
`WP_Query` : Hello dear sir, I have a question, here is my problem, here's my code, here's the output, and here's the debug values of all variables and globals
`get_posts` : Hey my thing is broken, it does X needs to do Y, here's the code, please help
`query_posts`: GRAAAAAHHAHHH NAK KNACK FFFFFFFFRRRR ATCHOO
@anu post_parent in get_posts()?..
probably not recursive, don't remember
anu
anu
@Rarst get_posts is just a wrapper around new WP_Query, isn't ?
@anu yes
anu
anu
oooh..sled thing?
@Rarst thanks - I tend to never use query_posts or get_posts, just WP_Query. Probably not optimal, but saves me from having to remember which one of those is the bad one :)
14:30
get_posts() conveniently returns array when you need that... otherwise no reason to use it
14:41
> do not use this pragma, as it is no more recommended. Use the global lang attribute on the <body> element instead.
why body and not html?..
@Rarst Always html, never on body. title element and title attributes are language too.
is there something like MDN, but that is correct most of the time? :)
15:02
MDN?
Mozilla Developer Network
15:37
weird, getting "undefined function" warning on one specific function in PhpStorm... it is defined just fine
renaming back and forth fixed... whatever :)
16:20
tagged too
If you see someone promoting cms2cms.com please flag it.
@toscho be thankful this isnt a facebook group, hiding comments or marking them as spam does nothing, refresh the page and they're back
Whatever I mark is dead forever.
@toscho You still talking about spam... right?
Learned about leanpub.com today. Looks promising. They are using Markdown and Dropbox.
@StephenHarris Unfortunately, I am not allowed to talk about our Nuke From Orbit button.
oops
16:40
@toscho hmmm, I'm surprised there aren't more dropbox <-> WordPress integrations advertised
@toscho if I am echoing same localized string as core ('Your comment is awaiting moderation.' for example) should I omit theme text domain or not?
@Rarst Don’t. Core string changes may not be in sync with your code updates.
but I suppose it won't fallback to core if it's not translated in theme yet? or will it?
Not sure I understand
Do you want a partial translation?
I am overriding core code and I want translations to come from core, since it's nothing specific to my theme
16:52
and 3.5 is being pushed out on the internal wordpress updater
@Rarst If core changes the string your users will get untranslated output. Not good.
@toscho good point...
but it's "users don't get translation unless I translate" versus "users get translation until possibly core changes string"
@Rarst Just. Do. It.
@kaiser just do what?
16:55
I do that with some of my code too. Place some @TODO comments for those strings.
You'll anyway go through it when updating.
@Rarst Then don’t override core strings.
@toscho it's not my intention, but sometimes it's all or nothing with modifying core code
sometimes is not specific enough. :) What exactly is your use case?
And 3.5 is out...
@toscho right now - comments templating, but I have few more places
I either use callback and completely control output or let WP completely control it - no middle ground
		if ( !empty($args['callback']) ) {
			call_user_func($args['callback'], $comment, $args, $depth);
			return;
		}
16:59
There is no new string?
@toscho meaning?
in your code snippet – where do you replace a core string?
<?php if ($comment->comment_approved == '0') : ?>
		<em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.') ?></em>
		<br />
<?php endif; ?>
I need to echo essentially same thing with my markup in template
Oh, okay. This is wrong.
what is?
17:01
the missing text domain
this is from core, not my code... but the point is I have to use domain and translate?..
yes
ok
they renamed even the damn HTML editor
So it will work until 3.6 - then you have to go through it again.
17:07
and 3.5 kills queryposts.com ...
and rarst.net too... peachy
@Rarst Why queryposts?
posted on December 11, 2012 by Matt Mullenweg

It’s the most wonderful time of the year: a new WordPress release is available and chock-full of goodies to delight bloggers and developers alike. We’re calling this one “Elvin” in honor of drummer Elvin Jones, who played with John Coltrane in addition to many others. If you’ve been around WordPress a while, the most dramatic [...]

stuck in maintenance mode on both... unstucking manually
[11-Dec-2012 17:11:57 UTC] PHP Fatal error:  Internal Zend error - Missing class information for  in /home/querypos/public_html/wp-content/plugins/wp-super-cache/wp-cache-base.php on line 5
wat?..
ok, Apache restart and we are on...
nice and smooth (no, not really)
17:30
Huh, why am I on the contributor list? :)
@toscho shit happens
:)
wp_send_json() < nice! xml responses are meh and no one uses them anyway
@Rarst finally!
@toscho where?
@kaiser Announcement and wp-admin/about.php
17:45
@toscho WTF?! Me too!
Oh, no, they published the ban list accidentally!
Hehe
<div class="container"><div class="row"><div class="span12"> <a class="btn btn-primary">Why do people like Bootstrap!?</a></div></div></div>
@Rarst Y U NO CONTRIBUTE? ;)
@toscho In how many contributer lists have you made it so far?
@kaiser I was busy being miserable with my job imploding around me
17:53
@kaiser Why should I count that? No idea.
@toscho that's BS (as in bullshit, not bootstrap), there is single class for button that will make it fill container
@toscho Because it's such an honor :)
@toscho my Trac tickets get closed as duplicates of tickets by more popular people =[
@TomJNowell didn't you hear? it's meritocracy - those people have merit of being more popular :)
@TomJNowell My trac tickets are left in the dust. Not sure what is better.
There are two proposed community ads where I cannot see any relation to our site. Is that my misunderstanding?
18:06
@toscho community ads are industry-related, not stack-related... read the description
> The goal is for future visitors to find out about the stuff your community deems important. This also serves as a way to promote information and resources that are relevant to your own community's interests, both for those already in the community and those yet to join.
I read that as: the community, our community, should have an interest in these things.
18:26
Why do we have community ads? open source wordpress plugins - really?
18:37
@toscho well, if we don't we just downvote ads - problem solved...
@StephenHarris because every stack does
Jetpack broke comments for Will Wheaton. nice publicity :))
@Rarst I wasn't asking the question - I was just surprised at one of the answers
I think I need comment-end.php template...
@StephenHarris ehm, not following
ah... sorry, slow
and what is wrong with open source WP plugins? :)
@Rarst Nothing per se. Its just would we really want to invite half the repository to come suggest their particular brand of social media plug-in :)
@StephenHarris I did. multiple times. not that anyone bothered to...
19:33
downvotedownvotedownvotedownvotedownvote
@Wyck stop it! that's scary!
I just bought that no joke, it's a necklace
scary yet strangely intriguing
19:49
Isn't that the guy from ... that movie? damn. what was the name of that movie again? or was it a tv show?
Star Trek: The Next Generation
I can read something
Frnds whats new with wordpress 3.5 ?
I was expecting more
20:08
@vicky media management
@Wyck probably bunch more stuff in classes and multisite (which QP doesn't parse right now)
@Rarst Thanks for your reply ,Any pbm arise when upgrading (loss of data) ???I am going to upgrade frm 3.4.2 to 3.5 if any pbm persist?
@vicky unlikely
@Rarst i saw in the wordpress forum .... lot of post has been about the 3.5 ver (Bugs) any how i am going to try after backup all data's .
you should backup in any case :)
@vicky Use a local test installation with your theme and all your plugins.
20:16
@toscho well thanks for your suggesstions will inform once test :)
20:46
i like the media management in wp3.5 i tested in local everything would be perfect and i going to upgrade mysite through ftp ...Thanks all
21:00
Book idea: Writing WordPress Plug-ins without using if.
21:22
you should make a website: if-less PHP
I didn't even know this existed, antiifcampaign.com
I like thier example lol
21:39
I was going to report an xss in the new "text editor" I can't believe I can insert js into it
it says text!
@toscho still no pull requests I think...
seems like it's not finished, when I click "gists" it askes me to login
oh nm for some reason you have to click sign in shrug
You can see the fork easier now
Amazing. Looks like fork is the new bookmark.
But still no link to the last page.
Aha! @Wyck forked my placekitten plugin. :)
@toscho heh ya I want to use it with flickholdr.com
though I do like kittens
22:05
@toscho don't do that I'm trying to work
@Wyck But the List of cryptids will be so useful next time you are searching for a plugin name!
I found myself listening to tangerine dream due to the unusual album shape for Poland
22:29
@toscho nice
Is this one of my plugins, or is it WPMU by default? "Only lower case letters and numbers are allowed as username".
22:49
"welcome to wordpress 3.6"?
thats not what i expected
@ungestaltbar where do you see that?
embarrassing how I made my rep today …
just updated a minute ago
disable the beta plugin
hmm..back to the future
23:19
Why isn’t the argument walker part of the documentation for wp_dropdown_categories()?
@toscho too buried and not in defaults
But quite useful
odd, cannot search in my own gists

« first day (787 days earlier)      last day (4456 days later) »