Earlier quoted context omitted.
My problem with Lua and MicroPython is that your actual code takes up memory, ie even comments. Micropython can now compile to bytecode and load that, though, so it's better. I've had problems with Lua trying to load one or two hundred lines, though.
Lua is perfectly capable of compiling to bytecode and running that as well...
PunyForth: Forth inspired programming language for the ESP8266
41–47 of 47 posts
Re: PunyForth: Forth inspired programming language for the ESP8266
#42This is fantastic! Forth's simplicity is a great fit for exploratory programming on resource-constrained systems, and I'm a fan of anything homoiconic. Maybe one day I'll get my dream of having a forth or lisp with the type system of haskell.
> The Kitten Programming Language
> Kitten is a statically typed, stack-based functional programming language designed to be simple and fast. It is a concatenative language, combining aspects of imperative and pure functional programming. There is an introduction available and a tutorial in progress.
[0] http://evincarofautumn.blogspot.se/search/label/Concatenativ...
[1] http://www.codecommit.com/blog/cat/the-joy-of-concatenative-...
http://www.codecommit.com/blog/cat/the-joy-of-concatenative-...
http://www.codecommit.com/blog/cat/the-joy-of-concatenative-...
[2] https://en.wikipedia.org/wiki/Joy_(programming_language)
Re: PunyForth: Forth inspired programming language for the ESP8266
#43I'm reminded of my good old Forth times (6502 on Commodore PET), and I'm glad that Forth gets the increasing attention which it actually deserves. I don't know if there is any other programming environment at all where you can have a extensible programming language, editor, compiler, interpreter, debugger, libs, and interactive shell in a few KB.
As much as I like Forth, it isn't the only player in the restricted memory arena. Several models of the Commodore PET came with 32kb of RAM, and 18kb of ROM. Here are some that reflect similar requirements. uLisp [0], 2kb of RAM, and 32kb to store the interpreter in. You can write programs at the REPL, and burn them into the EEPROM. TinyBASIC [1], since dead, is a port of the version of BASIC that used to run on the…
Re: PunyForth: Forth inspired programming language for the ESP8266
#44Earlier quoted context omitted.
As much as I like Forth, it isn't the only player in the restricted memory arena. Several models of the Commodore PET came with 32kb of RAM, and 18kb of ROM. Here are some that reflect similar requirements. uLisp [0], 2kb of RAM, and 32kb to store the interpreter in. You can write programs at the REPL, and burn them into the EEPROM. TinyBASIC [1], since dead, is a port of the version of BASIC that used to run on the…
Yes, there are plenty of options. However, most of those options lack something while Forth is all-inclusive. All your options have no compiler while Forth compiles to threaded code which is pretty fast, about 1/10 the speed of assembler according to my experience. Your options have a linear space consumption while Forth code compiles "logarithmic" due to its extensible vocabulary. That means, if you have an 8K syste…
Re: PunyForth: Forth inspired programming language for the ESP8266
#45Earlier quoted context omitted.
As much as I like Forth, it isn't the only player in the restricted memory arena. Several models of the Commodore PET came with 32kb of RAM, and 18kb of ROM. Here are some that reflect similar requirements. uLisp [0], 2kb of RAM, and 32kb to store the interpreter in. You can write programs at the REPL, and burn them into the EEPROM. TinyBASIC [1], since dead, is a port of the version of BASIC that used to run on the…
Yes, there are plenty of options. However, most of those options lack something while Forth is all-inclusive. All your options have no compiler while Forth compiles to threaded code which is pretty fast, about 1/10 the speed of assembler according to my experience. Your options have a linear space consumption while Forth code compiles "logarithmic" due to its extensible vocabulary. That means, if you have an 8K syste…
Though it was a primitive compiler compared to today, due to the size of the language, it easily fit within 2-3kb, which on your 8kb system, would leave 5kb or more for program memory.
In fact, some TinyBASIC systems had a virtual machine and JIT compiler in 120 instructions, or around 2kb, as early as 1964.
Though BASIC is slower than Forth, or was in those days, the main benefit is instant availability. BASIC syntax was the jumping on point for more than a few programmers, myself included, because of it's simplicity.
Re: PunyForth: Forth inspired programming language for the ESP8266
#46Earlier quoted context omitted.
My problem with Lua and MicroPython is that your actual code takes up memory, ie even comments. Micropython can now compile to bytecode and load that, though, so it's better. I've had problems with Lua trying to load one or two hundred lines, though.
Lua is perfectly capable of compiling to bytecode and running that as well...
Re: PunyForth: Forth inspired programming language for the ESP8266
#47Earlier quoted context omitted.
Lua is perfectly capable of compiling to bytecode and running that as well...
Oh is it? It's been a while since I last tried it, I'll have another look, thank you!