Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
I created a library for parsing text in Kotlin. Better than regular expressions. What do you think?
2 projects | /r/Kotlin | 10 Jul 2023
I think you'd be better served to try to port Rosie Pattern Language (https://gitlab.com/rosie-pattern-language/rosie) to Kotlin than to try to roll your own. There are definite corner cases in RegEx (sounds like you've already hit some) where the asympototic performance is so large that the code is practically unrunnable. Rosie addresses several of those cases.
Is the regex crate a bottleneck in your program? If so, can you share the details?
6 projects | /r/rust | 24 Feb 2023
I had to spend a lot of time clicking through links to finally find an example: https://gitlab.com/rosie-pattern-language/rosie/blob/master/rpl/date.rpl
Ask HN: What small library or tool do you want that doesn’t exist?
11 projects | news.ycombinator.com | 2 May 2022
Something could be based on the "Rosie Pattern Language". There is already a parser for en_US/en_EU dates, which should be simple to extend to date ranges.
5 projects | /r/ProgrammingLanguages | 22 Apr 2021
Maybe something like Rosie?
Chumsky, a Rust parser-combinator library with error recovery
8 projects | news.ycombinator.com | 8 Jul 2022
Caveats: I've used nom in anger, chumsky hardly at all, and tree-sitter only for prototyping. I'm using it for parsing a DSL, essentially a small programming language.
The essential difference between nom/chomsky and tree-sitter is that the former are libraries for constructing parsers out of smaller parsers, whereas tree-sitter takes a grammar specification and produces a parser. This may seem small at first, but is a massive difference in practice.
As far as ergonomics go, that's a rather subjective question. On the surface, the parser combinator libraries seem easier to use. They integrate well with the the host language, so you can stay in the same environment. But this comes with a caveat: parser combinators are a functional programming pattern, and Rust is only kind of a functional language, if you treat it juuuuust right. This will make itself known when your program isn't quite right; I've seen type errors that take up an entire terminal window or more. It's also very difficult to decompose a parser into functions. In the best case, you need to write your functions to be generic over type constraints that are subtle and hard to write. (again, if you get this wrong, the errors are overwhelming) I often give up and just copy the code. I have at times believed that some of these types are impossible to write down in a program (and can only exist in the type inferencer), but I don't know if that's actually true.
It might sound like I'm shitting on nom here, but that's not the goal. It's a fantastic piece of work, and I've gotten a lot of value from it. But it's not for parsing programming languages. Reach for nom when you want to parse a binary file or protocol.
As for chumsky: the fact that it's a parser combinator library in Rust means that it's going to be subject to a lot of the same issues as nom, fundamentally. That's why I'm targeting tree-sitter next.
There's no reason tree-sitter grammars couldn't be written in an internal DSL, perhaps in parser-combinator style (https://github.com/engelberg/instaparse does this). That could smooth over a lot of the rough edges.
Langdev in Clojure
2 projects | /r/Clojure | 28 Jun 2022
Sure, you can use https://github.com/Engelberg/instaparse to create parser for any language you want, or simply create DSL in basic clojure types, like vectors.
Formal Specification and Programmatic Parser for Org-mode
9 projects | /r/emacs | 10 Jan 2022
Enter org-parser! It is indeed such a thing implemented already! Remember the magical parser I mentioned above? It is already implemented here Engelberg/instaparse too (in a Lisp)! org-parser is built on top of it by providing a formal specification for org-mode in the EBN form. Any proof that org-parser works? Indeed, there is the celebrated organice which is built on top of it. Kudos for 200ok-ch!
5 projects | news.ycombinator.com | 19 Aug 2021
You might enjoy checking out Instaparse, a Clojure library. Its project page reads, “What if context-free grammars were as easy to use as regular expressions?”
It’s not over-promising, either. I went from never having heard of it before to getting complete and correct parse trees of some ancient JSP Expression Language in about 20 minutes. Most of that time was spent typing in the BNF description that I could find only in an image.
5 projects | /r/ProgrammingLanguages | 22 Apr 2021
Instaparse sounds pretty close to what you're looking for assuming you're ok being limited to context-free grammars.
What are some alternatives?
rakudo - 🦋 Rakudo – Raku on MoarVM, JVM, and JS
chumsky - Write expressive, high-performance parsers with ease.
parser-combinators - Parser combinators.
parser - Parser combinators
tree-sitter-org - Org grammar for tree-sitter
rust - Empowering everyone to build reliable and efficient software.
alass - "Automatic Language-Agnostic Subtitle Synchronization"
nom - Rust parser combinator framework
sci - Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs
org-parser - org-parser is a parser for the Org mode markup language for Emacs.