Skip to content

Comment on Parsing bitstreams with Nomparent

Comments

That's really neat, thanks for showing me. This looks very straightforward for parsing a straightforward format.

I think Nom might be more useful as the format gets more complicated... the combinators can really save you quite a bit of time. Having things like many0, or delimited_pair, or length_count already tested and documented saves time compared to implementing + testing it yourself. It's cool seeing how many different approaches you can use to solve the same problem :)

No problem!

I think Nom might be more useful as the format gets more complicated... the combinators can really save you quite a bit of time. Having things like many0, or delimited_pair, or length_count already tested and documented saves time compared to implementing + testing it yourself.

Totally agree -- bitvec works for things that are easy to hand write a parser for. Nom is a lot more powerful.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.