paolomarrone / Zampogna

Ciaramella compiler
Other
25 stars 1 forks source link

Add D language generation. #3

Closed p0nce closed 2 years ago

p0nce commented 2 years ago

This PR adds D generation if you are interested.

Nice piece of software! Does it manages arbitrary non-linearities?

This PR changes the C++ output a bit, number literals are now 2.0f instead of 2.f because the latter is not valid D.

By contributing this PR, I relinquish in perpetuity all copyrights, author rights, and patrimonial rights of the submitted following code to the detriment of my heir, and to the benefit of Orastron Srl.

paolomarrone commented 2 years ago

hello @p0nce, sorry for the late reply (extremely busy days). I really thank you for your contribution, any addition of this kind is extremely welcome. I am surely going to merge it, I'll just wait some days to wait for some ok from our lawyer (you know, Italian law barely knows of the existence of computers and internet).

I'll keep you updated. Paolo

Ps: the fact you managed to work on my highly undocumented code is great.

p0nce commented 2 years ago

Hi! Or course take your time.

paolomarrone commented 2 years ago

hello again. We have finally got that ok and we have merged your addition. Also, we are ready to rapidly accept future pull requests.

Thanks again!

p0nce commented 2 years ago

Great, thanks.

Sorry to insist, for those like me who don't know the first thing about circuits and circuit modelling: does Zampogna help with multiple non-linearities?

paolomarrone commented 2 years ago

I missed your question, sorry. Well, the short answer is no, in the sense that it is unaware of the mathematical meaning of the code, so it does not try to optimize anything in that sense. The language just lets you (easily) describe a system in a declarative fashion and if there are no delay free loops it will find a proper order of the instructions/blocks.