Hacker News new | past | comments | ask | show | jobs | submit login

In fairness, a language named "Ekke-Ekke-Ptang-Zoom-Boing-Ni" would be far easier to search for than Ni.

Concerning the language itself, the block-based Lisp influence taken from REBOL is noteworthy. The latter is quite underappreciated in general.




Also, I found it interesting that this free form of syntax actually can be made quite readable (in comparison to Lisp, which I love in theory but balk at trying to read).

I even think Ni is turning out more readable than Rebol/Red - probably due to the use of keyword syntax and infix arguments. And the idea with arg words made lambdas very lightweight, much more so than in Rebol.


It's trivial to add an arg words style lambda to Rebol.

For example, here is a very naive version:

  lambda: function [block] [
      args: sort unique collect [
          parse block [
              any [
                  w: set arg get-word! (
                      keep to-word arg
                      change w to-word arg
                  )
                  | skip
              ]
          ]
      ]
      function args block
  ]
test in REPL...

  >> f: lambda [:a + :b]

  >> f 1 2
  == 3

  >> foo: lambda [c: :a + :b  print [:a "+" :b "=" c]]

  >> foo 1 2
  1 + 2 = 3
NB. However you wouldn't really use :arg-name here because this is already reserved for the get-word! datatype.


Yes, and I never implied its not hard to do. And examples such as this one are quite impressive - which is what got me interested in Rebol in the first place and triggered the development of Ni.

However... if I understand your code properly - you are basically generating an argument declaration by scanning for "get words". So its still a static declaration.

In Ni an arg word is an operation. That means a Ni func can decide how many arguments to pull, and in which order, dynamically, much like stack oriented languages can do. Usefulness? Dunno :) But its not the same.

Also, yes, I opted out of set words in Ni since I want to be able to have keyword syntax á la Smalltalk/Self. And I use "^" instead of ":" prefix for get words, because I wanted the argwords to be similar to how they look in Smalltalk. :)


Searchability is easily fixed with a -lang postfix, as the Go community has demonstrated. :)


You know, I do think "Ni" as a name sucks but my imagination was low. On the other hand... renaming to "Eki Eki Patang" or something similar is a thought I have already entertained. When reaching a higher level of maturity ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: