These are chat archives for PrismarineJS/prismarine-server

23rd
Feb 2015
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:22
Hello world
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:23
thats better
we don’t have to use hangouts
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:24
Mhm
So.
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:24
i just have it open if someone wants to join and chat
ugh lag on messages on gitter
:/
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:24
So how are we going to separate out things?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:24
not sure yet
i know that each world (overworked, end, nether, etc…) should have its own thread
and then sub-threads for those
so that makes those easily made into modules right there
i think the tick system should be part of the core
and maybe the packet handler
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:26
Multiple threads on node?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:26
yeah
child-process
using node-cluster
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:26
And we pass JSON messages back and forth?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:26
no
cluster uses an internal event system
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:26
TIL
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:27
we would need to create a module framework first though
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:27
Yeah
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:27
that can load up modules and inject them into the event system
so gonna need hooks and such
i would say each module gets a thread?
in turn they can create threads if they need to
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:28
what if multiple modules are trying to change the outcome of the same event??
if they're running in parallel everything will get messed up
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:29
no?
they don’t directly communicate with anything except the core
the core would handle all the messages
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:29
I know
but if you have two modules listening for a block break
one has to handle the event before the other
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:30
hum
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:30
yeah
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:30
well
lets creat an example where that would come up
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:30
sure
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:31
what modules would need to watch for a block to break
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:31
some kind of world protection
and maybe a mining rewards module
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:31
hum
right, but the actual breaking of the block would still be handled by the world-gen module for that realm
once the block is borken, the message gets sent that it was broken
then core notifies everyone that teh block was broken
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:32
Waitwaitwait
why would block break be handled by the world gen module
wouldnt it be the world module?
world gen only handles creating chunks
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:33
yeah, a world protection module and a rewards module running at the same time wouldn’t both be able to process that event, because the world protection shouldn’t let you break it
i meant worl module
not world gen
world gen should be a sub-module of world
heh
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:34
k just making sure
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:34
i see your point though
how do we know who gets priority in the message queue
maybe thats how we handle it
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:34
Maybe when a plugin registers it's listeners it chooses a priority?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:34
when a module registers it sets a priority
heh
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:35
lol that's gonna take getting used to
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:35
so, what happens when two modules registered with the same priority?
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:35
last one to register gets precedence?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:36
hum
i load protection
then i load rewards
rewards gets precedense?
brb
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:36
well ideally protection and rewards don't register to the same priority
I don't think we should get too threadhappy
Romain Beaumont
@rom1504
Feb 23 2015 19:41
hmm seems I can't join this chan on irc, wonder why
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:41
what are you typing in irc?
“LETS THREAD ALL THE THINGS"
heh
i think just the worlds should be threaded
mods should attach to the worlds
Romain Beaumont
@rom1504
Feb 23 2015 19:42
well /join #PrismarineJS/prismarine-server
the same for node-minecraft-protocol works fine
that's surprising
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:43
if a mod has to generate new worlds (Mystcraft) then …dunno
Prismarine-Server?
maybe the capital letters are important?
Romain Beaumont
@rom1504
Feb 23 2015 19:43
tried that too, no difference
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:43
hum
dunno
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:45
I don't think modules should be world specific
event listeners can be, but I think modules should be global
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:45
yeah
so, we don’t thread modules by default
if the module needs to be threaded, thats on the module developer
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:46
yes
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:47
all we need to provide is a priority system, a message queue, a module loader, and a tick system
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:47
modules can create threads if they want, but the default is single threaded
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:47
thats more flexable i spose
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:48
are we going to try to make the module api similar to bukkit?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:49
probably
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:50
is the api going to be oo?
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:50
if by that you mean object oriented
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:50
yes
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:51
would prefer it to be
or functional
but object oriented makes more sense
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:51
I personally perfer functional over oo
Dennis Bartlett
@dcbartlett
Feb 23 2015 19:51
then lets go functional
its a better way to do it anyways
Will Franzen
@wtfaremyinitials
Feb 23 2015 19:55
how are we going to expose the events to the modules?
i.e. what are they calling .on on?
Dennis Bartlett
@dcbartlett
Feb 23 2015 20:01
sorry, one sec, gotta deal with some work stuff
Will Franzen
@wtfaremyinitials
Feb 23 2015 20:01
aight
Will Franzen
@wtfaremyinitials
Feb 23 2015 20:09
eventually we can make our package manager in the same way atom's works
it's just a thin wrapper over npm
Dennis Bartlett
@dcbartlett
Feb 23 2015 20:28
thats the plan
i kinda want the server to host a web-interface for managing it
Dennis Bartlett
@dcbartlett
Feb 23 2015 20:47
.on
hum
you mean .on(‘something’, function() {});
we would register events
probably gonna need more than 1
actually
we’re probably going to just clone most of bukkit
heh
so
they have messaging just like we need as well as priorities
i can’t find their list of events though
Dennis Bartlett
@dcbartlett
Feb 23 2015 20:54
bah
bukkit’s javadocs are down
Robin Lambertz
@roblabla
Feb 23 2015 21:05
._.
why would modules have their own threads
that's crazy
I think we should step back and look at what's already been done
What we're going to end up doing is a voxel engine
on top of which we layer a game (AKA specific blocks, specific physics, specific entities)
It sounds a lot like SpoutEngine
(which was never finished, mind you)
Except our goal isn't as big I guess.
ANYWAY, the core should expose hooks. Like "world" (core doesn't have to know about worldgen), "network", "entities", etc..
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:14
well, i wanted those to be modules
maybe not network
heh
entities though
Robin Lambertz
@roblabla
Feb 23 2015 21:16
They are modules
well
core exposes hooks
You need at least one module for each hook
that's the way I see it
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:17
i can’t get into bukkit’s docs right now
Robin Lambertz
@roblabla
Feb 23 2015 21:17
Network can be shimmed out though
Get bukkit's source and compile it
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:17
:/
Robin Lambertz
@roblabla
Feb 23 2015 21:17
That'll give you the docs
it's not that hard :P
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:18
i just formatted my pc saturday
that would mean setting up the entire java dev environment
<.<
Robin Lambertz
@roblabla
Feb 23 2015 21:18
just a jdk and maven
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:18
yeah
except i have to make OSX understand that java 6 does and SHOULD exist
Robin Lambertz
@roblabla
Feb 23 2015 21:18
maven is a standalone, you can wget it :P
errm
doesn't brew have java packages ?
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:19
oh yeah
heh
Robin Lambertz
@roblabla
Feb 23 2015 21:19
eh, actually it doesn't
._.
I seriously don't understand why installing java is so hard, whatever your platform of choice.
Heck, even installing a cross-compiling C++ tookit is easier !
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:22
heh
Robin Lambertz
@roblabla
Feb 23 2015 21:22
I remember trying to get a portable java runtime on a USB. I think that's around when I gave up hope on java.
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:23
 mvn clean install
Error: JAVA_HOME is not defined correctly.
We cannot execute /usr/libexec/java_home/bin/java
O.o
Robin Lambertz
@roblabla
Feb 23 2015 21:23
does the executable exist ?
is it executable ?
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:24
i don’t have a JDK
<.<
just a JRE
FML
Robin Lambertz
@roblabla
Feb 23 2015 21:24
heh
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:26
could oracle’s site be any more convoluted?
Robin Lambertz
@roblabla
Feb 23 2015 21:26
I think they reached perfect convolution
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:28
its like chasing a rabbit through a hole to find out that the hole opens into a hat which has a hole in it that dumps into the nether, which has a portal to the end, where you finally meet the dragon which eats you and you are then spiraling down into nothingness
<.<
Robin Lambertz
@roblabla
Feb 23 2015 21:28
you could use brew cask
brew cask has java
brew cask is life anyway :D
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:29
brew install Caskroom/cask/java
<3 brew
Robin Lambertz
@roblabla
Feb 23 2015 21:30
brew cask install java
y'know, that works too :P
brew cask is life.
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:30
heh
i didn’t have cask installed yet
this way installed it for me
yay
maven is compiling bukkit now
clear
<.<
nope still not a terminal
Robin Lambertz
@roblabla
Feb 23 2015 21:32
roflmao
reset is better anyways. No scrollback
also, if using iterm2, cmd+k
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:33
i use scrollback though
Robin Lambertz
@roblabla
Feb 23 2015 21:33
(if not using iterm2, brew cask install iterm2)
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:33
i’m using iterm2
and zsh
with a customized agnoster theme
Robin Lambertz
@roblabla
Feb 23 2015 21:33
prezto ? oh-my-zsh ?
custom ?
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:33
and powershell droid monospace font
oh-my
looks like this
Robin Lambertz
@roblabla
Feb 23 2015 21:34
Powershell gives me so much headache
Yeah, I use bog standard agnoster personally
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:34
OH NOW YOU WORK…. FUCK YOU GITTER
Robin Lambertz
@roblabla
Feb 23 2015 21:34
haha
be nice to gitter
I think gitter might just hate gifs
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:34
:/
dcbartlett @dcbartlett does not see bukkit docs in here
Robin Lambertz
@roblabla
Feb 23 2015 21:37
mvn javadocs
mvn docs
can't remember which
it should build the docs
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:38
BUILD FAILUER on both
Robin Lambertz
@roblabla
Feb 23 2015 21:38
wuut ?
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:38
unknown lifecycles
heh
Robin Lambertz
@roblabla
Feb 23 2015 21:38
maven javadoc:javadoc ?
mvn install ?
oh right
mvn javadoc without the s.
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:39
heh
Unknown lifecycle
lol
Robin Lambertz
@roblabla
Feb 23 2015 21:39
>.>
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:40
let me get javadoc installed
Robin Lambertz
@roblabla
Feb 23 2015 21:40
look into the pom.xml i guess
so much for "ease of access to documentation".
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:40
lol
Robin Lambertz
@roblabla
Feb 23 2015 21:41
A part of me really wants to try rewriting Protocols in purescript.
roblabla @roblabla is pretty sure he could create a pretty neet DSL for writing protocol definitions in purescript.
Will Franzen
@wtfaremyinitials
Feb 23 2015 21:42
What's better about prescript?
purescript**
Robin Lambertz
@roblabla
Feb 23 2015 21:43
it's strongly typed, supports algebraic data-types, pattern matching, etc...
it's kind of like haskell/caml/etc..., functional languages
It compiles down to js, in a similar fashion coffeescript does
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:43
:+1:
just note that i wont be contributing
lol
Robin Lambertz
@roblabla
Feb 23 2015 21:44
Not in the near-future anyway
1.8 comes first :P
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:44
i’ll just require() and complain
;)
Robin Lambertz
@roblabla
Feb 23 2015 21:45
Nah, you'll require and love the fact that it Just Works, because, y'know, type safety + algebraic data types can't fail.
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:45
and we can breathe in space
Robin Lambertz
@roblabla
Feb 23 2015 21:45
(In case you did not know : I fell in love OCaml twice upon a time.)
dcbartlett @dcbartlett kicks bukkit
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:46
why you no compile javadoc
Robin Lambertz
@roblabla
Feb 23 2015 21:46
xD
just read the source
that's what I always do
:D
(And then people ask me how come I always use stuff in unintended ways...)
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:47
well
they are in the source
<.<
it does build them
Robin Lambertz
@roblabla
Feb 23 2015 21:48
I remember getting kicked from #BukkitDev on esper for asking why code using pure-bukkit functions failed, even though the equivalent NMS-code worked
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:48
its in target/site/apidocs
Robin Lambertz
@roblabla
Feb 23 2015 21:48
Reason was, talking about NMS-code was prohibited
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:48
not to go about running it
O.o
Robin Lambertz
@roblabla
Feb 23 2015 21:49
Cuz, y'know, nms is unsupported and stuff
and it's our holy precious
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:50
 java -jar ./bukkit-1.7.10-R0.1-SNAPSHOT.jar
