« first day (1665 days earlier)      last day (3301 days later) » 

6:00 PM
Are you getting it, @copy?
 
Maybe, once it's out
 
Haha, it's $9 for CHIP, and $20 for shipping
Not going for that, then
 
Maybe once you've got the free shipping chinese knockoff :D
 
Haha yeah, considering it's going to be open-source
 
Who wants their eyes to melt?
 
6:09 PM
Yay, eyes melting!
 
Devout worshippers of The Melty-Eyed One From Beyond The Dark Stars. They're all about that.
 
user image
3
From a JS textbook from 1999
 
dear god
 
It's actually from last week, @Zirak wrote it.
 
I made a new audio thingy rlemon.ca/demos/Thingy.html
4
 
6:13 PM
@BenjaminGruenbaum that's so learn
 
Looks great @rlemon
 
ty
 
@rlemon post the original codepen too
 
@BenjaminGruenbaum people need to stop printing out code, omg
 
codepen.io/anon/pen/eNJddv - please give attribution to the original author. @rlemon
 
6:15 PM
IT'S FRIDAY
gotta have my bowl
 
huh.. seems i had to go through babel twice. --optional bluebirdCoroutines doesn't transpile to es5, it only applies the async transform
 
@BenjaminGruenbaum my assignments look similar in indentation
 
@BenjaminGruenbaum I love me some mooki
Couldn't have done it without you
 
mooki mooki
location.href = "Browser3.html"
 
@BenjaminGruenbaum Did you and Ben Aston continue your spat outside the comments? It'd be...interesting to create a room with him.
 
6:22 PM
no
 
son of a whore, i can't install webpack, one of it's dependencies in broken in npm
empty package.json file
 
"Client Facing C++ Developer" <- worst job I could possibly imagine
 
6:38 PM
The last thing you want is a C developer doing client facing projects... lol
kdding, sue me
flagged
Forget the previous 2. This is an awesome pen: codepen.io/Pezmc/pen/YXwWje
 
6:58 PM
sup folks
 
sklof pus
 
Well, not that anyone cares, but I am now a food blogger.
Translation: I might have an excuse to visit the JS chat more often outside of work hours.
 
> Ability to design domain classes and interface with legacy libraries
 
@Zirak I thought for 2 complete minutes and decided I will give it (dev tools) a shot. If anything good doesn't happen, you are the one to blame.
hmm, this is interesting because I have absolutely no idea where to start. this is gonna be fun.
 
