Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.

Conversation

@mjdr
Copy link

@mjdr mjdr commented Oct 10, 2021

Translate porth to rust.
That allow for more optimal assembly generation.
And it's fun.
Wrote in same style as compiler and simulator, so its can be ported to porth (theoretically)

TODO

  • Add translate subcommand in help
  • Fix infinite loop in examples/cat.porth
  • Add new operands, intrinsics
  • Drop all dependencies with #![no_std] #![no_main]
  • porth.porth is hanging if sub-command provided

@zrthxn
Copy link
Contributor

zrthxn commented Oct 11, 2021

Correct me if I'm wrong but doesn't this sort of go against the language being self-hosted? If the python compiler generates Rust and then rustc generates assembly... doesn't this make the language not self-hosted?

@mjdr
Copy link
Author

mjdr commented Oct 11, 2021

no, right now
(python) -> asm -> (nasm) -> binary
my translator
(python) -> rust -> (rustc) -> binary
after self hosted
(porth) -> asm -> (nasm) -> binary
(porth) -> rust -> (rustc) -> binary

@mjdr
Copy link
Author

mjdr commented Oct 11, 2021

And it's not simulator, but source code generator

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants