back to article We are the Knights who code Ni!

A Venn diagram describing the overlapping populations of Monty Python admirers and software developers would probably show a very large intersection between the two groups. But that's not the only reason software development and motor boat enthusiast Göran Krampe has announced a new programming language called “Ni”. The …

  1. Anonymous Coward

    Do your worst

    Is this a two-level language?

    1. Anonymous Coward
      Anonymous Coward

      Re: Do your worst

      With a little path running down the middle

    2. amanfromMars 1 Silver badge

      Re: Do your worst

      Is this a two-level language? ... Big John

      Methinks the opportunity is that such a language is both executive top tier and pornographic bottom drawer, Big John. Although it is most probably only best used by a select and/or well chosen few.

      Ni, or a certain root and overarching branch of it, would appear to be well suited and booted to further proactions and spooky reaction in Quantum Communications Control Systems where Creative Cyberspace Command and Control of Computers and Communications is AI@ITsWork and where nothing is as it initially seems, and something completely different, again and again, from what may be subsequently imagined, and therefore revealed and regarded as a being quite alien in nature within traditional established hierarchical circles/SCADA Command Bases and ControlLed Structures.

      How very encouraging.

      1. g e

        It is now NO LONGER the language called Ni

        It is now called Ecky Ecky Ecky Fhtagn ....

        Pint to whomever can spell the last 'word' of that. Pint to me for getting a Cthulu reference into it.

        1. Steve Evans

          Re: It is now NO LONGER the language called Ni


        2. Anonymous Coward

          Re: It is now NO LONGER the language called Ni

          From the script:

          Knight of Ni: We are now the Knights who say "Ekky-ekky-ekky-ekky-z'Bang, zoom-Boing, z'nourrrwringmm".

          I think your spelling better reflects what they actually said, so here's a pint for you!

  2. Geoffrey W

    Gawd 'elp us all! A room full of sociopaths surrounded by shrubberies and herrings shouting "NI" at each other. Touch my black Dalek action figure for luck and pray it never comes to pass...although...actually...hmmmmm...

    1. Preston Munchensonton

      So long as they aren't shouting it....Oh no, now I said it!

  3. Anonymous Coward
    Anonymous Coward

    And there I went and shaved my neck today. I need to see more of Ni.* Very much reminds me of things I was "toying with" in the mid-eighties. Heady days. Hawaii, Maui wowee, Amiga, ....

    * I need to take my spellchecker and put a stake through its black heart. Kept transposing Ni to Nintendo!

  4. This post has been deleted by its author

  5. Locky

    We don't want this

    We want....

    a shrubbery

    1. Graham Marsden
      Thumb Up

      Re: We don't want this

      [Grams: Dramatic Chord]

    2. Alister

      Re: We don't want this

      Alas, even those who arrange and design shrubberies are under considerable economic stress at this period in history!

  6. Jim 59

    Up next: programming in Polari

    1. Charlie Clark Silver badge
      Thumb Up

      Ain't he bold!

      Go on then, let's have a varda at it.

      1. Naselus

        ...and the sign said 'The Bona Software Company'.

  7. Nick Ryan Silver badge

    Splendid. Took me a minute to figure out what was going on there as dynamically generated / self modifying code algorithms are never particularly easy to read. This is particularly true when you're used to procedural code and know the pain of working professionally with dynamically generated code (e.g. often found in JavaScript) all too well.

    On an aside, why do so many new language designers manage to make their syntax only barely more legible than INTERCAL? (and never as polite)

    1. Michael Wojcik Silver badge

      I found it quite readable, actually. Mileage will, of course, vary. It's not how I'd design a language myself - I prefer more-verbose languages, because with expressive languages and fast interactive development systems the economics favor reading comprehension over saving characters when writing - but it's not terrible, in my opinion.

      I do wish Krampe would learn how apostrophes are conventionally used in English, though, or quit using contractions. Reading his blog is a bit annoying.

      1. Anonymous Coward
        Anonymous Coward

        Can you elaborate on that last part? I don't want to be annoying :)

        1. Anonymous Coward
          Anonymous Coward

          Ok, I actually fixed the article a bit. Sorry for my "its", I think I fixed them :)

    2. Anonymous Coward
      Anonymous Coward

      Syntax is quite ok I think

      The syntax of Ni is actually very free form and basically copied from Rebol and then I added some Smalltalk style - so for a Smalltalker its very legible. Also, the syntax goes hand in hand with homoiconicity - so its bound to be different from "conventional" languages.

      Göran Krampe

    3. Frumious Bandersnatch

      barely more legible than INTERCAL? (and never as polite)

      But of course INTERCAL will throw a fit if you're too polite, too.

  8. Anonymous Coward
    Anonymous Coward

    The intention to make something useful is, The Reg presumes, the reason the language's syntax does not include ““Ecky-ecky-ecky-ecky-pikang-zoop-boing-goodem-zoo-owli-zhiv”

    ... that wouild be in Ni++ - for programmers who formerly coded in Ni

  9. Sgt_Oddball

    Wait a second....

    Shame it hasn't got object manipulation in yet...

    For those who like their herrings to interact with trees.

    Oh and can it handle 'it'? Or does that make it throw an error?

  10. David Harper 1

    Paging John McCarthy

    You can do this in LISP. You could do this in LISP in 1958. And with more style.

    1. Michael Wojcik Silver badge

      Re: Paging John McCarthy

      That's either wrong or vapid - take your pick.

      Wrong because Ni, like its predecessors (Rebol, etc) has syntactic sugar for things LISP doesn't accommodate directly. Common LISP doesn't have syntactic support for infix expressions, for example. The S-expression representation used by LISP doesn't have Ni's flexibility in selecting items from the (conceptual) stack. Ni blocks, like Rebol blocks, have an internal cursor; S-expressions don't. And so on.

      Vapid because all Turing-complete programming languages are equivalent, in the sense of being able to express the same set of computable functions. And as Kolmogorov demonstrated, they're not only equivalent, but equivalent in program size except for a constant that is small relative to the average size of a non-trivial program.

      "My old language is better than your new language" is a favorite curmudgeonly refrain (particularly among LISP enthusiasts), and as a curmudgeon myself I have some sympathy for it. But all too often it's an excuse for an anti-intellectual refusal to understand what actually is happening in programming-language design.

      1. Anonymous Coward
        Anonymous Coward

        Re: Paging John McCarthy

        Thanks Michael, that was ... very insightful and well put. I am an old Smalltaker and love Smalltalk - but I am also old enough to know that, hey, stuff can always be improved. And Alan Kay was frustrated that Smalltalk stopped evolving. This is at least an attempt to try breaking new ground.

  11. John H Woods Silver badge

    I don't quite understand ...

    ... what advantages it has to Smalltalk. Anyone care to explain?

    1. Hans Neeson-Bumpsadese Silver badge

      Re: I don't quite understand ...

      At the risk of sounding cynical, the "advantage" that it has is that it isn't Smalltalk - it's a new language. There seems to be a bit of an obsession these days with creating new languages, frameworks, etc. and declaring their awesomeness, rather than just concentrating on doing awesome things with the amazingly powerful languages and frameworks already in existence.

      I don't mind evolution and invention, but these days I get the feeling that more effort goes into building the tools than goes into using them.

      (and yes, I am a grumpy, jaded old man)

      1. Michael Wojcik Silver badge

        Re: I don't quite understand ...

        At the risk of sounding cynical

        Nothing wrong with sounding cynical. Sounding like you couldn't be bothered to look at the language before pissing all over it, on the other hand, is ... well, par for the course, I suppose.

        1. Frumious Bandersnatch

          Re: I don't quite understand ...

          Sounding like you couldn't be bothered to look at the language ...

          I generally like your rants, Michael, but seriously, what's with the ad hominem? The OP is clearly making a general point about new languages (not this one) and makes no bones about the fact that he's possibly being cynical and a curmudgeon (something you yourself mentioned in your OP).

          So have an upvote for your original post, and a thumbs down for that one :(

          1. Michael Wojcik Silver badge

            Re: I don't quite understand ...

            I generally like your rants, Michael, but seriously, what's with the ad hominem?

            I have to disagree - it's not an ad hominem, because I didn't impugn my interlocutor's character, much less base any argument on it.

            I meant exactly what I said: if your argument sounds like you haven't bothered to look at the thing you're critiquing, then that makes your argument weak. And "a general point about new languages" is precisely the sort of gloss that - by making no association specific to the object at hand - sounds that way.

            If I were to write "every post to the Reg forums is terrible, so this one probably is too", I'd be committing the same error.

            The underlying problem is that a post of the form "new instances of X are usually crap" doesn't tell us anything useful about the specific nature of this particular Xi. And unless it's supported by something more substantial (say, a reference to a methodologically-sound study showing that a large fraction of new X, historically, have been crap), it doesn't tell us anything useful.

            And it's not like I told the OP to jump off a bridge or anything. But, hey, it's not a big deal in any case.

      2. Anonymous Coward
        Anonymous Coward

        Re: I don't quite understand ...

        I am doing awesome things with stuff already in existence. :) We work with Smalltalk and our product is a virtual world system for business use. However we also now use Nim, a very powerful new-ish language.

        Ni started as a private itch. Now it has reached a point like "Oh, hey, this actually... is kinda neat". Will it ever reach the next level? Dunno. But its fun!

        And oh, you did start out quite well there - one advantage is indeed that its a new and fresh start. There have been numerous Smalltalks over the years, but they almost always end up as 95% clones of Smalltalk-80. I want to try to make it different. Advantages over Smalltalk is also very hard to describe unless you refer to a specific implementation of Smalltalk.

        But generally Ni is homoiconic and is able to do meta programming on the AST level. Smalltalk can also do such things, but not as natural. Smalltalk is also class based and quite a beast of a language. Ni is very small by design. And then yeah, Ni is meant to work with Nim.

    2. Michael Wojcik Silver badge

      Re: I don't quite understand ...

      Krampe mentions some in his blog post:

      - Improved syntax for ordered collections and dictionaries, which Krampe claims make up the vast majority of collections in Smalltalk programs.

      - Function parameters are not declared; they're pulled from a conceptual stack by an operation. That means a function's arity is determined only at runtime (all functions are variadic).

      - Via Nim, it integrates easily with C, which means it integrates easily with a lot of legacy code.

      - It has built-in support for native threads and parallel code.

      I'm certainly not a Smalltalk expert, or a Ni expert for that matter, but those are some of the things Krampe is claiming.

      1. John H Woods Silver badge

        Re: I don't quite understand ...

        Yes, I read the blog post. I'm certainly not a Smalltalk expert either (I was, once upon a time); my view is that:

        As for improved syntax, I'm sorry but I don't see persuasive examples here. Smalltalk doesn't have any syntax apart from three reserved words, some delimiters and a particular form of message passing. There is certainly no syntax for handling dictionaries or other collections, you just send them messages. If you don't like the standard messages, you can use different ones. Is it that you don't like the way messages are passed?

        I'm not sure what the advantage with not declaring a functions parameters is. If you want a function with variable arity, aren't you just passing it a collection of parameters? (Or, even better, invoking a function implemented by a particular class of collection?)

        Every variety of Smalltalk I have used integrates easily with C.

        Smalltalk supports parallel code but support for native threads is interesting - however, the lack of this in most Smalltalks is an issue of the Virtual Machine, rather than the language.

        I'm not dismissing potential improvements here - I'm extremely interested. In particular I may have misunderstood the issue concerning functions. I would concur that many Smalltalks have ended up 95% like ST-80 but I think there is a good reason for that; it is, in my opinion, nearly perfect. I also think though, that in agreeing that all Smalltalks are very nearly ST-80, you have somewhat undermined your argument that it is difficult to compare its advantages to Smalltalk in general, rather than a specific implementation. If that is true, it suggests to me that your real advances are primarily in the interpretation of bytecodes (i.e. VM work) rather than in language design.

        1. Anonymous Coward
          Anonymous Coward

          Re: I don't quite understand ...

          First of all, note that the article doesn't show all of Ni - nor is Ni in any way near a reasonable version. I did raise it to version 0.1 yesterday though. Secondly, I *am* a Smalltalk expert and love Smalltalk. :)

          Smalltalk does have syntax, yes, its a minimalistic language - but it does have more syntax than Ni has. And yes 5 reserved words of which all are pseudo variables, but you also have cascades, statement separators, assignments and more. But the passage about syntax is about literal syntax for OrderedCollections and Dictionaries primarily. Smalltalk has literal syntax for arrays, no literal syntax for Dictionaries. Squeak added an extra literal syntax for arrays that can take expressions, but that is not standard Smalltalk-80. Either way, no, Smalltalk is quite weak when it comes to *literal* syntax.

          I love keyword messaging syntax, that is why I deviated a bit from Rebol in order to be able to fit it into Ni. The part on not declaring function parameters, that is more of an experiment in Ni - it makes blocks even shorter, and it also enables blocks to dynamically decide how many arguments to pull in, and in which order. Note also that funcs in Ni can act as "infix operators" without being attached to a receiver as a behavior. In that way funcs are functions, not methods. But we will see how it plays out. The two major reasons for argwords is a) I didn't like Rebols way of declaring args and b) I want Ni to be homoiconic and that gets messy with a declaration section first inside a block.

          Note that Ni has some things that enables it to do things Smalltalk can not easily do. The trivial first example with modifying a block and then run it - is actaully not something Smalltalk can do at all. Ni also supports "quoting" so that functions can operate on the AST nodes of the arguments, instead of the evaluated result of the arguments. This is something I have yet not explored, but its in there and that is actually how assignment is implemented! Assignment is just a function call in Ni. In Smalltalk its built into the language grammar.

          Regarding integration with C - no, most Smalltalks are pretty weak on that. Sure, they can call dlls etc via FFI, but its not the same as being good at it, far from it. And C++ is basically a complete NO GO. Smalltalk/X is probably the strongest in this area.

          Yes, almost all Smalltalks use green threads, and yes, its of course an implementation issue. But that doesn't make it less of a problem.

          Regarding Smalltalk being perfect. No it isn't. Its VERY good, but its not perfect. Its my language of choice since 1994, but no, its not perfect. As I said, Alan Kay himself was quite annoyed with the Smalltalk community from not moving forward. He was also not happy with the meta class model, and personally I think Self has a much more interesting model. Lately we got Traits, and now Pharo is adding some new language level things, but it has stood basically still for a long time.

          Finally, no, the Ni interpreter itself is a toy compared to a high end JIT VM like Cog by Eliot Miranda. That's not what Ni is about, I want to keep it very simple. No, Ni is about exploring new ideas in the realm of a Smalltalk-like language. Ni code can be made to be very similar to Smalltalk (if libraries are designed in that direction) and the feeling of development can be similar, and hopefully even more live and fluid.

          Also, finally, note that this is an experimental language which evolves in an explorative fashion. I have no idea if its going to become great, medium or plainly suck. But its fun and its interesting! :)

          Thanks for your feedback, I am normally on IRC if you want to discuss more.

          regards, Göran

          1. John H Woods Silver badge

            Re: I don't quite understand ...

            @gokr, thank you very much for your detailed response -- I will look for you on IRC

  12. Anonymous Coward
    Anonymous Coward

    <figure class=... - has someone had an HTML accident?

  13. Eponymous Cowherd

    I sneeze in your general direction

    class Arthur: public Hamster, public Elderberries


    1. Arthur the cat Silver badge

      Re: I sneeze in your general direction

      It wasn't "sneeze" as I recall.

      You have to know these things if you're a king^W cat.

      1. Eponymous Cowherd

        Re: I sneeze in your general direction

        You are quite right. The eruption came from a somewhat lower region.

        And, to be perfectly accurate I should have inherited from the "Father" class which implemented the "IFragranceOfElderberries" interface.

  14. ravenviz Silver badge

    RE: Ecky-ecky-ecky-ecky-pikang-zoop-boing-goodem-zoo-owli-zhiv

    He has an assembler you know:


  15. Crisp

    The Ministry of Silly Languages

    Have they applied for a grant?

    1. Rob Gr

      Re: The Ministry of Silly Languages

      I'm working on a precursor to this; to be titled "Ying Tong Iddle I Po."

    2. Charlie Clark Silver badge

      Re: The Ministry of Silly Languages

      At least it makes a change from yet another fecking javascript framework!

  16. Anonymous Coward

    My new language is called FAIL

    And here's an example of it:

    > code = [3 + 1]

    > code[-1] = 4

    > print eval code

    FAIL: you can't do that

    > _

    It has objects. All inherit from the superclass, fail:

    > class Example -> fail [ ctor = [ print 'success!' ]]

    > new Example

    FAIL: success does not come your way today

    > _

    I intend to rewrite Windows in FAIL. It will be called FAILdows and I think it'll be a great success. Or failure.

  17. Steve Evans

    I fear the loop command could be a tad long-winded...

    Then, shalt thou count to three. No more. No less. Three shalt be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out.

  18. J.G.Harston Silver badge

    This strikes me as another attempt at: oh no! people who find programming hard find programming is hard! instead of accepting that some people just can't do some tasks, we'll build a dumbed-down programming language.

    1. Anonymous Coward
      Anonymous Coward

      Eh, what? You are... completely missing ... like all points with Ni. Its not a dumbed down language. Its a seed for a Rebol-ish Smalltalk-like language. Its main goal is 100% live coding, which is very important in some domains like say... 3D interactive live worlds - which we happen to work with. Well, I can go on and on - but the short answer is: You are dead wrong.

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