Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a lolcode compiler for x86 or x86_64?

Tags:

On the lolcode website I saw many references to various lolcode interpreters. But is there a lolcode compiler for the x86 or x86_64 architecture, that compiles directly to native machine code?

I have looked at several interpreter implementations, including Lci, lolcode.net (compiler to .NET), and lolcode interpreters in Python, Java and JavaScript. None of these do what I want.

Part of my rationale for asking is that if no such compiler exists, I may be interested in working on one, possibly by writing a LOLCODE -> C translator, and then leveraging a C compiler such as GCC to target native architectures.

like image 275
DejanLekic Avatar asked Nov 24 '11 20:11

DejanLekic


1 Answers

Apparently there were at least two attempts of translating lolcode to LLVM bytecode

  • https://github.com/meh/llvm-lol
  • https://github.com/scooby/lolcode

Having LLVM bytecode you can easily translate it into optimised target architecture's assembly by using for example llc and get native binaries out of it.

As a matter of fact, you can also generate JavaScript using this approach.

Have fun.

like image 50
Jan Avatar answered Oct 13 '22 05:10

Jan