Nova Programming Language

(nova-lang.net)

115 points | by surprisetalk 3 days ago ago

67 comments

  • ajkjk 3 days ago ago

    ahem, by law programming languages must have code samples on the front page

    • sema4hacker 3 days ago ago

      Yes, after wandering through a few pages trying to find an example that actually did something, I gave up and moved on.

      • saghm 3 days ago ago

        This was especially confusing to me when I clicked on the "try" button and was dropped into a page with an empty text box. Most playgrounds I've seen before at least have a "hello world" there. There's a run button, but it's not particularly useful with an empty file!

        • butvacuum 16 minutes ago ago

          If this was released in April, I'd assume it was a joke: no va, no go... Not Go.

    • picometer 3 days ago ago

      The code block after "Welcome" is the code sample. Very literate.

      • graypegg 3 days ago ago

        Is it meant to do something? It doesn't follow the same cause/effect syntax as the tutorial, and plopping that welcome block into https://playground.nova-lang.net/ doesn't seem to do anything. I assume it's the note taking part of the syntax?

        • casuallyblue 3 days ago ago

          Its not necessarily meant to do anything on its own. The text there is the same cause/effect syntax, just with slightly different delimiters. If you were to include the fact it needs to execute for the rule to work on after the code, like: "|| - Welcome to Nova! -", then the rule would execute.

      • macintux 3 days ago ago

        A caption for that sample, indicating it is one, would help.

    • user2342 3 days ago ago

      It's there, but yes the home page is very confusing. I lost interest very fast.

    • guywithahat 3 days ago ago

      I found some example code on their github https://github.com/dan-online/Nova

      • forgotpwd16 3 days ago ago

        This is an unrelated synonymous language. Besides this and submitted one, there're few others found online, one[0] being 20y+ old (first release 06/2003). There's also a research one on functional parallel programming[1], but no public implementation seems to exist. (Though conceptually Futhark is similar; maybe that Nova even influenced Futhark's creation.)

        [0]: http://www.navgen.com/nova/index.html

        [1]: https://research.nvidia.com/publication/2013-07_nova-functio...

        • xigoi 3 days ago ago

          *homonymous (a synonym is the opposite of a homonym)

          • anonym29 3 days ago ago

            Are you sure that a synonym is the opposite of a homonym, rather than say, the logical inverse corollary of a homonym? I'd think "the opposite of a homonym" would just be a word spelled differently from the target word, no?

            • xigoi 3 days ago ago

              A synonym is a different word with the same meaning. A homonym is the same word with a different meaning.

              • anonym29 8 hours ago ago

                A homonym is not the same word. Homonyms include both homographs, which are still two different words with different meanings, just spelled the same way (e.g lead[verb] and lead[noun]), and homophones, which are also still two different words with different meanings, just pronounced the same way (e.g. there and their). That said, homonyms also includes word pairs that are both homographs and homophones like "bat", being the animal, the verb, and the baseball equipment (presumably among other uses).

              • 8 hours ago ago
                [deleted]
          • forgotpwd16 3 days ago ago

            True, thanks. Had forgot this term even existed.

    • 3 days ago ago
      [deleted]
    • 3 days ago ago
      [deleted]
  • BoiledCabbage 3 days ago ago

    While I'm not clear on how it scales to more broader problems, it's nice to see a somewhat novel idea in programming languages vs the same rehash of algol derived languages.

    I do think I've seen something similar. A language mainly driven off of pattern matching, but I don't recall where. Does anyone know of prior art? Or is this completely novel?

    • MisterTea 3 days ago ago

      Prolog comes to mind with its facts and rules matching.

      • WorldMaker 2 days ago ago

        Even more so it reminds of Dialog [0], a Prolog specialized for interactive fiction and sort of the Z-Machine object system.

        There's also some cross-over with how (parts of) Inform 7 works under the hood.

        [0] https://linusakesson.net/dialog/docs/index.html

      • tehologist 3 days ago ago

        I was thinking that this looks a lot like prolog or even make with rewrite terms

    • shrubble 3 days ago ago

      SNOBOL, SPITBOL and the Icon and Unicon languages are heavy with pattern matching.

      There’s a book on “Snobol for the Humanities” but it doesn’t have a strong focus on UI; everything at the time it was written used a simple terminal interface like a REPL with no advanced terminal handling.

      • BoiledCabbage 3 days ago ago

        I thought it was SNOBOL I was thinking of, but then I looked up the SNOBOL syntax and that wasn't it. Then I thought maybe REBOL but that wasn't it either. Following up from a comment below it was Eve that it seemed more similar to me (at least at first view).

        And also replying to one more comment below. Modal on the developer June's website reminds me of Maude. If feel like term re-rewiting languages have a really cool idea in then that are just waiting to take off. Funny enough I think Maude also has a pattern matching system like Nova. although it's I believe an unordered bag of terms to match against instead of an ordered stack.

        • entaloneralie 3 days ago ago

          Did you mean the REFAL rewriting language?

      • jibal 3 days ago ago

        I wrote some SNOBOL IV programs back in the day and met Ralph Griswold when he visited the UCLA Computer Club. Fun language with very interesting ideas. Looking into Unicon is on my list of things to do.

    • graypegg 3 days ago ago

      June's (developer from the team page on Nova's site) personal website [0] points to this other interesting looking pattern-matching-based language she made called Modal [1] which seems to work on a tree rather than named LIFO stacks

      [0] https://june.codes/

      [1] https://wiki.xxiivv.com/site/modal

      • forgotpwd16 3 days ago ago

        So that's why I found the username and language familiar. Was exploring this site few days ago. Besides this page, there's also one on Vera[0], what appears to be Nova's predecessor (at the end there's even link pointing to a defunct wiki under Nova's domain calling it Vera wiki).

        [0]: https://wiki.xxiivv.com/site/vera.html

    • MarsIronPI 2 days ago ago

      XL[0] or its derivative Tao3D[1]? Regardless I think XL is a fascinating language. Being a Lisp person I find it neat when a language manages to write its core language constructs in itself.

      [0]: https://xlr.sourceforge.io [1]: https://tao3d.sourceforge.net

    • ModernMech 3 days ago ago
    • delifue 3 days ago ago

      Egison is a pattern-matching-oriented language https://www.egison.org/

  • ivanjermakov 3 days ago ago

    Some code snippets here: https://nova-lang.net/introduction-to-nova/sight/

    EDIT: seems to be open source, just isn't mentioned on the website https://forge.nouveau.community/nova

  • geenat 3 days ago ago

    I like the idea of a "markdown for logic", with transpiliation to lots of different easy backends such as javascript.

    Not convinced the language would actually be useful, but I like the ideas for portability.

  • junon 3 days ago ago

    I'll give this a try but at first glance through the guides it appears to be missing a way to ergonomically output specific states. I haven't run it yet but I'm guessing it logs everything that happens which will get verbose unless asked for.

    A while back there was a rewrite language that was posted (white on black theme site) that was similar but more geared towards coding problems and less on lit programming. I don't remember the name but it was equally as interesting. If anyone recalls what it was it'd be greatly appreciated.

    Anyway if the creator is lurking here, examples demonstrating more practical, real world problems (even if still somewhat small) would go a long way.

    • incanus77 3 days ago ago

      > A while back there was a rewrite language that was posted (white on black theme site) that was similar but more geared towards coding problems and less on lit programming. I don't remember the name but it was equally as interesting. If anyone recalls what it was it'd be greatly appreciated.

      https://wiki.xxiivv.com/site/pocket_rewriting.html

      • incanus77 2 days ago ago

        Yeah, I was like "rewrite language on a black & white site? I know this!" There can't be that many.

      • junon 2 days ago ago

        Oh very cool, not what I was thinking of but it definitely fits my description. The one I was thinking of was text/code based. Thanks, this looks fun too.

  • escanda 3 days ago ago

    I guess this sometime replace org-mode extensively. The idea is sound. The implementation looks good.

    For instance, I love org-mode export capabilities to standard formats such as pdfs and other kinds of documents. It makes it real easy to export some formulae or docs for some feature.

    Plus org-mode agenda is just superior and awesome.

  • forgotpwd16 3 days ago ago

    Some examples are available in the repos of Serpens/Myte[0][1] (Nova in-Python interpreter/to-JS compiler).

    [0]: https://forge.nouveau.community/nouveau/serpens/src/branch/m...

    [1]: https://forge.nouveau.community/yumaikas/myte/src/branch/mai...

  • arniemiller 3 days ago ago

    Nice. The learn page reminded me of https://learnxinyminutes.com/ which I really liked as a quick way to get a tour of a language.

  • keychera 3 days ago ago

    How does this compare to Rules engine/rete algorithm? I've been developing a game on top of a rules engine and I can't help but feel very familiar reading the 4 Nova core ideas

  • oersted 3 days ago ago

    Huh...

    In https://nova-lang.net/implementations/

    > Pyra: Runs on Lua

    > Serpens: Runs on Python

  • LennyHenrysNuts 3 days ago ago

    What's it for?

    • Koshkin 3 days ago ago

      Prolog-style programming

  • seg_lol 3 days ago ago

    Is this literate Prolog for Org Mode?

  • geldedus 2 days ago ago

    In the era of AI-assisted programming, creating new languages or new frameworks is a lost cause.

  • satiric 3 days ago ago

    This feels like prolog, although I don't remember much about prolog apart from writing about 3 lines to get a CS degree. What puts this apart from prolog? (And are there, you know, reasons for using the language?)

    • yumaikas 3 days ago ago

      (Nova dev here)

      Nova's execution model is a lot friendlier to implement vs Prolog, for one.

      One big reason reach for Nova are when I have something -very- state-machine shaped. It is quite good at that.

      I'll try to come back later with more explanations

      • ModernMech 3 days ago ago

        When you say "friendlier" does that also mean "less powerful"? Prolog's execution engine is very capable, so does Nova give up some of that power in exchange for friendliness or does it somehow retain it?

        • yumaikas 3 days ago ago

          Depends on what you mean by power, I suppose. Nova is Turing complete, so there's that.

          One big difference between Nova and -most- logic languages is that "forgetting" things is a normal part of operation. Nova is also forward chaining, rather than backtracking.

          The end result ends up with Nova programs being something closer to an interpreter in a lot of cases, and writing inputs for said interpreter.

          So, Nova doesn't do as much on your behalf as Prolog does, deliberately trying to be easier to reason about, and to have more predictable performance characteristics.

      • smaudet 3 days ago ago

        I think the focus on the state machine may be the problem. I don't know much about prolog, or why it doesn't really enjoy more status in the programming world, but I suspect that while it is good at repesenting states, it is not very useful for writing programs...

        Case in point, the pong programs. Looking at the impl, vs a <50 line js impl, this looks more like an assembly language for state, not necessarily something that makes state more visible or readily apparent...

        Having a nice dialect for a (is this formally provable?) state machine is nice, but I'm not convinced founding the language from state machines is the correct approach vs merely using a fluent library e.g. https://stately.ai/docs/xstate

        Not saying that I'm correct, but would be interesting to hear more of the philosophy of why Nova, vs just a simplisitic implementation of some card game rules...

  • bobanrocky 3 days ago ago

    [flagged]

  • 155231 3 days ago ago

    iker

  • almosthere 3 days ago ago

    Did you have 3 seconds to see that there is a Nova code editor out there? (edit: this comment is about name confusion)

    • airstrike 3 days ago ago

      > Please don't complain about tangential annoyances—e.g. article or website formats, name collisions, or back-button breakage. They're too common to be interesting.

      https://news.ycombinator.com/newsguidelines.html

    • jibal 3 days ago ago

      Even if that mattered, you could express it without being rude.

    • gkbrk 3 days ago ago

      Who would confuse a programming language and a text editor?

    • escanda 3 days ago ago

      Most likely has a language server thus interoperable with most editors out there. Some config might be necessary though.

      • casuallyblue 3 days ago ago

        No LSP yet, but we do have a tree-sitter grammar

    • 3 days ago ago
      [deleted]