4 ms·
i was going to say something similar. since the problem appears, essentially, to be that threaded programs are difficult to write, perhaps some certain languag
by auvrw 12y ago
i was going to say something similar. since the problem appears, essentially, to be that threaded programs are difficult to write, perhaps some certain language or library with a model of concurrency other than threads would've prevented the problem. but then since this is an embedded system, compiling the entire program down from anything other than C incur too much performance overhead, depending on the toolchain. plus, the article mentions a legacy codebase.
although i have very limited experience with embedded systems, there are points here that i think apply just as well to web programming:
* concurrency is a fundamentally difficult problem that we've yet to find a really great answer to for all domains. just the other day, there was an article about how threads are better than node-style async, but this article is a good description of the kind of difficulties threaded programming presents, so much so that the first and second rules of thread programming, imo, are both "don't use threads."
* since different languages are suited to different problem domains, it seems like the thing to do is rather than choose a "low/high level" language (quotes b/c the distinction is actually for implementations, not languages; don't forget that lisp used to run on bare metal) for an entire program (and deal with the ensuing tradeoffs of performance vs. code clarity, etc.), it ought to be more common practice to write in multiple languages.
so probably not C, but perhaps lua would've helped?
- josteink 12y ago> compiling the entire program down from anything other than C incur too much performance overhead On a system with 32KB ram, I think the biggest concern is the size of the final generated binary. Writing things in C or assembly will allow you to optimize for a smaller resulting image. Using higher level languages with libraries and what not, can considerably add to the generated output, and with a 32KB maximum size, that's a very real concern. And here I thought I was having troubles when I was hacking Android and needed to keep the recovery-kernel for my particular tablet below 5MB. The luxuries of modern day computing, eh? :)