« first day (987 days earlier)      last day (3968 days later) » 

12:00 AM
Yeah but saying they're obsolete is just silly - it's not like they could realistically be removed, it would break half the internet
Do current browsers implement them in terms of QS and QSA?
 
Yeah, QSA and QS have been supported since IE8
 
It's just...looking at it backwards. Selectors are supposed to be an abstraction of these methods, not the other way around.
 
Are they?
Passing strings to methods instead of doing DOM manipulation via tree methods on your own is an abstraction to begin with.
 
querySelector('#id') is supposed to be an abstraction of getElementById('id'), not the other way around
 
getElementById('id') is itself an abstraction of: visitEveryNodeAndReturnFirstMatching(function(elem){ return elem.id==='id';})
 
12:06 AM
Absolutely
 
I think QSA abstracts that too
 
@Shmiddty I didnt downvote you
thats dumb that someone did
 
I'd love to see LINQ'ish methods on the DOM, like map, reduce, filter, find and such
 
And if it wouldn't have been possible to do what you just described, it would've been annoying as well
 
I countered it
 
12:08 AM
And you would've gone to a mailing list, and some guy would've said "hey bro just use getElementById, going over trees is obsolete"
 
ElementSet.find(selector), ElementSet.filter(selector), ElementSet.map(selector) , ElementSet.reduce(selector) (selector is a function and not a CSS selector obviously)
 
blegh oh, not a selector
 
those are in jQuery
 
So, getElementById would just be: find(x=>x.id==='id');
 
although semantics of .map(selector) are not obvious to me
 
12:09 AM
@Esailija You map a node-list (or an element set) just like array.map to something
 
I assumed selector is a string
 
Of course not, that would be silly
For example, serialize all the text input fields in a form would be:
 
lol it even says that in parentheses at the end
seriously why would you name the param like that and then say "btw it's not a selector string"
troll :)
 
"?"+form.filter(function(elem){
    return elem.tagName==="INPUT" && ["text",null].contains(elem.type);
}).map(function(elem){
    return elem.name+"="+elem.value;
}).join("&");
$(form).find("input[type=text],input[type='']").serialize() // something like that with jQuery
 
serialize kinda says what it does better
 
12:13 AM
Will forking blink and trying to make a patch be overkill?
 
@BenjaminGruenbaum I meant does Chrome do getElementById like (id) -> document.querySelector "##{id}? I doubt it
 
Yeah, but this is because they have it in the library.
@Zirak Yes.
 
But he's wrong and I'm right
 
@phenomnomnominal No of course not, that would be silly
 
So why should we!?
 
12:14 AM
And that's what he is suggesting... silly
 
@Zirak Someone is wrong on the internet!
 
!!/norris
 
I'll be up for all of next week to tell him he's wrong!
 
@SomeKittens Chuck Norris originally wrote the first dictionary. The definition for each word is as follows - A swift roundhouse kick to the face.
 
Then again, I can always QSA for * and use filter/map/reduce/etc, that's what I do anyway in some cases :P
 
12:16 AM
% git clone chromium.googlesource.com/chromium/blink
Cloning into 'blink'...
remote: Sending approximately 4.10 GiB ...
remote: Counting objects: 118316, done
remote: Finding sources: 100% (2010/2010)
Receiving objects:   4% (96298/2300901), 52.24 MiB | 547.00 KiB/s
what. the. fuck.
4.10 GiB!?
 
lol yea
 
!!> (4.10*1024*1024 / 547) / 60 / 60
 
@Zirak 2.1832021125330083
 
How's it possible it's already at 36%?
 
12:20 AM
"approximately"
 
That's a pretty big margin
 
isn't 1024*1024 a MB not a GB?
 
1kb * 1024 = 1mb
1mb * 1024 = 1gb
//will just replying:
But that's a bit looking at it backwards. Selectors are supposed to be an
abstraction over these methods, not the other way around. The point here is that
document fragments are documents - so they should have a consistent API.
//do anything?
Or is arguing the beauty of a tree a lost cause here?
 
1* 1024 = 1kb
 
And the transfer rate is at kb/s, so I converted GB to KB
 
12:23 AM
Gotcha
sorry
 
hmm think i might do my first bounty on SO
 
Cool, what are you answering?
 
no i mean adding one to my question
 
Which question?
 
Can someone make me owner of sandbox so I can play with ie>?
 
12:27 AM
 
@Zirak What does this bot check ownership against? The JS room or the current room its in?
 
