unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: Taylan Kammer <taylan.kammer@gmail.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Pure (side-effect-free) calls into c/c++?
Date: Sat, 11 Jan 2020 23:52:59 -0600	[thread overview]
Message-ID: <CAHrUA36ZsmF0A2LZK6L=EWP4JSdPOEqy2Q9pJa2LO1f7=O1YBA@mail.gmail.com> (raw)
In-Reply-To: <CAHrUA37mFiDyjo5+Z6To4g7Te+SOTqGzCx9wN4UpSbVuzzvvrg@mail.gmail.com>

To answer my own question, I've now got a glimmer as to how to do  most of
this, using syntax-case and quasi-syntax, as described in
https://www.gnu.org/software/guile/manual/html_node/Syntax-Case.html#Syntax-Case
with the display-compile-timestamp example, and then cleverly reworking
that. ...Basically, replacing the (current-time) in that example, with the
memoization code, thus providing compile-time memoization.  I'll post when
I get something working-ish. Tomorrow-ish.

Now all I need is a way to tell apart `42` from `(+ x y)`  ...

--linas


  reply	other threads:[~2020-01-12  5:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-10 22:36 Pure (side-effect-free) calls into c/c++? Linas Vepstas
2020-01-11 14:13 ` Zelphir Kaltstahl
2020-01-11 14:38 ` Matt Wette
2020-01-11 18:11   ` Linas Vepstas
2020-01-11 18:52     ` Linas Vepstas
2020-01-11 21:56       ` Taylan Kammer
2020-01-12  2:15         ` Linas Vepstas
2020-01-12  4:12         ` Linas Vepstas
2020-01-12  2:12       ` Linas Vepstas
2020-01-12  3:21         ` Taylan Kammer
2020-01-12  4:32           ` Linas Vepstas
2020-01-12  5:52             ` Linas Vepstas [this message]
2020-01-11 17:40 ` Linus Björnstam
2020-01-12  3:03   ` Christopher Lam
2020-01-12 10:35     ` Linus Björnstam

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to='CAHrUA36ZsmF0A2LZK6L=EWP4JSdPOEqy2Q9pJa2LO1f7=O1YBA@mail.gmail.com' \
    --to=linasvepstas@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=taylan.kammer@gmail.com \
    /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.
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).