summaryrefslogblamecommitdiffstats
path: root/2024/talks/gypsum.md
blob: 02888492f7dcd6b75c2d963ca9d3fba822ffe56b (plain) (tree)
















































































                                                                                                    

                                                                                                                       





                                                              
[[!meta title="Gypsum: my clone of Emacs and ELisp written in Scheme"]]
[[!meta copyright="Copyright © 2024 Ramin Honary"]]
[[!inline pages="internal(2024/info/gypsum-nav)" raw="yes"]]

<!-- Initially generated with emacsconf-publish-talk-page and then left alone for manual editing -->
<!-- You can manually edit this file to update the abstract, add links, etc. --->


# Gypsum: my clone of Emacs and ELisp written in Scheme
Ramin Honary (he/him) - <mailto:ramin.honary@gmail.com>

[[!inline pages="internal(2024/info/gypsum-before)" raw="yes"]]

I  would like  to demonstrate  an  Emacs clone  I have  been
writing  in Guile  Scheme  for  the past  year,  which I  am
tentatively  calling "Gypsum".  Unlike  other editors  which
only clone  the Emacs keybindings (Edwin,  Jed, jEdit, Jove,
Lem, MG,  Yi, Zile), I hope  my Emacs clone will  also fully
clone the  Emacs Lisp programming language  well enough that
many of the packages in ELPA, Non-GNU ELPA, and perhaps even
MELPA, can be used in  "Gypsum" without any modification.  I
would also  like to  talk a  little bit about  the how  I am
implementing  it  (the  software architecture),  and  invite
others to contribute.

I  think my  project  is  of interest  to  many Emacs  users
because, firstly, I have personally spoken with a relatively
large number of people who have expressed interest in making
Emacs  programmable in  Scheme.  Secondly, there  is a  good
amount   of  prior   art  for   Scheme  implementations   of
Emacs. There  are even  builds of Emacs  that link  to Guile
which  provides  a   "scheme-eval"  built-in  function  that
translates  between   Elisp  data  types  and   Scheme  data
types. The  Guile compiler itself  ships with an  Emacs Lisp
compiler as  well, although  it does  not provide  enough of
Emacs's built-in functions to be of much use.

So by  using Guile, we  can make use of  a lot of  the prior
art, in fact  I am currently using the  tokenizer and reader
used  in Guile's  built-in  Elisp  interpreter to  implement
"Gypsum's" Elisp interpreter. That said,  I have gone out of
my way to make my code fully R7RS compliant, so I hope I can
port  it to  other Scheme  implementations like  MIT Scheme,
Gambit, Stklos, and perhaps Chez Scheme with Gwen Weinholt's
R7-to-R6RS  translator.  I  consider the  Guile  version  of
Gypsum to  be the  reference implementation  of what  I hope
will become a fully  cross-platform programming language and
text editor written in portable R7RS Scheme.

The   reference  implementation   of  "Gypsum"   is  a   GUI
application   based   on   Gtk  using   a   library   called
"Guile-GI".   Guile-GI   uses  the   GObject   Introspection
framework to automatically generate Scheme language bindings
to libraries  like Gtk and Glib  which are written in  the C
programming language. There is not yet any terminal-emulator
version of "Gypsum."

The next step of the project  will be to implement enough of
Elisp that we can run  tests written in the Emacs Regression
Testing  (ERT)  framework.  We   can  then  incorporate  the
original GNU  Emacs regression  test suite into  Gypsum. Any
new API added to Gypsum  Elisp will most likely already have
regression tests we can use to  make sure it is working in a
way that is compatible with GNU  Emacs Lisp. I would like to
make it as easy as possible for people to contribute to this
project, and  having a list  of APIs to be  implemented each
with  a set  of regression  tests the  APIs are  expected to
pass, is a very good way to do that.

About the speaker:

My name is Ramin Honary, I have been a professional software
engineer  of  16  years,   lately  mostly  doing  full-stack
software  development. I  have always  been fascinated  with
programming languages,  and especially  functional languages
like   Lisp   and  Haskell.   I   have   been  using   Emacs
since 2017.  But lately it is  with Scheme that I  have been
spending  most  of  my  free   time.  I  am  only  a  Scheme
programming  enthusiast,  I  am  not  involved  with  Scheme
professionally.

You may also like another talk by this speaker:
[EmacsConf - 2022 - talks - Build a Zettelkasten with the Hyperbole Rolodex](https://emacsconf.org/2022/talks/rolodex/)

[[!inline pages="internal(2024/info/gypsum-after)" raw="yes"]]

[[!inline pages="internal(2024/info/gypsum-nav)" raw="yes"]]