Improved Stack-Based Programming Language
Find a file
2022-05-23 10:35:26 +02:00
bootstrap/META-INF move ISBPL.java to root 2022-05-13 19:18:49 +02:00
examples fix hello world 2022-05-17 20:02:49 +02:00
.gitignore more gitignore 2022-03-06 16:36:15 +01:00
bf.isbpl beautify bf.isbpl 2022-05-23 10:35:26 +02:00
COPYING Create COPYING 2022-03-06 20:22:50 +01:00
errorstream.isbpl add time functions, fix errorstream.isbpl 2022-03-06 17:39:49 +01:00
file.isbpl deprecate file.isbpl 2022-05-13 19:12:57 +02:00
hacks.isbpl added a shell 2022-05-02 14:30:08 +02:00
helloworld.bf make brainfuck interpreter 2022-05-23 10:30:53 +02:00
iota.isbpl add callmethod function 2022-04-17 17:40:25 +02:00
ISBPL.java JIO subclasses, java.lang.Runnable integration 2022-05-23 08:32:05 +02:00
LICENSE Create LICENSE 2022-03-06 20:22:20 +01:00
multi.isbpl fix multi.isbpl 2022-05-16 01:53:07 +02:00
README.md Update README.md 2022-05-09 15:24:11 +02:00
setup.sh fix standalone interpreter 2022-05-16 18:27:28 +02:00
std.isbpl stdlib and timelib bugs fixed 2022-05-18 16:43:05 +02:00
stream.isbpl fix stream.readline 2022-05-17 20:47:21 +02:00
time.isbpl stdlib and timelib bugs fixed 2022-05-18 16:43:05 +02:00

isbpl

Improved Stack-Based Programming Language

Incomplete, not currently compilable, only interpretable.

Stuff: TudbuT/isbpl-random-stuff


ISBPL is similar to Lisp:

(print (+ 1 (* 1 2)))

is the same as

2 1 * 1 + print

or

( ( ( 2 1 * ) 1 + ) print )

in both languages, this will print 3.

These examples used the print function, which does not exist by default, instead, puts should be used in combination with _string.


Objects, Functions, and Variables in ISBPL

OOP works like this:

  • There are three separate function resolvers:
    • Object
    • Local
    • (Multiple more levels determined by the frame height)
    • Global
  • They are executed in the order shown above
  • The object resolver peeks onto the stack, gets the type of the object, and checks for methods on the type, if it finds one, it executes it
  • The local resolver checks for functions defined in the current function, but not in any other function or area
  • The global resolver checks for top-level functions, meaning ones that arent in any other function.
  • Because variables are native functions under the hood, they are also called by the function resolvers
  • Object-local variables are in a Table: Type?->Instance?->ID?->Value

To call a method of an object:

parameter1 parameter2 etc object method

As explained above, methods are resolved separately, and it is therefore not required to define them in any other way.