back to article Imagine Python fan fiction written in C, read with a Lisp: Code lingo Nim gets cash injection

Status.im, the makers of the Status mobile Ethereum client app, has allied with the team developing the Nim programming language, promising funding to support at least two full-time developers. The arrangement follows the launch last week of a research project called Nimbus to develop a Nim-based sharding client for Ethereum, …

  1. Notas Badoff Silver badge

    Shattering news

    "... to develop a Nim-based sharding client for Ethereum, said to be the second most valuable cryptocurrency after Bitcoin."

    So will this then be compatible with the rest of Ethereum, or is this a fork? Destined to be called Ethereim?

  2. Detective Emil
    Meh

    Indentation-significant syntax

    Lost me there.

    1. Sitaram Chamarty

      Re: Indentation-significant syntax

      Totally. I can read python but I can never *write* it. Trauma from RPG/400 back in the 90s I guess.

    2. Michael Wojcik Silver badge

      Re: Indentation-significant syntax

      I have mixed feelings about indentation for structure, but I can live with it.

      I find other things to dislike about Nim's syntax. In particular, the developers are in love with obscure and non-intuitive symbols and constructs. Why use "*" as a suffix to mean "exported" (which is apparently equivalent to "public")? The dire character shortage has ended; we can now use actual words in our code. And the embedded linker directives in one of their examples:

      {.passL: "-lsfml-graphics -lsfml-system".}

      Besides being obviously non-portable, that's ... well, simply vile.

      It's nice Nim can compile to C or Javascript. It's nice that it offers a variety of GCs with different performance characteristics. It's kind of nice that it has macros, though that's a double-edged sword too; you really want to rein in your developers on that one. But this is not a language I find appealing.

  3. David Given
    Unhappy

    Interesting but ugly

    I played with it a while back, while I was trying to evaluate compiles-to-machine-code languages which weren't Go. Nim's interesting; it's got a number of nice features, like having compile-time functions which have access to the AST, allowing really easy code generation (and hygienic macros).

    But I couldn't make myself like it. I find the combination of Python-style significant whitespace _and_ C++ style bugsplatter punctuation nearly unbearable; and there are some mad, mad, mad design decisions --- the identifiers FOO_BAR and fooBar are equivalent...

    1. oldtaku
      Facepalm

      Re: Interesting but ugly

      > the identifiers FOO_BAR and fooBar are equivalent...

      (((φ(◎ロ◎;)φ)))

    2. MacroRodent Silver badge

      Re: Interesting but ugly

      the identifiers FOO_BAR and fooBar are equivalent...

      Sounds like PL/M, which is also case-insensitive, and where you can insert extra $-characters anywhere in identifiers and numeric literals without affecting meaning (FOO$BAR == fooBar). I have never understood why. $ is not a terribly good noise character for making identifiers more readable, because it looks so much like a letter.

    3. dom96

      Re: Interesting but ugly

      It amazes me how much people are resistant to change. During your time writing Nim have you ever ran into any issues due to these "mad, mad, mad design decisions?"

      If you have not used Nim enough to get a feel for this feature- yep, it's a feature, then please develop an application in it, and if it's still a problem for you then come to our issue tracker[1] or forum[2] and explain how it caused you pain. Style insensitivity has been adopted for a number of reasons[3], is it strange? yes, but it does what it's supposed to and it's never caused me any pain.

      1 - https://github.com/nim-lang/Nim/issues

      2 - https://forum.nim-lang.org

      3 - https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-is-it-caseunderscore-insensitive

      1. Stevie Silver badge

        Re: Interesting but ugly

        Ah, but it doesn't look like C, so you won't be luring any scared horses into using nim for a fair evaluation.

        IT is peopled by the most reactionary bunch these days.

      2. GrumpenKraut Silver badge
        Thumb Down

        Re: Interesting but ugly

        From

        3 - https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-is-it-caseunderscore-insensitive

        "Case insensitivity is widely considered to be more user friendly. This holds for file systems, ..."

        Frankly, this is bollox. The rest of the arguments ranges from weak to silly as well.

        The advice/opinions "why unsigned ints are bad" is misleaded at best.

        I'll stop there. Not tempted.

        1. fedoraman

          Re: Interesting but ugly

          Indeed. Saying that case insensitivity is good because Pascal, Ada, FORTRAN and Basic have is, well, a bit of a weak argument.

          1. Ken Hagan Gold badge

            Re: Interesting but ugly

            "Saying that case insensitivity is good because Pascal, Ada, FORTRAN and Basic have is, well, a bit of a weak argument."

            Editing "Lisp" and "Eiffel" out of the list is a bit of a weak counter-argument. It looks like you feel the argument would have been stronger with them in, so you took them out in order to mis-represent the other guy's case.

        2. Ken Hagan Gold badge

          Re: Interesting but ugly

          "Case insensitivity is widely considered to be more user friendly. This holds for file systems, ..."

          This is not bollox. Most people find case-sensitivity to be perverse and annoying. Spoken language is not case-sensitive. Most human writing systems don't even have the notion of case, so the concept is already alien to the majority of your user-base.

          I suspect that the real issue here is that case-sensitivity is associated with UNIX and is therefore pure and good, whereas case-insensitivity is associated with Windows and must therefore be evil ... somehow.

          1. stephanh Silver badge

            Re: Interesting but ugly

            Case-insensivity was a necessity in a time when many systems where UPPER CASE ONLY, so for interop reasons you either had to KEEP SHOUTING or settle on a case-insensitive system.

            That's the reason many "old" languages (Lisp, Pascal) did it.

            Everybody sane tries to spell identifiers with consistent capitalization anyway, since otherwise code becomes a complete mess. Given that, case-insensitivity bears no practical advantages anymore.

            In a Unicode world, correct case normalization is incredibly complicated and language dependent, see https://www.w3.org/International/wiki/Case_folding for an overview of some issues. For extra fun, the case folding rules are updated with each Unicode version so make sure to keep your software up-to-date.

            1. Ken Hagan Gold badge

              Re: Interesting but ugly

              "Everybody sane tries to spell identifiers with consistent capitalization anyway"

              Consistent with what, exactly. Certainly not "everybody else".

              UNIX consistently spells usernames all-lower-case, despite the fact that US culture (where it grew up) does not spell people's names that way. Some email systems are then case-sensitive and others are case-insensitive, and where an email address is used as a user handle there isn't even an RFC to point to for the right answer. The result is that you just have to know whether the system you are talking to wants:

              your.name@example.com

              Your.Name@Example.com

              Your.Name@example.com

              or perhaps something else entirely.

              You guys need to get out and talk to real users. A computer that rejects input because you didn't exactly replicate the case that it had in its little head is a "*&%ing stoopid computer written by a £$%-ing nerd who throws a hissy fit if he has a prime number of baked beans on his toast".

              And as with addresses, so with files and so with variable names, because the underlying reference model for all of these is "names as they are written in normal language".

          2. GIRZiM

            Re: Spoken language is not case-sensitive

            Actually, spoken language not only makes use of ALL CAPS, SO THAT EVERYONE AT THE BACK CAN HEAR, but it also uses italics when it absolutely, positively has to ensure the listener understands the seriousness of the matter and bold, when it needs to differentiate between positively and negatively emphasised words.

            It's a complex thing, natural language, and doesn't really lend itself well to direct comparison with limited-scope artificial languages that are really barely more than a patois, creole or (in some instances) pidgin.

      3. Michael Wojcik Silver badge

        Re: Interesting but ugly

        https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ#why-is-it-caseunderscore-insensitive

        Well, this gets my vote for Unconvincing Argument of the Day. "Case insensitivity is widely considered to be more user friendly"? Wave any harder and you'll break your wrist.

    4. Ken Hagan Gold badge

      Re: Interesting but ugly

      "the identifiers FOO_BAR and fooBar are equivalent"

      Does this mean the language is screen-reader-friendly?

  4. cookieMonster

    Have a pint

    For the Monty Python reference.

  5. John Smith 19 Gold badge
    FAIL

    It's 2018 and case *is* significant

    Are you f**king kidding me?

    By all means use case to differentiate words in a variable name (Camelcase) but don't make it actually meaningful. One of C's strengths is the "Constants are UC" convention, not rule.

    It's clear this is designed to be supported by an IDE which automatically enforces smart indenting (or even a "folding" editor, which is how Occam did it).

  6. Charlie Clark Silver badge

    While advantageous for security, this particular architecture limits scalability.

    With security you mean some vague game-theory based hope that the others in the game won't collude to alter the blockchain.

  7. HmmmYes Silver badge

    Nim.

    Another attempt at avoiding the issue - javascript is shit.

    Some solutions:

    - Fix the fucked up bits of java script. Stuff like Typescript are a convoluted way of doing that. But looking at the many versions as it stumbles around generating work for the MS typescript team, is very unappealing to me.

    - Drop Type script and use C, stripped Python .. anything but really that is not too complex.

    - Standardise WebASM so it does nt matter hat language you use.

  8. Voyna i Mor Silver badge

    "because it combines the speed of C, the readability of Python, and the extensibility of Lisp."

    Is that supposed to be a positive assessment? I'm not sure. Lisp's extensibility can be a curse, wars can be fought over Python's readability, and the speed of C only really works if you are already a good enough programmer to know what's fast and what isn't.

    1. horse of a different color
      Coat

      (untitled)

      Perl, by comparison, combines the speed of Python, the readability of Lisp and the extensibility of C...

      1. JLV Silver badge

        Re: (untitled)

        >PERL... readability of LISP

        Hey!

        with my dyslexic take on nested parenthesis and brackets I’d never thought I’d defend LISPs legibility

        Seriously, and that counts for Ruby to a lesser extent: a general programming language is _not_ a shell and needs not adopt BASH’s very useful (in a shell) array of special symbols and variables.

        Re nim casing I wonder if it’s motivated partially by JS/HTML naming considerations. Vue.js or example may have you define <foo-bar> tag in html, but the matching JS has to refer to it as FooBar. Still, seems ugly.

        Re casing and “modern languages don’t need stinking case sensitivity”. They may not, but mangled up casing in source code will be a mess to read and unpleasant/less precise to grep/sed against.

  9. Rich 2

    Why?

    What is the obsession with creating a new programming languages? Surely there are enough of them around by now for at least one of them to be suitable for a particular application?

    1. fedoraman
      Facepalm

      Re: Why?

      I dunno. Its just a thing. Like carving your initials on the great edifice of Comp Sci. Who cares if it gets dropped in a year, in favour of the Next Big Thing?

    2. JLV Silver badge

      Re: Why (after all, we already know everything)?

      https://hsm.stackexchange.com/questions/2129/who-said-that-essentially-everything-in-theoretical-physics-had-already-been-dis

      >It appears that the source of this anecdote is Max Planck himself. In a 1924 lecture, he told the story as follows:

      >> When I began my physical studies [in Munich in 1874] and sought advice from my venerable teacher Philipp von Jolly...he portrayed to me physics as a highly developed, almost fully matured science...Possibly in one or another nook there would perhaps be a dust particle or a small bubble to be examined and classified, but the system as a whole stood there fairly secured, and theoretical physics approached visibly that degree of perfection which, for example, geometry has had already for centuries.

  10. disgruntled yank Silver badge

    Greatest contribution

    Who was the fellow that said that his greatest contribution to computing was in not inventing another programming language? I recall Knuth quoting the man in an interview.

    1. Anonymous Coward
      Anonymous Coward

      Re: Greatest contribution

      "I recall Knuth quoting the man in an interview."

      Was that after he asked who the interviewer was and how did they get in his house?

  11. fedoraman
    Joke

    Wrong order

    I think that should read "It combines the readability of Lisp, with the speed of Python and the extensibility of C"

  12. ForthIsNotDead Silver badge
    Stop

    Why?

    Instead of learning yet another fucking language that compiles to C or Javascript (WTF?), why not, er, just learn *those* languages in the first place?

    Is it me?

    1. Voyna i Mor Silver badge

      Re: Why? - Is it me?

      It is you.

      Seriously, but cynically, if you learn C, Java, Javascript, C++ or whatever you are going to encounter people who know them in infinitely greater depth than you do. Whereas if you kind-of know the latest and greatest, your chance of running up against someone who knows a lot more is much lower.

      So, when the job advert put out by clueless HR says "10 years Nim required" you might be the only candidate. (You don't tell them it hasn't been around for 10 years. Java was like that once.) And since the job is there because someone decided Nim was cool, decided to do a job in it, got stuck and buggered off, your chance of success is relatively high. Get your feet under the table, ask loudly "who wrote this pile of steaming excrement?", tell the boss Nim was unsuitable and do the job in a language you know. Reputation made.

      1. ForthIsNotDead Silver badge
        Pint

        Re: Why? - Is it me?

        You sir, are a genius. Have a beer on me in lieu of my newly minted, and extremely lucrative career as a 'nim expert'.

        beer --->

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019