News for hackers. Stuff that matters.
Re:Emacs 29.1 Released by nequo on Sunday July 30, 2023 @08:16AM (#36930403)
What modern feature is Emacs missing?
Re:Emacs 29.1 Released by wiz21c on Sunday July 30, 2023 @08:39AM (#36930572)
- fast loading (vscode loads much faster on my computer; specially if I have a lot of open files)

- code "peek" (that little windows is super useful)

- good integration with debugger (again, vscode kills it here). For example: how to look a at a numpy array in emacs (in vscode there's a data viewer for that)

- robust LSP (for example, when I complete a formatting string f"{... on a big file, emacs simply becomes unresponsive for a minute or so (it's much quicker ona powerful computer though); pylance is simply superior on edge cases.

But although I'm a long time emacs user, there's one thngs where VSCode is much better, it's discoverability. I've learned much of what I need in 2-3 weeks, without ever looking at a manual.

Note: I'm a regular emacs user since since about 10 years (I came for the freedom, stayed for the community). I'm using VSCode since about a year.

I'll be happy to ear a way to make my emacs better.

Re:Emacs 29.1 Released by natrys on Sunday July 30, 2023 @08:51AM (#36930659)
Doom Emacs loads very fast so theoretically it's possible to configure Emacs to be fast too (mine starts in a second, cold start is a little slower).

But I think most people don't care about it enough because they either never close Emacs and/or use it in server-mode where emacsclient is pretty much instantaneous. Can I ask why you don't like doing that?

Re:Emacs 29.1 Released by wiz21c on Sunday July 30, 2023 @10:20AM (#36931393)
Because I conserve energy: I turn my PC off at the end of each session (so about one/two times a day). And because the "sleep" mode is not reliable (I have a 14 years old PC, upgraded in RAM and GPU and SDD; and here I conserve hardware).

So having things take time on start up is an annoyance to me (but I live with it, I was just saying that emacs is slower than VSCode)

Re:Emacs 29.1 Released by hsbauauvhabzb on Sunday July 30, 2023 @11:47PM (#36938609)
So your point is that emacs is slow on slow hardware?

I’m sure vscode would chew through resources during a heavy session, have you benchmarked more than just the startup of the application?

Re:Emacs 29.1 Released by wiz21c on Monday July 31, 2023 @03:05AM (#36939592)
my overall feeling on my own (slow) PC is that VSCode is faster on load (or, to be exact, I perceive it be to be faster) and provides a few features that I don't have on emacs.

You're right: once VSCode is in memory I think it uses more of it. But that's barely nothing when compared to rust-analyzer (which emacs LSP uses too).

Re:Emacs 29.1 Released by phforms on Sunday July 30, 2023 @01:46PM (#36933897)
I use Doom Emacs with the Yamamoto port of Emacs [1] on MacOS (M1) and the startup time is quite slow: it takes around 6-7 sec. for the editor window to show up. It doesn’t bother me too much since I usually start it once a day and just never close it, as you mentioned.

However, I also have many plugins installed, so it might be just that. I wonder if it is possible to install a separate instance of Emacs, then I would be able to test the performance without all the plugins and configuration.

[1]: https://github.com/railwaycat/homebrew-emacsmacport

Re:Emacs 29.1 Released by PaulDavisThe1st on Sunday July 30, 2023 @09:01AM (#36930752)
> - fast loading (vscode loads much faster on my computer; specially if I have a lot of open files)

who ever does such a thing? Emacs starts up on my machine soon after I login. It remains open until I logout. Current instance has 123 buffers (files). Loading speed just isn't important to me as a full-time native (C++) developer.

> - robust LSP

I tried LSP a bit. Gave up because it just didn't really help me with my actual work. Could understand why someone with less experience programming would find it helpful, but it just wasn't so for me (I use emacs dynamic completion a lot)

Re:Emacs 29.1 Released by gumbojuice on Sunday July 30, 2023 @09:48AM (#36931115)
Emacs on my system is ~8sec load time, vs ~5sec load time for Code. I have not optimized either (but I have decided on using Straight as package manager on Emacs, which is arguably faster than the built-in).

I use LSP a lot (through eglot with Emacs-29). For each "mode" in Emacs there are alternatives to LSP, mostly what was there before LSP, which may be equally good. However, I found that switching to LSP simplified my setup, and having the same functionality/keybindings between modes is great, e.g. my projects switch me between Python, Rust, and Java, earlier that was basically three different "IDEs", while today they're very similar.

Re:Emacs 29.1 Released by vinceguidry on Sunday July 30, 2023 @10:22AM (#36931409)
Run emacs as a server when you start the machine and use emacsclient to connect with it. Way faster start times.
Re:Emacs 29.1 Released by PaulDavisThe1st on Sunday July 30, 2023 @10:06AM (#36931259)
> Emacs on my system is ~8sec load time, vs ~5sec load time for Code

yeah, but i don't give a damn. I do this once every few weeks.

ps. also, emacs is < 3 secs on my system, so even if i did care ...

Re:Emacs 29.1 Released by wiz21c on Sunday July 30, 2023 @10:21AM (#36931407)
What is "dynamic completion" ?
Re:Emacs 29.1 Released by PaulDavisThe1st on Sunday July 30, 2023 @10:31AM (#36931491)
I have it bound to Ctrl-\ ... Emacs scans backwards through the current buffer, then all other buffers, to look for completions for the word at the cursor. Press it again (after one completion) and it will cycle through other possible completions (and keep doing this as long as you keep pressing that).

It's great for completing variable names, but also if you writing just regular text, finishing longer words and so on.

Re:Emacs 29.1 Released by __david__ on Sunday July 30, 2023 @09:31PM (#36937909)
That sounds like

    M-x dabbrev-expand
which is bound to M-/ by default (and yeah, I love it). Though I do like the context sensitive completions that lsp provides as well. They are particularly good for showing you structure members (since the language server knows the types).
Re:Emacs 29.1 Released by dventimi on Sunday July 30, 2023 @10:41AM (#36931617)
> Could understand why someone with less experience programming would find [LSP] helpful

Have you considered the possibility that people with more experience programming than you might find it useful?

Re:Emacs 29.1 Released by PaulDavisThe1st on Sunday July 30, 2023 @10:44AM (#36931639)
Yes.
Re:Emacs 29.1 Released by dventimi on Sunday July 30, 2023 @05:31PM (#36936205)
Then that covers everyone.
Re:Emacs 29.1 Released by nequo on Sunday July 30, 2023 @06:16PM (#36936566)
Parent does have quite a bit of experience:

https://en.wikipedia.org/wiki/Paul_Davis_(programmer)

Re:Emacs 29.1 Released by dventimi on Sunday July 30, 2023 @07:07PM (#36936948)
I'm so used to empty boasts and humblebrags from tyros on HN that I overlooked the real McCoy. That's on me.
Re:Emacs 29.1 Released by supazek on Monday July 31, 2023 @01:24AM (#36939083)
I hope to one day be cool enough to write my own Wikipedia entry
Re:Emacs 29.1 Released by TheRoque on Sunday July 30, 2023 @01:50PM (#36933930)
So renaming all the symbols in your whole project with just one command is not for you ? Navigating to declaration/searching all the usages of a symbol etc. All that isn't for you ? And these are the two most basic features You make it sound like LSP is a small gimmick that appeals to less experienced developer while it's actually a huge productivity boost that has literally no link to being experienced or not.
Re:Emacs 29.1 Released by nequo on Sunday July 30, 2023 @02:39PM (#36934502)
I also think that parent's comment is overly dismissive of LSP. But for me, Emacs with lsp-mode does the things that you describe.
Re:Emacs 29.1 Released by PaulDavisThe1st on Sunday July 30, 2023 @04:03PM (#36935338)
I mean, I wanted to love LSP. Everything I read about it suggested that I would. But I tried it out for two weeks, working (as normal) on my 600k LOC C++ project, and found it somewhere between irritating and not-actually-helpful.

I appreciate that people who started programming with such tools probably come to rely on it the way I rely on dynamic completion in emacs (which is a lot).

Re:Emacs 29.1 Released by 59nadir on Tuesday August 01, 2023 @02:10AM (#36952881)
Considering C++ is almost impossible to write reliably good tools for it's entirely possible that LS for C++ is simply not very good and that with languages that can reliably provide a good LS experience you'd view this differently. I don't think it has anything to do with programming experience level. I've programmed for 24 years and I find language servers great when I can have them. 20 or so years on top of this is unlikely to change anything.

For what it's worth I'd use CLion for C++, most likely, if I ever wanted to go back to C++ outside of tiny sandbox projects.

P.S. Language servers are great for smaller ecosystems where no one can really afford to make or fund much beefier tools like IDEs, so a language server can be created by a community member and be used with pretty much all relevant editors almost instantly, meaning the ROI for the community is massive.

Re:Emacs 29.1 Released by craftkiller on Sunday July 30, 2023 @02:49PM (#36934620)
Emacs has code peek.

With lsp-mode it has that little window: https://emacs-lsp.github.io/lsp-ui/#lsp-ui-peek

Personally I use eglot with consult which temporarily switches the entire buffer to do the "peek" functionality rather than popping up a tiny window: https://github.com/minad/consult

Re:Emacs 29.1 Released by goku12 on Sunday July 30, 2023 @02:57PM (#36934698)
I wonder why everyone's having such long startup time for emacs - like 6 to 8 seconds. Mine has a lot of add-on packages and it still manages to start up in 2 seconds (It's a server. So that happens only once in a session). I haven't done much optimization either - unless you count a lot of autoloads that you automatically get with use-package.
Re:Emacs 29.1 Released by worthless-trash on Sunday July 30, 2023 @08:31AM (#36930522)
I feel the comment was bait.
Re:Emacs 29.1 Released by mm007emko on Sunday July 30, 2023 @08:54AM (#36930680)
Exactly. I have been using git for my .emacs files and there is little I really miss from Emacs for editing files and even quite a lot of coding.
Re:Emacs 29.1 Released by tjpnz on Sunday July 30, 2023 @12:39PM (#36933036)
A text editor.