3 ms·
metadat@zukrfukr:/src/dozer$ \ wc -l $(find . -name '*.c') 280 ./src/item.c 851 ./src/lex.c 166 ./src/parser.c 107 ./src/libdozer.c
by metadat 2y ago
metadat@zukrfukr:/src/dozer$ \
wc -l
$(find . -name '*.c')
280 ./src/item.c
851 ./src/lex.c
166 ./src/parser.c
107 ./src/libdozer.c
103 ./src/resolve.c
167 ./src/path.c
219 ./src/traverse.c
91 ./src/scope.c
144 ./src/qbe.c
134 ./src/map.c
1045 ./src/expr.c
266 ./src/nhad.c
349 ./src/emit.c
92 ./src/main.c
231 ./src/type.c
223 ./src/pattern.c
97 ./src/typemap.c
224 ./src/token.c
148 ./src/util.c
141 ./src/stmt.c
5078 total
5kloc is pretty light for a `rustc', where are the tests showing what aspects of the grammar ar supported so far in @notgull's crowning achievement ? The article might be longer than the source code, which would be extremely impressive if the thing actually worked :)
I was not able to compile tokio with dozer.
For comparison, turn towards the other major lang HN submission today: a Golang compiler written in PHP; It comes with extensive tests showing what works and what does not. Somehow even the goroutines are working.. in PHP.
Golang interpreter written in PHP - https://github.com/tuqqu/go-php https://github.com/tuqqu/go-php - https://news.ycombinator.com/item?id=41339818 https://news.ycombinator.com/item?id=41339818
Godspeed.
- School-Cotton 2y agoThe project isn’t complete. It can only build trivial examples, definitely not something like tokio.
- remram 2y agoThe goroutines are working in that they execute, they are not concurrent.
- metadat 2y agoIt's only a `#include <pthread.h>' away. *grin*
- csb6 2y agoFrom the article: > But so far, I have the lexer done, as well as a sizable part of the parser. Macro/module expansion is something I’m putting off as long as possible, typechecking only supports i32, and codegen is a little bit rough. But it’s a start. So it is currently nowhere near complete (and the author never claims otherwise).