News for hackers. Stuff that matters.
Re:Show HN: A compiler and VM for a simple language, in 150 ... by shadowofneptune on Saturday July 16, 2022 @07:47PM (#32123004)
One question: what is the binary size of the compiler?
Re:Show HN: A compiler and VM for a simple language, in 150 ... by p4bl0 on Saturday July 16, 2022 @09:19PM (#32123516)
The native binary produced by ocamlopt is 917KB, the bytecode produced by ocamlc is 156KB.

I must admit I didn't expect such "big" files.

Out of curiosity I tested to compile a completely empty OCaml program: the native binary is 365KB and the bytecode is 21KB.

Re:Show HN: A compiler and VM for a simple language, in 150 ... by l33t2328 on Saturday July 16, 2022 @11:47PM (#32124321)
I don’t know much about OCaml but one reason could be linking unnecessary libraries
Re:Show HN: A compiler and VM for a simple language, in 150 ... by chrisseaton on Sunday July 17, 2022 @05:12AM (#32125463)
Presumably you’re linking in a large GC etc?