« first day (1538 days earlier)      last day (3426 days later) » 

9:04 PM
@Jhawins pretty good. It supports encrypted conversations on miaou now. I released a Linux x86_64 build today. I need to make the extension pretty and implement some other features before releasing on chrome Web store, but the thing itself works pretty well. I spent a couple hours refactoring code today, so it's all clean and shiny right now
@Jhawins thank you for asking :)
 
!!spaceships or blog
 
@SomeKittens That didn't make much sense. Maybe you meant: whoosh
 
@CapricaSix He totally meant whoosh
 
@SomeKittens spaceships
@SomeKittens blog
 
9:08 PM
!!whoosh
 
lmao
 
ACK
 
@SomeKittens NAK
 
so... I have to do something I don't really want to do for the extension
... make it pretty ._.
 
9:11 PM
ewwwww
 
@JanDvorak as fellow meta chat person, what's your take on stackoverflow.com/users/2682142/lpapp ?
(The fact he's banned)
 
what'd he do?
 
@BenjaminGruenbaum Not sure why the suspension was extended, but I witnessed his actions before his previous one.
 
yo guys
anyone here an angular dev?
 
9:15 PM
@JanDvorak what did he do? I recall him being really abusive in the queues and being meta police but that was some time ago.
 
I'm pretty angular
lojk, I'm curvy
 
@BenjaminGruenbaum I haven't seen him between the suspensions, but that's what I imagine he kept on doing..
 
I just realized I'm about to commit a grave sin
I'm going to read over my code and document it
 
9:17 PM
SomeKittens!
 
@JanDvorak what was your impression on him in the meta chatroom?
 
@BenjaminGruenbaum He ignored half of the people he was ignored by half of the people, he kept attacking people who tried to explain things to him (I tried, and he started accusing me of rudeness). That was before the previous suspension.
Generally rude.
 
user1596138
@FlorianMargaine I noticed the readme get confusing af haha
 
@JanDvorak - isn't that considered a positive trait in Meta ?
 
@JanDvorak I had similar issues with him
 
9:21 PM
@adeneo uhh... wat?
 
@Jhawins arf
 
.join("") is a solution to mult-line string JSON. :))
http://wiki.greasespot.net/Multi_Line_Strings
 
@JanDvorak he was classic "meta police"
 
@BenjaminGruenbaum nope
I wouldn't call that behavior "classic meta police" unless you mean how some people imagine meta police
I'm not entirely sure whom you mean by "meta police", actually
 
@JanDvorak just how they observe it.
@JanDvorak people like lpapp :P
 
9:27 PM
@UlisesContreras - no, join is not a solution to multiline strings. Writing strings on a single line is.
 
People who downvote and close vote rudely (rather than constructively), downvote users asking why they got downvoted on meta, always being condescending - you know : meta police.
 
@adeneo But now I vn't problem with my JSON. :))
 
@adeneo ["line", "line", "line"].join("\n")
 
user1596138
@FlorianMargaine (obviously not an important thing) I thought it interesting that you would alias byId = function (id) { return document.getElementById(id); }, I'd had the thought to do this before but I thought this was considered "cluttery"?
 
"line\
line\
line"
 
9:29 PM
@FlorianMargaine inb4 random bugs due to trailing whitespace. Also, I think old IE doesn't like it.
Also, it breaks indentation.
 
var data = [
	{"img":"http://..."},
	{"title":"Parc de Catalunya"},
	{"description":"Lorem ipsum dolor sit amet,.."}
	].join("");
 
user1596138
Is it for the sake of readability or just less redundant code?
 
@UlisesContreras nope
 
user1596138
I won't feel bad next time I do something similar :P
 
9:31 PM
@JanDvorak old IE :D
 
I alias $ as document.querySelectorAll
 
I'm not sure i have a justification for that tbh... it's just something I wrote there when I needed it..
I think I'd refactor that to use something like github.com/Ralt/by-shim
 
@JanDvorak

var data = [
{"img":"http://..."},
{"title":"Parc de Catalunya"},
{"description":"Lorem ipsum dolor sit amet,.."}
].join("\n");

Hmm, so is ok, .join("\n")
 
@BenjaminGruenbaum I always closevote constructively, only downvote rants rather than also legit questions, I think I only rarely seem condescending.
 
