elvm icon indicating copy to clipboard operation
elvm copied to clipboard

More details on the README with usage instructions

Open aklingam7 opened this issue 5 years ago • 7 comments

aklingam7 avatar Oct 06 '20 12:10 aklingam7

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

aklingam7 avatar Oct 06 '20 14:10 aklingam7

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 avatar Mar 05 '21 18:03 kneelian

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

kneelian avatar Mar 14 '21 04:03 kneelian

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

megapro17 avatar Nov 11 '21 02:11 megapro17

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!

qaziquza avatar Nov 11 '21 04:11 qaziquza

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

francogrex avatar Jun 15 '23 12:06 francogrex

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.

francogrex avatar Jun 15 '23 12:06 francogrex