[Scheme-reports] EVAL Andre van Tonder (23 Apr 2011 23:47 UTC)
[Scheme-reports] What happened to (UNQUOTE <expression> ...) Andre van Tonder (24 Apr 2011 00:04 UTC)
[Scheme-reports] Are generated toplevel definitions secret? Andre van Tonder (24 Apr 2011 00:15 UTC)
[Scheme-reports] COND, CASE, AND, ... macros are buggy Andre van Tonder (24 Apr 2011 00:24 UTC)
[Scheme-reports] Buggy definition of BEGIN Andre van Tonder (24 Apr 2011 00:33 UTC)
Re: [Scheme-reports] Buggy definition of BEGIN Jussi Piitulainen (24 Apr 2011 06:55 UTC)
[Scheme-reports] Restrictions on internal BEGIN? Andre van Tonder (24 Apr 2011 01:45 UTC)
Re: [Scheme-reports] Restrictions on internal BEGIN? Jussi Piitulainen (24 Apr 2011 07:20 UTC)
[Scheme-reports] Toplevel import scoping Andre van Tonder (24 Apr 2011 02:02 UTC)
Re: [Scheme-reports] Toplevel import scoping Alex Shinn (24 Apr 2011 02:44 UTC)
Re: [Scheme-reports] Toplevel import scoping Aaron W. Hsu (29 Apr 2011 17:11 UTC)
Re: [Scheme-reports] Toplevel import scoping Aaron W. Hsu (29 Apr 2011 17:10 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Andre van Tonder (24 Apr 2011 15:53 UTC)
(missing)
(missing)
(missing)
Re: Are generated toplevel definitions secret? Aaron W. Hsu (24 May 2011 18:51 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Andy Wingo (24 May 2011 21:11 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Sztefan Edwards (25 May 2011 14:32 UTC)
Re: Are generated toplevel definitions secret? Aaron W. Hsu (25 May 2011 20:03 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Perry E. Metzger (07 Nov 2011 18:40 UTC)
Re: [Scheme-reports] Are generated toplevel definitions secret? Perry E. Metzger (07 Nov 2011 18:45 UTC)
Re: [Scheme-reports] What happened to (UNQUOTE <expression> ...) Andre van Tonder (24 Apr 2011 03:10 UTC)
Re: [Scheme-reports] EVAL Alex Shinn (24 Apr 2011 02:10 UTC)
Re: [Scheme-reports] EVAL John Cowan (24 Apr 2011 06:56 UTC)

Re: [Scheme-reports] Are generated toplevel definitions secret? Andy Wingo 24 May 2011 21:10 UTC

Hi Aaron,

Thanks for replying, it reminded me that I had a brain wave.  Re-adding
the list.

To recap:

   (define-syntax define-const
     (syntax-rules ()
       ((_ name val)
        (define t val)
        (define-syntax name (syntax-rules () ((_) t))))))

Guile currently does not make the generated toplevel definition "t" have
a fresh name.  It would be nice if it could but it can't be a really
random name -- it needs to be predicatable.

Well why not have the name of "t" be "t" plus some string which depends
only on the incoming form -- like its hash value.  (Or the outgoing
form; the considerations are different but similar.)

That way you do preserve the "compatible recompilation" aspect, trading
off true secrecy, but hey.  Oh well.

I leave the rest of your fine and interesting mail for list folk to
peruse.

Cheers,

Andy

On Tue 24 May 2011 20:44, "Aaron W. Hsu" <arcfide@sacrideo.us> writes:

> On Sat, 21 May 2011 06:20:28 -0400, Andy Wingo <wingo@pobox.com> wrote:
>
>> I think that Guile's needs are different here.  I need to be able to
>> allow distributors to release a new Guile binary package without causing
>> recompilation of user libraries.  Of course this requires some care in
>> maintenance, so as to only make compatible changes, but the trivial case
>> of recompilation of an unchanged source package should produce a
>> compatible binary package.
>
> Okay, that's an interesting and worthwhile goal. I wonder if it wouldn't
> still be possible to do this while not providing the same guarantees to
> users who produce code that would break this compatibility.
>
> For me, the major problem in thinking that one can maintain ABI
> compatibility in the presence of procedural macros is that, in general,
> you can't. Even code that has absolutely no source changes can
> potentially  change from expansion to expansion. Moreover, this does not
> even take into  account how the compiler might interact with compiled
> code.
> Taking your example, where you want to be able to release an ABI
> compatible binary package for Guile without requiring user's to
> recompile  their own user libraries, I'll shift this over to Chez, since
> I know more  about how Chez works. This simply wouldn't be possible to
> do in something  like Chez Scheme, even if it did allow leaks at the top
> level. When you  compile, for example, and R6RS top-level program, Chez
> takes advantage of  having a total picture of the code to be compiled
> and can inline it's own  code from the core (chezscheme) library into
> the user's code at  optimization levels greater than, say, zero or
> one. If another release of  Chez Scheme comes out, ABI compatibility now
> means much more than just  making sure that all the names match. It also
> means that all the source  code that may have been inlined, must now
> also remain unchanged or  observationally equivalent at the very
> least. These sorts of problems crop  up all over the place, and it is
> difficult to actually achieve ABI  compatibility in the presence of
> these problems, so Chez does not even try.
>
> I would be interested in knowing what tradeoffs Guile makes in order to
> guarantee the ability to have ABI compatibility between compiles, given
> that in the general case this cannot be guaranteed even if the source
> code  never changes.
>
> 	Aaron W. Hsu
>
> --
> Programming is just another word for the lost art of thinking.

--
http://wingolog.org/

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports