[Chicken-users] [ANN] Megatest project (written in Chicken Scheme) v1.5508 available.

2013-07-17 Thread Matt Welland
Megatest is 100% written in Chicken scheme and thus I feel justified in
mentioning it on this list :)

The Megatest project is progressing nicely. It is currently being used to
manage 10-20 different regression flows (with 100's-1000's of
tests/iterations) and some system administration automation.

http://www.kiatoa.com/fossils/megatest and the companion tool logpro
http://www.kiatoa.com/fossils/logpro

Thanks for reading.
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Macro expansion help

2013-10-05 Thread Matt Welland
I found that the "simple macros in scheme" approach found at 
http:/www.cs.toronto.edu/~gfb/simple-macros.html is adequate for most macros I 
need to write and far easier than fully fledged macros.  Maybe it will help you 
get going. 


From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Loïc Faure-Lacroix  
Date: 10/05/2013  11:24 AM  (GMT-07:00) 
To: chicken-users@nongnu.org 
Subject: [Chicken-users] Macro expansion help 
 
Hi, new to scheme and I'd like to know what is the ideal thing to do for a case 
like the following. I'd like to  create a library that will compute bezier 
curves of N order.

I already made a something that seems to work but I believe it could be 
improved using macro expansion. 

For the people who aren't aware of it, a bezier is a type of curve that has 2 
points and n control points. The function can be computed recursively or 
iteratively. The recursive version is quite trivial to write but will be quite 
expensive when the bezier has multiple control points. The order of complexity 
of the recursive algorithm is O(n!) If I'm not mistaken. The use of iterative 
algorithm would create a version of complexity O(n) Since we have to loop over 
each points.

Using macro expansion, we could expand the function to sum each points without 
having to loop over a list of points. Using expansion, we can also replace some 
of the values with fixed constant.

https://gist.github.com/llacroix/6844267

For example, as I understand, the coefficient in the calc define could be 
expanded since they we could guess them at compile time. If we create a bezier 
of 4 points, we will have something like this

(nCr 3 0) = 1
(nCr 3 1) = 3
(nCr 3 2) = 3
(nCr 3 3) = 1

For each call to a bezier with 4 points, it is not necessary to recompute 
coefficient because they will always be the same. The same things goes for (- n 
i).

But to be honest, I have no idea how to rewrite a function at compile time. I 
saw how people use "define-syntax" to add some sugar to the language, but I 
hardly understand how to actually transform a function using macros. The bezier 
example should be simple enough to understand how it works.

Once I have this done, I'll write a blog post so other people can get a 
"painless" introduction to function rewriting. 

Thanks in advance,
Loïc___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Macro expansion help

2013-10-05 Thread Matt Welland
Sorry,  correct URL is:

http://www.cs.toronto.edu/~gfb/scheme/simple-macros.html


From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Matt Welland  
Date: 10/05/2013  1:10 PM  (GMT-07:00) 
To: Loïc Faure-Lacroix ,chicken-users 
 
Subject: Re: [Chicken-users] Macro expansion help 
 
I found that the "simple macros in scheme" approach found at 
http:/www.cs.toronto.edu/~gfb/simple-macros.html is adequate for most macros I 
need to write and far easier than fully fledged macros.  Maybe it will help you 
get going. 


From my Android phone on T-Mobile. The first nationwide 4G network.



 Original message 
From: Loïc Faure-Lacroix  
Date: 10/05/2013 11:24 AM (GMT-07:00) 
To: chicken-users@nongnu.org 
Subject: [Chicken-users] Macro expansion help 


Hi, new to scheme and I'd like to know what is the ideal thing to do for a case 
like the following. I'd like to  create a library that will compute bezier 
curves of N order.

I already made a something that seems to work but I believe it could be 
improved using macro expansion. 

For the people who aren't aware of it, a bezier is a type of curve that has 2 
points and n control points. The function can be computed recursively or 
iteratively. The recursive version is quite trivial to write but will be quite 
expensive when the bezier has multiple control points. The order of complexity 
of the recursive algorithm is O(n!) If I'm not mistaken. The use of iterative 
algorithm would create a version of complexity O(n) Since we have to loop over 
each points.

Using macro expansion, we could expand the function to sum each points without 
having to loop over a list of points. Using expansion, we can also replace some 
of the values with fixed constant.

https://gist.github.com/llacroix/6844267

For example, as I understand, the coefficient in the calc define could be 
expanded since they we could guess them at compile time. If we create a bezier 
of 4 points, we will have something like this

(nCr 3 0) = 1
(nCr 3 1) = 3
(nCr 3 2) = 3
(nCr 3 3) = 1

For each call to a bezier with 4 points, it is not necessary to recompute 
coefficient because they will always be the same. The same things goes for (- n 
i).

But to be honest, I have no idea how to rewrite a function at compile time. I 
saw how people use "define-syntax" to add some sugar to the language, but I 
hardly understand how to actually transform a function using macros. The bezier 
example should be simple enough to understand how it works.

Once I have this done, I'll write a blog post so other people can get a 
"painless" introduction to function rewriting. 

Thanks in advance,
Loïc___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] an oddly slow regex ...

2013-10-26 Thread Matt Welland
This regex is so slow that you don't need a timer to see the impact (at
least not on my machine with chicken 4.8.0):

 (string-match "[a-z][a-z0-9\\-_.]{0,20}" "a012345678901234567890123456789")

Changing the {0,20} to + makes it run normally fast so I just replaced the
regex with a string-length and modified the "{0,20}" to "+" . I don't
necessarily need a fix for this but it seems like a possible symptom of a
deeper problem so I thought I'd report it.

Pre-compiling the regex didn't seem to make any difference. Just for
completeness I compared with Ruby and the ruby equivalent is (in human
terms) instant.

"a012345678901234567890123456789".match(/[a-z][a-z0-9]{0,20}/)

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] an oddly slow regex ...

2013-10-26 Thread Matt Welland
On Sat, Oct 26, 2013 at 11:38 AM, Peter Bex  wrote:

> On Sat, Oct 26, 2013 at 10:37:36AM -0700, Matt Welland wrote:
> > This regex is so slow that you don't need a timer to see the impact (at
> > least not on my machine with chicken 4.8.0):
> >
> >  (string-match "[a-z][a-z0-9\\-_.]{0,20}"
> "a012345678901234567890123456789")
> >
> > Changing the {0,20} to + makes it run normally fast so I just replaced
> the
> > regex with a string-length and modified the "{0,20}" to "+" . I don't
> > necessarily need a fix for this but it seems like a possible symptom of a
> > deeper problem so I thought I'd report it.
>
> Hi Matt,
>
> Thanks for your report.  I'm afraid this is a known problem with
> Irregex - to avoid producing a state machine with too many states,
> it will always use a backtracking implementation for all repetition
> counts.
>
> I think it's best to take a look at how to fix this upstream first.
> Maybe Alex has an idea of how to do that.
>
> > Pre-compiling the regex didn't seem to make any difference.
>
> That's because the backtracker matches really slowly.
>
> > Just for completeness I compared with Ruby and the ruby equivalent
> > is (in human terms) instant.
> >
> > "a012345678901234567890123456789".match(/[a-z][a-z0-9]{0,20}/)
>
> Thanks for that!  We need more of such real-world test cases.
> Ideally I'd love to have a complete library of regex examples, which
> we can use to optimize irregex further.
>
> By the way, I note that your Ruby regex isn't exactly the same as the
> one you used in CHICKEN.  Does it make a difference if you use the
> same regex?
>

Ah, yes, I did initially compare the exact same regex and saw no
discernible speed impact in Ruby. I did a few variations to see if there
was any sensitivity to ^ or $ at the beginning or end of the regex or
variations to the contents of the character group. This seems to be pretty
much a function of the match count {0,20}.

Some coding for performance hints on the regex page would likely be helpful.



>
> Cheers,
> Peter
> --
> http://www.more-magic.net
>



-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] 4.8.0.5 "compiled ... on" message not quite correct

2013-10-30 Thread Matt Welland
When I compiled 4.8.0.5 from the tar this morning I get a curious message
on starting csi:

> csi

CHICKEN
(c) 2008-2013, The Chicken Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.8.0.5 (stability/4.8.0) (rev 5bd53ac)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
compiled 2013-10-03 on aeryn.xorinia.dim (Darwin)< Not true :)

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Turn on profiling and app panics with out of memory - can profiling work if using iup gui?

2013-11-01 Thread Matt Welland
Before I spend a lot of time debugging this I wanted to ask the list if it
should be expected to work. I know the iup egg uses that trampoline stuff,
is this likely to be a problem for the profiler?

I'm using chicken 4.8.0.

 [panic] out of memory - heap full while resizing - execution terminated

...more...
dashboard.scm:486: string-intersperse
dashboard.scm:1348: iup-controls#button
dashboard.scm:1359: hash-table-set!
dashboard.scm:1361: loop
dashboard.scm:1347: mkstr
dashboard.scm:486: g1002
dashboard.scm:486: g1002
dashboard.scm:486: string-intersperse
dashboard.scm:1348: iup-controls#button
dashboard.scm:1359: hash-table-set!
dashboard.scm:1361: loop
dashboard.scm:1347: mkstr
dashboard.scm:486: g1002
dashboard.scm:486: g1002
dashboard.scm:486: string-intersperse
dashboard.scm:1348: iup-controls#button <--

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] schemish/chickenish way to make configurable executables?

2013-11-02 Thread Matt Welland
I'm curious to hear opinions on conditional complication and configuration
using Chicken scheme.

Say for example I want to enable or disable the use of a particular library
or feature and I want there to be no trace of it in the executable.

I can use a preprocessor such as cpp but I imagine there is a better way.
Any strategies or methodologies you all can share? Are macros good for this?

Thanks
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] schemish/chickenish way to make configurable executables?

2013-11-03 Thread Matt Welland
Hi Peter,

It looks like cond-expand does enough to achieve what I want. Thanks!

Matt
-=-


On Sun, Nov 3, 2013 at 2:58 AM, Peter Bex  wrote:

> On Sat, Nov 02, 2013 at 11:35:22PM -0700, Matt Welland wrote:
> > I'm curious to hear opinions on conditional complication and
> configuration
> > using Chicken scheme.
> >
> > Say for example I want to enable or disable the use of a particular
> library
> > or feature and I want there to be no trace of it in the executable.
> >
> > I can use a preprocessor such as cpp but I imagine there is a better way.
> > Any strategies or methodologies you all can share? Are macros good for
> this?
>
> Hi Matt,
>
> Usually when I want to do something like this, I use cond-expand and
> provide the feature via -feature provide-foo:
>
> (define (foo)
>   (cond-expand
> (provide-foo (do-whatever-foo-does))
> (else (error "support for foo is disabled"
>
> This is used extensively by the "crypt" egg to select which
> fallback implementations need to be provided and for which
> implementations it can use the one provided by libc.
>
> This is of course only available when compiling from Scheme.
> If you want to ship precompiled C files (so you'll only need
> a C compiler and libchicken), you'd have to use C preprocessor
> and/or conditional compilation of various different implementation
> files through Make like CHICKEN itself does (for posixunix/posixwin,
> and for things like HAVE_POSIX_POLL).  This is a lot trickier to
> do right, and I wouldn't recommend it unless you really have to.
>
> Cheers,
> Peter
> --
> http://www.more-magic.net
>



-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Need to do an install, any changes in the pipe line I should wait for?

2013-11-08 Thread Matt Welland
I'm going to try getting Chicken 4.8.0.? installed in a corporate
environment. This is not a nimble situation and if successful in getting
the install approved I'll likely be stuck with that version for a long
time. I've seen some messages on the chicken lists that look like some good
progress on some important bugs. Should I wait a while before starting this
process or is 4.8.0.5 a good target for the long term?

Thanks.
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Need to do an install, any changes in the pipe line I should wait for?

2013-11-08 Thread Matt Welland
On Fri, Nov 8, 2013 at 8:53 AM, Peter Bex  wrote:

> On Fri, Nov 08, 2013 at 08:48:38AM -0700, Matt Welland wrote:
> > I'm going to try getting Chicken 4.8.0.? installed in a corporate
> > environment. This is not a nimble situation and if successful in getting
> > the install approved I'll likely be stuck with that version for a long
> > time. I've seen some messages on the chicken lists that look like some
> good
> > progress on some important bugs. Should I wait a while before starting
> this
> > process or is 4.8.0.5 a good target for the long term?
>
> What sort of thing will this CHICKEN installation be used for?
>
> Cheers,
> Peter
> --
> http://www.more-magic.net
>

The primary purpose is to enable an installation of Megatest. With a little
luck I hope to get Megatest, logpro and associated utilities complete and
stable so I can install them centrally before the end of the year.

BTW, the operative word is "try" :)

A little grepping gives me the list of eggs below. I'll be doing some
testing of 4.8.05 over the next week and wanted to hear from the dev's if
there were patches in the queue I should wait for.

apropos
base64
canvas-draw
csv-xml
directory-utils
dot-locking
extras
fmt
format
hostinfo
http-client
intarweb
json
md5
message-digest
posix
posix-extras
readline
regex
regex-case
regex-literals
s11n
spiffy
spiffy-directory-listing
spiffy-request-vars
sqlite3
srfi-1
srfi-13
srfi-18
srfi-69
tcp
trace
uri-common
zmq

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Any hope for new zmq bindings to version 3.2 or even 4.0?

2013-11-23 Thread Matt Welland
Hi,

Is anyone (Moritz?) working on new bindings or porting the existing
bindings for zmq to the newer versions?

Thanks!
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Any hope for new zmq bindings to version 3.2 or even 4.0?

2013-11-27 Thread Matt Welland
I'll test this out soon.  Thanks!
On Nov 27, 2013 5:50 AM, "Moritz Heidkamp" 
wrote:

> Hi Matt and Kristian,
>
> Kristian Lein-Mathisen  writes:
> > Moritz and I had some fun with zmq 3.2 in July. We didn't release our
> work,
> > with the reason slipping my mind right now.
>
> I don't remember either :-) Matt, can you try whether it works for you
> or if you still run into trouble with that version?
>
> Moritz
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Help needed on a project intended to promote some important ideas.

2014-01-21 Thread Matt Welland
Hi,

This is a long shot and I apologize in advance for any time wasted and for
cross-posting to unrelated groups. Please: DO NOT reply to this email.

I have been working on a project that I believe will do a good job in
raising awareness of alternative voting systems. Initially I want to
contrast single-choice with approval and range but I'm interested in adding
Condorcet also. I'm looking for people who would be willing to donate time.

I don't want to reveal the exact nature of the project just yet so I'll
make only a few general comments. The goal is to expose large numbers of
people to a spectrum of ideas that currently get very little to no press.
This includes the various voting methods, some alternative economic
perspectives and ideas such as permaculture. Adding your favorite idea into
the mix is definitely an option. Note that exposure and education, not
advocacy is the intent here.

This is a not-for-profit endeavor and the only reward would be in the
success of the project and having your name on the credits.

Any combination of the following skills needed:

Scheme programming or a willingness to learn scheme
Postgresql, schema design.
Html Kickstarter/html5
Possibly IOS app writing (android already covered)
Maybe test writing?

If any of this piques your interest and you think you could afford to spend
several hours a week for a few months working on this please contact me at
estifo...@gmail.com

Thanks for reading and I hope you'll forgive the off-topic cross-post.
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Help needed on a project intended to promote some important ideas.

2014-01-22 Thread Matt Welland
To clarify, by "do not reply to this email" I meant "do not reply to the
list" but instead email me directly at estifo...@gmail.com. I'm trying to
be a good citizen here and not clog up the lists with email that will annoy
people.

Also, I need someone with illustration and or image skills.


On Tue, Jan 21, 2014 at 11:25 PM, Matt Welland  wrote:

> Hi,
>
> This is a long shot and I apologize in advance for any time wasted and for
> cross-posting to unrelated groups. Please: DO NOT reply to this email.
>
> I have been working on a project that I believe will do a good job in
> raising awareness of alternative voting systems. Initially I want to
> contrast single-choice with approval and range but I'm interested in adding
> Condorcet also. I'm looking for people who would be willing to donate time.
>
> I don't want to reveal the exact nature of the project just yet so I'll
> make only a few general comments. The goal is to expose large numbers of
> people to a spectrum of ideas that currently get very little to no press.
> This includes the various voting methods, some alternative economic
> perspectives and ideas such as permaculture. Adding your favorite idea into
> the mix is definitely an option. Note that exposure and education, not
> advocacy is the intent here.
>
> This is a not-for-profit endeavor and the only reward would be in the
> success of the project and having your name on the credits.
>
> Any combination of the following skills needed:
>
> Scheme programming or a willingness to learn scheme
> Postgresql, schema design.
> Html Kickstarter/html5
> Possibly IOS app writing (android already covered)
> Maybe test writing?
>
> If any of this piques your interest and you think you could afford to
> spend several hours a week for a few months working on this please contact
> me at estifo...@gmail.com
>
> Thanks for reading and I hope you'll forgive the off-topic cross-post.
> --
> Matt
> -=-
> 90% of the nations wealth is held by 2% of the people. Bummer to be in the
> majority...
>



-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] $$ offer for Chicken + IUP on Windows :)

2014-02-01 Thread Matt Welland
Ok, so maybe it should be a single "$" sign ...

I find myself regularly needing to make simple tools that run on both Linux
and Windows and I'd dearly love to use Chicken for this purpose.

I don't have time right now to resurrect my chicken-iup project (
http://www.kiatoa.com/fossils/chicken-iup). The last time I tried I had
many issues getting 4.8.0 running on Windows. So I thought I'd try throwing
a few dollars at the problem. Here is my offer:

US$150 to get chicken 4.8.0 or greater working with IUP on Windows + Mingw
(hopefully all common versions).

All credit to who ever does the work. I'll help as much as I can. Ideally
this would re-use (and improve on) the integration I put together on
chicken-iup including the windows installer.

FYI, for non-windows users who might like to take a stab at this there is
MicroXP and virtualbox.
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] chicken-iup - progressing nicely but have problem with canvas-draw

2014-02-01 Thread Matt Welland
Ok, no takers on my lame attempt at a financial bribe for making the next
chicken-iup so I took a stab at it myself. I've made pretty good progress,
no doubt thanks to all the great work done by the Chicken devs, so far
chicken 4.8.0.5 and iup have compiled and seem to run fine. I'm stuck at
getting the canvas-draw egg installed. Does the error below mean anything
to anyone? Thanks.

Note: one thing I did different is apply a patch to ffcall that claims to
fix the trampoline conflict with windows executable protection. ffcall
compiled fine and I doubt it is related to this issue but I thought I'd
mention it.

Output from attempt to install canvas-draw:

 canvas-draw located at
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/temp750a.1588/canvas-
draw
checking platform for `canvas-draw' ...
checking dependencies for `canvas-draw' ...
install order:
("canvas-draw")
installing canvas-draw:1.1.1 ...
changing current directory to
C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/temp750a.1588/c
anvas-draw
  "c:\chicken\bin\csi" -bnq -setup-mode -e "(require-library setup-api)" -e
"(im
port setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\
"canvas-draw\" \"1.1.1\"))" -e "(extra-features '(no-library-checks))"
"C:\DOCUM
E~1\ADMINI~1\LOCALS~1\Temp\temp750a.1588\canvas-draw\canvas-draw.setup"
Deleted file - C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp1cfa.756.c
Deleted file - C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\temp74a4.756.c
  ""c:\chicken\bin\csc"" -feature compiling-extension -setup-mode
-feature no
-library-checks -s -O2 -d1 canvas-draw.scm -j canvas-draw -j
canvas-draw-base -j
 canvas-draw-primitives -j canvas-draw-play -j canvas-draw-picture -j