@SomeKittens It should grab owner/rep data from this chat
(since that's the only data-source it has without polling for anything else)
 
@Dave two.
 
ie> true
 
@Dave fetching all the html initially is stupid
 
12:28 AM
so is lots of http requests though
 
@SomeKittens true
 
Oh, duh, that's because dr. eval isn't in sandbox.
 
@Dave So what? Sending all the HTML initially is stupid, HTTP has built in caching
 
@SomeKittens want me there?
 
sure
 
12:29 AM
well when i have cache on it still sends request for all the html files so that didn't really change anything @BenjaminGruenbaum
 
@Zirak Do I run the script again in the sandbox?
 
@dr.eval You should be able to just open the Sandbox room and then close that tab, the socket recognize you joined the room.
Adding this isn't about "backwards compatibility" or anything of the sort. It's
adding methods that people already use, because as said, not everyone uses
selectors (and not just because of browser-compat). They're an alternative API.
Adding this piece. Does it look ok?
...I'll remove that last sentence
 
@Dave If a user requests multiple HTML files at once, they'll still be sent over the same connection.
 
@BenSaks 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.
 
does it not close the connection after its recieved the first file - then re-open a connection for the next file?
 
12:33 AM
@rlemon stackoverflow.com/questions/17372453/… didn't you answer that sometime?
@Dave No, that's what KeepAlive is for, it doesn't. HTTP1.1 by default and HTTP1.0 by header.
HTTP persistent connection, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using a single TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair. Operation HTTP 1.0 Under HTTP 1.0, there is no official specification for how keepalive operates. It was, in essence, added to an existing protocol. If the client supports keep-alive, it adds an additional header to the request: Connection: Keep-Alive Then, when the server receives this request and generates a response, it al...
 
Well im confused because with my cache on in Chrome, i refresh i still see xhr requests when the content has not changed =/
 
man everywhere you go people are using jsperf wrong and drawing just the wrong conclusions and thinking like interpreters ... can even Jesus save them anymore
 
People don't know how to benchmark? Shocker.
 
@Esailija Or maybe you are and they're in on a secret you don't know!
 
yes it appears as a huge conspiracy
 
12:37 AM
Resig!! (In a Khan! voice)
 
one of these posts made into hacks.mozilla.org
then mraleph noticed it and wrote blog post
 
> Selectors are a better way to query documents
But...but...they're not
 
I think it's you and benjamin against the world
 
Matt McDonald is on our side as well
 
do you still talk to him?
 
12:40 AM
He disappeared some time ago, haven't seen him in months. Before that we sometimes crossed paths on irc
But we were both appalled when selectors were introduced.
 
@Esailija I think that the DOM api needs a complete overhaul, perhaps by exposing another object (like dom so you get dom, and document for legacy support - with vendors releasing libraries that implement dom in document methods for backwards compatibility) and fix that goddamn api.
Which would work in a much saner way with JavaScript.
 
@BenjaminGruenbaum ok so if its persistant why does it request every time i visit the site =/
 
@Dave Because your serverside-foo is week.
You need to cache
 
im sure i edited my htaccess for cache
 
I'll answer him tomorrow, I need to sleep
 
12:46 AM
Yeah me too
 
Maybe someone else will say what I wanted to say, only better.
 
@BenjaminGruenbaum it says ExpiresDefault "access plus 1 month"
so it should be cached for a month at least
 
let me test different browser
 
anyone have any creative metaphors for changing content in the same space? (like tabs, carousel...)
 
12:50 AM
fade, dissolve, blinds....
 
seems it works now =/
guess i had to re-save my htaccess for it to recognise it. v. odd
 
Coding in Java this semester wasted my mind so much that I forgot how to JavaScript
ie> 'why is this even implemented?'
 
@FabrícioMatté "why is this even implemented?"
 
@FabrícioMatté ?
IE11
 
12:59 AM
So developers can try IE11 JS
 
@jtseng 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.
 
though there aren't many IE fans out there, I guess it may be useful for checking compatibility and bugs then, thanks
ie> var a, b; [a, b] = [1, 2]; a;
 
@FabrícioMatté ReferenceError: Invalid left-hand side in assignment
 
Yeah, compatibility, that was the point
 
1:00 AM
@phenomnomnominal thank god.
 
Yeah, so good
I'm curious, will they have to download it completely, or will it just show up as an autoupdate?
 
Hopefully, auto update. IE11 also defaults (at least atm) to auto-upgrade
(Finally)
 
@SimonSarris can I get a signed copy?
 
 
2 hours later…
3:06 AM
@phenomnomnominal your take on python / django
 
i like python
 
is there a google io python vid or anything of the sort
 
@Gacnt doubtful
 
how does @CapricaSix search google? does anyone know
 
3:23 AM
!!/tell connor google google search api
 
additionally, check the source code
 
@SomeKittens thanks
 
any one awake in here?
 
yh
 
3:48 AM
=
 
|=> OMG
 
@rlemon I did not just call you?
 
4:04 AM
@Amaan \o
 
@Helmyano 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.
 
Anyone got time to bounce some ideas around with me?
just about some architecture issues
 
@Darkyen What's up?
 
@Amaan nothing much just saying hello duh
In ETA 20 minutes i will be having a session on Generics in java ... So running disaster management protokols in brain
 
4:24 AM
@phenomnomnominal if you're still around that sounds interesting
I'm no expert but at the least I could be an idiot test
 
Aight, so I'm building my site, and most of the elements of the site are HTML elements layered over Three.js elements. The 3D is set up so that 0,0 (on XY) is the top left corner - basically it lines up with the CSS position systems
 
But I want to have a nice way for declaring the 'markup' of the 3D shapes
they're all blocks, so there isn't too much complicated geometry to deal with, and at the moment I've been hardcoding it
 
so... you almost want to translate HTML elements to Three.js elements? And you need a framework to do that?
 
No not at all
 
4:29 AM
oh okay
I've never used Three.js before
 
There's three.js elements overlayed with html elements which contain the page content
That bit is all fine and all working
 
| MDN Calc
 
The problem is making a extensible mechanism for importing the page layout data
currently it's json, which is fine
but that's not exactly ideal for using event handlers, which is my current main problem
 
but you don't have a good way to create the three.js stuff from json?
 
No I do
the issue is event handlers
 
4:32 AM
...on the three.js stuff?
 
I have the system set up so they all work in 3D, and that's fine
 
they don't have event handling built in?
 
It's how to express that in a nice way
My current options are pass in an event handler function name with the JSON, and declare the function elsewhere, which is a bit shit
 
4:34 AM
hm
 
or not actually use JSON and create a basic object and then pull the data and functions out of it
And build the site from that
 
so there's enough different types of event handlers that you need custom ones? I guess I'm not getting something (my bad). Why can't you just use the same handler names regardless?
 
Not the names of the events, the names of the functions
 
ahh. Couldn't you construct a messaging system where you register your handlers for different events?
I'm using something like that on a project right now
the two relevant bits are: comm.send("messageName", data); and comm.register(module, { messageType: "messageName", handler: "myHandlerName"});
just a tad ugly, but super flexible and nice
 
I already have a system for registering handlers
Basically I need to decide between this:
 
4:39 AM
okay cool
 
Bah, it's too annoying to write out
basically
 
link?
 
Not live anywhere
ummm
 
ah
no problem
 
anybody know a good demo for google oauth 2.0 using javascript?
 
4:43 AM
a defined function:
    function myHandler () { console.log('ooh, my function works'); }

with an object, something like this:

    "TITLE": {
        "blocks": [
            { "x": 6, "y": 8, "content": "C" },
            { "x": 8, "y": 8, "content": "V" }
        ],
        "click": "myHandler",
        "height": 2,
        "width": 2
    },
orrrr...
TITLE: {
    blocks: [
         { x: 6, y: 8, content: "C" },
         { x: 8, y: 8, content: "V" }
    ],
    click: function () { console.log('bah'); }
    height: 2,
    width: 2
},
 
need a , after click: function () { console.log('bah'); } :)
 
