Rust for Node developers
github.com
github.com
Here is my much shorter version of basically the same thing with a different language:
Nim for Node.js Programmers
I love Node.js programming, especially because of the massive ecosystem of modules available, but Nim has some advantages in many cases. Here are three: it uses very little memory, creates code that is very fast, and interfaces extremely easily with C and C++.
### Node.js
How to set up Node
Since you are a Node programmer, you already have it set up.
const fs = require('fs');
fs.readFile('hello.txt', 'utf8', (err, data) => {
if (err) {
console.error('Problem reading file:', err);
} else {
console.log(data);
}
});
How to set up an editor/IDESince you are a programmer, you already set it up.
### Nim
Install Nim -- thoroughly explained here: http://nim-lang.org/download.html
Enter into readfile.nim:
try:
echo readFile("hello.txt")
except:
echo "Problem reading file."
Run command 'nim c readfile.nim' then './readfile'### Package Management in Nim
The `nimble` command handles packages in Nim. Please read the excellent and thorough documentation here: https://github.com/nim-lang/nimble
For more information, see the great documentation at http://nim-lang.org/documentation.html, the new book Nim in Action, https://www.manning.com/books/nim-in-action, or many other resources online such as those listed here: http://nim-lang.org/learn.html