News for hackers. Stuff that matters.
Re:Show HN: Podlite - a lightweight markup language for orga... by alexisread on Wednesday April 24, 2024 @11:33AM (#40145625)
Looks nice, I have a couple of questions:

Does this use a single pass for the parser? Is there an EBNF spec? What sort of diagrams does it support?

Thanks

Re:Show HN: Podlite - a lightweight markup language for orga... by zagap on Wednesday April 24, 2024 @12:28PM (#40146366)
This is a specification, it does not declare how implementations work.

At the moment only typescript implementation exists and here is PEG grammars from it: https://github.com/podlite/podlite/blob/main/packages/podlit...

At the moment it supports Mermaid diagrams:

https://pod6.in/#p=%3Dbegin+Mermaid++%3Acaption%28%27Caption...

Re:Show HN: Podlite - a lightweight markup language for orga... by zagap on Wednesday April 24, 2024 @01:47PM (#40147501)
The existing typescript implemetation builds a complete AST (Abstract Syntax Tree), over which middlewares are run in several passes. Yes, there are multiple passes over the tree. This is necessary, among other things, to build a table of contents (TOC). thank you
Re:Show HN: Podlite - a lightweight markup language for orga... by alexisread on Wednesday April 24, 2024 @04:52PM (#40149479)
Might not work for my use case then. djot is single-pass so dovetails better with forth-style languages. I do like the blocks and mistake marking though :)
Re:Show HN: Podlite - a lightweight markup language for orga... by austinjp on Wednesday April 24, 2024 @05:28PM (#40149913)
Interesting. Have you been using djot for anything substantial, like technical/academic publishing, large projects like entire books, or similar? How does it fare and what is your toolchain? Thanks in advance!
Re:Show HN: Podlite - a lightweight markup language for orga... by alexisread on Thursday April 25, 2024 @02:54AM (#40154313)
I'm trying to use it as part of a new forth-style language, hence the need for single-pass.

I've found it as easy to use as markdown, but more regular ie. Well defined, which suits a language spec.

The key parts for me are reference links for execution-thread documentation and ``` blocks to program literally, (and separate/scope comments // from documentation """)

The toolchain as such is just part of the language- the compiler needs to parse djot. I'm not fully there though.