[Chicken-users] chicken-hosted stalin

2008-01-22 Thread felix winkelmann
Hi!

A stalin egg has been added to the repository that provides
a slightly modified version of Jeffrey Mark Siskinds Stalin
Scheme-C compiler, compiled with chicken. Even though the
compiler is even slower than the original one, it compiles
(the compiler itself) faster and uses less resources (takes
for example around 1 1/2 hours on a 512mb Mac Mini (ppc)).
It also has a few extensions (more character escape sequences
in string literals and SRFI-0 support (cond-expand)).

More information can be found here:

http://chicken.wiki.br/stalin


cheers,
felix


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


Re: [Chicken-users] chicken-hosted stalin

2008-01-22 Thread John Cowan
felix winkelmann scripsit:

 Even though the [chicken-stalin] compiler is even slower than the
 original one, it compiles (the compiler itself) faster [...].

This is indecipherable.  The purpose of a compiler is to compile; if
chicken-stalin compiles the Stalin source code faster than native stalin
does, in what sense is it also slower?  And if chicken-stalin *is* slower,
what is the point of compiling Stalin with csc, since a program that
is inherently as slow as Stalin should presumably be compiled with the
compiler that produces the fastest executables, viz. native stalin?

Also, I'm not clear how much use Stalin is in the Chicken environment,
given its severe restrictions on input language.  If Stalin could
be front-ended with an R5RS macro expander, and if enough bootstrap
procedures could be provided that it could understand a larger fraction of
Chicken Scheme, then it would indeed be useful to have as an alternative
compiler.

 http://chicken.wiki.br/stalin

The link to the Stalin manual is to stalin1html, which is broken.  Plausible
alternatives like stalin.1.html, stalin1.html, stalin.1, and stalin1
also don't work.

-- 
Clear?  Huh!  Why a four-year-old child John Cowan
could understand this report.  Run out  [EMAIL PROTECTED]
and find me a four-year-old child.  I   http://www.ccil.org/~cowan
can't make head or tail out of it.
--Rufus T. Firefly on government reports


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


Re: [Chicken-users] chicken-hosted stalin

2008-01-22 Thread felix winkelmann
On Jan 22, 2008 3:45 PM, John Cowan [EMAIL PROTECTED] wrote:
 felix winkelmann scripsit:

  Even though the [chicken-stalin] compiler is even slower than the
  original one, it compiles (the compiler itself) faster [...].

 This is indecipherable.  The purpose of a compiler is to compile; if
 chicken-stalin compiles the Stalin source code faster than native stalin
 does, in what sense is it also slower?  And if chicken-stalin *is* slower,
 what is the point of compiling Stalin with csc, since a program that
 is inherently as slow as Stalin should presumably be compiled with the
 compiler that produces the fastest executables, viz. native stalin?

chicken-stalin can be built on systems that are too weak to build
the regular stalin, it also runs probably on more platforms.
I think this is useful. Due to the reduced turnaround times and the much
richer runtime environment, one can actually debug and enhance
the system (much more so as the original one).


 Also, I'm not clear how much use Stalin is in the Chicken environment,
 given its severe restrictions on input language.  If Stalin could
 be front-ended with an R5RS macro expander, and if enough bootstrap
 procedures could be provided that it could understand a larger fraction of
 Chicken Scheme, then it would indeed be useful to have as an alternative
 compiler.

You have to see for yourself whether you find it useful. It is possible
to mix chicken and stalin code, so one could conceive trying to get the
best of both worlds (partially fast code and partically using a rich
and dynamic runtime environment).

Adding macros and more compiler language support could be done, though.
So this is a start.


cheers,
felix


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


[Chicken-users] Help with the mysql egg

2008-01-22 Thread Jean-Philippe Theberge

Hi,

I am having some trouble with the mysql egg mostly die to my 
misunderstanding of c-pointers


With the egg you get data either by index or by name.  What I would like 
is more something like this example from the mysql-api documentation


unsigned int num_fields;

unsigned int i;
MYSQL_FIELD *fields;

num_fields = mysql_num_fields(result);
fields = mysql_fetch_fields(result);
for(i = 0; i  num_fields; i++)
{
  printf(Field %u is %s\n, i, fields[i].name);
}

The egg provide the foreign-mysql-fetch-fields. it return a #pointer object

How can I extract the name from this object in scheme?  
I want to do what fields[i].name do in the example above? 


Thanks

--



BuddyPilots http://www.buddypilots.com
*Jean-Philippe Théberge*
*Programmeur Architecte*
Tel: (514) 353-2307





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


Re: [Chicken-users] chicken-hosted stalin

