A completely pre-emptive time sharing system for GNU Emacs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

A completely pre-emptive time sharing system for GNU Emacs

Davin Pearson
I posted the following message to google groups (gnu.emacs.help) but I got no reply.  Then I emailed Richard Stallman this message and he suggested that I send it to the following email address:

<snip>

Michael Abraham Shulman has written a coroutine feature for
Emacs at the following location.

https://www.emacswiki.org/emacs/coroutine.el

I am about to write a completely pre-emptive time-sharing system
but first I need to know if I will be re-inventing the wheel.

I hope my contribution to GNU Emacs is helpful for all the
programmers out there who agonize over GNUS busy waiting all the
time.

</snip>

--
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com
Reply | Threaded
Open this post in threaded view
|

Re: A completely pre-emptive time sharing system for GNU Emacs

John Wiegley-6
>>>>> "DP" == Davin Pearson <[hidden email]> writes:

DP> I am about to write a completely pre-emptive time-sharing system but first
DP> I need to know if I will be re-inventing the wheel.

Hi Davin,

Will this be a C extension of Emacs core?

What are your intentions for the project? What needs do you see it fulfilling?

Yours,
--
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

Reply | Threaded
Open this post in threaded view
|

Re: A completely pre-emptive time sharing system for GNU Emacs

Tom Tromey-4
In reply to this post by Davin Pearson
>>>>> "Davin" == Davin Pearson <[hidden email]> writes:

Davin> Michael Abraham Shulman has written a coroutine feature for
Davin> Emacs at the following location.
Davin> https://www.emacswiki.org/emacs/coroutine.el

In a similar vein, there's also generator.el in the Emacs source tree.

Tom

Reply | Threaded
Open this post in threaded view
|

Re: A completely pre-emptive time sharing system for GNU Emacs

Eli Zaretskii
In reply to this post by Davin Pearson
> From: Davin Pearson <[hidden email]>
> Date: Thu, 7 Feb 2019 03:33:23 +1300
>
> Michael Abraham Shulman has written a coroutine feature for
> Emacs at the following location.
>
> https://www.emacswiki.org/emacs/coroutine.el

I believe the concurrency feature present in Emacs 26 is a better
solution for the same class of problems.

Reply | Threaded
Open this post in threaded view
|

Re: A completely pre-emptive time sharing system for GNU Emacs

Davin Pearson
In reply to this post by John Wiegley-6


On Wed, 6 Feb 2019 at 19:18, John Wiegley <[hidden email]> wrote:
>>>>> "DP" == Davin Pearson <[hidden email]> writes:

DP> I am about to write a completely pre-emptive time-sharing system but first
DP> I need to know if I will be re-inventing the wheel.

Hi Davin,

Will this be a C extension of Emacs core?


I plan to write the extension in Elisp.
 
What are your intentions for the project? What needs do you see it fulfilling?


Anyone who wants Java style threads in their Elisp programs.

Basically, my idea is this:  Suppose you have the following Elisp code:

(defun code ()
   (setq abc 'def)
   (setq def 'ghi))

My mult-threader then generates the following code.

(defun foo-1 ()
   (setq abc 'def)
)

(defun foo-2 ()
  (setq def 'ghi))

Obviously the code gets difficult when you have if/while  constructs.

--
Sincerely and kindest regards, Davin.
Davin Pearson    http://davin.50webs.com