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

Use the new module support coming in Emacs 25 #60

Open
jwiegley opened this issue Aug 30, 2016 · 9 comments
Open

Use the new module support coming in Emacs 25 #60

jwiegley opened this issue Aug 30, 2016 · 9 comments

Comments

@jwiegley
Copy link

This is a great project! I wonder if you could achieve even better integration by using the new support for dynamically loaded C modules coming in Emacs 25.1. It would require a little more boilerplate to get a Haskell library "ready" for inclusion into Emacs, but it should eliminate some of the marshalling overhead in some cases.

@mwotton
Copy link

mwotton commented Aug 30, 2016

Hi John!

I discussed this with Florian a little while ago - don't think he'll mind me posting.

Florian:
"""
I must confess that I didn't know about the native modules.
It seems to me that the only advantage of the native modules are the
avoidance of the pipe overhead, but with the big disadvantage of having
to recompile emacs and not beeing able to distribute via melpa.

I guess I'll wait a bit and look how it works
"""

Me:
""""
I don't think you have to recompile emacs - it loads .so files.
I think you could use the same model - I started with https://github.com/mwotton/emacsplugin which shows how you can compile a .so separately, then require it in emacs.

I agree that unless you can show the pipe overhead is really killing you it doesn't make much sense, and in any case it'll take a while for everyone to upgrade to 25.
"""

@jwiegley
Copy link
Author

You are right, recompiling Emacs is not necessary. And also that if the overhead isn't killing you (if the module is largely computational, with small inputs and outputs), then piping is perfectly fine.

@knupfer
Copy link
Owner

knupfer commented Sep 4, 2016

Hey John, what an honor to read your words on my tiny hobbyist project (I've actually got a totally different profession).
At least for now, I'd suggest to ignore the overhead until there pops up a high perf usecase, or are you limited in a specific case?

@jwiegley
Copy link
Author

jwiegley commented Sep 4, 2016

You are right, @knupfer, ignoring until a pressing need arises is the wise course. Good luck with your totally different profession! :)

@sboosali
Copy link

@jwiegley is there a tutorial for emacs modules? I'd like to make a "hello world" modules that (say) sorts a buffer via haskell.

@jwiegley
Copy link
Author

This looks like it may be a good starting point, although I have not tried it yet myself: http://diobla.info/blog-archive/modules-tut.html

@sboosali
Copy link

sboosali commented Jan 21, 2017 via email

@jwiegley
Copy link
Author

jwiegley commented Jan 21, 2017 via email

@sboosali
Copy link

sboosali commented Jan 21, 2017 via email

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

4 participants