189 points · by poiuz · 9y ago · 59 comments
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/ [1] https://github.com/yi-editor/yi#reading-material
* 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. - MotherThat 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.
> You should go outside one of these days. - Mother
These quotes are great.
commit: "Add BufRefs and switch to YiString for all internal representations" (23 hours ago)
https://github.com/ChrisPenner/rasa/commit/bb95a3263fc40120e...
https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modula...
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.
http://blog.metaobject.com/2014/06/the-safyness-of-static-ty...
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...
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.
The funny thing about that blog post is that the top 25 bugs "don't look like" type errors to the author, but almost all of them are type errors given some type system and type definition...and not just theoretical, but by existing languages and usages. Buffer overflow, for example, isn't a "type error" according to C, but it is according to Rust. As type systems become stronger and more advanced, more errors become type errors, which means you'll only recognize them as type errors if you use languages and constructs that make them type errors.
It remains to be seen whether this editor can change that, but if the API/Plugin boundaries are strongly typed, I'd be reasonably optimistic that it's at least plausible that it could :).
A typed API on the other hand will prescribe interactions between extensions. It's still possible with the right design to make things flexible - eg getting extensions to describe their logic in the form of data that can be modified by other extensions - but I think the axis will be between Emacs style flexibility vs rigidity of extension.
I think that's what this new editor is trying to test. I'm certainly not convinced that that's true. :)
> It's not unusual for users to fix bugs and performance problems in Emacs packages with some choice redefinitions, global or scoped.
Maybe those bugs shouldn't have existed in the first place? I'm don't want to be fixing bugs in my editor -- I just want it work properly.
While outright crashes (as in SEGV) have been rare, there have been loads of times emacs has just gone into an infinite loop, times where functions get the wrong type (or number of) arguments and you just get some weird "argp" (or whatever) error message in the status bar.
I don't think I'm an anomaly -- especially since I use very few extensions (at least AFAICT compared to what some real power-users do).
> A typed API on the other hand will prescribe interactions between extensions. It's still possible with the right design to make things flexible - eg getting extensions to describe their logic in the form of data that can be modified by other extensions - but I think the axis will be between Emacs style flexibility vs rigidity of extension.
The thing is: The API exists has some restrictions whether one formalizes them or not -- the difference is that in one case you'll just get weird/buggy behavior whereas in the other you'll get a compilation error. If it's possible to formalize something "generic enough" is an interesting question.
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...
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...
https://www.reddit.com/r/haskell/comments/5l0a2i/rasa_modula...
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.
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.
main loop: https://github.com/ChrisPenner/rasa/blob/master/rasa/src/Ras... renderer: https://github.com/ChrisPenner/rasa/blob/master/rasa-ext-sla... views: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f... buffer references: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f... buffers: https://github.com/ChrisPenner/rasa/blob/2fcb326b646e2f6b01f...
events: https://github.com/ChrisPenner/rasa/blob/0b7a037fde31b81d211... handler: https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c741... typing: https://github.com/ChrisPenner/rasa/blob/b1da88138a68fc2c741... cursor: 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/... or 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.