A compiled language based on brainf_ck.
All of HolyF_ck's parsing, tokenizing, AST generating, IR generating, optimizing and compilation code is fully no_std
compatible, which makes it possible to run anywhere, even on bare metal.
HF currently compiles to static, native executables, like ELF binaries and PE executables, and can link to any library that implements the HF calling convention.
this is a comment
:my_function{ this is a function declaration
++++[-] this is normal brainfuck code
}
@my_function; this is an HF function call
++++----><> you can put HF code anywhere
this is a comment
set up the memory for use with ascii
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>
this dot is a stack push operation
which is followed by the function call is a call to an external library function
in this case a putchar function written in rust
.$hf_printchar;
we now modify the memory and print over and over to creat the Hello World string
>---
.$hf_printchar;
+++++++
.$hf_printchar;
.$hf_printchar;
+++
.$hf_printchar;
>>
.$hf_printchar;
<-
.$hf_printchar;
<.
$hf_printchar;
+++
.$hf_printchar;
------
.$hf_printchar;
--------
.$hf_printchar;
>>+
.$hf_printchar;
>++
.$hf_printchar;
now we flush to add a newline
$hf_printflush;