« first day (1634 days earlier)      last day (3313 days later) » 

9:00 PM
#define true false
#define false true
 
@StevensHaen It's useful for when you really don't want to deal with what comes after it.
 
@ssube what now?
 
#define zoidberg (;;)
 
@FlorianMargaine now everything is... false!
 
9:00 PM
@FlorianMargaine #define while if is my personal favourite
 
@StevensHaen when the thing in the infinite loop is waiting for something
 
If your program has a lot of bugs, using for (;;) { } at the beginning of it is a great way to resolve them.
 
@rlemon I don't understand what's so interesting NoDownVotesPlz hangs out here
 
like for (;;) read_from_network()
 
the classic use is for the message pump in a windows app
 
9:01 PM
@JasonC On Error Resume Next
 
every time a packet will come, the function will be called
 
You think he's trying to be passive aggressive since we mentioned JS Room?
 
Does anybody in here not own this room?
 
for (;;) { readMessage(&msg); if (msg.type == EXIT) { break; } }
 
@JasonC Yo.
 
9:02 PM
had all cores at 100% with: for(;;) console.log('a');
 
@Retsam high five You and me, bro.
 
@ssube no reason that couldn't be a normal for loop
 
!!>for(;;) console.log('Tell me about the Timeout.');
 
@CSᵠ Maximum execution time exceeded
 
@ssube Arguably, for ( ; readMessage(&msg); msg.type != EXIT) { } or a do...while.
 
9:03 PM
that said, this for thing reminds me of the speed-up loop
2
 
@JasonC we're a tightly knit chat
 
!!> for (var i = 0; i < 1000; i++) console.log("THE GAME");
 
@KendallFrey "undefined" Logged: "THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE GAME","THE (snip)
 
hehe
 
well, I just lost. 1000 times.
 
9:05 PM
!!s/c// 22542904
 
@KendallFrey @JasonC we're a tightly knit hat (source)
 
@JasonC that kind of memory stuff in a loop condition is iffy
 
!!define iffy
 
@FlorianMargaine [iffy](http://en.wiktionary.org/wiki?curid=58793) (slang) Of dubious authenticity, legitimacy or legality.
He's selling new CD players for £20 each – that sounds a bit iffy to me.
 
9:06 PM
iffy = questionable
 
fun fact: "jiffy" is in fact a unit of time
 
truthy, falsey, iffy
 
whiley
forey
 
Fun fact: "beardsecond" is in fact a unit of distance
 
presumably derived from the second and a unit of speed called a beard
 
9:07 PM
I wish MegaFonzie was a real unit of measure
 
Since we're going with oneliners replace return parseInt(a,10) + parseInt(b,10); with return a*1 +b*1; to shorten it further.. — CSᵠ 12 secs ago
he edited it already :)
 
@CSᵠ return [a, b].map(parseInt);
 
yup :)
 
@vihan1086 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
(I'm kidding)
hi @vihan1086!
 
9:11 PM
@FlorianMargaine or a|0 + b|0;
 
@CSᵠ mine was a joke.
 
or ~~a + ~~b;
 
try it.
!!> [1, 2, 3].map(parseInt)
 
@FlorianMargaine [1,"NaN","NaN"]
 
it can be made to work in that format..
 
9:12 PM
@CSᵠ has problems with large numbers
if you can, avoid |0 in general
 
*1 it is :)
don't if you need to work with integers..
 
*32-bit integers
we ran into a problem with it when our db started returning IDs over 4 billion :D
 
not for that, clearly
 
!!>for(var i=1,a=[];i<5e5;a.push(i++));
 
9:15 PM
@CSᵠ "undefined"
 
@FlorianMargaine JS regexes aren't stateless, unfortunately.
 
wow, wth was that
 
@Retsam TIL
 
To find multiple matches you call the same method, until it returns null, indicating that there is no more matches.
 
or you use /g
but yeah, got it
so weird
 
9:17 PM
It's part of why they're so slow when you declare them inline: they can't be hoisted or pre-compiled or anything like that.
Because they're stateful, they actually get allocated (and probably compiled) each execution.
 
makes sense
 
that should have matched!!!
!!>for(var i=1,a=[];i<1e3;a.push('x'.repeat(2000)));
 
@CSᵠ Maximum execution time exceeded
 
@FlorianMargaine re.lastIndex, it's on purpose
 
@vihan1086 you need to allow plus and minus also there /[\de+-]/i and /i for both e and E notations :)
 
9:30 PM
@CSᵠ or you just use the recursive reduce...
 
9:44 PM
@SterlingArcher that was why I said "?"
 
Is there a way to combine to Sets in ES6?
*two
 
Indubidably
 
Morning
 
