Re: [Chicken-hackers] [PATCH] Small improvement for the inline egg

2013-02-15 Thread Felix
From: Moritz Heidkamp mor...@twoticketsplease.de
Subject: Re: [Chicken-hackers] [PATCH] Small improvement for the inline egg
Date: Thu, 07 Feb 2013 20:49:38 +0100

 Hello again,
 
 Moritz Heidkamp mor...@twoticketsplease.de writes:
 1. It dumps compilation results in ~/.cache by default. This, however,
is a bit like dumping stuff in /usr/share so I think it would be
better to make this ~/.cache/chicken-inline or something.
 
 Mario just pointed out to me in #chicken that the current default is
 actually .cache, not ~/.cache. It just happened to be that I ran csi
 from my home when trying it out and then I didn't properly read the code
 when hacking up the patch. Considering that this default directory is
 apparently meant as a relative path I propose the attached new version
 which sets it to .chicken-inline by default.

I changed this to ~/.chicken-inline and to allow overriding by setting
$CHICKEN_INLINE_CACHE. Thanks, Moritz.


cheers,
felix

___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers


Re: [Chicken-hackers] [PATCH] Small improvement for the inline egg

2013-02-07 Thread Moritz Heidkamp
Hello again,

Moritz Heidkamp mor...@twoticketsplease.de writes:
 1. It dumps compilation results in ~/.cache by default. This, however,
is a bit like dumping stuff in /usr/share so I think it would be
better to make this ~/.cache/chicken-inline or something.

Mario just pointed out to me in #chicken that the current default is
actually .cache, not ~/.cache. It just happened to be that I ran csi
from my home when trying it out and then I didn't properly read the code
when hacking up the patch. Considering that this default directory is
apparently meant as a relative path I propose the attached new version
which sets it to .chicken-inline by default.

Moritz
Index: inline.scm
===
--- inline.scm  (revision 28291)
+++ inline.scm  (working copy)
@@ -39,7 +39,7 @@
 (define (inline-eval x . o)
   (inline-compile x (if (pair? o) (car o) ) #t))
 
-(define-constant default-inline-cache-name .cache)
+(define-constant default-inline-cache-name .chicken-inline)
 
 (define windows-shell (foreign-value C_WINDOWS_SHELL bool))
 (define inline-cache (make-parameter default-inline-cache-name))
@@ -94,7 +94,6 @@
   (zero? (system (sprintf cmp -s ~A ~A (qs a) (qs b )))
 
 (define (ensure-cache)
-  (unless (file-exists? (inline-cache))
-(create-directory (inline-cache)) ) )
+  (create-directory (inline-cache) #t) )
 
 )
___
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers