I want to add #multithreading in my custom language compiler.

When run it currently compiles all source files one-by-one, but I feel like I could run 3 threads and each can compile a third of the source files, similar to the "-j" argument in #make .

I don't want to deal with thread-related errors though ..

#c #compilerdev

I made a toy compiler for mini caml pretending to be a lisp :)
https://github.com/madwareru/MiniCamlFSharp #fsharp #compilerdev
GitHub - madwareru/MiniCamlFSharp

Contribute to madwareru/MiniCamlFSharp development by creating an account on GitHub.

GitHub

The technical arguments I see about the form of generics e.g <T>
vs [T] are so full of shit it's insane it's an aesthetics argument plain and simple there's nothing technical about it aside from the fact people suck at writing parsers "Ohh how do you disambiguate Foo<K, List<T>> because >> is token"... is one of the dumbest things I've ever had said to me. I dunno learn how to write a parser.

#compilerdev #languagedev

The combinator pattern is extremely cool case study #5371:

Here's an entirely automatically generated railroad syntax diagram for the JSON parser example that comes with my parser combinator library Chumsky (https://github.com/zesterer/chumsky/).

This works for arbitrary parsers, with no additional work needed on the part of parser authors.

If you've written a parser with Chumsky, you'll be able to call just a single function to get a similar diagram for your grammar. #rustlang #plt #compilerdev

TIL that you can't perform an assignment in the second branch of a ternary operator because ternary has higher precedence than assignment.

On a related note, I'm pretty happy with how my toy C compiler reports errors now—it almost looks like GCC and Clang, at least for these simple cases.

#PLdev #compilerdev

Built my first lisp (after already having started writing two compilers xD) in #zig! Mainly to test out the language, but it was much fun anyway.

It also got a few ideas for my own language for a few functional programming things :D

I enoyied the most the memory checking zig does, be it leaks, use-after-free or double-free, which makes this project the most easy to be memory-safe out of all my native (c-like) projects whithout multiple days using #valgrind xD

#foss #oss #opensource #programming #langdev #lisp #coding #c #c++ #zig #functionalprograming #compilerdev

sexpr-zig

A small lisp implementation in zig

CodeArq

Just released my attempt on reimplementing the dlang language with an modern codebase, focused on modularity & clearity of the code: https://codearq.net/mdc/mdc

Currently only the parser is implemented, which can completly parse the libphobos & its own source. Next steps would be to move the ast into it's own package (it's currently part of the parser), as well as implementing the semantic analysis, typechecker and IR.

#dlang #mdc #code #coding #programming #development #langdev #compilerdev

mdc

Heart of the mdc, the compiler!

CodeArq

Yay, I finally got the #dlang #parser to parse (without any exception or segfault) itself and the libphobos standard library! Next step is either start working on the IR or to increaset source-to-source compability to actually check if everything is parsed in a correct order and/or to enable usecases such as documentation tools and formatters.

Performancewise it's not that bad either; it parses all 314k lines of libphobos in ~5.5 seconds.

#dlang #compilerdev #langdev #PLDev #programming #programminglanguages #coding #development

This post was automatically scheduled on the 27th of December at half-past midnight to post 3 months into 2024 - if this is here then it means I made proper progress with the T programming language compiler and I am now very happy about it.

#tlang #compilers #t #compilerdev