Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
EV-EV3556yBut here is a sample of the compiled code:
array=[]
for x in range(50):
array.append(0)
ptr=0
def right():
global ptr,array
ptr+=1
def left():
global ptr,array
ptr-=1
def plus():
global ptr,array
array[ptr]+=1
def minus():
global ptr,array
array[ptr]-=1
def dot():
global ptr,array
print(chr(array[ptr]), end='', flush=True)
#do def comma
#YOUR CODE IS BELOW HERE
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
cptr0=ptr
while array[cptr0]!=0:
right()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
right()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
plus()
...
left()
left()
left()
left()
left()
left()
minus()
right()
minus()
dot()
right()
minus()
minus()
dot()
right()
plus()
plus()
plus()
dot()
right()
plus()
dot()
right()
dot()
right()
plus()
dot() -
@EV-EV
Transpiling is when you go source to source, so if you are taking one syntax and converting it to c++ it's transpiling
Compiling is going from source to machine or executable code. -
Use LLVM boi
Though if your overall program ends up with machine code (BF -> C/C++ -> binary) then I'd call it (the whole thing, along with the C/C++ toolchain) a compiler. Plenty of compilers use C as an intermediate representation (such as the old Haskell compilation path). -
elghinn136y@irene primarily != exclusively. Did you read the paragraph that comes right after the one you copied pasted?
Related Rants
Yeet I just made a brainfuck compiler with python
random
compiler
brainfuck