« first day (963 days earlier)      last day (3971 days later) » 

12:00 PM
Array(4).join(" ").split(" ").reduce(function(p, n, i) {
    return p + ',arg' + (i + 1);
}, 'arg0')
 
your screen width must be large enough to experience it
 
@FlorianMargaine You mean Array(3)
 
!!> Array(3).join(" ").split(" ").reduce(function(p, n, i) { return p + ',arg' + (i + 1); }, 'arg0')
 
@Esailija "arg0,arg1,arg2,arg3"
 
still not any better than "arg0" +
 
12:00 PM
maybe, dunno how many arguments you want
 
well this is not the point at all
the point was to create functions without using strings
 
function(){} // function without strings
 
you can also generate code without strings
not just functions
like a for loop
 
@Esailija minitech was here a few days ago, asked this gist.github.com/minitech/5666294
 
use lisp.
 
12:03 PM
don't run it!
 
!!> var unwrapBody = function( fn ) { return fn.toString().replace(/^\s*(?\s*(?\s*function\s*()\s*\{/, '').replace(/\}\s*)?\s*$/, ''); }; unwrapBody(function(){ for( var i = 0; i < 10; ++i ) { echo ( "hi" ); } });
 
@Esailija "SyntaxError: invalid quantifier"
 
OOH FUU
" for( var i = 0; i < 10; ++i ) { echo ( "hi" ); } " that was the result, I promise
string without using strings
the only limitation is that it has to be syntactically valid javascript
 
lol
 
but it's 100x maintainable than string snippets of code
.P
 
12:07 PM
sure is
 
@DustinCook 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.
 
@Esailija what's the point of this?
 
what's the point of generating code dynamically ?
 
yeah, in js
 
if you have compiler or translator in js that targets js, you will need snippets of code in strings
then you can do great optimizations without duplicating code logically
and so on
 
12:12 PM
redblobgames.com/grids/hexagons/#line-drawing <- can somebody explain me that algorithm ?
isnt his implementation quite faulty ?
 
@Darkyen tbh I wouldnt bother with hexes
 
@Loktar oh they are so much fun :-( :D
 
added overhead for no huge benefit
 
@Loktar there are huge benifits, more realistic battle plan
 
@Esailija I'd rather have a js lexer/parser...
 
12:13 PM
well, you can be attacked at diff sides sure.. but idk seems like they could just add to headaches
 
rather than what?
I don't think we are talking about the same thing
 
that is a badass page @Darkyen
 
yeah I think
 
@Loktar yeap it is
but he at some places went too quick :-|
 
12:15 PM
I know there are golfers here.
How would you reduce this :
Array.apply(0,Array(1000)).map(Math.random)
?
 
What does it do?
 
I just need an array of 1000 pseudo random numbers
 
Then why are you mapping a number?
 
?
 
Array(1000).map(Math.random)
 
12:17 PM
A for loop is 1 char shorter: for(i=0,a=[];i<2;i++)a[i]=Math.random()
 
@Zirak I want only one statement
 
@JanDvorak map doesn't go over undefined indexes. Run the code.
 
how does dystroy's line fool map into going over the undefined values?
 
@dystroy It's only one statement
for(;;)body
 
@Alnitak using apply
@Zirak you must create the variable a first
 
12:18 PM
Array.apply(0,Array(1e3)).map(Math.random)
 
Yeah, we do, in the beginning of the loop
 
he has an interesting way of doing terrain
 
@Zirak ok, seen
but I want the array to be the result of the statement
 
Constrictions constrictions...
 
@Loktar yeah, that's nice :)
 
12:20 PM
also a=new Uint8Array(1e3);crypto.getRandomValues(a) ... verbose apis though
 
so Im sitting here alone with my new coworker..
and he let a huge one rip..
really loud.
 
eval("["+Array(1001).join("Math.random(),")+"]") ... nah, not good
 
@Loktar wait... there is a joke here.
 
yeah :? but I cant find one
 
@Loktar very intresting indeed
 
12:21 PM
@dystroy is your code relying on undefined behaviour? There's not much difference between Array(10) and Array.apply(0,Array(10)) except that in the latter the keys do end up existing, but with undefined values.
 
I didnt even look in his direction though, im thinking wow that was fucking loud
 
but can you make a strategy on those beasts ?
 
@Darkyen oh lol I didnt mean you should use it, was just crazy
 
lol
 
I was just looking at some of that guys other stuff
 
12:22 PM
i wont use it (XD)
 
@Alnitak I never found enough documentation on Array and map to explain that.
 
most of my battles are flat, it will gimme 1 polygon ... a rectangle
 
@Loktar I have my own renderer, although it won't do terrain stuff yet. Did this, though - flickr.com/photos/raybellis/8768553980
 
does anyone edit coffeeScript in chrome DevTools?
 
But the goal is to have the keys existing so that I can map
 
12:22 PM
> I'm sorry man, In government buildings all deadly substances must be contained in bottles no larger than 8oz.
2
 
@Alnitak thats really nice looking
@rlemon haha
 
@Alnitak There's a major difference
 
@rlemon including water
 
could be anthrax
 
whats weird or interesting is he uses voroni alg
 
12:23 PM
never know.
 
It's basically doing Array(undefined,undefined,undefined,...)
 
yes
 
@Zirak yeah, I'm looking at the shim for .map - it checks for k in o, not just all keys from 0 .. length - 1
 
I've used the voroni alg before but just to make dumb stuff
 
but I'm sure there is a smarter and shorter solution... I'm just not smart enough. That's why I ask you.
 
12:24 PM
So it creates a legit array
 
that moment when you realize you left your phone at home
I now know Loktars pain.
 
Array(n) however creates one full of holes. But when you try to apply it, it looks like a legit array.
It's smart.
 
@Darkyen what do you think about deedy.quora.com/Hacking-into-the-Indian-Education-System ? Why in the love of god does he publish that under his name and includes the name of his friends?
 
@rlemon haha sucks man
mine is out in my truck which takes like 5 mins at least to get to
 
Array(n) creates undefined keys, Array.apply(0, Array(n)) creates undefined values. I like it.
 
12:25 PM
or do Indian officials don't care too much about hacking?
 
@Loktar what do you do mid summer?
can't leave it in the hot truck.
 
I do :?
and in mid winter as well
battery has taken it so far at least
I put it in my glove compartment
 
yea cold shouldn't do much, so long as it's powered down.
if it's on the worst can happen is a crash.
 
I never power it down
cold zaps the battery a bit faster but thats it
 
we test out motherboards down to -60C
ahh, yea battery.
but it shouldn't do much permanent damage.
 
12:27 PM
yeah I know electronics operate better in colder conditions, batteries just dont seem to love it
 
hot on the other hand...
 
yeah, thats when I worry most
 
we have issues with stuff working below -20c
 
but its shaded so it never gets too hot at least
what is that f?
like -70?
 
!!/convert -20C
 
12:28 PM
@rlemon Confuse converter with c, receive error message
 
oh -4
 
@rlemon -4F, 253.15K
 
-40C === -40F
 
weird, thats not even that bad
 
weird, I don't consider -20C "not that bad"
 
12:29 PM
things would run fine, but booting was sometimes an issue if the boards were too cold.
 
@JanDvorak heh it hits negatives all the time here in the winter, even more in Michigan, and more in Canada :P
 
@Bruno 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.
 
China required our shit to work down to -40
 
crazy..
 
yup
we advertise -20 but with some modifications it can handle -40
 
12:30 PM
as in, using different rubber?
 
we also measure moisture right. idk how but boss man designed a moisture sensor that can read moisture from a frozen corn kernal @ -30C
 
What, again, does your company manufacture?
 
automated control systems and moisture sensors for commercial grain dryers.
 
@GNi33 well i tried putting a / instead of my username on my university's website and it gave me a nice error log
so not surprised :P
 
@JanDvorak as I understand it, there are components in the casing that run fine at very low temps, those are positioned differently, instead of trying to reduce heat to the motherboard they are positioned to provide it. they are powered on first, then the motherboard once it reaches optimal temps.
 
12:35 PM
@Darkyen well, the data he got out of it is kinda interesting
 
it is :D
he can fill those data's and ruin those people's life :D
All you need to open a bank account with their name = School Signature (Since u know the school you can bribe), Name , Ma,dad name address, and a photocopy of 10th marksheet for your date of birth. :P ( in some cases an UDID is required but you can easily bribe through it)
and @GNi33 check this out :$
 
@Darkyen That's why I use a separate password for my paypal account..
 
@GNi33 well in india they are making a publically accessible database
 
MURICA
 
12:38 PM
@CokeHead 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.
 
where people will be associated to a UDID
 
Actually happened to my wife that someone had cracked her e-mail account, changed her password and security question and was in the process of cracking her paypal account using the same password
 
all 1.25 Billion will have a record in that database
imagine this sorta shit there :P
 
what for?
 
Identification they say
 
12:39 PM
working out
 
increasing fraud I say
 
@Braggae 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.
 
there was a portal which would allow you to search for a person with his Taxation number ( Pan Card) and nothing else... there are tons of frauds with banks
because of it they took it down
enter a Alpha Numeric Number get details of a person
 
USA1776 <-- uncle sams number
 
they make a publicly accessible database of all people filled with sensible data... what, why?
Identification? that doesn't even make sense
 
12:41 PM
@Darkyen What's it called?
 
@Bora 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.
 
@AmaanCheval Aadhar :P
its supposed to be publically accessible though there are major debates on its "use" and "mis-use"
 
It's publicly accessible?
I have an Aadhaar card, but not a PAN card
What happens to my information in that case?
 
Dude the aadhar udid
wait
 
Ah. You said using the tax ID / pan card number
 
12:50 PM
they removed it thankfully
but if somebody knows my name and dob they can still find my PAN Number which is equally bad
 
I'm kinda glad Safari on iPad does not support async:false. One more reason to avoid it. — Jan Dvorak 15 secs ago
 
Summer has indeed arrived...
 
And just like that my 7 days off are over and I'm back in this shit hole, can't wait to start my new job
 
@IvoWetzel hey everything cool with you/job?
Zynga was big in the financial news the other day
 
@Loktar With me yes, my girlfriend and I a pretty happy... lots of free time in the next two month...
 
12:54 PM
Well great to hear you are in high spririts
 
Guess you can figure the job part out on your own from the last part..
 
yeah :(
we were concerned when we saw the news, myself and @RyanKinal
 
Whole office got closed
 
heard they closed omgpop as well
 
:-/
 
12:55 PM
which seems crazy.. since they just purchased it for 200m
 
Closed pretty much everything except for India / SF
 
man thats so crazy
 
That sucks
 
Re-structuring...
 
well Im sure you got tons of awesome experience from it
easy to find something else with that on your resume
 
12:56 PM
guys.
should I buy this horse head?
it doesn't look to be the best horse head
 
yes
 
@rlemon Depends on which bed you wanna put it...
 
@rlemon no
lol that looks terrible
 
12:57 PM
looks like a horse imported from China
I think the real horsehead is around $30
and you wouldnt have to wait 3 months to get it in the mail
 
is wondering why someone chopped off a horse's head
 
any geek here ?
 
@Loktar We'll see about that, I'm almost done with the paper work required here in Germany when you loose your job. And I started work on a fresh CV to send out
 
> wondering why any horses have heads to begin with
 
@user13814 wrong place
 
12:58 PM
!!s/any/many/
 
@RyanKinal wondering why many horses have heads to begin with (source)
 
no geeks here, only freaks!
 
@IvoWetzel well good luck man! Enjoy your summer
 
Aw, missed it
 
 
12:58 PM
and Im sure it means we get to see you a bit more here :)
 
I have a better entry -_-
 
@Gacnt OH GOD WHY
 
FEAR IT
 
@IvoWetzel Oh crap! You've lost your job?
 
12:59 PM
@Gacnt my response
 
@Loktar I'd suppose so :) At least the severance is good (of course I can't tell any details)
 
haha is that you with a wikipedia shirt on
 
@OctavianDamiean Yep, just yesterday
 
Dafuk!
 

« first day (963 days earlier)      last day (3971 days later) »