Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: lookitsan00b on December 09, 2010, 09:57:23 pm

Title: FALSE
Post by: lookitsan00b on December 09, 2010, 09:57:23 pm
In direct opposition to the BF interpreter, I give you the FALSE interpreter! (beta 0.7903) Written in TI-Basic, it has to be the fastest TI-Basic based language ever :w00t: (except BF, but easier to write code for and read)

The official command set is:

arithmetic operations: +-*/_
Logical operations: =>&|~
Stack operations: $%\@ø
variables ops: :;
program control: []!?#
strings/chars ops: " '
and IOStream commands: .,^ß
What do these random symbols do? (http://en.wikipedia.org/wiki/FALSE)

I have currently implemented: +-*/_=>~:;.,[]! (replaced _ with (-), ; with r, and ~ with =\=)
Working on: #. I'll use w (that's the graphing variable)
I need good symbols to replace: &|$%\@ø and maybe ß (not sure what it really does)

EDIT: ' and " are fully functional, and ^ is mostly working. I decided to use ()'s for double quotes.

Oh, and sample code: (doesn't work in current release)
(Pick a numbar)0,':,^A:1 1:1 2:(Guess the numbar  )1 1:1 2:[0,':,^Ar=~[0,(Nope!)Br!]?]B:Br!0,(You win!)
...where ~ is the not equal sign
Title: Re: FALSE
Post by: DJ Omnimaga on December 10, 2010, 02:21:31 am
Interesting, I should maybe try this when I have time, although Idk when, since christmas rush is approaching at work. X.x
Title: Re: FALSE
Post by: Builderboy on December 10, 2010, 02:29:21 am
Awesome!  I love these little mini languages :D Why is it called False?
Title: Re: FALSE
Post by: lookitsan00b on December 10, 2010, 04:52:13 pm
I have now implemented: +-*/_=>~:;.,[]!#ß\$ (replaced _ with (-), ; with r, ~ with =\=, # with i(imaginary), ß with o, \ with e(euler's constant), and $ with pi)
I need good symbols to replace: &|%@ø

I figured out what ß does, but decided it was useless in the current setup, and replaced it with a clrHome/cursor reset. Basically the same.

Due to speed problems, I think I'll add '.FALSEINT' to the beginning ;)
You'll still have to run from an external string, though.

Screenshot of speed, and an attempt at the awesomeness of WFRNG. oh and the part where the numbers go faster is when I enabled warp mode on wabbit wow apparently wabbit maintains screenshot speed even in warp mode... but it runs a little slower on-calc.

Awesome!  I love these little mini languages :D Why is it called False?
Well, according to the author, its because that's his favorite truth value. :P
Title: Re: FALSE
Post by: meishe91 on December 10, 2010, 09:31:33 pm
Huh, interesting. I've never heard of FALSE before. Honestly I've never understood esoteric languages or how they work or anything :P (Not that I've really tried though >.>)

Anywho, that's cool. It seems interesting. Good luck on it.
Title: Re: FALSE
Post by: ztrumpet on December 10, 2010, 10:40:28 pm
That looks cool.  Nice job! ;D
Title: Re: FALSE
Post by: lookitsan00b on December 11, 2010, 12:04:31 am
Huh, interesting. I've never heard of FALSE before. Honestly I've never understood esoteric languages or how they work or anything :P (Not that I've really tried though >.>)

Anywho, that's cool. It seems interesting. Good luck on it.

Thanks. I'll need it. Sure, its a stack-based language, but who would've guessed porting it to Axe would involve so many Asm(E5)'s and Asm(E1)'s?

Btw, anybody know dim(L1) off the top of their heads? ??? No current access to the documentation...
Title: Re: FALSE
Post by: nemo on December 11, 2010, 12:17:03 am
dim(L1) returns the dimensions of L1. so if L1 = {3,6,2}, dim(L1) = 3.

or do you mean axe?
Title: Re: FALSE
Post by: lookitsan00b on December 11, 2010, 12:20:26 am
dim(L1) returns the dimensions of L1. so if L1 = {3,6,2}, dim(L1) = 3.

or do you mean axe?

Yeah I needed to know how big L1 is in Axe. Found it, tho. 712, if my math is correct.
Title: Re: FALSE
Post by: nemo on December 11, 2010, 12:21:49 am
oh. i was going to say, there's no dim(L1) in axe. but yeah it's 712 bytes.
Title: Re: FALSE
Post by: lookitsan00b on December 11, 2010, 01:11:47 pm
well, a bit of an update:

wow. so far, absolutely no crashes. Not even when I abused the stack (ie pushed something and didn't pop it, or tried to pop an empty stack(1)) All I've got so far is bugs :(

Had a couple problems with inline numbers and numeric output. that fixed easily enough(and my numbers display as signed 16-bits with no extra padding!)

my () and ' commands so far only support 1-byte tokens. that'll just be annoying to fix.(2)

my ^ command is having fun :P A continuous scrolling 1 until you press a key, when it spits out garbage. I know one of the Fix commands fixes that (or part), but I still do want it to scroll down when it hits the bottom... (I think). Either way, the garbage reminds me of b_call(_puts) with a random hl, but I am using >Tok... (still does the garbage when i stopped it from scrolling) :banghead:

getkey is the same numbers whether or not I use parentheses, right? cause alpha (48) doesn't seem to be working.

Also, I'm still using 0.4.5 :P

Also, my strings are displaying vertically(3) :P

Spoiler For Spoiler:
(1): This doesn't mean Axe cleans it up for me. I'm not taking that chance. It just means my stack-length variable is working.
(2): Cue get_token subroutine...
(3): Apparently I missed one Output( command when switching from TI-Basic
Title: Re: FALSE
Post by: lookitsan00b on December 12, 2010, 04:24:47 pm
after an extremely confusing error with looping (lol I forgot a S-1->S in my greater than command, S is my stack length var) I think it is now fully crash-free! the only bug I can think of is in my input routine, my non-alphanumerics are outputting the wrong symbols... (ie parentheses, spaces, periods, +/-*, etc)

it runs WFRNG really REALLY fast now. also, clear will automatically exit any infinite loops (need Axe 0.4.6 so I can use ON :P )

and I'm wondering how exactly to code (in FALSE) something that modifies my cursor location. the memory spots are 1-byte, and all variables/stack entries are 2. (at least the coordinates are right next to each other :P) Should I find a way to do that, real games (other than WFRNG) may actually be possible :w00t:

oh and sorry, no access to DispGraphrr Actually, I think I blocked access to everywhere except L1 (the cursor coords are at {L1} and {L1+1}, vars start (I think) at {L1+2})
Title: Re: FALSE
Post by: lookitsan00b on December 13, 2010, 09:08:09 am
ok finally a meaningful post in this topic! :w00t:
(I really love that smiley, if you couldn't tell)

Finally, I have happened upon a stable version of the interpreter (bug-free, except when you push random buttons with ^) and enough time to share it with you!

Gone are the days when you had to run everything from Str1!  Now you simply slap it into a program and select it from a menu when you run the interpreter!  Due to the need for a unique header, I have decided upon "<insert description here>" (including the < and >, but replacing the description with whatever else) You (or the person running your program) can quickly and easily access the description by pushing ALPHA while selecting your program from the menu.  This same header could easily be used to specify filename if I make a compiler, probably by inserting a comma or hyphen between the description and it.

So, to make a program run with this interpreter:
 the program has to start with <, and must have a > before any valid code. the stuff in between will be displayed when the user pushes ALPHA, so make it relevant. (there doesn't have to be anything)
 All whitespace is ignored, except with the ' and ( commands, and then it is outputted as spaces. Sorry.
 Comments, for now, can be in lowercase characters. The interpreter will ignore these.
 Don't do anything illegal like popping an empty stack, it'll crash. Don't leave the stack full either, it's bad manners :P

thus concludes my release of v.9469... oh yeah a screenie and the files :P
Title: Re: FALSE
Post by: Yeong on December 13, 2010, 09:09:53 am
hmm..
WFRNG in the menu...
I gotta try that  ;)
Title: Re: FALSE
Post by: lookitsan00b on December 13, 2010, 09:10:43 am
oh yeah I included example programs in the .zip ;)
Title: Re: FALSE
Post by: DJ Omnimaga on December 13, 2010, 08:15:16 pm
Seems pretty good, I'll have to try the example programs at one point and check the language code :D