2008-01-22 Thread John Cowan
felix winkelmann scripsit:

 chicken-stalin can be built on systems that are too weak to build
 the regular stalin, it also runs probably on more platforms.
 I think this is useful. Due to the reduced turnaround times and the much
 richer runtime environment, one can actually debug and enhance
 the system (much more so as the original one).

Fair enough.  I'm still not clear on whether it is actually slower or faster,
though, or perhaps slower in general but faster when compiling Stalin, or what.

 You have to see for yourself whether you find it useful. It is possible
 to mix chicken and stalin code, so one could conceive trying to get the
 best of both worlds (partially fast code and partically using a rich
 and dynamic runtime environment).
 
 Adding macros and more compiler language support could be done, though.
 So this is a start.

Also fair enough.

-- 
John Cowan   [EMAIL PROTECTED]  http://www.ccil.org/~cowan
Most languages are dramatically underdescribed, and at least one is
dramatically overdescribed.  Still other languages are simultaneously
overdescribed and underdescribed.  Welsh pertains to the third category.
--Alan King


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


Re: [Chicken-users] chicken-hosted stalin

2008-01-22 Thread Tobia Conforto

John Cowan wrote:

felix winkelmann scripsit:

Even though the [chicken-stalin] compiler is even slower than the
original one, it compiles (the compiler itself) faster.


This is indecipherable.


I was wondering too what is faster or slower than what!

Chichen compiling Stalin to C, vs. Stalin compiling Stalin to C?
Gcc compiling Chicken-compiled Stalin to executable, vs. gcc compiling  
Stalin-compiled Stalin to executable?
Chicken-compiled Stalin compiling user code to C, vs. Stalin-compiled  
Stalin compiling user code to C?

I'm probably missing some combination too...

LOL

Tobia


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


Re: [Chicken-users] Chicken blogs

2008-01-22 Thread Tobia Conforto

Graham Fawcett wrote:

Is anyone else blogging much about Chicken these days? Is the world
ready for a Planet Chicken aggregate?


When I decided to try out Chicken (and Scheme with it) some months  
ago, which I'm glad I did, it was because of how well Pythonists and  
Rubyists and such were talking about Chicken in their blogs at the  
time.  So yes, people have been blogging about it for some time.



Tobia


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


[Chicken-users] web-unity (was: Web applications)

2008-01-22 Thread Tobia Conforto

On Jan 17, 2008, at 9:23 AM, Peter Bex wrote:

Instead of making a choice between scgi, fastcgi, spiffy or plain cgi
I recommend having a look at the web-unity egg.  This egg allows you
to write code independent of the webserver/deployment method.


$ sudo chicken-setup web-unity

The extension web-unity does not exist.
Do you want to download it ? (yes/no/abort) [yes]
downloading web-unity.egg from (www.call-with-current-continuation.org  
eggs 80)

  tar xf ../web-unity.egg
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Error exit delayed from previous errors
Error: shell invocation failed with non-zero return status
tar xf ../web-unity.egg
512
$


This is with Chicken 2.732


Tobia


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


[Chicken-users] Chicken blogs

2008-01-22 Thread Graham Fawcett
Hi folks,

I just noticed that Hans Nowak, an Pythonista from days of yore, is
maintaing a blog about his adventures with Chicken:

Drinkable Chicken
http://4.flowsnake.org/

Perhaps you might like to pop over and comment on his posts.

Is anyone else blogging much about Chicken these days? Is the world
ready for a Planet Chicken aggregate?

Graham


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


Re: [Chicken-users] web-unity (was: Web applications)

2008-01-22 Thread Peter Busser
Hi,

   tar xf ../web-unity.egg

xfz

Groetjes,
Peter.


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


Re: [Chicken-users] Help with the mysql egg

2008-01-22 Thread Kon Lovett


On Jan 22, 2008, at 6:42 AM, Jean-Philippe Theberge wrote:


Hi,

I am having some trouble with the mysql egg mostly die to my  
misunderstanding of c-pointers


With the egg you get data either by index or by name.  What I would  
like is more something like this example from the mysql-api  
documentation


unsigned int num_fields;

unsigned int i;
MYSQL_FIELD *fields;

num_fields = mysql_num_fields(result);
fields = mysql_fetch_fields(result);
for(i = 0; i  num_fields; i++)
{
  printf(Field %u is %s\n, i, fields[i].name);
}

The egg provide the foreign-mysql-fetch-fields. it return a  
#pointer object


How can I extract the name from this object in scheme?  I want to  
do what fields[i].name do in the example above?

Thanks


I have never used the mysql egg so keep that in mind.

(define conn (mysql-connect ...))

