Re: [Chicken-users] (exit) not exiting ...

2011-07-12 Thread Matt Welland
Yep, that works! It looks right at home with the existing hacks and will do
until I get to some refactoring

Thanks for the solution!

On Tue, Jul 12, 2011 at 6:01 PM, Alan Post wrote:

> What happens if you call?:
>
>  (use posix)
>  (process-signal (current-process-id) signal/kill)
>
> -Alan
>
> On Tue, Jul 12, 2011 at 05:25:24PM -0700, Matt Welland wrote:
> >I have some code that was "evolved" rather than designed and is
> admittedly
> >a bit of a mess and I needed to add an "(exit)" deep in a block where
> >running a sub process has failed. However the (exit) never exits. This
> is
> >true both if I run compiled or interpreted. I have tried to make a
> small
> >test case but I can't reproduce the issue. I even replaced the (exit)
> with
> >a call to a function that prints a message and then does exit and it
> still
> >doesn't exit. I also tried _exit with the same result.
> >Any suggestions on what to look at or how to debug this?
> >
> >My attempt to reproduce (which works fine) is below:
> >
> >(define foo 8)
> >
> >(define (runbroke cmd)
> >(handle-exceptions
> >exn
> >(begin
> >(print "FAILED! exn=" exn)
> >#f)
> >(cmd)))
> >
> >(define bar 9)
> >
> >(let ((res (runbroke (lambda ()(process "nadafoobar" "-l" "-blah")
> >(if (not res)
> >(begin
> >(print "Failed to run, exiting with code 7")
> >(exit 7
> >
> >(exit bar)
> >
> >BTW, the code is visible at [1]www.kiatoa.com/fossils/megatest, in
> >cmd-run-proc-each-line in process.scm.
> >
> > References
> >
> >Visible links
> >1. http://www.kiatoa.com/fossils/megatest
>
> > ___
> > Chicken-users mailing list
> > Chicken-users@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
> --
> .i ma'a lo bradi cu penmi gi'e du
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] (exit) not exiting ...

2011-07-12 Thread Alan Post
What happens if you call?:

 (use posix)
 (process-signal (current-process-id) signal/kill)

-Alan

On Tue, Jul 12, 2011 at 05:25:24PM -0700, Matt Welland wrote:
>I have some code that was "evolved" rather than designed and is admittedly
>a bit of a mess and I needed to add an "(exit)" deep in a block where
>running a sub process has failed. However the (exit) never exits. This is
>true both if I run compiled or interpreted. I have tried to make a small
>test case but I can't reproduce the issue. I even replaced the (exit) with
>a call to a function that prints a message and then does exit and it still
>doesn't exit. I also tried _exit with the same result.
>Any suggestions on what to look at or how to debug this?
> 
>My attempt to reproduce (which works fine) is below:
> 
>(define foo 8)
> 
>(define (runbroke cmd)
>(handle-exceptions
>exn
>(begin
>(print "FAILED! exn=" exn)
>#f)
>(cmd)))
> 
>(define bar 9)
> 
>(let ((res (runbroke (lambda ()(process "nadafoobar" "-l" "-blah")
>(if (not res)
>(begin
>(print "Failed to run, exiting with code 7")
>(exit 7
> 
>(exit bar)
> 
>BTW, the code is visible at [1]www.kiatoa.com/fossils/megatest, in
>cmd-run-proc-each-line in process.scm.
> 
> References
> 
>Visible links
>1. http://www.kiatoa.com/fossils/megatest

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


-- 
.i ma'a lo bradi cu penmi gi'e du

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


[Chicken-users] (exit) not exiting ...

2011-07-12 Thread Matt Welland
I have some code that was "evolved" rather than designed and is admittedly a
bit of a mess and I needed to add an "(exit)" deep in a block where running
a sub process has failed. However the (exit) never exits. This is true both
if I run compiled or interpreted. I have tried to make a small test case but
I can't reproduce the issue. I even replaced the (exit) with a call to a
function that prints a message and then does exit and it still doesn't exit.
I also tried _exit with the same result.
Any suggestions on what to look at or how to debug this?

My attempt to reproduce (which works fine) is below:

(define foo 8)

(define (runbroke cmd)
  (handle-exceptions
exn
(begin
  (print "FAILED! exn=" exn)
  #f)
(cmd)))

(define bar 9)

(let ((res (runbroke (lambda ()(process "nadafoobar" "-l" "-blah")
  (if (not res)
  (begin
(print "Failed to run, exiting with code 7")
(exit 7

(exit bar)

BTW,  the code is visible at www.kiatoa.com/fossils/megatest, in
cmd-run-proc-each-line in process.scm.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] chicken & MinGW - path issue and work-around

2011-07-12 Thread John Cowan
Claude Marinier scripsit:

> $ make PLATFORM=mingw-msys PREFIX=/usr/local

Well, you are not supposed to specify a non-existent directory as the
PREFIX.  Naturally things go wrong after that.  Creating the directory
is not really a work-around, it's a necessity.

-- 
I marvel at the creature: so secret and John Cowan
so sly as he is, to come sporting in the pool   co...@ccil.org
before our very window.  Does he think that http://www.ccil.org/~cowan
Men sleep without watch all night?

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


[Chicken-users] chicken & MinGW - path issue and work-around

2011-07-12 Thread Claude Marinier
Hi,

Wanted to see how easy it is to build on Windows. Found a problem and a work
around but no solution.

-- 
Claude Marinier


MS Windows Vista Home Basic SP2 and MS Windows 7 SP1 (both 32-bit)
MinGW 5.1.6 (many packages marked 20110530) installed fresh on 8 July 2011

$ tar zxf chicken-4.7.0.tar.gz
$ cd chicken-4.7.0
$ make PLATFORM=mingw-msys PREFIX=/usr/local

OK.

$ make PLATFORM=mingw-msys PREFIX=/usr/local install

OK except for this:

/usr/local/bin/chicken-install -update-db
Error: (directory) cannot open directory - No such file or directory:
"/usr/local/lib/chicken/6"

>From DOS-box (run as administrator):

mklink /d \usr \MinGW\msys\1.0
symbolic link created for \usr <<===>> \MinGW\msys\1.0

Try again.

/usr/local/bin/chicken-install -l
http://code.call-cc.org/cgi-bin/henrietta.cgi -update-db
loading import libraries ...
generating database
 srfi-69 srfi-4 srfi-18 srfi-14 setup-download tcp setup-api srfi-13 srfi-1
utils scheme posix ports
 lolevel irregex foreign files extras data-structures csi chicken
  copy "C:\Users\Claude\AppData\Local\Temp\tempe46c\modules.db"
"\usr\local\lib\chicken\6\modules.db"
1 file(s) copied.

OK. Test it.

/usr/local/bin/chicken-install -l
http://code.call-cc.org/cgi-bin/henrietta.cgi numbers

$ csi

CHICKEN
(c)2008-2011 The Chicken Team
(c)2000-2007 Felix L. Winkelmann
Version 4.7.0
windows-mingw32-x86 [ manyargs dload ptables ]
compiled 2011-07-12 on lizard (MINGW32_NT-6.0)

#;1> (require-extension numbers)
; loading /usr/local/lib/chicken/6/numbers.import.so ...
; loading /usr/local/lib/chicken/6/scheme.import.so ...
; loading /usr/local/lib/chicken/6/chicken.import.so ...
; loading /usr/local/lib/chicken/6/foreign.import.so ...
; loading /usr/local/lib/chicken/6/regex.import.so ...
; loading /usr/local/lib/chicken/6/irregex.import.so ...
; loading /usr/local/lib/chicken/6/numbers.so ...
; loading /usr/local/lib/chicken/6/regex.so ...
#;2> (* 1 1)
12345678987654321
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] tk egg on MS Windows works great!

2011-07-12 Thread Claude Marinier
Hi,

Trying the tk egg on Ms windows.

  chicken-install -l http://code.call-cc.org/cgi-bin/henrietta.cgi tk

Download  tclkit-8.5.8-win32.upx.exe, put it on the path, rename it to
wish.exe,
run a test script.

  csi hello-tk.scm

Works!

csc -deploy hello-tk.scm

Copy wish.exe and tk.so to the deploy directory. Voila! Everything in one
place.

Double-clicking from Windows Explorer runs but there is a console window.
What
is the preferred technique to eliminate it? I see there is HiddenStart. Is
it good?

Instead of copying tk.so to the deploy directory, I could have used this.

  chicken-install -deploy -p hello-tk tk

Is that better? Are the extra files useful?

Thanks.

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


Re: [Chicken-users] bb egg - example missing matchable ?

2011-07-12 Thread Felix
From: Claude Marinier 
Subject: [Chicken-users] bb egg - example missing matchable ?
Date: Tue, 12 Jul 2011 08:26:09 -0400 (EDT)

> Hi,
> 
> The notes example from the bb egg's page would not run until I added
> matchable to the use call and removed the colons from optional.
> 
>   http://wiki.call-cc.org/eggref/4/bb
> 
> Is it my problem or an error in the example?

The latter. Thanks for reporting this.


cheers,
felix

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


[Chicken-users] bb egg - example missing matchable ?

2011-07-12 Thread Claude Marinier

Hi,

The notes example from the bb egg's page would not run until I added 
matchable to the use call and removed the colons from optional.


  http://wiki.call-cc.org/eggref/4/bb

Is it my problem or an error in the example?

Debian Linux (Squeeze) and chicken 4.7.0 built from source.

--
Claude Marinier

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