exyi / anyexec2C

converts anything executable to C, C# or Python code
18 stars 2 forks source link

Just wanted to say - it’s very interesting.. but #7

Open DmitryOlshansky opened 4 years ago

DmitryOlshansky commented 4 years ago

Hey!

I think compiling down to C code is soooo damn hot and simple. Never thought of that but with tincc it should be super fast...

One thing I want to share with you is the following tidbit, I always put some variation of this boot-loader as the first few lines of valid “C” in my script files:

#if 0
if [ -f /tmp/<hash-of-$0> ] ; then
   exec /tmp/<hash-of-$0>
else
   gcc ... && exec /tmp/<hash-of-$0>
fi
exit 111
#endif

See you around, hope like the idea...

vakabus commented 4 years ago

Hi!

I love the boot-loader snippet. It's really neat! Great idea. Adding it to our generated C-code would allow us to add another target language (shell) without changing much. I might try to add it in once I get some free time.