These are chat archives for PrismarineJS/prismarine-server

12th
Mar 2015
Will Franzen
@wtfaremyinitials
Mar 12 2015 03:48
@roblabla did you ever figure out light data?
Romain Beaumont
@rom1504
Mar 12 2015 09:25
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:01
Huh...
Robin Lambertz
@roblabla
Mar 12 2015 12:02
mfw the guy recreated the protocol parsing.
oh, brother
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:03
Hahahaha
Robin Lambertz
@roblabla
Mar 12 2015 12:04
._.
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:04
And it's a stream too!
Robin Lambertz
@roblabla
Mar 12 2015 12:04
I think...
he reimplemented RSA on his own ?
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:04
wut
Robin Lambertz
@roblabla
Mar 12 2015 12:04
he did...
this guy is nuts.
@wtfaremyinitials soon, node-minecraft-protocol will be a stream… soon...
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:05
TIL rsa isn't that complicated
This guy is crazy
Robin Lambertz
@roblabla
Mar 12 2015 12:06
@wtfaremyinitials no, but using a JS implementation of RSA is downright stupid.
and slow
oh btw, @wtfaremyinitials, for the chunk implementation, we should reuse mineflayer’s code I think
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:08
Why mineflayer?
Robin Lambertz
@roblabla
Mar 12 2015 12:08
chunk handling code is the same on both side ?
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:08
our chunk just needs a bit of love
Romain Beaumont
@rom1504
Mar 12 2015 12:20
putting the chunk code in common would be nice anyway
instead of copy/pasting thing from mineflayer and leaving mineflayer on its own to fix pb, it would be better to extract modules from mineflayer and then to use them in mineflayer and prismarine-server (and possibly in other projects)
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:22
well we already have a separated module
PrismarineJS/prismarine-chunk
It needs a few changes but it should definitely work for mineflayer too
Romain Beaumont
@rom1504
Mar 12 2015 12:23
is it very different from what mineflayer does ? (if not maybe mineflayer could use it ?)
yeah
that would be nice I think
I'm just saying : let's not duplicate efforts and code
Robin Lambertz
@roblabla
Mar 12 2015 12:24
mineflayer’s code is closer to what is sent on the wire @wtfaremyinitials
and so probably a lot more efficient
unless prismarine-chunk changed already ?
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:25
I’m already working on changing prismarine-chunk over :stuck_out_tongue:
Robin Lambertz
@roblabla
Mar 12 2015 12:54
ok
I love C.
int x = funcThatReturnsBool();
int y = otherFuncThatReturnsBool();
if (x == y)
print(“Sometimes x and y are both true, yet this is not called”);
:<
I wish I could use bool types.
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:57
you can’t?
Robin Lambertz
@roblabla
Mar 12 2015 12:57
We’re supposed to write ANSI-C.
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:57
:\
Robin Lambertz
@roblabla
Mar 12 2015 12:57
(Because, y’know, schools love old technology >.>)
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:57
heh i just got an idea
Robin Lambertz
@roblabla
Mar 12 2015 12:57
I’m testing some ASM code anyway, so I don’t even know if I can return bool from that.
Only thing that works is doing !! on both functions
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:58
im taking a java class in school, and next project, im gonna just import Rhino and do the whole thing in javascript
Robin Lambertz
@roblabla
Mar 12 2015 12:58
:P
I did that once with C#, used Lua.
teacher got mad :<
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:59
Hahahaha
Robin Lambertz
@roblabla
Mar 12 2015 12:59
Then again, I think there isn’t a single project I did “correctly"
Will Franzen
@wtfaremyinitials
Mar 12 2015 12:59
Lol
Robin Lambertz
@roblabla
Mar 12 2015 12:59
Yet I always had perfect marks :P
Robin Lambertz
@roblabla
Mar 12 2015 13:12
How to drive your teachers mad :
  • Give back two projects, the “normal” one that’s flawless and perfectly done
  • The “bonus project” one, with a ridiculous shitton of bonus functionality
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:13
Mad? My teacher loves it when I do that
Although he was annoyed by the rickroll in one of my projects….
Robin Lambertz
@roblabla
Mar 12 2015 13:13
I wonder if I still have the minecraft client/server project somewhere
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:14
The what?
Robin Lambertz
@roblabla
Mar 12 2015 13:14
Had a school project to learn networking
supposed to a very very simple client/server console chat
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:14
xD
Robin Lambertz
@roblabla
Mar 12 2015 13:14
Modularized it a ton, could connect to minecraft servers, IRC servers, and their protocol.
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:15
Lol that’s awesome
Robin Lambertz
@roblabla
Mar 12 2015 13:15
It loaded the DLLs dynamically and all, a real plugin system
The fun bit is, I had a 200% mark on this one IIRC
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:15
Hahaha
Robin Lambertz
@roblabla
Mar 12 2015 13:15
and then the administration did something stupid, they made it so the highest mark was 100%, and everyone else depended on it
so like if someone had 100%, he’d only get 50%
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:16
:3
Robin Lambertz
@roblabla
Mar 12 2015 13:16
It was okay for most project where the highest mark was around 110%, but with this one, the whole school turned against me :<
I love school administrations. They always do stuff like they have no idea what they’re doing
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:18
Yup
The incompetence can be astounding
var getBlockCursor = function(x, y, z) {
    var n = y >> 4;
        y = y % 16;
    return (n * 4096) + (y * 256) + (z * 16) + (x);
};
how does that look?
(assuming SMP chunk format)
Robin Lambertz
@roblabla
Mar 12 2015 13:20
wut ?
oh
I dislike magic values :P
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:20
How should it be then :stuck_out_tongue:
Robin Lambertz
@roblabla
Mar 12 2015 13:20
what’s n ?
it’s the chunk ?
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:21
mini chunk
Robin Lambertz
@roblabla
Mar 12 2015 13:21
right
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:21
yeah
Robin Lambertz
@roblabla
Mar 12 2015 13:21
well, I guess it’s ok
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:21
wait this doesn’t account for blocks being 2 bytes long
ugh
Robin Lambertz
@roblabla
Mar 12 2015 13:22
heh, yeah
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:22
so does that mean I should be multiplying x by 2?
:/
Robin Lambertz
@roblabla
Mar 12 2015 13:22
you should be multiplying the total by 2
Romain Beaumont
@rom1504
Mar 12 2015 13:22
roblabla: instead of if(x == y) you can do if(!x != !y)
Robin Lambertz
@roblabla
Mar 12 2015 13:22
return ((n 4096) + (y 256) + z 16) + (x)) 2
Romain Beaumont
@rom1504
Mar 12 2015 13:23
still better than !!
!! is too exclamative :p
Robin Lambertz
@roblabla
Mar 12 2015 13:23
@rom1504 I find both pretty ugly. At least with !!x == !!y I keep the idea that I want both to be equal
And as such is easier to read IMO
Romain Beaumont
@rom1504
Mar 12 2015 13:23
yeah there's that
Robin Lambertz
@roblabla
Mar 12 2015 13:23
(I’m a bit scared that the compiler optimizes the !! out though)
(if I compile with O3 or whatev)
Romain Beaumont
@rom1504
Mar 12 2015 13:24
you could code a small xor function too
or a macro
Robin Lambertz
@roblabla
Mar 12 2015 13:24
macros aren’t allowed.
Well, they are, but they would REALLY prefer you don’t.
(And for a good reason : macro in C sucks)
Romain Beaumont
@rom1504
Mar 12 2015 13:25
xor(x,y) is possibly better
maybe slower though
(well if(xor(x,y)) )
oh but you don't want xor
you want !xor
Robin Lambertz
@roblabla
Mar 12 2015 13:27
Yeah
but then again, !!x == !!y is easier to read :P
I’d rather do a BOOLEQ(x, y) !!(x) == !!(y)
if I went the macro route.
Romain Beaumont
@rom1504
Mar 12 2015 13:28
yeah
Romain Beaumont
@rom1504
Mar 12 2015 13:28
a function is a bit overkill
Robin Lambertz
@roblabla
Mar 12 2015 13:28
a new alternative for cygwin
looks a LOT better
uses archlinux’s pacman as its base
Romain Beaumont
@rom1504
Mar 12 2015 13:29
well anyway, C isn't particularly pretty, so it's ok to do ugly things I guess :p
Robin Lambertz
@roblabla
Mar 12 2015 13:29
C can be very pretty when done correctly
Though I miss a lot of awesome features from JS.
Closures.
I want my closures ;(
Romain Beaumont
@rom1504
Mar 12 2015 13:30
c++11
Robin Lambertz
@roblabla
Mar 12 2015 13:30
That’s not C :P
Romain Beaumont
@rom1504
Mar 12 2015 13:30
yeah :p
Robin Lambertz
@roblabla
Mar 12 2015 13:30
this flinux thing looks very good
it ain’t missing much to be very usable.
Romain Beaumont
@rom1504
Mar 12 2015 13:33
my gf have to do some batch in her company, so I looked at it, and it was just as crappy as I remembered it was. That's why you use linux ^^
bash is not great, but still much better than batch
Robin Lambertz
@roblabla
Mar 12 2015 13:34
both are horrid
just use python
Much easier to use
just as fast.
Romain Beaumont
@rom1504
Mar 12 2015 13:34
yeah I agree
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:35
@roblabla for the chunk API
Should (s/g)etBiome take x, y, z or x, z
Romain Beaumont
@rom1504
Mar 12 2015 13:36
roblabla: they have way too much time on their hands it seems :D
Robin Lambertz
@roblabla
Mar 12 2015 13:36
it’s very instructive though
Romain Beaumont
@rom1504
Mar 12 2015 13:36
yeah seems so
Robin Lambertz
@roblabla
Mar 12 2015 13:37
I spend too much time on the web
ARGH
roblabla @roblabla hits himself
Robin Lambertz
@roblabla
Mar 12 2015 13:38
Right, time to test this project, make sure it works, and if it does get it corrected.
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:39
@roblabla
Should (s/g)etBiome take x, y, z or x, z
Robin Lambertz
@roblabla
Mar 12 2015 13:40
erm
x,z ?
biome doesn’t depend on height
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:40
but then the API isn’t uniform :3
Robin Lambertz
@roblabla
Mar 12 2015 13:40
hmm, that said, maybe we should take x,y,z just in case,
You never know what mojang has up their sleeve
Yeah, take x,y,z.
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:41
<3 ES6
Screen Shot 2015-03-12 at 8.41.01 AM.png
Robin Lambertz
@roblabla
Mar 12 2015 13:42
a part of me finds it sad
it doesn’t look like json anymore :P
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:42
haha
A part of me loves ASM.
somewhere, deep inside of me.
Romain Beaumont
@rom1504
Mar 12 2015 13:44
is there public/private in es6 ?
Robin Lambertz
@roblabla
Mar 12 2015 13:44
You can use Symbols to do a fake private.
Will Franzen
@wtfaremyinitials
Mar 12 2015 13:44
sort of @rom1504
Robin Lambertz
@roblabla
Mar 12 2015 13:44
You can use a WeakMap for a real “private"
Romain Beaumont
@rom1504
Mar 12 2015 13:45
ok
Romain Beaumont
@rom1504
Mar 12 2015 13:45
sounds like perl's oo
Robin Lambertz
@roblabla
Mar 12 2015 13:46
heh
Haven’t used Perl in an OO way before.
Romain Beaumont
@rom1504
Mar 12 2015 13:46
basically perl says : object are hash
Robin Lambertz
@roblabla
Mar 12 2015 13:47
oh, well that’s exactly like JS.
it’s also one of the main performance drain.
compared to compiled languages that is.
Romain Beaumont
@rom1504
Mar 12 2015 13:47
and then they have some syntactic sugar but that's about it
yeah
(and some interpreted languages like ruby)
Robin Lambertz
@roblabla
Mar 12 2015 13:50
Ruby. Urg.
I love the language. But how can a language be so slow ._.
Robin Lambertz
@roblabla
Mar 12 2015 13:57
heh
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _ft_puts from ./libfts.a(ft_puts.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
:< no pie.
Robin Lambertz
@roblabla
Mar 12 2015 14:04
._.
is this some kind of joke ?
faith in humanity lost again.
Romain Beaumont
@rom1504
Mar 12 2015 14:07
I'm afraid it's not a joke ^^
Robin Lambertz
@roblabla
Mar 12 2015 14:07
oh lord
same old argument of “Kids don’t distinguish virtual from real world."
Romain Beaumont
@rom1504
Mar 12 2015 14:09
yeah, it's not true, but even if it was there are far much violent games than minecraft
and more realistic
Robin Lambertz
@roblabla
Mar 12 2015 14:10
oh well.
Let’s just thank the lord that I don’t live there :D
Romain Beaumont
@rom1504
Mar 12 2015 14:10
yeah :D
Dennis Bartlett
@dcbartlett
Mar 12 2015 17:42
@wtfaremyinitials what editor is that?
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:47
Atom
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:54
inline git diffs are the greatest
Dennis Bartlett
@dcbartlett
Mar 12 2015 17:54
yeha
i’ve got that in my sublime
atom looks better though
too bad its slow
:/
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:55
Atom is slow? Or sublime
Dennis Bartlett
@dcbartlett
Mar 12 2015 17:55
atom
with large files
not that it matters since i don’t use large files
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:55
What kind of file are you ed— exactly
I’ve never had that issue
Dennis Bartlett
@dcbartlett
Mar 12 2015 17:56
i do like that atom lets me play videos in the background
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:57
O.o
what package is that?
Dennis Bartlett
@dcbartlett
Mar 12 2015 17:57
HAHA
it uses VLC underneith
Will Franzen
@wtfaremyinitials
Mar 12 2015 17:59
Atom honestly keeps getting better and better
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:01
heh
it does
i have no doubt it will be a great editor long term
i just tried it out six months ago and decided to give it 6 months
lol
Robin Lambertz
@roblabla
Mar 12 2015 18:06
I wonder if there's a neovim package for atom
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:10
i think i’ll try atom again
@wtfaremyinitials be careful with videos
save frequently
atom used to crash on me with some videos
and decide not to play others
i had to edit the plugin some to accept other video types though
so maybe my meddling crashed it
Romain Beaumont
@rom1504
Mar 12 2015 18:14
if your files are big, it's a going thing the editor is slow, you shouldn't have big (source code) files :p
*good
just wanted to share. pure gold.
Romain Beaumont
@rom1504
Mar 12 2015 18:15
I'd say <500l is ok, more is too much
Robin Lambertz
@roblabla
Mar 12 2015 18:15
@rom1504 except sometimes you want to edit an SQL dump
and that can easily have > 500K lines
Romain Beaumont
@rom1504
Mar 12 2015 18:16
yeah I guess
hmm well
I never edited a SQL dump
but I guess you can
Robin Lambertz
@roblabla
Mar 12 2015 18:17
oooh, chrome beta 42
supports ES6 classes
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:19
pop quiz
what anime is in the background of that atom plugin’s page?
Robin Lambertz
@roblabla
Mar 12 2015 18:20
which plugin ?
Robin Lambertz
@roblabla
Mar 12 2015 18:22
:O idk this one
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:22
i just linked it a bit ago
<.<
oh you mean the anime
Robin Lambertz
@roblabla
Mar 12 2015 18:23
duh xD
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:23
i’m not sure which one it is either
i can ask Jin
Robin Lambertz
@roblabla
Mar 12 2015 18:23
open an issue on github
XD
Will Franzen
@wtfaremyinitials
Mar 12 2015 18:44
@dcbartlett I cmd+S at the end of every line
Dennis Bartlett
@dcbartlett
Mar 12 2015 18:44
k