HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
RustConf 2016 - A Modern Editor Built in Rust by Raph Levien

Confreaks · Youtube · 5 HN points · 5 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Confreaks's video "RustConf 2016 - A Modern Editor Built in Rust by Raph Levien".
Youtube Summary
RustConf 2016 - A Modern Editor Built in Rust by Raph Levien

This talk will present XIeditor, a new project to build a high-performance text editor primarily in Rust. In addition to a deep dive into technical details, the talk will touch on aspects of building polished GUI apps and running a community-focused open source project.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
We had a talk at RustConf previously about the Xi editor; it uses an immutable data structure to handle text. It's a video but the author lays out the details here: https://www.youtube.com/watch?v=SKtQgFBRUvQ

They make an interesting argument about how Rust makes it easier and nicer to write these kinds of structures.

It's still an area of exploration in Rust generally though; I wouldn't say immutable data structures are idiomatic, but that's also just because we haven't had a ton of easy ones to use, so nobody uses them. So we'll see!

taeric
I saw downthread a link to someone talking about how you can already treat the standard collections as values. Has a good argument for how it can be beneficial to keep the same interface regardless. Has a good concession that there are definitely use cases where persistent collections make sense. I'd imagine they are not as common as one could expect. (I grant they are also likely more common than I expect. :) )
raphlinus
Thanks for the shout-out. You can also read the docs[0] about the rope data structure (the release is a bit old, if you're really curious git master is better).

I admit this is a fairly specialized use case, for most things xi uses mutability in a controlled way.

[0] https://docs.rs/xi-rope/0.2.0/xi_rope/tree/index.html

Little drunk so bear with me :)