@KendallFrey I alias $ as "bling"
 
9:34 PM
@UlisesContreras still nope
 
@UlisesContreras ew.
 
@JanDvorak I don't think you're what people speak of when they talk about meta police.
 
@UlisesContreras did you even try it?
 
More thinking of people like bjb and lpapp and that sort
 
user1596138
@FlorianMargaine Even more interesting
 
9:35 PM
I haven't paid much attention to what kind of comments BJB posts
 
To be fair to him - it's quite possible he's changed now that he knows the system now and is a constructive useful member.
 
And Lpapp is spinlocked in a suspension
 
@UlisesContreras - it would be more like
var json = [
    '{"menu": {',
       '"id": "file",',
       '"value": "File",',
       '"popup": {',
          '"menuitem": [',
              '{"value": "New", "onclick": "CreateNewDoc()"},',
              '{"value": "Open", "onclick": "OpenDoc()"},',
              '{"value": "Close", "onclick": "CloseDoc()"}',
          ']',
       '}',
  '}}'
];

var obj = JSON.parse( json.join('') );
and that's horrible
 
@Jhawins you might be interested in this: github.com/Ralt/dom-essentials
 
@KendallFrey I'm reading this here wiki.greasespot.net/Multi_Line_Strings
 
9:36 PM
NVM. It's still horrible.
 
@adeneo Why is json a string in the first place?
 
^ You have the data, just make an object?
 
@Zirak - good question ?
 
I'm obviously missing something.
 
@UlisesContreras Why is json a string in the first place?
 
9:37 PM
@phenomnomnominal Your left testicle?
 
I think he has it an external .json file
 
user1596138
@Zirak probably for the sake of example
 
Also - put it in a .json file
 
user1596138
It probably isn't hardcoded as a string right above the JSON.parse call
 
@KendallFrey yeah, tragic New Years Eve accident, now I only have my middle and right ones.
 
9:38 PM
@Jhawins If .join is a solution, that implies js
So I'm confused
 
user1596138
I have no context, haven't been reading.
 
@phenomnomnominal I'm so sorry
 
@adeneo cool, but my code is more simple, How you can do this with my code?

var data = [
{"img":"http://..."},
{"title":"Parc de Catalunya"},
{"description":"Lorem ipsum dolor sit amet,.."}
].join("\n");

:))
 
Why are you calling .join?
 
Also, why would tile and description be stored in separate objects/json files?
 
9:39 PM
Leave out the join and voila, you have your object!
 
waaat
 
> The JSON format is syntactically identical to the code for creating JavaScript objects.
 
var text = '{ "employees" : [' +
'{ "firstName":"John" , "lastName":"Doe" },' +
'{ "firstName":"Anna" , "lastName":"Smith" },' +
'{ "firstName":"Peter" , "lastName":"Jones" } ]}';
 
@UlisesContreras - thank you, we didn't know what JSON was, now we're in the loop as well
 
user1596138
9:40 PM
Hmm
 
NNNNNNNNOOOOOOOOOOOOOOO
 
I thought they got better - that's horrible.
 
!!> JSON.stringify([
{"img":"http://..."},
{"title":"Parc de Catalunya"},
{"description":"Lorem ipsum dolor sit amet,.."}
])
 
@UlisesContreras Don't follow that example
Just write out your object, no need for stringifying/parsing or anything
 
@BenjaminGruenbaum Well, some pages are technically correct on W3schools
 
9:40 PM
@phenomnomnominal "SyntaxError: syntax error"
 
var data = [ ... ];
// look mom, I can use data
 
@Zirak - but he wants JSON, so he can parse it ?
 
user1596138
He hasn't asked a real question?
 
user1596138
I can't find one
 
@JanDvorak yeah, the 404 page for instance.
 
9:41 PM
@JanDvorak Some isn't good enough for the top rated reference site for nearly all web technologies out there.
 
If I spurt out a bunch of bullshit, then say 2+2=4, it doesn't validate the rest of my bullshit.
 
@phenomnomnominal So?

var data = JSON.stringify([
	{"img":"http://.."},
	{"title":"Parc de Catalunya"},
	{"description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit."}
	]);
 
@BenjaminGruenbaum - there's also this one -> w3schools.com/about/default.asp
 
It's just a lack of understanding of the difference between JSON and object literals, i think.
 
