Posts tagged DRAFT
rPY: Use (r)Python as backend
- 2023/06/25
When designing a Castle-Compiler with a C-backend, we found some nasty details unrelated to CCastle
but to the C-language. For example, C has no namespaces (see No Name Collisions); we can simulate them, but
that is extra work. Likewise, we need to generate many (data)classes that are very similar. Again, it is
possible, but it takes a lot of work: to write the code that generates those almost codes.
Therefore, I started to think about how we can automate that. Or: who has done it before, and what can we borrow?
PyPy –an alternative Python implementation– has developed a concept for
that! They have built a translator to convert (r)Python into C and
compile that into native machine code.
Can we re-use that? And can it help to realize the “first (bootstrap) compiler” faster?
Heisenbugs
- 2023/04/08
In Castle, one can dynamically connect components and send “events” over those connections. Typically this is done as an action on an incoming message (see: The Actor Model). And depending on ‘The Machinery (ToDo)’, those events can be queued. It is this combination that can result in a beautiful Heisenbug.
First, let’s explain the Heisenbug, before we give an example. Then we analyze it, show how to improve the code, and finally formulate a requirement to prevent & detect this kind of bug in Castle.