Live data from Hacker News

Emacs 26 Brings Generators and Threads

nullprogram.com

81–90 of 175 posts

Re: Emacs 26 Brings Generators and Threads

#81
post #51

Earlier quoted context omitted.

For me as a daily Emacs user this sounds like another "editor war" rant. I neither find Emacs hard to customize nor do I think it has any substantial limitations other than the ones that are based on my own lack of knowledge. It's always fair to compare it to Vim, but I don't think it makes much sense to compare it in general to VS Code or Atom. One major reason for me to use Emacs and not newer software is that it i…

Emacs is compared to vim because both can be run in a terminal on a remote machine, not because it’s the JS-editor-of-the-month. There’s a fairly decent chance I’d switch away from vim if I ever had a job where I could edit code locally.

sshfs is a thing. If i had to use remote machines only, i would use tramp; not run an emacs instance on a remote machine. I haven't had good experience running editors inside tmux.

Re: Emacs 26 Brings Generators and Threads

#82
post #72
post #21

Here's what grinds my gears: That the cursor follows the visible buffer. It would be nice to be able to scroll to another part of a file and then just start typing and be back where I was ... I mean I could understand if this was an efficiency thing to do with scaling to large files due to a kind of a tiling memory model or something, but emacs doesn't even do that! It's not a huge deal I've learned to get used to us…

Acme does this, and I love it, but most people's response to seeing Acme is "what the hell? No syntax highlighting? No autocomplete?" You can also easily create a second "view" into a file with the Zerox command, which is a nice way to look at two parts of a file at once. It's the best thing I've found for managing large numbers of buffers at once, though, and with things like acmego (go fmt + add missing imports on…

Just about every other editor does this. That's why I miss it!

Re: Emacs 26 Brings Generators and Threads

#83
post #39

Earlier quoted context omitted.

Evil mode is far far better than viper. Do yourself a favor and switch today.

To that end I like spacemacs. But it did incur enough of a startup penalty that have have shifted back to vim. I oscillate between them and vscode. I don’t use vim bindings in vscode though.

Run it in daemon mode. startup time is not a thing for emacs.

Re: Emacs 26 Brings Generators and Threads

#84
post #21

Here's what grinds my gears: That the cursor follows the visible buffer. It would be nice to be able to scroll to another part of a file and then just start typing and be back where I was ... I mean I could understand if this was an efficiency thing to do with scaling to large files due to a kind of a tiling memory model or something, but emacs doesn't even do that! It's not a huge deal I've learned to get used to us…

The cursor stays in the viewport because, deep down, Emacs still thinks that it's outputting to a 1970s-era ASCII terminal. See this https://www.facebook.com/notes/daniel-colascione/buttery-smo... “Internally, Emacs still belives it’s a text program, and we pretend Xt is a text terminal, and we pretend GTK is an Xt toolkit. It’s a fractal of delusion.” For years, James Gosling, author of the first version of Emacs th…

Emacs is in no race with text editors. If Emacs was a pack of a dozen of eggs, text editing would be that one egg on the corner with the fragile shell. Mr. Java can beg all he wants, but one thing people don't get is that Emacs is not a text editor. It has one, yes, but it's a program where the user can interactively manipulate data presented in buffers via Lisp, and keys bound to some Lisp. Thus, it is in a league of its own. The only modern player that tried to enter was Light Table for Clojure, but it did not hold on, I guess. Then there is Climacs, Hemlock and Edwin, but they don't have much or any adoption.

I have not used one program til this day that is easier and more optimised for user customisation than Emacs. And if not much people will be using it in the future, be it so. But it will be around as long as computers with physical keyboards will be (and will probably adapt if they ever become obsolete).

Re: Emacs 26 Brings Generators and Threads

#85
post #49
post #21

Here's what grinds my gears: That the cursor follows the visible buffer. It would be nice to be able to scroll to another part of a file and then just start typing and be back where I was ... I mean I could understand if this was an efficiency thing to do with scaling to large files due to a kind of a tiling memory model or something, but emacs doesn't even do that! It's not a huge deal I've learned to get used to us…

What does Ctrl+U-Space do if you don't mind me asking? Is that some magic that you've bound? Mind sharing?

It's C-u in Emacs lingo; it pops the mark ring. Some actions like C-, M- push the position of the point to the mark ring before moving it, and when you pop the mark ring, you jump to the position that was pushed most recently.

Re: Emacs 26 Brings Generators and Threads

#86
post #68
post #18

Earlier quoted context omitted.

My gripe is that I only just discovered the other day it chokes on large files, and even the vlfi (very large files) extension is quite cumbersome. I was quite dismayed to tell you the truth!

Emacs usually doesn't choke on large files, but it chokes on very long lines. E.g. SQL dumps and such.

There are two separate issues at play here:

Emacs' redisplay algorithm is not very efficient if you have very long lines. On the other had on old emacs versions (before 23 IIRC) this was significantly worse as it also had weird UX implications (C-p/C-n working in terms of logical, as opposed to displayed, lines and unability to sanely display lines that are longer than width*height of window).

Other problem is that the gap-buffer data structure is very suboptimal when you start to move the point by multi-MB offsets (which in emacs' case imcludes operations like scrolling to the other end of buffer using scrollbar) as it involves doing memmove() of this multi-MB block of memory.

Re: Emacs 26 Brings Generators and Threads

#87
post #50

Earlier quoted context omitted.

For some perspective: BBEdit - launched in 1992 (26 years ago), still around. Notepad++ - launched in 2003 (15 years ago), still around. Textmate - launched in 2004 (14 years ago), still around. Sublime - launched in 2008 (10 years ago), still around. Almost all the mainstream editors since 1995 at least are around. They have been marginalized, but they're generally around. Especially cross platform editors and even…

To see why this isn't necessarily the case, add to your list all the text editors launched between 1992 and 2008 that are no longer around ("being around" defined as being able to install and run on whatever OS you're using on your main computer with no special effort).

Exactly. The post above yours is simply an illustration of survivorship bias.

Re: Emacs 26 Brings Generators and Threads

#88
post #25

Seeing generators and threads being mentioned in the release announcement of a text editor feels a bit... strange. Then again, Emacs is closer to a LISP toolkit for building text editors than it is a text editor, so I guess it's not so strange after all.

Emacs is an application platform, just like how the browsers are today. It has a nice way for making UIs: it's all text, parts interactive, and you can bind keys, make hooks and thus create decent, customisable applications in it. Add to that the possibility to update code on the go and advices, and you have a very nice place to make yours completely.

I wish we had a popular OS where the main UI toolkit was similar, i.e. it provided many hooks, a universal REPL and a nice interactive debugger.

Re: Emacs 26 Brings Generators and Threads

#89

Earlier quoted context omitted.

To see why this isn't necessarily the case, add to your list all the text editors launched between 1992 and 2008 that are no longer around ("being around" defined as being able to install and run on whatever OS you're using on your main computer with no special effort).

Exactly. The post above yours is simply an illustration of survivorship bias.

I'd be interested to hear about former mainstream editors from that time that are gone. Especially cross platform and Open Source ones :)

Re: Emacs 26 Brings Generators and Threads

#90

This is cool, but it's too bad folks here don't seem to have kept up with the evolution of iteratees/enumerators and free monadic computations (conduit/pipes/streaming) that other languages have pushed forwards as evolutions of the generator ideal. The net result for common iteration ops is quite nice, and has options for reasonable optimizations in the world of lisp where macros are real.

Could you explain or link to more info please? Sounds interesting.
Post reply on HN