@UlisesContreras NO.
 
9:42 PM
@adeneo Are you sure his source of information is a string? Because it looks like he's stringifying an object just for the sake of parsing it
 
@SecondRikudo I never claimed so
 
What is your actual problem?
 
@Zirak @BenjaminGruenbaum are you guys talking to tiny avatars again?
 
user1596138
@UlisesContreras please phrase your question in a way it can be understood without making assumptions
 
@Zirak - exactly, he wants to stringify an object, so he can parse it into an object, makes perfect sense
 
9:42 PM
@SecondRikudo No, I'm talking to Jan and adeneo.
 
user1596138
And then we can determine if it's real
 
@phenomnomnominal I need to call this JSON with JSON.parse(data) after. :))
 
user1596138
Oh jesus lol :))
 
@UlisesContreras where does the data come from?
 
@UlisesContreras one does not call JSON
 
9:43 PM
one becomes the JSON, and it calls you
 
@adeneo Actually, I don't think capitalising an punctuating a gerund as a sentence is gramatically valid.
In the soviet Russia, JSON parses you.
 
@UlisesContreras JSON is a block of text that represents data, just like XML. It happens to look a lot like Javascript, but it's not true javascript.
 
I'll whip up a quick fiddle, give me a minute
 
@Zirak Just got an erection.
 
user1596138
9:46 PM
@Zirak omfg lol
 
Confirmed. Phenom is sexually attracted to crap.
 
user1596138
Honestly I can't decide if that's pathetic, or impressive.
 
If they wrote the image map by hand, it's impressive.
 
@JanDvorak - " .. one does not call JSON" just reminded me of Bruce Lee, "one becomes the cup ..."
 
user1596138
There doesn't seem to be a dev change partway through where I would've expected there to be a <!-- Frank killed himself here, Jeff is picking up -->
 
9:48 PM
@UlisesContreras jsfiddle.net/z2q17hvy
 
1. join("\n") = nope
2. var data = JSON.stringify([
	{"img":"http://.."},
	{"title":"Parc de Catalunya"},
	{"description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit."}
	]);?
3. Call JSON with var data = JSON.parse(data); = nope?

4. How I can "apply" this with my simple code?

var json = [
    '{"menu": {',
       '"id": "file",',
       '"value": "File",',
       '"popup": {',
          '"menuitem": [',
              '{"value": "New", "onclick": "CreateNewDoc()"},',
              '{"value": "Open", "onclick": "OpenDoc()"},',
 
user1596138
I would bin that so hard if I was an owner
 
Now you're getting there, looks awesome
 
user1596138
And get yelled at for it :D
 
The code at W3Schools sucks. But hey, at least it works in IE5.
 
9:49 PM
@UlisesContreras ok, consider what you're doing for a second
You want an object at the end, right?
What you're currently doing is writing out some string, trying to turn it into an acceptable format, and then turning that string into an object.
Instead, simply write out your object. It doesn't need to be a string at any point.
 
// e.g. if you once wrote
var json = '{"awesomeCount": 4}';
var data = JSON.parse(json);
// simply write
var data = { "awesomeCount": 4 };
Better?
 
But ....... that's too easy, there's no challenge there !
 
You can even leave out the quotes now.
 
user1596138
But what is he doing with the object json?
 
9:52 PM
Omitted for fear it'll be used
 
tsk tsk
 
@Zirak much better after the omit
 
@Luggage I'm testing http://jsfiddle.net/z2q17hvy/ :))

I can to use data = JSON.parse(jsonTextMultiLine); in other file.js to call my json or all in a file? :))
 
// e.g. if you once wrote
var json = '{"awesomeCount": 4}';
var data = JSON.parse(json);
// simply write
var data = { "awesomeCount": 4 };
// or even better
var data = eval('{awesomeCount:4}');
:P
 
@BenjaminGruenbaum n00b do you even test?
 
9:55 PM
pros don't need to test.
 
{ starts a block and not an object, obviously
 
@Zirak - That's why everything should be JSONP, the only format that works everywhere
 
You keep asking if some code will work without describing your intentions
 
@adeneo Anal sex works on both genders, too
 
@BenjaminGruenbaum thanks, but everybody say of eval is not good to use. (I heard this in class (malpractice)) :))
 
