« first day (1596 days earlier)      last day (3355 days later) » 

crl
12:10 AM
!!> var a=[[1],[1],[1]]; console.log(a.slice()==a)
 
@crl "TypeError: can't convert undefined to object"
 
crl
How could I return a copy of a? without doing [a[0].slice(), a[1].slice(), a[2].slice()]
 
slice is a pretty good way to do it
 
@crl "undefined" Logged: [[1],[1],[1]]
@crl "undefined" Logged: false
 
crl
oh ok
 
12:12 AM
@crl hmm
!!> var a = [[1],[1],[1]]; JSON.parse(JSON.stringify(a));
 
@BenjaminGruenbaum [[1],[1],[1]]
 
Just calling .slice won't work since it's not deep
 
@crl beware that the outer array is a new array, but the inner ones are not
 
crl
!!> var a=[[1],[1],[1]]; console.log(a.slice()[0]==a[0])
 
@crl "undefined" Logged: true
 
crl
12:14 AM
Ok, but I want new copy of inner ones, I wondered why I couldn't map it
 
@crl because map passes the values as parameters, not as this
 
@GabrielTomitsuka you realize, there are data structures other than arrays right?
 
!!> [[1],[2]].map(x=>x.slice())
 
@KendallFrey [[1],[2]]
 
12:15 AM
^ also nice
 
@KendallFrey That's actually nice.
Hmm...
 
crl
Ah I'm stupid, thanks @KendallFrey
 
@GabrielTomitsuka a priority queue is usually implemented with a heap.
 
@BenjaminGruenbaum Recommended one in this use case is...?
 
of course it won't work for deeper nested arrays
dunno if that's a problem
 
12:17 AM
@BenjaminGruenbaum It's not near ready, I'll still try to add what I've learned on the Informed Tree Search Course and add A* search to it.
 
Not sure how A* is related.
 