canvas-dra
w-client -j canvas-draw-ps -j canvas-draw-svg -j canvas-draw-metafile -j
canvas-
draw-cgm -j canvas-draw-dgn -j canvas-draw-dxf -j canvas-draw-emf -j
canvas-draw
-wmf -j canvas-draw-iup -j canvas-draw-gl -j canvas-draw-native -j
canvas-draw-s
erver -j canvas-draw-clipboard -j canvas-draw-printer -j canvas-draw-pdf
-lcd -l
iupcd -lcdgl -lcdpdf
canvas-draw.o:canvas-draw.c:(.text+0x18f94): undefined reference to
`cdInitConte
xtPlus'
collect2.exe: error: ld returned 1 exit status

Error: shell command terminated with non-zero exit status 1: ""gcc"
"canvas-draw
.o" -o "canvas-draw.so" -Wl,--enable-auto-import -shared -LC:/chicken -lcd
-liup
cd -lcdgl -lcdpdf -L"c:/chicken/lib/" -lchicken -lm -lws2_32"

Error: shell command failed with nonzero exit status 1:

  ""c:\chicken\bin\csc"" -feature compiling-extension -setup-mode
-feature no
-library-checks -s -O2 -d1 canvas-draw.scm -j canvas-draw -j
canvas-draw-base -j
 canvas-draw-primitives -j canvas-draw-play -j canvas-draw-picture -j
canvas-dra
w-client -j canvas-draw-ps -j canvas-draw-svg -j canvas-draw-metafile -j
canvas-
draw-cgm -j canvas-draw-dgn -j canvas-draw-dxf -j canvas-draw-emf -j
canvas-draw
-wmf -j canvas-draw-iup -j canvas-draw-gl -j canvas-draw-native -j
canvas-draw-s
erver -j canvas-draw-clipboard -j canvas-draw-printer -j canvas-draw-pdf
-lcd -l
iupcd -lcdgl -lcdpdf


Error: shell command terminated with nonzero exit code
70
"\"c:\\chicken\\bin\\csi\" -bnq -setup-mode -e \"(require-library
setup-api)\" -
...

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] ANN: chicken-iup 0.3 released, tested briefly on WinXP and Win8

2014-02-02 Thread Matt Welland
Chicken IUP is an easy to install package for Microsoft Windows.

Components:

Chicken Scheme 4.8.0.5
IUP, CD, IM libraries from www.tecgraf.puc-rio.br/iup
Many eggs including sqlite3, sql-de-lite, iup etc.

To use:

1. install MinGW from www.mingw.org
2. Install chicken-iup 0.3 from www.kiatoa.com/cgi-bin/chicken-iup
3. Add C:\chicken\bin;C:\chicken\lib to your PATH (under advanced settings)

To test it try:

1. start chicken-iup  (note, exit it and start it again the first time as
the environment variables don't seem to get picked up right after install)

2. Run: (load "../examples/simple.scm")

Thanks go to all the Chicken developers for chicken and all the eggs!

Let me know it you would like specific eggs to be included in the package
and I will release updated installers as needed.

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CMake build support

2014-02-10 Thread Matt Welland
Hi Oleg,

What is the purpose of switching to cmake? Can the transition be done without 
adding another dependency to building for mingw-msys?

I guess my concern is that even if cmake is an improvement over make that the 
impact can still be negative on the community.

For me the interesting platforms for chicken are:

Linux (several generations in current use).
Android (admittedly this is in my dreams :))
Windows mingw-msys

When you are done can I expect that my builds for these platforms will be as 
easy as they are today?

I missed the discussion of this on the chicken lists so my appologies if this 
has been hashed to death but in my opinion open source projects are very 
vunerable to pertubations and I really want to see chicken thriving, not just 
surviving. A change like this alienating even a single strong developer can 
hurt. Hopefully the developers are already on board with your vision in this.

Matt
-=-


From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Oleg Kolosov  
Date: 02/10/2014  1:18 PM  (GMT-07:00) 
To: chicken-users@nongnu.org 
Subject: [Chicken-users] CMake build support 
 
Hello All.

I am happy to inform you that I have achieved some success converting
Chicken build system from Makefiles to CMake. This initial work is a
proof of concept and still very ugly and incomplete, but certainly will
be improved. I've created a fork of Chicken on
https://github.com/bazurbat/chicken-scheme/tree/cmake-build, so anyone
interested can track progress and make requests there.

If you have proposals or suggestions for the new build system, let's
discuss.

-- 
Regards, Oleg


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


Re: [Chicken-users] CMake build support

2014-02-10 Thread Matt Welland



From my Android phone on T-Mobile. The first nationwide 4G network.

 Original message 
From: Oleg Kolosov  
Date: 02/10/2014  3:09 PM  (GMT-07:00) 
To: Matt Welland ,chicken-users  
Subject: Re: [Chicken-users] CMake build support 
 
On 02/11/14 01:07, Matt Welland wrote:
Hi Oleg,

What is the purpose of switching to cmake? Can the transition be done without 
adding another dependency to building for mingw-msys?

I guess my concern is that even if cmake is an improvement over make that the 
impact can still be negative on the community.

For me the interesting platforms for chicken are:

Linux (several generations in current use).
Android (admittedly this is in my dreams :))
Windows mingw-msys

When you are done can I expect that my builds for these platforms will be as 
easy as they are today?

I missed the discussion of this on the chicken lists so my appologies if this 
has been hashed to death but in my opinion open source projects are very 
vunerable to pertubations and I really want to see chicken thriving, not just 
surviving. A change like this alienating even a single strong developer can 
hurt. Hopefully the developers are already on board with your vision in 
this.
> Hi!
> There was not any discussion, I've decided to
> try first, discuss later. Consider this thread the
> initial request for comments.

Ah! Ok, fair enough. 

> I maintain build system for projects at 
> my workplace, we are cross-compiling 
> for embedded platform, desktop, there 
> are plans for mobile, and dealing with 
> Chicken (with eggs and dependencies) 
> as projects grow becomes really painful. 
> So this is partially internal, and partially
> personal project. I'm trying to implement
> CMake based scripts alongside 
> current system. Ideally, it should be
> completely optional.

Ok, I understand. This would certainly ease any transition.

> Current goals are: fix few annoyances 
> in building cross Chicken with eggs, a way 
> to generate configurable self-contained
> executables, native Windows build (with
>  installer). All this might take a long time.

If I read this correctly it sounds as if with CMake it would be possible to 
leverage the build system to not merely build chicken but also to install 
dependent eggs and even further to use it for the build for the final 
application. Is this what you envision?

If so, this is a new idea to me. I see installing chicken as a pre-developmment 
step. My application then has it's own makefile 100% independent of chicken. 

If CMake resulted in an easier to use deploy mechanism I'd be thrilled. Deploy 
is a super cool feature but I seem to have a hard time getting it to work 
sometimes.

Matt
-- 
Regards, Oleg___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Tools to make a graphviz dot map of a scheme program?

2014-02-10 Thread Matt Welland
I made a hack to try this out and although very interesting the output (i)
is crude. The script itself (ii) is an awful mess.

Somehow though it seems to me there could be some useful insight to be
gained from something visual like this and I imagine it has been done
before. Any pointers to nice ways to visualize scheme code would be
appreciated. I poked around in Google land but didn't find quite what I was
looking for.
-- 
Matt
(i)
http://www.kiatoa.com/cgi-bin/fossils/megatest/doc/re-re-factor-server/docs/results.pdf
(ii)
http://www.kiatoa.com/cgi-bin/fossils/megatest/doc/re-re-factor-server/utils/plot-code.scm
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Tools to make a graphviz dot map of a scheme program?

2014-02-20 Thread Matt Welland
Heh heh, pretty bad. I couldn't remember and had to go back and read the
code. Here is how to run it:

./utils/plot-code.scm db.scm,runs.scm *.scm > test.dot
dot -Tpdf test.dot > test.pdf

This reads all .scm files and creates output for db.scm and runs.scm.

I'd like to enhance this to be able to filter functions for the display.


On Wed, Feb 19, 2014 at 4:18 AM, Geoffrey wrote:

>  Hi Matt, what are the command line arguments that should be passed?
>
> (define files (cr (argv))) ?
>
>
> On 11/02/14 17:15, Matt Welland wrote:
>
>  I made a hack to try this out and although very interesting the output
> (i) is crude. The script itself (ii) is an awful mess.
>
>  Somehow though it seems to me there could be some useful insight to be
> gained from something visual like this and I imagine it has been done
> before. Any pointers to nice ways to visualize scheme code would be
> appreciated. I poked around in Google land but didn't find quite what I was
> looking for.
>  --
> Matt
> (i)
> http://www.kiatoa.com/cgi-bin/fossils/megatest/doc/re-re-factor-server/docs/results.pdf
> (ii)
> http://www.kiatoa.com/cgi-bin/fossils/megatest/doc/re-re-factor-server/utils/plot-code.scm
> -=-
> 90% of the nations wealth is held by 2% of the people. Bummer to be in the
> majority...
>
>
> ___
> Chicken-users mailing 
> listChicken-users@nongnu.orghttps://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
>


-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Problem with deploy - executable complains it cannot load type-errors

2014-03-31 Thread Matt Welland
I have made a deployable exe (chicken 4.8.0.5, Ubuntu 32bit) but get the
following when I try to run it:

Error: (require) cannot load extension: type-errors

Call history:

histstore.scm:5: ##sys#require  <--

==The Make Lines===

histstore/histstore : histstore.scm ../margs/margs.scm
chicken-install -p histstore  -deploy sqlite3 posix srfi-13 srfi-1
utils format srfi-69 regex regex-literals
csc histstore.scm -deploy

==The First Few Lines=

(use sqlite3 posix srfi-13 srfi-1 regex format)

(import (prefix sqlite3 sqlite3:))

;; (require-library margs)
(include "../margs/margs.scm")

==

Full code:
http://www.kiatoa.com/cgi-bin/fossils/opensrc/doc/tip/histstore/histstore.scm

What am I doing wrong?

Thanks
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problem with deploy - executable complains it cannot load type-errors

2014-04-02 Thread Matt Welland
Thanks. Using the master fixed it!

Is there a way to specify both the directory name and the executable name
to be created when using -deploy?

Running:

csc -deploy histstore.scm -o target

will create target/target

which I then have to rename. While not a big deal if there is a better way
I'd like to know it.

Matt


On Tue, Apr 1, 2014 at 1:19 AM, Christian Kellermann wrote:

> * Christian Kellermann  [140401 10:16]:
> > * Matt Welland  [140401 08:17]:
> > > I have made a deployable exe (chicken 4.8.0.5, Ubuntu 32bit) but get
> the
> > > following when I try to run it:
> > >
> > > Error: (require) cannot load extension: type-errors
> > >
> > > Call history:
> > >
> > > histstore.scm:5: ##sys#require  <--
> > >
> > > ==The Make Lines===
> > >
> > > histstore/histstore : histstore.scm ../margs/margs.scm
> > > chicken-install -p histstore  -deploy sqlite3 posix srfi-13 srfi-1
> > > utils format srfi-69 regex regex-literals
> > > csc histstore.scm -deploy
> > >
> > > ==The First Few Lines=
> > >
> > > (use sqlite3 posix srfi-13 srfi-1 regex format)
> > >
> > > (import (prefix sqlite3 sqlite3:))
> > >
> > > ;; (require-library margs)
> > > (include "../margs/margs.scm")
> > >
> > > ==
> > >
> > > Full code:
> > >
> http://www.kiatoa.com/cgi-bin/fossils/opensrc/doc/tip/histstore/histstore.scm
> > >
> > > What am I doing wrong?
>
> Sorry I did not have enough coffe, can you try master? This seems
> to be a bug I have fixed in it. As with older versions chicken-install
> -deploy will not install dependencies of the eggs you specify...
>
> Sorry for the noise,
>
> Christian
>
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
>



-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] CHICKEN 4.9.0rc1 is available

2014-04-20 Thread Matt Welland
I built latest chicken with many eggs including iup and ran my Megatest tests 
and it passes. I did see that resizing a terminal kills Megatest:

Launching 
/mfs/pkgs/chicken/megatest/tests/fullrun/tmp/mt_links/ubuntu/nfs/none/w16.7.11.16_b/blocktestxz/BOZZLEBLONKED/STUCK/DEAD

Error: segmentation violation

Call history:

substring-index   
substring-index   
tests.scm:71: regex#regexp
tests.scm:71: regex#string-substitute 
tests.scm:75: regex#regexp
tests.scm:75: regex#string-match  
runs.scm:643: runs:make-full-test-name
runs.scm:1028: conc   
runs.scm:643: hash-table-ref/default  
runs.scm:676: runs:make-full-test-name
runs.scm:1028: conc   
runs.scm:676: hash-table-ref/default  
runs.scm:690: runs:lownoise   
runs.scm:158: hash-table-ref/default  
runs.scm:159: current-seconds 
runs.scm:694: thread-sleep! <--
Command exited with non-zero status 70
4.45user 1.42system 10:50.81elapsed 0%CPU (0avgtext+0avgdata 50928maxresident)k
536inputs+0outputs (4major+595421minor)pagefaults 0swaps
make: *** [test4] Error 70

I think I've seen this before and I'll gather a little more info and report 
back. Resizing a terminal with csi running does not cause a crash so this is 
likely something specific to my app.

On Fri, 18 Apr 2014 13:12:20 +
Mario Domenech Goulart  wrote:

> Hi,
> 
> The first release candidate for CHICKEN 4.9.0 has been released.  It's
> available at
> http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-4.9.0rc1.tar.gz
> 
> See http://code.call-cc.org/dev-snapshots/2014/04/17/NEWS for the list
> of changes.
> 
> Please, give it a test and report back to the mailing list your
> findings.
> 
> Here's a suggested test procedure:
> 
>   $ make PLATFORM= PREFIX= install check
>   $ /bin/chicken-install pastiche
> 
> If you want to build CHICKEN with a compiler other than the default one,
> just use C_COMPILER= (e.g., C_COMPILER=clang) on the make
> invocation.
> 
> Of course, feel free to explore other supported build options (see the
> README file for more information) and actually use CHICKEN 4.9.0rc1 for
> your software.
> 
> If you can, please let us know the following information about the
> environment you tested the RC tarball on:
> 
> Operating system: (e.g., FreeBSD 10.0, Debian 7, Windows XP mingw-msys)
> Hardware platform: (e.g., x86, x86-64, PPC)
> C Compiler: (e.g., GCC 4.8.1, clang 3.0-6.2)
> Installation works?: yes or no
> Tests work?: yes or no
> Installation of eggs works?: yes or no
> 
> Thanks in advance.
> 
> The CHICKEN Team
> -- 
> http://www.call-cc.org
> 
> _______
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users


-- 
Matt Welland 

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


Re: [Chicken-users] CHICKEN 4.9.0rc1 is available

2014-04-20 Thread Matt Welland
Sorry, two things:

1. This was 4.9.1 - running again with 4.9.0rc1 now
2. This is on Ubuntu 12.04.4 LTS


On Sun, 20 Apr 2014 12:32:49 -0700
Matt Welland  wrote:

> I built latest chicken with many eggs including iup and ran my Megatest tests 
> and it passes. I did see that resizing a terminal kills Megatest:
> 
> Launching 
> /mfs/pkgs/chicken/megatest/tests/fullrun/tmp/mt_links/ubuntu/nfs/none/w16.7.11.16_b/blocktestxz/BOZZLEBLONKED/STUCK/DEAD
> 
> Error: segmentation violation
> 
>   Call history:
> 
>   substring-index   
>   substring-index   
>   tests.scm:71: regex#regexp
>   tests.scm:71: regex#string-substitute 
>   tests.scm:75: regex#regexp
>   tests.scm:75: regex#string-match  
>   runs.scm:643: runs:make-full-test-name
>   runs.scm:1028: conc   
>   runs.scm:643: hash-table-ref/default  
>   runs.scm:676: runs:make-full-test-name
>   runs.scm:1028: conc   
>   runs.scm:676: hash-table-ref/default  
>   runs.scm:690: runs:lownoise   
>   runs.scm:158: hash-table-ref/default  
>   runs.scm:159: current-seconds 
>   runs.scm:694: thread-sleep! <--
> Command exited with non-zero status 70
> 4.45user 1.42system 10:50.81elapsed 0%CPU (0avgtext+0avgdata 
> 50928maxresident)k
> 536inputs+0outputs (4major+595421minor)pagefaults 0swaps
> make: *** [test4] Error 70
> 
> I think I've seen this before and I'll gather a little more info and report 
> back. Resizing a terminal with csi running does not cause a crash so this is 
> likely something specific to my app.
> 
> On Fri, 18 Apr 2014 13:12:20 +
> Mario Domenech Goulart  wrote:
> 
> > Hi,
> > 
> > The first release candidate for CHICKEN 4.9.0 has been released.  It's
> > available at
> > http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-4.9.0rc1.tar.gz
> > 
> > See http://code.call-cc.org/dev-snapshots/2014/04/17/NEWS for the list
> > of changes.
> > 
> > Please, give it a test and report back to the mailing list your
> > findings.
> > 
> > Here's a suggested test procedure:
> > 
> >   $ make PLATFORM= PREFIX= install check
> >   $ /bin/chicken-install pastiche
> > 
> > If you want to build CHICKEN with a compiler other than the default one,
> > just use C_COMPILER= (e.g., C_COMPILER=clang) on the make
> > invocation.
> > 
> > Of course, feel free to explore other supported build options (see the
> > README file for more information) and actually use CHICKEN 4.9.0rc1 for
> > your software.
> > 
> > If you can, please let us know the following information about the
> > environment you tested the RC tarball on:
> > 
> > Operating system: (e.g., FreeBSD 10.0, Debian 7, Windows XP mingw-msys)
> > Hardware platform: (e.g., x86, x86-64, PPC)
> > C Compiler: (e.g., GCC 4.8.1, clang 3.0-6.2)
> > Installation works?: yes or no
> > Tests work?: yes or no
> > Installation of eggs works?: yes or no
> > 
> > Thanks in advance.
> > 
> > The CHICKEN Team
> > -- 
> > http://www.call-cc.org
> > 
> > ___
> > Chicken-users mailing list
> > Chicken-users@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
> 
> 
> -- 
> Matt Welland 
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users


-- 
Matt Welland 

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


Re: [Chicken-users] CHICKEN 4.9.0rc1 is available

2014-04-20 Thread Matt Welland

Everything runs fine for me with 4.9.0rc1 so far. This script is enough to show 
the problem I see with segfault on resizing the terminal. It occurs whether 
compiled or run from csi:

(use sqlite3 srfi-1 posix regex regex-case srfi-69 base64 format readline 
apropos json http-client directory-utils) ;; (srfi 18) extras)
(import (prefix sqlite3 sqlite3:))
(import (prefix base64 base64:))

(let ((th1 (make-thread (lambda ()(thread-sleep! 30)) "sleeping thread"))
  (th2 (make-thread (lambda ()(let loop ((count 0))(print "Count=" 
count)(thread-sleep! 3))
  (thread-start! th1)
  (thread-start! th2)
  (thread-join! th1))

Thanks for 4.9.0! I'll be making it my default henceforth.

On Sun, 20 Apr 2014 12:39:16 -0700
Matt Welland  wrote:

> Sorry, two things:
> 
> 1. This was 4.9.1 - running again with 4.9.0rc1 now
> 2. This is on Ubuntu 12.04.4 LTS
> 
> 
> On Sun, 20 Apr 2014 12:32:49 -0700
> Matt Welland  wrote:
> 
> > I built latest chicken with many eggs including iup and ran my Megatest 
> > tests and it passes. I did see that resizing a terminal kills Megatest:
> > 
> > Launching 
> > /mfs/pkgs/chicken/megatest/tests/fullrun/tmp/mt_links/ubuntu/nfs/none/w16.7.11.16_b/blocktestxz/BOZZLEBLONKED/STUCK/DEAD
> > 
> > Error: segmentation violation
> > 
> > Call history:
> > 
> > substring-index   
> > substring-index   
> > tests.scm:71: regex#regexp
> > tests.scm:71: regex#string-substitute 
> > tests.scm:75: regex#regexp
> > tests.scm:75: regex#string-match  
> > runs.scm:643: runs:make-full-test-name
> > runs.scm:1028: conc   
> > runs.scm:643: hash-table-ref/default  
> > runs.scm:676: runs:make-full-test-name
> > runs.scm:1028: conc   
> > runs.scm:676: hash-table-ref/default  
> > runs.scm:690: runs:lownoise   
> > runs.scm:158: hash-table-ref/default  
> > runs.scm:159: current-seconds 
> > runs.scm:694: thread-sleep! <--
> > Command exited with non-zero status 70
> > 4.45user 1.42system 10:50.81elapsed 0%CPU (0avgtext+0avgdata 
> > 50928maxresident)k
> > 536inputs+0outputs (4major+595421minor)pagefaults 0swaps
> > make: *** [test4] Error 70
> > 
> > I think I've seen this before and I'll gather a little more info and report 
> > back. Resizing a terminal with csi running does not cause a crash so this 
> > is likely something specific to my app.
> > 
> > On Fri, 18 Apr 2014 13:12:20 +
> > Mario Domenech Goulart  wrote:
> > 
> > > Hi,
> > > 
> > > The first release candidate for CHICKEN 4.9.0 has been released.  It's
> > > available at
> > > http://code.call-cc.org/dev-snapshots/2014/04/17/chicken-4.9.0rc1.tar.gz
> > > 
> > > See http://code.call-cc.org/dev-snapshots/2014/04/17/NEWS for the list
> > > of changes.
> > > 
> > > Please, give it a test and report back to the mailing list your
> > > findings.
> > > 
> > > Here's a suggested test procedure:
> > > 
> > >   $ make PLATFORM= PREFIX= install check
> > >   $ /bin/chicken-install pastiche
> > > 
> > > If you want to build CHICKEN with a compiler other than the default one,
> > > just use C_COMPILER= (e.g., C_COMPILER=clang) on the make
> > > invocation.
> > > 
> > > Of course, feel free to explore other supported build options (see the
> > > README file for more information) and actually use CHICKEN 4.9.0rc1 for
> > > your software.
> > > 
> > > If you can, please let us know the following information about the
> > > environment you tested the RC tarball on:
> > > 
> > > Operating system: (e.g., FreeBSD 10.0, Debian 7, Windows XP mingw-msys)
> > > Hardware platform: (e.g., x86, x86-64, PPC)
> > > C Compiler: (e.g., GCC 4.8.1, clang 3.0-6.2)
> > > Installation works?: yes or no
> > > Tests work?: yes or no
> > > Installation of eggs works?: yes or no
> > > 
> > > Thanks in advance.
> > > 
> > > The CHICKEN Team
> > > -- 
> > > http://www.call-cc.org
> > > 
> > > ___
> > > Chicken-users mailing list
> > > Chicken-users@nongnu.org
> > > https://lists.nongnu.org/mailman/listinfo/chicken-users
> > 
> > 
> > -- 
> > Matt Welland 
> > 
> > ___
> > Chicken-users mailing list
> > Chicken-users@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
> 
> 
> -- 
> Matt Welland 


-- 
Matt Welland 

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


[Chicken-users] Some eggs I'd like to add to svn

2014-05-21 Thread Matt Welland
Hi,

I have a few small apps which I'd like to add to svn if there are no 
objections. Note: I've no idea what to call these things so suggestions for 
better names are welcome.

1. refdb. Keep a spreadsheet in a set of flat files which are branch and merge 
friendly (e.g. in tools like git and fossil). Formatting is preserved. Data is 
treated as a three level dictionary array  so row and column 
labels in the spreadsheet must be unique. Refdb has only been tested with 
gnumeric.

2. histstore. Easily capture your commandline history into a sqlite3 database. 
This is very handy for those of us working with engineering design tools and 
such like where long, complicated command lines are a daily annoyance.

3. mfind. A tool for storing a directory tree in an sqlite3 database for easy 
searching. Mostly handy in environments where locate is either not set up or 
cannot be set up centrally for security reasons.

4. timesnitch. A strange tool for measuring what you do with your time. It 
randomly pops up a dialog where you enter what you were doing and provides a 
report of where your time is going based on some simple statistics. The method 
is similar to measuring the area of a closed curve on a piece of paper by 
randomly dotting the paper, counting the dots inside the curve, dividing by the 
total number of dots on the paper and then multiplying by the area of the 
paper. Although it can be slightly irritating :) timesnitch is fun to use for a 
few days. It is surprisingly accurate and for me at least it has revealed some 
interesting insights into how I spend my time, particularly at the office.

5. margs. A *very* simplistic command line argument parser. I have never 
acclimatized to the existing arg processors and I use this one a lot. Making it 
into an egg is mostly for my personal convenience :) 

I think I've mentioned my interest in putting these out as eggs in the past but 
I didn't follow though at the time. Refdb and histore are quite popular at work 
and I'd like to ensure they are readily available and easy to install.

To set these up I just create and populate the necessary directories in svn and 
add entries to egg-locations, correct? I could create fossils for these and 
register them but that seems like more hassle than it is worth. Does it matter 
to anyone which option I choose, fossil or svn? If I go the fossil route can I 
keep multiple eggs in a single fossil?

Lastly, these projects are all a little rough, (I'm an analog design engineer, 
not a programmer!) but comments and feedback are greatly appreciated.
-- 
Matt Welland 

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


Re: [Chicken-users] Some eggs I'd like to add to svn

2014-05-21 Thread Matt Welland
Yikes, when read on my phone my email looks very long! Here is a brief version:

I'd like to add some eggs to svn:

1. refdb - gnumeric spreadsheet to branch/merge friendly flat file converter.

2. histstore - command line history database

3. mfind - file tree store similar to gnu locate

4. timesnitch - statistically measure where you spend your time.

5. margs - simplistic argument processor.

And (adding this one) ...

6. stml - minimal cgi web app framework.

Any objections to my adding these? Any objections/suggestions about the names?

Thanks!

Matt
-=-

On Wed, 21 May 2014 21:41:49 -0700
Matt Welland  wrote:

> Hi,
> 
> I have a few small apps which I'd like to add to svn if there are no 
> objections. Note: I've no idea what to call these things so suggestions for 
> better names are welcome.
> 
> 1. refdb. Keep a spreadsheet in a set of flat files which are branch and 
> merge friendly (e.g. in tools like git and fossil). Formatting is preserved. 
> Data is treated as a three level dictionary array  so row 
> and column labels in the spreadsheet must be unique. Refdb has only been 
> tested with gnumeric.
> 
> 2. histstore. Easily capture your commandline history into a sqlite3 
> database. This is very handy for those of us working with engineering design 
> tools and such like where long, complicated command lines are a daily 
> annoyance.
> 
> 3. mfind. A tool for storing a directory tree in an sqlite3 database for easy 
> searching. Mostly handy in environments where locate is either not set up or 
> cannot be set up centrally for security reasons.
> 
> 4. timesnitch. A strange tool for measuring what you do with your time. It 
> randomly pops up a dialog where you enter what you were doing and provides a 
> report of where your time is going based on some simple statistics. The 
> method is similar to measuring the area of a closed curve on a piece of paper 
> by randomly dotting the paper, counting the dots inside the curve, dividing 
> by the total number of dots on the paper and then multiplying by the area of 
> the paper. Although it can be slightly irritating :) timesnitch is fun to use 
> for a few days. It is surprisingly accurate and for me at least it has 
> revealed some interesting insights into how I spend my time, particularly at 
> the office.
> 
> 5. margs. A *very* simplistic command line argument parser. I have never 
> acclimatized to the existing arg processors and I use this one a lot. Making 
> it into an egg is mostly for my personal convenience :) 
> 
> I think I've mentioned my interest in putting these out as eggs in the past 
> but I didn't follow though at the time. Refdb and histore are quite popular 
> at work and I'd like to ensure they are readily available and easy to install.
> 
> To set these up I just create and populate the necessary directories in svn 
> and add entries to egg-locations, correct? I could create fossils for these 
> and register them but that seems like more hassle than it is worth. Does it 
> matter to anyone which option I choose, fossil or svn? If I go the fossil 
> route can I keep multiple eggs in a single fossil?
> 
> Lastly, these projects are all a little rough, (I'm an analog design 
> engineer, not a programmer!) but comments and feedback are greatly 
> appreciated.
> -- 
> Matt Welland 
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users


-- 
Matt Welland 

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


[Chicken-users] Ann: refdb egg now available

2014-05-28 Thread Matt Welland
Refdb allows you to store values in a three level hash-table like structure
of flat files. The resulting data is friendly to branching and merging
which can allow parallel editing of the spreadsheet.

Only gnumeric is supported right now and the sheets must have unique row
and column labels.

Documentation (such as it is) is here: http://www.kiatoa.com/fossils/refdb

Irrelevant aside: the example used in the documentation is from a real
(albeit incomplete) project. Yes, Chicken Scheme is being used to control a
vermiculture (worm composting) bin which will hopefully produced enough
worms to supplement the feed to some quail. Sadly we have quail and not
chickens :)

I call it my worm condo, here is a snippet from the controlling code:

23:50:26 => condo: 32.5 degC, 59.5 %RH ambient: 37.7 degC, 6.3 %RH fan: off
23:51:49 => condo: 32.5 degC, 60.2 %RH ambient: 37.7 degC, 6.0 %RH fan: on
23:52:10 => condo: 32.5 degC, 58.3 %RH ambient: 37.8 degC, 6.0 %RH fan: off
23:52:31 => condo: 32.5 degC, 56.7 %RH ambient: 37.7 degC, 5.6 %RH fan: off
23:52:51 => condo: 32.5 degC, 57.4 %RH ambient: 37.7 degC, 6.0 %RH fan: off
23:53:12 => condo: 32.5 degC, 56.7 %RH ambient: 37.7 degC, 6.0 %RH fan: off
23:53:33 => condo: 32.4 degC, 55.9 %RH ambient: 37.7 degC, 6.0 %RH fan: off

Thanks to Mario for so patiently coaching me on using fossil for publishing
eggs and thanks to all the Chicken developers for Chicken.
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Can chicken itself be "deployed"?

2014-06-16 Thread Matt Welland
I have some tough install situations and having a "deployed" version of
chicken itself would be great.

Specifically I need to install to an area from a vm via sshfs but cannot
write directly as the user that the files ultimately need to be owned by.
Don't ask. It is stupid and it sucks. Anyhow, I can work around this but it
occurred to me that a chicken install that could be moved to any directory
would be really cool and might solve my problem. Is it possible?

-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] How to catch an error when http-client can't connect?

2014-07-23 Thread Matt Welland
I'd like to handle the case where http-client gets denied a connection. I
wrapped the call to with-input-from-request with a handle-exceptions but
that doesn't catch the error.

Thanks in advance for a pointer in the right direction.

Warning (#): in thread: (tcp-connect)
cannot create socket - Connection refused

Call history:

http-client.scm:190: uri-common#uri-port
http-client.scm:190: tcp-connect
http-client.scm:506: k882
http-client.scm:506: g886
http-client.scm:605: intarweb#request-uri
http-client.scm:605: close-connection!
http-client.scm:160: ensure-local-connections
http-client.scm:128: connections-owner
http-client.scm:163: connections
http-client.scm:163: hash-table-ref/default
http-client.scm:606: max-retry-attempts
http-client.scm:607: max-retry-attempts
http-client.scm:608: retry-request?
http-client.scm:606: g904
http-client.scm:610: raise  <--


-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Enhancement request for the trace egg

2014-11-23 Thread Matt Welland
I have two enhancement/suggestions for the trace egg:

1. Adding the line highlighted below to trace.scm gives me information on
were the call was made, something I find very useful.
2. With huge or hierarchal data structures trace output gets annoyingly
long. A mechanism for triming the output would be helpful.

(define (traced-procedure-entry name args)
  (let ((port (trace-output-port)))
(trace-indent)
(set! *trace-indent-level* (fx+ 1 *trace-indent-level*))
(write (cons name args) port)
(write ", Called from: " port)
 *   (write (conc (car (reverse (get-call-chain)*
(write-char #\newline port)
(flush-output port) ) )

Thanks,
-- 
Matt
-=-
90% of the nations wealth is held by 2% of the people. Bummer to be in the
majority...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Chicken Scheme's license

2015-01-05 Thread Matt Welland
On Jan 5, 2015 10:08 PM, "Alexej Magura"  wrote:
>
> What's Chicken Scheme licensed with? I did a brief search of the website,
but I
> didn't see anything about licensing; sspecifically, is Chicken Scheme
open source?

It is bsd licensed (with modifications?) I think. Odd, it is quite hard to
find the license on call cc.org. the license can be found in the source,
look here
http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=blob_plain;f=LICENSE;hb=HEAD

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


Re: [Chicken-users] readline egg v2.0 feedback

2015-01-25 Thread Matt Welland
I'm not sure I understand the concern. The user had to take explicit action
to enable command logging in their .csirc, something like the following:

(gnu-history-install-file-manager
 (string-append
  (or (getenv "HOME") ".") "/.csi.history"

Presumably if they did the research to find this and created or edited the
.csirc accordingly they *want* to keep a log of the commands they've
entered into csi. I don't see any value of forcing the additional step of
touching the file. I'm not aware of any Unix shells or tools with command
logging that require manually touching the history file before logging
starts working.

For a solution, how about a version
"gnu-history-install-file-manager-paranoid" that has the behavior you like
or if that is not acceptable how about a version
"gnu-history-install-file-manager-lazy" that does the create automatically?

I've set up several people with readline in csirc and get WTF responses
when it doesn't work out of the box and I have to remember the strange
requirement of touching the file.

Is there some other factor I'm missing? I don't see either a space or a
security issue for anyone who explicitly added the enabling code to .csirc

Matt
-=-


On Sun, Jan 25, 2015 at 10:21 AM, John Cowan  wrote:

> m...@kiatoa.com scripsit:
>
> > As a daily user of csi with readline I look forward to using your
> > enhancements.  If it makes sense to do I would like to see the
> > behavior change for a new install, currently the user has to touch
> > the ~/.csi-history (?) file before history will be kept. I'd like it
> > if that became unnecessary.
>
> That amounts to saying that every instance of csi logs everything you do.
> For both space and security reasons, I think it's better if the user has
> to take an affirmative action before that happens.
>
> --
> John Cowan  http://www.ccil.org/~cowanco...@ccil.org
> Is a chair finely made tragic or comic? Is the portrait of Mona Lisa
> good if I desire to see it? Is the bust of Sir Philip Crampton lyrical,
> epical or dramatic?  If a man hacking in fury at a block of wood make
> there an image of a cow, is that image a work of art? If not, why not?
> --Stephen Dedalus
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] readline egg v2.0 feedback

2015-01-25 Thread Matt Welland
On Sun, Jan 25, 2015 at 2:55 PM, Alexej Magura  wrote:

>
> Forgot to send my reply to the Chicken users mailing list too.
>
>  Forwarded Message   Subject: Re: [Chicken-users]
> readline egg v2.0 feedback  Date: Sun, 25 Jan 2015 14:54:09 -0700  From: 
> Alexej
> MaguraTo: Matt Welland
>  
>
> Actually, after reviewing the source a little, it seems that #4 is already
> supported, although it probably isn't very well documented.  This next
> release may need to be *3.0* instead of *2.5* if I decide to change the
> interface again--I hate doing that--which may prove necessary with some of
> the changes I already
> want to make to the *history-list* function for example: presently the
> underly C code uses a statically allocated buffer, which should be more
> than big enough for most cases, but I feel like it's awfully wasteful, and
> would be better served by dynamic memory allocation instead.
>
> I'm not familiar with the ,X interface idiom or whatever it is, but it
> sounds like something worth looking into and using.
>

>From http://wiki.call-cc.org/man/4/Using%20the%20interpreter the ,commands
are called "toplevel commands" and you can define them with:

(toplevel-command SYMBOL PROC [HELPSTRING])


> As for using sqlite, I'd be worried that it would add unnecessary overhead
> and read/write times to readline; moreover, readline provides no hooks,
> AFAICT; I'd have to write my own, and I don't see much to gain from using
> sqlite, sorry.  I guess you were hoping that it would make it easier to
> implement more advanced history features like, super easy history grepping,
> running the last command over again, and that sort of thing, or something
> like that?
>

Yes, I use csi almost as a Unix shell and I do a lot of
almost-but-not-quite scripts at the command line, for me the ability to
store commands for the long term would be very handy however I certainly
would not want to impinge the overhead of sqlite on anyone else. You can
forget the suggestion. Note that my hs command line store has over 15k
commands stored in it and searching doesn't seem too slow. For example if I
forget how to start/stop symformnode this search reminds me:

matt@xena:~/data/stml/doc$ time hs %symform%stop%
sudo ./SymformNode.sh stop contrib
sudo /opt/symform/SymformNode.sh stop
sudo ./SymformNode.sh stop web

real0m0.186s
user0m0.128s
sys0m0.020s

2/10's of a second doesn't seem too bad and this machine is mediocre by
today's standards.

One problem with Readline, which I admittedly have been avoiding, is that
> the documentation, is lacking, and, I think, this may contribute to the
> number/degree of users unaware or unsure of how to achieve a desired effect
> using Readline.
>
>

On 01/25/2015 02:29 PM, Matt Welland wrote:

  #1 - yes, appreciated
 #2 - nice, csi commands using the ,X interface would be nice. ,er - enable
recording, ,dr - to disable recording or something similar.
 #3 - very nice indeed.
 #4 - even nicer :)

 Aside: I think it'd be handy to store my csi history using my sqlite3
based "hs" command line history store tool (
http://www.kiatoa.com/cgi-bin/fossils/opensrc/wiki?name=histstore). If your
readline library allowed writing hooks that could update/query via other
calls it would be easy to bolt on hs or other such tools. Perhaps this is
already easy - I haven't actually looked yet.

On Sun, Jan 25, 2015 at 1:50 PM, Alexej Magura  wrote:

> I think that a reasonable solution would be to (1) create the history file
> if it does not already exist, (2) allow users to explicitly disable/enable
> history keeping at any time, (3) simplify history file installation to
> include only about a line of code, (4) add an option to either wipe the
> history file completely, truncat it to X many lines or history transactions.
>
> How does all that sound?
>
> Also, it's worth noting that we're currently on version 2.4 with 2.5 on
> the way.
>
> On 01/25/2015 10:21 AM, John Cowan wrote:
>
>> m...@kiatoa.com scripsit:
>>
>>  As a daily user of csi with readline I look forward to using your
>>> enhancements.  If it makes sense to do I would like to see the
>>> behavior change for a new install, currently the user has to touch
>>> the ~/.csi-history (?) file before history will be kept. I'd like it
>>> if that became unnecessary.
>>>
>> That amounts to saying that every instance of csi logs everything you do.
>> For both space and security reasons, I think it's better if the user has
>> to take an affirmative action before that happens.
>>
>>
>
>   ___
> Chicken-users mailing list
> Chicken-user

[Chicken-users] how to use readline with (repl) to add repl to my programs?

2015-04-11 Thread Matt Welland
With 3.0 this fails due to toplevel-command not found:

(use readline apropos)
(import readline)
(import apropos)
(current-input-port (make-readline-port))
(install-history-file #f "/.csi.history")
(repl)

With 1.993 this worked:

(use readline apropos)
(import readline)
(import apropos)
(gnu-history-install-file-manager
 (string-append
  (or (get-environment-variable "HOME") ".") "/.megatest_history"))
(current-input-port (make-gnu-readline-port "megatest> "))
;; (current-input-port (make-readline-port))
;; (install-history-file #f "/.csi.history")
(repl)

Adding (import csi) doesn't help as I guess toplevel-command is not
exported and defining a procedure:

(define (toplevel-command . a) #f)
(use readline)

works but it seems wrong. Also, calling (repl) works to give a repl but
none of the toplevel , calls are there.

Any help on how to make toplevel calls available in a repl much
appreciated. BTW, this feature of megatest (being able to extend it and use
a repl) has been incredibly useful. Just one more thing to love about
scheme and chicken in particular.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Bounty: update chicken-iup to all latest versions US$200

2015-04-19 Thread Matt Welland
I need chicken-iup brought up to date and in the process canvas-draw fixed.

I'm advertising this on Craigslist in case there is a starving student
looking to make a buck by playing around on a computer:

http://phoenix.craigslist.org/evl/cpg/4986007420.html

The offer is of course open to anyone so I thought I'd post it to
chicken-users in spite of my zero success track record with bounties :)

Let me know if interested.

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


[Chicken-users] Problems installing call-with-environment-variables

2015-05-01 Thread Matt Welland
Dependencies on cock (really hate that name btw, very embarrassing to be
working with a young female co-worker and have to maneuver around saying
the name out loud, reflects very poorly on Chicken Scheme IMHO) made
installing a hassle. To solve it I had to comment out the @(... lines and
the compile options.

I'm not sure what the right solution is and I don't know why installing on
this system failed:

> chicken-install
retrieving ...
checking platform for `call-with-environment-variables' ...
checking dependencies for `call-with-environment-variables' ...
install order:
("call-with-environment-variables")
installing call-with-environment-variables: ...
changing current directory to .
  '/p/blah/bin/csi' -bnq -setup-mode -e "(require-library setup-api)" -e
"(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"call-with-environment-variables\" \"\"))"
'call-with-environment-variables.setup'
  '/p/blah/bin/csc' -feature compiling-extension -setup-mode
call-with-environment-variables.scm -shared -optimize-leaf-routines -inline
-output-file call-with-environment-variables.so -emit-import-library
call-with-environment-variables -X cock

Error: (open-input-file) cannot open file - No such file or directory:
"cock"

Error: shell command terminated with non-zero exit status 17920:
'/p/blah/bin/chicken' 'call-with-environment-variables.scm' -output-file
'call-with-environment-variables.c' -dynamic -feature
chicken-compile-shared -feature compiling-extension -setup-mode
-optimize-leaf-routines -inline -emit-import-library
call-with-environment-variables -extend cock

Error: shell command failed with nonzero exit status 256:

  '/p/blah/bin/csc' -feature compiling-extension -setup-mode
call-with-environment-variables.scm -shared -optimize-leaf-routines -inline
-output-file call-with-environment-variables.so -emit-import-library
call-with-environment-variables -X cock


Error: shell command terminated with nonzero exit code
17920
"'/p/blah/bin/csi' -bnq -setup-mode -e \"(requi...
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] egg names

2015-05-03 Thread Matt Welland
I accidentally replied direct to Peter in my reply to the
call-with-environment-variables thread. Here is my original comment
regarding the "cock" utility:


> I've done some work recently but haven't updated its dependents to
> specify the latest version.
>
> > Really hate that name btw, very embarrassing to be working with a
> > young female co-worker and have to maneuver around saying the name
> > out loud, reflects very poorly on Chicken Scheme IMHO.
>
> Isn't it a rooster-pun, given Chicken?
>

Obvious to you, obvious to me. Unfortunately not so immediately obvious to
some. Wattle, cockadoodledoo and comb are all available and benign
alternatives. It's not a big deal, it just felt unprofessional at that
moment, like I was installing some software written by a 12 year old. I
like the chicken theme and the word play. I needed to do a from-scratch
install of chicken the other day and I called it a "raw chicken" install
and got a chuckle from the infrastructure guy. All good.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] ANN: new chicken-iup Windows installer with IUP gui, canvas-draw, scintilla etc. released.

2015-05-17 Thread Matt Welland
WHAT:

The chicken-iup installer has been updated with Chicken 4.9.01, and recent
versions of many eggs, the IUP gui including canvas-draw, and the iup
scintilla editor support.

STATUS:

chicken-iup appears to work just fine on WinXP and Windows 8. To install
eggs not bundled with the installer you will need to install mingw (
http://www.mingw.org/).

WHO:

Thanks to Matt Gushee for his help in making this happen.

WHY:

I find Chicken scheme to be a pragmatic and productive development tool.
The chicken-iup package makes it very easy to develop on Linux and then
deploy to both Linux and Windows.

Download and run the chicken-iup installer and you can start creating
scripts with an IUP gui in minutes. Add mingw and you can compile your
scripts to executables. Get the very easy to use Inno setup (
http://www.jrsoftware.org/isinfo.php) and generate installable packages.
All with almost zero integration effort. If only it was this easy on
Linux
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] ANN: new chicken-iup Windows installer with IUP gui, canvas-draw, scintilla etc. released.

2015-05-18 Thread Matt Welland
Oops! Thanks Mario.

WHERE:

http://www.kiatoa.com/fossils/chicken-iup

On May 18, 2015 4:45 AM, "Mario Domenech Goulart" 
wrote:
>
> Hi,
>
> On Sun, 17 May 2015 23:03:12 -0700 Matt Welland 
wrote:
>
> > WHAT:
> >
> > The chicken-iup installer has been updated with Chicken 4.9.01, and
> > recent versions of many eggs, the IUP gui including canvas-draw, and
> > the iup scintilla editor support.
> >
> > STATUS:
> >
> > chicken-iup appears to work just fine on WinXP and Windows 8. To
> > install eggs not bundled with the installer you will need to install
> > mingw (http://www.mingw.org/).
> >
> > WHO:
> >
> > Thanks to Matt Gushee for his help in making this happen.
> >
> > WHY:
> >
> > I find Chicken scheme to be a pragmatic and productive development
> > tool. The chicken-iup package makes it very easy to develop on Linux
> > and then deploy to both Linux and Windows.
> >
> > Download and run the chicken-iup installer and you can start creating
> > scripts with an IUP gui in minutes. Add mingw and you can compile your
> > scripts to executables. Get the very easy to use Inno setup
> > (http://www.jrsoftware.org/isinfo.php) and generate installable
> > packages. All with almost zero integration effort. If only it was this
> > easy on Linux
>
> Nice work, Matts. :-)
>
> Isn't a "WHERE" section missing?
>
> Best wishes.
> Mario
> --
> http://parenteses.org/mario
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] callbacks returning twice

2015-06-25 Thread Matt Welland
Hi Jörg,

I've been using IUP for quite a while and I don't recall seeing the message
"callback returned twice". Perhaps it is something with the newer version
of IUP you appear to be using. I would be interested to know if it works
with chicken-iup? My virtualbox install seems to have broken in some recent
upgrade and I have no access to Windows to try it myself. I can't run your
code on Linux as my install of iup is probably too old:

> csc iuprep.scm

Warning: reference to possibly unbound identifier `gridbox'

