Hacker Newsnew | past | comments | ask | show | jobs | submit | jjba23's commentslogin

Some really impressive work there! thanks for sharing!


Aha! Interesting to hear you were going in the same direction. There are indeed quite some tricky situations to handle since Org (and Markdown) are complex in many ways.

the approach I am taking is to combine the PEG with a step of AST processing in order to then produce a correct and descriptive tree structure (for later rendering).

I do agree the Guile library has some spots to improve but honestly, I am already enjoying it so much, and it's far better for the Lisper in me than other things I've tried. I also find S-expressions much more comprehensible and self-documenting.

Looking forward to seeing what you do with it :)

I am indeed hoping that this library is useful for more people and that perhaps things like Haunt blog generator can use it (and other interesting uses)

As for nested markup, and nested lists it has been tricky, but so far I've really promising results:

(assert-equal #:got (inline-org->html (inline-org->ast "*bold with /italic/*")) #:expect "<strong>bold with <em>italic</em></strong>")


Indeed you make a good point. My naive self thought it could work out, but actually the more you zoom out, the more tree-structures you see in many formats. And in my opinion, then it's time to sheathe Valyrian Steel of Lisp, IMHO the language to rule them all when it comes to working with tree based structures (Org, HTML, SXML, many more)


I think you make a great point in highlighting the value of Regex. I don't want to undermine it at all, although some use-cases are just not a good fit for it (even if you can horseshoe things). I think a higher-level abstraction for regex is super welcome, and I quite admire what you are doing there, thanks a lot for sharing. I do think regex's indeed quite a lot more difficult to grasp when complexity rises compared to grammars or other approaches.


Worth looking into nested words aka visibly pushdown languages.

They're a proper superset of regular languages and a proper subset of deterministic context-free languages, but they retain many of the nice properties of regular languages that DCFLs don't - they're closed under intersection, union, concatenation, Kleene Star and reversal.

They can parse more languages that Regular Expressions (non PCRE), but fewer than deterministic CFG subsets like LL/LR. They're expressive enough to parse languages which have a regular tree structure like S-expressions, JSON, XHTML.


Thanks for your comment! I think indeed a lot of people underestimate Guile's performance, power and expressiveness.


Thanks for the comment


This [WIP] tool provides a declarative, transactional approach to managing your database state, ensures your relational schema and database is exactly as you decree, incrementally. Compatible with SQLite3, MySQL and PostgreSQL. Write your schema migrations and seeding easily, and in your native database dialect.


Seems like there's been quite some interest lately in my custom configurations and self-built OS with GNU Guix, Emacs, StumpWM and more, which works amazing, specially for devs, and is pretty much 100% configurable with Lisp :blessed: Many stars in just a couple days, maybe it inspires you to do great things, and free up your computing.


Meh, thought this would get more views haha


A Scala library with great ZIO (and ZIO test) integration to help you easily write high-level integration/black box tests. ZZSpec tests help you grow your confidence in the correctness of software. Why ? Testing at a high level means freedom of implementation and refactoring. This is something all engineers love . Read more this page further to understand why this library was created.

https://github.com/jjba23/zzspec


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: