These are chat archives for voodooattack/nexusjs

27th
Apr 2016
Abdullah A. Hassan
@voodooattack
Apr 27 2016 02:32 UTC
@jtenner @rgolea I just woke up, sorry.
The reason I don't use v8 is because it locks contexts for each thread, and it has trouble with object sharing between contexts from different threads.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 09:49 UTC
@rgolea Also don't worry, there's plenty of JS code to be written once we get started with the package manager. :smile:
Rares Golea
@rgolea
Apr 27 2016 10:53 UTC
nice!
jtenner
@jtenner
Apr 27 2016 15:38 UTC
@voodooattack count me in on the JS code. I'm stoked.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:38 UTC
Haha, awesome
I'll let you guys know when it's ready for a package manager.. I still have sockets to implement :worried:
jtenner
@jtenner
Apr 27 2016 15:39 UTC
Yeah that's going to be fun!
Let me know when I can have a multi-threaded web server with an express api
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:39 UTC
Hehe
jtenner
@jtenner
Apr 27 2016 15:39 UTC
:3
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:39 UTC
I've already almost implemented the new EventEmitter interface
Rares Golea
@rgolea
Apr 27 2016 15:39 UTC
not sure you’ll be able to use express though
jtenner
@jtenner
Apr 27 2016 15:40 UTC
@rgolea I understand. You and I might have to make an alternative XD
Rares Golea
@rgolea
Apr 27 2016 15:40 UTC
sure!
I’m currently working on a Node.js open source project called deployd
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:41 UTC
Now you can do:
connection.emit('data', ...).then(() => console.log('sent all data');
Rares Golea
@rgolea
Apr 27 2016 15:41 UTC
well v2 actually
jtenner
@jtenner
Apr 27 2016 15:41 UTC
@voodooattack promises? Nice.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:41 UTC
Yep
Rares Golea
@rgolea
Apr 27 2016 15:41 UTC
so maybe I can adapt it to work for nexusjs from the beginning
jtenner
@jtenner
Apr 27 2016 15:41 UTC
@rgolea mind sharing?
Rares Golea
@rgolea
Apr 27 2016 15:41 UTC
just started
but see deployd.com
jtenner
@jtenner
Apr 27 2016 15:41 UTC
I see.
Rares Golea
@rgolea
Apr 27 2016 15:41 UTC
for v1
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:41 UTC
Oh, that's interesting @rgolea
Rares Golea
@rgolea
Apr 27 2016 15:41 UTC
I will work better on it this summer
and I will have a proper REST framework
if I can manage to make it work for both… we’ll have a startpoint
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:42 UTC
Awesome!
That looks very interesting
Rares Golea
@rgolea
Apr 27 2016 15:43 UTC
well… it can be a jumpstart
jtenner
@jtenner
Apr 27 2016 15:43 UTC
dpb.js, neat.
That would make my react.js application super fast
oooo
Rares Golea
@rgolea
Apr 27 2016 15:43 UTC
hahaha
yup
jtenner
@jtenner
Apr 27 2016 15:44 UTC
How do I integrate facebook login?
Rares Golea
@rgolea
Apr 27 2016 15:44 UTC
dpd-passport
anyways
join the deployd/deployd room
jtenner
@jtenner
Apr 27 2016 15:44 UTC
my dude.
Rares Golea
@rgolea
Apr 27 2016 15:44 UTC
@voodooattack if you get a stable architecture until this summer
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:44 UTC
If I'm getting it right, it reminds me of http://horizon.io
Rares Golea
@rgolea
Apr 27 2016 15:44 UTC
I will work on dpd2 to be compatible with nexusjs
as well
yeah… this or loopback
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:45 UTC
Awesome. I plan to have something stable by the end of this month btw
Rares Golea
@rgolea
Apr 27 2016 15:45 UTC
whatever
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:45 UTC
Just not very feature-rich
Rares Golea
@rgolea
Apr 27 2016 15:45 UTC
sweet!
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:45 UTC
Wait, the end of next month!
Otherwise I'd have 3 days lol
Rares Golea
@rgolea
Apr 27 2016 15:45 UTC
lol
if you have something until june the 15th or somewhere there
jtenner
@jtenner
Apr 27 2016 15:46 UTC

@rgolea mind checking out my projects?

Canvas2DPrototype wrapper - https://github.com/e2d/e2d
Multi-threaded game framework that makes isomorphic builds that run in both a webworker/browser and talk to each other - https://github.com/jtenner/sidekick-worker

Rares Golea
@rgolea
Apr 27 2016 15:46 UTC
there shouldn’t be a problem with me starting deployd2
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:46 UTC
Oh yeah, plenty of time there
@jtenner made a nice webworker based project btw
jtenner
@jtenner
Apr 27 2016 15:47 UTC
Yeah it's still under heavy development.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:47 UTC
That one ^^
Rares Golea
@rgolea
Apr 27 2016 15:47 UTC
@jtenner I’m really a data transfer developer
jtenner
@jtenner
Apr 27 2016 15:47 UTC
This message was deleted
Rares Golea
@rgolea
Apr 27 2016 15:47 UTC
not really a game developer
since I don’t really like games
:smile:
jtenner
@jtenner
Apr 27 2016 15:47 UTC
It's okay. It works cross threads lol
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:47 UTC
lol
I don't like playing games, I like making them
jtenner
@jtenner
Apr 27 2016 15:47 UTC
getting data to transfer 60 times a second was a real challenge
fitting 20ms of work in 14ms of cpu time was also a challenge.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:48 UTC
that's true
Rares Golea
@rgolea
Apr 27 2016 15:48 UTC
wow! need to learn a lot from you guys
I haven’t jumped into gaming world
yet
jtenner
@jtenner
Apr 27 2016 15:48 UTC
It's okay if you don't know or don't like games
THere's a lot of stuff that I had to teach myself.
And there's no reason why everyone needs to know EVERYTHING.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:49 UTC
Let's just say that once you start paying attention to data transfer speed across a GPU bus, you're busted.
I wrote a GLSL shader once, it literally broke me..
jtenner
@jtenner
Apr 27 2016 15:49 UTC
@voodooattack that's why I made a canvas2dprotoype WRAPPER. not a WebGL wrapper LOL
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:49 UTC
:smile:
Rares Golea
@rgolea
Apr 27 2016 15:50 UTC
well… the thing is that I want to learn the gaming tecniques and data transfer for games to improve normal data apps speed transfer
jtenner
@jtenner
Apr 27 2016 15:50 UTC
@rgolea how well does dpd keep track of objects
for realtime gaming stuff
Rares Golea
@rgolea
Apr 27 2016 15:51 UTC
well… it’s more of data only… so it sends data with socket.io or responds to GET/POST/PUT/DELETE and stores it in a database
nothing fancy
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:51 UTC
What DB engine does it use?
Rares Golea
@rgolea
Apr 27 2016 15:51 UTC
right now, mongodb
jtenner
@jtenner
Apr 27 2016 15:51 UTC
JSON data, probably mongo
HAH
called it
But that's okay.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:51 UTC
Could have been RethinkDB too
Rares Golea
@rgolea
Apr 27 2016 15:52 UTC
I want to make it modular so it can store into whatever database you might want
so you just create the driver
and the plugin
and you can connect to whatever database you want
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:52 UTC
Nice
I like modularity
Rares Golea
@rgolea
Apr 27 2016 15:52 UTC
either MySQL, Oracle, Mongo, Solr, Elastic
etc
me too
I really want to make a small framework there
just basics
so you can plug in stuff
jtenner
@jtenner
Apr 27 2016 15:53 UTC
Let's say I want to make a game like 2d spore
with blobs
I need to update a world every 100ms
Rares Golea
@rgolea
Apr 27 2016 15:53 UTC
What does 2d spore do?
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:53 UTC
Like the project I showed you @jtenner ? :P
jtenner
@jtenner
Apr 27 2016 15:54 UTC
maybe.
Rares Golea
@rgolea
Apr 27 2016 15:54 UTC
told you I’m not a gaming kind of guy
hahaha
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:54 UTC
lol
It's science!
Rares Golea
@rgolea
Apr 27 2016 15:54 UTC
at all
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:54 UTC
jtenner
@jtenner
Apr 27 2016 15:54 UTC
I'm probably better off making a tuned game server
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:54 UTC
Something I made a long time ago, science I tell you!
Rares Golea
@rgolea
Apr 27 2016 15:55 UTC
what does it do?
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:55 UTC
The original plan was to tie it all into a database, where organisms can travel to be stored there or arrive from the database
Artificial life
Rares Golea
@rgolea
Apr 27 2016 15:55 UTC
whaaaaaaat!!!
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:55 UTC
... so you'd have an entire ecosystem across browsers
Knowing what I know now, I would have used socket.io for that
Alas, I was into PHP at the time, and I cried tears of blood and ragequit
Rares Golea
@rgolea
Apr 27 2016 15:56 UTC
hahahaha
shit happens
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:56 UTC
That's true :D
Rares Golea
@rgolea
Apr 27 2016 15:57 UTC
but man… this is real work!
omg
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:57 UTC
All made with react and paper.js
and d3 for the brain viewer
The liquid dynamics I translated to JS from C++ by hand -_-
Rares Golea
@rgolea
Apr 27 2016 15:57 UTC
hopefully nexusjs will have socket.io compatibility?
wow!
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:58 UTC
Of course
That's planned :)
Rares Golea
@rgolea
Apr 27 2016 15:58 UTC
nice!
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:58 UTC
It already supports asm.js/webassembly btw
I'm curious how that will work
With nexus
Rares Golea
@rgolea
Apr 27 2016 15:59 UTC
oh! btw
since we’re here...
Abdullah A. Hassan
@voodooattack
Apr 27 2016 15:59 UTC
Yeah?
Rares Golea
@rgolea
Apr 27 2016 16:00 UTC
I had some struggle with minimization on nodejs files
I wanted to do my server with minimized code (just like browserify)
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:00 UTC
That's a good idea
Rares Golea
@rgolea
Apr 27 2016 16:00 UTC
so… maybe nexus.js can have a compile option to compile everything?
on node just freazes
jtenner
@jtenner
Apr 27 2016 16:01 UTC
I'm not sure why that would be necessary
if you want parsing time to decrease, that sounds fine.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:01 UTC
Hmm, JSC already compiles your code to JIT format
it has 3 different JITS lol
jtenner
@jtenner
Apr 27 2016 16:01 UTC
But VM stuff doesn't optimize in the way you are describing.
Rares Golea
@rgolea
Apr 27 2016 16:02 UTC
I was thinking that if you can write js directly native in nexus
it might help with speed even more
have you seen native.js?
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:02 UTC
You can load asm.js and web assembly..
No, what's that?
jtenner
@jtenner
Apr 27 2016 16:03 UTC
@rgolea I would be more inclined to use react-native
Declarative stuff is my jam :)
Rares Golea
@rgolea
Apr 27 2016 16:03 UTC
@jtenner I really don’t like react that much
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:03 UTC
Ah, I see
jtenner
@jtenner
Apr 27 2016 16:03 UTC
Personal preference.
Rares Golea
@rgolea
Apr 27 2016 16:04 UTC
more of an angular guy
but whatever
the thing is
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:04 UTC
React > everything else.. except Nexus :P
Rares Golea
@rgolea
Apr 27 2016 16:04 UTC
it compiles to native code
:P
jtenner
@jtenner
Apr 27 2016 16:04 UTC
Yeah that's very cool.
Rares Golea
@rgolea
Apr 27 2016 16:04 UTC
so… if we can do the same in nexus… it might speed up stuff
idk
just a thought
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:04 UTC
Like I said, web assembly/asm.js
jtenner
@jtenner
Apr 27 2016 16:04 UTC
I don't use .jsx. I actually code react the hard way.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:05 UTC
You can compile C++ and run it inside nexus right now ^^
jtenner
@jtenner
Apr 27 2016 16:05 UTC
I should learn how to use C++
Rares Golea
@rgolea
Apr 27 2016 16:05 UTC
me too
:)
jtenner
@jtenner
Apr 27 2016 16:05 UTC
I'm too busy making web apps in C#
and js
Rares Golea
@rgolea
Apr 27 2016 16:05 UTC
currently I’m working only in js
jtenner
@jtenner
Apr 27 2016 16:06 UTC
Lucky.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:06 UTC
I originally got into JS because I was trying to embed it in a C++ game :P
Rares Golea
@rgolea
Apr 27 2016 16:06 UTC
I thought that I can get all I can get from js before moving to another language
I started from websites… html, css, php...
after frying my brains with php
and some stuff I really couldn’t bear with
I started with js
since then, I’ve only worked with js
jtenner
@jtenner
Apr 27 2016 16:08 UTC
@rgolea you would probably find working the Context2DPrototype in the browser to be very fun.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:09 UTC
I was trying to make a second Dwarf Fortress
voodooattack/ADWIF
A dance with ice and fire - GoT roguelike :P
I only got as far as the main menu https://dl.dropboxusercontent.com/u/27714141/adwif.ogv
lol
jtenner
@jtenner
Apr 27 2016 16:10 UTC
//create browser canvas
var canvas = document.createElement('canvas'),
  ctx = canvas.getContext('2d');

