all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How the backquote and the comma really work?
Date: Wed, 22 Jul 2015 00:08:25 +0200	[thread overview]
Message-ID: <877fptnoyu.fsf@web.de> (raw)
In-Reply-To: <87615mbo3z.fsf@mbork.pl> (Marcin Borkowski's message of "Tue, 14 Jul 2015 20:17:20 +0200")

Marcin Borkowski <mbork@mbork.pl> writes:

> Stupid me – again;-).  No wonder ‘mci/read-list-contents’ appears twice,
> once, once in ‘mci/read’ and once in ‘mci/read-list-contents’ – it seems
> there’s no other way (though I can’t prove it formally).

I don't think every implementation needs to have it in two different
defuns.


> But now my problem is something different, and on a different level –
> a “metaproblem” in a sense.  I’m still working on ‘mci/eval’; it now
> supports ‘progn’ forms and ‘setq’, and I have ‘cons’, ‘car’ and ‘cdr’ as
> symbols bound to their Elisp counterparts in the global environment of
> my MCI, and when I have lambdas (and write ‘mci/apply’, which should be
> relatively easy now), I’ll have more or less complete (though tiny)
> Lisp.  I guess that adding backquote should be really straightforward
> then.
>
> So where’s the problem?  Well, it’s quite a lot of fun to put it all
> together, and I’m learning a few things along the way, so it’s difficult
> to resist the temptation to add more stuff.  Macros?  ‘cond’ forms?
> ‘while’ forms?  OTOH, my goal is *not* to recreate all Elisp (contrary
> to Scheme, Elisp is far from minimalistic, for instance, it has *a lot*
> of special forms which could, in principle, be macros - ‘if’, for
> example, or ‘let’, or ‘let*’).  I definitely do not want to spend too
> much time on this – adding lots of special forms would soon cease to be
> fun, and once (and if!) I have macros, there’s really no use in adding
> them; also, I want to move on to other things.

Once you have macros, implementing the stuff you mentioned should not be
hard if you don't care about efficiency too much.

> So now my question is: does it make sense to play around with it more?
> Would a more complete Elisp interpreter written in Elisp be useful for
> anyone?

For learning purposes, it would be useful.

> If yes, I might consider publishing all my code sooner rather than
> later.  And: if it’s interesting and/or useful for anybody, is there
> anything besides lambdas, a proper ‘mci/apply’ function and macros
> that definitely *should* be added?  (One thing that comes to mind
> would be special (= dynamic) variables.  I’m not sure whether I would
> like to add them – it might be too much work.  OTOH, I’d learn to
> implement dynamic binding then...)

If you think you have learned what you wanted to, I would stop.  Maybe
you feel like continuing working on it at a later point of time.

But hey, since you asked: Implementing nonlocal exits come to my mind as
a goal.  And continuations would be cool.  Implementing these are
probably harder lessons.


Regards,

Michael.



  parent reply	other threads:[~2015-07-21 22:08 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-25 17:09 How the backquote and the comma really work? Marcin Borkowski
2015-06-25 17:33 ` Michael Heerdegen
2015-06-25 18:06   ` Marcin Borkowski
2015-06-25 18:22     ` Michael Heerdegen
2015-06-25 18:39       ` Marcin Borkowski
2015-06-25 18:44         ` Marcin Borkowski
2015-06-25 19:06           ` Michael Heerdegen
2015-07-10 11:36         ` Marcin Borkowski
2015-07-12 15:54           ` Michael Heerdegen
2015-07-12 19:55             ` Marcin Borkowski
2015-07-12 20:33               ` Marcin Borkowski
2015-07-14 18:17                 ` Marcin Borkowski
2015-07-14 22:08                   ` Emanuel Berg
2015-07-21 22:08                   ` Michael Heerdegen [this message]
2015-07-24 13:01                     ` Michael Heerdegen
2015-08-11 11:41                       ` Marcin Borkowski
2015-08-12 15:29                         ` Michael Heerdegen
     [not found]                         ` <mailman.8207.1439393377.904.help-gnu-emacs@gnu.org>
2015-08-12 16:30                           ` Pascal J. Bourguignon
2015-08-23  8:30                             ` Marcin Borkowski
     [not found]                             ` <mailman.110.1440318650.11330.help-gnu-emacs@gnu.org>
2015-08-23 16:46                               ` Pascal J. Bourguignon
2015-07-21 21:54                 ` Michael Heerdegen
2015-08-11 10:15                   ` Marcin Borkowski
2015-08-11 17:20                     ` Thorsten Jolitz
2015-08-12 15:01                       ` Michael Heerdegen
2015-07-21 21:50               ` Michael Heerdegen
2015-06-25 18:10 ` Drew Adams
2015-06-25 18:40   ` Michael Heerdegen
2015-06-25 18:53     ` Marcin Borkowski
2015-06-25 19:39       ` Michael Heerdegen
2015-06-25 20:05         ` Drew Adams
2015-06-25 20:18           ` Marcin Borkowski
2015-06-25 20:37             ` Drew Adams
2015-06-25 23:55     ` Robert Thorpe
     [not found]     ` <mailman.5697.1435276533.904.help-gnu-emacs@gnu.org>
2015-06-26  1:41       ` Rusi
2015-06-26 14:24         ` Michael Heerdegen
     [not found]         ` <mailman.5716.1435328741.904.help-gnu-emacs@gnu.org>
2015-06-26 14:35           ` Rusi
2015-06-26 14:51             ` Michael Heerdegen
2015-06-25 18:46   ` Marcin Borkowski
2015-06-26  7:31 ` tomas
2015-06-26 13:48   ` Drew Adams
2015-06-26 14:06     ` tomas
2015-06-26 15:06 ` Emanuel Berg
2015-07-12 17:38 ` Vaidheeswaran C
     [not found] <mailman.5657.1435252169.904.help-gnu-emacs@gnu.org>
2015-06-30 16:27 ` sokobania.01

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877fptnoyu.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@mbork.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.