« first day (815 days earlier)      last day (4133 days later) » 

@Pekka웃: rofl on your comment there :)))
 
@Gordon For large structured projects, enjoying PHPStorm, for snippets, prototypes, advanced editing features, and files that are not PHP, enjoying Sublime Text
 
hey guys I am trying to setup a email server, but the telnet test doesn't return 250-STARTTLS (I installed the libsasl2 and libsasl2-modules) Anyone got an idea?
 
@Pekka웃 we do have a couple of similar ones
 
11:02 AM
@MarioS Install PHP, clearly the issue.
 
It is installed :P
 
And more jQuery, definitely more jQuery.
 
@Gordon I know I know :)
 
Oh lord
I forgot to install HTML too :[
21
 
Have you tried ServerFault?
 
11:02 AM
Nope
 
because here we don't really care about the failings of other peoples mail servers :)
 
I probably should
Deep down inside you actually care @Leigh don't deny it.
 
@Pekka웃 I gave the same answer as the guy in the now deleted in the more general stackoverflow.com/questions/2359515/…
@Pekka웃 Pascal had one with stackoverflow.com/questions/1260134/…
 
Sublime text's pricing is funny: free trial without a set end date (so far anyway) and $60 for the non-trial...
 
@MarioS told ya'
 
11:06 AM
Told me what?
 
Hi All
 
@MarioS click the little arrow near your name in my reply
@Jasper Sublime text's pricing is sublime
 
But @Leigh was actually really helpful :D at serverfault people will probably help me :D
 
there you go
 
@DaveRandom thanks for the comment
 
11:11 AM
:-)
 
@Jasper The trial bugs you every so often when you open it. And I use it in a commercial environment, so the business licenses it for me.
 
beer @PeeHaa -t
 
can anybody tell me how can i increase the magento reindexing time ?
 
PHPStorm license, however, is my own, but I am allowed to use it on as many machines as I like, as long as I don't use it on two concurrently.
 
@DaveRandom What do you think about the function .....
 
11:13 AM
@RohitGoel Put more stuff in the index.
 
@Jasper Sounds like the Winrar pricing model. Free trial, but at the end of it all they do is ask you nicely if you wouldn't mind awfully giving them some money if you would be so kind thank you sir.
 
Beering PeeHaa [37.34.48.200] with 32 cl of liquid:
Reply from 37.34.48.200: bytes=32 time=15ms TTL=47
Reply from 37.34.48.200: bytes=32 time=15ms TTL=47
Reply from 37.34.48.200: bytes=32 time=15ms TTL=47
Reply from 37.34.48.200: bytes=32 time=15ms TTL=47
@Baba morning
 
@PeeHaa It's beer o'clock in NL alreeady?
 
@Leigh Neh. Second best thing. Lunchtime!
 
@PeeHaa lol ... you are in top gear as usual ....
 
11:15 AM
@Baba I think I don't like the way it's all in one line which makes it kind of unreadable, but other than that looks good
 
@DaveRandom oh ok .. i think i better break it down ..... :)
 
@PeeHaa Reply from 37.34.48.200: cl=32 bloodalcoholincrease=15mg daystakenofflife=1
 
lol
 
@DaveRandom File not found.
 
@DaveRandom I know of winrar idea, but it does state the number of days you are allowed to use it even if it isn't enforced and if I'm not mistaken it also disallows commercial usage of the trial version. With all that in mind, $60 dollars seems like a quite steep price to remove some reminders
 
11:17 AM
@ShaquinTrifonoff main domain (or better website is not up yet)
Only things currently up are the fileuploader and the piratebay proxy
 
@PeeHaa Where's @webarto's fine contribution to File Uploader? (favicon) Oh wait, it's just my Chrome being stupid
 
:D
 
@Gordon nice, I'll keep those in mind to point to as dupes.
 
11:22 AM
@PeeHaa not had an Ex Parte yet? Or even a letter trying to make you shutdown through trying to use a previous Ex Parte as precedence?
 
