Stories
Slash Boxes
Comments

SoylentNews is people

posted by n1 on Friday January 13 2017, @07:34PM   Printer-friendly
from the to-vi-or-not-to-vi dept.

Submitted via IRC for TheMightyBuzzard

I am delighted to announce Remacs, a project to port Emacs to Rust!

Emacs, at its heart, is a lisp interpreter written in C. In Remacs, we're replacing this C code with Rust, and all the elisp you know and love will just work.

If you've ever fancied contributing to core Emacs, this is a great opportunity to learn the internals. There's tons of low hanging fruit, we have a list of good first bugs and even a walkthrough of writing your first elisp function using Rust.

Rust is perfect for this because we can port incrementally. If you want to replace the entire regular expression engine, you can do that. If you just want to replace this function here, you can do that and the C code won't even notice. You will have a full-blown Emacs every step of the way.

[...] Remacs is based on Emacs 25.2. We've got enough type definitions that you can write interesting built-in functions, but the project is still at a very early stage. Using these, we've got a few built-in elisp functions written entirely in Rust: some arithmetic, some type checks, and even some basic list functionality.

I'll stick to MrPlow for now, thanks. He's Rust enough for me until his code stops looking like a noob wrote it.

Source: http://www.wilfred.me.uk/blog/2017/01/11/announcing-remacs-porting-emacs-to-rust/


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by hendrikboom on Friday January 13 2017, @10:28PM

    by hendrikboom (1125) Subscriber Badge on Friday January 13 2017, @10:28PM (#453523) Homepage Journal

    While you are at it, consider working on making lexical scoping the default, and inserting static type checking in elisp, to further banish bugs.

    Of course you will still need a compatible legacy mode for old elisp code, which you seem to want to still support.

    Perhaps the best way forward is to use a typed Scheme implementation (something like typed Racket), and add a legacy mode to it. I have the impression that this is the direction that emacs has wanted to take for a while now.

    A for implementing typed Scheme in typed Rust, ideally they should be nicely interoperable. Maybe something like Gambit, which compiles Scheme to C or C++ could translate Scheme to Rust?

    In fact with such a translation system, you could code emacs in a mix of Rust and Scheme, using Scheme as an interpreted, but compilable, scripting language.

    Doing this would advance the state of the art, instead of just retrofitting it.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by Marand on Saturday January 14 2017, @12:38AM

    by Marand (1081) on Saturday January 14 2017, @12:38AM (#453631) Journal

    While you are at it, consider working on making lexical scoping the default, and inserting static type checking in elisp, to further banish bugs.

    Can't do that without breaking compatibility with everything, though. You can already set lexical scoping in a couple ways, and it's encouraged I believe, but it's not something you could just flip a switch on for everything without potentially breaking a lot of code. To do something drastic like that you'd need do a Perl5|6 or Python2|3 type split, essentially freezing the current elisp so that existing code keeps working while encouraging people to move to writing .el2 files or something.

    Though if you're going to do that you may as well go with a completely different, and less shitty, lisp. Preferably a lisp-1 of some kind, such as a Scheme dialect. With some sort of proper fucking regex literal, too; that "\\\\\\\\\\\\\foo" nonsense gets ridiculous. I could keep going, I don't like elisp very much...

    • (Score: 0) by Anonymous Coward on Saturday January 14 2017, @12:55PM

      by Anonymous Coward on Saturday January 14 2017, @12:55PM (#453774)

      The long-standing plan is to replace elisp with Guile [gnu.org], which is the GNU implementation of Scheme, once it has matured enough to have a fully-compatible elisp mode. A quick search shows that you can build the current version of this so-call GuileEmacs from here [emacswiki.org].

  • (Score: 2) by darkfeline on Saturday January 14 2017, @10:26PM

    by darkfeline (1030) on Saturday January 14 2017, @10:26PM (#453932) Homepage

    Static type checking isn't very useful in elisp since the type of almost everything is going to be "cons" and there's no good way to declare static types for all of the ways cons are used (an alist can also be a valid plist, can be a valid list, can be a valid list of lists, can be a valid list of cons, etc)

    --
    Join the SDF Public Access UNIX System today!