@jbaiter worst case, you b.forEach(i => a.add(i))
 
Good point. RT @zuph: Inoffensive plainness would be a major personality improvement for most Soylent "users."
heh
 
9:49 PM
@jbaiter let newset = new Set([...set1, ...set2]);
 
awesome Florian, thank you :) hadn't thought of using the spread operator for that
 
@SomeKittens still like soylent?
 
@FlorianMargaine 1.4 doesn't work for me. I lose my ability to focus
 
wait, soylent has version numbers?
 
(and I mean completely lose. Can't focus on anything for more than a few minutes)
 
9:52 PM
@ssube Well, ur FACE is iffy.
 
!!summon 74583
 
@SomeKittens wow, that's really troubling for a nutrient drink...
 
@SomeKittens that's... troubling.
 
@CSᵠ @BenjaminGruenbaum Yep. Haven't drank any 1.4 since.
 
what version you use now?
lol, version, it's like it's open source...
 
9:57 PM
I have some 1.3 left over that works well but 1.4 is the only one they sell.
 
Any help?
http://stackoverflow.com/questions/29502109/get-object-children-by-variable-value
Sorry for bad title, I couldn't pick right words to describe....
 
use categories[main_category] instead — dandavis 2 mins ago
 
@SomeKittens pretty cool
 
@rlemon yes, it's working.
 
10:21 PM
those DIY Soylent sites need to start using source control.
 
!!s/those DIY Soylent sites/all people/
 
@KendallFrey all people need to start using source control. (source)
 
And yes.. Not only should all developers use source control, but I think it makes sense for other tasks, as well.
 
That's why I call it "version control"
 
You know how stack-overflow takes the same basic site and exposes topic-specific versions? I've always thought that there needs to be a version control equivalent. Basically a github clone but with UI specific to the topic. Recipes would be one example, I can think of.
There are already recipe sites that use git.
But I've found no sites that try to abstract that out like stack-overflow.
 
10:33 PM
you mean SE
 
Right.
 
I wonder how many lines of code stack overflow has via just answers from people
 
that's a lot of bad code.
 
I'm starting to suspect that good code is a myth
 
@Shmiddty good code isn't really a myth, it is more like Utopia and Perfection. They can be defined, however, they can also never be reached.
 
10:59 PM
!!s/good code/dry land/
 
@Luggage That didn't make much sense. Use the !!/help command to learn more.
 
damnit
 
@Luggage @Shmiddty dry land isn't really a myth, it is more like Utopia and Perfection. They can be defined, however, they can also never be reached. (source)
 
!!s/(^|\. )([^']+( |,)){2,4}/$1The promised land$3/g
 
@CSᵠ The promised land isn't really a myth, it is more like Utopia and Perfection. The promised land (source) (source)
 
11:07 PM
What do you guys use for testing suites? I've only used jasmine-node, any others worth noting?
 
who tests?
 
mocha looks identical to jasmine-node, haha nice
 
real programmers test even before writing the actual code.
 
@CSᵠ that seems pretty loaded :P
 
11:11 PM
it is:)
 
11:28 PM
Sometimes in script tag the src begins with https://..., sometimes with //.... Is there any big differences between them?
 
// is agnostic to the schema
 
@Charly // allows for the script to be loaded on both http and https without errors
If I try to load a http script on a https page, I get a non-secure warning
 
since when is the // format accepted?
 
https causes the cross security alert in browsers when the page is loaded
it always has
 
thanks
 
11:29 PM
just like /image gets mysite.com/image
though lets throw a * on my always up there
 
why?
 
cause i cant recall the specific spec that brought it in
but its pre 1998
 
that's deep enough
 
hmm specific specification
 
something for you to google, old man here
 
11:31 PM
are you also an IT dinosaur?
 
i prefer IT Pre-Cambian lifeform
 
How old does one need to be to be a dinosaur?
 
6500000 years right?
 
at least
 
ok, an IT dinosaur, then.
 
11:33 PM
IT dinosaur is a rumor. they dont exist.
 
well if you're still in IT now and had about 15 years give or take since UNIX started counting (1970)...
* and you were into IT then also ^
 
Wasn't even born then..
that's pretty old.
 
me neither...
 
I was born about that time, went into IT at about 9 years
so.. not really dinosaur, but late bloomer dinosaur maybe :P
 
<joke>- So u eat urls for breakfast? - Yeah... - 200 then.</joke>
 
11:38 PM
:) almost didn't get it
 
@Charly Request accepted Returned 201, i'm not done digesting yet
 
how much time do managers usually spend instructing interns?
 
11:59 PM
depends on where and the intern
 

« first day (1634 days earlier)      last day (3313 days later) »