Re: [jcornaz/beancount-parser] beancount_parser_2 alpha (Discussion #38)

242 views
Skip to first unread message

Martin Blais

unread,
May 22, 2023, 11:34:55 PM5/22/23
to jcornaz/beancount-parser, Beancount, jcornaz/beancount-parser, Subscribed

Looks fun. I started toying around with Rust myself. 
With the Python community aiming in that direction it was unavoidable I guess.

Plus the C++ protobuf story just isn't getting much better.
I'm wondering if there's a nicer by-ref sharing story with protos and Rust, where an instance created in Rust can be shared to Python without making copies (and possibly mutated).
I'd be curious to see if your parser can be made to produce protobufs.




On Mon, May 22, 2023 at 9:51 AM Jonathan Cornaz <notifi...@github.com> wrote:

Hi,

I started a "big rewrite" of the beancount parser: beancount_parser_2

It is now in alpha. Hopefully, I'll be able to stabilize it reasonably quickly (but there's no ETA)

This old implementation (beancount-parser) is now in "maintenance mode". I'll still fix reported bugs, and I'll review/merge submitted pull requests. But I won't actively implement new features on that version.

The new implementation already has some features that the old one hasn't:

  • line numbers of errors
  • line numbers of directives
  • more convenient to destructure the result because structs expose public fields
  • can treat the account as string slices
  • can use any decimal type when parsing (f64, rust_decimal::Decimal, and more)
  • can catch more syntax errors (instead of silently ignoring unknown syntax)
  • single result type (instead of an iterator over results)
  • and more...

Though there are still many missing functionalities, you may want to have a look at it ;-)


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <jcornaz/beancount-parser/repo-discussions/38@github.com>

Chary Chary

unread,
May 31, 2023, 4:02:04 AM5/31/23
to Beancount
Martin,

re "With the Python community aiming in that direction it was unavoidable I guess."

Do I understand this correctly, that that there is a growing tendency to write high speed extensions for python in rust rather than C/C++?

Martin Blais

unread,
Jun 3, 2023, 5:29:58 PM6/3/23
to bean...@googlegroups.com
During my visit at PyCon recently it was impossible to miss the fact that a number of Python projects are rewriting their core in Rust for performance reasons. Rust and Python seem to be best friends.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/6e4eb19a-8de2-47c9-b57f-70b6c6f7b3adn%40googlegroups.com.

Chary Chary

unread,
Jun 5, 2023, 4:48:20 AM6/5/23
to Beancount
Martin,

OK, thanks for the information!

Chary Chary

unread,
Jun 6, 2023, 10:48:16 AM6/6/23
to Beancount
Looks like there will be Mojo also soon:

Reply all
Reply to author
Forward
0 new messages