These are chat archives for PrismarineJS/prismarine-server

26th
Apr 2015
Robin Lambertz
@roblabla
Apr 26 2015 11:07
@demipixel We'll be Prismarine Server
AKA Prismarine
Robin Lambertz
@roblabla
Apr 26 2015 13:21
dem let
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:22
what do you think of the autorequire thing?
Robin Lambertz
@roblabla
Apr 26 2015 13:25
I think you should use for .. of
other than that, it looks good ;)
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:27
why for of?
Robin Lambertz
@roblabla
Apr 26 2015 13:28
Because for .. in is the most broken construct in JS ever
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:28
how would I get the key names then?
also shoot me a message when you want to talk api again
Robin Lambertz
@roblabla
Apr 26 2015 13:30
well, right now I'm pulling my hair over node-minecraft-protocol tests
I have no idea why it's failing the tests
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:30
lol that’s fun
Robin Lambertz
@roblabla
Apr 26 2015 13:31
I think I'll revert and work in a PR
>.>
the VM is running out of mem in the write test. So I turn on debug output. Guess what ? CircleCI truncates the damn output
I'm going crazy
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:34
lol
Robin Lambertz
@roblabla
Apr 26 2015 13:34
the same thing goes up to 680 mb on my machine
quite far from the 4gb circleci complains about
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:35
:3
Robin Lambertz
@roblabla
Apr 26 2015 13:35
:|
;_; and now the read test dies
Will Franzen
@wtfaremyinitials
Apr 26 2015 13:37
you’re going to go insane
Robin Lambertz
@roblabla
Apr 26 2015 13:38
I hate this ;_;
Romain Beaumont
@rom1504
Apr 26 2015 13:58
oh the setImmediate made the test fail oO ?
Robin Lambertz
@roblabla
Apr 26 2015 13:58
both process.nextTick and setImmediate
I have no idea why
I reverted for the time being
Romain Beaumont
@rom1504
Apr 26 2015 13:59
680mb sounds wrong anyway though isn't it ?
Robin Lambertz
@roblabla
Apr 26 2015 14:00
nope
we're talking about sending a huge amount of data to node-mc-proto in a while loop
so it doesn't actually have the time to process it
it just adds it to the queue, and when it finally goes outside of the loop, it starts the processing
Romain Beaumont
@rom1504
Apr 26 2015 14:06
hmm, isn't is possible the difference of ram usage has something to do with the node version ?
Robin Lambertz
@roblabla
Apr 26 2015 14:40
dunno
demipixel
@demipixel
Apr 26 2015 16:05
For..in is fine except it fails to work in node
Idk
Romain Beaumont
@rom1504
Apr 26 2015 16:20
for...in needs ownProperty checks
anyway, don't use that, just use .map and .reduce :)
Robin Lambertz
@roblabla
Apr 26 2015 18:31
Agreed, .map would be better in this case
Will Franzen
@wtfaremyinitials
Apr 26 2015 18:53
you can't do map on objects though...
Will Franzen
@wtfaremyinitials
Apr 26 2015 19:15
@roblabla when prototyping we said we’d have a ‘packet_received’ event
how is that going to be handled with multiple protocol plugins?
Robin Lambertz
@roblabla
Apr 26 2015 20:42
well
They'd be handled in each individual plugin I guess
I still didn't wrap my head around that
Romain Beaumont
@rom1504
Apr 26 2015 22:44
Object.keys(o).reduce(function(newO,key){newO[key]=o[key]+5;return newO;},{}); works (but well you can also do a for I guess :P)
I tend to put functional stuff everywhere in new code ^^
Robin Lambertz
@roblabla
Apr 26 2015 23:01
So do I
I use RamdaJS for functional stuff though
much more efficient