7:13 PM
well, i give up on babel --optional bluebirdCoroutine.. it outputs: _bluebird.coroutine(function* () { with the rest of the transpiled code
and running it through babel a second time has other problems
 
Functional immutable non-nullable programming in JS is surprisingly nice. Once you box in third party apis that scatter mutable state and nulls all over the place.
 
One of the awesomenesses in Haskell :-D
 
And F#, yeah. I was trying to emulate the experience with JS/TS. Mission accomplished. :)
A question, though. Naming related, the hardest question there is. I have an object called Page which has {number: number, populate: () => Promise<IPageWithImage>}. Calling the populate function gives you a promise that creates a new object that has the number and an image as binary. Populate is obviously a really bad name, it's not populating anything, it's creating a new object that is similar to page but also has something new. What would you call this function?
 
fetchData?
fetch to indicate an actual action, and data because you're grabbing everything
 
Pretty much all of the irc should shift to SOChat.
(channels related to dev, I mean)
 
7:21 PM
@JanDvorak I considered fetch as one of the primary candidates. But since fetch creates a new object that exposes everything the old one has, including some new stuff, I'm not sure it's an appropriate name.
 
As oppoosed to populating the current object, you mean?
 
Yeah, the current object doesn't change at all (immutable after all), so it's a new object.. with new stuff. Naming this is hard :D
 
If all your objects are all immutable, fetch is perfectly unambiguous to me.
 
Alright, I'll go for fetch then :D
 
> The checkout will be from 6GB to 22GB, depending on your choices.
holy shit... wt.
 
7:25 PM
Video footage of the source code?
 
the code is in MS Word files
 
chromium repo
 
My issue with babel bluebirdCoroutines: gist.github.com/luggage66/…
it got es6 in my es5
@BenjaminGruenbaum cc (I rarely ping individuals for questions, sorry).
 
Yeah, I don't think it should do that
 
what a shame..
so close to having some damn pretty code
 
7:33 PM
I am no way able to download a 10gigs repository :(
> ETA 45 hours
 
Even with a download manager?
 
doesn't git have a way to get a shallow clone, now?
 
@Luggage shallow as in no history?
 
no idea to either of the questions
 
yea
 
7:34 PM
@Luggage --depth 1
 
yea, that.
 
that won't work because chromium doesn't use git, they have their own fetching tools.
Because it is not a single repository
 
might still be a way to add some options to pass to git, assuming it's git underneath
like the android source
 
@Luggage yeah, they use repo for chromium too
 
so how do they do it in android @Luggage @FlorianMargaine (or where do I read about it?)
 
7:40 PM
same way. I don't mean they have a convenient way to do a shallow clone, but that they use a tool on top of git to handle all the repos
it has an option for shallow clone
that probably means it 6gb as opposed to 22gb
 
I tried that option already but that is what gives me a 10gb download
 
yea.. so i think that's as small as it gets
 
Guys moar postgres
 
timestamp has date and time, time is jsut time
 
nvm, me stupid. Carry on.
 
7:43 PM
carrying on
 
I think maaaaaybe I can do this on my server, get the files I need, edit files, replace on server, build, get the build, test, fail, repeat.
 
Given a schedule table that looks like this
CREATE TABLE public.schedule
(
   run_id integer NOT NULL,
   teacher_id integer NOT NULL,
   datetime timestamp(0) without time zone NOT NULL,
   split boolean DEFAULT FALSE,
   UNIQUE (teacher_id, datetime),
   FOREIGN KEY (run_id) REFERENCES runs (id) ON UPDATE NO ACTION ON DELETE NO ACTION,
   FOREIGN KEY (teacher_id) REFERENCES teachers (id) ON UPDATE NO ACTION ON DELETE NO ACTION
)
Would you think a primary key is important here?
Would you add a serial for PK? Would you just turn the unique constaint into a PK?
 
@MadaraUchiha always is
 
I'm not sure I'd need to uniquely identify a row here
 
7:53 PM
some database engines do require one
 
@JanDvorak I'm in postgres, it does not.
@BenjaminGruenbaum lol
I can give you a better one from a JavaScript textbook from 2015
Meh, I'm overthinking this. It's not some storage critical app where every byte count
I can live with my table being a few KBs bigger for an ID
 
server downloading all the stuff at ~450megs :D
 
Uhm.. document.querySelector doesn't support :contains(text)?
 
no
 
8:00 PM
That's jQuery
 
Well.. shit. Any equivalent?
 
Yeah .filter
 
Manually parsing the text from nodes?
 
textContent ?
 
use jquery
 
8:01 PM
I get you can fetch the nodes, filter them based on text etc, but there is no selector equivalent then?
 
if you want to iterate through text nodes, use createTreeWalker
 
[].filter.call(document.querySelector('div'), function(node){ return node.textContent && ~node.textContent.indexOf('needle') });
 
My version of indexOf hack: haystack.indexOf(needle)+1
 
That's seriously ugly! Guess jQuery is unavoidable then, to select nodes matching a text is a single selector.
 
8:03 PM
@nderscore You can do away with checking whether textContent exists, you know you're gonna get Elements and not arbitrary nodes.
 
@Zirak yeah, that's true
 
I don't see why is that ugly. Just put it in it's own function with a descriptive name.
 
*its
 
function findNodesWithString(selector, str){
    return [].filter.call(
        document.querySelectorAll(selector),
        function(node){
            return ~node.indexOf(str);
        }
    );
};
findNodesWithString('#container div', 'poop');
 
Let's see how often I use :contains...
 
8:06 PM
the stuff jquery is doing behind the scenes is equally ugly :D
 
9 times, ugh.
 
hmm, I need to build a recursion tree up and not down this is so basic and I'm stuck on it for like 2 minutes :D
 
If I did a random number between 1 and 10 with Math.Random and got 2 guesses would it be possible to see which guess was closest?
 
$.substract?
 
$.writeMyCodeForMe()
 
8:10 PM
@JoeConsterdine find the absolute difference between them and compare
 
so I'd math.random - their answers... and then an if statement to see which was further away?
I'll try that
 
@JoeConsterdine I can spin you a quick demo.
 
loop through the guesses, calculate the difference from the correct number, keep track of which one was the lowest
 
@AwalGarg Thanks... try it keep it simple I'm shit at JS hahaha
yeah I could do a loop till they got it right
 
8:18 PM
@AwalGarg thanks man.. I think I get it!
what you guys upto?
 
I just broke someone's heart
 
@JoeConsterdine Great. Can you get me a Chromebook Pixel 2 LS now?
 
@BenjaminGruenbaum I was once asked "What am I doing wrong", to which I answered "Programming".
What's your story?
 
HI ALL!
 
@AwalGarg sure..send over your paypal :)
 
8:20 PM
@shalvasoft HIIII!!!! HOW ARE YOU?
 
WHY ARE WE SHOUTING?
@BenjaminGruenbaum Yes
 
@AwalGarg well and you?
 
Then that
 
@BenjaminGruenbaum Lol
You smashed his dreams TWICE
 
8:22 PM
I have facebook share button
and I need something like that:
$(document).on('click', '.fb-share-button', function(e){
e.preventDefault();
if(return == true)
{
$("#facebook-share").modal('hide');
}
return false;
});
how can I do that?
 
@shalvasoft I am compiling chromium on a remote server. Do you know why does depot_tools throws an error when trying to fetch without no-hooks?
 
Unformatted code makes Luggage murdery.
 
@AwalGarg \ sorry. I have no idea
 
if(return == true) <- invalid
 
@Luggage Have you considered changing your gravatar to an actual luggage?
 
8:23 PM
No.
 
someone can help me in my problem
?
 
@shalvasoft Oh. Do you then know how can I access the console object past chromium 42 from an inceptioned instance of dev tools in global scope?
compile complete. Troll mode over. brb internet.
 
@AwalGarg I do not know anguar js. sorryy
@AwalGarg can you help me on my problem?
 
if someone wants to help, they will help
 
8:28 PM
@Mosho ok
 
Anyone familiar with Facebook SDK?
 
face...book? That thing still exists?
 
@JanDvorak lol
 
hah! IT IS SO EASYYYY. Now I just need to repeat what I did on the server on my PC and wait for 45 hours.
Which is likely to fail because my network will fluctuate in between and the repo will never get cloned :(
 
@JanDvorak It does, and once you mute everyone with kids under the age of 6 it becomes useful
 
8:45 PM
always good to see
 
@JanDvorak yes. my problem is about this too.
 
@Zirak progress: added code to get to sources directly in resources tab.
 
Guys anyone knows how to gzip (with appropriate headers) with express's static middleware?
I've seen this question, but the answers there seem rather outdated:
29
Q: Express gzip static content

gAMBOOKaExpress and connect appeared to have removed their gzip functions because they were too inefficient. Are there any reliable solutions to gzip with express-js currently?

 
I am not sure if I want to run tests at this point :/
 
nvm, found it
 
8:52 PM
@BenjaminGruenbaum Happy Birthday :-) (Did I miss any other place where I have seen you today? :D)
14
 
@thefourtheye Technically, not his birthday until about 7 more minutes
 
@MadaraUchiha Actually, I am from the future... :D
 
@thefourtheye Bullshit. I'm from the future, and I don't know you. So there.
 
@AwalGarg Awesome!
 
@Zirak I dunno how to test it :(
 
8:59 PM
Run it
 
I am doing it on a server so no gui
 
Compile on server, only download binaries
 
For some reason, compile fails from my branch.
I dunno what is wrong :(
Investigating...
 
That always sucks...good luck.
 
If I have an element that contains text and br's, is there an easy way to get the contents as text and br's as \n's? Without getting all html and parsing it preferable?
 
9:08 PM
el.childNodes and map? If you want arbitrary depth, NodeIterator?
Bananas
 
Hm. Bananas.
 
Why can I no longer look at the word bananas without seeing ban anas?
 
@NickDugger there can only be one of me in the world and I choose me
guys i have an array of functions
 
9:24 PM
cheekapoo i choose you
 
@nick What's the problem?
 
one sec im trying to figure out how to phrase it without sounding like a nub
 
Sounding like a nub is fine too.
 
ok
 
We love nubs. Not noobs though. They aren't as good.
 
9:26 PM
so at some point, a function is being instantiated
 
Noob is evolving. Dum dum dum dum dum dum dum dum. Noob has evolved to nub!
 
like var asdf = new JKL();
how would i match up this object
with the corresponding function in the array?
does that make sense
 
asdf.constructor?
 
i tried .name but it doesnt seem to work
lemme check
 
I'm not sure what you're trying to do
 
9:29 PM
its really simple but putting it in words is hard
 
then put it in code
 
Yeah make a quick demo
 
short example, expected result, actual result
goes a looooooooooong way
 
yeah
var scenes = [Scene1, Scene2];
 
@Zirak it compiled. now downloading binary :D :D
 
9:31 PM
var currentScene = new Scene1();
then
 
this better work at the first time or I will have to try again...
 
i want to find the index of currentScene within scenes
er
 
scenes.indexOf(currentScene.constructor)
Try that
 
wait I have absolutely no idea wtf am I doing
 
.constructor gives me something different than the actual scene function
 
9:33 PM
nononononon discard previous update
 
gimme a min
 
how do you see console.logs on jsfiddle ?
 
Open the console
 
dont you have to write messages to the document body ?
 
9:37 PM
No
You do not have to do that
 
atleast previously, jsFiddle wouldnt allow you to write console.logs.
looks like it works now
 
Nope always been like that
 
scratch that .
Blocked a frame with origin "http://fiddle.jshell.net" from accessing a frame with origin "http://jsfiddle.net". Protocols, domains, and ports must match.
this is what I get when i run it from safari
trying from chrome
 
yeah, you have to run it in a browser
:P
 
i see what you did there.
works from chrome
 
9:43 PM
haha
safari is the new IE
 
Meh
IE will always be IE, it's just that some people won't be using it anymore once Edge comes out.
 
@Meredith that's exactly what i am trying to do
but constructor returns the prototype function
 
Yeah
 
we're just going to modify our library a little bit
ran into this issue before and i did something hacky so might as well fix it the right way anyways
 
You might be better off not using an array
What are you trying to do?
 
9:50 PM
trying to jump back a scene
but i need to know which scene i'm in already in order to do that
 
user1596138
I at new house
 
Yeah I don't think this approach will work
You'll probably be able to hack something together, but there's a more elegant solution out there
 
yeah no worries, and we're working on a more elegant solution right now
 
That's a better way to do it for now
 
10:10 PM
Could someone take a look at my post here and help me? stackoverflow.com/questions/30114026/read-more-script-problems
 
I can't wait to move. 31.5C in my appt right now
 
I'm pretty sure it was warmer than that in here last night
 
10:29 PM
@rlemon that was a good read
 
10:40 PM
Hey guys, I'm making a simple modal dialog plug-in in pure JS ( that so far is only 2KB ), but I'm coming across an issue when opening and closing it. Basically I want to change class name to remove kaboom-disnone class, but I'm getting an error saying it doesn't have that attr.
 
@Dendromaniac 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.
 
@Dendromaniac what is the code?
 
@FlorianMargaine Do you mean the code that opens the dialog?
 
@Dendromaniac the code throwing an error
 
this.show = function() {
var kbols = document.getElementsByClassName( 'kaboom-overlay' );
kbols[0].className = kbols.className.replace('kaboom-disnone', '');
}

This returns: ' TypeError: kbols.className is undefined ' in FireBug
 
10:48 PM
kbols is an array, it doesn't have a property className
 
I worked it out, I forgot to add kbols [0] on the replace part of the 3 line
 
Man, the tiniest of mistakes that break everythin annoy me so much
 
@Dendromaniac Welcome to programming!
 
10:56 PM
Have you tried C? Where even mistakes you don't make break everything!
@rlemon Pfft, he needed an AI to tell him that?
 
verify
 
@Madara No, but I have tried C++ and found that I need a bit more than 3 months of experience at all. Biggest problem is, that being 14 I have a ton of school to deal with simultaneously...
 
@rlemon I'm pretty sure one can reach a beautiful mathematical proof that ends with either the number 34 or 69.
@Dendromaniac No pressure, school is important.
 
@dendromaniac you might also check out the Element.classList API; it makes class manipulation a little bit cleaner
 
@user128268 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.
 
11:00 PM
@user128268 Sure willl take the suggestion and have a look, thanks.
One quick, slightly off-topic thing... Does anyone have any suggestions on what sort of website to make (mostly for practice, but with a useful end-result), I know HTML/CSS, JS/jQuery, PHP & Python. And I have an Apache server running on my own server, so can anyone think of any ideas (except soddin blogs)?
 
what are your interests?
 
@user128268 Pleasing the visitors to my site...
I am prepared to take on almost anything that is in the realms of possibility
 
it's always easier to make an app on a topic you're interested in. when i was in school studying film, i made a kind of imdb clone
 
The only things I actually do out of Programming (or learning to), is Juggling, Solving Rubix-Cubes, and cycling. In school, I don't really have anything interesting other than CS
 
11:10 PM
I mean, :( but also :)
 
11:21 PM
@Dendromaniac I can't take you seriously if you spell it Rubix
 
@KendallFrey Lol, It's just what I have got used to, probably because I never use Rubik's brand cubes, and because ruwix.com gave me the influential 'x' suffix
 
What brand do you use?
I've always done Rubik's, but my 5x5x5 is pretty loose, and I think V-cube is better
 
implement a rubik's cube in WebGL
 
@rlemon rofl
 
I implemented a Rubik's cube in MS Access
...bitches
no, seriously, I did
 
11:31 PM
@KendallFrey Depends what one you mean... I have a Cyclone Boys 2x2, Dayan Zahnchi 3x3, Rubik's 3x3, C4U 3x3, Shengshou 3x3 Mirro Cube, Shengshou 5x5, and some other random ones
 
nice
 
I did have a pyramix till it exploded
 
oh, I have one of those too
 
One of the pieces snapped when I was solving :(
 
actually broke?
I know they come out a lot
 
11:33 PM
Yeah, I was way, way too violent trying to get a fast time
 
I did get one thing from it though, not to be violent with cubes any more
 
@Procos do want
 
I really should re-learn even-numbered cubes
 
11:34 PM
Only even-numbered I know is 2x2
 
that one's pretty easy
it's a subset of the normal one
you need a special algorithm for 4, 6, etc.
 
Yeah, it's easy to get consistent 5-10 sec solves, if not better
 
11:53 PM
never saw the appeal in those
> wow look I can memorize some shit
 
@Mosho non-geeks don't realize that though
so it's impressive
 
intredasting
 
It's not all about memorization, it's about fooling non-solvers into thinking that you are Jesus's brother
 
exactly
Them: Here, unscramble this.
Me: OK
Me: ...
Them: Holy shit
Me: :)
Them: Do you ever go outside?
 

« first day (1665 days earlier)      last day (3301 days later) »