no main manifest attribute, in ./bukkit-1.7.10-R0.1-SNAPSHOT.jar
i’m not even going to ...
Robin Lambertz
@roblabla
Feb 23 2015 21:50
well duh
it's bukkit
not craftbukkit
bukkit == the api alone, no server.
craftbukkit == the server, including the patched minecraft proprietary sources
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:51
yeah, but it should still have a web server for the website it just compiled
<.<
Robin Lambertz
@roblabla
Feb 23 2015 21:51
ney
that's not how javadoc works
:P
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:52
node to the rescue
:D
Robin Lambertz
@roblabla
Feb 23 2015 21:52
python has a built-in web server
so do i now
:D
Robin Lambertz
@roblabla
Feb 23 2015 21:53
python -m SimpleHTTPServer
python has it entirely built in
:P
(This is where I realize "batteries included" also means "clutter included")
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:53
ewww
windows
<.<
Robin Lambertz
@roblabla
Feb 23 2015 21:54
I love the fact I can tell people's java version using just a link to the javadocs
well, major version.
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:54
ironically, thats hosted with node now
even though maven compiled it
heh
Robin Lambertz
@roblabla
Feb 23 2015 21:54
maven can be used to run grunt tasks y'know
That'd be fun to do
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:55
O.o
Robin Lambertz
@roblabla
Feb 23 2015 21:55
Using rhino
or whatever the new thing is
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:55
a task runner to run a task runner?
Robin Lambertz
@roblabla
Feb 23 2015 21:55
no, just a task runner running tasks
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:55
oh
Robin Lambertz
@roblabla
Feb 23 2015 21:55
making maven understand grunt's format
Dennis Bartlett
@dcbartlett
Feb 23 2015 21:55
like it reads the grunt tasks and runs them
yeah
Robin Lambertz
@roblabla
Feb 23 2015 21:55
Obviously, you're not allowed to call into node
so reimplement the whole node runtime :D
Will Franzen
@wtfaremyinitials
Feb 23 2015 22:01
Because We Can™
Robin Lambertz
@roblabla
Feb 23 2015 22:01
:3
y'know, that's what I do all day at school
rewriting printf
is there any point to it ?
Rewriting parts of the libc in asm, rewriting malloc, etc..
Will Franzen
@wtfaremyinitials
Feb 23 2015 22:02
that sounds awful haha
Robin Lambertz
@roblabla
Feb 23 2015 22:02
But it feels so damn rewarding anyway :D
Well the cool part is that, since I'm not allowed to use the "usual" libc functions, I can write C code without having to worry about idioms and interops
null-terminated strings ? Why would I even bother !
Dennis Bartlett
@dcbartlett
Feb 23 2015 22:54
we should start creating issues
so that we know what to work on
lol
Robin Lambertz
@roblabla
Feb 23 2015 22:55
:+1:
Dennis Bartlett
@dcbartlett
Feb 23 2015 22:56
and
4 minutes till i’m coding on this project for the next 9 hours
:D
gonna make some damn good headway today
@roblabla we should also document out the protocol better
so that its easier for people to use
seeing as i still have to look up all the damn names for the packets
and see what they expect
Robin Lambertz
@roblabla
Feb 23 2015 22:58
I agree, but TBH, I never found a satisfying way to document it
Dennis Bartlett
@dcbartlett
Feb 23 2015 22:58
i’ll document it out if you don’t mind me asking you a bazillion quesitons about it
heh
Robin Lambertz
@roblabla
Feb 23 2015 23:02
Ask ahead
Dennis Bartlett
@dcbartlett
Feb 23 2015 23:02
ahead?
so i can’t ask behind?
Robin Lambertz
@roblabla
Feb 23 2015 23:03
nah, just ahead.
Dennis Bartlett
@dcbartlett
Feb 23 2015 23:03
heh
Robin Lambertz
@roblabla
Feb 23 2015 23:04
i'm behind a nat. Or something. Lame attempt at lame joke.
Robin Lambertz
@roblabla
Feb 23 2015 23:31
weelp
Will Franzen
@wtfaremyinitials
Feb 23 2015 23:31
hm?
Robin Lambertz
@roblabla
Feb 23 2015 23:31
clicked the wrong button :P
wanted to switch page, left the room instead
Romain Beaumont
@rom1504
Feb 23 2015 23:34
I'm french too ^^
Dennis Bartlett
@dcbartlett
Feb 23 2015 23:36
i’m louisiana french
lol