I read this article about the funarg problem, which really is the problem of maintaining a lexical closure environment. This is an old article, and I’m not sure that the author’s conclusions are still being saved, but he strongly implies that in order to have lexical rather than dynamic coverage, you must abandon the traditional C-style stack and instead have a tree-like structure of environments, Allocated from the heap.
Does this make lexically closed closures impossible in any real-time system? in embedded real-time systems, where delays are measured in microseconds, heap distribution is usually prohibited due to the indefinite delay that it introduces.
This is my unforgettable curiosity because I make my bread mostly a firmware developer, where C is a de facto language, and for a while it seems to me that I use my brain ability to figure out how to get C to make me do something which is available for free in more complex languages. Therefore, I began to wonder whether it is possible to implement the microlisp compiler specifically for embedded systems based on microcontrollers with hard real-time mode.
As a side note: I’ve gotten a lot of information lately about deep topics, such as how closures and objects are equivalent, etc., and that gives me a lot of fear of guys like Stallman and Rich Hickey, and Paul Graham. Implementing Lisp from the very beginning seems to me a daunting task. It's hard to know where to start. (Possibly with the PG implementation of the original McCarthy rating function, IDK). Anyway, I'm distracted.
" " - , C , C - . , , . , .
, , .., , , . , . ( , , , C, .) - , - (lambda (x) (* x 9)) - , lift , , , . ( : , C - .)
(lambda (x) (* x 9))
, , , , , . , , , . , ., , GOAL, prescheme. IME , , - , - , , , , . (, , .)
, . :
http://rtportal.upv.es/rtmalloc/
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.106.441&rep=rep1&type=pdf
, - lisp, lua . LISP: , , , .
LuaLua . Tarball Lua 5.1.4, , , 212K 860K . 17000 C. Linux, Lua Lua- 153K, Lua 203K.LuaLua - , ( MIT). , . .
Lua
Lua . Tarball Lua 5.1.4, , , 212K 860K . 17000 C. Linux, Lua Lua- 153K, Lua 203K.
Lua - , ( MIT). , . .