4 ms·
Can you say what would be a complex extension to you? vc.el, erc, ediff, slime are doing well with elisp... In some way also, the most complex the extension,
by swah 16y ago
Can you say what would be a complex extension to you?
vc.el, erc, ediff, slime are doing well with elisp...
In some way also, the most complex the extension, the more reasons you have to use a higher level language, no?
- jrockway 16y agoSure, you can manage with elisp, but it's not always the best possible way. The UNIX folks built a pretty good OS in C, even though C is a terrible language for writing an OS in. Have you ever used Gnus? Have you noticed that if you have more than 10 message in an mbox or 100 in a maildir or 1000 on an IMAP server that it becomes unusably slow? Profile, and you'll see all the time is spent doing the parsing in elisp. Having the option of using a different language that compiles to native code would make these extensions faster and equally easy to write. Use elisp for the stuff that the users are going to play with; drop down to Haskell for the data structures that manage the mail. Best of both worlds. People are always able to bend their tools to perform the work they want them to do. Ever use a flathead screwdriver to turn a phillips-head screw? It works. But it's a lot easier when you use the phillips-head screwdriver.
- adbge 16y agoC is a terrible language for writing an OS in. No, just no.
- jrockway 16y agoYour mp3 player and calendar need raw access to registers and the memory allocator? No, just no.
- deleted 16y ago[deleted]
- nfg 16y agoAn mp3 player and a calendar are not operating systems. If your contention is that C is terrible for actual OS development you'll need a better argument.
- loup-vaillant 16y agoUNIX gives top-level (userland, not root) programs a "raw access to registers and the memory allocator". Incredibly low level things which aren't needed, and are a source of errors, some of which are security breaches. This is bad™. The question is "why did they do that" ? The most obvious answer is C: If you write your OS in C, you will most likely make C-like APIs, which don't properly hide low-level stuff, but are easier to implement (the "Worse is Better" principle).
- ars 16y agoWait, you want the OS to do memory allocation of individual variables and garbage collection? And if you are writing X86 code you don't have a choice about register access - and why is that a problem anyway? Do you want an OS that is actually a virtual machine? I don't. I want an OS that lets me use my CPU. > If you write your OS in C, you will most likely make C-like APIs, That's a fundamental misunderstanding. The API are written for the _hardware_. Did you forget there was an actual computer in there? It's nice and all to go high level, but at the end of the day you have a CPU and memory and you need to use it.
- loup-vaillant 16y ago> Wait, you want the OS to do memory allocation of individual variables and garbage collection? Almost, if not outright yes. Current OS'es already do manage memory in some ways, so they could as well do more work, so you don't have to re-invent that wheel every time you write a new compiler. Having a full blown virtual machine as an OS actually sound very promising : you can for instance migrate from X86 to ARM transparently, re-compiling nothing but the kernel. You can reduce hardware support for fancy features, simplifying it. Now, a good enough compromise could be a layer of compatibility for a garbage collected language. And we already have plenty of these. > The API are written for the _hardware_. You got that backwards. The API is written for humans to use the hardware. If the hardware is complex and quirky, it's the job of the API to make it simple and straightforward. It's nice and all to go low level, but at the end of the day you have to get things done. You sound like you need every last drop of performance out of your CPU. When you really do, then you may want to do your work in kernel space with no runtime check at all. But most of the time, you don't. To sum up, an OS written in C will most likely have a C-like API (I note that you didn't disagree with that). There's still the high-level vs low-level debate, but it basically has the same structure as the GPL vs BSD debate. I prefer high-level and GPL, on the grounds that they eventually enable more. You seem to prefer low level (and BSD?), on the grounds that they permit more (which is not the same at all). We could go on, but if we actually disagree on that point, I don't know how we could convince each other.