5 ms·
I don't think it's as hackable as Emacs. For one thing, you have to recompile Yi after every change. Sure, it's automated, but with Emacs, the change takes pl
by jrockway 16y ago
I don't think it's as hackable as Emacs. For one thing, you have to recompile Yi after every change. Sure, it's automated, but with Emacs, the change takes place immediately.
(When I write XMonad extensions, I do find the process a little tedious. I have to type my extension, then see if ghci can compile it, then I have to press a key to recompile and reload xmonad, then I can try out my changes. Every. Time. In Emacs, I just press C-M-x and try my change immediately.)
Really, there are two parts to editor extension. Some things are interactive hacks, and some things are structured sub-programs. Things like SLIME and CEDET are sub-programs, and they would benefit greatly from a more expressive (and faster-running language). But everything else benefits from the do-anything-you-want style of Emacs Lisp, because you can develop your development environment interactively. It's really a wonderful experience, even though you don't have closures or classes with multiple inheritance.
One of my plans for the future is to replace the C core of GNU Emacs with Haskell, so that complex extensions can be more easily implemented. But Emacs Lisp will still be around for when "scripting" is good enough.
- swah 16y agoCan 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.
- zaphar 16y agoI see no reason you couldn't add an embedded lisp to Yi. It's actually on my list of things to try eventually. I do agree the compile step is annoying but I've found myself frustrated enough times with elisp's: * dynamic scoping. The lack of closures is pretty limiting. I can live without the objects and inheritance but I really really want closures. * key bindings parsing. Vimpulse is basically incapable of implementing some of my most often used vim commands because of the way the key bindings are parsed. Both of those things prompted me to go looking for an alternative and this is what I found. It's been fun so far, perhaps I'll hit a wall again and get dissatisfied but for now it's a handy hack on something in haskell project.
- dan00 16y ago"I see no reason you couldn't add an embedded lisp to Yi." Again you have two worlds. If one changes the other has to follow. And you will always lost something when translating from one world into the other.
- jrockway 16y agoAgree, but I feel like the Emacs core is more stable and complete than the Yi core. Every time I try to do something with Yi, I think, "oh, that's why I still use Emacs".
- zaphar 16y agoPerfectly understandable. However I need something to hack on in haskell to polish my skills so I figure I can just use emacs while I work to make Yi useable for everyday.
- aufreak3 16y agoI miss Hugs (http://www.haskell.org/hugs/ http://www.haskell.org/hugs/) for this reason. ghci is up to date, yes, but Hugs was much nicer as an environment. I even used to use it as my default calculator :) sigh!
- dataangel 16y ago> (When I write XMonad extensions, I do find the process a little tedious. I have to type my extension, then see if ghci can compile it, then I have to press a key to recompile and reload xmonad, then I can try out my changes. Every. Time. In Emacs, I just press C-M-x and try my change immediately.) No you don't. You must've gotten use to old versions while this is true. Make your change and then restart right away -- if it won't compile you'll get an error popup but xmonad will continue chugging along merrily by running the last good version of your xmonad.hs.
- jrockway 16y agoYeah, but it takes a few seconds. In Emacs, the change is instantaneous.
- jamesbritt 16y ago"Make your change and then restart right away " Sorry if this seems painfully naive, but what happens to your current set of windows and apps? Do you have to close out of everything in order to make a config change?
- zaphar 16y agoNothing happens to your windows. They keep working as if nothing happened.