9:56 PM
@JanDvorak - are you speaking from experience ?
 
@adeneo Just hearsay
 
user1596138
Yea afaik he still hasn't actually asked a question
 
@Zirak that code unwraps the 4, you get 4 straight away instead of having to do .awesomeCount.
@UlisesContreras haters gonna hate.
 
@JanDvorak - if it was Kendall, don't believe him, he never got any ass
 
@BenjaminGruenbaum h4x
 
user1596138
9:58 PM
You can't have multiline strings in JS, so why would you expect it in JSObjectNotation
 
user1596138
The solution should be "change the multiline string to a single line string", why not try to figure that one out instead.
 
@Jhawins because JSON is a string?
 
@JanDvorak JSON is as much of a string as JavaScript is..
 
31 mins ago, by adeneo
@UlisesContreras - no, join is not a solution to multiline strings. Writing strings on a single line is.
 
user1596138
!!> "first line
Second line"
 
user1596138
9:59 PM
Now stop it
 
user1596138
Listen to the simpson guy
 
@Jhawins "SyntaxError: unterminated string literal"
 
!!> `first line
second line`
 
@BenjaminGruenbaum "SyntaxError: unterminated string literal"
 
I'm glad this is all cleared up. :)
 
user1596138
10:00 PM
<<<EOD
[
  {
    "img": "http://.."
  }
]
EOD;
 
@adeneo thanks, I'm watching this:

var jsonTextMultiLine = '{' +
'"name": "bob",' +
'"age": 3 }';

by @Luggage
 
user1596138
LOL
 
user1596138
PHP will let you do the nasty if you really wanna
 
That's because PHP is great
 
@UlisesContreras go read a tutorial on MDN or something and come back when you're stuck developer.mozilla.org/en-US/docs/Glossary/JSON
 
10:01 PM
Yes, that is how to do multi-line strings when needed, but you should not need it. JSON is only useful if it's coming from a file or an AJAX call. If you don't need it, just use the object literal from jsfiddle.net/z2q17hvy/1
 
@adeneo not great as much as "well thought out"
 
user1596138
The problem is lack of understanding, and it doesn't just pertain to JS.
 
@BenjaminGruenbaum - no no, it's great, it does all things !
 
Jhawkins, yes and a language barrier
 
user1596138
That too but that's just not something we are here to fix
 
10:03 PM
@adeneo yes I obviously agree PHP is great, I'm just saying that the fact it lets you "do the nasty" is because it's a well thought out language.
 
user1596138
It's a sad day when we have to say "we cannot understand you" but it will be necessary sometimes.
 
@BenjaminGruenbaum - indeed, brilliant minds created it
 
@Jhawins What about "we are not interested in your problem because it is not interesting and you should read a tutorial"?
@adeneo do you know why all the functions have weird names and how goto got into the language :D?
 
user1596138
@BenjaminGruenbaum I still don't comprehend his problem
 
user1596138
10:04 PM
But anyway
 
user1596138
jhawins.goto = goto ReadTuts; // but people don't like being told they don't understand what they are asking so I stopped demanding people go read the most basic of tutorials
 
@BenjaminGruenbaum - Intelligent people always give their children weird names, Einstein named his son Bernhard Caesar, so it's only natural that PHP has some strange function names when the people who wrote it had an IQ of the charts
 
user1596138
Bernhard Caesar is less weird than "Albert"
 
"Einstein" is the king of weird
 
@adeneo clearly the false rumors that the language creator needed function lookup to be fast and didn't know how to write a hash function so he named the functions based on length so each string length has about as many functions are completely bonkers.
 
10:07 PM
We've got a supermarket called "Albert Heijn"
 
user1596138
Sounds like a dispensary
 
@BenjaminGruenbaum - Yeah, mine is more plausible !
 
@adeneo just look at this false propaganda
 
php was hitler's favorite language.
 
user1596138
10:09 PM
I remember the days when I still thought one day I would understand PHPs naming conventions...
 
user1596138
Then I started using other languages
 
One does not "understand" PHP. One simply throws brain cells at it until you realize the futility and give up.
 
@SomeKittens :P
 
@Luggage Second to Deutsch, you mean?
 
@BenjaminGruenbaum - and it was never called "Personal Home Page", that's just a myth
 