//dom manipulation
document.body.appendChild(canvas);
canvas.width = 400;
canvas.height = 400;

function frame() {
  requestAnimationFrame(frame);
  //do stuff here

}
frame();
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:10 UTC
Well, and terrain generation
But it was useful
Rares Golea
@rgolea
Apr 27 2016 16:11 UTC
how do you guys do terrain generation with js? you pass in everything or you just export it from somewhere else?
like a platform or whatever
:|
jtenner
@jtenner
Apr 27 2016 16:12 UTC
Yeah there's a lot of things you simply cannot do without data
You use json, a physics engine
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:12 UTC
Oh. That's quite a topic
jtenner
@jtenner
Apr 27 2016 16:12 UTC
I recommend p2.js personally
Rares Golea
@rgolea
Apr 27 2016 16:12 UTC
wow
so you build each and every single one of the parts of a terrain?
like trees and stuff?
jtenner
@jtenner
Apr 27 2016 16:13 UTC
tbh, you might be able to find/make a terrain editor that exports to a format you parse
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:13 UTC
Depends on your strategy
I like procedural generation
Which is a lot like conways game of life
Rares Golea
@rgolea
Apr 27 2016 16:15 UTC
okay… i’ve just about had it… do you have any tutorials on gaming with js?
jtenner
@jtenner
Apr 27 2016 16:15 UTC
HAHAHA
Rares Golea
@rgolea
Apr 27 2016 16:15 UTC
:)
jtenner
@jtenner
Apr 27 2016 16:15 UTC
You can find tutorials
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:15 UTC
Lol
jtenner
@jtenner
Apr 27 2016 16:15 UTC
I recommend learning how to draw stuff first
context2dprototype
I am literally an expert in canvas and transforms
Rares Golea
@rgolea
Apr 27 2016 16:16 UTC
darn… I dropped out of arhitecture because I really sucked at drawing
jtenner
@jtenner
Apr 27 2016 16:16 UTC
You can ask me anything.
Rares Golea
@rgolea
Apr 27 2016 16:16 UTC
sure thing! but you don’t know what you’re getting into
hahahaa
jtenner
@jtenner
Apr 27 2016 16:17 UTC
I've made a canvas library, I'm already too far in not to try.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:17 UTC
Not all games are about graphics
Roguelikes are just text
jtenner
@jtenner
Apr 27 2016 16:17 UTC
@voodooattack this is a good starting point.
Rares Golea
@rgolea
Apr 27 2016 16:17 UTC
I mean… I wanted to learn phaser.js and three.js
jtenner
@jtenner
Apr 27 2016 16:17 UTC
Start with basics first
Phaser and three are awesome, but you should learn how to do basic stuff like transforms first
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:18 UTC
Yeah
jtenner
@jtenner
Apr 27 2016 16:19 UTC
TBH you can just go get started with phaser. Or you could follow me, take the red pill, and see how far the rabbit hole goes.
evil maniacal laughter
Rares Golea
@rgolea
Apr 27 2016 16:19 UTC
hahahahha
just to get to the famous YOU DIED black screen with red letters
  • not a gaming guy but I’m a 9gagger
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:20 UTC
Lol
jtenner
@jtenner
Apr 27 2016 16:20 UTC
okay.
So let's find an image of a ship
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:21 UTC
I'm actually thinking of implementing native FFI into nexus
Rares Golea
@rgolea
Apr 27 2016 16:21 UTC
what is FFI?
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:21 UTC
foreign function interface
jtenner
@jtenner
Apr 27 2016 16:21 UTC
You'll have to explain
Two JS developers with 0 experience in c++
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:22 UTC
A way to call native APIs and libraries from JS
jtenner
@jtenner
Apr 27 2016 16:22 UTC
Ah.
Rares Golea
@rgolea
Apr 27 2016 16:22 UTC
I’ve got so much to learn...
aaah
see?
jtenner
@jtenner
Apr 27 2016 16:22 UTC
See that makes sense :)
Rares Golea
@rgolea
Apr 27 2016 16:22 UTC
hahaha
jtenner
@jtenner
Apr 27 2016 16:22 UTC
@rgolea go create a codepen
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:22 UTC
So you could call OpenGL like nothing
Rares Golea
@rgolea
Apr 27 2016 16:23 UTC
@jtenner are you going to help me right now draw a line or learn how to draw?
I’m sure @voodooattack has some other stuff to do
maybe private channel?
jtenner
@jtenner
Apr 27 2016 16:23 UTC
I'm going to help you learn how to canvas
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:23 UTC
okay guys
Have fun :)
jtenner
@jtenner
Apr 27 2016 16:23 UTC
We will!
Rares Golea
@rgolea
Apr 27 2016 16:23 UTC
thanks!
and give us a shout whenever you need stuff
Abdullah A. Hassan
@voodooattack
Apr 27 2016 16:24 UTC
Will do
Rares Golea
@rgolea
Apr 27 2016 19:25 UTC
Btw guys, can we get better speed on serving static files?
ngnix has a really fast way to deliver static files
faster than node
jtenner
@jtenner
Apr 27 2016 19:26 UTC
ngnix powers npm. Literally don't reinvent the wheel.
:)
Rares Golea
@rgolea
Apr 27 2016 19:27 UTC
:smile:
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:28 UTC
Nothing is faster than sendfile
Which is pretty much the go-to on *nix systems
Rares Golea
@rgolea
Apr 27 2016 19:32 UTC
Yes... But the sendfile on node is quite slower
I don't know why
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:32 UTC
Event Loop.
Mwahahahaa!
No more event loop
That's the best thing about nexus
:D
Rares Golea
@rgolea
Apr 27 2016 19:32 UTC
yup!
thanks for that
jtenner
@jtenner
Apr 27 2016 19:34 UTC
I mean, fast isn't always best.
It needs to be fast enough to match our biological processes
Speed for the sake of it isn't the best answer for everything.
I think in this case it's probably fine though.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:35 UTC
Haha
Speed is everything!
Well, when it comes to serving files
jtenner
@jtenner
Apr 27 2016 19:36 UTC
Speed is everything unless it's already fast enough to meet our brain's demand for information.
then content is king.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:36 UTC
True
jtenner
@jtenner
Apr 27 2016 19:36 UTC
For instance, if you can get page loading under the perception threshold with Node.js, there isn't really a reason to switch to nexus.
However, if you can deliver MORE stuff using this tool in the same time it takes, then there is a very good chance you will catch people's attention.
I can't wait to see.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:37 UTC
Me neither :D
jtenner
@jtenner
Apr 27 2016 19:40 UTC
I'm like a broken record.
pfft
Abdullah A. Hassan
@voodooattack
Apr 27 2016 19:40 UTC
lol
Rares Golea
@rgolea
Apr 27 2016 19:42 UTC
Lol
Mwahaha
@/all check this out!
jtenner
@jtenner
Apr 27 2016 22:53 UTC
Hahaha
@voodooattack join my gitter.im/e2d/e2d
Abdullah A. Hassan
@voodooattack
Apr 27 2016 22:55 UTC
Sure
jtenner
@jtenner
Apr 27 2016 22:55 UTC
My project needs to get off the ground. I'm desperate.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 22:57 UTC
Don't worry, it will
Just make a Medium post :P
jtenner
@jtenner
Apr 27 2016 23:02 UTC
I did lol
Abdullah A. Hassan
@voodooattack
Apr 27 2016 23:03 UTC
Oh yeah
I remember you showed me
But you need to make a tutorial
That'll get people interested
jtenner
@jtenner
Apr 27 2016 23:08 UTC
I'm only one person. I need help.
“e2d.js — The Declarative Canvas View Layer” https://medium.com/@joshuatenner/e2d-js-b77329a1a846
Abdullah A. Hassan
@voodooattack
Apr 27 2016 23:19 UTC
@jtenner put it on flipboard.
I get most of my traffic from flipboard. More than Facebook even.
Abdullah A. Hassan
@voodooattack
Apr 27 2016 23:32 UTC
@jtenner I put it on my flipboard for you :)