Live data from Hacker News

Mruby/C and picoruby: high level langs in low-level devices?

github.com

31–33 of 33 posts

Re: Mruby/C and picoruby: high level langs in low-level devices?

#31

Earlier quoted context omitted.

Yeah, but 1990 was 35 years ago and Ruby even didn't exist. And the average computer was quite bigger than a RP2040, and consumed much more power :) I mean, it's very difficult to compare those things. It's a high level language runtime weighting a very small fraction of the JavaScript we're loading on any silly webpage, and we can run in on an stamp sized microcontroller that costs a couple dollars and you'd typical…

i share the same sentiment as you. why suffer writing C when one can enjoy the fruits of language features? it's certainly not optimal, but neither is 99+% of software nowadays. There's the feeling of waste and bloat, but the trade-off is language features! on the other hand, nowadays, we can just generate C code using ai.. as long as the project doesn't get too big to grasp without abstractions. ;)

And we only had ASM for microcontrollers in 1990! (Or mostly, I think C PICs didn't arrive till later). And the tooling was terrible!

I don't hate those languages or think they shouldn't be used, but I don't know how to use them and I already know Python, so if I can easily do MicroPython on a microcontroller, I welcome it :D

Re: Mruby/C and picoruby: high level langs in low-level devices?

#32

Earlier quoted context omitted.

i share the same sentiment as you. why suffer writing C when one can enjoy the fruits of language features? it's certainly not optimal, but neither is 99+% of software nowadays. There's the feeling of waste and bloat, but the trade-off is language features! on the other hand, nowadays, we can just generate C code using ai.. as long as the project doesn't get too big to grasp without abstractions. ;)

And we only had ASM for microcontrollers in 1990! (Or mostly, I think C PICs didn't arrive till later). And the tooling was terrible! I don't hate those languages or think they shouldn't be used, but I don't know how to use them and I already know Python, so if I can easily do MicroPython on a microcontroller, I welcome it :D

And we only had ASM for microcontrollers in 1990!

Who is this 'we' you are talking about?

Jovial and CORAL-66 had been compiling for various microcontrollers and embedded systems since the 1970s. In the '80s, Ada took over that space.

By 1990, the 8051 (probably the most common uC at the time) had several C compilers, PL/M, at least 1 BASIC compiler, a Pascal, PL/M and several more. Some of those were years old by 1990. There was at least 1 Modula-2 compiler for the 8051, but that might have been a few years after 1990.

Keil, IAR and Tasking went on from 8051 C compilers to write compilers for dozens of microcontroller targets by 1990.

There were C compilers from others for 8096 (multiple vendors), TMS320xx and TMS340x0 (TI), 68xx (Hitachi), ADSP-2100 (Analog Devices), and more.

Intel had PL/M compilers for 8048, 8051 and 8096. Gary Kidall ported a PL/M subset compiler to the Signetics 2650, if you want something really obscure. Green Hills had Pascal compilers for a couple of embedded procs (i960, anyone?).

Lots more I've forgotten.

Re: Mruby/C and picoruby: high level langs in low-level devices?

#33
post #23

I'm the developer of Juniper, a functional reactive programming language for the Arduino. It's very possible to run high level code on small devices. This even includes things like closures, which Juniper allocates on the stack! https://www.juniper-lang.org/

eyyyyy F#! microsoft's best language.

hmmm, transpiling to C/C++ def makes sense! I'd wonder if haxe (lang) would work fine too then..!

very cool project!

Post reply on HN