from Hacker News

Nota is a language for writing documents, like academic papers and blog posts

by napsternxg on 10/20/23, 1:00 AM with 214 comments

  • by wcrichton on 10/20/23, 5:10 AM

    Hi, Nota creator here. A high-level comment:

    After developing the initial prototype you see in the webpage, I've since gone back to the drawing board. I'm working on developing a firmer foundation for issues like:

    - How do you interleave content and computation? See: https://arxiv.org/abs/2310.04368

    - How do different syntaxes make different document tasks easy, hard, or impossible? See: https://github.com/cognitive-engineering-lab/doclang-benchma...

    I still very much believe in the high-level philosophy, but Nota will look very different within ~6 months. In the meantime, the single coolest development in the document language space is Typst, which I encourage you to check out: https://typst.app/

    Also: the next version of Nota will be written 99% in Rust :-)

  • by jxf on 10/20/23, 2:21 AM

    > There are two main mediums for digital documents: PDFs and web pages. PDFs were designed to mirror physical documents, so they impose the real-world constraints of paper: page breaks, fixed width, and immutable styling. Web pages, by contrast, provides an essential dynamism. Web pages are undeniably the future of digital documents.

    I actually don't agree with this. I think _not_ having "essential dynamism" where it's not needed is actually a feature, not a bug.

  • by kstrauser on 10/20/23, 1:39 AM

    So:

    * More in the space of LaTeX than Markdown (but with elements of each).

    * Written in JavaScript (so lots of of people can contribute in a language they already know).

    * MIT license.

    Nice! I don't know that I have an immediate use for it today, but this looks super nifty. If I did want to write something that needed some LaTeX-y features, and wasn't aiming for publication in a place that required it, I'd give Nota a shot. While I think Knuth is basically a demigod, it's not like he descended from on high, gave us TeX, and said "thou shalt never try anything new ever again".

  • by promiseofbeans on 10/20/23, 4:41 AM

  • by nologic01 on 10/20/23, 9:38 AM

    The problem with any new initiative in this space is that it enters a field that is more than well populated. It doesn't matter if existing solutions are less than perfect.

    Its like walking into a historic European city that has architecture going back millennia and arguing for a great new building design. Greenfield space is scarce and people will not just demolish old structures to try something new. They need to sense overwhelming advantage.

    The analogy gives some hints as to what needs to happen for a new approach to take hold. In building construction, massively better use of space was one example: For better or worse, use of steel and reinforced concrete opened the vertical dimension and the rest is history.

    Is there such an unexplored dimension that could entice people into yet another document format to "improve" on ascii, restructuredText, wikitext, markdown, tex/latex, asciidoc, html etc. etc.?

    The stock answer is some sort of semantic hypertext infrastructure. The original vision is still unfulfilled. If we assume that the walled gardens of today are just a bad nightmare that will pass away, in a re-decentralized web one would need modern, user-friendly and empowering document writing infrastructure.

    But there might be other dimensions that would elevate document writing and sharing to new heights. The beauty of innovation is that it is not bound by conventional rules and pre-existing wisdom.

  • by zellyn on 10/20/23, 3:36 AM

    If you follow the links, I think https://willcrichton.net/nota/ makes a compelling argument for the benefits of Nota at least in the niche of its intended use-case: making programming language academic papers more understandable.

    As mentioned in another comment, rendering to high-quality PDF is an obvious need/question: can it do that?

    (Perhaps) better would be rendering to LaTeX for compatibility with existing system.

  • by esafak on 10/20/23, 2:24 AM

    Basically this is markup + code (Javascript), which is a combination targeted by MDX. The last time someone mentioned this, the author said Nota is geared towards documentation, while MDX is geared towards web sites: https://news.ycombinator.com/item?id=31349579

    If that is so, I think someone needs to wrap Nota into a product for it to take off. Because while the results look great, fiddling with node.js to build a document is too much work -- it's like Latex all over again. Most people will prefer to use Notion or a word processor.

  • by kimi on 10/20/23, 4:47 AM

    Why do we need a language that creates a text page by compiling to JS? the same set of goals are handled by AsciiDoc. Real publishers (eg Oreilly) use AsciiDoc as their input format to create books and websites.
  • by daitangio on 10/20/23, 7:19 AM

    I do not know.

    I thing Emacs org-mode is better and less Javascript-dependant. Also https://docusaurus.io/ is very nice and flexible.

    I suggest to look at these two to extend nota in similar way

  • by zaptheimpaler on 10/20/23, 3:52 AM

    I was just thinking about what the easiest way would be to create a blog with mostly static content but with room for interactive graphs or arbitrary customization if i want it. Is this a good option?

    Another option I saw was Quarto [1]. Maybe even a simple static site blog like Jekyll can be used as well where i just edit the output HTML as needed? What do you all recommend?

    [1] https://quarto.org/

  • by zelphirkalt on 10/20/23, 4:58 PM

    If it did not compile to JS (needing a browser to display? or at least a JS engine?) and did not depend on NPM and NodeJS, it would have a higher chance of being adopted into my workflows. I am also still wondering, what it does, that I would need in a blog or even academic paper, that I could not express using reStructuredText or the Org format. Especially reStructuredText is quite powerful, and even more so, when you add custom directives to it. I built a rudimentary wiki on top of that, with hypertext linking between pages, table of content and so on. Custom directives could be used for citations maybe.
  • by epgui on 10/20/23, 2:25 AM

    > Web pages are undeniably the future of digital documents.

    I strongly disagree in the general case. PDFs all the way.

  • by adastra22 on 10/20/23, 1:22 AM

    Export to print-quality PDF?
  • by johnchristopher on 10/20/23, 8:54 AM

    > There are two main mediums for digital documents: PDFs and web pages.

    cough docx cough

    And yeah, it's a real problem for data portability and preservation. And no Librefoffice isn't up to the task (onlyoffice seems to do better).

  • by BuboBubo on 10/20/23, 11:20 AM

    I am currently writing and formatting a very long document using:

    - Pandoc Markdown and Pandoc : https://pandoc.org/MANUAL.html

    - PagedJS : https://pagedjs.org/

    - Make & Python as glue and helpers for compilation

    I manage my references using Zotero like any other academic writer. The configuration is less than 100 lines and I can get a pretty solid result using only basic HTML/CSS skills intertwined with Markdown. You sometimes end up with weird formatting issues but there is nothing you can't fix using HTML/CSS/JS. My manuscript has images, figures, tables, code, etc...

    It's good to see people trying to tackle the problem of formatting documents again. LaTeX is good but not for everything and the ecosystem is extremely hard to understand. Word, Pages and other similar tools are... proprietary. What would be a game changer for my use case is to see something like Scrivener with more formatting/layout options: https://www.literatureandlatte.com/scrivener/overview

  • by runeks on 10/20/23, 7:41 AM

    > 2. Why Nota?

    > Existing document tools like LaTeX, Pandoc, Markdown, and Scribble can (for the most part) only generate static web pages.

    I feel like Nota is underselling itself here, or at least not properly arguing for why a new language was created. If LaTeX were a perfectly fine document language, then surely we could extend e.g. Pandoc to provide these dynamic features when rendering LaTeX to a web page.

    But instead, a new document language was created. Why?

  • by politelemon on 10/20/23, 2:45 AM

    The trouble with js used then becomes whether the browser has implemented whatever function that nota expects, in the same way as other browsers, or implemented at all. Even in modern web development there are situations where things don't work in Firefox or let's say KDE browser. This leads to the usual notice put up be lazy or incompetent developers about viewing in Chrome/Safari only.
  • by Brajeshwar on 10/20/23, 2:50 AM

    Quick reading tells me this is Pandoc[1] but in JavaScript. Interesting, would love to see a bunch of examples such as a Static Site Generator, etc. to make it easy for people to related to fast and try it out.

    1. https://pandoc.org

  • by dcchambers on 10/23/23, 11:29 AM

    An aside: the font on that website is gorgeous...and perfectly crisp and readable on a screen despite having serifs. I wonder why it looks so much sharper than some (serif) fonts I see on the web.
  • by auggierose on 10/20/23, 5:04 AM

    I like the idea! So basically, a better and modern LaTeX. I've had the same idea for a while now, for example the ability to reference definitions, etc.

    But I think Nota goes about this a bit too heavy-handed:

        % let nota = @Smallcaps{**Nota**}
        .@Definition[name: "nota", label: nota]{
          #nota is a language for writing documents, like academic papers and blog posts.
        }
    
    That's 4 mentions of `nota` to introduce a definition, 5 if we count `Nota` as well. Come on. Also, when referencing, instead of `&nota` maybe just allow `[[Nota]]` and `[[nota]]` instead?
  • by dang on 10/20/23, 2:46 AM

    Related:

    Nota: A Document Language for the Browser - https://news.ycombinator.com/item?id=31348316 - May 2022 (55 comments)

  • by cryptos on 10/20/23, 6:16 AM

    Is there an advantage over AsciiDoc? In my opionion AsciiDoc is really powerful and offers anything an author of academic papers (and blog posts) would need. The output is also not limited to html.
  • by FridgeSeal on 10/20/23, 5:23 AM

    > A &nota document compiles to a JavaScript program, meaning it's easy to:

    > * View documents on any device that has a web browser.

    Ah yes, a JS runtime and a browser, 2 things which are feasible to develop and definitely not massive black boxes.

    I love the idea.

    I just think it would be better being a format unto itself, or at least not requiring JS and/or a browser. Decoupling from these at least permits other language implementations of viewers/editors; browsers are already basically unimplementable by anyone without massive commercial backing.

  • by lagniappe on 10/20/23, 2:46 AM

    Any new language that shows me the code right away gets extra points
  • by 38 on 10/20/23, 4:34 AM

    not sure why they insist on hiding this, but here is the source:

    https://github.com/nota-lang/nota

  • by mppowers on 10/20/23, 3:27 AM

    I would be interested in a comparison between this and Jupyter notebooks. Notebooks seem like they'd be easier to use than a specific language for most users.
  • by maegul on 10/20/23, 4:25 AM

    Can’t help but contrast it to ObservableHQ (https://observablehq.com/), which is basically front end notebooks with reactivity and other niceties. Leans right into “dynamism” while also allowing for simple document authoring.

    Though it’s a platform, there’s a runtime and some open substitutes for the bits not open IIRC.

  • by wiz21c on 10/20/23, 9:51 AM

    Give me an inverted IPython and I'll be happy. By inverted I mean: I write code and from time to time I want to document it with rich information (plots, equations, a bit more structured text). So I would love to have powerful comments in my regular code. I'm not much interested in bits of code in a single document.
  • by rmrfchik on 10/20/23, 8:45 AM

    I'm not sure is it safe to rely documentation on nodejs based software. In my humble opinion JavaScript world evolves so fast and obsolete so many things that writing reliable software (in term of availability and sustainability) is very very very hard task.
  • by agileAlligator on 10/20/23, 5:35 AM

    Reminiscent of Gwern's website[0] (click on any one of the articles to see what I am talking about). Was that an inspiration in creating this?

    [0]: https://www.gwern.net/index

  • by lloydatkinson on 10/21/23, 7:47 AM

    This looks very cool. I noticed it linked to Penrose which I’d never heard of and seems very cool also.

    Given this is a new project I would really consider using Deno instead of Node. You’ll have a more reliable and consistent developer experience.

  • by classified on 10/20/23, 5:08 AM

    I could use a markup helper like Nota, but having NodeJS & npm in the mix gives me pause.
  • by amelius on 10/20/23, 9:55 AM

    > The goal of Nota is to bring documents into the 21st century.

    I think the modern approach might be to recognize that all readers are different, and that they would use an LLM to transform the document into the form that is suitable for a particular reader.

  • by choeger on 10/20/23, 4:10 PM

    Please, please, please, make sure that it uses a context-free grammar. For the live of Knuth, correct that one stupid mistake he made and allow other people to parse your syntax. Good things will follow!
  • by eimrine on 10/20/23, 6:47 AM

    I am not a really intelligent person, but having an ability to caps while being in caps (that's how a Nota word is written on the example) is kind of too xzibit-like.
  • by max_ on 10/20/23, 6:38 AM

    I thought this was going to be something like Idyll [0].

    [0]: https://idyll-lang.org/docs

  • by cmovq on 10/20/23, 6:34 PM

    > Then you can build a single Nota document by running these shell commands:

    > 1. npm install --global @nota-lang/nota

    That's going to be a showstopper for a lot of people.

  • by rufius on 10/20/23, 4:04 PM

    I like the idea, but the reliance on Node is a killer for me. I just don’t want anything to do with that.
  • by bigbuppo on 10/22/23, 10:19 AM

    Is this a new feature of Nota Bene 14? Might have to give it another look then.
  • by slmjkdbtl on 10/20/23, 3:25 AM

    Great website, typography and logo