TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Announcing Remacs: Porting Emacs to Rust

206 pointsby smgover 8 years ago

17 comments

fafnerover 8 years ago
The example seems to be wrong <a href="https:&#x2F;&#x2F;github.com&#x2F;Wilfred&#x2F;remacs#porting-c-functions-to-rust-walkthrough" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Wilfred&#x2F;remacs#porting-c-functions-to-rus...</a><p>fn Fnumberp(object: LispObject) -&gt; LispObject { if lisp::SYMBOLP(object) { unsafe { Qt } } else { Qnil } }<p>It uses SYMBOLP instead of NUMBERP. Highlighting the risk of introducing new bugs.<p>Which leads to the question, why Remacs can&#x27;t just auto-wrap the lisp::* functions, which I assume are the Rust versions of the C Macros. If you look at Emacs&#x27; C code there are a lot of functions and macros that implement Elisp primitives in a C way. E.g., NUMBERP(x) will return 1 if x is a number or else 0. So you can use this function to deal with lisp objects in C code. The function that exports this primitive to elisp is Fnumberp. Rust has a better type system than C and supports meta-programming. So why not have a simple wrapper that can take a (LispObject) -&gt; bool and turn it into a (LispObject) -&gt; LispObject. Similar for other Elisp&lt;-&gt;Rust types.<p>However unless GNU Emacs is willing to accept the Rust replacement code I don&#x27;t think this will succeed. It is a lot of work and it takes quite some time until it actually pays off. It seems simpler to do what GCC and GDB have done and switch from C to (a strict subset of) C++ to simplify at least some of the more painful C hackeries.<p>And the reasoning given in the announcement are rather weak:<p>* &quot;We can leverage the rapidly-growing crate ecosystem.&quot; Emacs recently added module support allowing leveraging all kinds of ecosystems<p>* &quot;We can drop support legacy compilers and platforms (looking at you, MS-DOS).&quot; how is that an opportunity when it effectively removes support for platforms.
评论 #13379973 未加载
评论 #13379933 未加载
gkyaover 8 years ago
Emacs needs its stuff moved into Elisp as much as possible, and its Elisp to be improved, not a port of the C stuff to some random language. Rust is not a standardised language and is mostly driven by a single entity. Totally not the right tool. Also I find it very cryptic.
评论 #13380896 未加载
评论 #13389361 未加载
jlaroccoover 8 years ago
Meh.<p>As a long time Emacs user, the only way I&#x27;d even consider switching off of GNU Emacs would be if there was a port written in Common Lisp that replaced ELisp with Common Lisp. Even then, I&#x27;d only switch if it had replacements for the ELisp modules I use (ERC, Slime, C++-mode, etc.).<p>As an end user, I don&#x27;t see any advantages in switching to yet another Emacs rewrite in yet another low level language.
评论 #13379138 未加载
评论 #13379699 未加载
评论 #13379632 未加载
pandeiroover 8 years ago
I really love the idea and style of this blog post and the project&#x27;s README. I recognized the style from somewhere and then realized it was the same author as &quot;Example Driven Development&quot;[1], another one that showed up on HN a while back.<p>[1]: <a href="http:&#x2F;&#x2F;www.wilfred.me.uk&#x2F;blog&#x2F;2016&#x2F;07&#x2F;30&#x2F;example-driven-development&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.wilfred.me.uk&#x2F;blog&#x2F;2016&#x2F;07&#x2F;30&#x2F;example-driven-deve...</a>
integrichoover 8 years ago
People should stop rewriting huge codebases that work quite well into the next hype-language. There&#x27;s absolutely nothing wrong to develop it in C or C++. Stop the hype-train.
评论 #13382138 未加载
评论 #13384308 未加载
noway421over 8 years ago
Rust is becoming such a huge systems development language, that&#x27;s so good to hear that finally the developers are getting better deal for performant applications instead of C&#x2F;C++
评论 #13378768 未加载
评论 #13378681 未加载
评论 #13380618 未加载
评论 #13380720 未加载
gregpardoover 8 years ago
So it has about 10 rust files so far?
merbover 8 years ago
Isn&#x27;t there already another project, creating a OS with rust?
moominover 8 years ago
The problem, of course, being that Emacs has become a horrible codebase to maintain 20 years of compatibility, and rewriting is unlikely to change that.
评论 #13378877 未加载
评论 #13380306 未加载
评论 #13381820 未加载
jyriandover 8 years ago
Over the years I have see a number of posts about revamping emacs. Is there anything that actually works?
评论 #13381695 未加载
geff82over 8 years ago
What a waste of time.
Semiapiesover 8 years ago
Bold!<p>Practical, however, I have no idea whatsoever about.
dmanover 8 years ago
How long before someone decides to port LLVM and jemalloc to rust? :)
lugus35over 8 years ago
Why use a GPL license ? This kind of port could have been the occasion to get rid of this type of license.<p>Why port Emacs to Rust ?, it adds no value to users. Why not develop a modern GUI like Intellij IDEA with a Common Lisp implementation underneath like SBCL ?
评论 #13381652 未加载
评论 #13387098 未加载
kahrkunneover 8 years ago
Emacs is already struggling with a lack of core developers; porting it to a relatively obscure language won&#x27;t alleviate that. I&#x27;d rather people help out with Emacs proper than doing silly stuff like this.<p>I know Rust fans are passionate, but we don&#x27;t <i>really</i> need &quot;X, but in Rust&quot; for every value of X.
nodivbyzeroover 8 years ago
Good luck!
webkikeover 8 years ago
Sounds like fun, I&#x27;m in.