Live data from Hacker News

PunyForth: Forth inspired programming language for the ESP8266

github.com

11–20 of 47 posts

Re: PunyForth: Forth inspired programming language for the ESP8266

#11
post #4

This 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.

Aren't these conflicting ideas? To me a big advantage of dynamic type systems is that specifying behaviour and specifying what parts of the behaviour are statically computed are separate tasks.

There are some strongly typed Forths --- although I've never seen one that was out of prototype. Here's one I had a brief look at:

http://www.arestlessmind.org/2009/02/03/intro.html

Of course, since Forths are built around a REPL, to do type checking you need to keep the type objects around at run time, so it may not be suitable for very small systems.

Re: PunyForth: Forth inspired programming language for the ESP8266

#12
post #4

This 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.

Aren't these conflicting ideas? To me a big advantage of dynamic type systems is that specifying behaviour and specifying what parts of the behaviour are statically computed are separate tasks.

Yes, but they are not conflicting in the sense that they are competing to serve the same purpose.

For exploratory programming, dynamic type systems are nice. For building reliable long-running systems or ones where failure is extremely costly, I like static.

Re: PunyForth: Forth inspired programming language for the ESP8266

#15
post #2

Why can't we get Rust for the ESP8266? :( I really dislike C, I'd love a higher-level language. As great as MicroPython is, the interpreter needs too much RAM, and I think Rust would be a great alternative.

What's wrong with Lua? It has first class support thanks to NodeMCU, you can customise your firmware builds to be lean on resources using a dead simple online tool, and it even lets you run code on the ESP8266 in an interactive REPL environment.

Lua is strictly worse than MicroPython, I find. Memory usage is worse, and managing programs on it is bad too, although I haven't used it as much as MicroPython.

Re: PunyForth: Forth inspired programming language for the ESP8266

#16

I am wondering why the team from mbed has not made an attempt to make ESP8266 compliant with mbed. Yes, I understand that the architecture is totally different but just that I like mbed so much so that I want to see it used in more hardware.

The "team from mbed" is employed by ARM.

Re: PunyForth: Forth inspired programming language for the ESP8266

#18
I'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.

Re: PunyForth: Forth inspired programming language for the ESP8266

#19

Earlier quoted context omitted.

What's wrong with Lua? It has first class support thanks to NodeMCU, you can customise your firmware builds to be lean on resources using a dead simple online tool, and it even lets you run code on the ESP8266 in an interactive REPL environment.

Lua is strictly worse than MicroPython, I find. Memory usage is worse, and managing programs on it is bad too, although I haven't used it as much as MicroPython.

Have you seen the eLua LTR (Lua Tiny RAM) patch?

http://www.eluaproject.net/doc/v0.9/en_arch_ltr.html

As for Rust, why do we think that should use significantly less memory than MicroPython or Lua? I've seen some threads with people doing measurements on simple programs and finding Rust up to 10x heavier on RAM than C.

http://stackoverflow.com/questions/32762102/why-do-rust-prog...

Re: PunyForth: Forth inspired programming language for the ESP8266

#20

Earlier quoted context omitted.

Lua is strictly worse than MicroPython, I find. Memory usage is worse, and managing programs on it is bad too, although I haven't used it as much as MicroPython.

Have you seen the eLua LTR (Lua Tiny RAM) patch? http://www.eluaproject.net/doc/v0.9/en_arch_ltr.html As for Rust, why do we think that should use significantly less memory than MicroPython or Lua? I've seen some threads with people doing measurements on simple programs and finding Rust up to 10x heavier on RAM than C. http://stackoverflow.com/questions/32762102/why-do-rust-prog...

If you looked at the link you included you'd see why the Rust version is larger, because they include the static library.

There's nothing about Rust that intrinsically makes it larger than C.

Post reply on HN