Error: module unresolved: ask-repl

Error: shell command terminated with non-zero exit status 256:
'/mfs/pkgs/chicken/4.9.0.1_for_14.04/bin/chicken' 'iuprep.scm' -output-file
'iuprep.c'

I was curious to see what I could learn from your code but unfortunately it
is appears beyond my current skill level and is mostly incomprehensible to
me. I'll keep trying :)

Matt
-=-

BTW: chicken-iup is at www.kiatoa.com/fossils/chicken-iup

On Thu, Jun 25, 2015 at 2:54 PM, "Jörg F. Wittenberger" <
joerg.wittenber...@softeyes.net> wrote:

> Hi all,
>
> for a couple of days I've been looking into iup for chicken.  This is
> close to the best thing since sliced bread in a way.
>
> Except that it crashes all the time.  "callback returned twice"
>
> So what's the recipe to hit that problem?
>
> (The code is fairly trivial; I'm just exploring.  Actually I was about
> to ask "what I'm doing there in the first module is so basic textbook
> stuff, which egg do I actually want to use instead of mimicking it
> here?" - It registers some callbacks around data to propagate updates to
> the gui elements.)
>
> Thanks for any suggestions.
>
> /Jörg
>
> (I attach my code here for reference.  Just in case.  It really does not
> too much; the second and third tab are only useful in connection with a
> server, just the first one usable out of the box.  Not much different to
> csi, just with a gui.)
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Chicken works great on Debian noroot on android - any suggestions for best path for graphics?

