Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
Get HideMyAss! VPN, PC Mag's Top 10 VPNs of 2016 for 55% off for a Limited Time ×
Programming

Nim Programming Language Gaining Traction 520

An anonymous reader writes: Nim is a young, statically typed programming language that has been getting more attention recently. See these articles for an introduction: What is special about Nim?, What makes Nim practical? and How I Start: Nim. The language offers a syntax inspired by Python and Pascal, great performance and C interfacing, and powerful metaprogramming capabilities. The author of "Unix in Rust" just abandoned Rust in favor of Nim and some early-adopter companies are starting to use it as well.
This discussion has been archived. No new comments can be posted.

Nim Programming Language Gaining Traction

Comments Filter:
  • by stoolpigeon ( 454276 ) <bittercode@gmail> on Sunday February 15, 2015 @09:27AM (#49059355) Homepage Journal

    When that comes out - I'm buying it regardless of whether or not I actually need to learn or use the language.

    • by buchner.johannes ( 1139593 ) on Sunday February 15, 2015 @11:33AM (#49059971) Homepage Journal

      If I were to create a new language, I would not focus on creating the most beautiful syntax or the best built-in functionality. Instead, I would make damn sure it plays well with other languages and that it is trivial to use software packages already written. For example, R, Python, Java -- no one wants to recode the packages (machine learning algorithms, MPI, web automatisation) in yet another language.

      • Re:The Secret of Nim (Score:5, Interesting)

        by IamTheRealMike ( 537420 ) on Sunday February 15, 2015 @01:43PM (#49060625)

        If I were to create a new language, I would not focus on creating the most beautiful syntax or the best built-in functionality. Instead, I would make damn sure it plays well with other languages and that it is trivial to use software packages already written.

        Nim looks syntactically a little bit like Kotlin [kotlinlang.org], which compiles to either JVM bytecode or JavaScript. If you compile to the JVM then you can not only use libraries written in Java, but also JavaScript, Python 2.x (via Jython), Ruby, Scala, C (via JNA), there's even a Haskell for the JVM called Frege.

        The really neat trick, though, is that despite looking not much like Java at all, it compiles down to code that is binary compatible with Java and there is a Java-to-Kotlin rewriting tool, meaning you can convert existing Java codebases one file at a time whilst still having a fully compilable project. Thus you can not only leverage existing codebases written in many languages, but also slowly convert legacy codebases too.

        Kotlin has some syntactic features that look similar to nim, like if being an expression not a statement, ranges, type inference, compile time inlining control, operator overloading, generics etc. Kotlin also has a a variety of features that focus on creating DSLs, but doesn't do it using a full blown macro system.

        Nim has some things Kotlin doesn't and vice versa. I can write a more complete comparison (based on reading the docs) if anyone is interested. But the reason I mention it, is Kotlin's focus on interop with existing code.

    • Holy Fuck (Score:3, Funny)

      by Anonymous Coward

      Yet Another Programming Language.

      Same shit, different syntax.

      And now, some HR idiot is looking for someone with 5 years experience in it.

  • by Anonymous Coward on Sunday February 15, 2015 @09:32AM (#49059385)

    A new fad sweeps through the kiddies every 3-5 years. I guess everyone wants to be one the crest of the new wave so they all rush out to learn the newest one, hoping maybe they'll get to write the book or teach a bootcamp, after it gets advertised on Slashdot of course.

    • by gbjbaanb ( 229885 ) on Sunday February 15, 2015 @09:50AM (#49059437)

      I find the ones who rush to use the new stuff are the ones who never quite managed to make anything with the old ones. The grass is always greener but also they can blame their lack of progress on the tools.. obviously *this* time it'll be different, just once they've had the right training and given enough time.....

      Its when I was offered a job to make a system cope with the customer's increased load that I realised how damaging this is - it was written in Erlang, Ruby and Scala.

    • Nim isn't a scripting language. It compiles to native binaries by default (with an intermediate conversion to C code) and doesn't depend on an interpreter or virtual machine at runtime.

  • by Anonymous Coward on Sunday February 15, 2015 @09:35AM (#49059393)

    I lurk on the Nim IRC channel sometimes. The toxicity there is unbelievable.

    Look at these recent IRC logs [nim-lang.org], for example.

    We see insults like:

    17:46:17 ldlework EXetoC: the problem is that you're just spouting weightless and thoughtless generalizations about how you can whimsically avoid BlaXpirit_'s problems with magical design

    19:08:33 ldlework Your justification is piss.

    19:10:07 Zuchto BlaXpirit_: because ldlework is being an ass to the person that, as far as I know, is doing just that

    20:14:47 Zuchto ldlework: still being an ass, I would say that that makes any high ground you try and claim about being a "good internet citizen" pretty much null and void.

    And there's lots of unnecessary sarcasm:

    19:54:14 ldlework "Nim supports generics and inheritance but if you want to do OOP programming, Fuck You, Nim is really a functional language because we arbitrarilly limit the language to mirror limitations in F# (which show up for compltely unrelated reasons than in Nim)

    Then there's lunacy and quasi-psychotic ranting and rambling:

    19:58:39 Triplefox I like the modules as they are
    19:58:51 ldlework Triplefox: we're not trying to change the module system per-say
    19:59:06 ldlework And, great as long as they're sufficient for you, we should all shut up
    19:59:19 BlaXpirit_ damn you're good at arguments
    19:59:19 ldlework Let us remember to run by all our shortcomings with Nim through Triplefox first
    19:59:47 ldlework BlaXpirit_: because the actual answer here is "Oh right, just wait until forward type declarations."
    19:59:58 Triplefox Uh, so you want to bully?
    20:00:17 ldlework If Araq had just said that instead of taking some high-brow self-contradicting position for which he can provide no direct argumentation against, then we both would have been satisfied long ago.
    20:00:26 ldlework Because that's all that needed to be said about this problem.
    20:02:57 ldlework Triplefox: Uh, so you just want to sqaush other people's conversations that have no effect or bearing on you by making a wierd obersvation that you don't suffer the same difficulty as others?
    20:02:59 ldlework What?
    20:03:56 Triplefox Your conversation consists of forcing someone to say they're wrong
    20:04:06 ldlework Nope
    20:04:08 ldlework There is a problem X
    20:04:14 ldlework there is a sufficient solution Y
    20:04:23 ldlework But Y is purportedly bad because X shouldn't be a problem at all
    20:04:31 ldlework so instead of providing a solution to X
    20:04:32 ldlework we say
    20:04:34 ldlework You're wrong.
    20:04:37 ldlework You're thinking wrong.
    20:04:40 ldlework You're a bad programmer.
    20:04:42 ldlework Read this article.
    20:04:56 ldlework If there was a solution as nice as Y, that we were missing, everyone here would have provided it.
    20:05:03 ldlework Instead of the hand waving and high-browing.
    20:05:37 Triplefox Except that you're getting a change already
    20:05:45 ldlework Triplefox: right, that was my point, that's Y
    20:05:55 ldlework But we just had to pointout how people who need Y are terrible programmers
    20:06:06 ldlework Because there is some hidden unspoken thing you could do instead of X that would alleviate it
    20:06:16 ldlework Just it seems no one can actually produce what that altnerative is
    20:06:38 ldlework So the discrepency between "Shutup and just write your software correctly" and the blinding abscence of a simple solution being reported into the channel, speaks volumes.
    20:07:25 BlaXpirit_ this happens every time on this channel
    20:07:30 ldlework Maybe next time we can just skip the bullshit
    20:07:33 ldlework and talk about the engineering
    20:07:37 Triplefox Well, did you actually present the problem that requires your solution in a way

    • by gnupun ( 752725 )

      Who cares? Do you want to use the language or chat with the community? Such people exist in most communities. AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.

      Nim = Python code + Turbo Pascal type declarations.

      • by OzPeter ( 195038 ) on Sunday February 15, 2015 @10:13AM (#49059555)

        Who cares? Do you want to use the language or chat with the community? Such people exist in most communities.

        The problem with the toxicity is this:

        19:04:02 Araq ldlework: I intend to "fix" it because I'm tired of arguing ... not because it's a particularly good idea

        If solutions are being based on emotion and not what is correct, or best, then the language development is well and truly fucked.

      • Re: (Score:3, Insightful)

        by drinkypoo ( 153816 )

        AFAIK only one person, the creator of Nim (formerly Nimrod), Araq, is in charge of making all the decisions. He has also implemented most of the language and libraries.

        That's an excellent reason not to even consider using it at this point. Unless your idea of a good time is maintaining a dead programming language, you should wait until it already has a community and a fork before you even touch it.

    • by OzPeter ( 195038 )

      I lurk on the Nim IRC channel sometimes. The toxicity there is unbelievable.

      Given that the language's name was initially Nimrod, I find those IRC logs quite apropos.

      • Is that because it was named after a great hunter, or because it was named after the leader of the people that built the Tower of Babel - leading to the multitude of languages? Or are you going the Bugs Bunny route?

        • by OzPeter ( 195038 )

          Is that because it was named after a great hunter, or because it was named after the leader of the people that built the Tower of Babel - leading to the multitude of languages? Or are you going the Bugs Bunny route?

          Because it has been a well known slur for a long time. Bugs' use of it only reflects society.

    • by caseih ( 160668 ) on Sunday February 15, 2015 @12:52PM (#49060335)

      IRC is just a bad medium for mature discussion to begin with (but forums suck in many other ways, so where does that leave us). The IRC channel for most *any* project is unnecessarily toxic. Just because Araq is on the IRC channel doesn't mean the whole project is polluted by the ramblings of one or two fans/hecklers/wannabe devs.

      My view of Nim from the web pages presented in the summary, and the online docs is very different from your IRC-centric view. I've personally been very impressed with the quality of the documentation, tutorials, and papers I've read so far. I don't think I've seen as friendly and readable documentation for any project in a long time. Perhaps quality will drop as Nim becomes more popular and people concentrate on developing. But for a project that has seemingly come out of nowhere, this really impressed me. Not only is Araq apparently a decent programmer, he's also a good writer too.

      Thank you to the submitter for submitting this. I had never heard of Nim before today. Adding it to my short list of very interesting new languages to follow.

  • After seeing that first link I was left wondering what other colors can be applied to the text windows.

  • It's kinda strange (Score:4, Informative)

    by invictusvoyd ( 3546069 ) on Sunday February 15, 2015 @09:56AM (#49059459)
    There's no Wikipedia page on this language. Just an external link in the disamb page.
    • It's not notable because it doesn't have its own wikipedia page - it doesn't have a wikipedia page because it's not notable.

      Every time Jimmy Wales begs for a donation I cite shit like this. Small minded editors with way too much time on their hands who delete stuff for the sake of their own egos.

      The people's encyclopedia it ain't.

    • by OzPeter ( 195038 )

      There's no Wikipedia page on this language. Just an external link in the disamb page.

      Well come on then you slacker, you could have created a new Wikipedia page in the same time that you wrote your comment here.

      On the other hand, it probably would have been reverted 5 minutes later for some obscure reason.

  • And now they have their own programming language?
  • Caveat Emptor (Score:5, Informative)

    by OzPeter ( 195038 ) on Sunday February 15, 2015 @10:08AM (#49059517)

    I was looking at the last link in TFS and in the comments to that link there was this little gem that should force you to take a large grain of salt before committing to a major Nim effort

    Nim High Priority Issues [github.com]

    Now, I am not familiar with how other, similar languages were at the same stage of development, but given things like this I would be putting Nim in the "Not ready for prime time YET" basket (which is also how I feel about Swift at the moment - there seems to be too many things in a state of flux right now)

  • So? (Score:5, Interesting)

    by QuoteMstr ( 55051 ) <dan.colascione@gmail.com> on Sunday February 15, 2015 @10:09AM (#49059523)
    Nim is just yet another statically-typed GC language with an unsafe escape hatch. I can get the same thing (and much better syntax) with Java and JNI or C# and P/Invoke. Yawn.

    Rust, on the other hand, is something genuinely new: it provides completely memory safety without a requiring a garbage collector at all. It's sad to seeing people switch from Rust to Nim: they're often too inexperienced to know what they're giving up, and I feel like they're seeking (syntactic) novelty, not a programming environment that's actually useful.
    • by gweihir ( 88907 )

      Rust sounds interesting. Got an overview-link?

    • Re:So? (Score:4, Informative)

      by silfen ( 3720385 ) on Sunday February 15, 2015 @12:08PM (#49060113)

      Rust, on the other hand, is something genuinely new: it provides completely memory safety without a requiring a garbage collector at all.

      The only way to provide memory safety in a language without a garbage collector is to severely limit semantics. So, either the Rust designers are ignorant or the language is severely limited. In the case of Rust, Rust makes trivial memory allocation, the kind other languages simply optimize quietly for you, unnecessary complex, while failing to work in complex scenarios.

      Rust is a badly designed language.

  • I mean, if everyone writes their program in their own little language then its pretty god damn frustrating for a rival to steal it from them unless they either want to learn that language or rewrite the whole thing.

    Ultimately, this might be the best copyright protection. Hard to steal what you can't understand.

  • The compiler for it is written in Swift. Pass it on!

    • Re:Psssssssst! (Score:4, Informative)

      by gnupun ( 752725 ) on Sunday February 15, 2015 @03:02PM (#49061073)

      What, why is this garbage modded up? The Nim compiler is written in Nim.

      Compiling the Nim compiler is quite straightforward. Because the Nim compiler itself is written in the Nim programming language the C source of an older version of the compiler are needed to bootstrap the latest version. The C sources are available in a separate repo here.

      https://github.com/Araq/Nim [github.com]

  • by zJe ( 206118 ) on Sunday February 15, 2015 @10:39AM (#49059681)

    Scoping by invisible characters is bad enough but modifying operator precedence by invisible characters? Why do people think that using spaces, the invisible character, as syntactically meaningful characters is a good idea? For readers of English the space is only important to separate meaningful bits and now we have a language that you will need to count spaces to determine operator precedence?!?! Of course it always cooler to use binary progressions so the operator precedence feature uses sequences of 1, 2 4, and 8 spaces. I can only hope that the language is a joke as per it's original name, nimrod.

    Maybe it would be useful if they dumped the space dependency, but after reading that I quit taking it seriously.

    • by hey! ( 33014 )

      Because nobody's ever managed to do anything useful in Python...

    • by jdeisenberg ( 37914 ) on Sunday February 15, 2015 @11:07AM (#49059833) Homepage
      Here's the direct link to the section of the manual, for those who, like me, couldn't believe this: http://nim-lang.org/manual.htm... [nim-lang.org] (see the section titled "Strong spaces") You have to explicitly say you want this experimental parser directive, but it's still a horrible anti-feature, as far as I'm concerned.
      • by matfud ( 464184 )

        The manual does not even hint at why the experimental strong spaces may be a good idea. As far as I can tell they are a way to confuse people.

        People do not learn arithmetic that way for a very good reason. You can't write it down reliably. I would claim that anything you cannot write down or write as plain HTML (as we are in the interweb era) is sort of broken.

      • by JanneM ( 7445 )

        " 1 + 3 * 4 is still parsed as 1 + (3 * 4), but 1+3 * 4 is parsed as (1+3) * 4"

        What. The. Fuck?

  • by blind biker ( 1066130 ) on Sunday February 15, 2015 @10:40AM (#49059691) Journal

    nim, like python, requires strict indentation. That's not comfortable for some people. I, for one, have nystagmus and find it practically impossible to code in python. I suspect I'd have the same issues with nim.

    • Re: (Score:2, Informative)

      by Shados ( 741919 )

      Lately, authors of new languages do it more for mental masturbation than to produce anything useful. And one of the things that get them off, is seeing how many tokens they can remove while still being able to parse it.

      Thats why so many new languages have python-like syntax.

  • The author of "Unix in Rust" just abandoned Rust in favor of Nim

    Somebody, who wrote a book an a language I've never heard of, has now switched to another new language. Whether he has an agile and flexible mind or simply is not particularly loyal to anything, I'm not impressed...

  • ...has been getting more attention recently...

    Well, if it is a new language, by definition any attention it gets, no matter how little, is "more attention".

    .

    When the comparison is against zero, it does not take too much to have a 100% improvement. :)

  • Nim is the only language that leverages automated proof technology to perform a disjoint check for your parallel code.

    That's a useless gimmick: it can't work in general and either fails or limits the kind of correct code you can write, you don't always want these kinds of checks, and it must take a significant amount of effort on their part to maintain it. The fact that they highlight this at the top of the page suggests to me that they aren't focusing on the right things and that the language may be in tr

  • It's Greenspun's 10th Rule applied to Python. Nothing here that hasn't been in Common Lisp for decades.
  • by bytesex ( 112972 ) on Sunday February 15, 2015 @04:30PM (#49061513) Homepage

    Looks like a readable python variant.

The star of riches is shining upon you.

Working...