all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [ELPA] New package: derl
@ 2023-09-21 10:19 Axel Forsman
  2023-09-21 10:34 ` Axel Forsman
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Forsman @ 2023-09-21 10:19 UTC (permalink / raw)
  To: emacs-devel

Hello everyone:

I have written a new package called derl,
available at http://url8156.axelf.se/ls/click?upn=OEjhiLt4EQwBP7BMdu61cV4sca9Texj-2F9QlDxDS4hNCWjgAQWGLdqn-2B5fUreXtnoaWSy_1I2drHf7TOM-2BFjFYSrHxnLAP9jSFTsULAwXlGneTUPLmu2d9Pk5bm6N4OF11FnZiR7swZoQufDaxy9d0u8CjSCSg3d9PEeb8XuirwNj-2BixV11-2BBHV2wpMefxRdXIIf3MzFo-2FSaYwXNok4vHlUvZoDCNEZTdZR5iNC2MXzlbpwNk4Mj4j40xzbyT7pHEOTkoCwWUcMk-2B5eYuLUheZ8-2FLkaQ-3D-3D
that I believe would make good addition to GNU ELPA.

It provides two main features:

* A concurrency abstraction based on Erlang-like processes.

  Similarly to promises, processes allow writing asynchronous code
  in a natural way without nested callbacks, e.g.

      (derl-spawn
       (iter-make
        (! `(rex . ,node) `[,(derl-self) [call io format ("Hi!~n") user]])
        (message "Got back result: %S" (derl-receive (`[rex ,x] x)))))

  prints the string "Hi!" in the console of the node `node',
  and logs the result when it arrives, without blocking in the interim.

  The embedding of processes is mostly faithful,
  but scheduling is not preemptive or in parallel
  due to being implemented in Emacs Lisp.
* Secondly, a means of communicating with running Erlang VMs from Emacs.

  The motivation is wanting to be able to implement something
  akin to lisp-interaction-mode for editing Erlang.
  For other languages, one way this has been achieved is by
  first uploading a TCP server on the VM (cf. nREPL or Nvim-R)
  that responds to editing commands.
  However, Erlang VMs, having first-class support for distributed applications,
  already expose an RPC server by default.
  One just has to communicate with the VM using the Erlang distribution protocol,
  which is what this package implements.
  (This necessitates having implemented processes.)

  As an example of how this is immediately useful: After doing M-x compile RET,
  executing

      (derl-do (derl-call (derl-rpc node 'c 'lm ())))

  would reload all modules that changed, on the local node `node'.

See the package commentary for details.

For those familiar with the Distel Emacs package
(http://url8156.axelf.se/ls/click?upn=OEjhiLt4EQwBP7BMdu61cdC-2BCjjzVKZsWkHY-2Bi2gGfARb1n3h24SJ5P-2F8Axvtu-2Fr3h2uLM13zNjih-2B-2BYSA6r9Q-3D-3DciS2_1I2drHf7TOM-2BFjFYSrHxnLAP9jSFTsULAwXlGneTUPLmu2d9Pk5bm6N4OF11FnZiI2wuFZ-2Ffv7UJu1T-2B8XMHDi8IFBKsQeJuwK05YcVyzoRBdzGjW3piKOHUtg1MCQFwyZUtbEQQ-2FNG-2FkxRlt8lSyvjS29VSbUAfFLoZAbFiaYqo14IaXbPbX2-2BHjxKT2UUcSAEp0IaHhH4zpFt55WJ6qg-3D-3D
which implements similar functionality and an "erlang-interaction-mode" on top,
derl is intended to fill the role of being
"the core parts of Distel, had they been rewritten 20 years later."
The derl README expands on the differences between the two libraries.

As you can imagine, it was a lot of fun working on this package.

(On the topic of package naming: The current name stands for Distributed ERLang.
A more fun alternative I was thinking of is "earl",
but I am against any longer names given the compositional nature of the API.)

I have sent a signed copyright assignment but not yet received acknowledgment.
Figured I could open up for review in parallel,
given that asynchronicity is very much the name of the game here.


Kind regards
Axel Forsman



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

* Re: [ELPA] New package: derl
  2023-09-21 10:19 [ELPA] New package: derl Axel Forsman
@ 2023-09-21 10:34 ` Axel Forsman
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Forsman @ 2023-09-21 10:34 UTC (permalink / raw)
  To: emacs-devel

The SMTP relay I am using was converting to tracking links by default,
the URLs should be:

* For derl, the package in question: https://github.com/axelf4/derl.el
* For Distel: https://github.com/massemanet/distel


Apologies for the inconvenience
Axel F



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

end of thread, other threads:[~2023-09-21 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21 10:19 [ELPA] New package: derl Axel Forsman
2023-09-21 10:34 ` Axel Forsman

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.