News for hackers. Stuff that matters.
Re:Nim Apocrypha, Vol. I by mhh__ on Wednesday December 23, 2020 @09:06AM (#25517722)
I've seen people do similar things in D (although the "D way" of doing it would probably be to parse some kind of textual description and turn it into code at compile time). The cost/benefit of making a metaprogramming library just to write a lexer is fairly bad, however.

wrt to the SMT integration, it's something that I would very much like to try in D, but it's quite difficult to work out exactly where to start (and means bolting a fairly big dependency on the compiler). There also seems to be a big gap in the literature between "practical" verification done "in" the widget being verified (e.g. SystemVerilog code) and more academic work where, effectively, a parallel structure is built which represents the semantics of the widget.

Re:Nim Apocrypha, Vol. I by mratsim on Thursday December 24, 2020 @06:19AM (#25526600)
For a lexer/parser you should use a coroutine / suspendable function abstraction. Or a parser generator.