shinh / elvm

EsoLangVM Compiler Infrastructure
MIT License
1.13k stars 141 forks source link

More details on the README with usage instructions #89

Open aklingam7 opened 4 years ago

aklingam7 commented 4 years ago

A simple example of a *.c to *.eir and *.eir to *.bf or *.py might help

kneelian commented 3 years ago

Reading the slides of the author tells me approximately this:

You should first make the folder. Assuming it succeeds, you get out/8cc the compiler, out/eli the interpreter and out/elc that does the conversion.

out/8cc -Ilibc -S prog.c -o prog.eir this compiles prog.c to prog.eir out/eli prog.eir this runs the IR source out/elc -bf prog.eir > prog.bf this compiles the IR to Brainfuck

I have not tested this suite, planning to now

kneelian commented 3 years ago

I have just tested it, it is working as intended. The .eir output file from a simple printf("Hello, world!") is ~160KB, the converted .bf output is ~13 MB. Use a good interpreter. Do note that the make will fail if you only download the source as a .zip; you have to check it out through git

megapro17 commented 2 years ago

This shit is not documented at all. It even has outdated list of supported backends. But there's all options https://github.com/shinh/elvm/blob/a79315d63b09bce3b7384df36617c1f2f90d422b/target/elc.c#L68

qaziquza commented 2 years ago

I fell like calling it "shit" is a bit much. This repo is a work of genius. I agree the docs could be better, but really, a LISP in bf??? That is awesome!

francogrex commented 1 year ago

Indeed it is extremely poor in terms of documentation: how to build and how to use...

francogrex commented 1 year ago

I have just tested it, it is working as intended. The .eir output file from a simple printf("Hello, world!") is ~160KB, the converted .bf output is ~13 MB. Use a good interpreter. Do note that the make will fail if you only download the source as a .zip; you have to check it out through git

or download the zip and complement the links that are missing.