[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pure (side-effect-free) calls into c/c++?
From: |
Linas Vepstas |
Subject: |
Re: Pure (side-effect-free) calls into c/c++? |
Date: |
Sat, 11 Jan 2020 23:52:59 -0600 |
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
- Re: Pure (side-effect-free) calls into c/c++?, (continued)
Re: Pure (side-effect-free) calls into c/c++?, Linus Björnstam, 2020/01/11