Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Yi – Text editor written in Haskell (yi-editor.github.io)
70 points by gnocchi on April 7, 2015 | hide | past | favorite | 21 comments


Incremental parsing really isn't that hard: just cache the trees and damage/repair appropriately. I'm not sure if Haskell will be much of an advantage there; I found my own frameworks to be incredibly stateful...to the point that I designed Glitch to replace FRP to solve this specific problem.

Incremental parsing is also the first step toward incremental type checking :)

The post is a bit wrong, there have been incremental parsing frameworks in the past (see Tim Wagner and Susan Graham's work on Harmonia at UCB). But I've never been able to use them very well, and the problem is simple enough that cache/damage/repair is good enough (actually for type checking also).


As someone whose ISP enforces a draconian bandwidth limit, I would really like to see an estimate of how much all the dependencies are going to end up costing me.

The last time I tried to build a Haskell program (I think it was on 64-bit Arch linux), I ended up quitting after I broke 800 MB in downloads with no end in sight.


That's probably a one-time install of the haskell-platform package.

After you install that, most dependencies are small.


Small, yes, but they just keep coming. As an example, Pandoc has a tree of something like 70 dependencies on Arch? (I can at least tell you that it has 37 direct dependencies)

It does add up.


That's not wrong, but (at least source code size-wise), Haskell libraries are often very small. The compiled version, less so.


Didn't you download gigabytes worth of os in order to run this in the first place?


If it's a minimal Arch Linux install, it could well by under a gigabyte.


Haskell can build self-contained binaries that don't require a 700MB compiler. Look for /-bin$/ packages.


That depends upon such a package already being available -- it doesn't appear that Yi has any.


Yeah, Yi uses Xmonad style configuration. That is, it re-compiles itself when you modify the configuration file.

This approach means that Yi has to depend on the entire Haskell toolchain :(


I have tried a few times in the last year to find someone who something crazier than Yi: a Haskell program that is text editor, IDE, and integrated Webkit browser, all in Haskell. The dev was a former Emacs enthusiast. It looked really cool, but I forgot to bookmark.

It is not Yi, but does anyone know what I am talking about?


Are you thinking of Manatee? http://hackage.haskell.org/package/manatee


YEEESSS! Thank you. I tried searching on and off for a while now. I owe you more than an upvote!


looking at these config files I do feel like we're still missing a style to write nice config files in a language like Haskell. I don't think it's a language issue, but there's still a bit of difficulty in the building blocks given by things like xmonad or yi.


How so?

Basically, the idea is that Yi is actually a Haskell library, and your "config file" is really a Haskell program that uses this library to build an editor.

This is similar to how many suckless tools are written. If you want to configure them, edit the source: It's designed to be approachable and easy to modify.

This style of configuration is extremely nice IMHO. It gives you complete control over everything in one of the cleanest, most expressive languages around. It also means that you don't need to maintain a separate configuration language, and people that use your software are already taking steps towards becoming contributors.


Link to video[0] is currently responding w/ a 404. Anybody have insight into proper link?

[0] http://video.google.com/videoplay?docid=4183423992181607417


I remember one where the speaker demoed ... partial? indentation. Changing an L-value[1], shifted the R-values on each keystroke. Haskellers in the room slowly clapped. I was amazed (by both).

[1] If I may call it that way.


Where did you see that link? Is it this: https://www.youtube.com/watch?v=R0061WZF_YE


I gave a Yi demo at the Haskell Symposium, and the video (recorded "guerrilla style") is available! (It should also appear on the ACM Digital Library too, hopefully in better quality, but don't hold your breath.)"

...and the video <--- "video" hyperlinked w/ URL I gave...


Ah I see it. I think the YouTube link I gave is the same one (from Haskell Symposium 2008). Terrible quality unfortunately...

Edit: https://wiki.haskell.org/Yi has two screenshots and a decent overview of what's available. It's more up to date than the video at least.


Uh… Is it really idiomatic approach for Haskell?

Edit: oh, I've read and referred to the latest blog-entry on site, not to the editor itself. Nevermind.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: