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/
(Score: 1, Funny) by Anonymous Coward on Friday January 13 2017, @07:38PM
Lame. If it's not rewritten in node.js it's just not cool enough.
(Score: 2) by ikanreed on Friday January 13 2017, @07:39PM
Please. Where's the react shadowdom?
(Score: 0) by Anonymous Coward on Friday January 13 2017, @09:41PM
FFS don't give these kids ideas...
(Score: 3, Interesting) by DannyB on Friday January 13 2017, @09:50PM
I wouldn't complain about rewriting Emacs in node.js, as long as, you first rewrite node.js in Rust.
The Centauri traded Earth jump gate technology in exchange for our superior hair mousse formulas.
(Score: 0) by Anonymous Coward on Friday January 13 2017, @07:45PM
nemacs = emacs ported to /dev/null
(Score: 2, Insightful) by Anonymous Coward on Friday January 13 2017, @07:52PM
Isn't that already called "vim"?
(Score: 0) by Anonymous Coward on Friday January 13 2017, @08:15PM
Only question: why? Just for fun? Promotion of Rust?
(Score: 5, Funny) by Anonymous Coward on Friday January 13 2017, @08:19PM
Old code is bad because it's mature and well-debugged. It needs to be rewritten and have all sorts of new bugs introduced.
(Score: 3, Insightful) by Lester on Friday January 13 2017, @10:14PM
Funny? Perhaps sarcastic, but i's not a joke. It is a very intelligent comment, he has bit in the nail
(Score: 1, Insightful) by Anonymous Coward on Friday January 13 2017, @11:30PM
I guess we should count ourselves lucky that these modern-day software "engineers" aren't in a real engineering profession. They'd be trying to rework tried-and-true designs and principles because they're "old" and "legacy." We'd have a bunch bridges, skyscrapers and highways that would be falling apart due to design flaws because they thought they new better than those "old people" that came before them.
(Score: 1) by Lester on Wednesday January 18 2017, @12:51PM
I suppose it is a sarcastic answer to my comment.
Is there any reason to knock down the Empire State Building, just to rebuild it with the same height, the same square meters, just exactly the same?. If the current Empire State Building has problems, cracks, etc, let's do it, but let's build a better building, not the same but with modern materials and tools.
We have an old bridge paved it with two lanes where cars go up and down. If you want a wider bridge with more lanes, a stronger bridge because it has support heavy trucks, let's remove it and build another. But if we needn't more "features", the bridge is solid (maybe 1000 year there). Why should remove it?.
I don't mean that we should stop innovation, just that starting from scratch for doing exactly the same thing makes no sense, and in the case of software is prone to new bugs, just to get the same.
Do you want a new editor emacs-like, improving x,y,z, adding a,b,c that is too difficult to add to the current code? Code it in Rust, or Go, or Swift, or Erlang. But to get the same emacs we have now... why? It has no bugs and it looks that does what user expect it should do. Rewriting a clone in another language makes no sense, you will have the same but with more bugs. That is unless you want to test the language.
By the way, I suppose emacs was a big improvement for those years editors state of art, but I feel happy that many people has had the idea or writing new editors, no matter in what language. As some said "Emacs is a great operating system, lacking only a decent editor".
(Score: 2) by davester666 on Saturday January 14 2017, @08:00AM
and it must be able to run in a browser.
(Score: 2) by LoRdTAW on Saturday January 14 2017, @04:31PM
Not funny but true. I get that new languages have some benefits. I was recently playing with Rust and it feels nice compared to c. But to rewrite an existing OS (not that's funny!) in Rust just for the sake of it is well... pointless. Though, far be it for me to tell someone what to do with their time. Have fun I guess.
(Score: 2, Informative) by Anonymous Coward on Friday January 13 2017, @08:37PM
Only question: why?
Hipsters.
(Score: 1, Funny) by Anonymous Coward on Friday January 13 2017, @08:41PM
Because Rust Never Sleeps.
(Score: 0) by Anonymous Coward on Friday January 13 2017, @08:50PM
If you were charged with ensuring that a programming language is robust and usable (or just learning that language), wouldn't implementing something established and well known be a great way to do that? Well established behavior patterns to emulate. Why Emacs? *shrug* It's a pet project of a few devs that got a blog post and a soylent article.
(Score: 0) by Anonymous Coward on Friday January 13 2017, @08:54PM
Unlikely. Reading the blog and the github page, this is just Rust hipsterism.
(Score: 1, Touché) by Anonymous Coward on Friday January 13 2017, @08:54PM
Why Emacs?
Remember when they said they wanted to write an operating system in Rust? Now all it needs is a decent text editor.
(Score: 0) by Anonymous Coward on Friday January 13 2017, @09:12PM
There is already vi mode for it. Three of them, if I remember correctly.
(Score: 0) by Anonymous Coward on Friday January 13 2017, @09:07PM
If they wanted to solicit my help, they should have picked porting nethack.
(Score: 2, Troll) by Nerdfest on Friday January 13 2017, @09:26PM
Yeah, this would not be at the top of the list of things I'd do in Rust. I'd pick stuff like openSSH and other things where buffer overflows and memory allocation mistakes create security exploits. Hell, I'd do an operating system before Emacs, or is that a contradiction?
(Score: 2) by Aiwendil on Friday January 13 2017, @10:28PM
They already have redox (os written in rust), so it seems they agree on OS first ;)
(Score: 2) by JoeMerchant on Friday January 13 2017, @10:29PM
I'd do an operating system before Emacs, or is that a contradiction?
Yes.
🌻🌻🌻 [google.com]
(Score: 2) by Nerdfest on Saturday January 14 2017, @01:05AM
Thanks. This is why I come here. Well, that and the abuse.
(Score: 1, Insightful) by Anonymous Coward on Saturday January 14 2017, @01:18AM
Rust hipsters are the last people who should be writing security software. You're gonna end up with plenty of different bugs in the original code that they'll imtroduce.
(Score: 2) by maxwell demon on Saturday January 14 2017, @05:54AM
Because it's old. Old things tend to Rust if you don't explicitly protect against it, didn't you know that?
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by hendrikboom on Friday January 13 2017, @10:28PM
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.
(Score: 2) by Marand on Saturday January 14 2017, @12:38AM
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
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
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!
(Score: 0) by Anonymous Coward on Friday January 13 2017, @11:37PM
so now the realty company is branching into hipster kodester.
(Score: 2) by FatPhil on Friday January 13 2017, @11:49PM
That makes no sense - you write elisp functions in elisp, otherwise, they're *not elisp functions*?!?!?
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by Marand on Saturday January 14 2017, @12:25AM
That makes no sense - you write elisp functions in elisp, otherwise, they're *not elisp functions*?!?!?
It's an elisp function in the sense that it's created to be used from elisp, but created in the underlying langauge (normally C, or Rust in this thing's case). For another example of this, look at Lua, which is frequently embedded in software such as games, which results in a similar situation: Lua functions that were implemented in whatever language it was embedded into. So, it sounds like they're requesting help converting elisp-callable functions that were implemented in C.
One interesting thing about lisps is, once you have a few primitives, you can implement the rest of the language with the lisp itself... however, they always seem to implement more than the minimum necessary in the "parent" language, presumably for performance reasons. With a codebase as old as emacs, there's probably a lot of code like that lying around.
(Score: 2) by FatPhil on Sunday January 15 2017, @01:14PM
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by Marand on Sunday January 15 2017, @09:02PM
Seriously? I'm aware they're primitives -- I called them that in my comment in fact -- but it's usually not worth making the distinction explicitly. I made a good-faith attempt to explain what they likely meant because I thought it might be a legitimate question instead of smart-assed pedantry, but your follow-up indicates I was mistaken. Now you're just nitpicking in a desperate attempt to correct me.
(Score: 2) by FatPhil on Monday January 16 2017, @01:00AM
Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
(Score: 2) by rufty on Saturday January 14 2017, @01:11PM