so, couldn't you do the latter - actual JS object, with the handler defined, but then have a loader that takes the above JSON and loads it into the bottom object?
 
It was an example
 
forgive me if i'm stating the obvious
 
@ThomasShields, yeah those are the options
either one of them has to go through a function that actually makes the objects
 
4:47 AM
@phenomnomnominal so what's not to like?
 
I dunno, neither strikes me as particularly elegant
having a json file strikes me as nice because it's using a data format for data
but then the functions can't be declared in it
 
right, so keep the json. but declare the function in an object into which the json is loaded
 
Yeah but that seems gross too haha
well not gross
just slightly less elegant
 
sounds to me like you're being lazy. :P
I mean that's kind of the point of JSON.
 
nah, i have it implemented like that at the moment haha
 
4:50 AM
you know, JavaScript Object Notation?
 
Yeah I just wish it was JSO&FN
 
well, in theory I like it. Maybe if I were to actually see the code or try it myself I'd be more adverse to it. Other than that I'm out of ideas.
 
Brain damage has began
I just heard pacakges are used to exchange classes i think there smore
 
@Darkyen dude java bro.
it's totally hip these days
 
I'm gunna murder you
in your face
!!s/pacakges/packages/
 
4:54 AM
@Gacnt I just heard packages are used to exchange classes i think there smore (source)
 
5:19 AM
@Gacnt so is there anything else they are used for ?
 
code organisation?
is there a way to tell if a user has changed tab?
got it
 
wow.. so I have one of the earliest known sx-64's it seems
^ check out that serial number
ga1 000123
heh now I feel terrible for modding it
 
@Loktar what did you do to it?
 
Installed something called Jiffydos
makes loading like 200% faster
had to replace 2 chips
and drilled a small hole for the jiffydos switch
 