10:10 PM
I'm JavaScript or PHP room¿? :o
 
PHP: Preprocessing Hypertext or whatever
 
@adeneo jealousy causes people to invent such lies.
 
user1596138
@Charlie ....
 
PHP: Hypertext Preprocessor
I was kinda right
PHP (PHP: Hypertext Preprocessor) is a scripting language that helps make webpages more interactive by allowing them to do more things. For example, a website programmed with PHP can have pages that are password protected, whereas a website with no programming can not do this without other complex things. Standard PHP file extensions are: .php .php3 or .phtml, although a webserver can be set up to use any extension. Its structure was influenced by many languages like C, Perl, Java, C++, and even Python. It is considered to be free software by the Free Software Foundation. Wikipedia, which runs...
 
someone needs to ban recursive names.
 
10:12 PM
> [Rasmus Lerdorf] named the suite of scripts "Personal Home Page Tools," more frequently referenced as "PHP Tools."
 
@Luggage Finish, is ok, maybe? :))

    var data = '{
    	'+ '"img":"http://...",
    	'+ '"title":"Parc de Catalunya",
    	'+ '"description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit."
    	}';
 
@BenjaminGruenbaum - obviously! I blame it on the Israelis, they even claimed the guys who rewrote PHP and created Zend came from Israel, which isn't true, it's just an elaborate hoax
 
Not a proper multi-line string.
 
user1596138
@Charlie PHP = PHP: Hypertext Preprocessor
 
@Jhawins Yep
 
10:13 PM
@adeneo they invented so many things like Dinosaurs, the Holocaust and homosexuality. What other myths will their minds come up with?
 
@UlisesContreras are you a Markov chain?
 
user1596138
The wiki page is nice tho
 
I'm So Meta, Even This Acronym
 
@Luggage but is ok? :))
 
user1596138
> PHP - PHP: Hypertext Preprocessor (originally "Personal Home Page"[11])
 
10:13 PM
No. It's not valid javascript.
 
@BenjaminGruenbaum - then there's that. I'm especially outraged about the dinosaurs, just claiming that such things existed seems stupid to me
 
@Luggage What difference?

//javascript hates multi-like strings, so you need to break it up into lots of strings like this:

var jsonTextMultiLine = '{' +
    '"name": "bob",' +
    '"age": 3 }';

WITH

var data = '{
    	'+ '"img":"http://...",
    	'+ '"title":"Parc de Catalunya",
    	'+ '"description":"Lorem ipsum dolor sit amet, consectetur adipisicing elit."
    	}';
 
NO
 
@UlisesContreras We have given you answers but you don't understand. I suggest finding some help in your native language.
 
@UlisesContreras Did you read anything I or @Luggage sent you?
 
10:16 PM
@UlisesContreras please read that MDN tutorial - until you do please discuss your problem elsewhere.
 
@Zirak - he read it, then discarded it as nonsense
 
hehe
 
@Zirak are you still talking to tiny avatars?
 
user1596138
@UlisesContreras See the commas..
 
user1596138
10:17 PM
They are commas.
 
user1596138
That is how
 
4 mins ago, by SomeKittens
@UlisesContreras are you a Markov chain?
 
I have very few tiny avatars in my list, this one has a very good reason for being there.
 
@Jhawins I can't even understand that.
 
user1596138
10:18 PM
@Luggage Oh I thought he wanted trolled
 
user1596138
!!afk home time
 
Reminder: Most of us agreed not to help obvious and continuous help vampires
12
I'll just leave that here
 
Reminder: Pudding is pretty tasty
 
@SecondRikudo Yup.
 
Reminder: JavaScript is not Java
 
10:25 PM
except tapioca
 
Reminder: Mother's day is in a month and a half
Buy her something nice.
 
Isn't that Valentine's?
 
@BenjaminGruenbaum Buy her something rice.
 
@KendallFrey For some people, the two days are one and the same.
 
10:26 PM
I felt the burn all the way here
 
For instance, your mother's day is when @SecondRikudo celebrates valentines.
 
@Zirak Obligatory lonely island ref
And in Hebrew for @Second
 
Isn't mothers day the last day of Shevat ?
 
@BenjaminGruenbaum I... have no response for that.
How's your election's page @BenjaminGruenbaum?
 

« first day (1538 days earlier)      last day (3426 days later) »