
Nim 0.13.0 has been released - andybak
http://nim-lang.org/news.html#Z2016-01-18-version-0-13-0-released
======
jboy
For anyone who's interested in learning more about Nim, here is Andreas Rumpf
(the creator of Nim)'s talk at the OSCON 2015 conference:
[https://www.youtube.com/watch?v=4rJEBs_Nnaw](https://www.youtube.com/watch?v=4rJEBs_Nnaw)
; and here's a longer, more-technical talk at the first Nim Workshop in
November 2015:
[https://www.youtube.com/watch?v=zb3Sqs7lNJo](https://www.youtube.com/watch?v=zb3Sqs7lNJo)

Here's the official Nim tutorial: [http://nim-
lang.org/docs/tut1.html](http://nim-lang.org/docs/tut1.html)

And here is the very approachable "Nim by Example", which offers a series of
short, simple lessons about the main Nim features: [https://nim-by-
example.github.io/](https://nim-by-example.github.io/)

~~~
dom96
Great links! Also be sure to get in touch with us if you get stuck. We're
usually pretty active on IRC [1] and the Nim Forum [2], but feel free to also
ask questions on Twitter [3], StackOverflow [4] or Reddit [5].

1 -
[http://webchat.freenode.net/?channels=nim](http://webchat.freenode.net/?channels=nim)

2 - [http://forum.nim-lang.org/](http://forum.nim-lang.org/)

3 - [http://twitter.com/nim_lang](http://twitter.com/nim_lang)

4 -
[http://stackoverflow.com/questions/tagged/nim](http://stackoverflow.com/questions/tagged/nim)

5 - [http://reddit.com/r/nim](http://reddit.com/r/nim)

------
KirinDave
Nim's approach to parallelism is, for the general industry, basically
groundbreaking and inspiring work.

I really wish that this language got more attention. It can fill many of the
same holes that Go fills without all the awkward dependency non-management and
bad error handling. Similar story for Rust, it's got a lot of similar benefits
without an ownership and extent model many people find confusing.

~~~
jksmith
Groundbreaking? How so?

~~~
KirinDave
While it's not amazing in academia, seeing static analysis of correctness for
concurrent and parallel code is unusual outside of things like Haskell
language extensions.

Check out what they're doing. It's quite unusual to see.

------
desireco42
This is really great little language. I really enjoy using it and executables
I get from it can be very small which brings smile to my face.

~~~
scardine
I like everything Andreas did differently from Python, except the unusual
normalization rules for variable names. This is crazy:

    
    
        VariableName == variable_name == VaRiAbLe_NaMe

~~~
keypusher
I brought it up recently in the #nim irc channel, trying to get a good
explanation. The creator still seemed to think it was a good idea, and I could
not convince him otherwise.

~~~
scardine
Yeah, I feel your pain. This is a deal breaker for me.

My OS of choice for the last 25 years has a case sensitive filesystem, all the
programming languages I learned (well, except PHP) are case sensitive, it is
too hard to unlearn.

BTW, PHP has weird case sensitivity rules. Case sensitive (both user defined
and PHP defined):

    
    
      * variables
      * constants
      * array keys
      * class properties
      * class constants
    

Case insensitive (both user defined and PHP defined)

    
    
      * functions
      * class constructors
      * class methods
      * keywords and constructs (if, else, null, foreach, echo etc.)

~~~
dom96
Why would you need to unlearn it? Simply write code as you would write it in a
case sensitive language.

~~~
scardine
I've been programming Python for a living for the last 8 years or so.

In Python there is a convention for naming classes with `CamelCase` and
instances with `snake_case`.

I could do that in a case insensitive language, but I can't do this in Nim
because it is not only case insensitive, it violates the "principle of least
astonishment" by normalizing variable names in a way that makes `FooBar`
equivalent to `foo_bar` or `F_o_O_b_A_r`.

If you can't see the trouble with this, I rest my case.

~~~
dom96
If I understand you correctly, the convention is basically the following,
right?

    
    
        class FooBar(): pass
      
        foo_bar = FooBar()
    

The equivalent in Nim:

    
    
        type FooBar = object
        
        var foo_bar = FooBar()
    

Compiles and runs perfectly fine.

How can this be the case? Well, the identifier equality rules in Nim have
changed a while back, to make the first letter of every identifier case
sensitive. So, FooBar == Foo_Bar == Foobar, but fooBar != Foo_Bar.

~~~
scardine
You are right. Nim is not case insensitive anymore, it is case sensitive for
the first letter. But in my defense, the last time I checked it used to be!
Quoting from the wayback machine:

> Nimrod is a style-insensitive language. This means that it is not case-
> sensitive and even underscores are ignored: type is a reserved word, and so
> is TYPE or T_Y_P_E. The idea behind this is that this allows programmers to
> use their own preferred spelling style and libraries written by different
> programmers cannot use incompatible conventions.

------
SeanDav
I will definitely be keeping an eye on Nim. That aside, does anyone else find
the fact that Nim treats "-1" differently to "\- 1" (quotes added for clarity)
a bit disconcerting?

~~~
klibertp
In Lisps, this:

    
    
        (- 1)
    

and this:

    
    
        (-1)
    

Are completely different things (the latter is actually an error). Also in
LiveScript

    
    
        ls> (- 2)
        [Function]
        ls> (-2)
        -2
    

Also in Smalltalk, this:

    
    
        -3. "=> -1"
        - 3. "=> Error!!!"
    

That's off the top of my head, I'm sure there are many other languages with
this characteristic. Why would that be a problem? It's just a single (or a
couple) parse rules to remember (but you get other benefits from it).

~~~
PeCaN
Perhaps most notably, Haskell has the same behavior as LiveScript.

EDIT: Derp, that's not true. (- 2) == (-2)

~~~
pklausler
To be clear: (- 2) is not a section in Haskell, it's effectively a numeric
literal because '-' is Haskell's only prefix operator. Haskell has a
'subtract' function that's defined in its Prelude that is used where a section
for (-) would be useful.

It's a minor wart, and probably never going to be fixed.

EDIT: clarified

------
elcapitan
I used to play around with it when it was still call "Nimrod" and it was quite
good fun. It's easy to learn and the examples were good. A c like language
that has a python like syntax was something I had hoped for for some time.

~~~
vram22
Why was the name changed from Nimrod to Nim? IMO Nimrod sounds better. Nim is
the name of a game:
[https://en.wikipedia.org/wiki/Nim](https://en.wikipedia.org/wiki/Nim) .

~~~
telotortium
Because in America, the name "Nimrod" is almost exclusively recognized as the
epithet applied by Bugs Bunny to the hapless hunter Elmer Fudd, so the name of
the language sounded risible to a lot of people:
[https://news.ycombinator.com/item?id=8351773](https://news.ycombinator.com/item?id=8351773)

~~~
chestnut-tree
Interesting. In the UK, the word Nimrod is recognised (if at all) as a piece
of classical music by the British composer Edward Elgar (from his work Enigma
Variations)

[https://www.youtube.com/watch?v=sUgoBb8m1eE](https://www.youtube.com/watch?v=sUgoBb8m1eE)

~~~
vram22
There were also RAF Nimrod planes, IIRC.

~~~
wycx
Named after the ship Nimrod, that was Shackelton's ship for his 1908 South
Pole attempt.

The Hawker Siddley Nimrods replaced the older Avro Shackeltons that were
ultimately derivatives of the Lancaster.

------
andrewchambers
I had a play with nim and it wasn't totally to my taste.

Another language that is worth checking out is myrddin
[http://eigenstate.org/myrddin/](http://eigenstate.org/myrddin/). If you
haven't heard of it before, I would describe it as C with generics, type
inference and pattern matching.

------
Mikeb85
This has always been a pretty cool project. While some have said Araq has a
case of NIH (probably true), I've found it very nice that Nim and the whole
ecosystem around it is as polished as it is. It also means there's a good
amount of example code out there.

~~~
rspeer
I enjoyed starting to learn about Nim, but the worst case of NIH is the forum.

There is good forum software out there. This thing that Araq wrote in his
spare time is not good forum software. It is outright painful to participate
in a discussion there.

~~~
dom96
As somebody who has written most of the Nim Forum, I'm really sad to hear
that. I appreciate good feedback though.

What would you say should be improved in the forum to make it less painful to
use?

~~~
rspeer
Ah, sorry that I assumed it was all Araq's doing. Here's my feedback:

I see no way to keep track of threads I've posted in, or threads I am
interested in, or get notifications when people reply. That would be the most
important thing. Maybe I'm missing something, because right now I read down
the list of subjects for threads I'm interested in, and look for whether the
most recent responder is different from who I remember.

Writing forum comments in ReStructuredText is not friendly. Anyone who is not
wise to the ways of the forum is going to fail the first time they try to post
code, and I still have to look up a ReStructuredText reference, because I
never use RST for anything else. Just use GitHub-flavored Markdown, the markup
language of least surprise for developers.

As another person responded, reading a thread longer than 10 messages is
unnecessarily awkward. The navigation buttons -- which must be used frequently
-- are not particularly prominent on a computer screen, and on a phone they're
like a millimeter in diameter.

Interface elements are strange. Why is someone's username a link if the page
behind it doesn't do anything useful such as list their posts? Why does the
timestamp have a dotted line under it? What am I supposed to be able to do
with the timestamp? I would expect from other places that it would be a
permalink, but it seems to just be nothing.

~~~
ilaksh
There is a syntax cheatsheet link under the text entry for forum posts.

Since its still not a huge forum, adding notifications would create a lot of
overhead and I'm not sure it is that much better than looking for your icon in
the threads and using the fact that threads are ordered by most recent posts.
At this point it seems unnecessary.

If you have ideas for improving it though you can make a PR:
[https://github.com/nim-lang/nimforum](https://github.com/nim-lang/nimforum) .
Best to discuss on the IRC channel with dom96 and them first though (or on the
forum).

I agree it would be nice if it loaded a little more than 10 at a time, but the
nav arrows aren't that bad for me.

~~~
rspeer
Remember how I said this software was an example of Not Invented Here? This
means that when you ask for my feedback and then switch the topic to the
classic open-source defense of "so fix it yourself", I'm even less likely than
usual to comply.

The Nim community's attempt to write a forum from scratch has left them with a
deficient forum, and I've explained some reasons why. I took your request for
feedback seriously, so you should take my feedback seriously.

~~~
ilaksh
I don't represent the other guys who actually built Nim and the forum, I only
played with Nim a little bit and am a fan. I feel like the forum is ok.
Notifications would be interesting to work on but I have two other projects
besides my day job and haven't had time to play with Nim for months. Not sure
where all the salt is coming from.

------
BuckRogers
I've investigated whether or not Nim could have Python2 compatibility mode. I
think Nim or any language's future could easily be secured by simply finding a
way to carry on compatibility with Python2. I've wanted to offer the libre
source community another path forward from CPython2.7.

Such a huge opening there for multiple parties. Unfortunately, in my research
in figuring out how to do this I found that it's actually fairly difficult to
provide CPython2 compatibility.

I do wish Nim the best and hope that it gains traction. More languages, more
choices are always better.

~~~
throwaway2048
I highly doubt any language would want the baggage of python 2 compat,
especially when the people interested by definition are going to oppose even
minor change.

------
patates
Great news! I wish they invested a bit more to the concepts though.

~~~
xena
How so?

~~~
egeozcan
concepts, as in "user defined type classes"

[http://forum.nim-lang.org/t/208](http://forum.nim-lang.org/t/208)

------
zyxley
The way macros and dot operators work in Nim is super neato. Lots of
interesting possibilities for DSLs and the like.

~~~
xena
One of the coolest i've seen in a while is Emerald:
[https://flyx.github.io/emerald/](https://flyx.github.io/emerald/)

------
flavoie
Do they have a clear roadmap to reach 1.0?

~~~
jonathonf
Linked at the bottom of the homepage: [https://github.com/nim-
lang/Nim/wiki/Roadmap](https://github.com/nim-lang/Nim/wiki/Roadmap)

------
fithisux
my only complaint with nim is that there exists Pascal code out there that
gets rotten and it is not possible to transpile it to nim.

Imagine Nim using LCL (Lazarus Component Library) or mseide code.

I think they should rethink it.

~~~
dom96
Maybe this could help? [https://github.com/nim-
lang/pas2nim](https://github.com/nim-lang/pas2nim)

The Nim compiler was originally written in Pascal and Araq used this tool to
translate it into Nim, so it should work pretty well.

