« first day (2240 days earlier)      last day (2724 days later) » 

10:01 PM
@Mosho in most microbenchmarks I remember seeing, while (i--) {} was always faster than for () {}, is that not the case anymore?
it looks like the kind of micro optimization you seem to care about.
 
it is
or was, when I wrote it
I trust that I did the research
but I'll ask google again
thanks
 
@Mosho I don't see any while in your index.js
 
I guess so
in some cases the order might be important
will review it
 
since you do it line 71
 
the cloned object and the original object are different instances
 
10:08 PM
so?
the clone object has the same properties as the original one, no?
 
you clone an object
now both the result and the original object have the cached cloner
so if you try to clone the original object again
it's cached
 
ah, I see
 
and also naturally if you want to clone the clone
 
it's not a function, it's a function result
ah, no, it's a function
 
the cloner? it's a function
 
10:10 PM
I don't see why it's an issue
 
I guess you could do without it
 
I mean, they're clones, so having the same cloner makes sense
 
yeah it's the same cloner
 
it's not like their properties vary or something
 
but it's on both objects to carry around
because there is no context
 
10:11 PM
@Mosho when you clone the first object, you already get the cloner in the new object, no?
 
yeah
 
line 74 is like var foo = {bar: 1}; foo.bar = 1;
I don't get its point
 
oh you mean that
the cloner is non-enumerable
it doesn't get passed to the clone by the cloning itself
 
ah :)
makes sense
forEachInArrayRight(arr, cb) {
    for (let i = arr.length - 1; i >= 0; i--) {
        const result = cb(arr[i], i, arr);
        if (result === false) {
            return;
        }
    }
},
is there any performance improvement in doing if (cb(...) === false) { return false; }?
 
saves iterations
 
10:15 PM
I mean
instead of const result = cb(...); if (result === false) { return; }, does it have any perf improvement to skip const result?
 
oh
hmm
 
especially because using const itself was quite a performance regression a while ago, not sure that's been fixed.
 
interesting
I assume that's optimized away
anyway
in that case
 
I wouldn't do such assumption
 
since it's not returned
but maybe
I'll change it
 
10:17 PM
or better: profile it :)
 
I might
and regarding const, I transpile anyway
 
you also use things like .reduce
you know that it's terrible for performance, right?
 
hmm yeah
though it's only on arrayPath
path within an object
so it's always rather small
but good catch
it can call that a lot though, so yeah I'll change it right away
 
@Mosho another thing: I see recursion
same idea, recursion is usually slower than iteration
 
oh noes
where
 
hmm
 
(yes, it's going to be a pain to change that.)
 
I can do that
manage context with variables
ez
 
(also, it looks like that function is used everywhere else, so it's quite an important one)
 
yeah it's the bread and butter
 
10:26 PM
oops
just saw the ugly method
moving on...
 
with switch(arguments.length)? :D
my masterpiece
 
yeah, that one
 
can't believe I wrote all this crap
lots of fun and benchmarking
 
evening
@rlemon haha i just finished watching that
 
10:32 PM
the kids are creepy af
 
bruh
 
const isChangeless = obj => obj instanceof Changeless;

const Changeless = function Changeless(wrapped, actions) {

    if (isChangeless(wrapped)) {
        return wrapped;
    }

    // "call constructor"
    if (!isChangeless(this)) {
        return new Changeless(wrapped, actions);
    }
};
uh, that works?
ah, wrapped vs this, sorry
 
i feel like after every h3h3 video i'm like "rip youtube"
 
you might want to change the data structure to avoid having to do an O(n) operation in every loop iteration
 
elaborate?
 
10:37 PM
(shift() is O(n) given that it has to change the index of every value)
 
I see
 
@rlemon uuugh
the cringe
 
not sure it actually matters, given that JS is not a close-to-metal language
but it might.
 
can just iterate over it for all I care
 
that would certainly be better than mutating an array with an O(n) algorithm
 
10:39 PM
Bare Metal JS
 
@Mosho also, even after Benji's commit, I still see some .slice(0) :)
 
yeah, I edited those out in more critical parts
noted
 
you might want to use something like cpp to have "macros"
 
sounds like overkill
I like it
 
not sure what bluebird is using...
 
10:43 PM
there's the "good" old sweetjs
 
huh
 
oh my god
I'd never looked at how engine specific this was...
 
lol
idk what that even does
 
makes v8 jit run enough times on the object to optimize it
apparently, 8 times is enough times.
 
@Mosho Of course sindresorhus made a module for it
 
ah, just making sure v8 creates a hidden class?
bluebird version is a bit more conservative, it looks lke
("running" it 8 times)
 
petka is credited at the bottom too
 
heh
a little anal
 
10:56 PM
esailija's right
 
yeah, was gonna say that.
 
no doubt
 
(using this very nickname :P)
 
so are the cops who try to stop me for speeding every once in a while
 
uh
this sindre guy apparently has almost 900 github repos
 
10:58 PM
You don't know him?
 
yeah he's pretty famous
 
He's one of the people who five.js parodies
 
Nobody knows
 
the guy likes his modules petite
 
10:59 PM
and also wrong?
I mean, a list of "binary extensions"...
 
If js' syntax could be extended at runtime, we'd all be fucked because of that guy
 
it doesn't even have super common ones like gifv
 
@FlorianMargaine PR
 
Do a separate pr for every new extension
That was it's split up into commits which you can easily revert if needed. It's Good Practice
 
and a new test for each one
 
11:04 PM
and a small poem
 
a haku?
anyway, my point is more than it's impossible to build up such a list
 
yeah, it's like, building a list of every browser supported features
oh wait
 
We're waiting
 
carry on
 
11:06 PM
"browser supported features" is a bounded dataset, "list of binary extensions" is an unbounded one
 
what is it bounded by
 
the code of the browser
 
and why are binary extensions unbounded?
 
let me invent one right now: .foobarbaz
 
okay, "known/common" binary extensions
I can also invent a browser that exists only in my mind and has a ton of amazing new features
 
11:09 PM
what defines "known"?
"project using this extension has more than 10 stars on github"?
 
"managed by a group of dark people in a room"
wait, I mean people in a dark room
meh
 
MLK sad face
 
This got ugly fast
 
@Zirak that's even more racist than what he said
 
That's homophobic
 
11:12 PM
that's phallophobic
@Mosho the project also has more than one missing widely used extension
like, gifv
or, it has deb but not rpm
 
not defending it
 
yes you are
 
no I'm not
 
oh yes you are
 
you're right
 
11:15 PM
of course I am
I'm also modest
and tired
 
le tired?
 
@FlorianMargaine Wanna be sad? npmjs.com/package/binary-extensions
> 214,739 downloads in the last day
> 1,295,825 downloads in the last week
> 5,696,848 downloads in the last month
 
chokidar
 
probably
 
evidently
 
11:18 PM
slut
 
@FlorianMargaine thanks for the feedback
I shall add an ascii rendering of your face to the source in return
 
you're welcome
As his attorney, I cannot allow that to happen
Unless you can distribute 1 ml of urine to whoever clones your repo
 
can I do it by fax?
 
quiet whispering among ourselves
casual grunts
Yes, you may
 
user6438653
Hi @SmilyFaceCalledZirak.
 
user6438653
11:33 PM
Hi @DoggyWithGlassesCalledMosho.
 
user6438653
Dam there are a lot of people here, 50!
 
user6438653
80% are bots or floaters right?
 
user6438653
We now have one less person.
 
user6438653
Hey @Zirak, sorry I couldn't make you a mod for my game, there's a few bugs.
 
Hi guys
 
user6438653
11:38 PM
Hi @MichaelJones.
 
user6438653
(I'm @shad0wk)
 
user6438653
Back to 50 people.
 
user6438653
*users.
 
user6438653
What's up @MichaelJones?
 
user6438653
Is anyone here?
 
user6438653
11:46 PM
51 users.
 
Hi, can someone give me an online JSON file to use it in learning?
 
@MohamedAhmed 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.
 
hellio anyone using entity framework?
 
user6438653
M'kay, bye.
 

« first day (2240 days earlier)      last day (2724 days later) »