What does HackerNews think of hammer?

Parser combinators for binary formats, in C. Yes, in C. What? Don't look at me like that.

Language: C

i guess hinting is less important today than it was in the days of monochrome 1152×900 21" monitors and sub-mebibyte framebuggers where you couldn't do antialiasing

(and maybe you can do a decent job of blind "hinting" with smarter dsp algorithms, gradient descent, and orders of magnitude more cpu, and just ignore the tt hints virtual machine)

well-defined subsets of svg are a pretty interesting thing; i feel like a smol computing system might benefit from using something like that as its base graphical layer for things like fonts and windows; then a font engine can delegate the rasterizing down to the svg layer

'how far can we golf an svg subset' might be a good rough description of vpri's nile and gezira https://news.ycombinator.com/item?id=10535364

parsing annoying formats is what https://github.com/abiggerhammer/hammer is for; we were able to get it to parse pdf. unfortunately it's not pure ruby. the smallest i've been able to get a peg parser library is http://canonical.org/~kragen/sw/dev3/tack.py which is 27 lines of python, but i'm not sure it can be reasonably extended to do the kind of binary parsing that hammer does without balooning in size

You verify it with a formal recognizer that was generated from the official grammar. Traditionally this would have been e.g. a yacc/bison parser written from the specification's BNF. Today, parser combinators such as hammer[1] are probably easier to use (it has nicer bit-level support).

This puts all of the recognizing/parsing code in the same location. It also verifies the entire input at the same time, before the results are passed back to the main program. You get clean valid/invalid check of the entire input.

For a very good discussion of why formal recognizers are important (and why, if possible, it's important to design transport formats and protocols that are deterministic context-free or simpler[2]), see Meredith and Sergey's talk[3] at 28c3.

[1] https://github.com/abiggerhammer/hammer/

[2] http://www.langsec.org/occupy/

[3] https://media.ccc.de/v/28c3-4763-en-the_science_of_insecurit...

along the same lines, there's https://github.com/abiggerhammer/hammer which is a bit-oriented c parser combinator library for binary formats.
>>describe and validate the desired structure

Something like this? https://github.com/abiggerhammer/hammer

Encryption is basically a tool against wiretappers and men in the middle. But what if you don't fully trust your users, and fear they'll try to add exploits to your software ?

Another high level effort in security is meredith paterson's "language theoretic security"[1] can help you code secure protocols, to fight against this problem.

There's also a tool to help implement it called hammer[2].Not sure if fully developed yet.

[1]http://boingboing.net/2011/12/28/linguistics-turing-complete...

[2]https://github.com/abiggerhammer/hammer

She also had a more practical talk on the subject:

https://www.youtube.com/watch?v=XVZrmp5MAas

And also talks about a general parser she's building for this issue on github[1]. Using this parser , she have built a DNS and base64 recognizer , and i think they are working on building recognizers for more protocols.

[1]https://github.com/abiggerhammer/hammer