unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Concurrency Library
@ 2020-03-31  3:42 Zach Shaftel
  2020-03-31 13:15 ` Eli Zaretskii
  2020-03-31 19:59 ` Ag Ibragimov
  0 siblings, 2 replies; 6+ messages in thread
From: Zach Shaftel @ 2020-03-31  3:42 UTC (permalink / raw)
  To: Emacs developers

I'm wondering if there's interest in a library which wraps threads,
mutices and condition-variables into higher level constructs like
futures, readers-writer locks, agents, concurrent queues etc. I'm
considering this as a project for Summer of Code, but not sure if
it's something others would want included with Emacs.

I can say from personal experience that I don't bother making
programs concurrent in languages with only primitives like mutices
and semaphores, but in Clojure I'll happily spin up agents to
coordinate work. My hope is that the concision and built-in safety
provided by these abstractions could encourage more authors to make
their ELisp programs concurrent.

Thoughts?

-Zach



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Concurrency Library
  2020-03-31  3:42 Concurrency Library Zach Shaftel
@ 2020-03-31 13:15 ` Eli Zaretskii
  2020-03-31 19:59 ` Ag Ibragimov
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2020-03-31 13:15 UTC (permalink / raw)
  To: Zach Shaftel; +Cc: emacs-devel

> From: Zach Shaftel <zshaftel@gmail.com>
> Date: Mon, 30 Mar 2020 23:42:08 -0400
> 
> I'm wondering if there's interest in a library which wraps threads,
> mutices and condition-variables into higher level constructs like
> futures, readers-writer locks, agents, concurrent queues etc. I'm
> considering this as a project for Summer of Code, but not sure if
> it's something others would want included with Emacs.

I think it could be useful, yes.

Thanks.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Concurrency Library
  2020-03-31  3:42 Concurrency Library Zach Shaftel
  2020-03-31 13:15 ` Eli Zaretskii
@ 2020-03-31 19:59 ` Ag Ibragimov
  2020-04-01  2:06   ` Richard Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: Ag Ibragimov @ 2020-03-31 19:59 UTC (permalink / raw)
  To: emacs-devel


I would love to see Clojure's core.async ported to elisp.

On Mon 30 Mar 2020 at 20:42, Zach Shaftel <zshaftel@gmail.com> wrote:

> I'm wondering if there's interest in a library which wraps threads,
> mutices and condition-variables into higher level constructs like
> futures, readers-writer locks, agents, concurrent queues etc. I'm
> considering this as a project for Summer of Code, but not sure if
> it's something others would want included with Emacs.
>
> I can say from personal experience that I don't bother making
> programs concurrent in languages with only primitives like mutices
> and semaphores, but in Clojure I'll happily spin up agents to
> coordinate work. My hope is that the concision and built-in safety
> provided by these abstractions could encourage more authors to make
> their ELisp programs concurrent.
>
> Thoughts?
>
> -Zach




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Concurrency Library
  2020-03-31 19:59 ` Ag Ibragimov
@ 2020-04-01  2:06   ` Richard Stallman
  2020-04-02 17:00     ` Zach Shaftel
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2020-04-01  2:06 UTC (permalink / raw)
  To: Ag Ibragimov, Zach Shaftel; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]


  > > I'm wondering if there's interest in a library which wraps threads,
  > > mutices and condition-variables into higher level constructs like
  > > futures, readers-writer locks, agents, concurrent queues etc. I'm
  > > considering this as a project for Summer of Code, but not sure if
  > > it's something others would want included with Emacs.

Adding these facilities to Emacs Lisp could be very nice.

  > I would love to see Clojure's core.async ported to elisp.

If "ported to Elisp" means adding its features to Emacs Lisp in a
clean way, I'm in favor.  But we should think about the interfaces and
consider whether some changes in them would fit Lisp better.  Clojure
is like Lisp in many ways, but it does not have Lisp lists.

If it means inserting the code used in Clojure into Emacs Lisp,
I think that isn't the way to do it right.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Concurrency Library
@ 2020-04-01  3:03 Zhu Zihao
  0 siblings, 0 replies; 6+ messages in thread
From: Zhu Zihao @ 2020-04-01  3:03 UTC (permalink / raw)
  To: zshaftel; +Cc: emacs-devel

There was promise(abstraction of a future value)

https://github.com/chuntaro/emacs-promise

And I am working on a ReactiveX like project to provide observable for Emacs
Lisp.

https://github.com/cireu/emacs-rstream




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Concurrency Library
  2020-04-01  2:06   ` Richard Stallman
@ 2020-04-02 17:00     ` Zach Shaftel
  0 siblings, 0 replies; 6+ messages in thread
From: Zach Shaftel @ 2020-04-02 17:00 UTC (permalink / raw)
  To: rms; +Cc: Ag Ibragimov, emacs-devel

> Adding these facilities to Emacs Lisp could be very nice.

Very glad to hear it, I've submitted the proposal so hopefully I'll be able to
work on this project soon.

> > I would love to see Clojure's core.async ported to elisp.

I'll certainly look into it, though it probably is outside the scope of a summer
project. I do of course intend to continue the project after GSoC, so that could
be a future endeavor. Perusing the source and docs, core.async relies on thread
pools and I think readers-writer locks, which are among the first few constructs
I plan to implement.

> If "ported to Elisp" means adding its features to Emacs Lisp in a
> clean way, I'm in favor.  But we should think about the interfaces and
> consider whether some changes in them would fit Lisp better.  Clojure
> is like Lisp in many ways, but it does not have Lisp lists.
>
> If it means inserting the code used in Clojure into Emacs Lisp,
> I think that isn't the way to do it right.

I agree, the library should certainly be tailored to Emacs's strengths and
conform to Elisp's idioms, and figuring out the best way to do that is the first
step in my proposal.

-Zach



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-02 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-31  3:42 Concurrency Library Zach Shaftel
2020-03-31 13:15 ` Eli Zaretskii
2020-03-31 19:59 ` Ag Ibragimov
2020-04-01  2:06   ` Richard Stallman
2020-04-02 17:00     ` Zach Shaftel
  -- strict thread matches above, loose matches on Subject: below --
2020-04-01  3:03 Zhu Zihao

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).