Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
in4lio
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
Show HN: Protobuf plugin for boilerplate code generation using Python templates
(github.com)
2 points
by
in4lio
2y ago
|
0 comments
2.
▲
by
in4lio
10y ago
Yes, I have written a few)) Because this is the most interesting area of programming for me. Many years ago, I wrote BNF-like language to translate text into syntactic tree, it was part of my graduation project. I also wrote a Lisp-like lex
3.
▲
by
in4lio
10y ago
Fine! To generate the C code using Lisp syntax - it's not such bad idea, the C preprocessor is awful. A few years ago, for this purpose, I wrote the yupp preprocessor which use similar syntax, but yupp allows to inject the code in
4.
▲
by
in4lio
11y ago
This is a matter of taste, in this case, IMHO. Thanks for advice)
5.
▲
by
in4lio
11y ago
Oh, yes, I agree. And when I was tired of writing macros like this: https://gist.github.com/in4lio/9102547 , I wrote yupp)
6.
▲
by
in4lio
11y ago
Just because C is my primary tool) and I have created yupp, to do things like X Macros simpler. yupp can even be used with Python, as it allows to make the right indentation, e.g. https://github.com/in4lio/yupp/blo
7.
▲
by
in4lio
11y ago
Yes, you are right. Since yupp is a third layer, yupp is able to generate C macros, for example: ($define,,assert_bit_mask( value, mask, op ),,($do ] bool test = ((( value ) & ( mask )) == ( mask )); if ( !test ) {
8.
▲
Show HN: Yupp, yet another C preprocessor
(github.com)
26 points
by
in4lio
11y ago
|
9 comments