Blockland Forums > General Discussion
OH MY GOSH IM LEARNING TO CODE
Aide33:
--- Quote from: Isaac Fox on September 08, 2012, 05:04:08 AM ---Why, why, why are my parents forcing me to learn Python?
I want to learn TorqueScript, dammit!
--- End quote ---
Python is a great language to get started on.
Once you get a hang of it the rest are easy.
Swat 3:
Only if my parents taught me how to code.....
Our County doesn't have any coding schools,
at all. :C
Lugnut:
--- Quote from: Swat 3 on September 08, 2012, 07:58:34 AM ---Lugnut should make a class for us.
--- End quote ---
um nothanks
--- Quote from: nerraD on September 08, 2012, 08:16:53 AM ---Don't even-
--- End quote ---
:(
--- Quote from: M on September 08, 2012, 05:31:53 AM ---Javascript is, obviously, used in browsers - though use outside the browser is picking up with Node.js and other embedded V8 environments (V8 being the Javascript engine used in Google Chrome).
--- End quote ---
i found this and couldn't figure out what it does
shyGriff:
i'm trying to learn torquescript and now i know the extremely basic stuff but idk what to do with it :/
M:
--- Quote from: Lugnut on September 08, 2012, 12:36:14 PM ---i found this and couldn't figure out what it does
--- End quote ---
It's Javascript with the browser APIs (DOM manipulation, browser interaction and such) cut out and replaced with APIs for stuff like HTTP serving, raw TCP/UDP sockets, file operations, etc. running under V8. (plus obviously support for accessing your own libraries written in C++ or JS)
I worked for a while on a wrapper that spawns a Blockland dedicated server as a child process and uses Node.js to provide access to its console output, and I also write utilities to make my college work easier using it since you can use the REPL library to make an interactive JS environment with your own code pre-loaded into it.
The API documentation has everything you'd need to get started, assuming you know JS syntax and the base objects and such. Notably the Net library for TCP sockets.
Running it on its own just provides an interactive Javascript session too, which is handy for stuff like testing code concepts/snippets. Running a file is just node aaa.js much like with any other script environment.