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

Add Calispel? #290

Closed
Ambrevar opened this issue Oct 5, 2019 · 9 comments
Closed

Add Calispel? #290

Ambrevar opened this issue Oct 5, 2019 · 9 comments

Comments

@Ambrevar
Copy link
Contributor

Ambrevar commented Oct 5, 2019

GitHub: https://github.com/hawkir/calispel

I believe it provides a couple of procedures that lparallel misses, e.g. the "select" procedure to choose the next available channel among a set of channels.

@vindarel
Copy link
Collaborator

vindarel commented Oct 5, 2019

Maybe… at the moment I see 3 commits and zero stars… you want to post it to reddit to see if there is feedback, and giving yours?

@Ambrevar
Copy link
Contributor Author

Ambrevar commented Oct 5, 2019 via email

@Ambrevar
Copy link
Contributor Author

I've finally found the time to test this.
I've used lparallel for some time as well as ChanL.

  • Unlike lparallel, it does not require this initialization of a
    global kernel. so it works out of the box.

  • Unlike lparallel, sending to a channel is a blocking operation (this
    makes lparallel unusable for proper CSP if I understand correctly).

  • It has a blocking SELECT statement (called fair-alt), unlike
    lparallel which has no such statement, and unlike ChanL which has only a
    a non-blocking SELECT statement (which makes it almost useless).

  • Lparallel has a weird syntax for sending to a channel (submit-task takes a function which is executed concurrently), which departs from usual CSP style.

In short, Calispel seems to just work for everything related to CSP.

If this verifies, then I would recommend Calispel over Lparallel and ChanL which have proven a bit painful for me because of the above points.

@Ambrevar
Copy link
Contributor Author

@Ambrevar
Copy link
Contributor Author

Another benefit of Calispel: FAIR-ALT (the 'select' statement in CSP) is an expression and returns a value, unlike ChanL.

@Ambrevar
Copy link
Contributor Author

Looks like no one really had an opinion about CSP on Reddit.

To test Calispel more in depth, I've replaced ChanL with it in Nyxt: atlas-engineer/nyxt#1047

Works like a charm, and I'm already benefiting from fair-alt!

To conclude, I suggest that we put this library at the top of the recommendations on concurrency. Maybe hand in hand with lparallel, since the latter has convenience functions like pmap.

@vindarel
Copy link
Collaborator

OK. We can put it above ChanL, if it has more features. I think a link to the reddit discussion, or a sentence with your opinion would be beneficial. Not only the reference, but something more opinionated, that gives more pointers.

(lparallel is far more used so it should still stand out, IMO)

@Ambrevar
Copy link
Contributor Author

Ambrevar commented Nov 20, 2020 via email

vindarel added a commit to vindarel/awesome-cl that referenced this issue Dec 17, 2020
@Ambrevar
Copy link
Contributor Author

Ambrevar commented Dec 17, 2020 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

2 participants