Great write-up! I expected this to reference a few "normal" language features like static typing, operator overloading, or generics, but instead it was a list of some really neat off-the-beaten-track features: * Run regular code at compile time * Extend the language (AST templates and macros); this can be used to add a form of list comprehensions to the language! * Add your own optimizations to the compiler! * Bind (…
What is special about Nim?
21–30 of 88 posts
Re: What is special about Nim?
#22Earlier quoted context omitted.
Everything old is new again.
Care to flesh that out a bit?
Re: What is special about Nim?
#23Nice article. I was going through trying to follow the instructions and hit a couple of issues: -For "You should then add ~/.nimble/bin to your $PATH" it took me quite a while to figure I had to enter "ln -s ~/.nimble/bin/nimble /usr/local/bin/" in my Mac's terminal to do that. I guess experienced devs know that stuff but beginner here. -There's a bug in the client.nim and server.js code where the client refers to el…
Add a line to your ~/.profile
#add Nim-lang to path
export PATH=/Users/user/nim/nim-0.10.2/bin:$PATH
In the same terminal window, run 'source ~/.profile' to run the file and update the path. Creating a symbolic link like you did is fine as well.
Re: What is special about Nim?
#24Nice article. I was going through trying to follow the instructions and hit a couple of issues: -For "You should then add ~/.nimble/bin to your $PATH" it took me quite a while to figure I had to enter "ln -s ~/.nimble/bin/nimble /usr/local/bin/" in my Mac's terminal to do that. I guess experienced devs know that stuff but beginner here. -There's a bug in the client.nim and server.js code where the client refers to el…
Actually you should add "export PATH=$PATH:$HOME/.nimble/bin/" in ~/.profile, ~/.bashrc, ~/.zshrc or whatever your shell requires.
> -There's a bug in the client.nim and server.js code where the client refers to element "foo" but the server refers to element "item". Changing them both to foo got it to work.
Thanks, fixed.
Re: What is special about Nim?
#25Nice article. I was going through trying to follow the instructions and hit a couple of issues: -For "You should then add ~/.nimble/bin to your $PATH" it took me quite a while to figure I had to enter "ln -s ~/.nimble/bin/nimble /usr/local/bin/" in my Mac's terminal to do that. I guess experienced devs know that stuff but beginner here. -There's a bug in the client.nim and server.js code where the client refers to el…
export PATH = $PATH:~/.nimble/bin
instead of creating a symbolic link to /usr/local/bin. That way if you put a new binary in ~/.nimble/bin, i.e. if you have ~/.nimble/bin/foonim, it will work without you having to do ln -s ~/.nimble/bin/foonim /usr/local/bin/Re: What is special about Nim?
#26Re: What is special about Nim?
#27Earlier quoted context omitted.
That seems like a really bad idea. It means that searching for an identifier requires you to allow for the possibility that there might be any number of underscores inserted anywhere. I suppose in practice you'll rely on the fact that no one will be inserting them other than at word boundaries, but it still seems horrible. (I'd worry about ambiguities of the experts exchange / expert sex change type, too, but my gues…
Certainly, I would have some sort of lint to enforce naming conventions. I don't like it at all. Searching for a function becomes a nightmare.
Re: What is special about Nim?
#28Earlier quoted context omitted.
Certainly, I would have some sort of lint to enforce naming conventions. I don't like it at all. Searching for a function becomes a nightmare.
Is it not good enough to have specific grep tools? nimgrep for example, and there are procs for working with this IIRC.
Re: What is special about Nim?
#29Earlier quoted context omitted.
That seems like a really bad idea. It means that searching for an identifier requires you to allow for the possibility that there might be any number of underscores inserted anywhere. I suppose in practice you'll rely on the fact that no one will be inserting them other than at word boundaries, but it still seems horrible. (I'd worry about ambiguities of the experts exchange / expert sex change type, too, but my gues…
Certainly, I would have some sort of lint to enforce naming conventions. I don't like it at all. Searching for a function becomes a nightmare.
Re: What is special about Nim?
#30Could any Nim advocate demonstrate a simple program that:
less than 50 loc
shows the greatest strength (1 killing selling point is enough)