2015-07-25 Thread Matt Welland
For any android users who haven't tried it you might like Debian no root.
It seems pretty solid on my note 4. The default chicken on debian, 4.9.0.1
seems to work great. I'm looking at my options for doing some graphical
stuff. So far this is what I've seen:

ezxdisp - doesn't work due to missing font. I wasn't able to figure out
which package to install.

cairo + sdl - after installing dependencies the eggs install but
test-cairo.scm errors out with "Error: unbound variable: foreign-code.

iup - as I recall isn't worth trying due to issues with trampoline code on
arm.

Are there any other options worth trying or does anyone know the fixes to
the problems I ran into?

Thanks in advance.

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


Re: [Chicken-users] Chicken works great on Debian noroot on android - any suggestions for best path for graphics?

2015-07-25 Thread Matt Welland
On Sat, Jul 25, 2015 at 2:28 AM, "Jörg F. Wittenberger" <
joerg.wittenber...@softeyes.net> wrote:

>
> This assessment is surprising to me.  Maybe I did not yet run into the
> issues?
>
> For a couple of days I've been trying this out.  On debian/ARM.
>
> Just yesterday I discovered a severe bug in the iup egg (and reported to
> Thomas Chust in private mail).  This sure needs to be fixed.  There is
> also an issue with the integration into the i/o polling.  (I sent a
> related question to the iup list just minutes ago.)
>
> But otherwise is seems to work quite well.



Ah, I'll give it a try. For some reason I thought it didn't work.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Can AFL be meaningfully run against chicken generated binaries?

2015-07-30 Thread Matt Welland
This tool  was mentioned on the fossil mailing list:
http://lcamtuf.coredump.cx/afl/

I'm curious, can it be meaningfully be run against a binary generated by
chicken? Or would a native scheme variant be needed?
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] is posix-extras#resolve-pathname calling non-existant ##sys#expand-home-path?

2015-08-09 Thread Matt Welland
I'm testing Chicken 4.10.0, so far it is fine but the calls to
resolve-pathname give the kind of error shown below which implies to me
that the expand-home-path is still being called. I'm fixing by wrapping
with a call to pathname-expand but I must say this looks rather silly:

(resolve-pathname (pathname-expand somepath))

If the calls are going to be that pedantically specific I suggest equally
pedantic and specific names:

(resolve-dots-double-dots-and-other-things (resolve-tildes somepath))

Why not a pragmatic coalescing of resolve and expand into a single call?
Not a big deal but does seem a tad tiresome to me.

The error:

Warning (#): in thread: unbound variable:
##sys#expand-home-path

Call history:

http-transport.scm:290: thread-terminate!
http-transport.scm:291: debug:print-info
common_records.scm:96: debug:debug-mode
rmt.scm:111: k103
rmt.scm:111: g107
rmt.scm:121: http-transport:server-dat-update-last-access
http-transport.scm:338: current-seconds
launch.scm:723: hash-table-set!
launch.scm:726: file-exists?
launch.scm:727: posix-extras#resolve-pathname
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] is posix-extras#resolve-pathname calling non-existant ##sys#expand-home-path?

2015-08-09 Thread Matt Welland
On Sun, Aug 9, 2015 at 10:37 PM, Matt Welland 
wrote:

> I'm testing Chicken 4.10.0, so far it is fine but the calls to
> resolve-pathname give the kind of error shown below which implies to me
> that the expand-home-path is still being called. I'm fixing by wrapping
> with a call to pathname-expand but I must say this looks rather silly:
>

CORRECTION: wrapping did not fix it. I assumed some paths had a ~
triggering a call to ##sys#expand-home-path but posix-extras is peppered
with those calls. I replaced them locally with pathname-expand and can move
on to the next suite of errors.

diff posix-extras/posix-extras.scm posix-extras-fix/posix-extras.scm
85a86,87
> (use pathname-expand)
>
248c250
<   (when (fx< (##core#inline "C_lchmod" (##sys#make-c-string
(##sys#expand-home-path fname)) m) 0)
---
>   (when (fx< (##core#inline "C_lchmod" (##sys#make-c-string
(pathname-expand fname)) m) 0)
256c258
<   (when (fx< (##core#inline "C_lchown" (##sys#make-c-string
(##sys#expand-home-path fn)) uid gid) 0)
---
>   (when (fx< (##core#inline "C_lchown" (##sys#make-c-string
(pathname-expand fn)) uid gid) 0)
266c268
< (when (fx< (##core#inline "C_mknod64" (##sys#make-c-string
(##sys#expand-home-path fn))
---
> (when (fx< (##core#inline "C_mknod64" (##sys#make-c-string
(pathname-expand fn))
271c273
< (when (fx< (##core#inline "C_mknod" (##sys#make-c-string
(##sys#expand-home-path fn))
---
> (when (fx< (##core#inline "C_mknod" (##sys#make-c-string
(pathname-expand fn))
320c322
<  (let ((fn (##sys#expand-home-path f)))
---
>  (let ((fn (pathname-expand f)))
332c334
<(##sys#expand-home-path p) #f)
---
>(pathname-expand p) #f)



> (resolve-pathname (pathname-expand somepath))
>
> If the calls are going to be that pedantically specific I suggest equally
> pedantic and specific names:
>
> (resolve-dots-double-dots-and-other-things (resolve-tildes somepath))
>
> Why not a pragmatic coalescing of resolve and expand into a single call?
> Not a big deal but does seem a tad tiresome to me.
>
> The error:
>
> Warning (#): in thread: unbound variable:
> ##sys#expand-home-path
>
> Call history:
>
> http-transport.scm:290: thread-terminate!
> http-transport.scm:291: debug:print-info
> common_records.scm:96: debug:debug-mode
> rmt.scm:111: k103
> rmt.scm:111: g107
> rmt.scm:121: http-transport:server-dat-update-last-access
> http-transport.scm:338: current-seconds
> launch.scm:723: hash-table-set!
> launch.scm:726: file-exists?
> launch.scm:727: posix-extras#resolve-pathname
>
>
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] ezxdisp, g2 both work great on Android noroot debian .... but iup, doodle, allegro, cairo all do not ...

2015-09-03 Thread Matt Welland
Given it's impressive performance and ease of setup noroot debian seems
like a great way to enable writing chicken scheme apps that target
Android(i) (in addition to Linux and Windows). ezxdisp is a bit primitive
and g2 doesn't seem designed for dynamic graphics but if it is all we've
got it will do. My question is would anyone be interested in bug reports
for one of doodle, allegro, or cairo? I'll do my best to help but would
prefer to focus on just one option.

(i) I'm not saying this would replace any native android chicken efforts,
just that it is a low barrier to entry for using Chicken on your android
device.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] ezxdisp, g2 both work great on Android noroot debian .... but iup, doodle, allegro, cairo all do not ...

2015-09-04 Thread Matt Welland
I just sent an email to chicken-users from my phone with a snapshot of
doodle running on debian noroot. I was able to draw on the example
test-doodle.scm (compiled to test-doodle) using the s-pen with no
discernible lag. To get it to work set the color depth to 24 bit.

Thanks for chicken and thanks for doodle!

On Fri, Sep 4, 2015 at 2:16 AM, Christian Kellermann 
wrote:

> * Matt Welland  [150904 08:12]:
> > Given it's impressive performance and ease of setup noroot debian seems
> > like a great way to enable writing chicken scheme apps that target
> > Android(i) (in addition to Linux and Windows). ezxdisp is a bit primitive
> > and g2 doesn't seem designed for dynamic graphics but if it is all we've
> > got it will do. My question is would anyone be interested in bug reports
> > for one of doodle, allegro, or cairo? I'll do my best to help but would
> > prefer to focus on just one option.
>
> Yes, for doodle and cairo. If the SDL and cairo libs work on noroot
> debian on android both eggs should too.
>
> > (i) I'm not saying this would replace any native android chicken efforts,
> > just that it is a low barrier to entry for using Chicken on your android
> > device.
>
> Indeed a nice idea. Thanks!
>
> Christian
>
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Doodle on debian noroot on galaxy note.

2015-09-05 Thread Matt Welland
On Sep 5, 2015 2:00 AM, "Christian Kellermann"  wrote:
>
> * Matt Welland  [150905 06:16]:
> > Works great, very responsive, no lag. Set color depth to 24 bit, use
native
> > resolution and it just works.
>
> Just out of curiousity does the fullscreen option work?

Fullscreen works - but you have to specify the width and height correctly.
Is there a way to query it?

>
> This is cool anyway, thanks for bringing it to my attention!
>
> Cheers,
>
> Christian
>
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] regex to be actively deprecated some day?

2015-09-07 Thread Matt Welland
Ok, I sort of panicked when I saw what looked like regex being deprecated
(read my original message below if you wish). After re-reading the irregex
egg wiki page a few times it looks like all is well assuming these two
things:

1. irregex unit will continue to support reading the pcre syntax
2. those using the backslash substitution destination string syntax be
prepared to write a parser/converter.

As a request to the developers - please consider adding the function from
the regex egg that parses the \N type dest strings to irregex.

Thanks.

Matt
-=-
== my original "panicked"message =

>From a comment to Chicken-janitors regarding bug #1189 I saw this:

"This seems to be an undocumented feature of the substring-replace
 function, which allows you to escape the backslash. I would recommend
 using irregex, the regex egg's API is kind of deprecated anyway, and it's
 also not very efficient."

Then in the regex egg wiki page I see:

"It is a thin wrapper around the functionality provided by irregex
 and is mostly intended to
keep old code working."

These statements leave me a little concerned as I use the regex egg a fair
amount and I don't have the energy to learn yet another abstraction or to
go back and rewrite old code. More importantly I expose the use of regexes
to users of Megatest and logpro and they have no tolerance for doing
something considered a "standard" in a different way, especially if it
means using something that looks like Scheme.

>From re-reading the irregex egg wiki page I think the only thing I rely on
that is missing is the \1 substitution mechanism. Is there an alternative
syntax? All I see is the following:

(irregex-replace "(.)(.)" "ab" 2 1 "*")

Which would be implemented using a destination of "\2\1*" in
string-substitute. Converting an old-style destination string to the list
of numbers and strings would not be too hard I suppose.

Thanks,

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


Re: [Chicken-users] Windows deployment - Numbers egg

2015-10-03 Thread Matt Welland
An alternative to statically compiling is to use the deploy feature of csc
to make a directory with all the items you need. When you start working
with IUP I think it will be your only choice. Here is a snippet of a
Makefile that I used to deploy a project to a directory on windows. You can
then use Inno Setup to make an installer
http://www.jrsoftware.org/isinfo.php with the directory contents or just
zip it up and share.

=Makefile example===

PROXY =

CHICKEN_INSTALL=chicken-install $(PROXY) -deploy -p farmsim

farmsim/farmsim : farmsim.scm boxes.scm common.scm ezxcolors.scm
simevents.scm farmsim/coops.so farmsim/format.so farmsim/ezxdisp.so
farmsim/ezxgui.so farmsim/qtree.so farmsim/vcd.so farmsim/geolib.so
farmsim/pdf.so farmsim/regex.so
csc -deploy farmsim.scm

farmsim/coops.so :
$(CHICKEN_INSTALL) coops

farmsim/ezxdisp.so :
$(CHICKEN_INSTALL) ezxdisp

farmsim/regex.so :
$(CHICKEN_INSTALL) regex

farmsim/pdf.so :
$(CHICKEN_INSTALL) pdf

farmsim/format.so :
$(CHICKEN_INSTALL) format

farmsim/regex.so :
$(CHICKEN_INSTALL) regex

farmsim/qtree.so : # $(MATTSUTILS)/qtree/qtree.scm
$(CHICKEN_INSTALL) qtree -l $(MATTSUTILS) -transport local

farmsim/vcd.so :   # $(MATTSUTILS)/vcd/vcd.scm
$(CHICKEN_INSTALL) vcd -l $(MATTSUTILS) -transport local

farmsim/ezxgui.so : # $(MATTSUTILS)/ezxgui/ezxgui.scm
$(CHICKEN_INSTALL) ezxgui -l $(MATTSUTILS) -transport local

farmsim/geolib.so : # $(MATTSUTILS)/geolib/geolib.scm
$(CHICKEN_INSTALL) geolib -l $(MATTSUTILS) -transport local


On Sat, Oct 3, 2015 at 6:50 PM, Robert Herman  wrote:

> I have been learning Chicken by incrementally building a program that
> returns a number of digits of Pi based on an already-existing algorithm
> that implements the Chudnovsky method. I have a command line version
> working, thanks to all of the help here, that writes the file as well as
> displays the output in the command line.
> If I just: csc Pi-Ch.scm I get a 77kB exe that runs fine on my machine. In
> order to share it with my son, I need to statically compile it with all of
> its dependencies, like so:
>
> csc -deploy -static Pi-Ch.scm
>
> I returns an error:
>
> Error: (require) cannot load extension: numbers
> Call history:
> Pi-Ch.scm:16: ##sys#require <--
>
> I found the numbers.so file, but Windows needs a dll file. I plan on
> downloading the numbers egg source, and seeing if there's any reason I
> could not compile the numbers.so file to numbers.dll. Any leads or tips?
>
> Next step will be to create an IUP GUI for the program to complete the
> exercise.
>
> Thanks!
>
> Rob
>
> PS: Here's the code to date:
>
> ;;; Program to use the chudnovsky formula to compute pi.
> ;;; Written by Bakul Shah.
> ;;; Changed by Bradley Lucier to use standard arithmetic operations
> ;;; available in Gambit Scheme and to replace (floor (/ ...)) by
> ;;; (quotient ...)
>
> ;; Don't try running this benchmark with Gauche, it'll consume all
> ;; your computer's memory!
>
>  I removed the conditional statements to make it run across different
>  scheme implementations.
>  I added the use numbers and extras at the top, and the last 8 lines
>  to prompt user and to display the results and write to a file.
>  TODO: Deploy to Windows 32-bit, and create an IUP-based GUI for it.
>  RPH - 4/10/2015
>
> (use numbers extras)
>
> (define integer-sqrt exact-integer-sqrt)
>
> (define ch-A 13591409)
> (define ch-B 545140134)
> (define ch-C 640320)
> (define ch-C^3 (expt 640320 3))
> (define ch-D 12)
>
> (define (ch-split a b)
>   (if (= 1 (- b a))
>   (let ((g (* (- (* 6 b) 5) (- (* 2 b) 1) (- (* 6 b) 1
> (list g
>   (quotient (* ch-C^3 (expt b 3)) 24)
>   (* (expt -1 b) g (+ (* b ch-B) ch-A
>   (let* ((mid (quotient (+ a b) 2))
>  (gpq1 (ch-split a mid));
>  (gpq2 (ch-split mid b));
>  (g1 (car gpq1)) (p1 (cadr gpq1)) (q1 (caddr gpq1))
>  (g2 (car gpq2)) (p2 (cadr gpq2)) (q2 (caddr gpq2)))
> (list (* g1 g2)
>   (* p1 p2)
>   (+ (* q1 p2) (* q2 g1))
>
> (define (pich digits)
>   (let* ((num-terms (inexact->exact (floor (+ 2 (/ digits 14.181647462)
>  (sqrt-C (integer-sqrt (* ch-C (expt 100 digits)
> (let* ((gpq (ch-split 0 num-terms))
>(gs (car gpq)) (p (cadr gpq)) (q (caddr gpq)))
>   (quotient (* p ch-C sqrt-C) (* ch-D (+ q (* p ch-A)))
>
> (print "How many digits of Pi to compute?")
> (define digits (read))
>
> (print "Here you go:")
> (print (pich digits))
> (define file-name "pidigits.txt")
> (with-output-to-file file-name
>   (lambda ()
> (format #t "~A~%" (pich digits
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-us

[Chicken-users] utf8 failing to "deploy" and request for suggestions on how to install multiple versions of an egg.

2015-10-05 Thread Matt Welland
I need to install multiple versions of my refdb and logpro eggs. My first
thought was to take advantage of deploy but I get the error below. Other
than hacking them to make a local install I'm out of ideas, any suggestions?

chicken-install -deploy -p $PWD/refdb refdb

that is failing here:

changing current directory to /tmp/temp8135.38302/utf8
  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csi' -bnq -e "(require-library
setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
"(extension-name-and-version '(\"utf8\" \"3.4.1\"))" -e
"(destination-prefix \"/tmp/refdb\")" -e "(runtime-prefix \"/tmp/refdb\")"
-e "(deployment-mode #t)" 'utf8.setup'
make: making utf8-lolevel.so
  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature compiling-extension
-deployed -fixnum-arithmetic -inline -local -s -O3 -d0 -j utf8-lolevel
utf8-lolevel.scm
  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature compiling-extension
-deployed -s -O2 -d0 utf8-lolevel.import.scm
make: making utf8.so
  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature compiling-extension
-deployed -fixnum-arithmetic -inline -local -s -O2 -d1 -j utf8 utf8.scm

Warning: renamed identifier not imported: (utf8-string? valid-string?)

Warning: exported identifier of module `utf8' has not been defined:
valid-string?

Error: module unresolved: utf8

Error: shell command terminated with non-zero exit status 256:
'/p/f/env/pkgs/chicken/4.9.0.1/bin/chicken' 'utf8.scm' -output-file
'utf8.c' -dynamic -feature chicken-compile-shared -feature
compiling-extension -fixnum-arithmetic -inline -local -optimize-level 2
-debug-level 1 -emit-import-library utf8
make: Failed to make utf8.so: shell command failed with nonzero exit status
256:

  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature compiling-extension
-deployed -fixnum-arithmetic -inline -local -s -O2 -d1 -j utf8 utf8.scm

Error: shell command failed with nonzero exit status 256:

  '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature compiling-extension
-deployed -fixnum-arithmetic -inline -local -s -O2 -d1 -j utf8 utf8.scm
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] utf8 failing to "deploy" and request for suggestions on how to install multiple versions of an egg.

2015-10-05 Thread Matt Welland
On Mon, Oct 5, 2015 at 7:52 PM, Alex Shinn  wrote:

> On Mon, Oct 5, 2015 at 11:42 PM, Matt Welland 
> wrote:
>
>> I need to install multiple versions of my refdb and logpro eggs. My first
>> thought was to take advantage of deploy but I get the error below. Other
>> than hacking them to make a local install I'm out of ideas, any suggestions?
>>
>> chicken-install -deploy -p $PWD/refdb refdb
>>
>> that is failing here:
>>
>> changing current directory to /tmp/temp8135.38302/utf8
>>   '/p/f/env/pkgs/chicken/4.9.0.1/bin/csi' -bnq -e "(require-library
>> setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e
>> "(extension-name-and-version '(\"utf8\" \"3.4.1\"))" -e
>> "(destination-prefix \"/tmp/refdb\")" -e "(runtime-prefix \"/tmp/refdb\")"
>> -e "(deployment-mode #t)" 'utf8.setup'
>> make: making utf8-lolevel.so
>>   '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature
>> compiling-extension-deployed -fixnum-arithmetic -inline -local -s -O3
>> -d0 -j utf8-lolevel utf8-lolevel.scm
>>   '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature
>> compiling-extension-deployed -s -O2 -d0 utf8-lolevel.import.scm
>> make: making utf8.so
>>   '/p/f/env/pkgs/chicken/4.9.0.1/bin/csc' -feature
>> compiling-extension-deployed -fixnum-arithmetic -inline -local -s -O2
>> -d1 -j utf8 utf8.scm
>>
>> Warning: renamed identifier not imported: (utf8-string? valid-string?)
>>
>> Warning: exported identifier of module `utf8' has not been defined:
>> valid-string?
>>
>> Error: module unresolved: utf8
>>
>
> I can't reproduce this (same chicken version, osx, with or without
> -deploy).
> Could there be a conflict with an old version of utf8 in your search path?
> The identifier in question is defined, though was added somewhat recently.
>

Re-installing utf8 fixed it. Thanks.


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


[Chicken-users] Help with usage of process ...

2015-10-09 Thread Matt Welland
I'm trying to use the posix process call to run the graphviz dot program,
hand it some input data and collect the output. I'm not able to figure out
how to correctly use process to do this. My code is below. Any hints would
be much appreciated.

(define (tests:run-dot indat outtype) ;; outtype is plain, fig, dot, etc.
http://www.graphviz.org/content/output-formats
  (print "indat: ")
  (map print indat)
  (let-values (((inp oup pid)(process "dot" (list "-T" outtype
(let ((th1 (make-thread (lambda ()
  (with-output-to-port oup
(lambda ()
  (map print indat
"dot writer")))
  (thread-start! th1)
  (let ((res (with-input-from-port inp
   (lambda ()
 (read-lines)
(thread-join! th1)
(close-output-port oup)
(close-input-port inp)
;; (process-wait pid)
res)))

For reference this is the equivalent of the following from the commandline:

matt@xena:~/data/megatest/ext-tests$ dot -Tplain << EOF
> digraph tests {
> a -> b
> }
> EOF
graph 1 0.75 1.5
node a 0.375 1.25 0.75 0.5 a solid ellipse black lightgrey
node b 0.375 0.25 0.75 0.5 b solid ellipse black lightgrey
edge a b 4 0.375 0.99579 0.375 0.88865 0.375 0.7599 0.375 0.64045 solid
black
stop
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Help with usage of process ...

2015-10-10 Thread Matt Welland
On Fri, Oct 9, 2015 at 7:25 PM, Evan Hanson  wrote:

> Hi Matt,
>
> My guess is that because you don't close the output port before waiting
> for results, dot(1) sits there waiting for more input and your procedure
> appears to hang.
>

Ah, yes, dot is not processing the input until it is read in its entirety.
Thanks Evan. The following works fine:

(define (tests:run-dot indat outtype) ;; outtype is plain, fig, dot, etc.
http://www.graphviz.org/content/output-formats
  (let-values (((inp oup pid)(process "dot" (list "-T" outtype
(with-output-to-port oup
  (lambda ()
(map print indat)))
(close-output-port oup)
(let ((res (with-input-from-port inp
 (lambda ()
   (read-lines)
  (close-input-port inp)
res)))



> I'd try closing `oup` once you've written your graph to the process, for
> example by making the thunk you use for the "dot writer" thread look like:
>
> (lambda ()
>   (with-output-to-port oup
>(lambda ()
>  (map print indat)
>  (close-output-port oup
>
> Cheers,
>
> Evan
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] strange IUP canvas behavior - mouse clicks returning bad value

2015-10-16 Thread Matt Welland
obj: #, pressed 0, status   1
canvas-origin: 0 0 click at -1987635704 48

The -1987635704 is the x value returned by this callback:

#:button-cb (lambda (obj btn pressed x y status)
...

this is failing on Ubuntu 15.04 but working ok on sles11.

so far as I can tell this is not due to any changes in the code - running
an older version exhibits the save behaviour.

Any suggestions on what to look at?

Thanks,

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


[Chicken-users] Regex fail?

2015-10-29 Thread Matt Welland
(string-match "^([^\n]*)(\n.*|).*$" "This\nis \n")
=> #f

Using Ruby as comparison:

irb(main):001:0> "This\nis \n".match(/^([^\n]*)(\n.*|)$/)
=> #
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] strange IUP canvas behavior - mouse clicks returning bad value

2015-10-29 Thread Matt Welland
I'm not sure how to narrow this problem down but I'd like to start with a
fresh build of chicken / IUP. However that process never seems to go well
for me. Has anyone recently installed the chicken IUP egg on 64bit Ubuntu
15.04 or a recent Debian and if so would you be so kind as to share your
recipe for success? I'd like to avoid losing several evenings trying every
permutation and combination of install strategies.

Thanks.

On Sat, Oct 17, 2015 at 7:45 AM, Thomas Chust 
wrote:

> On 2015-10-16 11:40, Matt Welland wrote:
> > [...]
> > this is failing on Ubuntu 15.04 but working ok on sles11.
> > [...]
>
> Hello,
>
> are the systems in question running on the same architecture? Do they
> have the same word size?
>
> My gut feeling says that the problem looks suspiciously like some
> calling convention or data type conversion issue.
>
> Ciao,
> Thomas
>
>
> --
> When C++ is your hammer, every problem looks like your thumb.
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] example from rpc egg crashes at around 2k calls for me ....

2015-12-07 Thread Matt Welland
I don't understand why this is crashing. I'm guessing I'm failing to close
a connection or finalize something. I also saw the same problem when I used
sqlite3 instead of sql-de-lite. Any help or suggestions of where to look
would be appreciated.

The code (based on the sqlite3 example from the rpc egg):
https://www.kiatoa.com/cgi-bin/fossils/megatest/artifact/900250564a62efca

I run the server then run four instances of this script:
https://www.kiatoa.com/cgi-bin/fossils/megatest/artifact/7217b9abad5d9406

The last output is:

[rpc:server] request 2030 from 127.0.0.1; thread2034 (of 0) started...

Warning (#): in thread: (serialize) unable to serialize
object - can not serialize pointer-like object: #

Call history:

sql-de-lite.scm:188: ##sys#block-set!
sql-de-lite.scm:519: database-error
sql-de-lite.scm:856: raise-database-errors
sql-de-lite.scm:865: error-message
sqlite3-api.scm:35: ##sys#peek-c-string
sql-de-lite.scm:864: raise-database-error/status
sql-de-lite.scm:871: make-property-condition
sql-de-lite.scm:875: make-property-condition
sql-de-lite.scm:870: make-composite-condition
sql-de-lite.scm:869: abort
sql-de-lite.scm:303: finalized?
sql-de-lite.scm:304: reset-unconditionally
sql-de-lite.scm:188: ##sys#block-set!
sql-de-lite.scm:559: set-statement-column-names!
sql-de-lite.scm:188: ##sys#block-set!
sql-de-lite.scm:295: c1401  <--
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] example from rpc egg crashes at around 2k calls for me ....

2015-12-08 Thread Matt Welland
On Tue, Dec 8, 2015 at 12:44 AM, Peter Bex  wrote:

> On Mon, Dec 07, 2015 at 10:38:33PM -0700, Matt Welland wrote:
> > I don't understand why this is crashing. I'm guessing I'm failing to
> close
> > a connection or finalize something. I also saw the same problem when I
> used
> > sqlite3 instead of sql-de-lite. Any help or suggestions of where to look
> > would be appreciated.
>
> From the call chain, it looks like something broke during query execution
> and it's trying to serialize the exception object, which probably contains
> a reference to the database connection (which is a pointer).
>
> Try catching all exceptions and raising a placeholder exception with a
> simple (error "foo")
>

Thanks Peter. I'm not sure where to add this but I'll experiment with it
tonight.

I did test on a different system today and it kept going past 6k calls.
However running "netstat|wc -l" showed a rapidly increasing number of TCP
connections. It seems likely I'm not closing the connection but I don't see
where to add the close.


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


Re: [Chicken-users] Scraping the REPL?

2016-01-23 Thread Matt Welland
On Jan 23, 2016 4:50 AM, "Matt Gushee"  wrote:
>
> What OS are you using? If you are on Linux, you can use the 'script'
command. You will have to edit the output a bit, but it does the job.

+1 on using script.

A good alternative if you are an (x)emacs user is to use a shell inside
emacs: M-x shell . I'm pretty sure this works on windows also. Note
that command history is accessed via alt-p, not up arrow.

>
> --
> Matt Gushee
>
> On Sat, Jan 23, 2016 at 4:29 AM, Hefferon, James S. 
wrote:
>>
>>
>> I am writing a document that will include figures showing
>> interactions with the Chicken interpreter.  In past documents of
>> this kind, by-hand cutting and pasting has led me to have such
>> illustrations be inaccurate.  So I would like those to be
>> produced as part of the process of compiling the document (I am
>> writing in LaTeX).
>>
>> Basically, I'd like to feed lines to the csi and then scrape the
>> entire REPL off screen, so I can collect it and include it in
>> the doc.
>>
>> In the past I have done some scraping of this kind with a Python
>> script using an Expect module.  But it is a clunky process, with
>> problems of its own.
>>
>> I see from the "Confirmed deviations" page that transcripts are
>> not implemented.  Before I launch what is really a kludge, can I
>> ask if I am missing some other option?  None of the eggs
>> seemed to me to do this but maybe I missed some obvious point.
>> Something that drops the entire interaction to a file would be ideal.
>>
>> Thank you for any help.
>> Jim
>> ___
>> Chicken-users mailing list
>> Chicken-users@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Scraping the REPL?

2016-01-23 Thread Matt Welland
Unless you need it's ability to capture all input you might be able to get
away without using script and just use simple scripting:

matt@xena:/mfs/matt/nodemcu/esptool$ (csi -q<< EOF
(define (f x)(+ x 123))
(f 8)
EOF
 ) > example1.txt

matt@xena:/mfs/matt/nodemcu/esptool$ cat example1.txt
csi> (define (f x)(+ x 123))
csi> (f 8) 131
csi>


On Sat, Jan 23, 2016 at 3:39 PM, Matt Gushee  wrote:

> Hi, James--
>
> On Sat, Jan 23, 2016 at 10:51 AM, Hefferon, James S. 
> wrote:
>
>>
>> Thank you for the "script" suggestion.  I apologize but I don't
>> understand it.
>>
>
> ​I see the problem. I had forgotten that csi has a -script option. I meant
> something entirely different - the 'script' command, which is entirely
> independent of Chicken Scheme​, and is available on most if not all POSIX
> systems. You use it like this:
>
> $ script /path/to/transcript.file   # You are now in a subshell
> $ csi
> #;1>
> [ doing whatever in Chicken ]
> #;N> (exit)  ; exit from REPL
> $ exit # exit from subshell
>
> You will now have a complete transcript of your csi session, including all
> the prompts, everything you entered, and all the output. I mentioned that
> you will probably need to edit the result. That's because script captures
> raw keystrokes - e.g. if you type
>
>(defin foo 21)
>
> and you see you misspelled 'define', and correct it, what you get in your
> transcript will be not
>
>(define foo 21)
>
> but rather
>
>(defin foo 21)^H^H
> ^H^H
> ^H^H
> ^H^H
> e foo 21)
>
> script also, for some reason, adds a carriage return at the end of every
> line, which you may not want. There is apparently no way to change that
> behavior. But it does capture your entire session.
>
> ​Hope your project goes well.​
>
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] How to build from git? Errors on Ubuntu 15.10

2016-02-10 Thread Matt Welland
I have chicken 4.9.0.1 installed, is that recent enough for bootstrapping?
I'm interested in trying feathers and the new profiling. Are there any
plans to back port those features to the 4 series?

Here are the first few errors:

gcc -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES
-c -Os -fomit-frame-pointer  -DC_BUILDING_LIBCHICKEN library.c -o
library-static.o -I. -I./
library.c: In function ‘trf_18674’:
library.c:4876:11: warning: implicit
declaration of function ‘C_pick’
[-Wimplicit-function-declaration]
 C_word t2=C_pick(0);
   ^
library.c:4879:1: warning: implicit
declaration of function ‘C_adjust_stack’
[-Wimplicit-function-declaration]
 C_adjust_stack(-3);
 ^
library.c: At top level:
library.c:6665:25: error: unknown type name
‘C_proc7’
 static void C_fcall tr7(C_proc7 k) C_regparm C_noret;
 ^
library.c::35: error: unknown type name
‘C_proc7’
 C_regparm static void C_fcall tr7(C_proc7 k){
   ^
library.c:6678:25: error: unknown type name
‘C_proc6’
 static void C_fcall tr6(C_proc6 k) C_regparm C_noret;
 ^
library.c:6679:35: error: unknown type name
‘C_proc6’
 C_regparm static void C_fcall tr6(C_proc6 k){
   ^
library.c:6690:25: error: unknown type name
‘C_proc5’
 s
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] How to build from git? Errors on Ubuntu 15.10

2016-02-11 Thread Matt Welland
On Wed, Feb 10, 2016 at 6:11 AM, Christian Kellermann 
wrote:

> * Matt Welland  [160210 14:06]:
> > I have chicken 4.9.0.1 installed, is that recent enough for
> bootstrapping?
> > I'm interested in trying feathers and the new profiling. Are there any
> > plans to back port those features to the 4 series?
>
> Please use the latest development snapshot for bootstrapping, that
> should work.
>

I built the 4.10.1 dev snapshot and then ran make, following the directions
in README but still no go on building chicken-5 branch. Should I try
building older commits of chicken-5?

> LD_LIBRARY_PATH=/mfs/pkgs/zeus/chicken/build/chicken-4.10.1 make
PLATFORM=linux CHICKEN=/mfs/pkgs/zeus/chicken/build/chicken-4.10.1/chicken
PREFIX=/mfs/pkgs/zeus/chicken/5.0-git
/mfs/pkgs/zeus/chicken/build/chicken-4.10.1/chicken  library.scm
-optimize-level 2 -include-path . -include-path ./ -inline
-ignore-repository -feature chicken-bootstrap -no-warnings -specialize
-types ./types.db   -explicit-use -no-trace -output-file library.c

Error: [internal compiler error] load-type-database: invalid procedure-type
property
foldable:
(#(procedure pure: foldable:) not (*) boolean)

Call history:

  (##core#let ((loop (##core#undefined))) (##core#set! loop
(##core#loop-lambda (len input) (cond ((> len...
  (##core#undefined)
  (##core#begin (##core#set! loop (##core#loop-lambda (len
input) (cond ((> len temp) (loop (- len 1) ...
  (##core#set! loop (##core#loop-lambda (len input) (cond
((> len temp) (loop (- len 1) (cdr input))) ...
  (##core#loop-lambda (len input) (cond ((> len temp) (loop
(- len 1) (cdr input))) (else input)))
  (##core#begin (##core#if (> len temp) (##core#begin (loop
(- len 1) (cdr input))) (##core#begin inpu..
  (##core#if (> len temp) (##core#begin (loop (- len 1)
(cdr input))) (##core#begin input))
  (> len temp)
  (##core#begin (loop (- len 1) (cdr input)))
  (loop (- len 1) (cdr input))
  (- len 1)
  (cdr input)
  (##core#begin input)
  (##core#let () loop)
  (##core#begin loop)
  (length input)<--



>
> Cheers,
>
> Christian
>
> --
> May you be peaceful, may you live in safety, may you be free from
> suffering, and may you live with ease.
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] How to build from git? Errors on Ubuntu 15.10

2016-02-11 Thread Matt Welland
Yay! I was able to build a past version of chicken-core and see feathers
for the first time. I documented it here:

http://www.kiatoa.com/cgi-bin/fossils/chicken-core/wiki?name=Feathers



On Thu, Feb 11, 2016 at 8:54 PM, Matt Welland 
wrote:

> On Wed, Feb 10, 2016 at 6:11 AM, Christian Kellermann  > wrote:
>
>> * Matt Welland  [160210 14:06]:
>> > I have chicken 4.9.0.1 installed, is that recent enough for
>> bootstrapping?
>> > I'm interested in trying feathers and the new profiling. Are there any
>> > plans to back port those features to the 4 series?
>>
>> Please use the latest development snapshot for bootstrapping, that
>> should work.
>>
>
> I built the 4.10.1 dev snapshot and then ran make, following the
> directions in README but still no go on building chicken-5 branch. Should I
> try building older commits of chicken-5?
>
> > LD_LIBRARY_PATH=/mfs/pkgs/zeus/chicken/build/chicken-4.10.1 make
> PLATFORM=linux CHICKEN=/mfs/pkgs/zeus/chicken/build/chicken-4.10.1/chicken
> PREFIX=/mfs/pkgs/zeus/chicken/5.0-git
> /mfs/pkgs/zeus/chicken/build/chicken-4.10.1/chicken  library.scm
> -optimize-level 2 -include-path . -include-path ./ -inline
> -ignore-repository -feature chicken-bootstrap -no-warnings -specialize
> -types ./types.db   -explicit-use -no-trace -output-file library.c
>
> Error: [internal compiler error] load-type-database: invalid
> procedure-type property
> foldable:
> (#(procedure pure: foldable:) not (*) boolean)
>
> Call history:
>
>   (##core#let ((loop (##core#undefined))) (##core#set!
> loop (##core#loop-lambda (len input) (cond ((> len...
>   (##core#undefined)
>   (##core#begin (##core#set! loop (##core#loop-lambda (len
> input) (cond ((> len temp) (loop (- len 1) ...
>   (##core#set! loop (##core#loop-lambda (len input) (cond
> ((> len temp) (loop (- len 1) (cdr input))) ...
>   (##core#loop-lambda (len input) (cond ((> len temp)
> (loop (- len 1) (cdr input))) (else input)))
>   (##core#begin (##core#if (> len temp) (##core#begin
> (loop (- len 1) (cdr input))) (##core#begin inpu..
>   (##core#if (> len temp) (##core#begin (loop (- len 1)
> (cdr input))) (##core#begin input))
>   (> len temp)
>   (##core#begin (loop (- len 1) (cdr input)))
>   (loop (- len 1) (cdr input))
>   (- len 1)
>   (cdr input)
>   (##core#begin input)
>   (##core#let () loop)
>   (##core#begin loop)
>   (length input)<--
>
>
>
>>
>> Cheers,
>>
>> Christian
>>
>> --
>> May you be peaceful, may you live in safety, may you be free from
>> suffering, and may you live with ease.
>>
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Job for someone with Scheme knowledge.

2016-02-25 Thread Matt Welland
I've got an opening for an engineering or computer science grad. We are
using Chicken scheme heavily in my group so I'm posting to chicken-users.
It would be great to find someone who has a passion for Scheme.

BS+experienced or MS in computer or electrical engineering. Industry
experience in electronics design automation and CAD tools such as DRC, LVS,
spice simulation etc, desirable but not required.

Location is US; AZ (preferred), CA or OR.

Please contact me (off list!) if interested.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Add support for sudo alternatives

2016-03-25 Thread Matt Welland
On Fri, Mar 25, 2016 at 7:11 AM, Timo Myyrä 
wrote:

> Hi,
>
> Here is an simple patch to add support for alternative commands than sudo.
> OpenBSD doesn't have sudo in base install so this allows chicken-install
> to work
> with OpenBSD doas (and others like it).
> The idea is that if user provides SUDO=/usr/bin/doas in env, then
> chicken-install will run that command when using `-s' flag.
>

Thanks for this. Where faceless shared adminstration accounts are used this
will be very helpful. From looking at the change setting SUDO to a command
that includes spaces should work fine so something like:

SUDO='sudo -u faceless' chicken-install -s someegg

should work to build as current user and install as user faceless on Linux.
Nice.


>
> Timo
>
>
> diff --git a/chicken-install.1 b/chicken-install.1
> index 065f987..359e540 100644
> --- a/chicken-install.1
> +++ b/chicken-install.1
> @@ -45,6 +45,10 @@ path selected during configuration (usually
>  .B $prefix/lib/chicken/
>  )
>
> +.TP
> +.B SUDO
> +The command to execute when using \-s flag in command. If not provided,
> defaults to the sudo(1).
> +
>  .SH DOCUMENTATION
>
>  More information can be found in the
> diff --git a/chicken-install.scm b/chicken-install.scm
> index 7420160..610097d 100644
> --- a/chicken-install.scm
> +++ b/chicken-install.scm
> @@ -805,7 +805,7 @@ usage: chicken-install [OPTION | EXTENSION[:VERSION]]
> ...
>-l   -location LOCATION   install from given location instead of
> default
>-t   -transport TRANSPORT use given transport instead of default
> -proxy HOST[:PORT]   download via HTTP proxy
> -  -s   -sudouse sudo(1) for filesystem operations
> +  -s   -sudouse external command to elevate
> privileges for filesystem operations
>-r   -retrieveonly retrieve egg into current directory,
> don't install
>-n   -no-install  do not install, just build (implies
> `-keep')
>-p   -prefix PREFIX   change installation prefix to PREFIX
> @@ -829,7 +829,7 @@ usage: chicken-install [OPTION | EXTENSION[:VERSION]]
> ...
> -show-dependsdisplay a list of egg dependencies for
> the given egg(s)
> -show-foreign-dependsdisplay a list of foreign dependencies
> for the given egg(s)
>
> -chicken-install recognizes the http_proxy, and proxy_auth environment
> variables, if set.
> +chicken-install recognizes the SUDO, http_proxy and proxy_auth
> environment variables, if set.
>
>  EOF
>  );|
> diff --git a/chicken-uninstall.1 b/chicken-uninstall.1
> index 8767cc6..90b6f46 100644
> --- a/chicken-uninstall.1
> +++ b/chicken-uninstall.1
> @@ -44,6 +44,9 @@ path selected during configuration (usually
>  .B $prefix/lib/chicken/
>  )
>
> +.TP
> +.B SUDO
> +The command to execute when using \-s flag in command. If not provided,
> defaults to the sudo(1).
>
>  .SH DOCUMENTATION
>
> diff --git a/chicken-uninstall.scm b/chicken-uninstall.scm
> index 04250ed..488cc8a 100644
> --- a/chicken-uninstall.scm
> +++ b/chicken-uninstall.scm
> @@ -109,7 +109,7 @@ usage: chicken-uninstall [OPTION | PATTERN] ...
> -version show version and exit
> -force   don't ask, delete whatever matches
> -exact   treat PATTERN as exact match (not a
> pattern)
> -  -s   -sudouse sudo(1) for deleting files
> +  -s   -sudouse external command to elevate
> privileges for deleting files
>-p   -prefix PREFIX   change installation prefix to PREFIX
> -deploy  prefix is a deployment directory
> -hostwhen cross-compiling, uninstall host
> extensions only
> diff --git a/setup-api.scm b/setup-api.scm
> index d675f0f..402e11b 100644
> --- a/setup-api.scm
> +++ b/setup-api.scm
> @@ -155,12 +155,15 @@
>(print "Warning: cannot install as superuser with Windows") )
>
>  (define (unix-sudo-install-setup)
> -  (set! *copy-command*"sudo cp -r")
> -  (set! *remove-command*  "sudo rm -fr")
> -  (set! *move-command*"sudo mv")
> -  (set! *chmod-command*   "sudo chmod")
> -  (set! *ranlib-command*  "sudo ranlib")
> -  (set! *mkdir-command*   "sudo mkdir") )
> +
> +(define (unix-sudo-install-setup)
> +  (let ((sudo-cmd (or (get-environment-variable "SUDO") "sudo")))
> +(set! *copy-command* (sprintf "~a cp -r" sudo-cmd))
> +(set! *remove-command* (sprintf "~a rm -rf" sudo-cmd))
> +(set! *move-command* (sprintf "~a mv" sudo-cmd))
> +(set! *chmod-command* (sprintf "~a chmod" sudo-cmd))
> +(set! *ranlib-command* (sprintf "~a ranlib" sudo-cmd))
> +(set! *mkdir-command* (sprintf "~a mkdir" sudo-cmd
>
>  (define (user-install-setup)
>(set! *sudo* #f)
> @@ -608,7 +611,8 @@
>  (error 'remove-directory "cannot remove - directory not
> found" dir)
>  #f))
> (*sudo*
> -(ignore-errors ($system (sprintf "s

[Chicken-users] Missing functions in Chicken IUP?

2016-04-20 Thread Matt Welland
We are trying to create a popup menu for a matrix in IUP and the
documentation mentions IupPopup and IupShowXY but I don't see associated
functions under IUP. Am I missing something?

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


[Chicken-users] Is there a replacement for expand-home-path in 4.11rc2?

2016-05-14 Thread Matt Welland
I used resolve-pathname from posix-extras and expand-home-path is no longer
available. Is this intended to be fixed? If it is not to be fixed what is
the suggested way to expand a path, use readlink -f?

Warning (#): in thread: unbound variable:
##sys#expand-home-path

Call history:

db.scm:113: ##sys#call-with-values
db.scm:2632: conc
db.scm:2627: sqlite3#for-each-row
db.scm:119: db:done-with
db.scm:95: sqlite3#database?
db.scm:97: mutex-lock!
db.scm:100: current-milliseconds
db.scm:102: mutex-unlock!
db.scm:113: k750
db.scm:113: g754
api.scm:107: k10
api.scm:107: g14
rmt.scm:240: current-milliseconds
launch.scm:947: hash-table-set!
launch.scm:950: file-exists?
launch.scm:951: posix-extras#resolve-pathname
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [ANN] CHICKEN 4.11.0 release candidate 2 available

2016-05-14 Thread Matt Welland
Operating system: Ubuntu 14.04
Hardware platform: x86-64
C Compiler: GCC 4.8.4
Installation works?: yes
Tests work?: Did not run tests
Installation of eggs works?: yes

The testsuite for my pet project, Megatest, passes with Chicken 4.11rc2. I
did see the IUP based dashboard die with an assertion but I lost the
message and it has been running fine after a clean recompile without
-debug-info. I did compile with -debug-info and used feathers to step
through some code successfully. It is possible that I had a mix of .o
files, some with -debug-info and some without and possibly that caused the
assertion (just speculating).

The following eggs are referenced in the source. Quite a few, but not all,
are exercised in the testsuite:

apropos
base64
call-with-environment-variables
canvas-draw
csv
csv-xml
defstruct
directory-utils
dot-locking
fmt
format
hostinfo
http-client
intarweb
iup
json
md5
message-digest
nanomsg
numbers
pathname-expand
posix
posix-extras
postgresql
readline
regex
regex-case
rpc
s11n
sparse-vectors
spiffy
spiffy-directory-listing
spiffy-request-vars
sql-de-lite
sqlite3
srfi-1
srfi-13
srfi-18
srfi-19
srfi-69
ssax
sxml-modifications
sxml-serializer
tcp
test
trace
uri-common
z3
zmq

All in all, I'm ready to switch to 4.11. Thanks and kudos to the Chicken
team.

The eggs I installed (using this Makefile
http://www.kiatoa.com/cgi-bin/fossils/megatest/raw/utils/Makefile.installall?name=981091d91cd74d3815d832187d4e08172849d70c
):

matchable readline apropos base64 regex-literals format regex-case
test coops trace csv \
 dot-locking posix-utils posix-extras directory-utils hostinfo
tcp-server rpc csv-xml fmt \
 json md5 awful http-client spiffy uri-common intarweb
spiffy-request-vars pathname-expand \
 spiffy-directory-listing ssax sxml-serializer sxml-modifications
sql-de-lite \
 srfi-19 refdb ini-file sparse-vectors z3
call-with-environment-variables hahn linenoise \
 crypt parley

+ iup canvas-draw logpro

Matt
-=-

On Thu, Apr 28, 2016 at 11:39 AM, Peter Bex  wrote:

> Hello all,
>
> The second release candidate for CHICKEN 4.11.0 is now available for
> download:
> http://code.call-cc.org/dev-snapshots/2016/04/28/chicken-4.11.0rc2.tar.gz
>
> This tarball has the following SHA-2 checksum:
> 7f88df077b24b756e2cd5e51dc71e9a4004d2ffb4c8560cdb9887b5a37490521
>
> The list of changes since 4.10.0 is available here:
> http://code.call-cc.org/dev-snapshots/2016/04/28/NEWS
>
> The changes since the previous release candidate (rc1) are as follows:
> - On 32-bit systems, the debugger client used incorrect printf format
>strings, resulting in invalid data used for the protocol.  This made
>debugging of programs running on 32-bit systems impossible (#1279).
> - Under Mac OS X, "make check" failed in a non-installed CHICKEN due to
>the new "System Integrity Protection" breaking DYLD_LIBRARY_PATH in
>all processes that are invoked through /bin/sh (#1277).
>Thanks to J Irving for reporting this, and Jim Ursetto for creating
>and testing the fix.
> - On 64-bit architectures where "char" defaults to unsigned (e.g. ARM64),
>negative signed fixnum literals embedded inside other literals would
>be decoded incorrectly (#1280).  Thanks to Alex Shendi for reporting
>this and testing the fix.
> - When initializing a new egg repository, if the destination directory
>does not exist, chicken-install would write all files to the target
>as if it were a file.  Thanks to "LemonBoy" for reporting this and
>creating a fix.
> - Stack checks inserted by the compiler would incorrectly trigger stack
>overflow errors after receiving a signal (#1283).  Thanks to
>"LemonBoy" for helping to track down this error.
>
> These last-minute changes are very important for the stability of the
> system, so we are very happy they made it in.  However, due to the impact
> of especially the latter, we would ask you all to help us test the new
> release candidate as thoroughly as the first one.
>
> As usual, an easy way to test this RC is as follows:
>
> $ make PLATFORM= PREFIX= install check
> $ /bin/chicken-install pastiche
>
> If you want to build CHICKEN with a compiler other than the default one,
> just use C_COMPILER= (e.g., C_COMPILER=clang) on the make
> invocation.
>
> Of course, feel free to explore other supported build options (see the
> README file for more information) and actually use CHICKEN 4.11.0rc2 for
> your software.
>
> If you can, please let us know the following information about the
> environment you tested the RC tarball on:
>
> Operating system: (e.g., FreeBSD 10.1, Debian 8, Windows 7 mingw-msys)
> Hardware platform: (e.g., x86, x86-64, PPC)
> C Compiler: (e.g., GCC 4.9.2, clang 3.6)
> Installation works?: yes or no
> Tests work?: yes or no
> Installation of eggs works?: yes or no
>
> Thanks in advance!
>
> The CHICKEN Team
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.non

[Chicken-users] How to debug stack limit problem?

2016-06-21 Thread Matt Welland
Using:

Version 4.11.0rc2 ((detached from 4.11.0rc2)) (rev e910197)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2016-04-28
on waldrop (Linux)

I am seeing:

 dboard: runtime.c:2797: C_save_and_reclaim: Assertion `av >
C_temporary_stack_bottom || av < C_temporary_stack_limit' failed.

I'll test with an older install of chicken tomorrow. In the mean time, can
anyone suggest how I would go about debugging this issue?
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Asynchronous I/O Egg Release

2016-07-01 Thread Matt Welland
On Fri, Jul 1, 2016 at 3:11 AM, Andy Bennett  wrote:

> Hi,
>
> > And of course, reads of files on the file
> > system never block at all
>
> A read from a file can block when the operating system needs to go to
> disk for the data. This happens when the buffer empties and it cannot be
> refilled before the next read call.
>

I don't know if it applies to this discussion but read blocking can be
quite a pain when a network fileserver such as NFS goes offline. It would
be nice if other threads would continue so that the program could detect
the issue and potentially take appropriate action such as let the user know
*why* the program is hung.


>
>
>
>
>
> Regards,
> @ndy
>
> --
> andy...@ashurst.eu.org
> http://www.ashurst.eu.org/
> 0290 DA75 E982 7D99 A51F  E46A 387A 7695 7EBA 75FF
>
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Second request for tweak to trace egg - attn: Felix?

2016-07-02 Thread Matt Welland
With current trace:

[0] (my-length #)
[0] my-length -> (escaping)

With patch applied trace gives:

[0] (my-length #)", Called from: ""#(dashboard.scm:1099:
my-length #f #f)"
[0] my-length -> (escaping)

I then know exactly where my bug lies.

The patch:

diff -Naur trace/trace.scm trace-tweaked/trace.scm
--- trace/trace.scm2016-07-02 16:35:15.626457742 -0700
+++ trace-tweaked/trace.scm2016-07-02 16:34:25.690456156 -0700
@@ -61,6 +61,8 @@
 (trace-indent)
 (set! *trace-indent-level* (fx+ 1 *trace-indent-level*))
 (write (cons name args) port)
+(write ", Called from: " port)
+(write (conc (car (reverse (get-call-chain)
 (write-char #\newline port)
 (flush-output port) ) )

Alternatively I suppose I could create a new egg but that seems overkill.
It has become tiresome to maintain the patch myself.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing chicken on windows

2016-07-08 Thread Matt Welland
I'd love to bring the chicken-iup installer up to date but I don't have the
time to do it on my own. If anyone has the bandwidth and interest to help
please let me know. I think the installer is far and above the easiest way
to get going on Windows.

On Thu, Jul 7, 2016 at 11:06 PM, Oleg Kolosov  wrote:

>
> > On 08 Jul 2016, at 00:48, C K Kashyap  wrote:
> >
> > Hi all,
> >
> > I am very new to Chicken. I've been able to get started with it on my
> mac using homebrew. I am not sure about how to get started on windows
> though.
> >
> > What's a good way to install chicken on windows? The binary installer
> links shown on the web page seems dated.
> >
> > Can I build chicken using VC?
> >
> > Is this the right place to download mingw64 -
> http://mingw-w64.org/doku.php/start
> > I could not find a download link.
> >
> > I'd appreciate your help very much.
> >
> > Regards,
> > Kashyap
> >
> > ___
> > Chicken-users mailing list
> > Chicken-users@nongnu.org
> > https://lists.nongnu.org/mailman/listinfo/chicken-users
>
> Hi!
>
> The simplest way is to install pre-packaged CHICKEN, see
> https://wiki.call-cc.org/platforms#microsoft-windows-
>
> I guess the available binary packages are dated because in 4.10 CHICKEN
> changed ABI and build requires bootstrapping which is a pain and nobody
> bothered because Windows is not popular here.
>
> No, you can't build it using VC either. A build system requires GNU make
> and code has some GCC'isms and UNIX'isms. Core can be fixed with a few
> relatively trivial patches but supporting utilities (chicken-install and
> friends) can not, so you wont be able to install eggs. I had the patches in
> my CMake based CHICKEN fork but abandoned it due to lack of public interest.
>
> --
> Regards, Oleg
>
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing chicken on windows

2016-07-08 Thread Matt Welland
On Fri, Jul 8, 2016 at 10:26 AM, C K Kashyap  wrote:

> Hi Matt,
> I can volunteer some cycles - I really would like to be able to use
> chicken on windows.
> Regards,
> Kashyap
>

Thanks Kashyap! I'll contact you off-list. If you wish you can start by
browsing the info and scripts/Makefile etc. at
https://www.kiatoa.com/fossils/chicken-iup



>
> On Fri, Jul 8, 2016 at 9:16 AM, Matt Welland 
> wrote:
>
>> I'd love to bring the chicken-iup installer up to date but I don't have
>> the time to do it on my own. If anyone has the bandwidth and interest to
>> help please let me know. I think the installer is far and above the easiest
>> way to get going on Windows.
>>
>> On Thu, Jul 7, 2016 at 11:06 PM, Oleg Kolosov  wrote:
>>
>>>
>>> > On 08 Jul 2016, at 00:48, C K Kashyap  wrote:
>>> >
>>> > Hi all,
>>> >
>>> > I am very new to Chicken. I've been able to get started with it on my
>>> mac using homebrew. I am not sure about how to get started on windows
>>> though.
>>> >
>>> > What's a good way to install chicken on windows? The binary installer
>>> links shown on the web page seems dated.
>>> >
>>> > Can I build chicken using VC?
>>> >
>>> > Is this the right place to download mingw64 -
>>> http://mingw-w64.org/doku.php/start
>>> > I could not find a download link.
>>> >
>>> > I'd appreciate your help very much.
>>> >
>>> > Regards,
>>> > Kashyap
>>> >
>>> > ___
>>> > Chicken-users mailing list
>>> > Chicken-users@nongnu.org
>>> > https://lists.nongnu.org/mailman/listinfo/chicken-users
>>>
>>> Hi!
>>>
>>> The simplest way is to install pre-packaged CHICKEN, see
>>> https://wiki.call-cc.org/platforms#microsoft-windows-
>>>
>>> I guess the available binary packages are dated because in 4.10 CHICKEN
>>> changed ABI and build requires bootstrapping which is a pain and nobody
>>> bothered because Windows is not popular here.
>>>
>>> No, you can't build it using VC either. A build system requires GNU make
>>> and code has some GCC'isms and UNIX'isms. Core can be fixed with a few
>>> relatively trivial patches but supporting utilities (chicken-install and
>>> friends) can not, so you wont be able to install eggs. I had the patches in
>>> my CMake based CHICKEN fork but abandoned it due to lack of public interest.
>>>
>>> --
>>> Regards, Oleg
>>>
>>>
>>> ___
>>> Chicken-users mailing list
>>> Chicken-users@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/chicken-users
>>>
>>
>>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Installing chicken on windows

2016-07-08 Thread Matt Welland
On Fri, Jul 8, 2016 at 9:52 AM, John Cowan  wrote:

> Dan Leslie scripsit:
>
> > It reads to me like Chicken needs an automated builder for the Windows
> > package.
>
> It's not very clear how beneficial this is, since in order to use the
> compiler, you'll need gcc and gmake anyway.  (If you just want a Scheme
> interpreter, there are probably better choices than Chicken, though it
> does have some nice eggs.)
>

To use the chicken-iup installer you first install mingw. Two straight
forward, easy installs; mingw and chicken-iup, give you:

 - chicken-scheme with a bunch of pre-installed eggs including the IUP gui,
sql-de-lite and so forth.
 - start csi from an icon
 - ability to compile to executable.

For someone interested in learning Chicken or in creating cross platform
applications using scheme I think chicken-iup or a similar installer is a
godsend. It is not all that easy to install chicken and IUP is a real pain
to install. IUP is the only comprehensive, modern looking, seamless,
cross-platform gui toolkit for chicken that I know of. In my opinion
providing a super-low barrier to entry installer for chicken scheme makes
it far more attractive to folks wanting to explore and try it. Most of the
developers and users seem to be super-gurus who think nothing of the
hacking it takes to get an install going. For us regular folk however this
barrier can be a show stopper. I guess if the sentiment is that beginners
are a pain for the community then you could make a solid argument for NOT
making it too easy to install chicken :)

Oh, as an aside, it would be fantastic to have IUP be just as easy to
install on Linux/Unix. Sadly this is not the case. I have not surveyed the
GUI toolkit world recently. Is there a better alternative available for
Chicken now?



>
> --
> John Cowan  http://www.ccil.org/~cowanco...@ccil.org
> Thor Heyerdahl recounts his attempt to prove Rudyard Kipling's theory
> that the mongoose first came to India on a raft from Polynesia.
> --blurb for Rikki-Kon-Tiki-Tavi
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] canvas-draw and colors

2016-07-16 Thread Matt Welland
I have the feeling I've already asked this but cannot find the email
thread.

For canvas-draw colors are longints. There are convenience functions
provided by canvas-draw according to the docs at
http://webserver2.tecgraf.puc-rio.br/cd/ but they seem not to be accessible
from the egg.

This snippet seems to work:

(define (vg:rgb->number r g b #!key (a 0)) (u32vector-ref (blob->u32vector
(u8vector->blob (list->u8vector (list a r g b 0))

But it feels rather clumsy and non-trivial for a beginner. Is there a
better or at least simpler way?

Thanks.

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


Re: [Chicken-users] canvas-draw and colors

2016-07-16 Thread Matt Welland
On Sat, Jul 16, 2016 at 1:04 PM, Thomas Chust  wrote:

> On 2016-07-16 21:31, Matt Welland wrote:
> > [...]
> > (define (vg:rgb->number r g b #!key (a 0)) (u32vector-ref
> > (blob->u32vector (u8vector->blob (list->u8vector (list a r g b 0))
> > [...]
>
> Hello,
>
> this snippet seems somewhat sub-optimal to say the least. Apart from
> being needlessly complicated, it may also be wrong because its result
> depends on the endianness of the host platform.
>
> I would suggest to simply use bitwise arithmetic:
>
>   (bitwise-ior
> (arithmetic-shift a 24)
> (arithmetic-shift r 16)
> (arithmetic-shift g 8)
> b)
>

Nice. Blindingly obvious now that it has been pointed out. Interestingly
enough it also appears to be 4x faster.

Thanks!


> Or perhaps just normal arithmetic replacing bitwise-ior by + and
> arithmetic-shift by (lambda (x n) (* x (expt 2 n))). This is probably no
> less efficient, as the result is going to be a bignum anyway.
>
> Ciao,
> Thomas
>
>
> --
> When C++ is your hammer, every problem looks like your thumb.
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] I'm looking for suggestions regarding vectors vs. records vs. coops (again).

2016-07-24 Thread Matt Welland
For years now I've been using inlined vectors instead of records or coops
for data structures due to performance concerns. Recently I was training
someone on how to maintain my code and I felt quite lame explaining the
vector records. So I started switching to defstruct records. However I've
started to hit some performance issues and one factor seems to be the
records (more work to do to confirm this).

Below is a simplistic benchmark comparing using inlined vectors, inlined
vectors with a type check, defstruct and coops. Where performance matters
using vectors or type checked vectors seems to help. The benchmark seems
enough to hint to me to switch back to vectors - especially in cases where
I'm slinging around 10's of thousands of records.

My question: can anyone offer insight into a better way to balance
performance with elegance/flexibility of records?

BTW: Yes, I'm sure there are plenty of other aspects to my code that need
optimization but the thrust of my question is on records.

the results
matt@xena:/mfs/matt/data/megatest$ csc -O2 records-vs-vectors-vs-coops.scm
&& ./records-vs-vectors-vs-coops

Using vectors
1.484s CPU time, 33162750/0 mutations (total/tracked), 3/6608 GCs
(major/minor)

Using vectors (safe mode)
2.456s CPU time, 0.012s GC time (major), 49744125/0 mutations
(total/tracked), 18/22291 GCs (major/minor)

Using defstruct
6.636s CPU time, 0.016s GC time (major), 33162750/0 mutations
(total/tracked), 54/60476 GCs (major/minor)

Using coops
24.1s CPU time, 1.16s GC time (major), 33162760/2 mutations
(total/tracked), 1550/272935 GCs (major/minor)


the code
(use foof-loop defstruct coops)

(defstruct obj type pts fill-color text line-color call-back angle font
attrib extents proc)

;; Generated using make-vector-record vgs obj type pts fill-color text
line-color call-back angle font attrib extents proc
(define (make-vg:obj)(make-vector 10))
(define-inline (vg:obj-get-type vec)(vector-ref  vec 0))
(define-inline (vg:obj-get-pts  vec)(vector-ref  vec 1))
(define-inline (vg:obj-get-fill-color   vec)(vector-ref  vec 2))
(define-inline (vg:obj-get-text vec)(vector-ref  vec 3))
(define-inline (vg:obj-get-line-color   vec)(vector-ref  vec 4))
(define-inline (vg:obj-get-call-backvec)(vector-ref  vec 5))
(define-inline (vg:obj-get-anglevec)(vector-ref  vec 6))
(define-inline (vg:obj-get-font vec)(vector-ref  vec 7))
(define-inline (vg:obj-get-attrib   vec)(vector-ref  vec 8))
(define-inline (vg:obj-get-extents  vec)(vector-ref  vec 9))
(define-inline (vg:obj-get-proc vec)(vector-ref  vec 10))
(define-inline (vg:obj-set-type!vec val)(vector-set! vec 0 val))
(define-inline (vg:obj-set-pts! vec val)(vector-set! vec 1 val))
(define-inline (vg:obj-set-fill-color!  vec val)(vector-set! vec 2 val))
(define-inline (vg:obj-set-text!vec val)(vector-set! vec 3 val))
(define-inline (vg:obj-set-line-color!  vec val)(vector-set! vec 4 val))
(define-inline (vg:obj-set-call-back!   vec val)(vector-set! vec 5 val))
(define-inline (vg:obj-set-angle!   vec val)(vector-set! vec 6 val))
(define-inline (vg:obj-set-font!vec val)(vector-set! vec 7 val))
(define-inline (vg:obj-set-attrib!  vec val)(vector-set! vec 8 val))
(define-inline (vg:obj-set-extents! vec val)(vector-set! vec 9 val))
(define-inline (vg:obj-set-proc!vec val)(vector-set! vec 10 val))

(use simple-exceptions)
(define vgs:obj-exn (make-exception "wrong record type, expected vgs:obj."
'assert))
(define (make-vgs:obj)(let ((v (make-vector 12)))(vector-set! v 0 'vgs:obj)
v))
(define-inline (vgs:obj-type vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 1)(raise (vgs:obj-exn 'vgs:obj-type 'xpr
(define-inline (vgs:obj-pts  vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 2)(raise (vgs:obj-exn 'vgs:obj-pts 'xpr
(define-inline (vgs:obj-fill-color   vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 3)(raise (vgs:obj-exn 'vgs:obj-fill-color 'xpr
(define-inline (vgs:obj-text vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 4)(raise (vgs:obj-exn 'vgs:obj-text 'xpr
(define-inline (vgs:obj-line-color   vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 5)(raise (vgs:obj-exn 'vgs:obj-line-color 'xpr
(define-inline (vgs:obj-call-backvec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 6)(raise (vgs:obj-exn 'vgs:obj-call-back 'xpr
(define-inline (vgs:obj-anglevec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 7)(raise (vgs:obj-exn 'vgs:obj-angle 'xpr
(define-inline (vgs:obj-font vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 8)(raise (vgs:obj-exn 'vgs:obj-font 'xpr
(define-inline (vgs:obj-attrib   vec)(if (eq? (vector-ref vec 0)
'vgs:obj)(vector-ref  vec 9)(raise (vgs:

Re: [Chicken-users] I'm looking for suggestions regarding vectors vs. records vs. coops (again).

2016-07-27 Thread Matt Welland
Top posting just to say thanks to Peter, typed-records are a huge benefit
for me. I much appreciate the detailed response.

On Mon, Jul 25, 2016 at 11:49 PM, Peter Bex  wrote:

> On Sun, Jul 24, 2016 at 11:06:32AM -0700, Matt Welland wrote:
> > For years now I've been using inlined vectors instead of records or coops
> > for data structures due to performance concerns. Recently I was training
> > someone on how to maintain my code and I felt quite lame explaining the
> > vector records. So I started switching to defstruct records. However I've
> > started to hit some performance issues and one factor seems to be the
> > records (more work to do to confirm this).
> >
> > Below is a simplistic benchmark comparing using inlined vectors, inlined
> > vectors with a type check, defstruct and coops. Where performance matters
> > using vectors or type checked vectors seems to help. The benchmark seems
> > enough to hint to me to switch back to vectors - especially in cases
> where
> > I'm slinging around 10's of thousands of records.
>
> Hello Matt,
>
> The reason for this is pretty simple: record types do not have inlineable
> accessors.  This means that accessors (and constructors) will require
> that they are invoked in full CPS context.  If you have a procedure which
> calls such an accessor, it will always be split up into at least 2 C
> functions.
>
> This is because records have an API defined by the procedures which are
> created by the define-record(-type)/defstruct macros; the objects
> themselves do not contain enough information to have a generic accessor,
> and when you're calling an accessor, the compiler doesn't know that it's
> a record accessor.  Vectors, on the other hand, have a common interface:
> they can be referenced by one and the same accessor: vector-ref.
> This is inlineable in C, as C_i_vector_ref().  In the next version of
> CHICKEN, we'll even be able to rewrite those directly to C_slot() if
> the vector is of a known length and the index is within bounds.
>
> > My question: can anyone offer insight into a better way to balance
> > performance with elegance/flexibility of records?
>
> Luckily, there's a simple solution.  Felix wrote a wonderful little egg
> called "typed-records", which provides drop-in replacements for
> define-record(-type) *and* defstruct which will emit specialisations
> for records.
>
> That is, if an object is known to be a record of the given type, the
> accessor is rewritten to (##sys#slot  ).
>
> For instance, with (defstruct foo bar qux), (foo-qux x) is rewritten
> to (##sys#slot x 2) if x is known to be of type (struct foo).
> The only disadvantage of this is that if you change your definition
> of a record, you'll need to recompile all the units that access these
> records, because they've been inlined as numbered slot references.
>
> Changing the sample code in your e-mail by simply replacing "defstruct"
> in your "use" line with "typed-records" results in noticeable
> performance improvement:
>
> Using vectors
> 1.148s CPU time, 33162750 mutations, 0/2309 GCs (major/minor)
> Using vectors (safe mode)
> 2.308s CPU time, 0.02s GC time (major), 49744125 mutations, 15/20266 GCs
> (major/minor)
> Using defstruct
> 1.66s CPU time, 33162750 mutations, 5/11665 GCs (major/minor)
> Using coops
> 20.608s CPU time, 0.628s GC time (major), 33162760 mutations, 960/231731
> GCs (major/minor)
>
> Before making that one-word replacement, it was:
>
> Using vectors
> 1.112s CPU time, 33162750 mutations, 0/2309 GCs (major/minor)
> Using vectors (safe mode)
> 2.34s CPU time, 0.02s GC time (major), 49744125 mutations, 15/20266 GCs
> (major/minor)
> Using defstruct
> 4.224s CPU time, 0.012s GC time (major), 33162750 mutations, 36/40736 GCs
> (major/minor)
> Using coops
> 20.572s CPU time, 0.608s GC time (major), 33162760 mutations, 938/231753
> GCs (major/minor)
>
> Not too bad, especially considering that typed-records is _safe_: it
> will only perform the rewrites when the compiler can prove that the given
> object is of the required type.
>
> If it cannot, you can always add a check to your code like this:
> (if (not (my-type? x)) (error "wrong type") (begin ...))
> The use of a predicate will tell the compiler that in the else branch,
> x can only be of the required type.
>
> If you're using separate compilation, you need to remember to ask the
> compiler to emit the type declarations to a file, and use that file while
> compiling the users of the API.
>
> Cheers,
> Peter
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] [ANN] dbi, database abstraction egg, now available.

2016-07-31 Thread Matt Welland
A database abstraction layer to provide a common interface across multiple
databases.

NOTE: The intention with dbi is a gasket that allows for switching backends
easily while in development, with the expectation that eventually you would
factor out dbi for the native db interface. You will get better performance
and security using the native eggs!

Supports: sqlite3, postgresql and (partially) mysql.

Chicken wiki page: http://wiki.call-cc.org/eggref/4/dbi
Fossil repository: https://www.kiatoa.com/fossils/dbi

Thanks go to Peter Bex for his help in making this happen.
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Curious about limitations of fuse egg, can't open a fossil on the hashfs example fuse fs.

2016-09-19 Thread Matt Welland
I recently upgraded my moosefs install and now have issues compiling my
Chicken based project "Megatest" on moosefs. I've asked for help on the
moosefs email list but this got me thinking, what could my compilation of
Megatest possibly be doing that pushes the filesystem? So I thought I'd try
on some other fuse based filesystems and what better than try the fuse
chicken egg. Amazingly it *almost* works!

Results so far (using hashfs.scm from the fuse egg examples directory):

1. Can't open a fossil on hashfs:

matt@mars:~/data/testhashfs/delme$ fossil open ~/fossils/megatest.fossil
SQLITE_NOTADB: statement aborts at 5: [ATTACH DATABASE
'/home/matt/data/testhashfs/delme/.fslckout' AS 'localdb'] file is
encrypted or is not a database
fossil: file is encrypted or is not a database: {ATTACH DATABASE
'/home/matt/data/testhashfs/delme/.fslckout' AS 'localdb'}

2. On hashfs Megatest compile gets through making the .o files but fails to
link with an error:

matt@mars:~/data/testhashfs/megatest$ make
csc  common.o items.o launch.o ods.o runconfig.o server.o configf.o db.o
keys.o margs.o megatest-version.o process.o runs.o tasks.o tests.o
genexample.o http-transport.o nmsg-transport.o filedb.o client.o synchash.o
daemon.o mt.o ezsteps.o lock-queue.o sdb.o rmt.o api.o tdb.o
rpc-transport.o portlogger.o archive.o env.o megatest.o -o mtest
/usr/bin/ld: error: common.o: file too short
collect2: error: ld returned 1 exit status

3. du -sh returns zero even for a non-empty directory.

This email is not a bug report and I'm not asking for any of these to be
"fixed" as hashfs.scm is just an example but the short file from compiling
common.scm seems interesting and perhaps is related to the moosefs issue.
Anyone have suggestions on things to look for in a source file that might
be challenging for a filesystem? For the record, both fossil open and
building/running Megatest work fine on sshfs, another fuse based filesystem.

I pasted the instructions I gave to the Moosefs folks for reproducing the
problem below in case it is useful.

Thanks,

Matt
-=-


How to reproduce:

1. Install chicken + IUP gui (alternative: use Makefile.installall from
utils dir in Megatest)

wget http://www.kiatoa.com/matt/chicken_4.11rc2_x86.tar.gz
/tmp/chicken.tar.gz
cd /opt;tar xf /tmp/chicken.tar.gz
source /opt/chicken/4.11rc2_x86_64/setup-chicken4x.sh

2. Get Megatest source for v1.61 (project is at https://www.kiatoa.com/
fossils/megatest)

 wget http://www.kiatoa.com/matt/megatest_v1.61_src.tar.gz
/tmp/megatest.tar.gz
tar xf /tmp/megatest.tar.gz
cd megatest
make clean;make -j && make install
cd tests
source fixpath.sh
make dashboard

== results ==

cd fullrun && /mfs/tmp/megatest/bin/dashboard -skip-version-check -rows 20 &
matt@xena:/mfs/tmp/megatest/tests$
Error: segmentation violation

Call history:

dcommon.scm:68: hash-table-set!
tree.scm:12: ##sys#require
tree.scm:13: ##sys#require
tree.scm:15: ##sys#require
tree.scm:17: ##sys#require
tree.scm:17: ##sys#require
tree.scm:17: ##sys#require
altdb.scm:2: make-hash-table
altdb.scm:3: ##sys#require
altdb.scm:3: hash-table-set!
vg.scm:13: ##sys#require
vg.scm:16: ##sys#require
vg.scm:16: ##sys#require
vg_records.scm:4: ##sys#require
vg_records.scm:5: make-exception
vg_records.scm:17: ##sys#require  <--
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] srfi-18 and reading/writing variables, how to simulate a collision?

2016-11-29 Thread Matt Welland
My question: Do green threads naturally do atomic reads/writes to variables
such that mutexes are pragmatically not needed in most situations in
Chicken?

I have seen corrupted values which I assumed were due to reading/writing to
variables from multiple threads without mutex protection. However when I
tried to simulate this (code pasted below) I haven't been able to create
any collisions.

Note that where file handles and ports are being opened/closed with
subprocesses etc then mutexes are absolutely needed. I ran into this with
trying to use nanomsg in threads where subprocesses were being launched.
Without mutexes it crashed very quickly. It is possible that the corrupted
values I've seen in the past were actually due to open/closing of file
handles, ports and or processes along with cross threaded variable accesses.

But back to the question, are mutexes really needed when passing variables
back and forth between srfi-18 threads in Chicken? Perhaps my code below is
too simplistic to trigger a collision? Mutexes can have a pretty severe
impact on performance and it would be nice to know when they are really
needed. The srfi-18 documentation is crystal clear that they should be used
always but maybe in the case of chicken it is ok to bend the rules?

Thanks.
=
(use posix srfi-18 typed-records srfi-69)

(define-inline (with-mutex mtx accessor record . val)
  (mutex-lock! mtx)
  (let ((res (apply accessor record val)))
(mutex-unlock! mtx)
res))

(defstruct testit
  (x 0)
  (y 0))

(define *validvals* '(0 1 2 a b c d e f 3 4 5 6 7 8 9 "x" "y" "z" "*" "-"))
(define *numvals*   (length *validvals*))
(define *mtx* (make-mutex))

;; uncomment to try with a struct along with a mutex
(define *struct* (make-testit))
(define-inline (get-val)(with-mutex *mtx* testit-x *struct*))
(define-inline (set-val v)(with-mutex *mtx* testit-x-set! *struct* v))

;; uncomment to try with a struct, no mutex
;; (define *struct* (make-testit))
;; (define-inline (get-val)(testit-x *struct*))
;; (define-inline (set-val v)(testit-x-set! *struct* v))

;; uncomment to try with a global var, no mutex
;; (define *var* 0)
;; (define-inline (get-val) *var*)
;; (define-inline (set-val v) (set! *var* v))

;; uncomment to try with a hash table and no mutex
;; (define *var* (make-hash-table))(hash-table-set! *var* "value" 0)
;; (define-inline (get-val)(hash-table-ref *var* "value"))
;; (define-inline (set-val v)(hash-table-set! *var* "value" v))

(define (mod-struct)
  (let loop ((c 1)
 (last-val #t)
 (same-count 0))
 (if (> c 0)
 (begin
(if (not (member (get-val) *validvals*))
(print "BAD VALUE: " (get-val)))
(set-val (list-ref *validvals* (random *numvals*)))
;; (display (with-mutex *mtx* testit-x *struct*))
(loop (- c 1) (get-val) (+ same-count (if (eq? (get-val)
last-val) 1 0
 (print "All done, same-count=" same-count " c=" c

(let ((threads (let loop ((c 100)
  (r '()))
  (if (> c 0)
  (loop (- c 1)
(cons (make-thread mod-struct (conc
"mod-struct-" c)) r))
  r
   (map thread-start! threads)
   (map thread-join!  threads))
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Parallel procedures in CHICKEN

2016-12-28 Thread Matt Welland
Hi Arthur,

You might find this bit of exploratory code useful:
http://www.kiatoa.com/cgi-bin/fossils/megatest/artifact/50100144d4ed2b54.
It is an example of spawning off dozens of sub-processes and using nanomsg
to communicate the data back. We needed to find changed files in gigs of
data where the originating process would not be able to directly see the
files (the program will be setuid). With this proof of concept code on a 32
processor machine we saw a task that would take hours drop to minutes. No
surprise there but it was nice that it worked. It might be handy if this
idea was abstracted into an egg with special versions of map, for-each etc.
but I don't have time to attempt that now.

Nanomsg is pretty neat but it has quirks. To work reliably all open and
closing of ports had to be protected with mutexes which seems very odd.
Note: the code was only a proof of concept trial and it probably won't work
for you out of the box. It is nice that with nanomsg you simply change the
connection URL to switch from in process communication to inter-process to
across hosts. We saw no difference between IPC and tcp but we were only
handing back and forth tiny amounts of data so that is to be expected.

Matt
-=-

On Wed, Dec 28, 2016 at 8:46 AM, Arthur Maciel 
wrote:

> Hi Kooda!
>
> Em 24 de dez de 2016 07:00, "Kooda"  escreveu:
>
> On Sat, 24 Dec 2016 02:11:37 -0200
> Arthur Maciel  wrote:
> > Is there a way to implement map, for-each and other procedures in a
> > parallel way so
> >
> > (use srfi-1)
> > (map (lambda (x) (+ x 1)) (iota 100)
> >
> > would automatically split the list into smaller lists according to the
> > number of CPU cores and then gather the results back?
>
> I guess you could spawn a process pool and send these processes a thunk
> that calculates their part and send back the result. You could use s11n
> egg for that, I believe.
>
> I’m not sure it would be faster than the regular functions though.
>
>
> Do you recommend any specific way to create the pool and especially to
>  communicate between the processes?
>
> About the speed, I'll  test and report the results.
>
> Thanks!
> Arthur
>
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] How to turn off exception handlers in my code?

2017-03-15 Thread Matt Welland
I have many exception handlers, mostly handle-exceptions but some 
condition-case, and I'd like to run some tests and turn OFF the 
exception handling. I tried using a proc but that does not work:


(define (mt-faux-handle-exceptions exn alt . cmds)
 (let ((alt-proc (lambda ()
(let ((exn exn))
  alt
   (apply lambda '() cmds)))

The exn variable is not seen by the alt code and a "Error: unbound 
variable: exn" message is issued.


I've tried a macro but I don't know enough to make it work. This 
starting point works:


(define-syntax common:handle-exceptions
  (syntax-rules ()
((_ exn-in errstmt ...)
 (handle-exceptions exn-in errstmt ...

But I run into trouble as soon as I try to replace the actual 
handle-exceptions with something else.


Is there any built-in switchable on/off exception handler or does 
someone have a macro they can share that does what I need or something 
similar?


Any help appreciated.

Thanks,

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


Re: [Chicken-users] How to turn off exception handlers in my code?

2017-03-15 Thread Matt Welland

This seems to be working:

(define-syntax common:handle-exceptions
 (syntax-rules ()
   ((_ exn errstmt body ...)
(begin body ...

I was hung up trying variations on this:

(define-syntax common:handle-exceptions
 (syntax-rules ()
   ((_ exn errstmt ...)
(begin ...

which does NOT work. I guess a placeholder is needed for the first 
statement captured by the ellipsis.


On Wed, Mar 15, 2017 at 1:05 PM, Matt Welland  wrote:
I have many exception handlers, mostly handle-exceptions but some 
condition-case, and I'd like to run some tests and turn OFF the 
exception handling. I tried using a proc but that does not work:


(define (mt-faux-handle-exceptions exn alt . cmds)
  (let ((alt-proc (lambda ()
(let ((exn exn))
  alt
(apply lambda '() cmds)))

The exn variable is not seen by the alt code and a "Error: unbound 
variable: exn" message is issued.


I've tried a macro but I don't know enough to make it work. This 
starting point works:


(define-syntax common:handle-exceptions
   (syntax-rules ()
 ((_ exn-in errstmt ...)
  (handle-exceptions exn-in errstmt ...

But I run into trouble as soon as I try to replace the actual 
handle-exceptions with something else.


Is there any built-in switchable on/off exception handler or does 
someone have a macro they can share that does what I need or 
something similar?


Any help appreciated.

Thanks,

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


[Chicken-users] How to use units and modules together?

2017-04-30 Thread Matt Welland
Is using units and modules together supported? I'd like to use modules 
but don't want to have to install them as eggs.


I have tried this:

=main.scm=
(declare (uses other))
(import other)

(other-print "Hello")
==end

=other.scm=
(declare (unit other))

(module other
   (other-print)
 (import scheme chicken)
 (define (other-print arg)
   (print "Got: " arg)))

(import other)
==end==

Compile like this:

csc other.scm -c
csc other.o main.scm

===
It won't let me import other:

Syntax error (import): cannot import from undefined module

other

Expansion history:

(##core#begin (import other))
(import other)<--

However if I comment out the (import other) I can call other-print like 
this:


(other#other-print "Hello")

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


Re: [Chicken-users] How to use units and modules together?

2017-04-30 Thread Matt Welland

That did the trick. Thanks Evan.

On Sun, Apr 30, 2017 at 9:32 PM, Evan Hanson  wrote:

Hi Matt,

You're very close. The only step you missed was emitting an import 
file

for your "other" module so that csc knows what to do when you "(import
other)" in main.scm.

This should work (note "-j other"):

csc other.scm -c -j other
csc other.o main.scm

Cheers,

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


[Chicken-users] chicken-install -keep-installed not working when doing -deploy

2017-04-30 Thread Matt Welland
I think -keep-installed is detecting the egg already installed to the 
system - but it should be looking at the deploy directory when 
deploying.


I am trying to get the following Makefile to work somewhat efficiently, 
however as make iterates over each egg some of the same dependencies 
are installed over and over again:


# Need to run as follows (PREFIX is the path to where the iup lib is 
installed):

#
# CSC_OPTIONS="-I$PREFIX/include -L$PREFIX/lib" make deploy

CSCOPTS=
SRCFILES=src/db.scm
SOFILES = $(SRCFILES:%.scm=%.so)
DEPLOYSOFILES = $(SOFILES:src/%=deploytarg/%)

EGGS=matchable readline apropos base64 regex-literals format regex-case 
test coops trace csv \
dot-locking posix-utils posix-extras directory-utils hostinfo 
tcp-server rpc csv-xml fmt \
json md5 awful http-client spiffy uri-common intarweb 
spiffy-request-vars \
spiffy-directory-listing ssax sxml-serializer sxml-modifications 
srfi-42 matchable \

iup canvas-draw sqlite3

DPLYEGGS = $(EGGS:%=deploytarg/%.so)

all : dashboard
deploy : deploytarg/dashboard

src/%.so : src/%.scm
csc $(CSCOPTS) -J -s $<
cp src/$*.so $*.import.scm deploytarg

deploytarg/%.so : Makefile
chicken-install -p deploytarg -deploy $*

deploytarg/dashboard : $(DPLYEGGS) $(DEPLOYSOFILES) src/dashboard.scm
csc -deploy $(OFILES) src/dashboard.scm -o deploytarg
mv deploytarg/deploytarg deploytarg/dashboard


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


Re: [Chicken-users] chicken-install -keep-installed not working when doing -deploy

2017-04-30 Thread Matt Welland
I'm using 4.10. I had problems with 4.11 but will try again with 4.12. 
Thanks.


On Sun, Apr 30, 2017 at 11:17 PM, Evan Hanson  
wrote:

Hi Matt,

On 2017-04-30 23:10, Matt Welland wrote:
 I think -keep-installed is detecting the egg already installed to 
the system

 - but it should be looking at the deploy directory when deploying.


Unfortunately that's very likely; this was an issue in CHICKEN that 
was only
fixed in 4.11.2. You can refer to http://bugs.call-cc.org/ticket/1144 
for more

info about that bug.

What version of CHICKEN are you using, and if it's 4.11.1 or older, 
is it

possible for you to upgrade?

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


[Chicken-users] ANN: Chicken + IUP installer for Windows has been updated.

2017-09-21 Thread Matt Welland
The chicken-iup installer for Windows has been updated.

URL: http://www.kiatoa.com/fossils/chicken-iup

Chicken version: 4.12.0
IUP version: 3.22
Canvas Draw version: 5.9

Lots of pre-installed eggs:

abnf  version:
7.0
advice .. version:
0.3
alist-lib  version:
0.2.11
ansi-escape-sequences ... version:
0.4
apropos ... version:
2.2.1
args .. version:
1.5.1
awful  version:
0.42.0
awful-server . version:
0.42.0
base64  version:
3.3.1
basic-sequences . version:
2.0
big-chicken . version:
0.4
bind .. version:
1.5.2
bindings .. version:
7.0.4
call-with-environment-variables ... version:
0.1.7
canvas-draw ... version:
1.1.1
check-errors .. version:
2.1.0
chicken-bind .. version:
1.5.2
chicken-doc ... version:
0.4.7
chicken-doc-cmd ... version:
0.4.7
chicken-dump .. version:
0.9.7
condition-utils ... version:
1.4.2
coops .. version:
1.93
cplusplus-object .. version:
1.5.2
csv . version:
5.3
csv-char-list ... version:
5.3
csv-string .. version:
5.3
csv-xml .. version:
0.11.1
datatype  version:
1.4
define-record-and-printer . version:
0.1.4
defstruct ... version:
1.6
detail-object . version:
1.8.6
directory-utils ... version:
1.0.6
dot-locking . version:
0.2
expand-full ... version:
1.0.3
filepath  version:
1.5
fmt ... version:
0.808
fmt-c . version:
0.808
fmt-color . version:
0.808
fmt-js  version:
0.808
fmt-unicode ... version:
0.808
foof-loop ... version:
8.1
foreigners  version:
1.4.1
format  version:
3.1.6
functional-lists .. version:
0.0.2
hahn .. version:
0.9.3
html-tags .. version:
0.11
html-utils . version:
0.10
http-client-conditions  version:
1.4.2
http-session  version:
2.9
ini-file .. version:
0.3.4
input-classes ... version:
1.0
input-parse . version:
1.1
intarweb  version:
1.7
intarweb-conditions ... version:
1.4.2
irc ... version:
1.9.8
iset  version:
2.0
iup ... version:
1.7.0
iup-dynamic ... version:
1.7.0
json  version:
1.5
lalr .. version:
2.4.3
lazy-seq 

[Chicken-users] How to use bezier function in 2d-primitives?

2017-10-24 Thread Matt Welland
I tried this:

(use 2d-primitives)
(with-output-to-file "test.csv"
  (lambda ()
(for-each
   (lambda (v)
  (print (f32vector-ref v 0)","(f32vector-ref v 1)))
(bezier->vects (bezier:create (vect:create 0 0)(vect:create 2
5)(vect:create 7 5)(vect:create 10 0) 10

Then load test.csv into gnumeric and graph it and I see two straight line
segments. Either I'm not correctly understanding how to use bezier or there
is a bug.

Thanks,

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


Re: [Chicken-users] How to use bezier function in 2d-primitives?

2017-10-26 Thread Matt Welland
On Oct 25, 2017 4:32 PM, "Kooda"  wrote:

On Tue, 24 Oct 2017 22:15:47 -0700 Matt Welland
 wrote:
> I tried this:
>
> (use 2d-primitives)
> (with-output-to-file "test.csv"
>   (lambda ()
> (for-each
>(lambda (v)
>   (print (f32vector-ref v 0)","(f32vector-ref v 1)))
> (bezier->vects (bezier:create (vect:create 0 0)(vect:create 2
> 5)(vect:create 7 5)(vect:create 10 0) 10
>
> Then load test.csv into gnumeric and graph it and I see two straight
> line segments. Either I'm not correctly understanding how to use
> bezier or there is a bug.
>
> Thanks,
>
> Matt
> -=-

Looks like the 2d-primitives egg has a bug indeed! I’ll open a ticket.

Here is a version of bezier->vects that does what you expect. I hope
this will help!

(define (bezier->vects* b n)
  (let ((increment (/ 1 n)))
(let loop ((step 0))
  (if (>= step 1)
  (list (bezier:ref b 1))
  (cons (bezier:ref b step)
(loop (+ step increment)))


Thanks Kooda! With your fix I was able to draw the beginnings of a
primitive boat hull using my little experimental app "a3d".

For anyone into 3D printers, Openscad and POVRay, etc. you might find a3d
of interest. It attempts to provide a limited way to write your scene or
design in scheme and then visualize in POVRay or Openscad and target 3D
printers.

You can see more a http://www.kiatoa.com/fossils/opensrc/wiki?name=a3d
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Memory allocation and limits in chicken scheme programs

2017-12-13 Thread Matt Welland
I'm using Chicken 4.10.0 and with the below script chicken rapidly
allocates memory then seems to get stuck:

=script=
(define start-time (current-milliseconds))
(define max-n 200)
(let loop ((n   0)
   (stuff  '()))
  (let ((bigvec (make-vector 100 0)))
(print n " Elapsed time: " (/ (- (current-milliseconds) start-time)
1000) " s ")
(if (< n max-n)
(loop (+ n 1)(cons bigvec stuff)
=end script=

On a machine with lots of memory, nothing in cache or buffers:

> free -g; utils/memproblem-simple
 total   used   free sharedbuffers cached
Mem:  1009 13996  0  1  1
-/+ buffers/cache: 10999
Swap:  512  0511

The program chokes after 133 rounds through the loop. No "out of memory'
message. The process memory usage doesn't seem to grow and the program just
hangs. I added -B: but didn't get any output.

Suggestions on what might cause this and if so how to work around it or how
to debug further?

0 Elapsed time: 0.007 s
1 Elapsed time: 0.027 s
2 Elapsed time: 0.031 s
...
131 Elapsed time: 2.09 s
132 Elapsed time: 2.093 s
133 Elapsed time: 2.768 s
^C
(I gave up waiting)
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Memory allocation and limits in chicken scheme programs

2017-12-13 Thread Matt Welland
On Wed, Dec 13, 2017 at 12:41 PM, Peter Bex  wrote:

> On Wed, Dec 13, 2017 at 11:13:54AM -0700, Matt Welland wrote:
> > I'm using Chicken 4.10.0 and with the below script chicken rapidly
> > allocates memory then seems to get stuck:
>
> Hi Matt,
>
> Try to update to CHICKEN 4.13.0 first (standard advice, we usually
> fix lots of issues in new versions).  I simply get this after a few
> seconds:
>
> [panic] out of memory - heap has reached its maximum size - execution
> terminated
>
> The fix is to increase the maximum allowed heap size using -:hm:
> csi -:hm4G ./test.scm cleanly exits after a few seconds here with either
> version of CHICKEN.
>
> > The program chokes after 133 rounds through the loop. No "out of memory'
> > message.
>
> I suppose that's a bug we fixed in 4.13.0; I seem to recall an issue like
> that where allocating near the maximum heap size would result in it
> triggering a GC, then filling up the heap immediately again etc, resulting
> in a GC loop, but I can't find it in NEWS right now.


Much better with 4.13. Thanks. I have it working up to 128G. I don't
understand the heap and will do some more reading but am I correct in
assuming that the size of the heap will determine the largest data
structure I can have in memory? I base this on seeing the VIRT column in
htop plateau at 128G when I used -:nm128G.


> > The process memory usage doesn't seem to grow and the program just
> > hangs. I added -B: but didn't get any output.
>
> Try the -:g option (debugging output for the GC); you'll quickly see that
> it's resizing the heap all the time to the same limit.
>
> Cheers,
> Peter
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] bug or usage problem with posix group-information and there is no change-group?

2018-02-12 Thread Matt Welland
In the repl calling group-information with the string name of a group
works fine, in compiled code I get an error, expected fixnum but
received string. I tested with Chicken 4.13

Also I see a change-file-owner but no change-file-group. A change-file-
group would be useful as you can change the group without being root.
I.e. an analog to the chgrp command would be useful.

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


Re: [Chicken-users] bug or usage problem with posix group-information and there is no change-group?

2018-02-14 Thread Matt Welland
On Wed, 2018-02-14 at 13:44 +0100, Vasilij Schneidermann wrote:
> Hello Matt,
> 
> > 
> > In the repl calling group-information with the string name of a
> > group
> > works fine, in compiled code I get an error, expected fixnum but
> > received string. I tested with Chicken 4.13
> I can reproduce this with the test code being `(group-information
> "root")`.
> FWIW, I get a warning during compilation, not an error.  The compiled
> code runs just fine and emits the expected result.  This is due to
> the
> relevant entry in the `types.db` file stating that the group-
> information
> procedure accepts an integer only.  If you unpack the release tarball
> and change the enclosed `types.db` to specify `(or string fixnum)`
> for
> the first argument of the function, the compiled CHICKEN should
> behave
> correctly.

Ah, yes, it was a warning, not an error. My mistake.

> 
> > 
> > Also I see a change-file-owner but no change-file-group. A change-
> > file-
> > group would be useful as you can change the group without being
> > root.
> > I.e. an analog to the chgrp command would be useful.
> Have you inspected the documentation of that procedure?  It accepts
> three arguments, the path to the file and the new user ID and group
> ID,
> therefore it allows implementing both `chown` and `chgrp`.  I don't
> think an extra procedure is necessary.
> 

I had tried by setting the user id to my user id and group to the
group-id but it failed - on looking again I see that I was testing in
an xterm where I had not done a newgrp to make the group I'd added for
testing available. My mistake again.

Thanks for taking a look and sorry for the noise.

> Vasilij

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


[Chicken-users] directory-utils egg has dependency that appears to not exist

2018-04-07 Thread Matt Welland
Directory utils 1.1.0 depends on typed-define which does not appear to
exist. If I install 1.0.6 it works.

Thanks.

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


  1   2   3   >