3 ms·
Ahh, I finally get to flex. With our powers combined, me and a random unknown dev successfully set up a Python REPL that has access to emacs. I.e. you can progr
by sillysaurusx 5y ago
Ahh, I finally get to flex. With our powers combined, me and a random unknown dev successfully set up a Python REPL that has access to emacs. I.e. you can program emacs via python:
https://twitter.com/theshawwn/status/1472371143000707075 https://twitter.com/theshawwn/status/1472371143000707075
https://github.com/zielmicha/emacspy/issues/1 https://github.com/zielmicha/emacspy/issues/1
Setup guide: https://gist.github.com/shawwn/64e17ac3f7b272ce0ce16eb6a593b107 https://gist.github.com/shawwn/64e17ac3f7b272ce0ce16eb6a593b...
Maybe this'll be the boost you lurkers need to get your butts into one of the coolest editors. "Not your dad's editor" -- new emacs slogan, probably. /s
Bonus screenshot of compiling emacs on a 96 core TPU: https://i.imgur.com/YtJ8jF7.png https://i.imgur.com/YtJ8jF7.png
It launches emacs, then uses the (relatively) new dynamic modules feature to start a Python runtime, which can then import a library that accesses emacs.
But to my surprise, Python can also import whatever you already have `pip3 install`'ed. I imported jax and did some high speed calculations in lisp. Just kidding, I really did import jax, but it'll take a bit more work to be able to pass numpy arrays to emacs. :) But it's "just" a matter of making some kind of RPC system so that (+ a b) ends up calling back into python to do the addition. Then the circle will be complete -- elisp from python (already done), and python from elisp ("exercise for the reader").
For real though, go throw that fella a star on his github repo. The most surprising thing was that this project has been quietly on github for like two years already. It was sitting at zero stars when it popped up in one of my random google searches.
- daptaq 5y agoI don't get what this has to do with OP?
- sillysaurusx 5y agoI'm sorry, I didn't realize that this was a de facto Show HN: https://news.ycombinator.com/item?id=29726481 https://news.ycombinator.com/item?id=29726481 You're right in this case. Apologies to susam. The answer, though, is that I'm not going to bother making a repo and a website and packaging this up in a nice way, so it's always going to seem unrelated to whatever emacs thread I happen to post it on. Or I could just not talk about it, which has worked well for me in the past. It seemed semi-related, because the goal of the OP and the goal of this is the same: to get new people into emacs. Old emacs veterans have no need for an ~/.emacs. But I really didn't intend to steal susam's thunder -- sorry -- it just wasn't marked as a Show HN. /me slinks back to his cave of machine learning.
- susam 5y agoNo apologies necessary! It is always nice to see interesting Emacs projects in the comment threads. :-)
- divbzero 5y agoI bet he’s been waiting a few weeks for the right HN thread to share this new Emacs discovery. Seems only peripherally related to OP as “cool Emacs stuff” but I think he found the right audience. As a daily Vim user I’ll be pulling up Emacs again to give all of this a try.
- CyberShadow 5y agoThat's very cool, but I've personally greatly enjoyed learning and programming in Emacs Lisp. Not only does its ability to immediately evaluate and hot-patch anything work very well with the way it's used in Emacs, but also it was a learning path to a family of languages which is very interesting and unlike mainstream Algol-based ones.
- medo-bear 5y agothis is just a bizzare and unrelated post