Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some improvements #1

Open
shawwn opened this issue Dec 18, 2021 · 3 comments
Open

Some improvements #1

shawwn opened this issue Dec 18, 2021 · 3 comments

Comments

@shawwn
Copy link

shawwn commented Dec 18, 2021

Your project is awesome! I spent some time making a bunch of additions, which you can find here: master...shawwn:master

Basically I improved the interop between python and emacs. EmacsValues now implement __iter__, __len__, __eq__, __repr__, __int__, float`, etc.

You can even index into cons lists by doing e.g. F.list(42, 99, 100)[1] or F.buffer_list()[2].

I love your project -- Thanks so much for making it!

@zielmicha
Copy link
Owner

Thank you for your contribution – I'll try to review it quickly.
Just to confirm - I realized that there is no LICENSE file in this repo, but it was intended to be released with MIT license (which is compatible with GPL used by Emacs). Are you okay with your code being released with this license too?

@shawwn
Copy link
Author

shawwn commented Dec 18, 2021

Oh yes, MIT is perfect!

@shawwn
Copy link
Author

shawwn commented Dec 19, 2021

Lots of people expressed interest in this, both on twitter (https://twitter.com/theshawwn/status/1472371143000707075) and in IRC. I think this is a marvelous idea.

I wrote a setup guide for getting a Python-Emacs REPL up and running: https://gist.github.com/shawwn/64e17ac3f7b272ce0ce16eb6a593b107

I was surprised, both at how effortless it felt to do crazy things, and also how useful it feels in practice. I code mostly in Python nowadays, but no other language has ever matched emacs' editing power -- for example, now I can just write F.untabify() instead of tracking down some Python equivalent that may or may not exist.

There are some weird quirks, but that's to be expected. (It looks like Python doesn't get an exit notification, which means all of the atexit hooks don't run, which ends up causing readline history not to be written to disk on exit. And sys.interactivehook (or whatever it is) wasn't running on startup, so I had to all it manually. But all of that is really quite minor compared to the power you get.)

I'm mostly shocked that no one noticed this for two years, but hats off to you for making such a cool thing. (Please come back to twitter! The more hackers tweeting about stuff like this, the better.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants