News for hackers. Stuff that matters.
Re:Nom, a byte oriented, streaming, zero copy, parser combin... by geal on Monday May 25, 2015 @08:53PM (#9602388)
Hi all, Nom's author here.

I wrote this paper in January 2015, so some things changed in the meantime:

- the benchmarks have been optimized a bit, and someone contributed a cereal parser that beats nom ( https://github.com/Geal/nom_benchmarks ). It's alright, I just wanted to estimate where it stands

- there is better error management: https://github.com/Geal/nom/wiki/Error-management

- the error management types give powerful debugging features: http://dev.unhandledexpression.com/slides/langsec-2015/img/c... (test code: https://github.com/Geal/nom_colored_hexdump )

- It is now easy to embed in C ( https://github.com/Geal/nom_in_c ). I plan to make API compatible versions of some C libs

- there are more example parsers now: https://github.com/Geal/nom/issues/14 feel free to pick one up!

Here are the slides for the conference at the IEEE Langsec workshop: http://dev.unhandledexpression.com/slides/langsec-2015/

Langsec is one of the most interesting approaches to follow in security, and the ideas presented this year were amazing (I'm especially fond of the heap exploitation algebra). I highly recommend watching the videos once they will be available.

Writing parsers with nom is easy and fun, please give it a try ;) https://github.com/Geal/nom

Re:Nom, a byte oriented, streaming, zero copy, parser combin... by dansimon on Monday May 25, 2015 @09:18PM (#9602459)
Great work! I've been working on a Rust parser combinator library myself ( https://github.com/DanSimon/peruse ), though I've been focusing more on parsing syntax trees than binary formats, and it's really cool to see the different approaches you've taken. I had been planning on working on stream parsers next, but I may just defer to nom since it basically looks like what I had wanted to do.
Re:Nom, a byte oriented, streaming, zero copy, parser combin... by geal on Monday May 25, 2015 @09:25PM (#9602476)
I really like your approach with trait objects. This is something I would have liked in nom when I started it, but macros proved more useful for my experimentations (less types to rewrite when I change something).

For the streaming part, it is still a work in progress. I need a way to better represent input enabled state machines, otherwise we'll end up with streaming switch based state machines, and they are a security nigtmare.

Re:Nom, a byte oriented, streaming, zero copy, parser combin... by pjmlp on Tuesday May 26, 2015 @05:17AM (#9603646)
> Langsec is one of the most interesting approaches to follow in security, and the ideas presented this year were amazing (I'm especially fond of the heap exploitation algebra). I highly recommend watching the videos once they will be available.

Many thanks for the heads up!

Re:Nom, a byte oriented, streaming, zero copy, parser combin... by kmike84 on Tuesday May 26, 2015 @03:05AM (#9603318)
Nice!

Any plans for fancier parsing algorithms (GLL? see e.g. http://www.cs.uwm.edu/~dspiewak/papers/generalized-parser-co...)

Re:Nom, a byte oriented, streaming, zero copy, parser combin... by geal on Tuesday May 26, 2015 @06:21AM (#9603803)
yes, that's the plan! I had to take care of the basic tools and the plumbing first, but I'll add better algorithms.