1
Q: finding a specific formula to sort an array in PHP

verbumSapientiI was wondering if there were any mathematicians who could help me solve the following problem: I am trying to turn the sequence of numbers 012345678 into 036147258. The purpose is to sort the indices of a PHP array where no standard sorting function is viable. This is as far as I have got: f...

Does anyone have a usort implementation to this ?
 
Quick question on htaccess modrewrite rule
 
@Oyeme are you there
 
no.
:))
 
invisible @Oyeme
 
11:27 AM
@Pekka웃 Nice to see you in php chat
 
@Baba I don't think that's a sensible approach because of the way usort() just compares two elements, whereas what you are really doing is moving elements to an absolute position based on their current position.
 
I need to rewrite the following requests (about|contact|clients|losbangeles|museumnacht|n8|csn||meltinpot|nstore|viewbook‌​|foodnotes) to #name
 
@CKDT to array of names?
 
@DaveRandom you are right .. only array_reduce may work
 
@Oyeme i created two tables
 
11:28 AM
@oyeme i now use this: RewriteRule ^(about|contact|clients|losbangeles|museumnacht|n8|csn||meltinpot|nstore|viewboo‌​k|foodnotes)(/?)(.*)$ #$1$2$3 [R,NC,NE,L]
 
@Oyeme but i have problem here
 
@Oyeme and i think i am nearly there, only #$1$2$3 must be something else, but i don't know what :D
 
please check this link once again
i am having the category and subcategory(employee) here and below the subcategory i need to show the items
 
@CKDT () - its a grouped expression. First group = $1
@SAHIL ok..so what's the problem?
 
@Oyeme so i should put all the numbers of the expression after the #?
 
11:32 AM
@CKDT: What you are doing right now is if the path part of the url begins with one of those terms, rewrite it all with a "#" in front of it. If the problem is where you say it is you might want it to be rewritten to something else, but you'd have to tell us to what for us to help you with that
 
I'm going back to symfony :)
 
@CKDT On a note unrelated to your actual question, you might want to consider changing the end from (/?)(.*)$ to (/.*)?$ depending on what you want to do with it
 
@Leigh i got i dont understand your point
 
@Jasper that's exactly what i want, if the path starts with "contact" it should be written to "#contact" because i have a one page website. and it works when i have 3 items in the array but if more, it doesn't work, so i guess it has something to do with the items being rewritten after the hash
 
@SAHIL you should create the parent_id in the categories table,then you can create unlimited numbers of sub categories
@SAHIL tree structure.
@CKDT try to this to understand how it works. debian-administration.org/articles/136
 
11:37 AM
0
Q: Php code version dependancy

CyrilIn each and every version of php, some new features are added and some features are stopped. Example: <?php $hex = hex2bin("6578616d706c65206865782064617461"); var_dump($hex); ?> will need php 5.4.0 and above, as hex2bin was introduced in php 5.4.0. It is tedious to check version depend...

Really is there a way to check when function information ?
 
@oyame
@Oyeme ok
 
@RohitGoel You asked how to increase reindexing time. To make reindexing take longer, put more stuff in it.
 
