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

Taking a crack at swapping out easy-ffi for eff-functions #17

Open
afcondon opened this issue Mar 10, 2016 · 3 comments
Open

Taking a crack at swapping out easy-ffi for eff-functions #17

afcondon opened this issue Mar 10, 2016 · 3 comments

Comments

@afcondon
Copy link

Hi, just FYI i'm working on replacing all the easy-ffi calls with calls using purescript-eff-functions eff-functions instead.

If it works out, and if you want to, i'll be happy to make a PR available when it's done.

@pelotom
Copy link
Owner

pelotom commented Mar 15, 2016

Can you help me understand what the advantage is?

@afcondon
Copy link
Author

I can't say as yet whether there definitively is an advantage but the advantages that i foresaw were:

  • being able to write more (all?) of the code in PureScript
  • avoiding on-the-fly compilation of inlined FFI code
  • stronger typing
  • possible code-gen possibilities or automatic derivation of the FFI bindings (speculative)

Additionally i have a particular use-case where i wish to use another purescript library purescript-pux from the callbacks associated with elements in the D3 SVG or HTML structure.

Where i'm at now with this is that i have everything working that i wanted to get working. I'm now trying to see how much else i might have to implement in order to really be able to write only in purescript for the D3. My plan would be to add features as i need them (i know i will need zoom, for example). For example, i have added classed and i'm about to add datum.

I think the D3 DSL you created is a really great example of the expressiveness of Haskell / Purescript even for very much non-pure API's such as D3. I'm interested in pushing that as far as it goes.

@pelotom
Copy link
Owner

pelotom commented Mar 21, 2016

Cool, would be happy to entertain a pull request, and it'd be great to see some examples of how the change enables your use case. Growing the library as we want to make use of various parts of D3 is exactly my philosophy for this project. Glad you're finding it useful!

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