Live data from Hacker News

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

github.com

1–10 of 33 posts

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

#2
some people hate to use C. Some people embrace it, even love it (including many game devs!). You have full control! But i wonder, what do HN folks think about these pico implementations of ruby, a complex language made for the tiniest devices, such as sensors? I mean.. is C really that bad??

also, it's very cool they're still being maintained!

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

#4
post #2

some people hate to use C. Some people embrace it, even love it (including many game devs!). You have full control! But i wonder, what do HN folks think about these pico implementations of ruby, a complex language made for the tiniest devices, such as sensors? I mean.. is C really that bad?? also, it's very cool they're still being maintained!

It is a return to the age when we had BASIC and Z80/6502 Assembly, and yes doing memcpy/strcpy all over the place instead of having proper arrays and strings is that bad.

At very least, C++.

"C++14 For The Commodore 64"

https://www.youtube.com/watch?v=nLv_INgaLq8

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

#5
post #2

some people hate to use C. Some people embrace it, even love it (including many game devs!). You have full control! But i wonder, what do HN folks think about these pico implementations of ruby, a complex language made for the tiniest devices, such as sensors? I mean.. is C really that bad?? also, it's very cool they're still being maintained!

[deleted]

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

#6
post #2

some people hate to use C. Some people embrace it, even love it (including many game devs!). You have full control! But i wonder, what do HN folks think about these pico implementations of ruby, a complex language made for the tiniest devices, such as sensors? I mean.. is C really that bad?? also, it's very cool they're still being maintained!

Then you should use assembly. I mean..is assembly really that bad?

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

#7
256KB ROM/128KB RAM isn't very small.

That is larger than the average computer through about 1990 ...

(I know people will say I'm being pedantic. However, RAM and Flash define most of the price of a microcontroller. So, a factor of two--especially in RAM--means a significantly smaller and cheaper chip.)

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

#8
post #7

256KB ROM/128KB RAM isn't very small. That is larger than the average computer through about 1990 ... (I know people will say I'm being pedantic. However, RAM and Flash define most of the price of a microcontroller. So, a factor of two--especially in RAM--means a significantly smaller and cheaper chip.)

Depends on use case for sure, though I'm not sure why you'd want an interpreted language on a microcontroller unless you had plans to be able to execute dynamically loaded code in the field, which probably means it has some kind of network connection, and 256KB ROM/128KB RAM isn't too big for your Espressif chips and such.

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

#10
post #7

256KB ROM/128KB RAM isn't very small. That is larger than the average computer through about 1990 ... (I know people will say I'm being pedantic. However, RAM and Flash define most of the price of a microcontroller. So, a factor of two--especially in RAM--means a significantly smaller and cheaper chip.)

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 typically need to program using a relatively low level language.

I think it's neat.

Edit: I was trying to remember our computer then. I think we already had an Amstrad PC1512 with 512KB of RAM by '87 or '88, and by 1990 the 286s with 1 or 2MB of RAM were already common.

Post reply on HN