« first day (2028 days earlier)      last day (2923 days later) » 

10:01 PM
rlemon, holy hell dude u got a beard, sorry i havent been around, new job taken over lol XD
 
How can I check for a click on an <a> tag by using getElementsByClassName()? As in checking all the elements, and trigger if they're clicked
I've been doing a for look and doing a click(function({}) but it only registers the 1st element
 
var links = document.querySelectorAll('.foo');
for( var i = 0; i < links.length; i++ ) {
  links[i].addEventListener('click', clickHandler);
}
function clickHandler(event) {
  console.log(event.target + ' was clicked');
}
there are many better ways to do this
but I think this might help you right now
 
I've been doing that except without querySelectorAll and using the builtin click function. Is there any reason why that hasn't worked?
 
.click is not what you think it is
you mean to use .onclick or .addEventListener('click'
.onclick over writes the handler(s)
 
I've tested .onclick and click(function({})
 
10:10 PM
.addEventListener lets you add and remove multiple
 
Ahh
 
but you are dealing with different elements.
so unless you want more than one function to fire on click, .onclick would also work
(unless you messed up your loop)
 
Everything is the same haha
Let me try anyways
 
@KevinB I loaded in the images, however when i kicked it out its displaying [objectHTMLImageElement] ?
 
because you're pushing an image object to a string
obj.toString is called.
don't manipulate html as strings
 
10:13 PM
oh ok
so i cant find it into a div then?
i would just call it as sunimage?
I will have to have a nosy on here as i want it to go into a specific div.
 
var link = document.createElement('a');
link.href = poop;
var image = new Image();
image.src = notpoop;
link.appendChild(image);
container.appendChild(link);
 
lol, not poop XD
so sorry being thick here, the container? do i replace link with my container class?
 
@KirstyHarris It doesn't work with poop.
 
@Luggage works for me
 
10:17 PM
It was edited by someone not me. I suspect it was someone with a blue name.
 
@Meredith oh are you going!?
Everything on the web is about to get a lot worse: hacks.mozilla.org/2016/05/…
 
crap.
 
@phenomnomnominal sigh
 
@phenomnomnominal but you have to use workers first to be able to get there to see it
 
Why do people insist to write Java on the client-side?
Get over it, we tried it, it died.
 
10:22 PM
now all those people that were unable to ever get a handle on event-based programming are going to feel justified that "javascript finally gets threads"
 
Why did my computer crash? Oh Firefox just trying to use 10000 threads
 
and mis-use it for everything
 
is there any advantages of using image.src over hard coding the image and injecting via innerHTML?
 
you can adopt a sensible middle-road to those extremes
just set the .src programatically to the url
 
@KirstyHarris Yeah, it's a hell lot simpler.
 
10:25 PM
ohh, i mis-read your question. yes, the first one.
 
@Luggage JavaScript will still be event based
"it gets threads" won't absolve you from that
 
ah ok, i will go away and google this then :) ive got it working via the alt method, but obviously i want to make it as clean as possible
 
But they'll try.
Oh, they'll try.
All those disgruntled Java devs who hate writing JavaScript are finally getting threads.
 
Right.. it's that trying that I think is wrong.
event-based is, in my opinion, superior, for a UI and so many people think it's a problem to overcome.
but.. easy access to a thread when it DOES makes sense is good.
like c#'s async / Tasks
 
@Luggage JS has async / await (or rather, will have)
You don't need threads for that.
 
10:27 PM
@MadaraUchiha maybe I misunderstood the article... but we only got a new type and a atomic lock/unlock
 
yea, but that's just for abstracting away promises
 
@FilipDupanović For now
@Luggage And you're just abstracting away Tasks
 
the damage would have been done as soon as workers and message channels came in
 
Which are Promises which can only be listened to once
 
but the difference is that tasks can be in another thread.
 
10:28 PM
@phenomnomnominal I think that's pretty cool. One of the disadvantages (and advantages!) with web workers was that they do structured cloning, so you couldn't for instance do crazy stuff with ArrayBuffers and share the load between workers
 
or.. i think.
 
@Luggage So can Promises
Depends on the implementation
 
ok, then, fair enough. I withdraw my statement.
 
The atomics wait/lock are annoying, but that's because it's seriously low level. You don't really have threads, you have regular web workers; the only thing share-able is array buffers.
 
@Zirak I think it's cool, you should just have to have a licence to use them or something
 
10:29 PM
I probably won't use it personally, but people tell me they need it. People like @esailija.
 
I've changed sides. I'm all for it, now.
 
@Zirak I trust people like esailija
 
@esailija is allowed to use them
 
It's the rest I'm worried about.
 
What're you worried about?
It's just web workers
Now with shared memory and all the annoying shit that comes along with it.
 
10:30 PM
@Zirak With increasingly more shared memory
 
