News for hackers. Stuff that matters.
Re:Buttery Smooth Emacs by bonquesha99 on Sunday October 30, 2016 @04:38PM (#12832111)
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

Re:Buttery Smooth Emacs by dguaraglia on Sunday October 30, 2016 @06:22PM (#12832773)
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!)

Re:Buttery Smooth Emacs by voltagex_ on Sunday October 30, 2016 @07:12PM (#12833080)
>(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.

Re:Buttery Smooth Emacs by Lx1oG-AWb6h_ZG0 on Sunday October 30, 2016 @09:52PM (#12833760)
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).

Re:Buttery Smooth Emacs by DonHopkins on Monday October 31, 2016 @06:59AM (#12835696)
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

Re:Buttery Smooth Emacs by lispm on Monday October 31, 2016 @07:19AM (#12835783)
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.

Re:Buttery Smooth Emacs by dguaraglia on Monday October 31, 2016 @01:07AM (#12834419)
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 :)

Re:Buttery Smooth Emacs by NotSammyHagar on Monday October 31, 2016 @04:01PM (#12840370)
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.
Re:Buttery Smooth Emacs by dguaraglia on Tuesday November 01, 2016 @01:07AM (#12843562)
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.)
Re:Buttery Smooth Emacs by NotSammyHagar on Tuesday November 01, 2016 @03:05PM (#12849119)
Loved the Expanse. Read the first few books, need to get back to it. It feels like our future world more and more.
Re:Buttery Smooth Emacs by otakucode on Monday October 31, 2016 @07:35AM (#12835851)
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!
Re:Buttery Smooth Emacs by dguaraglia on Monday October 31, 2016 @07:33PM (#12841938)
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 :)
Re:Buttery Smooth Emacs by omtose on Sunday October 30, 2016 @05:03PM (#12832260)
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

Re:Buttery Smooth Emacs by DonHopkins on Monday October 31, 2016 @07:06AM (#12835727)
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

Re:Buttery Smooth Emacs by bluefox on Sunday October 30, 2016 @06:24PM (#12832787)
Multics Emacs: The History, Design and Implementation: http://multicians.org/mepap.html
Re:Buttery Smooth Emacs by bootload on Monday October 31, 2016 @12:11AM (#12834248)
"good resources"

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

Re:Buttery Smooth Emacs by swah on Sunday October 30, 2016 @08:36PM (#12833473)
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