Live data from Hacker News

PunyForth: Forth inspired programming language for the ESP8266

github.com

1–10 of 47 posts

Re: PunyForth: Forth inspired programming language for the ESP8266

#3
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.

Isnt there an axpetimental Rust backend for ARM Cortex? ISTR seeing it discussed here.

Re: PunyForth: Forth inspired programming language for the ESP8266

#5
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.

Did you see the Factor language?

Re: PunyForth: Forth inspired programming language for the ESP8266

#6
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.

Re: PunyForth: Forth inspired programming language for the ESP8266

#7
post #3
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.

Isnt there an axpetimental Rust backend for ARM Cortex? ISTR seeing it discussed here.

The ESP8266 uses an Xtensa core, not ARM.

Re: PunyForth: Forth inspired programming language for the ESP8266

#8
post #3
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.

Isnt there an axpetimental Rust backend for ARM Cortex? ISTR seeing it discussed here.

Rust has Tier 2 support[0] for ARMv6 to ARMv8 and Tier 3 support[1], so there are experimental limited[2] backends for the various Cortex in Tier 3.

However the ESP8266 is built around Tensilica's Xtensa, not ARM's Cortex. There currently is no support whatsoever for Xtensa in LLVM (let alone in Rust).

Current microcontroller work is on MSP430[3] with work being planned for Amtel AVR[4] since the AVR branch was merged into LLVM in November 2016. Xtensa is quite literally nowhere[5].

[0] guaranteed to build & binaries provided but tests are not automatically run

[1] supported in the codebase but no guarantees that it even builds

[2] only Core, no standard library

[3] https://github.com/rust-embedded/rfcs/issues/20

[4] https://github.com/rust-embedded/rfcs/issues/3

[5] https://github.com/rust-embedded/rfcs/issues/2

Re: PunyForth: Forth inspired programming language for the ESP8266

#9
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. For example, the powerful "transducers" concept from Clojure essentially cannot be represented in the Haskell type system.

Re: PunyForth: Forth inspired programming language for the ESP8266

#10
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.
Post reply on HN