News for hackers. Stuff that matters.
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by melling on Monday July 29, 2019 @12:08AM (#20551445)
Emacs is 43 years old. When it was written, the kernel had to be written in C. Elisp is slow.

It’s probably possible today to write an Emacs in a high-performance Lisp.

Elisp has no support for concurrency, for example.

“Some 359,000 lines of C code comprise its kernel, and 1,637,000 lines of Emacs Lisp take the rest of it.1”

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by gumby on Monday July 29, 2019 @12:36AM (#20551541)
> Emacs is 43 years old. When it was written, the kernel had to be written in C. Elisp is slow.

43 years ago Emacs wasn't written in C or Lisp. It was first just a bunch of TECO code, and TECO was written in assembler (I still have the source on my bookshelf).

In fact none of the first three machines to have Emacses (PDP-10, Multics, and the CADR Lispm) supported C. (C was eventually ported to the PDP-10/KL-20 but C can't really represent those machines very well. C was really designed for a specific, restricted kind of architecture, one that is popular today).

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by melling on Monday July 29, 2019 @12:54AM (#20551617)
You’re right the first implementation in C was Gosling Emacs in 1981. Stallman based GNU Emacs on that in 1984.

https://en.m.wikipedia.org/wiki/Emacs

So, would you just say around 38 years and agree that 43 or 38 is pretty much irrelevant to my point?

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by gumby on Monday July 29, 2019 @02:07AM (#20551869)
I don't really know what your point was. I started using TECO emacs in the 70s and it's pretty deeply wired into my fingers.
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by creato on Monday July 29, 2019 @12:16AM (#20551469)
Whenever I open a file of code that is ~2000 lines or more, emacs slows to a crawl. It takes 5 seconds to redraw the visible text after hitting "page up" or "page down".

I don't think emacs should be made any slower than it already is.

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by dmortin on Monday July 29, 2019 @12:28AM (#20551514)
> Whenever I open a file of code that is ~2000 lines or more, emacs slows to a crawl.

Then there is something wrong with your environment. Emacs has no problems with big files. It can have problems with very long lines, but big files shouldn't slow it down.

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by slightwinder on Monday July 29, 2019 @02:43AM (#20552023)
That's not true. Emacs has several problems with big files. Though, to be more specifically, built-in minor-modes have them. So it depends on whether you run a bleak vanilla emacs without anything, or a mildly comfortable emacs with at least something like fontlock-mode and stuff.

But, 2000 lines are really not that much. Usually problems on my systems start to show at >10k lines.

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by IronBacon on Monday July 29, 2019 @10:07AM (#20554717)
Syntax high-light pays its tool on not so huge files, but I remember opening without slowdowns files with around 100K lines in text mode (mostly log files).

Not exactly related but with Emacs 27 will be distributed the so-long mode that could toggle minor modes that affect redrawing like "font-lock", "visual-line", "whitespace" when files with long lines are opened: https://git.savannah.nongnu.org/cgit/so-long.git/plain/so-lo...

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by IronBacon on Wednesday July 31, 2019 @08:05AM (#20573645)
Clearly I meant "toll" not "tool" above...
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by fooker on Monday July 29, 2019 @12:31AM (#20551521)
I can reproduce this with emacs obtained from the repo on a newly installed Ubuntu 18.04 virtual machine.
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by dmortin on Monday July 29, 2019 @01:02AM (#20551644)
Then I recommend M-x report-emacs-bug

The emacs developers will be very interested to hear about it.

Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by celeritascelery on Monday July 29, 2019 @09:16AM (#20554261)
That is surprising. I open log files all the time with several million lines without issue. If you are having issues try running it in fundamental-mode.
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by sachdevap on Monday July 29, 2019 @12:37AM (#20551546)
As someone else has mentioned. Maybe the lines are very long. That is a known problem, and some minor solutions have been proposed, but it is an entrenched problem (in the way data structures handle text), and not one that programmers run into at any rate (unless you open those terrible "one-liner" javascript files).
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by creato on Monday July 29, 2019 @12:47AM (#20551584)
See fooker's reply in this thread. He is using the same setup as I am.
Re:Emacs Users Are Like Terry Pratchett’s Igors (2013) by sachdevap on Monday July 29, 2019 @02:53PM (#20558021)
I was asking for the nature of the file, not the setup.