Skip to content

Instantly share code, notes, and snippets.

@max-mapper
Last active December 13, 2015 23:39
Show Gist options
  • Save max-mapper/4993590 to your computer and use it in GitHub Desktop.
Save max-mapper/4993590 to your computer and use it in GitHub Desktop.
node + npm explanation from #voxel.js irc

21:57 < dook> You seem to be new to node, is that right?

21:57 < skidz> good to know... yes.. very

21:57 < skidz> but familar with JS but mostly a C# programmer

21:58 < dook> Ok so the basic premise is that to make Chrome run javascript fast, they made a JS->C++ compiler called V8

21:58 < dook> It makes JS compile into very fast, efficient code.

21:58 < skidz> nice

21:58 < skidz> :)

21:58 < dook> Then this guy Ryan Dahl had this idea to use the V8 compiler to create a JS runtime, not just for running websites, but as a full runtime.

21:59 < dook> The original purpose was to solve the system-clogging problem of blocking code.

21:59 < dook> Anyways, the idea took off, and currently the scene is quite vibrant.

22:00 < dook> I assure you there are node ties to pretty much any database you're familiar with, although for whatever reason lots of people associate Node with MongoDB

22:00 < skidz> is there a popular one for mysql?

22:00 < skidz> is there a popular one for mysql?

22:00 < dook> One of the coolest things about node is that once you have it installed, you also have the "Node Package Manager", which makes it as easy as "npm install _____" to install any module

22:00 < dook> When I'm looking for any functionality at all, I search for it there first, and look for the best maintained modules: https://npmjs.org/

22:01 < skidz> yeah... been learning that the last couple days...

22:01 < dook> Sorry you had to struggle through it, with proper guidance it can really be a breeze.

22:02 < skidz> actually didn't have to many issues at all :) one bug with npr install when referencing a git project.. but fixed that by setting a variable pointing to the right location of git... :)

22:03 < dook> Yeah, sometimes you have to hack a bit, there are definitely people who will post modules w/o documentation, or unfinished, but that's part of the nature of an ecosystem this active.

22:03 < dook> You have access to the polished ones, and all the rest

22:03 < dook> Looks like "mysql" is pretty popular, nearly 200 downloads in the last day: http://nodejs.org/

22:03 < dook> wrong link

22:03 < dook> https://npmjs.org/package/mysql

22:04 < dook> I assume you've done your first require() statement already?

22:05 < dook> Nm, you're a real programmer, you probably picked that stuff up quickly.

22:05 < skidz> very kewl.. thanks :) yeah.. I think the over all concept is very strong... and smart... in the past I have been working on Aurora-sim project which is a virtual work system set up to run in the second life viewer... all writen in c#... biggest problem we have had has been the http server not being able to keep up when several people connect...

22:05 < dook> That's precisely the type of thing node is good at.

22:06 < skidz> yeah.. mostly I been just editing the voxel hello world.. and server projects... playing with them... not really wrote anything yet :)

22:06 < dook> There's a great talk taht I really enjoyed when first getting into it, by the guy when he was first creating it, if you're getting your bearings it gives you several of the core essentials right away

22:07 < dook> http://www.youtube.com/watch?v=M-sc73Y-zQA

22:07 < skidz> oh? would be interesting in that

22:07 < skidz> thanks

22:07 < dook> Yeah it's a nice way to kick back and let some of the new concepts start making sense.

22:26 < dook> skidz: Looks like while we were talking about it, Mikolal created a voxel-chunk compressing module, perfect for your saving needs: https://npmjs.org/package/voxel-crunch

22:49 < skidz> thanks dook... just coming to the questions section on the video... great video.. very smart approach...

22:49 < dook> skidz: Glad you enjoyed it!

22:49 < dook> Now you just need to use a couple modules, then make even a simple module, and you'll be well on your way.

22:50 < skidz> :)

22:50 < dook> This tutorial actually goes from installing node to some of the more advanced concepts, a pretty dense overview of the key concepts: http://visionmedia.github.com/masteringnode/book.html

22:51 < dook> (Scroll down to "CommonJS Module System")

22:59 < dook> I'm heading to sleep, I wish you luck, and hope you enjoy what you learn!

@wolfeidau
Copy link

Awesome chat log, great to see such a welcoming and helpful team, o and that @maxogden guy is pretty helpful too :)

Keep up that vibe and you will take over the square block game universe!

@radvieira
Copy link

I agree. I like the technology, but it's the community that has really grabbed my attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment