This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
kornichen's profile picture

LymeCode - A small programming language that is using pointers

Started by kornichen, 01 May 2013 - 03:52 AM
kornichen #1
Posted 01 May 2013 - 05:52 AM
Hello!

When GravityScore uploaded his Brainf**k interpreter I tried to do something with it. Some time ago I noticed that there could be some more functions so I developed a programming language like Brainf**k but with some more functions.

Functions

> Increment data pointer
< Decrement data pointer
+ Increment byte of pointer by one
- Decrement byte of pointer by one
* Multiplicate pointer with the pointer below it
/ Divide pointer with the pointer below it
. Output byte of data pointer
, Output byte of data pointer in ASCII
: Accepts byte of input to store in data pointer (Byte or ASCII)
[ Loops are coming soon!
]

Example Code

Preparing for printing text
+++++++++++++>+++++*
>+++++++++++++++>+++++*
>+++++++++++++++++>+++++*
Writing text
<<---,+++
<<++++,----
>>+,,-
++++,----
>>++,--
<<++++,----
>>---,+++
<<+,-
<<+++,---
Explanation:
SpoilerLine 1: Explanation (Comment)
Line 2: Setting Pointer 2 to 65
Line 3: Setting Pointer 4 to 75
Line 4: Setting Pointer 6 to 85
Line 5: Explanation (Comment)
Line 6: Setting cursor to pointer 4, Decrementing byte of pointer by 3, Writing ASCII, Incrementing byte of pointer by 3

Usage
Download LymeCode as shown below and run it with this arguments:

LymeCode <path>
Replace <path> with your LymeCode program.

Download
Pastebin: BPKqaYrC
Type into your computer to download directly:

pastebin get BPKqaYrC LymeCode
darkrising #2
Posted 01 May 2013 - 09:50 AM
:huh:/> Mind Blown.
TheVarmari #3
Posted 01 May 2013 - 01:46 PM
So basically like braineff?
remiX #4
Posted 01 May 2013 - 02:28 PM
:huh:/> Mind Blown.
Indeed, lol.
hmm.. nice?
Mandrake Fernflower #5
Posted 02 May 2013 - 12:24 PM
Clever, Its like BrainF**k but more asm like
superaxander #6
Posted 03 May 2013 - 03:04 PM
I like it
kornichen #7
Posted 04 May 2013 - 03:04 AM
I like it

Thank you. Loops are coming soon.