5:35 AM
meh
improved it
 
but it looks prof.
yeah
I was just surprised to learn it was such a low numbered one..
pretty cool
the guy who sold this to me could have sold it for more $$
I got 2 of them plus a bunch of other stuff for $250, so a fantastic deal
 
sweet!
and all still working and stuff?
 
yeah
 
well the 2nd one needed a new cpu
and the diskdrive doesnt work, but I fixed the cpu issue
and it works fine when I hook up one of my external commodore drives
^ the haul
 
5:38 AM
that is awesome
how easy is it to find a cpu for one?
 
I found replacement boards online luckily
someone was selling a whole set
and CRAZY thing is they lived in my town lol, dude hand delivered it to my house
 
haha nice
 
but yeah they dont seem really common
 
> "For heavens sake do not create more then one method in main class" --- My teacher just said
 
it was more specifically the PLA, not the actual CPU
which are less common
 
5:43 AM
@Loktar \o
 
hey @Darkyen
 
how u doing ?
 
oh well I need to get to bed
Good but tired :P
 
:-| fork u
i was about to ask u something :-(
 
I have to be up by 6:30 and its 12:45 here :?
 
5:43 AM
i have like 4 million objects [estimate] i want to plot them on a canvas as heatmap
what should i do ?
 
@Darkyen umm... depends on what they are I guess
ahh heatmap
 
@Darkyen you could have a main_sub class that the main method calls
 
They are position coordinates
@JanDvorak Nay i make packages... a random girl made all functions main i guess she confused them with constructors or shes just too genius!
 
dammit, it's 5.45pm here and i'm still in my pyjamas.
 
@phenomnomnominal -_-
 
5:45 AM
man im super tired so its hard to think.. but basically you just need to map density values and then normalize them from 0-1.
 
@phenomnomnominal that's win
 
then color the values 0.0-1.0 on the canvas
 
lazy saturday
 
@Loktar mhm so as the user input comes start creating avg values...
thats a good idea my best friend :D
 
:)
 
5:46 AM
though ... i can't do it :-( there needs to be a slidable version
 
aww lame why not?
 
which shows the heatmap formation in timeline
 
use a metaball type approach. Every dot is a circle that has a low alpha.
then as they overlay they become darker
normalize those vals 0-1
then color
0.9 - 1 = red, 0.6-0.9 = yellow, then green, then blue
I made heatmaps forever ago I think thats how I did it, but they werent in JS, they were done using c# and asp.net
 
@Loktar ever do 3D modeling?
 
@Gacnt yeah but I suck at it
and its been a while
 
5:49 AM
I'm just playing with Blender following some tutorials, I find it relaxing lol
 
@Gacnt, blender is great
but if you can, get Maya
 
@pheno I'm making you a coffee cup
 
My flatmate got me a penis mug for my birthday
 
It will be done momentarily
 
my best models ever
 
wow
 
and the 2nd one has weird texture issues
but yeah those were YEARS ago
like 2006-ish
 
Lol, I'll see if I can find my previous attempts, I did some back in the day
 
^ game I was making
thats what I used the models for
 
5:51 AM
 
heh thats in ol' Blitz3d
@phenomnomnominal wow nice man
shit I really need to get to bed, lol night all
 
:-(
i dont wanna share my best models :-(
 
Okay too much
thers mine
 
That one was for a sculpture project we did, obviously wouldnt work in real life, but would fold out to...
@Darkyen doesn't want to run Three?
throwing a MIME type error
 
5:56 AM
@phenomnomnominal :-( then foget it :D lol
 
haha, no I wanna see!
Depth of field makes everything look so realistic haha
OOh
 
@loktar what were you writing the game in? Did it ever finish?
 
someone do texture generation based on audio
 
@Gacnt blitz3d, and no :(
My screensavers are made using that too
alright goodnight.. for real :P
 
6:02 AM
I never finished it, I was making a ford mustang as you can tell
way back in
2010 :P
 
nice!
I want to do some really nice models of my guitars
give me an excuse to do some nice procedural woods and stuff!
 
user1125394
6:22 AM
hello artists
 
@phenomnomnominal Your coffee cup sir.
 
user1125394
cU
 
6:38 AM
@Gacnt nice!
what renderer is that?
 
uhhh
Cycles Render
I'm making you an alarm clock too, hang on tight
 
So just blender? Looks good
 
It's kinda grainy when enlarged because I only used 250 samples, to save time
 
Yep
But still looks very good
 
Holy arguments batman @Zirak
 
user1125394
6:50 AM
 
@Sid 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.
 
Sid
@Six Thanks for help.
 
cool pic.
 
user1125394
shadows are not synced :)
 

« first day (987 days earlier)      last day (3968 days later) »