Live data from Hacker News

Emacs-ng: Emacs with Deno runtime and TypeScript

github.com

11–20 of 154 posts

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#11
post #9
post #3

Compare the recursive Fibbonaci function against Scheme with Guile's JIT.

EDIT: as pointed out, this is run with Guile 2.2, which is pre-JIT. Results to be posted later in this thread... Okay. $ cat fib.scm (define (fibonacci n) (if ( Node also uses V8. $ time node fib.js node fib.js 1.29s user 0.01s system 100% cpu 1.296 total But okay, you wanted deno. $ time deno run fib.js deno run fib.js 1.41s user 0.02s system 99% cpu 1.423 total Meanwhile, using `emacs --script fib.elc` to evaluate…

        guile --version?
EDIT: Guile3 brings JIT support...

Guile always compiles code before running it, but adding a JIT it's only from v > 2.91.x, and by default at v3.

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#12
post #11
post #9

Earlier quoted context omitted.

EDIT: as pointed out, this is run with Guile 2.2, which is pre-JIT. Results to be posted later in this thread... Okay. $ cat fib.scm (define (fibonacci n) (if ( Node also uses V8. $ time node fib.js node fib.js 1.29s user 0.01s system 100% cpu 1.296 total But okay, you wanted deno. $ time deno run fib.js deno run fib.js 1.41s user 0.02s system 99% cpu 1.423 total Meanwhile, using `emacs --script fib.elc` to evaluate…

guile --version? EDIT: Guile3 brings JIT support... Guile always compiles code before running it, but adding a JIT it's only from v > 2.91.x, and by default at v3.

Ah. This is on Guile 2.2, apparently. Installing guile3 and rerunning...

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#13
post #12
post #11

Earlier quoted context omitted.

guile --version? EDIT: Guile3 brings JIT support... Guile always compiles code before running it, but adding a JIT it's only from v > 2.91.x, and by default at v3.

Ah. This is on Guile 2.2, apparently. Installing guile3 and rerunning...

Better, but still slower by about 1.5x.

    $  time guile3 fib.scm
    guile3 fib.scm  2.01s user 0.02s system 99% cpu 2.047 total
edit: apparently my cpu was still being throttled post-build or something, as the initial runs were around 3s. Rerunning slightly later, it was noticeably faster.

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#14
post #6

I see a lot of parallels between Emacs' problems now and Vim's problems a few years ago: opaque maintenance/contributions, poor performance inherited from core design decisions made decades ago, the burden of backwards compatibility for legacy systems, etc. I think Emacs users and the community would benefit from a ground-up modern rewrite much like Neovim did for Vim, especially compared to this project which adds e…

I tend to agree with this - Emacs is my daily driver and the way I use it, it's really 1) a tightly integrated window manager/text editor powered by elisp, and 2) a great community providing additional functionality. It would be relatively easy to make something to replace (1) for me, but (2) is tough. I'd love to know how far we could get with an updated editor and rendering system, with backward compatibility for emacs code via some sort of emacs/new-system translation layer - I was really excited for xi-editor for that reason because it seemed like it might be a good platform for those kinds of experiments.

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#16
post #6

I see a lot of parallels between Emacs' problems now and Vim's problems a few years ago: opaque maintenance/contributions, poor performance inherited from core design decisions made decades ago, the burden of backwards compatibility for legacy systems, etc. I think Emacs users and the community would benefit from a ground-up modern rewrite much like Neovim did for Vim, especially compared to this project which adds e…

Port of Emacs to rust https://github.com/remacs/remacs

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#17
post #13
post #12

Earlier quoted context omitted.

Ah. This is on Guile 2.2, apparently. Installing guile3 and rerunning...

Better, but still slower by about 1.5x. $ time guile3 fib.scm guile3 fib.scm 2.01s user 0.02s system 99% cpu 2.047 total edit: apparently my cpu was still being throttled post-build or something, as the initial runs were around 3s. Rerunning slightly later, it was noticeably faster.

Well, not bad considering Guile3 and it's JIT are pretty early on release compared to the enormous work from a company as huge as Google with a full team working on v8 across years.

Guile3 will improve that, too.

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#18
The Emacs community, like the Lisp community with which it overlaps, is very conservative, in the sense that it doesn't throw things away quickly or make huge changes lightly. For that reason, I'd be very surprised if this took off — even though it sounds like it would be mostly backwards-compatible. I think Emacs types would shy away from building JavaScript into their editor, having V8 be the engine, adding more layers of abstraction to understand and maintain, and splitting the extensions between Emacs Lisp and JavaScript. I'm also not convinced that a significant part of the community really wants this.

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#19
post #10
post #4

I personally look forward to the day when every program I run embeds JavaScript and an HTML engine in it. Then we will be living in an age of true modernity in software development. Systemd-ng, anyone?

I'm sure Samsung, Micron and every other company selling DIMMs are looking forward for that day too. It would need how much more memory for everything? My beefy desktop computer is often already struggling just to run Chrome. Emacs used to stand for "Eight Megabytes and constly swapping", maybe they could name it now Egacs (Eight Gigabytes ...)

In the days of the 486 being nothing more than "junk" compared to a Pentium 2, running Emacs with SICP on Texinfo format was the light approach compared to open a full browser to read HTML pages.

Ditto with Groff+Mom occuping a few MB (totally doable in 1997) vs a GB LaTex install lasting several minutes to render a PostScript, and then running X (if even) just to display the resulting file and nothing more.

Nowadays even QT5 software looks lightweight enough compared to some Electron monsters...

Re: Emacs-ng: Emacs with Deno runtime and TypeScript

#20

The Emacs community, like the Lisp community with which it overlaps, is very conservative, in the sense that it doesn't throw things away quickly or make huge changes lightly. For that reason, I'd be very surprised if this took off — even though it sounds like it would be mostly backwards-compatible. I think Emacs types would shy away from building JavaScript into their editor, having V8 be the engine, adding more la…

If any, having Elisp support on Guile would have far more sense, and with a JIT and non-blocking IO Emacs would be usable enough even under a high subprocess load (cough, GNUs).

I am not an Emacs user but I like Scheme (scm user here) under nvi, and a lot of people could profit from a Modern Guile based Emacs environment.

Post reply on HN