WebWorkers are a really simple mental model
even fuckheads like me can manage it
do some shit, post a message
 
I'll always agree to that, actors are cool
 
Does this give emscripten anything it didn't have before?
 
The downside to message passing however is the performance and memory penalty you get from copying the messages
 
@phenomnomnominal until you get to the... post a message to a worker... which posts messages to workers...
 
10:32 PM
To the vast majority of the universe that makes absolutely no difference
To the people who write DOOM vs. Quake in a Mandelbrot graph it does
@Luggage I have no clue
 
@rlemon that code kicked out the address, however not the image, yet its loaded it in
 
Maybe they'll be able to implement pthreads on top of it?
 
@FilipDupanović yep, people already do dumb shit
Now even more chances to shoot themselves in the foot
 
new goal, compile emscripten into JS
 
@Luggage cat emscripten.file > js.file
That's so transpiled it can't use the bathroom in the south.
6
 
10:37 PM
too soon.
new goal, compile emscripten for osx
not sure I ever got that working..
meh, i'll do it later. back to making my JSX -> XS-FO templating tool
 
anyone good at python? :P
 
just ask, there are Pythonistas regularly slithering around
 
10:53 PM
though.. a lot more in the python room.
 
already there :P
 
11:17 PM
@phenomnomnominal If I can. I went last year
 
@Meredith nice, I've always wanted to go
might start making it an annual pilgrimage
 
My advice: wear comfortable shoes
 
W3schools is amazing have you guys heard of it?
 
@Lukaash Welcome to the JavaScript chat! Please review the room 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.
 
obvious troll is obvious
 
11:23 PM
Not at all. :P
Anyway, it was joke.
I came to ask what is the actual reasons to hate W3schools?
 
You'll figure it out on your own as you get better
Just give it time
 
@Meredith yeah not my first festival :)
 
Which one did you go to?
 
man
how hard can it be to bring some freaking python gui script to work
 
11:26 PM
oh not actual fest, just like general big festivals
 
Oh
 
I an going to need to generate xml files with sizes of 10-50 mb in node.js. I'll be generating arbitrary inner nodes and working my way out, so i can't just stream it to a file beginning to end. What options do I have.. just looking for search keywords here.
 
Fest isn't like other festivals
You basically just stand in a bar for 12 hours
 
I've done that a lot of times too :)
I've followed bands, I'm fine with feeling totally fucked haha
but holy shit the lineup
and apparently it's gonna get better
 
Last year's lineup was great
 
11:29 PM
which festival?
 
Fest
In Gainesville
 
But nothing beats Propagandhi
add AJJ, AWS, Flatties, Menzingers, Jeff, Chris, and it's gonna be ridic.
 
If I go, it'll be for the Dikembe show
 
like other fests, I don't recognize any of the performers xD
 
It's a punk and emo festival
 
11:33 PM
It's basically just a chance for me to see everyone who will never ever come to NZ
 
Oh shit
I didn't realize you were travelling that far
 
haha yeah
 
when does summer start in NZ?
 
The same as the rest of the Southern Hemisphere?
 
You're gonna love gainesville
 
11:35 PM
There's a SOUTHERN hemisphere?
 
and what month is that exactly?
 
or approximately.
 
november?
@Meredith I know :D
I took bass lessons from Jason from HWM for a while, he made it sound pretty fucking dope
 
Nice
Btw if you wanna see some gators
Check out paynes prairie
 
Guess I have to haha
 
11:42 PM
I'm still hoping they'll announce the hotelier
I left during their set last year cuz my feet hurt
 
I'm gonna do the 4 days
 
That's a lot of fest
 
Then I think I'm gonna drive up the coast
 
Gainesville isn't on the coast
 
I know, I mean florida to NY
 
11:49 PM
That's a long ass drive
 
Yeah, that's the point haha
 
Like it'll take you 2 days
 
That's not that long a drive haha
 
And you know that it's going to be way colder in new york than florida right?
 
11:53 PM
yes, I'm aware of how weather works :)
I have like 10 weeks of leave, so I'll use a couple weeks and do the East Coast.
did the west coast last year
 
Like I'm sorry if I'm coming off as rude cuz that's not my intent
 
no not at all I appreciate the advice!
 
@phenomnomnominal AND DIDN'T TELL ME
 
@SomeKittens dude I had literally no days. And I was with my ex.
I am very sorry though
 
@phenomnomnominal well, if he's cool, he could have come too.
 
11:54 PM
hahaha do you still not know if I'm gay or straight?
 
s/know/care/
 
You gay
 
I'm straight
 
Oh
 
#straightwhiteyoungablebodiedmale #fuckitall
 
11:58 PM
time to be productive: browse for editor extensions!
 

« first day (2028 days earlier)      last day (2923 days later) »