10 ms·
Rasa: Extremely modular text editor built in Haskell
- peatmoss 10y agoWithout knowing too much about either editor, how does this compare / differ with Yi (http://yi-editor.github.io/ http://yi-editor.github.io/)?
- SirensOfTitan 10y agoI think I remember the author posting on /r/haskell a bit back about this project. He mentioned that in his editor even the core editor functionality are implemented as extensions (contrary to Yi), so the extension API is quite robust.
- taylorfausak 10y ago> Rasa is putting extensions first from the very beginning, I've read that Yi has plans to extract their renderers into extensions but hasn't been able to easily extract them at this point. In rasa, EVERYTHING is an extension (for better or worse I suppose we'll see). https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modular_texteditor/dbsbdog/?context=1 https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modula...
- more_original 10y agoLooks like they're using parts of Yi. They seem to have switched to using the rope data type from Yi for the representation of text: commit: "Add BufRefs and switch to YiString for all internal representations" (23 hours ago) https://github.com/ChrisPenner/rasa/commit/bb95a3263fc40120edbbcb9fe59521b4e362af33 https://github.com/ChrisPenner/rasa/commit/bb95a3263fc40120e...
- wyc 10y ago> I'm glad I'm unemployed so I have time to configure it! - my mate Steve > You should go outside one of these days. - Mother These quotes are great.
- deleted 10y ago[deleted]
- visarga 10y agoDoes the name mean "aroma" or "flavor" (from Sanskrit), or has another meaning altogether?
- DAddYE 10y agoI really hoped was this: http://darkmatter.wikia.com/wiki/Raza http://darkmatter.wikia.com/wiki/Raza
- taylorfausak 10y ago> I named it after the concept of 'tabula rasa' which means roughly 'blank slate' which I thought was fitting for an editor https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modular_texteditor/dbrzfjk/?context=1 https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modula...
- rimantas 10y agoIn Lithuanian "rasa" means "dew". And you can find many similarities between Lithuanian being one of the oldest languages and sanskrit.
- Koshkin 10y ago> Lithuanian being one of the oldest languages How do you figure? According to Wikipedia, "the Eastern Baltic languages split from the Western Baltic ones between AD 400 and AD 600", "The differentiation between Lithuanian and Latvian started after AD 800", "The earliest surviving written Lithuanian text is a translation dating from about 1503–1525", etc.
- colechristensen 10y agoLithuanian is closest to the original proto-indo-european language keeping more of it's features than any of the hundreds of other languages that spawned out of it. It's hard to say any language is "oldest" because languages are alive and the people that speak them change constantly. The pieces that make up the language though are indeed very old regardless of the fact that "Lithuanian" hasn't existed nearly as long. >Among Indo-European languages, Lithuanian is extraordinarily conservative, retaining many archaic features otherwise found only in ancient languages such as Sanskrit[5] or Ancient Greek. For this reason, it is one of the most important sources in the reconstruction of the Proto-Indo-European language despite its late attestation (with the earliest texts dating only to c. 1500 AD). The phonology and especially the nominal morphology of Lithuanian is almost certainly the most conservative of any living Indo-European language,[4][6] although its verbal morphology is less conservative and may be exceeded by the conservatism of Modern Greek verbs, which maintain a number of archaic features lacking in Lithuanian, such as the synthetic aorist and mediopassive forms.
- harpocrates 10y agoThis looks really neat. I really like the idea, and I think it has lots of potential. That said, I'm going to try to moderate my enthusiasm until more stuff gets implemented. Thinking back to Yi [0], there is a lot of really cool stuff in that too (namely precise syntax highlighting, which relied heavily on parsing lazily). There's even a couple papers written about it [1]! IIRC, the main problem was (I think it has been at least partially dealt with) performance - people expect their editors to be blazingly fast. It will be interesting to see if Rasa encounters similar problems. [0] http://yi-editor.github.io/ http://yi-editor.github.io/ [1] https://github.com/yi-editor/yi#reading-material https://github.com/yi-editor/yi#reading-material
- ChrisPenner 10y agoRight now it's pretty experimental; We'll be keeping an eye on performance of course, but at the moment a good API is more important. Time will tell!
- brennen 10y agoWhile this looks appealing and I will probably try it, I'm not sure if I have cognitive room for another core tool configured in Haskell. Running xmonad is already like a commitment to periodic skirmishes with an angry badger.
- ChrisPenner 10y agoHaha; I understand that feeling! It's mostly scripted using combinators made available by other extensions; you can just chain them together in `do-notation` to do the things you want.
- brennen 10y agoAwright, awright, I'll give it a look. :) As a kind of generalized comment to the authors of tools written in smart-people languages: Y'all are great, but I sometimes suspect you'd get broader adoption of your stuff if you kept in mind that a bunch of us are clever enough to benefit from your work, but not always clever enough for the tools you're building it in...
- ChrisPenner 10y agoAuthor here; I can answer any questions you might have; It's still a really early project but it's growing quickly! Anyone who's interested should join in the discussion in our chat-room here: https://gitter.im/rasa-editor/Lobby https://gitter.im/rasa-editor/Lobby
- Mathnerd314 10y agoI followed the code flow a bit: main loop: https://github.com/ChrisPenner/rasa/blob/master/rasa/src/Rasa.hs https://github.com/ChrisPenner/rasa/blob/master/rasa/src/Ras... renderer: https://github.com/ChrisPenner/rasa/blob/master/rasa-ext-slate/src/Rasa/Ext/Slate/Internal/Render.hs#L27 https://github.com/ChrisPenner/rasa/blob/master/rasa-ext-sla... views: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f8434ab790b632a25f8d00/rasa-ext-views/src/Rasa/Ext/Views/Internal/Views.hs#L208 https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f... buffer references: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f8434ab790b632a25f8d00/rasa/src/Rasa/Internal/Directive.hs#L80 https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f... buffers: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f8434ab790b632a25f8d00/rasa/src/Rasa/Internal/Buffer.hs#L24 https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f... events: https://github.com/ChrisPenner/rasa/blob/0b7a037fde31b81d211f74475ba0869cbd2226fa/rasa-ext-slate/src/Rasa/Ext/Slate/Internal/Event.hs#L10 https://github.com/ChrisPenner/rasa/blob/0b7a037fde31b81d211... handler: https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c74113d68230290e310db7003/rasa-ext-vim/src/Rasa/Ext/Vim.hs#L57 https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c741... typing: https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c74113d68230290e310db7003/rasa-ext-vim/src/Rasa/Ext/Vim.hs#L99 https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c741... cursor: https://github.com/ChrisPenner/rasa/blob/bb95a3263fc40120edbbcb9fe59521b4e362af33/rasa-ext-cursors/src/Rasa/Ext/Cursors/Actions.hs#L37 https://github.com/ChrisPenner/rasa/blob/bb95a3263fc40120edb... Seems kind of scattered, compared to others such as https://hackage.haskell.org/package/qtah-examples-0.2.0/src/src/Graphics/UI/Qtah/Example/Notepad.hs https://hackage.haskell.org/package/qtah-examples-0.2.0/src/... or https://github.com/HeinrichApfelmus/threepenny-gui/blob/master/samples/Canvas.hs https://github.com/HeinrichApfelmus/threepenny-gui/blob/mast..., although of course it's still better than Yi. Personally I wouldn't consider it without a GUI supporting variable-width text, and that seems far away at this point. But if someone writes an OpenGL renderer it might be worth a second look.
- thinkpad20 10y agoI'm excited to see another option appear in text editing, and excited that it's written in Haskell, one of my favorite languages. But, why would I choose it over another text editor? The ability to customize it is neat, but editors like emacs can be customized to one's heart's content, and indeed can suffer from this (why did my editor suddenly become slow? why is my syntax highlighting or indentation not working correctly? who knows, it's the interaction of one of the 50 packages I have installed...). Of course, you as the author are under no obligation save to write whatever you want, but speaking personally, I would love to see some sort of demonstration of how the editor works, and/or the case made selling me on why I should choose it over other options.
- rcthompson 10y agoI will say this for Emacs, though: while bad interactions between packages do happen, they're surprisingly rare given the number and variety of packages that are available.
- mpweiher 10y agoThat seems to be generally the case for the horrors of dynamic typing: rampant in the imagination, surprisingly rare in the real world. http://blog.metaobject.com/2014/06/the-safyness-of-static-typing.html http://blog.metaobject.com/2014/06/the-safyness-of-static-ty...
- progman 10y agoThis confirms my own experience. I discovered that programs written in (or use) dynamic languages like Lisp are surprisingly reliable (Emacs in particular). Type safety won't protect us from broken software. Quote: "The most common bugs caught by static typing are also the least critical sort of bug." Source: http://www.drmaciver.com/2016/10/static-typing-will-not-save-us-from-broken-software/ http://www.drmaciver.com/2016/10/static-typing-will-not-save... Static typing helps a lot to catch basic type errors but it is surely not the "Messiah" of code safety. In big systems the good old way of testing still seems to be the best practical way. Haskell's claim "If it runs then it's likely correct" is a deception because no compiler can catch logical errors. This was also Ada's problem in the Ariane disaster, although Ada has probably the strongest type system beside Haskell. You need special verification tools like FramaC, and even those tools don't catch all errors. Haskell's safety is even more questionable in face of the underlying libraries which are written in C. Finally, the still unresolved Cabal hell speaks for itself. Stack works only because it is an isolated repository where the maintainers have to take a lot of attention to make sure that new code doesn't break other code.
- newsat13 10y agoThis is amazing, I will give it a try over the weekend for sure. Is modular the selling point here? Last thing I seek in an editor is modularity. This is like saying my browser is written in some pluggable framework... Who cares as long as it works?
- michaelmrose 10y agoI use my current browser largely because of the extensions for it.
- gizmo686 10y agoExciting project. For those people who might be scared off because it is Haskell, I would encourage you look at the default config. [0] Apart from import statements and two lines of boilerplate, it is just a newline deliminated list of modules. The only line that this does not apply to is the last line, which sets the initial state of the buffer. Writing your own extensions probably will always involve being comfortable with Haskell, but (assuming it gets a decent community) will not be nessasary for the majority of users. [0] https://github.com/ChrisPenner/rasa/blob/master/rasa-example-config/app/Main.hs https://github.com/ChrisPenner/rasa/blob/master/rasa-example...
- HugoDaniel 10y agoLove it, specially the "What people are saying" part :D * Excessively Modular! - some bald guy * I'm glad I'm unemployed so I have time to configure it! - my mate Steve * You should go outside one of these days. - Mother
- progman 10y ago> I'm glad I'm unemployed so I have time to configure it! That raises the question if the author is also unemployed so that he had the time to write it ;-) It would be interesting to know how much time he actually needed.