Anyone know of a way to do is_writable($path) on a path that may not exist without doing fopen($path, 'a') first? (i.e. check if I can create a file or write to an existing file, without creating the file if it doesn't exist)
 
@Baba some kind of patch
 
@Jasper @Oyeme i DID understand, just made a type, had an | too much :D
RewriteRule ^(about|contact|clients|losbangeles|museumnacht|n8|csn|meltinpot|nstore|viewbook‌​|foodnotes)(/?)(.*)$ #$1$2$3 [R,NC,NE,L]
Works!
 
11:43 AM
@Oyeme Oh ok
@DaveRandom is_writable does not need fopen am i missing something
 
@Baba It will fail if the path does not exist. (i.e. it gives false negatives)
 
@DaveRandom use file_exists before you want to write
 
No you are missing the point
 
@DaveRandom Oh i get you now
 
I want to check whether an existing file is writable, or whether I could successfully create it, without actually creating it
 
11:45 AM
@Vamsi thanks!
 
Obviously you can just unlink afterwards but it's messy
 
@CKDT Ah yes, I practically skipped that entire bit as "a bunch of alternatives", so I missed that. Do note the comment I made about the slash at the end (which is about how the current rule matches www.example.com/aboutsomething)
 
@DaveRandom try to use CHMOD
 
@DaveRandom thanks .... quite interesting
 
@Jasper neh
 
No it's not about trying to change permissions, it's just about checking whether I have permissions to perform an action without actually performing it. If I can't do it I will throw an error, but at the moment I have to do a really nasty bit of code to check:
function is_really_writable($path) {
  if (file_exists($path)) {
    return is_writable($path);
  } else {
    $result = TRUE;
    if (!$fp = @fopen($path, 'w')) {
      $result = FALSE;
    }
    @unlink($path);
    return $result;
  }
}
Even that's not perfect, it will still fail if the directory tree doesn't go all the way to the last level.
Ugh. Just looking at that displeases me, it has two @s in it.
@Oyeme Still doesn't work for files that don't exist, and doesn't work on Windows.
 
@PeeHaa Good. It's sad those are the current weapons of choice of the local copyright guard dogs.
 
@DaveRandom Why don't want to use chmod checking for it?
you can make sure..that you have permissions to write something in your file.
 
12:02 PM
@Jasper Let them keep trying it this futile way ;)
 
@Oyeme Because it fails if the file does not exist (which is the whole point) and doesn't work on Windows.
 
@PeeHaa Unfortunately, it's not futile. They can make you pay high fines if you don't shut down after getting such a request. And because they use "it's the internet so we can choose where to go to court" + having a single place where they know the judge is ruling just about everything in their favor the trials aren't exactly fair
And on top of that, they are very much basing their strategies on the fact that their targets can't afford to take the cases higher
 
@DaveRandom so i you can add this chekcing only for linux.
 
@Jasper They can not simply file a suit anywhere :P
 
@PeeHaa Meh, there's a reason the scene still uses usenet. Although it seems that They have finally clocked on to it - maybe we're about to see another BT spike
 
12:09 PM
And for everyone that is hot down 10 others rise
@DaveRandom neh scene uses ftp like real men :)
 
@PeeHaa I mean for publication not internals :-P
 
:D
@DaveRandom What is rule #1 of usenet?
;)
 
:-P
@Oyeme I want to write less code not more, adding OS detection is a step backwards...
 
But you are right. As of late usenet is much more in the picture.
 
@PeeHaa Well, the only judge that could have decided against that was the one that was ruling in their favor all the time and decided that they could. And it's not too likely to be countermanded because their targets don't have the money to get to a judge that can countermand this
 
12:12 PM
I wonder if that rule #1 existed before Fight Club? Maybe the entire of Usenet could sue Hollywood for copyright infringement...
 
@DaveRandom I know,but your situation is not so standard.And to write a small checking to check that you have permissions to write something into a file.
 
Holy crap, did we win the battle? When did that happen?
 
Try to create a new function that can check it.So you can check it only once in your project.It's some kind of patch file for special things.
 
@DaveRandom morning :)
13
Q: Please synonymize the now-empty [php5] tag with [php]

hakreAfter discussions here on meta over the past years and practical initiative in the year 2012, it has been researched and practically established that the tag php5 actually is not needed any longer and has passed it's lifetime. All questions with the tag have been reviewed and the tag has been re...

 
@Oyeme hey!
 
12:17 PM
@Dezigo hola amigo
 
@PeeHaa Excellent, what a nice Christmas present @hakre gave us this year.
(multi-user multi-ping)
 
0
Q: Add dynamically products of multiple categories and link them to their category pages on click magento

Rohit Goelis it possible to show particular number of products or say one from each category and onclick to that product it should redirect to t*heir category page* where all products of that category shows it is just like adding one step before category page

 
@PeeHaa At the moment, yes they can. (Oh, and an Ex Parte is actually a suit in which only they are present and you don't get the chance to defend yourself.) If BREIN decides to go after your proxy, you can be sure it'll be signed by Chris Hensen in Den Haag, it doesn't matter where you live or where you have your proxy
 
anybody can tell me how can i do this?
 
12:22 PM
@RohitGoel yes it's possible.
 
@Jasper They can in the sense of they can sue me in the ntherlands, But they can not sue me in other countries
And yes it often is the same judge over and over again :(
 
@PeeHaa Fair enough. However, they are bending the rules to let them sue you anywhere in the Netherlands (which normally wouldn't be possible), which allows them to choose their judge, which is just plain crazy if you ask me
 
@Jasper I'm still waiting for some decent and mature darknet alternative to file sharing
 
XDCC ftw
 
12:29 PM
Is it bad that my mind just read that as "XKCD ftw"?
 
:)
 
@Oyeme can you please suggest me some idea
 
@MarioS how is that a darknet?
 
(can you tell it's lunch time?)
 
12:31 PM
Who said it's an alternative @PeeHaa just saying that XDCC OWNS!!
 
@RohitGoel please provide more code,then I can help you.
 
I thought it was condering the fact you posted it after me stating I was waiting " for some decent and mature darknet alternative to file sharing" :)
 
it's all depends on your code..etc.
 
@Oyeme this is default template files code ,please tell me what should be my aproach to achieve this
i have no idea
 
I see, I merely stated that it's for the win, XDCC that is :D. Personally I use private torrent sites or ftp much more than XDCC
 
12:34 PM
@PeeHaa I believe the coming years will be decisive in the whole copyright battle and darknets aren't exactly what's going to make the difference I think, even if it's harder for the government to touch you when using one. That said, it would be good to have a mature one (though that very concept has some problems as well)
 
@MarioS Mostly usenet for me. I only sure torrents for obscure things I cannot find on usenet
 
What's your retention?
 
Much as I'd love to leave a message that just says "anal" in the transcript, some twat's going to flag that eventually :-(
 
But you just said it again. Flagged!
 
@MarioS 1600+ something days
 
user1125394
12:43 PM
counter-flagged!
 
@DaveRandom nice sounds this has.
 
Are we playing Capture the Flag now?
 
thats not to bad @PeeHaa. It's the only issue I usually have with usenet.
 
@hakre I have no speakers :-(
 
@MarioS All providers have huge retention nowadays. I remember back in the day... :)
 
12:46 PM
I'll stick with private torrent sites for now because sharing = caring
 
@DaveRandom I set you up a project on IndieGoGo, mom pls. :)
 
lol
I actually have a pair on my desk, just not hooked up to sound card because I was annoying my colleagues...
 
I did use a free usenet server at one point, but beyond sometimes finding something I couldn't find anywhere else there, I simply preferred using torrents...
 
@Jasper You should get a real avatar, your auto one is so light it's pretty much invisible. I feel like I'm chatting with a ghost.
 
lol I just noticed my "I forgot to install HTML too :[" has 5 stars, You guys!!
7? <3
 
12:55 PM
I just signed up for Algorithms I on coursera to brush up on my algorithm knowledge
 
I think congratulations are in order: Congratulations!
 
@DaveRandom Who says I'm not a ghost?
 
Ohh, and Cryptography I. Why do the good courses start at nearly the same time
 
0
A: UDP packets sent from Rails on Heroku to HostedGraphite aren't accepted

CharlieWe (Hosted Graphite) just fixed an issue affecting authentication for new users created in the last couple of days, and I think you were caught by this. Sorry you had a poor first experience. We're adding alerting for that condition so it won't happen again. I'm not sure how OK it is to provide...

 
Seriously, though, I always find it really hard to choose a picture to "use as my identity"
 
12:57 PM
^^ is that acceptable site usage/answer?
seems a shame to kill it because it's an honest and probably correct answer to an reasonable quality question, but at the same I don't think it really belongs here
Close Q as TL but don't delete?
 
Found an avatar for you.
 
@MarioS That's a nice one indeed. Beetje jammer wat de Nederlandse naam is, maar ach :P
@DaveRandom I'd agree with that.
 
So basically Jasper == polished pebble
how much more specific do you need it to be to identify yourself man :P
 
@DaveRandom It's not really the way things should be going, but providing such answers as a company on SO is pretty awesome and will truly mean your users will have a more comfortable ride
@MarioS Just a certain type of pebble, doesn't matter if it's polished or unpolished
 
1:03 PM
But.. you must be polished. So you can be Polish, nah mean?
 
@DaveRandom I think it should be closed but not deleted. Given the answer it's unlikely to help future visitors
"why aren't my network packets getting through from hosted service X to hosted service Y" is also off topic, as well as generally too localised.
 
@Jasper Yeh, to me that just makes me think that company might be worth dealing with, if their support guys are prepared to sign up to a site just to answer a question related to their service. Does that count as advertising?
@Leigh True
 
@DaveRandom The best kind?
@MarioS I'm just fine being Dutch, I'm not sure if I want to be Polish
 
1:32 PM
I have some code that I haven't touched in years and that I feel I will need to redo completely some time soon. But then, when I wanted a small behavior change, it took me only five minutes or so to find where to make that change and actually make the change. It just makes me feel way less bad about the code :D
 
I just ran phpphp against the full main test suite (/tests), and we had 197 passes for 28.8% of the suite... Not bad at all. And at least a few of them should be pretty easy to clean up...
 
I'm at that stage of a project where all the business logic is written, tested and working and its time to glue it together, but I can't find the right place to start :(
So, I'll answer a few questions on SO to put it off a bit :)
 
1:51 PM
posted on January 08, 2013 by Brandon Savage

One of the most amazing things about earning my pilot certificate was the ways that what I learned as a pilot interfaced with what I knew as a programmer. Things like evidence-based problem solving and data-driven decision making are core tenants of aviation and software development. A large portion of training, for both the primary [...]

 
you stupid feed .. i dont like you
 
@Pekka웃 how come your name contain that character when display Name can only contain letters, digits, spaces, apostrophes or hyphens
 
I wish there was a way in PHP for getting an array value via it's key when the array is a result of a function. ie: $file_name = $self::get_file($foo)['name']; instead of $file_name = $self::get_file($foo); $file_name = $file_name['name']; ^^
 
user1125394
@NullPointer you're nazi?
 
@Jimbo so you can use anonymous function for it.
 
@cab nooooooooooo i am not.. 卐
 
@Oyeme With respect to my example, how would that work?
 
just there are tow nazi solider standing near me ,, :-P
 
@NullPointer Chinese characters are fun. Hope there is no Chinese here.
 
2:01 PM
@cab i saw same avatar in crill .. profile
 
@Jimbo There is. Just update php to a recent enough version :D
 
@Jasper I'm on 5.3, so I merely need 5.4?
 
@shiplu.mokadd.im so yet doesnot support Chinese character and that why even chinese emigration is not launched area51.stackexchange.com/proposals/36960/chinese-emigration
 
@Jimbo As of PHP 5.4 it is possible to array dereference the result of a function or method call directly. Before it was only possible using a temporary variable.
 
@Jasper Excellent, thanks
 
2:04 PM
@Jimbo
$array = array(1=>"first",2=>"second");
$a = function($name) use ($array){
return $array[$name];
}


$a('first');
 
Thanks @Oyeme, what I need though is to update to 5.4
 
@Jimbo yes :)
 
Ubuntu PHP5 default repo only goes to 5.3 so need to add new :)
 
also u can use this new things..like new foo()->test();
 
2:10 PM
Unsure if [cv]. It's community wiki which might mean leaving it alone: stackoverflow.com/q/1900017/538216
Maybe someone should ask on meta?
Also, @GoogleGuy see portion of this page called Best Practice (can't hotlink, no anchor)
 
@LeviMorrison I did wonder about the answer to the question asked there some time ago and it saddens me to see that barely any of the answers go into the special properties goto has in php...
 
> XUnit style testing frameworks seem to be losing favour within the community and the adoption of Spec frameworks and Behaviour Driven Development is set to increase in 2013.
^ At least in the communities I'm involved in, XUnit is really picking up.
 
Anonymous
Where can I get the people who made PHP, so I can punch them in the FACE??
 
@shiplu.mokadd.im 웃 seems to be a chinese text character - and text characters are allowed.
 
@LeviMorrison should have been already picked up in any community. Communities that had been already using XUnit is moving to XSpec.
 
2:24 PM
I don't really get how NullPointer's Swastika managed to slip through.
 
@TheCOMPLETEPHPNewbie Punch me if you want.
 
@TheCOMPLETEPHPNewbie why do you want do this?
 
@TheCOMPLETEPHPNewbie there are a couple that hang around here :P
 
@LeviMorrison lol
 
I'm waiting intently for punching
 
Anonymous
2:28 PM
If I could just find one of them in the streets...
 
@TheCOMPLETEPHPNewbie What's your beef with them?
 
@TheCOMPLETEPHPNewbie You can find me wandering around BYU campus any time.
 
@TheCOMPLETEPHPNewbie come to the PHPBenelux conference, then you can try to fight @ircmaxell. I'll gladly watch ;-)
 
/me grabs some popcorn
 
/me grabs some M&Ms.
 
2:33 PM
@TheCOMPLETEPHPNewbie I've met @ircmaxell He's short, but looks quite sturdy (ex fireman from memory), I'd put my money on him :)
 
No. These days, fights are in video games. Commence the battle within Tekken. Or, Minecraft. Or Halo.
Then Victory teabagging doesn't get you arrested.
 
Anonymous
My beef is with the inventors, I am very close to sending a threatning letter, they will be calling me the PHP terrorist. Soon
 
Surely, not a strongly worded letter?
 
Anonymous
on a side note, TEKKEN is my fav all-time video game

Tekken3 to be exact
 
@TheCOMPLETEPHPNewbie Please, send a threatening letter to the internals mailing list, I'd like to see Rasmus give you a verbal beatdown.
 
2:38 PM
@Leigh That's impressive!
 
3:06 PM
I'm using symfony, if I want to create admin panel/, I need to create admin bundle for it? (to separate programm logic)
?
@Oyeme ?
 
whats up guys ?
 
xm.. Is anybody alive?
:(
4 min left, I can wait so long!
 
@MalikUsman yo
 
@Dezigo You're not compeled to create a new Bundle, but it is easier to do such
 
3:25 PM
@Dezigo in most cases that would be a separate bundle, yes. you may also want to look at some of the existing admin bundles.
 
@Leigh Ex fireman, and I worked security in a psych ward for about 2 years...
 
@igorw yeap, I know, but I don't like it,
 
ok. thanks for an advice
 
3:33 PM
A new programming language: https://github.com/munificent/vigil If you don't test your sh*t, it won't wind up in production code :-D
 
user1125394
@hakre > to get one or more random iterations out of it.
 
user1125394
you meant elements?
 
user1125394
no nvm
 
@cab Depends, if it's an iterator with iterations you get random iterations out of it (but yes, those are then normally elements). Had problems to write that properly, my english is not that good.
 
Hey guys, what would something like this be called? example.com/#start=10 ? At first I thought it was something similar to _GET, but apparently not. (The #start)
 
3:36 PM
@ircmaxell huh?
 
@Alec that is called fragment identifier.
 
:-D
 
@ircmaxell There's people out to get you, just because you're an internals dev - but don't worry they're french.
 
@Leigh the french...
 
@Dezigo yes,just to separate the business logic
 
3:45 PM
@Oyeme I don't know what to think.. I 've found symfony2admingenerator.org , but the size of that bundel is too much 59mb
I`ll try it
 
Grrr why does an empty stdClass evaluate to TRUE??
 
because it's an object
 
FU PHP
 
and objects are always true
 
@DaveRandom what do you want to do?
@Dezigo 58 mb? sh*t
 
3:48 PM
@ircmaxell not always, not for empty SimpleXMLElements.
 
@ircmaxell If only the were the case. Exhibit #1: SimpleXMLElement
lol
 
Which is also the solution for @DaveRandom to create empty elements.
 
lol
 
@hakre don't talk to me about simplexml
 
3:49 PM
Seconded
 
@ircmaxell Yes, I know that you prefer moving the couch out of your living room downstairs.
 
what the point is to check if the object is empty.
 
But seriously, I get an empty object in some JSON, I want it to evaluate to FALSE.
(and I don't want to force array when decoding)
 
@DaveRandom count it.
 
@DaveRandom then set json_decode to return associative arrays
 
3:50 PM
@hakre Does that work with objects?
 
@Oyeme mm I just want to use that skin wrapbootstrap.com/preview/WB0F35928
admin template..
with bootstrap :)
 
@DaveRandom $total = count((array)$obj);
 
@DaveRandom try to check a specific attribute.If it's exists.
 
@hakre Aha! Obvious now you put it like that. Thanks.
 
@DaveRandom Yes, I quickly got red in the face ;)
 
3:51 PM
@Dezigo I dont know,is it a good idea to use it or not.
 
@hakre Actually for a bool check you don't even need the count()
 
@DaveRandom I know but I wanted to see who is noticing it here first ;)
 
lol
 
is there anything in JSON that is not valid JavaScript syntax?
 
3:59 PM
@igorw Not that I know of.
 
@ircmaxell I had fun where a customer developed their own code based around PHP 5.1 and serialised SimpleXMLElements, then they got 5.3 everything died horribly
 
@Leigh and you call that fun?
 
@Jasper Yes, the sarcastic kind of fun where you visualise stabbing the customer in the face with a chair leg
 
:P
 
4:15 PM
I hand a subdomain to the js room and this is what they come up with: lemon.thedoctoriscool.com ... OY
 
user1125394
@igorw but the opposite yes
 
user1125394
{foo: 'bar'} is valid js, but not json
 
@cab and even {'foo': bar} is legal js
 
user1125394
var x={'foo': bar}
ReferenceError: bar is not defined
 
@cab lol. define bar :-P
 
user1125394
4:26 PM
what's the point
 
var bar = null;
var x = {'foo': bar};
console.log(x);
Object {foo: null}
There is no point. Just telling you that it is legal :-)
 
@cab To show it's valid js given the correct context?
 
user1125394
{
    foo: {
        foo: {
            foo: 'bar'
        }
    }
}
 
user1125394
o json even want double quotes
 
Official json requires double quotes around all the keys and string values.
Single quotes not allowed.
Most implementations are good about dealing with them but you never know.
 
user1125394
4:36 PM
especially jQuery :)
 
morning
evening
 
@NikiC morning
 
@igorw Yes...
@igorw There two unicode newline characters that you can use in JSON, but can't use in JS (in strings)
@igorw That's why you can't use all JSON in JSONP or eval parsing. Only if you make sure that those characters are \u escaped
 
wat
 
4:50 PM
It's the U+2028 and U+2029 chars (the line and paragraph separators)
 
@PeeHaa wtf that is asked by 5k rep user ..
 
But in any case, in PHP one doesn't have to worry about stuff like this because PHP automatically encodes high-unicode chars ;) At least I think it does ^^
 
rep == common sense (note I have used PHPs equal here) @NullPointer
5
 

« first day (815 days earlier)      last day (4133 days later) »