4 ms·
PreScheme was a LISP to replace C for low-level programming. Used manual, memory management instead of GC. Very fast and efficient. http://citeseerx.ist.psu.ed
by nickpsecurity 10y ago
PreScheme was a LISP to replace C for low-level programming. Used manual, memory management instead of GC. Very fast and efficient.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.3.4031&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.3.4...
Formally verified plus a Scheme48 interpreter as part of VLISP project.
https://en.wikipedia.org/wiki/PreScheme https://en.wikipedia.org/wiki/PreScheme
ATS has no garbage collector that I'm aware of. I've seen it used in device drivers and 8-bit MCU's.
https://en.wikipedia.org/wiki/ATS_(programming_language) https://en.wikipedia.org/wiki/ATS_(programming_language)
LinearML is GC-less, functional, parallel programming.
https://github.com/pikatchu/LinearML https://github.com/pikatchu/LinearML
So, functional languages neither require GC's nor infinite memory. Two also combined low-level efficiency with easy, formal verification vs C programs. So, that's higher mapping of idea to code, high efficiency, and better safety all at once.
"You can’t just place a LISP book on top of an x86 chip"
I believe I just did with PreScheme. Microsoft goes further to straight-up use a theorem prover to do x86 coding.
http://research.microsoft.com/en-us/um/people/nick/coqasm.pdf http://research.microsoft.com/en-us/um/people/nick/coqasm.pd...
- valarauca1 10y agoWell yeah but these languages aren't purely functionally which was what the original discussion was centered on. If you throw imperative elements into FP they're very useful yes. But you've broken the functional paradigm. Also if all these things are amazing why aren't anyway using them?
- nickpsecurity 10y agoLambda Calculus and Turing Machine are equivalent in power. You can, as many academics have, model imperative programs as functional ones. You can compile functional programs, as almost all compilers do, to imperative code in C or assembler. We often make the distinction on syntax and structure a bit but they're both passing state into functions that optionally produce state. Edit to add that my forays in hardware show it's all functional (analog) underneath: mathematical functions running continuously without memory emulating abstract machines. "Also if all these things are amazing why aren't anyway using them?" Social and economic factors as usual. See Gabriel's essay Worse is Better: https://www.jwz.org/doc/worse-is-better.html https://www.jwz.org/doc/worse-is-better.html Just take C language. I have its history in detail and with citations. It was literally an engineered language chopped up to run on bad hardware, chopped again with arbitrary alterations on bad hardware, and slightly extended for bad hardware again. Most people had bad hardware. Worked good on that. Spread like a virus with gradual improvements. Still nowhere near what engineered languages can pull off in various tradeoffs to consider. Yet, almost everything is written in it now thanks to it working on half-assed hardware, a MULTICS chop called UNIX doing so, UNIX distributed freely, and UNIX written in C. Social & economic factors spread it like a virus plus improved it to approximate solutions designed under cathedral model with better properties. http://pastebin.com/UAQaWuWG http://pastebin.com/UAQaWuWG Meanwhile, alternatives sprang up that kicked both their butts in capabilities. The LISP machines, functional's answer to whole systems, had a flow and consistency you still can't match with modern stacks. B5000, a HW/OS combo designed for safe languages, would've given hackers hell. Amiga's combined SW and HW offloaders for excellent performance... like today's servers & game consoles. BeOS screamed in concurrency, multimedia, and ease of use while popular Windows and Mac boxes couldn't do but a fraction of it. AS/400's and VMS boxes ran, ran, and then ran some more with at least one person forgetting how to reboot them haha. Some in high-security survived NSA pentesting while things that get easily smashed by amateurs prevail today for security-critical work. I think it's clear a language or system's technical superiority has almost no causal relationship with mainstream adoption by laypeople or technical people. Actually and sadly, it's usually better to bet on Worse is Better approaches with slight improvements for success or adoption. Occasionally, you can bet on The Right Thing with a win as Mozilla is doing with Rust. Heck, even Burroughs B5000 lives on in Unisys mainframes. OpenVMS lives on in Windows NT family as it cloned it for desktops minus strong focus on quality (sighs). ZeroMQ is a good example in middleware. Nix applying database-style principles to package management. Technically superior stuff occasionally mainstreams but not often. Human nature usually wins. :(