Husband, father, kabab lover, history buff, chess fan and software engineer. Believes creating software must resemble art: intuitive creation and joyful discovery.
Views are my own.
Husband, father, kabab lover, history buff, chess fan and software engineer. Believes creating software must resemble art: intuitive creation and joyful discovery.
Views are my own.
Bubble sort an ArrayList in bjForth
Bubble sort an ArrayList in bjForth
bjForth v0.0.3 is out!
bjForth v0.0.3 is out!
#bjForth v0.0.2 is here!
#bjForth v0.0.2 is here!
#bjForth v0.0.2 is here!
bjForth Java Interop
bjForth Java Interop
bmakelib v0.8.0 released!
bmakelib v0.8.0 released!
AssertJ's custom assertions
AssertJ's custom assertions
Future of lemmy-meter
My Experience with ADD, Depression, and Correspondence Chess
My Experience with ADD, Depression, and Correspondence Chess
Opening Master database
My fellow software engineer, It's the year 2024...
My fellow software engineer, It's the year 2024...
euler-cl now tracks coverage with Codecov
Not really I'm afraid. Effects can be anywhere and they are not wrapped at all.
In technical terms it's stack-oriented meaning the only way for functions (called "words") to interact with each other is via a parameter stack.
Here's an example:
: TIMES-10 ( x -- y ) 10 * ; 12 TIMES-10 .S 120TIMES-10is a word which pops one parameter from stack and pushes the result of its calculation onto stack. The( x -- y)is a comment which conventionally documents the "stack effect" of the word.Now when you type
12and press RETURN, the integer 12 is pushed onto stack. ThenTIMES-10is called which in turn pushes10onto stack and invokes*which pops two values from stack and multiplies them and pushes the result onto stack.That's why when type
.Sto see the contents of the stack, you get120in response.Another example is
5 10 20 - * .S 50This simple example demonstrates the reverse Polish notation (RPN) Forth uses. The arithmetic expression is equal to
5 * (20 - 10)the result of which is pushed onto stack.PS: One of the strengths of Forth is the ability to build a vocabulary (of words) around a particular problem in bottom-to-top fashion, much like Lisp. PPS: If you're ever interested to learn Forth, Starting Forth is a fantastic resource.