Rich Hickey: Clojure concurrency[https://www.youtube.com/watch?v=nDAfZK8m5_8&t=2024s]

Keynote - Rust: confident, productive systems programming by Aaron Turon [https://www.youtube.com/watch?v=C6dNx9pY7p8]

RustConf 2016 - A Modern Editor Built in Rust by Raph Levien [https://www.youtube.com/watch?v=SKtQgFBRUvQ]

Microservices at Netflix Scale: Principles, Tradeoffs & Lessons Learned[https://www.youtube.com/watch?v=57UK46qfBLY]

What I Wish I Had Known Before Scaling Uber to 1000 Services[https://www.youtube.com/watch?v=kb-m2fasdDY]

Dynamic Code Optimization and the NVIDIA Denver Processor [https://www.youtube.com/watch?v=oEuXA0_9feM] * if you can get anything on Apple's Ax series that's even better

I really enjoyed this talk about Xi https://www.youtube.com/watch?v=SKtQgFBRUvQ
Philipp__
Wow, hi Steve! Yeah, amazing talk, watched it a few times!

PS: big fan of your work! Keep up! :)

steveklabnik
Thanks! :D
Oct 31, 2016 · 2 points, 0 comments · submitted by hittaruki
Oct 30, 2016 · bonquesha99 on Buttery Smooth Emacs
What are some good resources to learn more about the inner workings of text editors or building one from scratch? So far I've found and enjoyed reading/watching the resources below and would love to learn more.

* The Craft of Text Editing: https://www.finseth.com/craft/

* Writing a Text Editor From Scratch: https://www.twitch.tv/gary_bernhardt/v/90796516

* A Modern Text Editor Built in Rust: https://www.youtube.com/watch?v=SKtQgFBRUvQ

omtose
I've found that reading the source code (or at least the general structure) of kakoune[1] really helped me understand editors. I think it's a very high quality c++ codebase for a relatively complex editor.

[1] https://github.com/mawww/kakoune

DonHopkins
James Gosling published "A Redisplay Algorithm" [1] in Proceedings of the 1981 ACM SIGPLAN SIGOA symposium on Text manipulation, describing the Emacs redisplay algorithm (the code with the skull and crossbones [2] that Stallman rewrote [3]).

[1] http://dl.acm.org/citation.cfm?id=806463

[2] http://donhopkins.com/home/archive/emacs/skull-and-crossbone...

[3] https://news.ycombinator.com/item?id=3427495

bluefox
Multics Emacs: The History, Design and Implementation: http://multicians.org/mepap.html
bootload
"good resources"

always been partial to "A Tale Of Five Editors" ~ http://www.catb.org/esr/writings/taoup/html/ch13s02.html

swah
I really enjoyed typing along with this 3-part series: https://www.youtube.com/watch?v=oDv6DfQxhtQ Per writes the beginnings of an emacs-inspired Windows (directwrite) text editor.

I want to continue developing it, but have no idea what to do regarding design... I'm considering using Sublime's themes.

Another interesting tutorial: http://www.catch22.net/tuts/neatpad

dguaraglia
One of the best docs describing how to write an editor I've ever read was the old documentation for the lcc-win32 compiler. It touches on the practical aspects of developing an editor (and the pipelining compiler as well.) Some understanding on how the Windows API works might be of value for the editor part, but the compiler part should be understandable to anyone:

https://docs.google.com/document/d/1_S7gv6UGLAKuo9g1tNoNbU2O...

(I won't go into jus how hard it was to find this version of the docs and extract the file on a non-Windows computer. Luckily I just did that a few months ago for unrelated reasons!)

Lx1oG-AWb6h_ZG0
Thanks, this is fascinating! This is the sort of thing that makes me think Vernor Vinge wasn't so far off when he described the concept of programmer archaeologists.

BTW, can you upload the original doc file somewhere? Google Docs appears to be mangling the formatting in a few places (page 28, for example).

dguaraglia
Hey, absolutely. Here they are, zipped with the original installer: https://drive.google.com/file/d/0BxF_x9mBC-n1eEduWVRmV3ZJTUU...

I hadn't heard of Vernon Vinge before, but the concept resonates. There's so much lore and knowledge to be found in old software packages. When I was learning how to program, I randomly found this pseudo-BASIC compiler called ASIC, which was amazing for what it could do. It provided low-level functionality that normal QBASIC wouldn't give you. I remember spending a whole summer playing with that and a free tutorial on 3D programming called "3DICA" written by some Finish students. Good times.

BTW, http://www.textfiles.com is a great place to start looking for oldies but goodie :)

otakucode
Should have saved your allowance and bought the QuickBASIC compiler! I did and when I discovered that the textfile-reading program I wrote to handle huge files (at the time) would buffer keystrokes, fill the buffer, and beep annoyingly if I held down the 'Down' arrow or 'Page Down' keys, I was led into learning x86 assembler. Well, enough that I could use BIOS routines for displaying text and scrolling the screen. Also got to learn what a 'linker' did and how QB did argument passing on the stack. I still wonder if I was the only person in the world linking my assembly code into a QB app I also wrote. But hey, it worked!
dguaraglia
Haha, your story about hitting a wall with BASIC only to go somewhere else reminds me of how I decided to learn C: I had "mastered" QBASIC and was learning Visual Basic, so my dad bought me a book called "Hardcore Visual Basic". That book discussed extensively how to get Visual Basic to interact with the native Windows API for fun and profit. Pretty much every chapter began with "this is so much easier in C, but here's how we do it in VB", so wee me decided to hunt for a C compiler in the pile of Shareware CDs I had laying around. Finally found a really old version of Visual C++ (I think it was 2.1, so it was old even by the time) and then spend the next year of my life writing toolbar and common control libraries for lack of anything better to do :)
NotSammyHagar
Well, if you like science fiction, you should read some of his works. He is a mathematician and computer scientist who has written some fascinating science fiction. "A Fire Upon the Deep" is probably his best and most famous work. Imagine that in different parts of the universe people can have different intellectual abilities because of different physical laws. And we are living in the slow zone.
dguaraglia
Thanks for the book recommendation! I'll add it to my queue, for when I finish Abaddon's Gate (The Expanse, BTW, is a pretty solid sci-fi series, although I think I'm ready to take a little break after three books in a row.)
NotSammyHagar
Loved the Expanse. Read the first few books, need to get back to it. It feels like our future world more and more.
DonHopkins
For archaeology's sake (and to contrast with X-Windows), here are a couple design [1] and protocol [2] documents RMS wrote about window system design, circa 1985, before X10R2 was released in 1986, but after all his work on the CADR Lisp Machine window system. (Not to be confused with Genera!!! [3])

[1] Window-Win: http://donhopkins.com/home/archive/lisp/rms.winops.txt

[2] Window-Win protocol: http://donhopkins.com/home/archive/lisp/rms.wincmd.txt

[3] A Performance Comparison of the Window Systems of Two LISP Machines: http://www.cs.cornell.edu/~rdz/Papers/ZJ-CSC86.pdf

lispm
There is a manual from Moon/Stallman/Weinreb: Lisp Machine Window System:

http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/cadr/LI...

> CADR Lisp Machine window system. (Not to be confused with Genera!!!

Early Genera was based on the Lisp Machine window system. Later Symbolics introduced a new window system (Dynamic Windows), but the old one (TV, ...) was still provided.

voltagex_
>(I won't go into jus how hard it was to find this version of the docs and extract the file on a non-Windows computer. Luckily I just did that a few months ago for unrelated reasons!)

Sounds like a good topic for a small blog post.

There's a talk about it, too, if interested: https://www.youtube.com/watch?v=SKtQgFBRUvQ

I'm hoping to find the time to get more comfortable with Rust and try to contribute at some point

Oct 04, 2016 · 3 points, 0 comments · submitted by bajsejohannes
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.