3 ms·
Depends. In an embedded system I prefer not to have to install Python at all.
by usr1106 6y ago
Depends. In an embedded system I prefer not to have to install Python at all.
- franga2000 6y agoIn an embedded system (== very limited resources), wouldn't you want to avoid any interpreted language, even shell? We have some very nice languages that compile to machine code these days
- im3w1l 6y agoBASIC is 56 years old. Computers back then were not very fast, but interpretation was still viable.
- usr1106 6y agoHave used it on 7KB RAM :) But to be fair the interpreter was in ROM, no idea how big that was.
- teddyh 6y agoROM was usually very slow, so all ROM content was usually copied to RAM before execution. RAM size was therefore still an issue.
- usr1106 6y agoI am pretty sure the PET-2001 didn't do that. 8 KB was all it had, about 1 KB was used by the operating system and 7 KB where available for programming. Actually something you would call byte code today, every basic command was 1 Byte. Just don't use labels with 4 or 5 characters, that wastes a lot of space! The first models came even with 4 KB RAM / 3 KB usable. Have never seen one of those, though.
- colonwqbang 6y agoIf we're talking Linux embedded and not something like an MCU, then you already likely have a shell installed. So you might as well use it for the things which shell excels at. Shell scripts are much smaller in size than the equivalent C code, for those things that shell is typically used for.
- usr1106 6y agoWell, there is embedded and embedded embedded :) I was talking about embedded Linux here, so 512 MB RAM is not really uncommon, many systems have even more. No problem to run even bash. dash is sometimes preferred for license reasons, busybox ash is smaller, but then programming can probably get more annoying already, because useful features are probably missing. I use dash regularly for scripting (interactive use is a pain), haven't had to use ash for a while. Of course there are much smaller embedded systems. But I don't think they would run Linux.
- alexhutcheson 6y agoRob Landley is working on implementing a full Bash clone (called toysh[1]) in his Toybox project[2]. I'm excited for it to be released - it will be a huge improvement vs. Busybox ash for embedded environments. We'll be able to write scripts that use arrays! [1] https://github.com/landley/toybox/blob/master/toys/pending/sh.c https://github.com/landley/toybox/blob/master/toys/pending/s... [2] http://landley.net/toybox/about.html http://landley.net/toybox/about.html