@BenjaminGruenbaum I'll use this queue module for another module I'm working on.(The other one's going to be closed-source for a while, though)
 
@GabrielTomitsuka yeah, but you're implementing a priority queue with an array - and you're .sorting it - that's O(nlog(n)) at every insertion.
 
@BenjaminGruenbaum I read this article here: eloquentjavascript.net/1st_edition/appendix2.html and it may be helpful here, but still performance is an issue.
Not exactly an article...
 
Didn't read that - in introduction to algorithms there's a pretty good wrap up
 
crl
12:29 AM
Hmm disappointing that js has no support for binary numbers, doing var x=0b11 would have been useful
 
@crl You can parseInt with a radix, but I think there are binary literals in es6
 
@crl 0x3 usually serves the purpose for me
 
!!> 0b111110111;
 
@BenjaminGruenbaum 503
 
crl
12:31 AM
!!> 0b11==3
 
@crl true
 
Caprice runs with the --harmony tags, huh?
 
She runs on Firefox
Chrome/Opera folks: Has anyone noticed that arrow functions seem to have been removed? They used to work for me, and I'm curious if there's a way to get them back.
 
@KendallFrey it was deemed not mature enough
 
@KendallFrey they were broken so they were removed atm so people don't use them by mistake.
 
12:34 AM
iirc the binding didn't work or something like that
 
so I gathered
I guess they're not stable enough for me
 
I'm not pasting babel into my console, kthx
 
12:36 AM
badass goose
 
Canadian thug
 
Is a Canadian thug one who doesn't hold the door?
 
haha
 
I still love the fact that someone held a door for me and said "thank you"
 
@Loktar sweet
I'm pretty hooked on unexpected thuglife/jihad for the last month or so
 
12:40 AM
haha oh yeah? Ill have to ping you as well next time
they are great
@rlemon got me hooked
 
I love unexpected jihad
ALLAHU AKB-
 
1:01 AM
@Loktar .... ohh my god.. becky, look at her fish-horse! reddit.com/r/HybridAnimals
 
#nophotoshop #nofilter
 
1:14 AM
Does using the request framework make any sense? One can do just the same with the standard frameworks.
And it has quite a few dependencies.
 
That Node.js module called request. Does it make sense using it?
 
It's not a framework, and sure, sometimes
 
Time-and-budget critical apps?
Or it's actually nonsense developing your own mini-HTTP client module?
 
1:43 AM
@rlemon haha dude I actually subbed to that a few days ago
it was in the sidebar
 
 
1 hour later…
2:52 AM
lol
 
3:16 AM
hi
I was using zepto 1.1.6. It says in the docs, that $.ajax supports the .done but, does it need any external dependencies? because its saying .done is not a function
or maybe its my mistake.
jsfiddle.net/ad2skxrq but this is logging a nomal xmlhttprequest . no promise
'If the optional modules “callbacks” and “deferred” are loaded, ' oww
even a jquery with ajax module is 50 kb :( raw.githubusercontent.com/jgallen23/jquery-builder/0.7.0/dist/…
I dunno what to do. I dun need any of those selectors
just the $.ajax
 
4:02 AM
> If the optional modules “callbacks” and “deferred” are loaded, the XHR object returned from $.ajax() calls implements a promise interface for adding callbacks by chaining
@argentum47 from zepto
 
yeah I saw that, and custom built one github.e-sites.nl/zeptobuilder :P
still its 20 kb less that jquery with only ajax
I was dreaming some codes yestarday ! and then someone threw a metal rod into my stomach :( . too bad I don't remember the codes. sigh
 
5:06 AM
When I first used jQuery, it claimed to be lightweight, and it was. Now they no longer make that claim...
But now it's more useful than ever!
 
 
1 hour later…
m59
6:10 AM
plausible or photoshopped?
 
Hey Folks
Good morning
 
6:26 AM
@m59 plausible, but probably not accidental
 
7:10 AM
how haven't I heard of this? the great llama chase of 2015
 
8:05 AM
@Sheepy: they still claim it's lightweight :P
 
 
1 hour later…
ASR
9:13 AM
HI all
 
ASR
My navigation menu is disturbing when I hover the menu item. can any one help me?
 
@ASR 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.
 
ASR
@CapricaSix okay thanks
snag.gy/ZnDKh.jpg here is the actual navigation menu
when I mouse over on each item navigation became like this snag.gy/dBEz7.jpg
 
Happy Saturday to you all!
 
10:03 AM
I hate saturdays: they're the day before the day before monday
> Monday Is Coming
 
Rule number one of the weekend. You do not talk about Monday. You do NOT talk about Monday.
 
10:25 AM
Monday. Monday monday MONDAY! Muahahahahaha!!!!1
 
11:13 AM
film suggestion?
@RoelvanUden unless it'll be monday in 2 days
 
@argentum47 @darkyen00 ggsipu.nic.in/scripts/links/dropmenucsshome.js (this is from the website of delhi's first university, and was last updated in 2014). We are part of a flawed system :/
view-source:ggsipu.nic.in just see all the code and scripts...
 
12:00 PM
@AwalGarg illogical
 
 
3 hours later…
user2620028
2:37 PM
note to self To find the motorcycle stylings of a Ducati Monster the proper google search terms is "naked motorcycle." Not the search terms you just tried of "naked bike." RIP safe search filter.
 
3:46 PM
posted on February 28, 2015

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Hey geeks - we're aware of the annoying mobile ads. Working to fix i

 
im trying to find next project can anyone help
 
@Steve There it is. points
 
@Steve what's your level?
@Zirak progress ^
 
I don't suppose I could get a couple of you to take a look at this? stackoverflow.com/questions/28775864/…
I'm basically trying to implement a client-side ping tool of sorts, which I'm well aware isn't what JavaScript should be used for - I'm simply doing this for fun, and I've hit a rather large hurdle.
 
4:02 PM
i would like to do something web apps
 
@Steve make an RSS aggregator
 
4:19 PM
 
hello @rlemon
I wanted to tell you something
but I don't remember what
 
That you secretly love him?
 
it's not so secret
 
did you have that dream again, you know, the one where I fly in through the window
 
oh yeah that was it :(
 
4:22 PM
no, you only fly out
 
!!slidepoop
 
Mar 13 '13 at 1:40, by rlemon
(Random Fact, when rlemon was 13 he pooped on a slide. he isn't proud of it, but he felt it was time to confess. I'm sorry slide.)
 
Mornin
I feel like going to the cinema, anyone feels like recommending a movie?
 
I never go to the movies... it's for pussies
(PS: it's a joke. I never go for other reasons.)
but since I never go, I'm not very interested in movies coming out...
 
That's ok, I do go to the movies because I'm a pussy.
But being the pussy I am, I'm afraid to go to movies that are too scary :D
 
4:36 PM
I love horror movies
 
@FlorianMargaine lol'd
 
?
I was serious
 
i hope not dead serious
 
dead serious
what's wrong with an rss aggregator? it's a pretty nice project if he wants to learn how to make a webapp
involves lots of things, can be useful
 
it takes a while
but that's relative i have to admit
 
4:48 PM
can take 2 hours or 2 months
a minimal example can be done in <2 hours
 
5:14 PM
Crap it , they can't learn to use decent case, decent api
would somebody want to write PromisedPlivoNode.js ?
 
 
1 hour later…
6:26 PM
Weekend question/challenge - What are good challenges for beginning Angular programmers? (i.e. using controllers properly, etc)
4
(cc @Garrett Kadillak )
 
I found this fiddle that displays a checkboard. Each cell has a &nbsp; in it. If I remove the non-breaking spaces, it renders the same in Chromium and Firefox. What are the non-breaking spaces for?
 
If I have eightteen spaces in a row, the browser will only render the first one. For example.
^ eightteen spaces between for and example
&nbsp; means "Put a space here even if there's other spaces around it"
Not quite sure why they're there in the Fiddle
 
No, &nbsp; is a non-breaking space (the browser doesn't insert a newline there if it is used at the end of a line)
 
Every time I encounter some apparently useless HTML, CSS or JS, I wonder if it's IE's fault.
 
You could of course remove the &nbsp; and observe what happens
 
6:35 PM
"If I remove the non-breaking spaces, it renders the same in Chromium and Firefox."
 
Ok, I'm tired
 
No worries. I have my share of "chatting while half asleep" incidents.
I just realized there's no JS in my question. So, probably there's a more specific room to ask it. Thanks for thinking about it, though.
 
There's HTML & CSS (the room)
 
Cool. I just asked it there.
 
user1596138
@Shmiddty irrigating syringe is actually super sharp. Lol i made a bloody mistake this morning
 
6:46 PM
user image
2
RIP Leonard Nimoy
 
Welcome to Friday
 
7:05 PM
@Jhawins ouch
 
Everybody: Recommend a linux distro
 
@RyanKinal MINT
 
user3117575
^
 
user3117575
Using Mint right now, 8)
 
Two votes for Mint
I've decided there is literally no reason for me to have two Windows machines
 
7:09 PM
@JamenMarz I thought you meant you were using Mint 8, was all 'wat'
 
lol
I've heard good things about Arch too. Any truth to that?
 
user3117575
I have a friend that uses Arch, he really likes it.
 
It's good
 
@RyanKinal @copy knows more, but it's much more complicated (not that it's a bad thing)
Lots more dials and switches
 
I'm okay with comlicated
Or even complicated
 
7:12 PM
Clean, good package manager
 
apt based?
 
No, it uses its own
 
Hmm, I see
 
Good wiki that documents many problems of all kinds
 
@copy What's the difference between apt and Arch's?
And yeah, ++ for the wiki
 
7:14 PM
Ooh, there are different flavors of mint too? Comes with different window managers?
 
@SomeKittens Anecdotally, fewer problems
Did I just use anecdotally
 
lol
Yes you certainly did
 
/me bans copy forever
 
Hello all :)
Anyone got time to help me with setting up onpopstate function`?
I am kind of wondering, is it nescessary to learn/use JSON, to get it to work smoothly? :)
 
I'm not feeling very well today
 
7:19 PM
How much does my choice of desktop/window manager matter? And what do you guys use?
 
And how I would define a state, I want it to work smoothly with my ajax code and onpushstate(this is working good), I am only missing the back/forward, share and reload part of the page :)
 
@copy Sorry to hear that. Allergies?
 
@copy Gonna make it through?
 
So who's the guy on Silicon Valley everyone thinks acts like me?
 
@SomeKittens No, just a cold I guess
 
7:22 PM
aw, no fun
 
@RyanKinal XFCE if you want something that resembles Windows (and isn't bloated like Gnome)
For mouse-less control, awesome (that's the name of another window manager)
 
Don't really care about Windows similarity. I've used XFCE before, wasn't sure if it kept up.
Hell, I use command line on Windows a ton anyway
 
You'll be happy with awesome, after some time getting used to it
Or ping @FlorianMargaine and ask him what he uses
 
you won't like what I use
 
Psh. We'll see about that.
... what do you use?
 
The guy in the middle
 
Yeah, you look a little similar to the guy in the middle
But I've never seen Silicon Valley so I can't vouch for behavior.
 
@RyanKinal stumpwm
its advantage is that I can hook into its runtime (same as JS console) in emacs
 
That sounds badass
But yeah, probably not for me
 
@RyanKinal it is, but it's easier if you know/like Lisp...
 
7:32 PM
And I don't know it :-P
 
hence the:
8 mins ago, by Florian Margaine
you won't like what I use
^^
 
@RyanKinal I actually have an Archlinux VM image with some stuff installed, if you're interested
 
Nah. Think I'm going to try Mint. Just downloaded it.
@FlorianMargaine Still interesting to know :-)
Oh, sunuvuabitch. I don't have a DVD to burn to.
I wonder if I have a USB stick around here somewhere...
 
@RyanKinal Debian
 
Score! Found a DVD while I was looking for a USB...
lol
 
7:57 PM
         sendEmailWithOTP(email){
             return  this._getOrCreateRandomness()
	        .then(otpToken => this._createEmailWithOTPToken)
                .then(emailObj => this._sendEmail);
         }
When i wrote that, i thought that its just thisturbing
upon saying the word thisturbing i went like Not sure if Pun Intended or Just my indian accent
 
Thisturbing?
Like... disturbing with a "this"?
 
yes :-(
 
@rlemon I'm working on a cool extension of your user color picker idea
 
IT'S HIDEOUS
 
hooray color pickers
 
8:09 PM
Mornin
 
monring
 
@SomeKittens todomvc is always fun. Or taking some existing site and making an Angular version of it.
 
@SomeKittens YOUR FACE IS HIDEOUS
2.9
 
Like - an Angular stack overflow for example
 
@BenjaminGruenbaum I kinda like that one
 
8:10 PM
@BenjaminGruenbaum Angular is totally webscale
 
You can use their API for data (although it's limited so you might want to cache/proxy it
@Shmiddty only when using MongoDB and NodeJS
 
haha
 
@SomeGuy ... i was just told "Americans bahot advance hai angreji singers future me jake indian logo ka gana copy karte hai, indian singers ke gane churate hai"
and i don't think the other guy is trolling, cause hes defending !
 
8:36 PM
Help please :)
I have an ajax-page, need to add onpopstate..
http://jsfiddle.net/vwd6bnjc/
 
Hi everyone. I had a question. (Who'd have thought?)

I'm quite new to writing unit tests for my code. I've been getting to grips with Karma and Jasmine for a few months now. But one thing I don't feel has been answered for me is: when should I not bother writing a unit test? When do I decide that something isn't worthwhile testing?
Also, somewhat related: does anyone have any experiences with JavaScript DI frameworks outside of Angular? It seems that a lot of the things I'm finding difficult to test would be a lot simpler if I could just inject dependencies in my test code, but without having to inject them in my actual production code.
 
@JimmyBreck-McKye When to write a unit test is the most interesting question about unit testing. I write tests to support refactoring, to prevent regressions, and to inform my design. I don't write tests when the ratio of difficulty-of-testing to protection-from-bugs becomes too large, or for (most) one-off projects, or for methods and classes that are adequately tested indirectly via other unit or integration tests.
 
For me, the fact I don't have a DI framework seems (I think) to offset that difficulty-vs-benefit ratio quite a bit. At least, from what I've heard.
Then again, is it worthwhile unit testing an object that calls some helper functions just by mocking those functions and testing that they're called? Or is that just not a worthwhile thing to do if the object doesn't contain any logic beyond that?
I can give a simple example if it helps.
 
@JimmyBreck-McKye yeah, it'd a hard question. I don't test a lot of UI - I test a lot of flows.
 
@BenjaminGruenbaum Testing UI is hard.
 
8:50 PM
Naa, testing UI is just really boring.
 
You can test for DOM interactions, you can test for thrown events, but actually testing whether the UI does what you want automatically is not trivial at all.
 
Oh, of course it's not and it's also often not worthwhile
 
Did you catch my ping about mongo @BenjaminGruenbaum?
 
Yeah, I did, not sure what I was supposed to say about that :D?
That you can make it not screw up writes while sacrificing a lot of performance?
 
Hmm. Maybe I just have to be pragmatic and try and reason about the cost-to-benefit ratio.
 
8:52 PM
@JimmyBreck-McKye You probably haven't heard of Chusha
 
No, I haven't, but I'm looking at the Github project
 
As for what to test, I like to test everything but the most trivial getters/setters.
 
@BenjaminGruenbaum the must be a keyboard there that instead of sending a \t when pressing [tab] to send a burst of 4 spaces :)
 
This "installing linux" thing is for suckers
It's not working
 
if there isn't, one must be made
 
8:55 PM
@RyanKinal you know who said linux is too hard to install so he's not switching to Debian?
Linus Torvalds :D
 
Hah
It won't even boot to a live CD -_-
 
Okay, that looks fairly simple. I just decorate a function with dependencies with a method that lists them. Then, in my production code, I can just call 'get' from Chusha and it'll give me an autowired function.
 
would make using the device a pain for those using forms, but hey.. it's for programmers
 
@JimmyBreck-McKye Correct.
It will also resolve dependencies recursively as you expect.
 
Interesting - I will try it out
 
9:00 PM
@JimmyBreck-McKye I would love your feedback. The core dev is yours truly.
 
9:27 PM
@SomeKittens middle
 
@rlemon kthx
 
9:49 PM
Is there a new season of SV?
 
!!kerbal or homeworld?
 
@SomeKittens kerbal
 
@BenjaminGruenbaum not yet
 
@BenjaminGruenbaum
 
gif from Second Rikudo was moved
 
9:56 PM
@rlemon shouldn't we move to js trash now? ^
 
why?
gif bin is for gifs
 
@SecondRikudo ?
 
@BenjaminGruenbaum My gif was moved -_-
Look at it
 
@FlorianMargaine good idea
@SecondRikudo oh, cute :)
@SecondRikudo also, I'm less than thrilled about !!die - I think it should unsummon the bot rather than kill it.
 
@BenjaminGruenbaum I still don't fully understand the rationale behind letting mortals kill the bot
 
9:59 PM
that's what !!unsummon does
 
@KendallFrey Yes, but !!die is exposed to mortals!
 
@SecondRikudo It can be annoying to people. Also - thanks for having my back there yesterday -_-
 
@BenjaminGruenbaum Hmm? What are you referring to?
 
@SecondRikudo you know damn well what I mean.
 
@SecondRikudo in case the bot goes wild and no RO is there to stop it
 
10:04 PM
@FlorianMargaine "Wild" how?
 
it may bug and start flooding
 
@FlorianMargaine At which point it's kicked or flagged
 
@WayneConrad hey :D
 
@SecondRikudo kicked by who?
 
@FlorianMargaine Room owners in the room it's offending on
Or it would be flagged and suspended, after which we'd get her unsuspended after the bug is fixed.
 
10:16 PM
12 mins ago, by Florian Margaine
@SecondRikudo in case the bot goes wild and no RO is there to stop it
RO = room owner, in case you didn't understand...
 
@FlorianMargaine Yeah, but there are two kinds of "RO" in this context.
RO of room 17, and RO in the room the bot is going wild on
They are not neccesarilly the same rooms.
 
what's your point?
if the bot starts spamming in room 17 and no 17 RO is there, what happens?
 
@FlorianMargaine It gets flagged and suspended.
 
or 2 people use !!die and it's over
 
Although, I haven't seen such a case in the last few weeks at the very least.
 
 
1 hour later…
11:22 PM
@BadgerCat Howdy! Good to see you.
 
Hello! anyone care to help me with ths popstate event in javascript/ajax?
http://jsfiddle.net/vwd6bnjc/1/
I have a problem understanding how to use it, or, how to code it..
 
@WayneConrad Good to see you too :)
 
Just watched data's death [star trek tng] Now i dont feel like watching the series anymore :-/
"cause": {
"name": "error",
"length": 127,
"severity": "ERROR",
"code": "22P02",
"position": "130",
"file": "src\\backend\\utils\\adt\\enum.c",
"line": "60",
"routine": "enum_in"
},
ps how do i debug this !
this came in js btw
 
11:56 PM
yay I made a thing
/me eats taco bell
 
lol
/me just finished working out
you know it is a good workout when your last set you are yelling at the weights.
 

« first day (1596 days earlier)      last day (3355 days later) »