;; (mysql-fetch-field-list DB) - LIST | BOOLEAN
;; Returns a list of field names for the current connection result, or
;; #f when no result.
(define mysql-fetch-field-list
  (let ([get-field-name
  (foreign-lambda* c-string ([c-pointer fields] [unsigned- 
integer idx])

   return (((MYSQL_FIELD *)fields)[idx].name);)])
(lambda (conn)
  (and-let* ([res (mysql-connection-result conn)])
(let ([fields (foreign-mysql-fetch-fields res)])
  (let loop ([count (foreign-mysql-num-fields res)] [names  
'()])

(if (zero? count)
names
(let ([nxtcnt (sub1 count)])
  (loop nxtcnt (cons (get-field-name fields nxtcnt)  
names)) ) ) ) ) ) ) ) )


HTH



--



BuddyPilots http://www.buddypilots.com
*Jean-Philippe Théberge*
*Programmeur Architecte*
Tel: (514) 353-2307





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


Best Wishes,
Kon




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


[Chicken-users] Sedna experiences?

2008-01-22 Thread Graham Fawcett
Hi folks,

Chicken has a sedna egg, for communicating with a Sedna XML database
( http://modis.ispras.ru/sedna/index.htm ). I was wondering if anyone
on the list is using Sedna in a production environment, and might be
able to comment on its effectiveness and efficiency?

Ultimately, I'm looking for a stable, featureful structured-data
store, preferably with full-text search capabilities. Sedna fits the
description, but I would be happy to hear of other similar systems you
might have used.

Regards,
Graham


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


Re: [Chicken-users] Sedna experiences?

2008-01-22 Thread felix winkelmann
On Jan 22, 2008 10:21 PM, Graham Fawcett [EMAIL PROTECTED] wrote:
 Hi folks,

 Chicken has a sedna egg, for communicating with a Sedna XML database
 ( http://modis.ispras.ru/sedna/index.htm ). I was wondering if anyone
 on the list is using Sedna in a production environment, and might be
 able to comment on its effectiveness and efficiency?

 Ultimately, I'm looking for a stable, featureful structured-data
 store, preferably with full-text search capabilities. Sedna fits the
 description, but I would be happy to hear of other similar systems you
 might have used.

I have not used it for real work, and only while helping with an earlier
version. It appeared quite stable and in the hands of a someone with
DBMS experience it should perform well. But I'm not one of those
(personally I can live with plain files, hash-tables and perhaps gdbm).

The maintainers are very helpful, I must say.


cheers,
felix


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


Re: [Chicken-users] web-unity (was: Web applications)

2008-01-22 Thread felix winkelmann
On Jan 22, 2008 6:30 PM, Tobia Conforto [EMAIL PROTECTED] wrote:
 On Jan 17, 2008, at 9:23 AM, Peter Bex wrote:
  Instead of making a choice between scgi, fastcgi, spiffy or plain cgi
  I recommend having a look at the web-unity egg.  This egg allows you
  to write code independent of the webserver/deployment method.

 $ sudo chicken-setup web-unity


For reasons unknown to me this egg was missing on the server.
It should be there now. Sorry.


cheers,
felix


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


[Chicken-users] advice egg

2008-01-22 Thread felix winkelmann
Hi!


Another egg freshly available: advice

http://chicken.wiki.br/advice


cheers,
felix


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


Re: [Chicken-users] advice egg

2008-01-22 Thread Mark Fredrickson
Lordy! Does Felix ever sleep?

-M

On Jan 22, 2008 3:58 PM, felix winkelmann [EMAIL PROTECTED] wrote:
 Hi!


 Another egg freshly available: advice

 http://chicken.wiki.br/advice


 cheers,
 felix


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



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


Re: [Chicken-users] advice egg

2008-01-22 Thread felix winkelmann
On Jan 22, 2008 11:04 PM, Mark Fredrickson [EMAIL PROTECTED] wrote:

 Lordy! Does Felix ever sleep?


Sleep? I don't have the time for such things.


cheers,
felix


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


Re: [Chicken-users] Help with the mysql egg

2008-01-22 Thread Jean-Philippe Theberge
OK, I keep in mind that you can easily and succesfully modify an egg you 
had never used. 

I think this should be added to the mysql egg. I can provide a diff or 
add it myself to the egg if I am provided with a repository access.


Thanks a lot!

--
JP Theberge


Kon Lovett wrote:


On Jan 22, 2008, at 6:42 AM, Jean-Philippe Theberge wrote:


Hi,

I am having some trouble with the mysql egg mostly die to my 
misunderstanding of c-pointers


With the egg you get data either by index or by name.  What I would 
like is more something like this example from the mysql-api 
documentation


unsigned int num_fields;

unsigned int i;
MYSQL_FIELD *fields;

num_fields = mysql_num_fields(result);
fields = mysql_fetch_fields(result);
for(i = 0; i  num_fields; i++)
{
  printf(Field %u is %s\n, i, fields[i].name);
}

The egg provide the foreign-mysql-fetch-fields. it return a 
#pointer object


How can I extract the name from this object in scheme?  I want to do 
what fields[i].name do in the example above?

Thanks


I have never used the mysql egg so keep that in mind.

(define conn (mysql-connect ...))

;; (mysql-fetch-field-list DB) - LIST | BOOLEAN
;; Returns a list of field names for the current connection result, or
;; #f when no result.
(define mysql-fetch-field-list
  (let ([get-field-name
  (foreign-lambda* c-string ([c-pointer fields] 
[unsigned-integer idx])

   return (((MYSQL_FIELD *)fields)[idx].name);)])
(lambda (conn)
  (and-let* ([res (mysql-connection-result conn)])
(let ([fields (foreign-mysql-fetch-fields res)])
  (let loop ([count (foreign-mysql-num-fields res)] [names '()])
(if (zero? count)
names
(let ([nxtcnt (sub1 count)])
  (loop nxtcnt (cons (get-field-name fields nxtcnt) 
names)) ) ) ) ) ) ) ) )


HTH



--



BuddyPilots http://www.buddypilots.com
*Jean-Philippe Théberge*
*Programmeur Architecte*
Tel: (514) 353-2307





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


Best Wishes,
Kon







--
BuddyPilots http://www.buddypilots.com
*Jean-Philippe Théberge*
*Programmeur Architecte*
Tel: (514) 353-2307





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


Re: [Chicken-users] Help with the mysql egg

2008-01-22 Thread Kon Lovett


On Jan 22, 2008, at 2:29 PM, Jean-Philippe Theberge wrote:

OK, I keep in mind that you can easily and succesfully modify an  
egg you had never used.


Sorry, not sure what you mean. A compliment? ;-)

I think this should be added to the mysql egg. I can provide a diff  
or add it myself to the egg if I am provided with a repository access.


Thanks a lot!


You might want to contact [EMAIL PROTECTED], the author. I don't know  
if he is active with egg maintenance though.




--
JP Theberge



I forgot to add the following to the code snippet (kinda necessary):

#
#include mysql.h
#

Note that the 'foreign-mysql-*' bindings are exported so the 'mysql- 
fetch-field-list' procedure doesn't need to be part of the egg.


Personally I think it a little too specific. Probably a 'define- 
foreign-record' should be added to the egg for the 'MYSQL_FIELD'  
struct, this would allow Scheme access to the entries from a pointer.


I can look into this if you need it.

snip

Best Wishes,
Kon




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


[Chicken-users] Databases in Chicken

2008-01-22 Thread Jeremy Sydik
I've been slowly evolving a pair of native protocol (direct socket  
comm, no lib) interfaces for MySQL and
Postgres along with some basic schemish functions like (map-query) and  
(map-for-each).  The code is
still pretty rough, but as it stabilizes, I was wondering if there's a  
Chicken equivalent to things like DBI?


--Jeremy



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


[Chicken-users] Sandbox egg docs missing

2008-01-22 Thread Joshua Griffith

Could someone take a look at the documentation for the sandbox egg:
http://chicken.wiki.br/sandbox

It looks like it is missing.

Thanks,

Josh


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


Re: [Chicken-users] chicken-hosted stalin

2008-01-22 Thread Alex Shinn
On Jan 23, 2008 9:09 AM, John Cowan [EMAIL PROTECTED] wrote:
 felix winkelmann scripsit:

  Compilation of Scheme with Stalin takes extremely long. The chicken-compiled
  Stallin is smaller and doesn't stress gcc so much, but is (naturally)
  even slower than the original Stalin, which means slow compiling Scheme to 
  C.

 Well, that's what I expected.  But then what is the meaning of saying that 
 there
 are faster turnaround times for chicken-stalin than for native stalin?

I think the relevant point is that there are faster turnaround
times for hacking Stalin itself.  This is very important, because
Stalin is minimal to the point of being unusable, and so a lot of
hacking is needed.

-- 
Alex


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


Re: [Chicken-users] Sandbox egg docs missing

2008-01-22 Thread Mario Domenech Goulart
Hi Joshua,

On Tue, 22 Jan 2008 19:44:11 -0600 Joshua Griffith [EMAIL PROTECTED] wrote:

 Could someone take a look at the documentation for the sandbox egg:
 http://chicken.wiki.br/sandbox
 
 It looks like it is missing.

It's at http://www.call-with-current-continuation.org/eggs/sandbox.html

Best wishes,
Mario


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