Re: Windows vs Linux Performance, windows host 4-6x slower than linux guest vm

2021-09-06 Thread Mario Domenech Goulart
Hi Mark,

On Mon, 6 Sep 2021 13:26:26 +0100 Mark Fisher  wrote:

> I've got a windows and linux environment for Chicken on the same machine.
> linux is running in VMWare Workstation, the host is Windows 10.
>
> I'm seeing quite a difference in performance between the two; windows host is 
> running about ~4-6x slower than a VM that's running on the same machine.
>
> The code I'm running is some of the 2015 advent of code challenges I'm 
> writing to learn scheme.
> My codebase is: https://github.com/markjfisher/aoc-chicken
>
> All times below (last 3 columns) are in millis, they show Total time, then 
> times for the 2 parts that are run to make that total.
>
> building:
> $ cd build; RELEASE=1 make clean all
>
> On my linux VM
> $ ./advent2015
> Day: Part 1   Part 2   Time  P1   P2  
> 01 : 232  1783 1165
> 02 : 1606483  3842356  6234   28  
> 03 : 2565 2639 9727   70  
> 04 : 254575   1038736  2713  490  2223
>
> On my Windows Host
>> advent2015.exe
> Day: Part 1   Part 2   Time  P1   P2
> 01 : 232  1783 6332   31
> 02 : 1606483  3842356  375   187  188
> 03 : 2565 2639 656   187  469
> 04 : 254575   1038736  10735 2156 8579
>
> Both are using 5.3.0rc2, both using "-O3" flags for release mode. All eggs 
> (listed in the docs/setup.md) were installed with same version of chicken.
> gcc is 10.3.0 from chocolatey in windows, and same version in linux.
>
> Is windows performance a known thing? Is there anything else I can do to make 
> the windows build more performant?
>
> - - - 8< - - -
> The compilation output for linux:
> csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day01.scm -j aoc2015day01 
> -emit-types-file aoc2015day01.types -o aoc2015day01.so
> csc -I ../ -s -d0 aoc2015day01.import.scm
> csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day02.scm -j aoc2015day02 
> -emit-types-file aoc2015day02.types -o aoc2015day02.so
> csc -I ../ -s -d0 aoc2015day02.import.scm
> csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day03.scm -j aoc2015day03 
> -emit-types-file aoc2015day03.types -o aoc2015day03.so
> csc -I ../ -s -d0 aoc2015day03.import.scm
> csc -I ../ -s -d3 -O3 ../advents/2015/aoc2015day04.scm -j aoc2015day04 
> -emit-types-file aoc2015day04.types -o aoc2015day04.so
> csc -I ../ -s -d0 aoc2015day04.import.scm
> csc -I ../ ../advents/2015/advent2015.scm -d3 -O2 -compile-syntax -o 
> advent2015
>
> For windows:
> csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day01.scm -j aoc2015day01 
> -emit-types-file aoc2015day01.types -o aoc2015day01.so
> csc -I ..\\ -s -d0 aoc2015day01.import.scm
> csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day02.scm -j aoc2015day02 
> -emit-types-file aoc2015day02.types -o aoc2015day02.so
> csc -I ..\\ -s -d0 aoc2015day02.import.scm
> csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day03.scm -j aoc2015day03 
> -emit-types-file aoc2015day03.types -o aoc2015day03.so
> csc -I ..\\ -s -d0 aoc2015day03.import.scm
> csc -I ..\\ -s -d3 -O3 ..\\advents\\2015\\aoc2015day04.scm -j aoc2015day04 
> -emit-types-file aoc2015day04.types -o aoc2015day04.so
> csc -I ..\\ -s -d0 aoc2015day04.import.scm
> csc -I ..\\ ..\\advents\\2015\\advent2015.scm -d3 -O2 -compile-syntax -o 
> advent2015
> - - - -

Thanks for the detailed information.

That performance discrepancy is kinda surprising, specially considering
that Linux is running as a guest on a VM on Windows.

Maybe profiling can help spot what is causing the performance
difference?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Windows vs Linux Performance, windows host 4-6x slower than linux guest vm

2021-09-08 Thread Mario Domenech Goulart
On Mon, 6 Sep 2021 21:25:48 +0100 Mark Fisher  wrote:

>  The compilation options enable instrumentation-based profiling. There's
>  statistical profiling available when running executables with -:p which
>  might give you more useful data (see
>  https://www.more-magic.net/posts/statistical-profiling.html for more
>  infomation). Could you please try that one as well?
>
> I had found that article, didn't realise it was as easy as adding the switch 
> when running.
>
> Here's the output for windows:
> reading `PROFILE.15844' ...
>
> procedure 
>  calls  seconds  average  percent
> ---
> ../advents/2015/aoc2015day04.scm:35: 
> message-digest-byte-vector#message-digest-string1498.2690.055   
> 69.671
> ../advents/2015/aoc2015day04.scm:35: chicken.string#conc  
>1121.3200.011   11.120
> ##sys#substring=? 
> 721.0500.0148.845
> ../advents/aoc-files.scm:43: streams.primitive#$make-stream-eager$
> 100.1400.0141.179
> ##sys#profile-exit
> 110.1200.0101.010
> ../advents/2015/aoc2015day04.scm:35: loop240  
>  90.0900.0100.758
> comparators/default.scm:115: make-comparator  
>  90.0900.0100.758
> comparators/default.scm:111: object-type  
>  80.0900.0110.758
> ../advents/aoc-files.scm:47: streams.utils#stream-fold-right  
>  20.0600.0300.505
> ../advents/2015/aoc2015day03.scm:110: streams.primitive#stream-null?  
>  50.0500.0100.421
> ../advents/aoc-files.scm:44: streams.primitive#stream-cdr 
>  40.0400.0100.336
> ../advents/2015/aoc2015day03.scm:110: streams.primitive#$make-stream-eager$   
>  30.0400.0130.336
> comparators/comparators-impl.scm:235: acc 
>  30.0300.0100.252
> ../advents/2015/aoc2015day03.scm:113: streams.primitive#stream-null?  
>  30.0300.0100.252
> comparators/comparators-impl.scm:236: acc 
>  30.0300.0100.252
> ../advents/aoc-files.scm:43: streams.primitive#stream-car 
>  30.0300.0100.252
> ../advents/2015/aoc2015day01.scm:70: streams.derived#stream-fold  
>  10.0300.0300.252
> ../advents/2015/aoc2015day01.scm:95: streams.utils#stream-find
>  10.0300.0300.252
> ##sys#profile-entry   
>  20.0200.0100.168
> ../advents/aoc-files.scm:41: streams.derived#stream-append
>  20.0200.0100.168
> comparators/comparators-impl.scm:234: acc 
>  20.0200.0100.168
> ../advents/2015/aoc2015day03.scm:72: srfi-113#set-adjoin! 
>  20.0200.0100.168
> comparators/default.scm:87: object-type   
>  20.0200.0100.168
> comparators/default.scm:110: object-type  
>  20.0200.0100.168
> comparators/comparators-impl.scm:200: %salt%  
>  20.0200.0100.168
> ../advents/2015/aoc2015day03.scm:113: streams.primitive#$make-stream-eager$   
>  20.0200.0100.168
> ../advents/2015/aoc2015day03.scm:113: streams.primitive#stream-car
>  10.0200.0200.168
> ../advents/aoc-files.scm:40: streams.derived#stream-append
>  10.0100.0100.084
> comparators/comparators-impl.scm:166: exact   
>  10.0100.0100.084
> ../advents/2015/advent2015.scm:38: scheme#display 
>  10.0100.0100.084
> ../advents/2015/aoc2015day03.scm:110: streams.primitive#$make-stream-lazy$
>  10.0100.0100.084
> ../advents/2015/aoc2015day02.scm:86: g194 
>  10.0100.0100.084
> ../advents/2015/aoc2015day03.scm:71: streams.derived#stream-fold  
>  10.0100.0100.084
> comparators/comparators-impl.scm:95: g307 
> 

Re: Make the args egg stop truncating long options in args:usage

2021-09-13 Thread Mario Domenech Goulart
Hi,

On Thu, 09 Sep 2021 16:00:53 -0400 T. Kurt Bond  wrote:

> [Should I be asking this question on chicken-hackers instead of here?]

I think your best bet would be contacting the maintainer of the egg
directly.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [ANN] CHICKEN 5.3.0 release candidate 3 available

2021-09-23 Thread Mario Domenech Goulart
Hi,

On Mon, 20 Sep 2021 09:12:25 +0200 Peter Bex  wrote:

> The third release candidate for CHICKEN 5.3.0 is now available for
> download:
>
>   https://code.call-cc.org/dev-snapshots/2021/09/20/chicken-5.3.0rc3.tar.gz
>
> The sha256sum of that tarball is:
>
>   298ad5eab42ea56c3cc3fcc7343a510e0c41fc13d3b5bdd2f4b1a636458f8f67
>
> The list of changes since 5.2.0 and 5.3.0rc3 is available here:
>
>   https://code.call-cc.org/dev-snapshots/2021/09/20/NEWS
>
> This release candidate makes it possible to build with tcc again
> and fixes two issues on Windows: egg installation scripts were mixing
> uses of msys tools and Windows cmd directives and the test suite has
> some failures on Windows.
>
> Please give this new release candidate a try and report your findings
> to the mailing list.  Here's a suggested test procedure:
>
>   $ make PREFIX= install check
>   $ /bin/chicken-install pastiche
>
> If you can, please let us know the following information about the
> environment on which you test the RC:

Thanks for preparing the rc, Peter.  Here are my results:

Operating system: Debian 11.0
Hardware platform: x86-64
C compilers: GCC 10.2.1, clang 11.0.1-2, TCC 0.9.27
Installation works?: yes
Tests work?: yes
Installation of eggs works?: yes

I used parallel make to build CHICKEN:

   $ make PREFIX= C_COMPILER= -j4 all
   $ make PREFIX= C_COMPILER= install check
   $ /bin/chicken-install pastiche

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [ANN] CHICKEN 5.3.0 release candidate 4 available

2021-10-06 Thread Mario Domenech Goulart
Hi,

On Wed, 6 Oct 2021 11:50:41 +0200 Peter Bex  wrote:

> The fourth release candidate for CHICKEN 5.3.0 is now available for
> download:
>
>   https://code.call-cc.org/dev-snapshots/2021/10/06/chicken-5.3.0rc4.tar.gz
>
> The sha256sum of that tarball is:
>
>   ba8da800e708c423c0e6e812fa2a93b947c731e52d115988b0c0f84406040e14
>
> The list of changes since 5.2.0 and 5.3.0rc4 is available here:
>
>   https://code.call-cc.org/dev-snapshots/2021/10/06/NEWS
>
> This release candidate fixes a regression that happened somewhere
> between 5.2.0 and 5.3.0 which meant static linking was broken for
> programs that used certain builtin modules (#1788).
>
> It also introduces a safety check in the setters for current-user-id,
> current-effective-user-id and current-group-id to ensure that only
> fixnums are passed in (#1787).
>
> Please give this new release candidate a try and report your findings
> to the mailing list.  Here's a suggested test procedure:
>
>   $ make PREFIX= install check
>   $ /bin/chicken-install pastiche

Thanks for the new rc, Peter.

Unfortunately we've found some issues while giving it a try some hours
ago (we had some discussions on IRC):

* chicken.foreign leaks into .link files.  This can be fixed with [0],
  by Felix.  I suppose Felix is going to submit a patch to
  chicken-hackers.

* chicken.csi leaks into .link files.  This issue is actually present in
  the current stable release (5.2.0), but nobody had noticed it.

[0] 
http://paste.call-cc.org/paste?id=d3ce820bd46cc8d8e7cb2b4605c01ccbd8c704ba#a1

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: opencl

2021-10-19 Thread Mario Domenech Goulart
On Tue, 19 Oct 2021 21:54:43 +0200 Kristian Lein-Mathisen 
 wrote:

> I've been experimenting with OpenCL these past few days. I think the
> code might be worthy of becoming an egg. I did learn OpenCL as I went
> along writing this, so problems are very possible. I still hope it can
> be useful to someone. I was surprised how easy this was to test,
> unlike code associated with OpenGL and other sibling projects.
>
> test-new-egg says "Egg looks ok!".
> release-info file is here: 
> https://raw.githubusercontent.com/kristianlm/chicken-opencl/master/opencl.release-info
> Wiki page is up here: http://wiki.call-cc.org/eggref/5/opencl

Thanks, Kristian.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: nng

2021-10-31 Thread Mario Domenech Goulart
Hi Ariela,

On Fri, 29 Oct 2021 13:35:52 -0300 Ariela Wenner  wrote:

> Hi all! I'd like to add my nng egg to the coop. Went through test-new-egg and 
> everything seems fine.
>
> Release info is at 
> https://gitlab.com/ariSun/chicken-nng/-/raw/main/nng.release-info
>
> Wiki page is http://wiki.call-cc.org/eggref/5/nng
>
> This is the first time I publish an egg so please let me know if something's 
> wrong.

Thanks!  That looks very interesting.

I've tried to test your egg as part of the setup procedure of our test
machines and stumbled upon a couple of issues.  I'm using the following
environment:

* Debian 10.11
* GCC 8.3.0
* x86 system (32bit)
* CHICKEN 5.2.0
* nng version 1.5.2

I'm able to compile and install the egg, but when I run tests I get

  csi: symbol lookup error: .../lib/chicken/11/nng.so: undefined symbol: 
pthread_mutexattr_init

I can work around that by using

diff --git a/nng.egg b/nng.egg
index 782ce6c..f5b4f9a 100644
--- a/nng.egg
+++ b/nng.egg
@@ -5,6 +5,6 @@
  (test-dependencies test uuid)
  (dependencies foreigners srfi-18 srfi-69)
  (components (extension nng
-(csc-options "-L" "-lnng")
+(csc-options "-L" "-lnng" "-L" "-lpthread")
 (source "src/nng.scm")))
  (version 0.2.0))


But then tests apparently hang in "tcp pub-sub":

-- testing nng ---
non-blocking . [ PASS]
tcp req-rep .. [ PASS]
inproc req-rep ... [ PASS]
tcp push-pull  [ PASS]
inproc push-pull . [ PASS]
tcp pair . [ PASS]
inproc pair .. [ PASS]
tcp pub-sub .. 

strace doesn't help much:

$ strace -p 19841
strace: Process 19841 attached
restart_syscall(<... resuming interrupted poll ...>

Would you know what can be wrong?

Regarding the documentation, a few notes:

* Please use the actual egg name as main heading (s/chicken-nng/nng/)

* It would be nice to mention which versions of nng the egg is supposed
  to be compatible with.  At least the versions it is known to work with.

* Please add the following sections to the documentation:
  * a "Repository" section with a link to the source repository
  * a "License" section mentioning the license of the egg (should match
what's specified in the .egg file

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: cmark

2021-11-03 Thread Mario Domenech Goulart
Hi Harley,

On Wed, 03 Nov 2021 20:44:31 + "Harley Swick"  
wrote:

> I'm announcing the first release of cmark and would like to add it to the 
> coop.
>
> cmark is a wrapper for the commonmark C library. It also includes a 
> cmark->sxml function
> that I have specifically implemented to be a drop-in replacement for lowdown.
>
> There is a different cmark egg for Chicken 4. Since my additions are 
> significantly larger than
> the total of the old egg, I didn't feel it was fair to drop a bunch of 
> strange code on someone
> who may not want to be stuck maintaining it. I have added aliases to make 
> this egg
> a compatible replacement for users upgrading from 4 to 5. I don't foresee any 
> issues with conflicts since
> this egg only works with Chicken 5.
>
> The wiki page has been made already.
>
> Thanks!
>
> Wiki:
> http://wiki.call-cc.org/eggref/5/cmark
> Source:
> https://git.sr.ht/~fancycade/chicken-cmark

Thanks!  Maybe I'm missing something, but I could not find a
release-info file in the repository.

In case you don't have one, please see
http://wiki.call-cc.org/releasing-your-egg#creating-a-release-info-file
for information on how to create one.

See also
http://wiki.call-cc.org/eggs%20tutorial#testing-your-extension
on how to use it to test your egg.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: cmark

2021-11-04 Thread Mario Domenech Goulart
On Thu, 04 Nov 2021 01:14:13 + "Harley Swick"  
wrote:

> Mario,
>
> Looks like I missed a step. I have added a release-info file and tested it 
> with test-new-egg.
>
> Jim,
>
> Thanks for the feedback. I have updated the wiki with your suggestions.

Thanks, Harley.

Let's just double-check with Caolan whether he has any objection
regarding reusing the egg name from CHICKEN 4, as he is the author of
that egg.

Caolan: would you be ok for you if cmark for CHICKEN 5 points to
Harley's implementation?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: cmark

2021-11-04 Thread Mario Domenech Goulart
On Thu, 04 Nov 2021 12:52:50 + "Caolan McMahon"  wrote:

>> Caolan: would you be ok for you if cmark for CHICKEN 5 points to
>> Harley's implementation?
>
> Yes, please go ahead - and thanks to Harley for creating a CHICKEN 5 version 
> :)

Thanks, Caolan.

Harley: thanks again.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: nng

2021-11-04 Thread Mario Domenech Goulart
Hi Ariela,

On Sun, 31 Oct 2021 17:18:45 -0300 Ariela Wenner  wrote:

> So, here's a followup
>
> I linked pthreads and added the things you suggested to the wiki.
>
> As for the hangs, I hate to say this but it seems like the test was the 
> problem.
> More precisely, it seems like the topic for the subscriber socket wasn't set
> fast enough, so when the publisher socket sent a message, the subscriber 
> wasn't
> ready for it. Hang.
>
> I added some coordination in the test itself and ran the tests over 100 times
> just to be sure. No hang. Maybe I'm just being extremely unlucky though, so as
> always feedback is appreciated.
>
> Just pushed a new tag with the changes, fingers crossed.

Thanks.

I'm sad to report, though, that tests of 0.2.1 still hang here.

I'm testing it with the following command:

  $ test-new-egg nng 
https://gitlab.com/ariSun/chicken-nng/-/raw/main/nng.release-info

I executed the command above three times and tests hanged consistently.

I'm using strace to verify that the test process is not actually doing
anything:

$ strace -p 14836
strace: Process 14836 attached
restart_syscall(<... resuming interrupted poll ...>

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: nng

2021-11-07 Thread Mario Domenech Goulart
Hi Ariela,

On Fri, 05 Nov 2021 09:31:54 -0300 Ariela Wenner  wrote:

> Welp... that's a bummer. I was sure it was a timing issue with the tests.
>
> I'll keep poking at it on different machines to see what I'm missing.
>
> Thanks for giving it a try! Cheers!

Thank you for your efforts and for investigating the issue!  It's nice
that you actually have tests and they seem to be catching issues
(assuming the problem is not in the tests themselves).

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [ANN] CHICKEN 5.3.0 has been released

2021-11-18 Thread Mario Domenech Goulart
On Thu, 18 Nov 2021 08:28:44 +0100 Peter Bex  wrote:

> Dear CHICKEN users,
>
> We are pleased to announce the immediate availability of CHICKEN 5.3.0
> at the following URL:
> https://code.call-cc.org/releases/5.3.0/chicken-5.3.0.tar.gz
>
> This tarball has the following SHA256 checksum:
> c3ad99d8f9e17ed810912ef981ac3b0c2e2f46fb0ecc033b5c3b6dca1bdb0d76
>
> This is a bugfix release which fixes several important issues, and
> it is highly recommended to update to this version.
>
> Irregex has been updated to the latest upstream (0.9.10), which fixes
> a few issues with bol handling and irregex-replace/all with positive
> lookbehind replaces all matches rather than just the first.
>
> A few bugs in the module system's handling of reexport have been fixed,
> as well as a few bugs in the optimization of using argvector directly
> in rest arguments, and a nasty issue where mutated parameters would be
> reset if the mutation happened in a signal handler.
>
> A nice improvement is that to build CHICKEN, on most platforms you no
> longer need to provide the PLATFORM variable to Make; we auto-detect
> the platform you're building on.  Of course, for cross-compilation
> you'll still have to set it.
>
> We tweaked the garbage collector to avoid thrashing when the heap was
> almost full.  This should drastically improve performance for certain
> usage patterns that trigger this pathological behaviour.
>
> Finally, we fixed a few issues on Windows.  There were some misbehaviours
> when using a different shell when building core versus during usage and
> the test suite now should pass again under Windows.
>
> Thanks to everyone who helped to test this release.
>
> For a full list of the changes since 5.2.0, see the NEWS file:
> https://code.call-cc.org/releases/5.3.0/NEWS

Thanks, Peter.

I'd like to also mention two other improvements that combined lead to
mind blowing results: TCC support and the fixes for parallel make.

With those two combined, it's possible to build CHICKEN from scratch in
less than one second on a relatively modern CPU.

Here's an example on my box (Intel i5-8259U):

$ time make PREFIX=$HOME/local/chicken-5.3.0-tcc C_COMPILER=tcc -j8
...
real0m0.741s
user0m3.782s
sys 0m0.615s

All the best.
Mario
-- 
http://parenteses.org/mario



Re: How to share knowledge about known bugs?

2021-12-01 Thread Mario Domenech Goulart
Hi Jörg and all,

On Wed, 1 Dec 2021 10:30:44 +0100 "Jörg F. Wittenberger" 
 wrote:

> one in a while I wonder how to handle a list of eggs not suitable for
> certain situations due to some undocumented internals.

I think a first step would be removing the "un" prefix from
"undocumented". :-)

> Examples like "egg used global variables" vs. "application uses egg
> from multiple threads" come to mind.
>
> Or the case with the "synch" egg, which, last time I checked, combined
> dynamic-wind and mutex use in a flawed way defeating the locking
> purpose.[1]
>
> So far I don't have a good idea how this could be dealt with.  Guess
> some kind of configurable/selectable blocklist would be in order.
> After all global variables are OK if you know there is only one thread
> or you know about them and ensure proper locking.
>
> Important I'd find that the lists and reason of listing should be
> shared somehow.  After all this is about learning undocumented
> things/facts/risks.

Usually we have sections in egg documentation about assumptions, known
bugs, limitations, caveats etc.  The documentation is in our wiki.
Everyone can make contributions to improve the quality of egg
documentation, including mentioning caveats.

Ideally bugs should be fixed, of course.  When they are discovered, they
should be at least reported (e.g., https://bugs.call-cc.org or whatever
issue tracker egg authors use).

I'm not completely sure I understand what you mean by "block list".  I
think the best we can do is document issues, really, and leave it up to
users to decide whether the issues are relevant for their use cases or
not.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Help with egg definitions

2021-12-19 Thread Mario Domenech Goulart
Hi Robert,

On Sun, 19 Dec 2021 01:37:30 -0330 foggy  wrote:

> I'm trying to figure out how to create the egg definition for a
> program with multiple compilation units. Could someone link me to an
> example of such a definition, or somehow help me with this?
>
> I'm currently just using `csc -o PROGRAM src/*.scm` in a makefile, and
> would like to replace this with an egg definition.

One way to achieve that is having, say, the-program.scm including (with
`include') src/part1.scm, src/part2.scm (and so on).

That would be something like

  (program the-program
(source-dependencies "src/part1.scm" "src/part2.scm"))

in the .egg file.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: possible bug in the fmt egg?

2021-12-23 Thread Mario Domenech Goulart
Hi Kristian,

On Mon, 18 Oct 2021 23:27:25 +0200 Kristian Lein-Mathisen 
 wrote:

> I'm playing with the fmt egg and I think I've stumbled upon a problem:
>
> ~> csi -R fmt -P '(fmt #f (num/si 1024))'
> "1Ki"
> ~> csi -R fmt -P '(fmt #f (num/si 0))'
> Error: (log) log of exact 0 is undefined: 0
> klm@pisa ~ [70]> csi -R fmt -P '(fmt #f (num/si -1))'
> Error: (floor) bad argument type - not a real: 0.0+0.453236014182719i
>
> I couldn't find the upstream repo to report to, so I thought I'd try here.

The upstream repository is the CHICKEN Subversion repository.

You can get a copy of it with:

  $ svn co 
https://anonym...@code.call-cc.org/svn/chicken-eggs/release/5/fmt/trunk fmt

The author of fmt is Alex (Cc'ed).

All the best.
Mario
-- 
http://parenteses.org/mario



Re: port-position return value

2022-01-06 Thread Mario Domenech Goulart
Hi Vincent,

On Thu, 6 Jan 2022 10:12:37 +0100 Vincent Aguiléra 
 wrote:

> I'm a new (and so far happy ;-) Chicken Scheme user.

Welcome!

> I'm facing a problem with port-position. The doc states that
> port-position "returns the current position of PORT as two values: row
> and column number".
>
> So this function should return a pair of values (whatever column
> number means). But in the tests I've made so far only the row number
> seems to be returned (tested on the default input port, on file ports
> and on string ports).

Not really a pair, but actually two values (as produced by the `values'
procedure).  CHICKEN provides some binding forms to support multiple
values (e.g., define-values, let-values, receive etc).  In CHICKEN they
are in the chicken.base module [0].  See also SRFIs 8 [1] and 11 [2],
for more detailed information.

[0] http://wiki.call-cc.org/man/5/Module%20(chicken%20base)#other-binding-forms
[1] https://srfi.schemers.org/srfi-8/srfi-8.html
[2] https://srfi.schemers.org/srfi-11/srfi-11.html

> Below are a code snippet and the corresponding csi output.
>
> Hope this list is appropriate for this kind of message!

Definitely!

> Thanks in advance for your help
>
> Vince
>
> =
> (with-input-from-string "ab\ncd\nef"
>   (lambda ()
>   (port-for-each
>   (lambda (c)
>   (print c ': (port-position)))
>   read-char))) 
> ==
> CHICKEN
> (c) 2008-2021, The CHICKEN Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 5.3.0 (rev e31bbee5)
> linux-unix-gnu-x86-64 [ 64bit dload ptables ]
>
> Type ,? for help.
> ; loading test.scm ...
> ; loading /usr/local/lib/chicken/11/chicken.port.import.so ...
> a:1
> b:1
>
> :2
> c:2
> d:2
>
> :3
> e:3
> f:3

That happens because `print' is not aware of multiple values and only
prints the first one.

You can try the following on csi:

  #;1> (port-position)
  2
  0
  ; 2 values
  #;2> (print (values 1 2))
  1
  #;3> (print (let-values (((x y) (values 1 2))) (cons x y)))
  (1 . 2)

I hope this helps.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: daemon

2022-01-08 Thread Mario Domenech Goulart
Hi,

On Sat, 8 Jan 2022 03:07:39 + siiky  wrote:

> I'd like to share a new egg: daemon.
>
> It's a simple way (I think) to create background processes running any
> Scheme thunk. The interface is supposed to be really high-level and
> easy to use, you don't have to touch any `chicken.process` & friends. 
> However, as with all things OS, implementation is tricky, and very
> easy to screw up. As such, I would very much appreciate more eyes on
> it! :) Suggestions, ideas, bug reports, ... any feedback, really, are
> of course just as welcome!
>
> The documentation page has a simple example (also available on the
> repo). For a couple more examples you can check my trmote repo: 
> transmission-verify[0] & transmission-update-seed-priority[1].
>
> Hope you enjoy!
>
>
> The verdict of test-new-egg:
>
>  daemon (1 of 1) 
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 2s
>   Checking version[ -- ]
>   Testing.[ -- ]
>   Checking documentation..[ ok ] 0s
>
> The code repository: https://github.com/siiky/daemon
> The release file:
> https://raw.githubusercontent.com/siiky/daemon/main/daemon.release-info
> The documentation on the wiki: https://wiki.call-cc.org/eggref/5/daemon
>
>
> [0]: https://github.com/siiky/trmote/blob/main/transmission-verify.scm
> [1]:
> https://github.com/siiky/trmote/blob/main/transmission-update-seed-priority.scm

Thanks you!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



[SECURITY] awful-salmonella-tar: path traversal vulnerability

2022-02-19 Thread Mario Domenech Goulart
Hi,

A ..%2F path traversal vulnerability exists in the path handler of
awful-salmonella-tar before version 0.0.4.  Attackers can only list
directories (not read files). This occurs because the `safe-path?'
predicate is not used for directories.

This vulnerability would allow attackers to navigate through the
filesystem of the server (provided execute access to directories for the
user running the web server).  Attackers could only list the contents of
directories -- not download files.

The vulnerability was caused by the lack of a check for the validity
requested paths when handling directories, notably when `..%2F' (`../'
URL-encoded) was present in requested paths.

Background:

awful-samonella-tar [3] is implemented using awful [0].  Awful is
implemented on top of spiffy [1], and overrides the `(handle-not-found)'
parameter to map URL paths to procedures.  Spiffy takes some precautions
regarding dealing with malicious paths when it handles static files.
Code that uses spiffy to implement generation of dynamic content (like
awful does), must take their own precautions.

awful-salmonella-tar uses a procedure (`safe-path?') with a relatively
strict policy to allow access to files, but it was not being used to
validate access to directories, and that was causing the vulnerability.

The fix [2] consists of applying the `safe-path?' procedure to all
requested paths.

Thanks to Chris Brannon for responsibly reporting this issue.

This issue has been assigned CVE-2022-25358.

[0] https://wiki.call-cc.org/eggref/5/awful
[1] https://wiki.call-cc.org/eggref/5/spiffy
[2] 
https://github.com/mario-goulart/awful-salmonella-tar/commit/f705c881769b7610745cd4b4d8ae8b41b3f4f845
[3] https://wiki.call-cc.org/eggref/5/awful-salmonella-tar

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: SRFI-180

2022-02-28 Thread Mario Domenech Goulart
Hi Daniel,

On Mon, 28 Feb 2022 23:56:20 +0100 Daniel Ziltener  wrote:

> I ported the SRFI-180 reference implementation to Chicken 5. The repository 
> is 
> hosted at https://gitea.lyrion.ch/zilti/srfi-180. I added the SRFI-180 
> description as Wiki text at https://wiki.call-cc.org/eggref/5/srfi-180.

The egg tarball cannot be fetched.

  $ test-new-egg srfi-180 
'https://gitea.lyrion.ch/zilti/srfi-180/raw/branch/master/srfi.180.release-info'
  Writing egg-locations for srfi-180 to /tmp/tempdd53.2770909/egg-locations...
  Running /home/mario/local/chicken-5.3.0//bin/henrietta-cache...
  Caching egg 'srfi-180'
  Downloading egg version 1.0.0 from 
https://gitea.lyrion.ch/zilti/awful-sse/archive/1.0.0.tar.gz (CHICKEN release 5)
  Error downloading or extracting egg 'srfi-180' release 1.0.0 (CHICKEN release 
5): 
  Error: Could not fetch targz-file 
https://gitea.lyrion.ch/zilti/awful-sse/archive/1.0.0.tar.gz -- Server error: 
500 Internal Server Error
  Finding out the latest version for srfi-180...
  Leaving /tmp/tempdd53.2770909 for you to manually remove, as you probably 
want to debug something, since something went wrong while installing/testing 
the egg.

I tried multiple times in the last hour or so.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: SRFI-180

2022-03-01 Thread Mario Domenech Goulart
Hi Daniel,

On Tue, 01 Mar 2022 14:19:13 +0100 Daniel Ziltener  wrote:

> well that's embarassing... I didn't commit the correct release-info file. I 
> corrected that now and the repo now contains the correct .release-info file.

Thanks.

Apparently you named your egg srfi.180, which would be quite unusual,
considering that:

  $ grep srfi- egg-locations  | wc -l
  70

  $ grep 'srfi\.' egg-locations  | wc -l
  0

Not sure if that was intentional, but I'd highly recommend following the
current practice of naming SRFI eggs after the srfi- pattern.

Also, please consider
https://wiki.call-cc.org/eggs%20tutorial#testing-your-extension

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: posix-regex

2022-03-16 Thread Mario Domenech Goulart
Hi Sören,

On Wed, 16 Mar 2022 16:55:29 +0100 Sören Tempel  
wrote:

> I have written a small library to wrap the regcomp(3), regexec(3), and
> regerror(3) POSIX functions. This allows using strict POSIX Basic
> Regular Expressions (BREs) and Extended Regular Expressions (EREs) from
> CHICKEN code. My understanding is that irregex only supports EREs with
> PCRE extensions (hence the need for this egg).
>
> I would like to see it added to the egg repository. The source code is
> hosted at https://github.com/nmeum/posix-regex. The release info file is
> available at:
>
>   
> https://raw.githubusercontent.com/nmeum/posix-regex/main/posix-regex.release-info
>
> I have performed tests with test-new-egg and only the documentation step
> fails. I assume this is due to the fact that I haven't created a Wiki
> page yet, I will do so after the egg is added to the repository (it
> wasn't clear to me whether Documentation should be created beforehand).
>
> Let me know if there is anything that needs to be adjusted.
>
> Please CC me, I am not subscribed to the list.

Many thanks.  Your egg has been added to the coop.

Regarding documentation: all fine.  Some people create it in advance,
some after the egg gets added.  Both are good as long as we eventually
have some documentation. :-)

Some nitpicking: is the dependency on r7rs really necessary, assuming
your egg uses the FFI, which is CHICKEN-specific?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: ipfs

2022-03-22 Thread Mario Domenech Goulart
Hi,

On Tue, 22 Mar 2022 20:49:47 + siiky  wrote:

> I'm happy to announce and ask to publish a new egg to the coop, this
> time to interface with an IPFS[0] node (go-ipfs[1]) through its HTTP
> API[2].
>
> You can find the user documentation on the wiki[3]. For
> technical/implementation details I would encourage you to just read
> the code (and maybe the README) available on siiky/ipfs.scm[4].
>
>
> Special thanks to sjamaan for taking some of his own time to help me
> iron out some quirks! And to the always helpful people on IRC, who
> found `open-input-string` for me, and helped me with some macro stuff
> (that I eventually replaced with a simpler interface using just
> `syntax-rules`, thus dropping 2 dependencies).
>
> -
>
> test-new-egg report:
>
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 3m14s
>   Checking version[ -- ]
>   Testing.[ -- ]
>   Checking documentation..[ ok ] 0s
>
>
> And here's the release-info[5].
>
>
> [0]: https://ipfs.io
> [1]: https://github.com/ipfs/go-ipfs
> [2]: https://docs.ipfs.io/reference/http/api
> [3]: https://wiki.call-cc.org/eggref/5/ipfs
> [4]: https://github.com/siiky/ipfs.scm
> [5]: https://raw.githubusercontent.com/siiky/ipfs.scm/main/ipfs.release-info

Many thanks.  Your egg has been added to the coop.

Great egg announcement and documentation, by the way.  Thanks for that.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: pkg-config

2022-04-08 Thread Mario Domenech Goulart
Hi Chris,

On Fri, 08 Apr 2022 03:18:14 -0700 Chris Brannon  wrote:

> I had a need for this.  It's kind of trivial; I hope others find it
> useful.
>
> The release-info file is here:
> https://the-brannons.com/cgit/cgit.cgi/chicken-pkg-config/plain/pkg-config.release-info

Thanks!

Tests fail here.  Maybe a bug in tests?

pkg-config static libs happy path  [ FAIL]
expected ("-L/usr/local/lib" "-lcurl" "-lnghttp2" "-lssl" "-lcrypto" 
"-L/usr/lib" "-lgssapi" "-lgssapi_krb5" "-lheimntlm" "-lkrb5" "-lhx509" 
"-lcom_err" "-lcrypto" "-l
asn1" "-lwind" "-lheimbase" "-lroken" "-lcrypt" "-pthread" "-lz" "-lkrb5" 
"-lgssapi" "-lgssapi_krb5" "-lkrb5" "-lgssapi" "-lgssapi_krb5" 
"-L/usr/local/lib" "-pthread") but
 got ("-L/usr/local/lib" "-lcurl" "-lnghttp2" "-lssl" "-lcrypto" "-lgssapi" 
"-lgssapi_krb5" "-lheimntlm" "-lkrb5" "-lhx509" "-lcom_err" "-lcrypto" "-lasn1" 
"-lwind" "-lhei
mbase" "-lroken" "-lcrypt" "-pthread" "-lz" "-lkrb5" "-lgssapi" "-lgssapi_krb5" 
"-lkrb5" "-lgssapi" "-lgssapi_krb5" "-pthread")
(pkg-config:libs "libcurl" #:static #t)

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: pkg-config

2022-04-08 Thread Mario Domenech Goulart
On Fri, 08 Apr 2022 16:45:06 -0700 Chris Brannon  wrote:

> Mario Domenech Goulart  writes:
>
>> Tests fail here.  Maybe a bug in tests?
>
> It is an environment difference I overlooked.  There are at least two
> implementations of pkg-config: the reference one and pkgconf.  The
> reference implementation appears to implicitly insert -L/usr/lib in
> --static --libs output, but pkgconf does not.  Locally I use pkgconf, so
> I didn't catch this.
>
> I tagged 0.1.1 with fixed tests.

Many thanks.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: matrico

2022-04-28 Thread Mario Domenech Goulart
Hi Christian,

On Thu, 28 Apr 2022 22:21:26 +0200 (CEST) Christian Himpe 
 wrote:

> I would like to communicate the pre-release of the "matrico" egg,
> which provides real-valued flonum matrix functionality for numerical
> computation and linear algebra in pure CHICKEN Scheme:
>
> https://github.com/gramian/matrico
>
> This project is still in (early) development, and I welcome feedback
> in general, but particularly on what needs to be added or fixed to be
> included into the official egg index, egg repository and egg reference
> (I prepared some documentation under `doc/matrico.wiki`). Thank you!

Thanks!

For us to add your egg to the egg index our tools must be able to fetch
and install it.

You can test that process with test-new-egg:
http://wiki.call-cc.org/eggs%20tutorial#testing-your-extension

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: matrico

2022-04-30 Thread Mario Domenech Goulart
On Sat, 30 Apr 2022 15:10:21 +0200 (CEST) Christian Himpe 
 wrote:

> I would appreciate if somebody could verify that "matrico" can be
> fetched and installed. Here is the `.release-info`:
>
> https://raw.githubusercontent.com/gramian/matrico/main/matrico.release-info
>
> Thank you very much

Thank you.  Your egg has been added to the coop.

P.S.: According to the declaration in the .egg file the egg is
Linux-specific.  Not sure if that's intentional or if the declaration is
some leftover from tests.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: (srfi 232) flexible curried procedures

2022-05-12 Thread Mario Domenech Goulart
On Wed, 11 May 2022 15:24:48 -0400 Wolfgang Corcoran-Mathe  
wrote:

> I'd like to announce a new egg for SRFI 232: Flexible curried procedures.
> It provides a lambda-like 'curried' form for creating procedures that
> can be applied to arguments one by one or all at once.  See the wiki
> page for examples:
>
> https://wiki.call-cc.org/eggref/5/srfi-232
>
> The only dependency is (srfi 1); the included tests use the 'test'
> egg, as usual.
>
> Please send me any bug reports or suggestions.
>
> Coop information: The release info file is at
>
> https://raw.githubusercontent.com/Zipheir/srfi-232-chicken/0.1/release-info
>
> test-new-egg says "Egg looks good!".

Thanks, Wolfgang.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: SRFI-180

2022-05-14 Thread Mario Domenech Goulart
Hi,

Daniel has fixed the issues and srfi-180 is now available as an egg.

Thanks, Daniel!

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: (slib wt-tree) weight-balanced trees

2022-05-26 Thread Mario Domenech Goulart
Hi,

On Wed, 25 May 2022 21:19:12 -0400 Wolfgang Corcoran-Mathe  
wrote:

> I'm renaming the above egg to slib-wt-tree, since Henrietta doesn't
> like the embedded dot in slib.wt-tree.  Note that the name of the
> module hasn't changed: it's still (slib wt-tree) or slib.wt-tree.
> So, to install this egg, run
>
> chicken-install slib-wt-tree
>
> Sorry for the confusion.  All of the URLs mentioned in the previous
> email are still current, and the wiki page will not move.

Many thanks Wolfgang for the egg and for checking the validity of its
name.

slib-wt-tree has been added to the coop and is avaible for installation.

I've documented the conventions/rules for egg names in [0] and released
a new version (1.0.4) of test-new-egg [1] that checks whether egg names
are valid.

[0] https://wiki.call-cc.org/eggs%20tutorial#naming-your-extension
[1] https://wiki.call-cc.org/eggref/5/test-new-egg

All the best.
Mario
-- 
http://parenteses.org/mario



Re: LSP Server for CHICKEN (and more ...)

2022-06-11 Thread Mario Domenech Goulart
Hi Ricardo,

On Sat, 11 Jun 2022 12:09:05 + "Ricardo G. Herdt"  wrote:

> I mentioned my work on an LSP server for Scheme a while ago. For those
> that don't know the Language Server Protocol (LSP), it is meant for 
> adding programming language support for IDEs and editors that
> implement the protocol (nowadays most of them support it). After a
> long pause period due to private reasons, I finally managed to get it
> into a working state, so here my results:
>
> 1) You can find the server here:
> https://codeberg.org/rgherdt/scheme-lsp-server
>
> For now I am focusing on Guile 3 and CHICKEN 5. The idea is to write
> as much R7RS for common code as possible (like representing documents, 
> fetching word under cursor etc.) and leave implementation specific
> code to dedicated files. So far I managed to implement
> auto-completion, fetch signature, fetch documentation and jump to
> definition. "Jump to definition" has some particularities in the
> CHICKEN case (I basically scan some paths for scheme files and keep
> track of changes) see
> https://codeberg.org/rgherdt/emacs-lsp-scheme#chicken.
>
> note: salmonella's Testing is failing, although chicken-install -test
> works. I'm investigating it.

Maybe
http://wiki.call-cc.org/eggref/5/salmonella#testing-executable-files-installed-by-eggs
can help.

> 2) An LSP server without a client is quite useless, so I'm also
> sharing an emacs-lsp client:
>
> Repo: https://codeberg.org/rgherdt/emacs-lsp-scheme
>
> I will create a PR to melpa for this. Until it is merged, you can
> clone the repo somewhere, 'load' it and follow the instructions in the
> README to activate it.
>
> 3) The whole idea behind LSP is to improve language support across
> multiple IDEs/editors. So I started a proof of concept in VS Code:
>
> https://codeberg.org/rgherdt/vscode-scheme-lsp
>
> Since I don't use VS Code, I don't know how similar extensions
> typically work and don't have a clear idea how a lispy LSP client
> should/could look like in it. If you have ideas, or want to
> contribute, feel free to contact me. It is not documented nor
> published yet, but already works for the functionality mentioned
> (there are a couple of commands to launch a REPL and load files on
> it). I will investigate how to automate installation of the LSP server
> before publishing it and let you know.
>
> Everything is on an early stage of development, and APIs may change. I
> tested it using following software:
> - CHICKEN 5.3.0
> - Guile 3.0.8
> - Emacs 27.1 and 28.1
> - Debian Bullseye and Ubuntu 18.04
>
> Any questions, suggestions, critics and contributions are welcome. You
> can also reach me on @libera's #chicken, #scheme channels (rgherdt).
>
> Have a nice weekend!

Many thanks for the update!

All the best.
Mario
-- 
http://parenteses.org/mario



Re: LSP Server for CHICKEN (and more ...)

2022-06-13 Thread Mario Domenech Goulart
Hi Ricardo,

On Sun, 12 Jun 2022 11:59:59 + "Ricardo G. Herdt"  wrote:

> Am 11.06.2022 17:18 schrieb Mario Domenech Goulart:
>> Maybe
>> http://wiki.call-cc.org/eggref/5/salmonella#testing-executable-files-installed-by-eggs
>> can help.
>
> With your hint and wasamasa's help I figured out how to solve it,
> thank you both. The problem is that chicken-doc doesn't find a repo in
> the created environment. Even though I don't use chicken-doc in my
> tests, it caused salmonella to fail.
>
> I solved this by adding a bash script that, when running salmonella,
> creates the needed 
> /repo/share/chicken-doc/.chicken-doc-repo dummy
> file. The script is called by a 'generated-source-file' component I 
> added to the egg definition.
>
> @Mario: can you please add the egg to the coup?

0.0.1 still fails with:

Error: No chicken-doc repository found at:
"/tmp/tempcb67.358965/lsp-server/0.0.1/salmonella-tmp-6c2a7/repo/share/chicken-doc"

If I understand correctly, the fix was in ac62233be8, but the 0.0.1 tag
is behind that.  Maybe you forgot to release a new version?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: LSP Server for CHICKEN (and more ...)

2022-06-13 Thread Mario Domenech Goulart
On Mon, 13 Jun 2022 12:04:56 + r.he...@posteo.de wrote:

> Thanks for pointing this out. Fixed.

You're welcome.  Now installation of 0.0.3 fails with:

Error: Module `lsp-server' has unresolved identifiers
  In file `src/server.scm':

  Unknown identifier `json-rpc-log-file'
In procedure `parameterize-and-run' on line 285

I'd suggest using test-new-egg to catch such issues.  See
http://wiki.call-cc.org/eggs%20tutorial#testing-your-extension for more
info.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: LSP Server for CHICKEN (and more ...)

2022-06-13 Thread Mario Domenech Goulart
On Mon, 13 Jun 2022 19:54:06 + "Ricardo G. Herdt"  wrote:

> There was a change in scheme-json-rpc that I forgot to push, and
> scheme-lsp-server relies on it. It should work now.

Thanks.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: CHICKEN version dependent expansion

2022-06-28 Thread Mario Domenech Goulart
Hi,

On Tue, 28 Jun 2022 23:00:37 +0300 Lassi Kortela  wrote:

>>> #;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c))
>>> a
>> This only seems to let me differentiate between major versions and
> not minor versions, am I correct? I would need to decide based on
> minor versions.
>
> #;2> (cond-expand (chicken-5.3 'a) (else 'b))
> a
>
> To find these, I used the r7rs egg (since the r7rs standard mandates a
> `features` procedure).
>
> $ chicken-install r7rs
> $ csi -R r7rs
> #;1> (features)
> (r7rs srfi-13 srfi-14 ...)

There's also `features' from chicken.platform, in case you don't want to
depend on the r7rs egg only for that.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: utf8 printing problem

2022-07-23 Thread Mario Domenech Goulart
Hi Mátyás,

On Sat, 23 Jul 2022 11:13:39 +0200 Mátyás Seress  wrote:

> I wanted to try out printing some utf8 text to the console, but I ran into 
> some issues. This is my program:
>
> (import utf8) 
> (print "őŐűŰ")
>
> And when I run it on the command line with 
>
> csi test-utf.scm 
>
> then I get this output:
>
> CHICKEN
> (c) 2008-2019, The CHICKEN Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 5.1.0 (rev 8e62f718)
> mingw32-windows-gnu-x86 [ dload ptables ]
>
> ; loading test-utf.scm ...
> ; loading c:/chicken/lib/chicken/11/utf8.import.so ...
>

> ; loading c:/chicken/lib/chicken/11/utf8.so ...
> ; loading c:/chicken/lib/chicken/11/regex.so ...
> ; loading c:/chicken/lib/chicken/11/utf8-lolevel.so ...
> őŐűŰ
>
> As you can see, it prints ┼æ┼É┼▒┼░ instead of őŐűŰ. When I write a
> similar program in C# it does it correctly by default. It seems that
> the (import utf8) has no effect at all, because if I comment out the
> (import utf8) line and run it, then I get the same exact weird output.
>
> What am I doing wrong? How can I properly work with strings that
> contain non-English characters? (Btw the file is saved with UTF-8
> encoding and I'm using Windows.)

I cannot reproduce that problem with CHICKEN 5.3 on Debian.

  $ cat u.scm
  (import utf8)
  (print "őŐűŰ")

  $ csi -s u.scm
  őŐűŰ

Isn't the problem related to your terminal?  Maybe redirect the output
of your program to a file and open it in an editor that supports UTF-8
to see if the problem persists.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: TOML wrapper

2022-09-03 Thread Mario Domenech Goulart
Hi Daniel,

On Fri, 2 Sep 2022 12:25:33 +0200 Daniel Ziltener  wrote:

> I just finished a first version of a wrapper for the TOML
> configuration format. For this I took the tomlc99 implementation 
> https://github.com/cktan/tomlc99 and made a thin layer for it to use
> it conveniently from Chicken.
>
> The repository is at https://gitea.lyrion.ch/zilti/toml.git, and the
> documentation can be found at http://wiki.call-cc.org/eggref/5/toml.
>
> I hope it can be added to the repository and that it may be of use for
> some of you.

Thanks.  Unfortunately I cannot access the repository:

  $ git clone https://gitea.lyrion.ch/zilti/toml.git
  Cloning into 'toml'...
  Username for 'https://gitea.lyrion.ch':
  Password for 'https://gitea.lyrion.ch':
  remote: Unauthorized
  fatal: Authentication failed for
  'https://gitea.lyrion.ch/zilti/toml.git/'

henrietta-cache won't be able to fetch from it.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: TOML wrapper

2022-09-05 Thread Mario Domenech Goulart
On Mon, 5 Sep 2022 20:03:44 +0200 Daniel Ziltener  wrote:

> oops, I created the repo private. Adjusted the visibility now. I hope
> all else about it is fine.

I get the following error when I run
"test-new-egg toml 
'https://gitea.lyrion.ch/zilti/toml/raw/branch/master/toml.release-info'":

executing: "sh /tmp/tempa40d.2133470/toml/0.5/toml.build.sh"
   csc -host -setup-mode -I /tmp/tempa40d.2133470/toml/0.5 -s -c -C 
-I/tmp/tempa40d.2133470/toml/0.5 -O2 -d1 
/tmp/tempa40d.2133470/toml/0.5/tomlc99/toml.c -o 
/tmp/tempa40d.2133470/toml/0.5/tomlc99/toml.o
csc: file `/tmp/tempa40d.2133470/toml/0.5/tomlc99/toml.c' does not exist

It looks like the egg file assumes the submodule of tomlc99 is checked
out, which is not the case in the source tarball fetched by
henrietta-cache.

Also the installer of tomlc99 is broken at the revision pointed by the
git submodules configuration in the egg sources repository:

$ make install
install -d /usr/local/include /usr/local/lib
install toml.h /usr/local/include
install libtoml.a /usr/local/lib
install libtoml.so.1.0 /usr/local/lib
install libtoml.pc /usr/local/lib/pkgconfig
install: cannot stat 'libtoml.pc': No such file or directory
make: *** [Makefile:39: install] Error 1

I could work around that by renaming libtoml.pc.sample to libtoml.pc,
undoing the renaming done in 64e280e20b3d.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: TOML wrapper

2022-09-06 Thread Mario Domenech Goulart
On Tue, 6 Sep 2022 13:50:28 +0200 Daniel Ziltener  wrote:

> Git Subtree did the trick. The archive contains everything necessary
> now :) Thanks! I didn't know about Git Subtree.

Thanks, Daniel.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Minor typo in posixunix.scm

2022-09-14 Thread Mario Domenech Goulart
On Wed, 14 Sep 2022 10:19:09 -0400 Matt Welland  wrote:

> posixunix.scm:  (posix-error #:file-error 'create-symbol-link "cannot 
> create symbolic link" old new) ) ) )
>
> Should probably be "create-symbolic-link".

Thanks for reporting that, Matt.  I've pushed a fix:
https://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=cf1e956b494ffdb2e1454fb1d3234e841ba23bdd

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Request for addition of new egg: Redis

2022-10-29 Thread Mario Domenech Goulart
Hi Daniel,

On Wed, 26 Oct 2022 00:02:48 +0200 Daniel Ziltener  wrote:

> I wrote a new egg for Redis, supporting the latest data protocol
> (RESP3) and would like to have it added to the repository.
> The repository is located at https://gitea.lyrion.ch/zilti/redis.
> As the version number suggests, this may or may not be suitable for
> full production use yet - I only need it for rather simple Redis use
> cases, so tests for more complex scenarios are missing. I'll gladly
> add them and fix bugs if provided though.

Thanks!  Your egg has been added to the coop.

We also have a redis egg for CHICKEN 4 [0].  Not sure if you had seen
it.  Maybe it can ser as inspiration (beware of the license, though).

[0] https://wiki.call-cc.org/eggref/4/redis

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: gmi

2022-10-29 Thread Mario Domenech Goulart
Hi,

On Fri, 28 Oct 2022 02:15:25 +0100 siiky  wrote:

> I'd like to share with everyone a new egg. It was sitting and
> gathering dust for a while now even though it was already all ready to
> rock (yay for bad puns).
>
> It's a small(ish) egg you can use to read and manipulate Gemtext, with
> no other dependencies.
>
> You can find the repo here[0], the docs in the wiki[1], and the
> release-info file here[2].
>
> [0]: https://git.sr.ht/~siiky/gmi.scm
> [1]: https://wiki.call-cc.org/eggref/5/gmi
> [2]: https://git.sr.ht/~siiky/gmi.scm/tree/main/item/gmi.release-info
>
>
> $ test-new-egg gmi
> https://git.sr.ht/~siiky/gmi.scm/blob/main/gmi.release-info
> (...)
>  gmi (1 of 1) 
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 2s
>   Checking version[ -- ]
>   Testing.[ -- ]
>   Checking documentation..[ ok ] 0s

Many thanks.  Your egg has been added to the coop.  Also thanks for the
nice submission (links and test-new-egg output).

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: arcadedb

2022-11-15 Thread Mario Domenech Goulart
Hi Christian,

On Tue, 15 Nov 2022 00:44:45 +0100 Christian Himpe  
wrote:

> I would like to announce the first release candidate of the “arcadedb”
> egg with a repository at GitHub:
>
> https://github.com/gramian/chicken-arcadedb
>
> This egg provides a driver / client for the multi-model NoSQL database
> ArcadeDB ( https://arcadedb.com ) in CHICKEN Scheme, and requires a
> running database instance. Feel free to give feedback or ask
> questions.
>
> PS: Testing the egg with:
>
> test-new-egg arcadedb 
> https://raw.githubusercontent.com/gramian/chicken-arcadedb/main/arcadedb.release-info
>
> tests pass, except “Checking version” (—), “Testing” (—), and “Checking 
> documentation” (fail).

Thanks!  Your egg has been added to the coop.

A note regarding dependencies: they are usually mentioned as build time
dependencies.  I have a feeling the dependencies you mention are run
time ones.  Maybe you want to clarify that in the documentation.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: arcadedb

2022-11-15 Thread Mario Domenech Goulart
Hi Christian,

On Tue, 15 Nov 2022 21:48:49 +0100 Christian Himpe  
wrote:

> Thank you for adding my egg. With regard to your dependency remark: I
> assume you refer to the README docs and not .egg file(?), which I will
> clarify. Please let me know if I made an error in the .egg file.

Indeed, it's about the documentation.  The egg file is good.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Partial automation of egg dependencies

2022-11-21 Thread Mario Domenech Goulart
Hi Lassi,

On Sun, 20 Nov 2022 20:55:09 +0200 Lassi Kortela  wrote:

> I have a .egg file for a portable Scheme program substantial enough
> and fast-moving enough that the dependencies are constantly getting
> out of sync.
>
> Would it be possible to add a feature something like this?
>
> (extension foo.bar
>   (source "bar.sld")
>   (auto-dependencies)  ; <-- The new feature.
>   (csc-options "-R" "r7rs" "-X" "r7rs"))
>
> auto-dependencies would compute the deps by traversing the given
> source file. It would look at csc-options and notice that r7rs is
> being used. Then expect an R7RS-style define-library form in bar.sld,
> look at (import ...) libraries matching those in the .egg and add
> those to component-dependencies, as well as traverse all (include
> "...") and add those to (source-dependencies ...).
>
> If csc-options doesn't say r7rs, it would do the same, but expect
> Chicken module syntax instead.
>
> I wrote some code to grovel r7rs libraries, and there's probably
> similar stuff in csm and Akku.scm too. So if the feature is ok we
> could stitch together the implementation from these.

My take on that as a user: I care about dependencies and tend to avoid
eggs with many dependencies.  If I see `(auto-dependencies)' in an egg
file, I don't know the dependencies of that egg.  I would not like that.

Also, that would break the [reverse] dependency ranks of salmonella
reports. Examples:

* 
http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/ranks/deps.html
* 
http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/ranks/rev-deps.html

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Partial automation of egg dependencies

2022-11-21 Thread Mario Domenech Goulart
On Mon, 21 Nov 2022 17:58:27 +0100 Mario Domenech Goulart 
 wrote:

> On Sun, 20 Nov 2022 20:55:09 +0200 Lassi Kortela  wrote:
>
>> I have a .egg file for a portable Scheme program substantial enough
>> and fast-moving enough that the dependencies are constantly getting
>> out of sync.
>>
>> Would it be possible to add a feature something like this?
>>
>> (extension foo.bar
>>   (source "bar.sld")
>>   (auto-dependencies)  ; <-- The new feature.
>>   (csc-options "-R" "r7rs" "-X" "r7rs"))
>>
>> auto-dependencies would compute the deps by traversing the given
>> source file. It would look at csc-options and notice that r7rs is
>> being used. Then expect an R7RS-style define-library form in bar.sld,
>> look at (import ...) libraries matching those in the .egg and add
>> those to component-dependencies, as well as traverse all (include
>> "...") and add those to (source-dependencies ...).
>>
>> If csc-options doesn't say r7rs, it would do the same, but expect
>> Chicken module syntax instead.
>>
>> I wrote some code to grovel r7rs libraries, and there's probably
>> similar stuff in csm and Akku.scm too. So if the feature is ok we
>> could stitch together the implementation from these.
>
> My take on that as a user: I care about dependencies and tend to avoid
> eggs with many dependencies.  If I see `(auto-dependencies)' in an egg
> file, I don't know the dependencies of that egg.  I would not like that.
>
> Also, that would break the [reverse] dependency ranks of salmonella
> reports. Examples:
>
> * 
> http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/ranks/deps.html
> * 
> http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/ranks/rev-deps.html

Also the [reverse] dependency graph pages.  Examples:

* 
http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/dep-graphs/srfi-99.html
* 
http://salmonella-linux-x86-64.call-cc.org/master/gcc/linux/x86-64/2022/11/21/salmonella-report/rev-dep-graphs/srfi-99.html

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Partial automation of egg dependencies

2022-11-21 Thread Mario Domenech Goulart
On Mon, 21 Nov 2022 19:09:43 +0200 Lassi Kortela  wrote:

>> My take on that as a user: I care about dependencies and tend to avoid
>> eggs with many dependencies.  If I see `(auto-dependencies)' in an egg
>> file, I don't know the dependencies of that egg.  I would not like that.
>> Also, that would break the [reverse] dependency ranks of salmonella
>> reports.
>
> auto-dependencies should only cover things that are possible to
> compute statically by looking at the source files. So you'd have a
> simple, predictable tool that expands them to manual dependencies at
> will.
>
> The main source of trouble is that this:
>
> (import foo bar baz)
>
> specifies stuff that is then duplicated in the .egg file. When the
> imports change, the .egg has to be changed too. Else the build may
> break.
>
> This is the same problem that C/C++ programmers face in keeping
> makefiles synced with #include. Many of them concluded that thy can't 
> maintain correct makefiles by hand, and wrote tools like makedepend.

I think I understand the problem, but I'm not sure I understand the
solution (I'm probably missing something). :-)

* Regarding the usability problem mentioned, I still don't see how a
  user could easily see all the dependencies of an egg if the egg file
  has only `(auto-dependencies)'.

* Regarding the problem related to salmonella reports, I suppose
  salmonella would have to rely on some file emitted by chicken-install
  to be able to figure out dependencies.

* Regarding the import problem, another thing to keep in mind is that we
  don't have a 1-1 mapping between egg and module names.  Module names
  don't have to be the same as egg names and one egg might ship zero,
  one or multiple modules.  If you have `(import foo)' it doesn't mean
  that the `foo' module is shipped by an egg called `foo'.

* How can `auto-dependencies' deal with egg versions?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Personal library

2022-11-21 Thread Mario Domenech Goulart
Hi Bob,

On Sun, 20 Nov 2022 17:53:12 + Bob Heffernan  
wrote:

> felix.winkelm...@bevuta.com writes:
>> csc -s lib1.scm -J
>> csc -s lib1.import.scm # assuming lib1.scm defines a module named "lib1"
>> OLD=$(csi -p '(begin (import (chicken platform)) (car (repository-path)))')
>> export CHICKEN_REPOSITORY_PATH=:$OLD
>
> This seems pretty close to the way I already do things, thank you.
>
> Chris' personal egg approach might be the way to go when I get a little
> more comfortable with chicken, so thank you too Chris!

Another very straightforward way would be using `include'.

You can set CHICKEN_INCLUDE_PATH to the directory where you keep your
code and just use `(include "some-file.scm")' from the user-code.  You
can also use `include-relative' for the code under CHICKEN_INCLUDE_PATH.

Please note that if some-file.scm defines a module (or multiple ones),
you'll also need `(import some-module)'.

This might not be the best approach for large amounts of code, though,
specially if you are compiling.  And it also can quickly get messy if
you start having lots of dependencies based on `include'.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: eggs-5-latest git repo not updating

2022-11-25 Thread Mario Domenech Goulart
Hi Chris,

On Fri, 25 Nov 2022 00:56:25 -0800 Chris Brannon  wrote:

> Looks like git://code.call-cc.org/eggs-5-latest hasn't had an update in
> a week.  Compare with git://code.call-cc.org/eggs-5-all.

Thanks for reporting this and apologies for the inconvenience.  The
issue should be fixed now.

Please let me know if you experience any problem.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: ssql ported to CHICKEN 5 and with new maintainer

2022-12-18 Thread Mario Domenech Goulart
Hi Chris,

On Sun, 18 Dec 2022 09:32:13 -0800 Chris Brannon  wrote:

> I've ported ssql to CHICKEN 5 and taken over maintenance from Moritz
> Heidkamp, with permission.
> The release-info file is here:
> https://the-brannons.com/fossil/ssql/raw?ci=trunk&filename=ssql.release-info

Many thanks!  I've added ssql to the CHICKEN 5 coop.  Are you going to
maintain it for CHICKEN 4 as well?  In other words: should I update the
location for CHICKEN 4?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: states

2023-01-03 Thread Mario Domenech Goulart
Hi,

On Mon, 02 Jan 2023 22:52:32 -0300 Bowuigi  wrote:

> States is a Finite State Machine library that aims to have a seamless
> integration with the (fairly common) function calls style for
> representing them.
>
> Here is the release-info URI: 
> https://codeberg.org/Bowuigi/States/raw/branch/main/states.release-info
>
> There is already a wiki page for it as well.

Many thanks!  Your egg has been added to the coop.

> Have fun and happy new year!

Thanks! Happy new year!

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: CHICKEN Transducers

2023-01-04 Thread Mario Domenech Goulart
On Wed, 4 Jan 2023 18:48:56 -0700 Jeremy Steward  wrote:

> I've been somewhat bothered by the fragmentation in a certain aspect
> of Scheme / Lisp: notably that there isn't really something akin to
> Rust's Iterator trait in Scheme, and as a result working across
> various collections and data types is a pain.
>
> So I introduce to you - Transducers! These are very similar to
> Clojure's transducers, but add one more parameter: a fold procedure. I
> was unhappy with SRFI-158 (Generators & Accumulators) and also unhappy
> with SRFI-171 (mostly because of how sparse the API is).
>
> test-new-egg passes with the following release-info:
>
> 
>
> I've already added extensive documentation to the wiki page:
>
> 
>
> And I've written a short blog post outlining some of my frustrations
> that led me to writing this egg:
>
> 
>
> Happy to engage with the rest of the community on what the next
> priority for such a library should be. My hope is that this library
> helps us all move away from XXX-map and XXX-filter procedures for each
> individual type.
>
> First things first: I'll probably keep trying to add more common data
> type support (SRFI 146 mappings and SRFI 69 hash-tables come to mind)
> as I can. Let me know if you find this useful!

Many thanks, Jeremy.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: openssl eggs: current-milliseconds -> current-process-milliseconds

2023-02-21 Thread Mario Domenech Goulart
Hi Pietro,

On Tue, 21 Feb 2023 10:23:05 + Pietro Cerutti  wrote:

> On Feb 21 2023, 10:13 UTC, siiky  wrote:
>
>>If you don't mind me asking, why?
>
> heh - I don't like to see deprecation warnings when I build stuff :)
>
>> From my understanding (disclaimer: not a maintainer of the openssl
>> egg nor CHICKEN core maintainer), I think current-milliseconds can
>> stay for now. current-milliseconds has been deprecated in 5.3 but
>> hasn't been removed yet, it's an "alias" for
>> current-process-milliseconds. So everything should work with
>> current-milliseconds in 5.3 and 5.x before it. But if it was changed
>> to current-proess-milliseconds the openssl egg would no longer work
>> with 5.x before 5.3.
>
> I don't know what's the support policy for older releases in the 5.x
> series, but by your logic, no egg at all can use 
> current-process-milliseconds for the same reason of it not being
> available before 5.3. Eggs are versions by major release, so I would 
> guess that the support policy would be the same for all 5.x eggs?
>
> If breaking 5.X | X < latest is a concern, this means
> current-milliseconds must stay in 6.x and can only be removed in 7.x?

I tend to agree with you.

In my opinion, the deprecation of current-milliseconds was too late for
5.X and is too early for 6.X, for the reason you stated.

So egg authors have basically the following options:

1. Use current-process-milliseconds and assume that users will be using
   a recent enough version of CHICKEN (users of older versions will just
   get an error).

2. Use current-milliseconds and annoy users with a deprecation warning.

3. Use some convoluted cond-expand clause to match against values of X
   (as in 5.X) as an attempt to prevent the deprecation warning and
   undefined variable errors.

Not sure if there is any other way without custom build scripts doing
some tricks with chicken-version (e.g., to print a clear error message
indicating that CHICKEN 5.3 is required).

Since current-milliseconds is part of the core API, I think it should
have been deprecated when 5.0 was released (when
current-process-milliseconds should have been made available), and
removed in the 6.0 release; or deprecated in the 6.0 release and removed
in 7.0 release.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: srfi-115 regular expressions

2023-02-21 Thread Mario Domenech Goulart
Hi Wolfgang,

On Tue, 21 Feb 2023 15:41:37 -0500 Wolfgang Corcoran-Mathe  
wrote:

> I’d like to announce my (srfi 115) egg and add it to the coop. It
> provides the SRFI 115 regular expression library. While SRFI 115 and
> irregex are by the same author and have similar interfaces, the different
> names and SRE language extensions make them incompatible. I hope this
> egg will reduce the difficulty of running SRFI 115 code on CHICKEN.
>
> A few forms and SRE elements—mainly those related to Unicode—are
> currently unsupported. See the wiki page for details.
>
> Suggestions and fixes are welcome.
>
> Regards, Wolfgang
>
> Release info: 
> https://raw.githubusercontent.com/Zipheir/srfi-115-chicken/main/release-info
>
> Wiki page: http://wiki.call-cc.org/eggref/5/srfi-115

Many thanks!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: openssl eggs: current-milliseconds -> current-process-milliseconds

2023-02-22 Thread Mario Domenech Goulart
On Wed, 22 Feb 2023 12:17:23 + siiky  wrote:

>> I don't know what's the support policy for older releases in the 5.x
>> series, but by your logic, no egg at all can use 
>> current-process-milliseconds for the same reason of it not being
>> available before 5.3.
>
> AFAIK there's no hard set of rules about egg compatibility with
> CHICKEN versions, each egg author chooses how and what to support. If
> you want to use current-process-milliseconds in your eggs go right
> ahead! :)

It's not that simple, as using current-process-milliseconds would break
things for people using CHICKEN 5.2 or earlier.

> However, personally, I don't see the advantage of using
> current-milliseconds over current-process-milliseconds in eggs. As of 
> now, both calls work, the userbase is already small, and the amount of
> available libraries is also not huge (comparing to popular
> languages). Why should I artificially restrict which CHICKEN versions
> users of my eggs can use? (I know of at least one person using 5.2
> though they probably don't use any of my eggs)

People using CHICKEN from Debian stable, for example, get CHICKEN 5.2.

> TLDR: I would choose (2) of Mario's options, but you can choose any
> option you prefer.
>
>> If breaking 5.X | X < latest is a concern, this means
>> current-milliseconds must stay in 6.x and can only be removed in
>> 7.x?
>
> Hm I don't see how that follows. Removing current-milliseconds in 6.x
> doesn't break anything 5.x.

Right, but just because that's already kinda broken in 5.X.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: disjoint-set

2023-02-25 Thread Mario Domenech Goulart
Hi,

On Sat, 25 Feb 2023 14:32:42 + siiky  wrote:

> I'm announcing and asking to publish a new egg to the coop, an
> imperative implementation of Disjoint Sets[0].
>
> As usual, the user documentation is on the wiki[1]. Here is the
> repo[2] and the release-info[3].
>
>
> test-new-egg report:
>
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 2s
>   Checking version[ -- ]
>   Testing.[ -- ]
>   Checking documentation..[ ok ] 0s
>
>
> [0]: https://en.wikipedia.org/wiki/Disjoint-set_data_structure
> [1]: https://wiki.call-cc.org/eggref/5/disjoint-set
> [2]: https://git.sr.ht/~siiky/disjoint-set.git
> [3]:
> https://git.sr.ht/~siiky/disjoint-set.git/blob/main/disjoint-set.release-info

Many thanks!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Pass argument to function

2023-03-10 Thread Mario Domenech Goulart
On Fri, 10 Mar 2023 20:15:13 +0300 Nevroz Arslan  wrote:

>> (capture ,(string-append "docker inspect " str))) 
> doesn't work because of the same reason that you expressed. 
> You would get "quasiquote not found" from the shell.

Actually, no:

  $ csi -R shell -p '(capture ,(string-append "echo" " foo"))'
  foo

All the best.
Mario
-- 
http://parenteses.org/mario



Re: chicken-install woes

2023-04-13 Thread Mario Domenech Goulart
Hi Duke,

On Wed, 12 Apr 2023 23:07:40 -0600 Duke Normandin  wrote:

> Hello list ...
>
> [quote]
>  chicken-install -s apropos chicken-doc
>
> building matchable
>/usr/bin/csc -host -D compiling-extension -J -s
> -regenerate-import-libraries -setup-mode
> -I /home/dnormandin/.cache/chicken-install/matchable -C
> -I/home/dnormandin/.cache/chicken-install/matchable -O2 -d1
> matchable.scm
> -o /home/dnormandin/.cache/chicken-install/matchable/matchable.so
>
> Error: segmentation violation
>
>   Call history:
>
> (##core#begin (##core#declare
> (always-bound ##sys#standard-input ##sys#standard-output
> ##sys#standar...(##core#declare (always-bound
> ##sys###sys#standard-input ##sys#standard-output
> ##sys###sys###sys#standard-error ##sys#...<--
>
> Error: shell command terminated with non-zero exit status 17920:
> '/usr/bin/chicken' 'matchable.scm' -output-file
> '/home/dnormandin/.cache/chicken-install/matchable/matchable.c'
> -dynamic -feature chicken-compile-shared -feature
> compiling-extension -emit-all-import-libraries
> -regenerate-import-libraries -setup-mode
> -include-path /home/dnormandin/.cache/chicken-install/matchable
> -optimize-level 2 -debug-level 1
>
> Error: shell command terminated with nonzero exit code 256
> "sh /home/dnormandin/.cache/chicken-install/matchable/matchable.build.sh"
> [/quote]
>
> I'm trying to instal "geiser" and suporting "extras" as per
> https://wiki.call-cc.org/emacs#geiser
>
> What did I do to blow this up? Or maybe what didn't I do that
> should have? TIA !

That should have worked.  Some questions that will help us understand
the problem better:

* Is the issue reproducible?

* What version of CHICKEN are you using?  "chicken-install -version"
  shows you that info.

* How did you install CHICKEN?  In case you compiled it, what command(s)
  did you use to compile it?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: webdriver

2023-04-14 Thread Mario Domenech Goulart
Hi Daniel,

On Sat, 15 Apr 2023 07:12:31 +0500 Daniel Ziltener  wrote:

> Hi all,
>
> I have written a new egg implementing the WebDriver API, fittingly
> named "webdriver". It covers most of the API except the shadow-dom
> parts, as I honestly have not really understood yet what exactly the
> purpose of the shadow dom is...
>
> Wiki page: http://wiki.call-cc.org/eggref/5/webdriver
> Release-info file:
> https://fossil.lyrion.ch/chicken-webdriver/doc/trunk/webdriver.release-info
>
> I hope it will be as useful to some as it will be for me. As always,
> bug reports, suggestions, and fixes are welcome.

I've gotten a couple of test failures with test-new egg:

 webdriver (1 of 1) 
  Fetching[ ok ] 0s
  Reading .egg[ ok ] 0s
  Checking dependencies...[ ok ] 0s
  Checking category...[ ok ] 0s
  Checking license[ ok ] 0s
  Checking author.[ ok ] 0s
  Installing..[ ok ] 12m47s
  Checking version[ -- ]
  Testing.[fail] 37s
  Checking documentation..[ ok ] 0s


In salmonella.log I see

Session id check . [ERROR]

Error: (tcp-connect) cannot create socket - Connection refused
(string? (begin (initialize-session browser) (slot-value browser 
'session-id)))

Navigating to the first website .. [ERROR]

Error: (tcp-connect) cannot create socket - Connection refused
(begin
  (initialize-session browser)
  (set-url browser "http://info.cern.ch/hypertext/WWW/TheProject.html";)
  (url browser))
  

I guess those tests are not suitable for an environment where we have no
browser running, right?  Can tests check that and decide what to
execute?

BTW, using references to external resources in tests (e.g.,
http://info.cern.ch) might lead to trouble.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: srfi-227

2023-04-19 Thread Mario Domenech Goulart
Hi Shawn,

On Wed, 19 Apr 2023 02:54:52 -0700 Shawn Wagner  wrote:

> Implementation of the given SRFI (Optional Arguments, for easier writing of 
> functions with, yes, optional arguments).
>
> Release-info: 
> https://raw.githubusercontent.com/shawnw/chicken-srfi-227/master/srfi-227.release-info-5
> Documentation: http://wiki.call-cc.org/eggref/5/srfi-227
>
> test-new-egg report:
>
>  srfi-227 (1 of 1) 
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 16s
>   Checking version[ -- ]
>   Testing.[ ok ] 11s
>   Checking documentation..[ ok ] 1s
> Removing /tmp/temp3b38.25779
> Egg looks ok!

Many thanks!  Your egg has been added to the coop.

Some notes:

* let-optionals is also provided by the chicken.base module

* define-optionals is also provided by the miscmacros egg

I haven't checked if the syntax/semantics are the same as the
definitions of SRFI-227, though.

Could you please add a link to the source repository to the
egg documentation?

All the best.
Mario
-- 
http://parenteses.org/mario



Scheduled maintenance of bugs.call-cc.org

2023-07-10 Thread Mario Domenech Goulart
Hi,

bugs.call-cc.org will be unavailable today at 19 UTC for maintenance.
Expected downtime is around one hour.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Scheduled maintenance of bugs.call-cc.org

2023-07-11 Thread Mario Domenech Goulart
Hi,

On Tue, 11 Jul 2023 08:35:16 +0200 Mario Domenech Goulart 
 wrote:

> bugs.call-cc.org will be unavailable today at 19 UTC for maintenance.
> Expected downtime is around one hour.

bugs.call-cc.org is back online.

We had a performance issue related to the database.  The issue is now
hopefully fixed.  Usability is expected to be better now (faster
responses, no errors).  If you observe any issue, please let me know.

Many thanks to Andy Bennett for debugging and fixing the issue.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: edward, an extensible ed(1) implementation

2023-07-11 Thread Mario Domenech Goulart
Hi Sören,

On Tue, 11 Jul 2023 22:15:56 +0200 Sören Tempel  
wrote:

> I have written a POSIX-compatible implementation of the standard Unix
> text editor ed(1) in R7RS CHICKEN Scheme. The editor consists of both a
> program and a library component (for extending the editor with custom
> commands) and hence I am interested in packaging it as CHICKEN Egg. The
> library component is fully documented using Scheme source code comments
> from which HTML is generated using scmdoc [1], the generated
> documentation is available online:
>
> https://files.8pit.net/edward/1.0.1/doc/
>
> The source code is available on GitHub:
>
> https://github.com/nmeum/edward
>
> The .release-info file is:
>
> https://raw.githubusercontent.com/nmeum/edward/master/edward.release-info
>
> The file passes the test-new-eggs checks with the exception that the
> documentation check currently fails, probably because I haven't created
> a wiki page yet. I would do so after the Egg is included in the index.

That's pretty cool.  Thanks.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Eggs not installing on msys-mingw32

2023-10-29 Thread Mario Domenech Goulart
Hi Matt,

On Sun, 29 Oct 2023 20:22:53 -0700 Matt Welland  wrote:

> I'm guessing I've done something wrong in my setup but some eggs did install 
> and some do not and I'm not sure what
> I'm missing.
>
>  MINGW32 ~
> $ chicken-install base64
> fetching base64
> C:\msys64\tmp\tempa4ea.8676\base64.egg
> C:\msys64\tmp\tempa4ea.8676\base64.scm
> C:\msys64\tmp\tempa4ea.8676\tests\run.scm
> 3 File(s) copied
> building base64
>c:/msys64/software/bin/csc -host -D compiling-extension -J -s 
> -regenerate-import-libraries -setup
> -mode -I C:\Users\Owner\AppData\Local\chicken-install\base64 -C 
> -IC:\Users\Owner\AppData\Local\chick
> en-install\base64 -O2 -d1 base64.scm -o 
> C:\Users\Owner\AppData\Local\chicken-install\base64\base64.s
> o
>c:/msys64/software/bin/csc -regenerate-import-libraries -M -setup-mode 
> -static -I C:\Users\Owner\
> AppData\Local\chicken-install\base64 -emit-link-file 
> C:\Users\Owner\AppData\Local\chicken-install\ba
> se64\base64.link -host -D compiling-extension -c -unit base64 -D 
> compiling-static-extension -C -IC:\
> Users\Owner\AppData\Local\chicken-install\base64 -O2 -d1 base64.scm -o 
> C:\Users\Owner\AppData\Local\
> chicken-install\base64\base64.static.obj
>c:/msys64/software/bin/csc -setup-mode -s -host -I 
> C:\Users\Owner\AppData\Local\chicken-install\b
> ase64 -C -IC:\Users\Owner\AppData\Local\chicken-install\base64 -O2 -d0 
> base64.import.scm -o C:\Users
> \Owner\AppData\Local\chicken-install\base64\base64.import.so
>
> Error: (assq) bad argument type: #!eof

I seem to remember seing such errors when .egg-info files get corrupted.
I'd start by checking for abnormally small (or even empty) .egg-info
files in the directories printed by

  $ csi -p '(begin (import (chicken platform)) (repository-path))'

If you find a corrupted file, say for egg foo, just copy any other good
.egg-info file over foo.egg-info and reinstall foo with `chicken-install foo'.

Once the corrupted files have been fixed, you should be able to install
eggs again.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Eggs not installing on msys-mingw32

2023-10-30 Thread Mario Domenech Goulart
On Mon, 30 Oct 2023 06:53:05 +0100 Mario Domenech Goulart 
 wrote:

> On Sun, 29 Oct 2023 20:22:53 -0700 Matt Welland  
> wrote:
>
>> I'm guessing I've done something wrong in my setup but some eggs did install 
>> and some do not and I'm not sure what
>> I'm missing.
>>
>>  MINGW32 ~
>> $ chicken-install base64
>> fetching base64
>> C:\msys64\tmp\tempa4ea.8676\base64.egg
>> C:\msys64\tmp\tempa4ea.8676\base64.scm
>> C:\msys64\tmp\tempa4ea.8676\tests\run.scm
>> 3 File(s) copied
>> building base64
>>c:/msys64/software/bin/csc -host -D compiling-extension -J -s 
>> -regenerate-import-libraries -setup
>> -mode -I C:\Users\Owner\AppData\Local\chicken-install\base64 -C 
>> -IC:\Users\Owner\AppData\Local\chick
>> en-install\base64 -O2 -d1 base64.scm -o 
>> C:\Users\Owner\AppData\Local\chicken-install\base64\base64.s
>> o
>>c:/msys64/software/bin/csc -regenerate-import-libraries -M -setup-mode 
>> -static -I C:\Users\Owner\
>> AppData\Local\chicken-install\base64 -emit-link-file 
>> C:\Users\Owner\AppData\Local\chicken-install\ba
>> se64\base64.link -host -D compiling-extension -c -unit base64 -D 
>> compiling-static-extension -C -IC:\
>> Users\Owner\AppData\Local\chicken-install\base64 -O2 -d1 base64.scm -o 
>> C:\Users\Owner\AppData\Local\
>> chicken-install\base64\base64.static.obj
>>c:/msys64/software/bin/csc -setup-mode -s -host -I 
>> C:\Users\Owner\AppData\Local\chicken-install\b
>> ase64 -C -IC:\Users\Owner\AppData\Local\chicken-install\base64 -O2 -d0 
>> base64.import.scm -o C:\Users
>> \Owner\AppData\Local\chicken-install\base64\base64.import.so
>>
>> Error: (assq) bad argument type: #!eof
>
> I seem to remember seing such errors when .egg-info files get corrupted.
> I'd start by checking for abnormally small (or even empty) .egg-info
> files in the directories printed by
>
>   $ csi -p '(begin (import (chicken platform)) (repository-path))'
>
> If you find a corrupted file, say for egg foo, just copy any other good
> .egg-info file over foo.egg-info and reinstall foo with `chicken-install foo'.

Actually simply removing the corrupted .egg-info file and installing its
corresponding egg again should do the trick.

> Once the corrupted files have been fixed, you should be able to install
> eggs again.
>
All the best.
Mario
-- 
http://parenteses.org/mario



Re: [PATCH] Re: Eggs not installing on msys-mingw32

2023-10-30 Thread Mario Domenech Goulart
On Mon, 30 Oct 2023 14:01:44 +0100 felix.winkelm...@bevuta.com wrote:

>> That was it. Thanks. I do have to keep running:
>> 
>> find /software/ -name \*.egg-info -empty -delete -print
>> 
>> as check-errors.egg-info seems to be a pervasive problem. Maybe it would be
>> worth it to add a defence against this?
>
> Sorry - wrong patch, this is the right one.
>
>
> felix
>
>
> From 8a2a82a8171744546badacaa297bcf754bff3eba Mon Sep 17 00:00:00 2001
> From: felix 
> Date: Mon, 30 Oct 2023 14:00:41 +0100
> Subject: [PATCH] handle case when egg-info file is empty
>
> ---
>  egg-information.scm | 7 +--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/egg-information.scm b/egg-information.scm
> index 6f5f7cb9..1e7f8aec 100644
> --- a/egg-information.scm
> +++ b/egg-information.scm
> @@ -34,8 +34,11 @@
>  (if (file-exists? fname*) fname* fname)))
>  
>  (define (load-egg-info fname)
> -  (let ((fname (locate-egg-file fname)))
> -(with-input-from-file fname read)))
> +  (let* ((fname (locate-egg-file fname))
> + (info (with-input-from-file fname read)))
> +(if (eof-object? info)
> +(error "empty egg-info file, possibly due to an aborted egg-install 
> - please remove the file and retry" fname)
> +info)))

How about
"empty egg-info file, possibly due to an aborted egg-install - please remove 
the file and reinstall the corresponding egg"?

Rationale: Matt's case.  check-errors.egg-info was empty, but the
installation of base64 was failing.  If Matt had removed
check-errors.egg-info and retried installing base64, the installation of
base64 would work, but check-errors would still be broken
(chicken-status and chicken-uninstall would ignore it, for example).

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [PATCH] Re: Eggs not installing on msys-mingw32

2023-10-30 Thread Mario Domenech Goulart
Hi Matt,

On Mon, 30 Oct 2023 09:43:00 -0400 Matt Welland  wrote:

> On Mon, Oct 30, 2023 at 9:37 AM  wrote:
>
>  > How about
>  > "empty egg-info file, possibly due to an aborted egg-install - please 
> remove the file and reinstall the corresponding egg"?
>  > 
>  > Rationale: Matt's case.  check-errors.egg-info was empty, but the
>  > installation of base64 was failing.  If Matt had removed
>  > check-errors.egg-info and retried installing base64, the installation of
>  > base64 would work, but check-errors would still be broken
>  > (chicken-status and chicken-uninstall would ignore it, for example).
>
>  Sure, whatever - feel free to change the message, if you think that makes it 
> clearer.
>
> My reporting on this was incorrect. Sorry for creating the churn. I believe 
> there is something going genuinely wrong with check-errors. One hypothesis
> I have is that Windows is seeing the file name containing "errors" and doing 
> something stupid and annoying. I am not experienced with Windows and have
> no clue what that thing might be but I'll keep digging.

Nothing to be sorry about.  I'm afraid this issue might not related to
Windows, exclusively.  I took a look at IRC logs and and saw that we had
at least four cases like that, two on Windows and two on Linux.  We have
traces of three of those issues in paste.call-cc.org and in pastebin.com:

* http://paste.call-cc.org/paste?id=476adbc8ef7b47d8a7ce9ccd7dc201d4737de7b7
* http://paste.call-cc.org/paste?id=a7c9d3bd2dbc8837b02b418a33f6d7c5ca9d9455
* https://pastebin.com/e2BdgGGC

I think we have a bug somewhere.

The eggs that triggered the problem (i.e., the ones that had their
.egg-info file empty), according to the records we have, are:

* apropos
* check-errors
* math
* srfi-45

I've have pushed the patch submitted by Felix, as I think it improves
the situation for users.  With it, users get a better error message and
have at least a chance to work around the issue.

I've created https://bugs.call-cc.org/ticket/1827 for that issue.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: awful-main, turn awful webapps into static executables

2023-11-13 Thread Mario Domenech Goulart
Hi Pietro,

On Mon, 6 Nov 2023 16:44:10 + Pietro Cerutti  wrote:

> I would like to request the addition of the egg awful-main to the coop.
>
> The egg exposes a functor that can be used to esily turn awful web
> applications into static executables.
>
> Repo: https://code.ptrcrt.ch/awful-main
> Docs: https://wiki.call-cc.org/egg/awful-main
>
> The output of test-new-egg is attached.
>
> Thanks!

Many thanks, and apologies for the long time to add your egg to the
coop.  It's done now.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [new egg] nanosleep - trivial wrapper for the POSIX API

2023-11-15 Thread Mario Domenech Goulart
Hi Pietro,

On Wed, 15 Nov 2023 10:36:45 + Pietro Cerutti  wrote:

> this egg exposes a tiny wrapper around the POSIX nanosleep API.
>
> Code: https://code.ptrcrt.ch/chicken-nanosleep
> Docs: http://wiki.call-cc.org/eggref/5/nanosleep
>
> Thanks!

Thank you.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: coin-change

2023-11-18 Thread Mario Domenech Goulart
On Sat, 18 Nov 2023 02:23:26 + siiky  wrote:

> It's that time of year again.
>
> I bring you coin-change, a greedy solver for the coin change
> problem[0] (NOT the solutions counting problem).
>
> Tests are on the light side as of now (I'll try adding more
> comprehensive tests eventually), but do not you worry: I ran it twice 
> and it worked!  (o:[]>o
>
> You can find the docs in the wiki[1], the repo here[2], and the
> release-info here[3].
>
>
> test-new-egg report:
>
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 8s
>   Checking version[ -- ]
>   Testing.[ ok ] 10s
>   Checking documentation..[ ok ] 0s
>
>
> [0]: https://en.wikipedia.org/wiki/Change-making_problem
> [1]: https://wiki.call-cc.org/eggref/5/coin-change
> [2]: https://git.sr.ht/~siiky/coin-change
> [3]: https://git.sr.ht/~siiky/coin-change/blob/main/coin-change.release-info
>
> Thanks,
> siiky

Thank you.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Deprecated current-milliseconds

2023-12-08 Thread Mario Domenech Goulart
Hi,

On Thu, 7 Dec 2023 13:21:12 +0200 Lassi Kortela  wrote:

>> chicken time current-process-milliseconds
>
> Thanks. Here's a grep of current-milliseconds in
> eggs-5-latest. Anybody got time to patch some?
>
> dbus/0.97/tests/run.scm
> gochan/5.2.10/chibi-compat.scm
> gochan/5.2.10/chicken-module5.scm
> gochan/5.2.10/gochan-record-printer.scm
> gochan/5.2.10/gochan.scm
> gochan/5.2.10/readme.md
> gochan/5.2.10/tests/fake-search.scm
> gochan/5.2.10/tests/run.scm
> gochan/5.2.10/tests/stress.scm
> hopefully/0.2.6/tests/run.scm
> http-session/2.10/http-session.scm
> matchable/1.1/matchable-test.scm
> matrico/0.5rel/matrico.scm
> nrepl/5.0.8/readme.md
> openssl/2.2.5/openssl.socket.scm
> pigeon-hole/0.2.8/tests/run.scm
> postgresql/4.1.4/postgresql.scm
> r7rs/1.0.9/scheme.time.scm
> salmonella-feeds/0.1.1/salmonella-feeds.scm
> sendfile/1.11/sendfile.scm
> sendfile/1.11/strategies/mmap.scm
> sendfile/1.11/strategies/rw.scm
> simple-timer/0.1.2/timeout.scm
> socket/0.3.3/socket.scm
> sqlite3pth/0.2.6/sqlite3pth.scm
> srfi-18/0.1.7/srfi-18.scm
> srfi-18/0.1.7/tests/mutex-test.scm
> srfi-19/4.9.5/srfi-19-tm.scm
> test/1.2/test-support.scm

Please note that simply replacing current-milliseconds with
current-process-milliseconds will break code in older CHICKEN versions
(< 5.3.0).

See the thread whose start is
https://lists.nongnu.org/archive/html/chicken-users/2023-02/msg3.html
for more information.

If you want to get rid of the warning, use something like:

  (cond-expand
((or chicken-5.0 chicken-5.1 chicken-5.2)
 (define current-process-milliseconds current-milliseconds))
(else))
   
(taken from sendfile 2.0 -- the openssl egg has similar code.)

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [new egg] mosquitto - Bindings to mosquitto MQTT client library

2024-01-03 Thread Mario Domenech Goulart
Hi Dmitry,

On Wed, 3 Jan 2024 21:00:52 +0700 Dmitry  wrote:

> Hello.
>
> New egg "mosquitto" - Bindings to mosquitto MQTT client library.
>
> Code: https://github.com/Junker/chicken-mosquitto
> Docs: http://wiki.call-cc.org/eggref/5/mosquitto
> release-info URL: 
> https://raw.githubusercontent.com/Junker/chicken-mosquitto/master/mosquitto.release-info
>
>
> $ test-new-egg mosquitto 
> https://raw.githubusercontent.com/Junker/chicken-mosquitto/master/mosquitto.release-info
> Writing egg-locations for mosquitto to /tmp/temp379f.3151627/egg-locations...
> Running /usr/bin/henrietta-cache...
> Caching egg 'mosquitto'
>   Downloading egg version 0.1.0 from 
> https://github.com/Junker/chicken-mosquitto/tarball/0.1.0 (CHICKEN release 5)
> Finding out the latest version for mosquitto...
> Running /usr/bin/salmonella on mosquitto version 0.1.0...
> salmonella 3.1.1 -- a tool for testing CHICKEN eggs 
> (http://wiki.call-cc.org/egg/salmonella)
>
> Started on Wed Jan  3 19:38:16 2024
> Command line: /usr/bin/salmonella
>
> Options:
>   chicken-install: /usr/bin/chicken-install
>   repo-dir: /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo
>   chicken-install-args: (-v -test)
>
> C compiler: gcc
> gcc (GCC) 13.2.1 20230801
> Copyright (C) 2023 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
>
> C++ compiler: g++
> g++ (GCC) 13.2.1 20230801
> Copyright (C) 2023 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
>
> C compiler flags: -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H 
> -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I/usr/include/chicken 
> -I'/tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/include/chicken'
>  
>
> Linker: gcc
> Linker flags: -L/usr/lib -Wl,-rpath=/usr/lib 
>
> Libraries: -lchicken -lm -ldl 
>
> CHICKEN banner:
> CHICKEN
> (c) 2008-2021, The CHICKEN Team
> (c) 2000-2007, Felix L. Winkelmann
> Version 5.3.0 (rev e31bbee5)
> linux-unix-gnu-x86-64 [ 64bit dload ptables ]
>
> Environment variables:
>   SALMONELLA_RUNNING: 1
>   CHICKEN_INSTALL_PREFIX: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo
>   CHICKEN_PREFIX: (not set)
>   CHICKEN_INSTALL_REPOSITORY: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/lib/chicken/11
>   CHICKEN_REPOSITORY_PATH: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/lib/chicken/11
>   CHICKEN_EGG_CACHE: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/cache
>   CHICKEN_INCLUDE_PATH: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/share/chicken
>   CHICKEN_C_INCLUDE_PATH: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/include/chicken
>   CHICKEN_HOME: (not set)
>   CSC_OPTIONS: (not set)
>   PATH: 
> /tmp/temp379f.3151627/mosquitto/0.1.0/salmonella-tmp-cbe98/repo/bin:/home/junker/.local/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
>
>  mosquitto (1 of 1) 
>   Fetching[ ok ] 0s
>   Reading .egg[ ok ] 0s
>   Checking dependencies...[ ok ] 0s
>   Checking category...[ ok ] 0s
>   Checking license[ ok ] 0s
>   Checking author.[ ok ] 0s
>   Installing..[ ok ] 18s
>   Checking version[ -- ] 
>   Testing.[ ok ] 11s
>   Checking documentation..[ ok ] 0s
> Removing /tmp/temp379f.3151627
> Egg looks ok!

Many thanks!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: chicken (un)install, deployment

2024-02-03 Thread Mario Domenech Goulart
Hi Al,

On Sat, 3 Feb 2024 12:22:46 +0200 Al  wrote:

> I'd like to distribute a project that uses chicken and a number of
> eggs. In the Makefile, I'm trying to add a target that ensures the
> user has those eggs installed. However,
>
> * chicken-install seems to proceed unconditionally (even if egg is
>   already installed).

Right.  If you ask chicken-install to install an egg, it'll do so.  It
might skip its dependencies in case they are already installed.
chicken-install might skip fetching/compiling eggs in case they can be
found in the chicken-install cache (typically ~/.cache/chicken-install).

> * I see no chicken-uninstall, or at least chicken-remove-all-eggs, so
>   that at least I can test things in a clean-room installation,
>   without rebuilding

chicken-uninstall is part of the installation of chicken.  It should be
available in the same directory where chicken-install is located.

> I came up with a way sed hack to extract all imports, transform those
> to arguments for "chicken-status -list", and generate a
> chicken-status.scm file (which can then be processed by
> "chicken-install -from-list"). But still it installs
> unconditionally. I could add an extra step to check if "csi import
> egg... 
>
> What to do? Maybe I should convert my project to egg format?

That probably would be the easiest way.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: Big Integers

2024-05-22 Thread Mario Domenech Goulart
Hi Doug,

On Tue, 21 May 2024 21:35:33 + (UTC) "T.D. Telford"  
wrote:

> Thanks for the reply.  The elapsed timings for the program rho3rec are:
>
> chicken 5.3.0:  33.6 seconds
> Racket v8.2 [cs]  : 18.1 seconds
> Dr Racket : 20.6 seconds  (1 MB memory)
>
> The program uses the Pollard rho algorithm to find a factor of 2^257 -1.  The 
> program is highly recursive, but I have a
> non recursive version that has the same timing as the above.  I am using an 
> AMD Ryzen 5600 cpu and 32 GB of main memory.
>
> I tried all of the csc options that appeared related to speed, and the 
> maximum improvement was 0.1 seconds. 
>
> The one option I did not get to work was
> -heap-size 1000M
> where I varied the size from 1000M to 1M.  In all cases I would get the 
> run time message
> [panic] out of memory - heap full - execution terminated
>
> I have include the program listing below and also as an attachment.
>
> Regards,
> Doug
>
> ;;;
> ;;#lang racket;; uncomment for racket
>
> (define (rho n u v c iter prod)
>   (let* ( [u1 (modulo (+ (* u u) c) n)]
>   [v1 (modulo (+ (* v v) c) n)]
>   [v2 (modulo (+ (* v1 v1) c) n)]
>   [done #f]
>   [max_iter 3000]
>   [iter2 (+ iter 1)]
>   [prod2 (modulo (* prod (- u1 v2)) n)] )
>
> (if (= (modulo iter2 150) 0)
>   (begin; modulo true
> (let ( [g (gcd prod2 n) ] )
>   (if (and (> g 1) (< g n))
> (begin ; factor
>   (display "factor = ") (display g) (newline)
>   (display "iterations = ") (display iter2) (newline)
>   (set! done #t)
> )
> (set! prod2 1) ; no factor
>   ) ; end if factor
> ) ; end let 
>   ) ; end begin for modulo true
>   #f ;action for modulo false
> ) ; end major if
>
> (if (and (< iter2 max_iter) (not done)) 
>   (rho n u1 v2 c iter2 prod2)
>   (if done ; either found factor or max iterations
> (display "normal termination \n")
> #f
>   ) ; if done
> ) ; if and 
>   ) ; end let*
> )
>
> (let ( [n (- (expt 2 257) 1)] [u 2] [v 11] [c 7] [iter 1] [prod 1] )
> (display "factor n = ") (display n) (newline)
> (time (rho n u v c iter prod))
> )
>
> ;;;

Thanks for providing the program.

Would it be ok to add it as a benchmark program to
https://github.com/mario-goulart/chicken-benchmarks?

All the best.
Mario
-- 
http://parenteses.org/mario



Re: new egg: poule - manage a pool of worker processes

2024-05-29 Thread Mario Domenech Goulart
On Tue, 28 May 2024 12:39:13 + Pietro Cerutti  wrote:

> this egg implements a manager for a pool of worker processes.
>
> Code: https://code.ptrcrt.ch/poule/
> Docs: http://wiki.call-cc.org/eggref/5/poule

Thanks, Pietro!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [Chicken-announce] [ANN] CHICKEN 5.4.0 release candidate available

2024-06-02 Thread Mario Domenech Goulart
Hi,

On Fri, 31 May 2024 10:08:42 +0200 Peter Bex  wrote:

> We are happy to announce the first release candidate of the upcoming
> CHICKEN 5.4.0.

I've tested 5.4.0rc1 on the systems below (all x86-64).  Build,
installation, "make check" of CHICKEN and installation + tests of
pastiche work.

OS C CompilerLibC
--+-+---
Debian 12.5gcc   glibc
Debian 12.5clang glibc
Debian 12.5tcc   glibc
Alpine 3.19.1  gcc   musl
Alpine 3.19.1  clang musl
Alpine 3.20.0  gcc   musl
Alpine 3.20.0  clang musl

# Commands executed

$ make PREFIX=... C_COMPILER=... -j$(nproc) all
$ make PREFIX=... C_COMPILER=... install
$ make PREFIX=... C_COMPILER=... check
$ $PREFIX/bin/chicken-install -test pastiche

$(nproc) was 4, 8 or 12, depending on the system.


# Alpine 3.19.1

$ gcc --version
gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Alpine clang version 17.0.5
Target: x86_64-alpine-linux-musl
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang17/x86_64-alpine-linux-musl.cfg

$ /lib/ld-musl-x86_64.so.1 --version
musl libc (x86_64)
Version 1.2.4_git20230717
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname [args]


# Alpine 3.20.0

$ gcc --version
gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Alpine clang version 17.0.6
Target: x86_64-alpine-linux-musl
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang17/x86_64-alpine-linux-musl.cfg

$ /lib/ld-musl-x86_64.so.1 --version
musl libc (x86_64)
Version 1.2.5
Dynamic Program Loader
Usage: /lib/ld-musl-x86_64.so.1 [options] [--] pathname [args]


# Debian 12.5

$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Debian clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ tcc -version
tcc version 0.9.27 (x86_64 Linux)

(tcc has been patched with VSTACK_SIZE = 1024)

$ /lib/ld-linux.so.2 --version
ld.so (Debian GLIBC 2.36-9+deb12u7) stable release version 2.36.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.


All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: lay - utility to lay eggs efficiently

2024-06-26 Thread Mario Domenech Goulart
Hi,

On Wed, 26 Jun 2024 13:36:49 + Pietro Cerutti  wrote:

> this egg provides a utility to speed up the installation of other eggs
> by parallelizing the build process.
>
> Code: https://code.ptrcrt.ch/lay/
> Docs: http://wiki.call-cc.org/eggref/5/lay

Many thanks, Pietro.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



call-cc.org services instability

2024-08-11 Thread Mario Domenech Goulart
Hi,

Last week the call-cc.org was under heavy load due to the amount of
parallel requests to relatively heavy services like gitweb and trac,
causing all services provided by the call-cc.org server to respond very
slowly.

Considering the amount of parallel requests, presumably they were being
performed by automated software, which were ignoring robots.txt.

Last Friday (2024-08-09) the situation became critical, with some
services becoming totally unavailable for some periods of time due to
exhaustion of system resources.

As a reaction to that, many IP addresses that were abusing the services
were blocked via firewall.  That was done quite aggressively and it is
possible that some innocent IPs got blocked -- if you know of such
cases, please contact me.

Apologies for the inconvenience that this situation might have caused.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New Egg: SRFI-214

2024-08-11 Thread Mario Domenech Goulart
Hi Sören,

On Fri, 09 Aug 2024 21:30:23 +0200 Sören Tempel  
wrote:

> I created an egg for SRFI-214. The source code is available on GitHub:
>
>   https://github.com/nmeum/srfi-214
>
> The .release-info file is:
>
>   
> https://raw.githubusercontent.com/nmeum/srfi-214/master/srfi-214.release-info
>
> Currently, the egg still requires r7rs. There is a branch called no-r7rs
> where I patched that out but it's still WiP and it will require some
> sort of vector library (e.g. SRFI-133) instead of the r7rs dependency
> then (is that preferable). I want to use this together with the edward
> egg (which already requires r7rs), hence this hasn't been a priority for
> me personally so far.
>
> I haven't gotten around to creating a Wiki page yet, I hope I will have
> the time to do so in the coming week. If someone has any tooling for
> assisted/automated conversion of SRFI documentation to CHICKEN wiki
> syntax please let me know :-)
>
> I am not subscribed to the list, please CC me.

Thanks.  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: New egg: prometheus

2024-09-16 Thread Mario Domenech Goulart
Hi Daniel,

On Mon, 16 Sep 2024 14:25:13 +0200 Daniel Ziltener  wrote:

> Dear Chicken users,
>
> as part of this year's Chicken meetup, I got aware of the Prometheus
> object system and decided to port it.
> The release-info file for addition to the Egg index is
> https://gitea.lyrion.ch/Chicken/prometheus/raw/branch/master/prometheus.release-info
> .
> The documentation is available at
> http://wiki.call-cc.org/eggref/5/prometheus.

Thanks!  Your egg has been added to the coop.

All the best.
Mario
-- 
http://parenteses.org/mario



Re: [Chicken-users] absolute-pathname? bug?

2005-04-21 Thread Mario Domenech Goulart
Hi Matt

On Thu, 21 Apr 2005 12:34:17 -0600 Matt Gushee <[EMAIL PROTECTED]> wrote:

> I'm running Chicken 1.89 on Linux (Arch Linux 0.7, w/ glibc 2.3.4 &
> gcc 3.4.3), and I find that:
>
>  (absolute-pathname? "/") ==> #f
>
> Shouldn't the result be #t?

Yes.  Take a look at
http://lists.gnu.org/archive/html/chicken-users/2005-01/msg00078.html

Best regards,
Mario


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


Re: [Chicken-users] an ode to Spiffy

2005-05-26 Thread Mario Domenech Goulart
On Thu, 26 May 2005 11:35:16 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

> On 5/26/05, Peter Busser <[EMAIL PROTECTED]> wrote:
>> 
>> BTW, while talking about SXML, has anyone looked at getting LAML to work on
>> Chicken? (http://www.cs.auc.dk/~normark/laml/)
>> 
>
> I have started once but lost interest. It shouldn't be too hard to port,
> though...
>
> (Hint, hint!)

It may look a bit silly and ugly, but some time ago I made something
that looks like that (if my guess about what LAML is is correct --
couldn't read the papers yet).

It's at http://www.inf.ufrgs.br/~mario/english/utils/web-scheme

Disclaimer:

- I made it without looking for previous work about this topic. So, if
  some ideas are badly implemented or if there things that just look too
  silly, it's my fault.

- The code is far from being good (horrible, in fact :-))

Originally it was just an attempt to get rid of some even more ugly
scripts I use to generate headers and footers to some of my html pages
and to use some programming stuff embedded in web pages with a cleaner
syntax.  Now it's not even that because I didn't convert those
pages. :-)

Best whishes,
Mario



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


Re: [Chicken-users] an ode to Spiffy

2005-05-27 Thread Mario Domenech Goulart
On Fri, 27 May 2005 07:44:16 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

> Well, I think this looks (and works) pretty well. Would it be ok for you if
> we turn this into an egg?

Sure.

If there is something I can do to help you, just tell me.

Best wishes,
Mario


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


[Chicken-users] Documentation system?

2005-07-04 Thread Mario Domenech Goulart
Hello

Is there some documentation system for chicken?  I mean something that
you can use from the interpreter.  I couldn't find any, so I made a
simple parser to the chicken.texi file which generates the documentation
in a way that can be easily used by an extension from the interpreter.

I've been using such a simple extension as a "chicken help".  It's been
useful for me, so I am sharing it with you.

Below you can see a "help session":

,[ $ csi ]
|   _, _,_ _  _, _,_ __, _, _
|  / ` |_| | / ` |_/ |_  |\ |
|  \ , | | | \ , | \ |   | \|
|   ~  ~ ~ ~  ~  ~ ~ ~~~ ~  ~
| Version 1, Build 89 - linux-unix-gnu-unknown
| (c)2000-2004 Felix L. Winkelmann
| #;1> (use doc)
| ; loading ./doc.scm ...
| ; loading library srfi-13 ...
| ; loading library regex ...
| #;2> (doc:load "chicken.doc") 
| #;3> (doc:search "->string")
| byte-vector->string
| reverse-list->string
| keyword->string
| ->string
| seconds->string
| time->string
| #;4> (doc:help "keyword->string")
| keyword->string (keyword->string KEYWORD)
| 
| Transforms  `KEYWORD' into a string.
`

A quick explanation about the functions:

(doc:load "doc-file"): loads "doc-file" into the documentation system
database.  The database is a hash-table mapping symbol names to the
corresponding prototypes and descriptions.

(doc:help "symbol"): displays information about "symbol" in the
following format:

 



(doc:search "pattern"): searches for "pattern" (a regexp) in the
database's keys.

(doc:search-desc "pattern"): searches for "pattern" (a regexp) in the
database's description fields.


The "doc-file" I've been using was generated from the chicken.texi file
(the program chicken-doc.scm helped in this task -- generates
chicken.doc).  It's a list of items with the following format:

("symbol name" "prototype" "description")

I put the code at http://www.inf.ufrgs.br/~mario/misc/chicken-doc.tar.gz

If you know some other documentation system for chicken or if you have
suggestions about how to improve this one, let me know.


Best wishes,
Mario


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


Re: [Chicken-users] Documentation system?

2005-07-14 Thread Mario Domenech Goulart
On Wed, 13 Jul 2005 23:23:17 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

> On 7/5/05, Mario Domenech Goulart <[EMAIL PROTECTED]> wrote:
>> 
>> Is there some documentation system for chicken?  I mean something that
>> you can use from the interpreter.  I couldn't find any, so I made a
>> simple parser to the chicken.texi file which generates the documentation
>> in a way that can be easily used by an extension from the interpreter.
>
> Hey, this looks nice! Accessing your tarball gives me a "not found", so
> could you make it available again, or send it to me directly?

I'm sorry.  Just some hours after I sent the e-mail to the mailing list,
the server where I put the file went down and has been occasionaly like
that lately...  Now it seems to be ok.

I'm attaching a quick&dirty elisp function to show the documentation of
symbols in the interpreter running from inside Emacs (e.g., by pressing
F1 when the cursor is over a symbol).
 
Best whishes,
Mario


chicken-doc.el
Description: application/emacs-lisp
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] xosd:delete?

2005-07-22 Thread Mario Domenech Goulart
Hello,

In the xosd egg example
(http://www.call-with-current-continuation.org/eggs/xosd.html) there's a
`xosd:delete' function, but it's not provided by the egg.  Shouldn't it
be `xosd:destroy'? (Just a guess -- I don't know the xosd API)

Best wishes,
Mario


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


Re: [Chicken-users] xosd:delete?

2005-07-22 Thread Mario Domenech Goulart
On Fri, 22 Jul 2005 21:21:33 + Mario Domenech Goulart <[EMAIL PROTECTED]> 
wrote:

> In the xosd egg example
> (http://www.call-with-current-continuation.org/eggs/xosd.html) there's a
> `xosd:delete' function, but it's not provided by the egg.  Shouldn't it
> be `xosd:destroy'? (Just a guess -- I don't know the xosd API)

One more detail:  the function `xosd:set-shadow-colour' is documented as
`xosd:set-shadow-color'.

Best wishes,
Mario


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


Re: [Chicken-users] catch read & load errors?

2005-08-04 Thread Mario Domenech Goulart
On Thu, 4 Aug 2005 14:41:25 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

>> I'm wondering, though, is it possible to catch the errors generated
>> by functions like read or load when they encounter bad syntax? I'd
>> like to be able to use read to parse things or load to load files
>> from within my program, but I can't do that if bad user input will
>> just terminate my program. Or is there a different way to do this?
>
> You could simply use exception-handling:
>
> (handle-exception ex (...do something with the exception in "ex" ...)
>   (read) )

Shouldn't it be `handle-exceptions'?
 ^

Mario


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


[Chicken-users] man egg updated

2005-08-19 Thread Mario Domenech Goulart
Hello,

The man egg was updated (version 2.0).  It's at
http://www.inf.ufrgs.br/~mario/misc/man.egg.

The new things are:

* man pages have more information (new fields: See also, Source, Author,
  Type).  The input file format also changed to cope with the addition
  of the new fields, but the new man egg is still compatible with the
  old format.

* the man egg includes documentation for itself, loaded automatically
  when the extension is loaded.

* the man files' suffix changed from .doc to .man.


The new file format is the following:

([]
 ("obj1-name" "obj1-prototype" "obj1-description" "obj1-type" "see-also")
 ("obj2-name" "obj2-prototype" "obj2-description" "obj1-type" "see-also")
 ...
 ("objn-name" "objn-prototype" "objn-description" "objn-type" "see-also"))

 is an optional part consisting of items (lists) with the
following format:

("man:author" "The name of the author")
("man:source" "The source of the information (e.g., some egg)")

The "man:author" and "man:source" strings identify fields whose values
assumed to be the same to all items of the documentation.

As an example, I translated the documentation of the xosd egg to the man
format.  It's at http://www.inf.ufrgs.br/~mario/misc/xosd.man.

Another example is the documentation of the man extension.

Now the help information for a given object is displayed according to
the following format:

,[ $ csi -nq ]
| #;1> (use man)
| #;2> (man:load)
| #;3> (man:help 'continuation?)
| [procedure]  continuation?  (continuation? X)
| 
| Returns  `#t' if  `X' is a continuation object, or  `#f' otherwise.
| 
| Source: Chicken Manual
| 
| Author: Felix L. Winkelmann
`


Best wishes,
Mario


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


[Chicken-users] man egg updated (version 2.1)

2005-08-23 Thread Mario Domenech Goulart
Hello,

The man egg was updated (version 2.1).

The changes are:

  * handling of the `enumerate' roff environment

  * better formatting of the output

  * usage message for the chicken-man program

  * some bug fixes

It's available at http://www.inf.ufrgs.br/~mario/misc/man.egg

Best wishes,
Mario


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


[Chicken-users] Eggs' documentation (was Re: New snapshot available)

2005-08-24 Thread Mario Domenech Goulart
Hello,

On Wed, 24 Aug 2005 22:36:35 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

>   * HTML documentation for eggs can now be included into the egg and
> will be installed in the repository (using the `documentation'
> info-property)
>
>   * `chicken-setup -docindex' shows path of generated documentation
> index for all installed eggs

I was just looking for the message which originated the request for
these features when I received this e-mail.

Some questions:

1. Should the documentation be provided as HTML or in the eggdoc format?

2. I think the possibility of having the documentation available from
   the repl useful.  Is it a general opinion or just my own?

If the answer for 1 is "eggdoc" and for 2 is "general", what do you
think about the idea of extending the eggdoc egg in such a way that it
can also generate the documentation according to the man egg file
format?

So we could have pretty formatted output (HTML) and a way to
quick-access the documentation from the repl, both resulting from the
same input (the eggdoc formatted file).

Worth, difficult, useless?  What do you think?

Best wishes,
Mario



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


[Chicken-users] Strange hash-table behavior in compiled code

2005-09-25 Thread Mario Domenech Goulart
Hello

I'm confused about the behavior of hash tables in compiled code.

$ cat ht.scm
(let ((ht (make-hash-table string=?)))
  (hash-table-set! ht "a" "b")
  (print (hash-table-ref ht "a")))

$ csi -script ht.scm
b

$ csc -s ht.scm
$ csi -n   
  ___   _ __  
 / ___/ /  (_)___/ /_ ___ 
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 106 - linux-unix-gnu-unknown - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use ht)
; loading ./ht.so ...
#f

$ uname -a
Linux mandolate 2.6.11.7 #1 Sat Apr 9 21:34:07 GMT 2005 ppc 745/755 
PowerBook4,1 GNU/Linux


I checked the behavior on an older Chicken version and got the expected
result:


$ csi -script ht.scm 
b

$ csi
   _  __
  / / /_  (_)/ /_   
 / /   / __ \/ / ___/ //_/ _ \/ __ \
/ /___/ / / / / /__/ ,< /  __/ / / /
\/_/ /_/_/\___/_/|_|\___/_/ /_/ 

Version 1, Build 63 - linux-unix-gnu-x86
(c)2000-2004 Felix L. Winkelmann
#;> (use ht)
; loading ./ht.so ...
b

$ uname -a
Linux azile 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux


Is there something I'm missing?  If you need more information about the
environment, let me know.


Best wishes.
Mario


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


Re: [Chicken-users] Strange hash-table behavior in compiled code

2005-09-25 Thread Mario Domenech Goulart
On Sun, 25 Sep 2005 14:38:50 + Mario Domenech Goulart <[EMAIL PROTECTED]> 
wrote:

> I'm confused about the behavior of hash tables in compiled code.
>
> $ cat ht.scm
> (let ((ht (make-hash-table string=?)))
>   (hash-table-set! ht "a" "b")
>   (print (hash-table-ref ht "a")))
>
> $ csi -script ht.scm
> b
>
> $ csc -s ht.scm
> $ csi -n   
>   ___   _ __  
>  / ___/ /  (_)___/ /_ ___ 
> / /__/ _ \/ / __/  '_/ -_) _ \
> \___/_//_/_/\__/_/\_\\__/_//_/
>
> Version 2, Build 106 - linux-unix-gnu-unknown - [ dload ]
> (c)2000-2005 Felix L. Winkelmann
> #;1> (use ht)
> ; loading ./ht.so ...
> #f
>
> $ uname -a
> Linux mandolate 2.6.11.7 #1 Sat Apr 9 21:34:07 GMT 2005 ppc 745/755 
> PowerBook4,1 GNU/Linux
>
>
> I checked the behavior on an older Chicken version and got the expected
> result:
>
>
> $ csi -script ht.scm 
> b
>
> $ csi
>_  __
>   / / /_  (_)/ /_   
>  / /   / __ \/ / ___/ //_/ _ \/ __ \
> / /___/ / / / / /__/ ,< /  __/ / / /
> \/_/ /_/_/\___/_/|_|\___/_/ /_/ 
> 
> Version 1, Build 63 - linux-unix-gnu-x86
> (c)2000-2004 Felix L. Winkelmann
> #;> (use ht)
> ; loading ./ht.so ...
> b
>
> $ uname -a
> Linux azile 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux

Some more information.  With the 2.2 version the following happens:

$ csi -script ht.scm
b

$ csc -s ht.scm
$ csi -n
  ___   _ __  
 / ___/ /  (_)___/ /_ ___ 
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 2 - linux-unix-gnu-unknown - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use ht)
; loading ./ht.so ...
Error: (hash-table-ref) hash-table does not contain key
"a"
#

When using numbers the problem doesn't seem to occur (and doesn't occur
when using build 2.106 either).

$ cat ht.scm
(let ((ht (make-hash-table)))
  (hash-table-set! ht 1 2)
  (print (hash-table-ref ht 1)))

$ csi -script ht.scm
2

$ csc -s ht.scm
$ csi -n
  ___   _ __  
 / ___/ /  (_)___/ /_ ___ 
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 2 - linux-unix-gnu-unknown - [ dload ]
(c)2000-2005 Felix L. Winkelmann
#;1> (use ht)
; loading ./ht.so ...
2


Another thing that I noticed is that the csc's "-g" option doesn't seem
to be working:

$ csc -h | grep -w -- -g
-g  -emit-debug-infoemit additional debug-information

$ csc -g -s ht.scm
csc: invalid option `-g'

Best wishes,
Mario


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


Re: [Chicken-users] Strange hash-table behavior in compiled code

2005-09-26 Thread Mario Domenech Goulart
Hello Alex, Felix and list

On Mon, 26 Sep 2005 07:51:43 +0200 felix winkelmann <[EMAIL PROTECTED]> wrote:

> On 9/26/05, Alex Shinn <[EMAIL PROTECTED]> wrote:
>> At Sun, 25 Sep 2005 14:38:50 +, Mario Domenech Goulart wrote:
>> >
>> > I'm confused about the behavior of hash tables in compiled code.
>> >
>> > $ cat ht.scm
>> > (let ((ht (make-hash-table string=?)))
>> >   (hash-table-set! ht "a" "b")
>> >   (print (hash-table-ref ht "a")))
>>
>> [...]
>>
>> > #;1> (use ht)
>> > ; loading ./ht.so ...
>> > #f
>>
>> The default hash procedure doesn't seem to handle literal strings
>> correctly.  If you were to use non-literals it would work:
>
> Here a patch for extras.scm:
>
> 1493d1492
> < ((##sys#permanent? x) (##core#inline "C_hashptr" x))

Thanks a lot for your help.

Passing the string-hash as argument to make-hash-table did the trick.
I'm going to apply the patch to extras.scm (this machine takes a very
long time to compile chicken, that's why I haven't done it yet -- but
I'm gonna do it soon).

Again, thanks for your time.

Best wishes,
Mario


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


[Chicken-users] -O3 wierdness

2005-10-01 Thread Mario Domenech Goulart
Hello,

I'm getting different results when compiling code using -O2 and -O3.

$ cat sr.scm
(define (foo str pos)
  (condition-case
   (string-ref str pos)
   (() "oops")))

(pp (foo "bar" -1))

;; the same, but not calling `foo'
(pp (condition-case
 (string-ref "bar" -1)
 (() "oops")))

$ csc -O2 sr.scm 

$ ./sr
"oops"
"oops"

$ csc -O3 sr.scm

$ ./sr
#\x3
"oops"

$ csc -version
  ___   _ __  
 / ___/ /  (_)___/ /_ ___ 
/ /__/ _ \/ / __/  '_/ -_) _ \
\___/_//_/_/\__/_/\_\\__/_//_/

Version 2, Build 2 - linux-unix-gnu-unknown - [ dload ]
(c)2000-2005 Felix L. Winkelmann

Enter "chicken -help" for information on how to use it.


It's 2.2 with Felix's patch to extras.scm applied.

Is there something I'm missing?  If you need more information about the
environment, let me know.


Best wishes,
Mario


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


Re: [Chicken-users] Chicken mode for Emacs?

2005-12-05 Thread Mario Domenech Goulart
Hello Ralph

On Mon, 5 Dec 2005 11:35:42 +0200 Ralph Moritz <[EMAIL PROTECTED]> wrote:

> is there an Emacs mode available that will run csi as
> an inferior Emacs process (preferably with syntax
> highlighting)? Starting csi from eshell isn't so cool...

I use Neil's Quack (http://www.neilvandyke.org/quack).  Works fine for
me.  You can choose the Scheme interpreter you want to use (Quack ->
Options -> Default Program) then you just need to M-x run-scheme.

Best wishes,
Mario


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


[Chicken-users] length performance

2006-01-04 Thread Mario Domenech Goulart
Hello

I've noticed that the performance of the length function is a bit low
for medium/large lists.  As far as I understand (from runtime.c
C_i_length), Chicken counts the elements from the given list everytime
length is invoked.  Is it like that?

If so, wouldn't it be better to have a list attribute which keeps the
number of elements?  So, the cost of invoking length would be nearly the
cost of accessing a variable (of course, there is the cost of keeping
the attribute up-to-date whenever an insertion/removal occurs and the
memory usage).  I think Python uses this approach.

What do you think?

Best wishes.
Mario


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


Re: [Chicken-users] length performance

2006-01-05 Thread Mario Domenech Goulart
Hello,

On Thu, 5 Jan 2006 03:07:16 -0600 Zbigniew <[EMAIL PROTECTED]> wrote:

> Additionally, it would become infeasible to splice a pair into or out
> of the list [an O(1) operation], given only a pointer into the middle
> of the list, because you cannot update the counts of earlier list
> elements.  This would be "possible" with a doubly-linked list---but
> insert and remove would now require an average of O(n) operations, to
> update every count!

I understand.  Thanks for you comments, Zbigniew, Kon and John.  I was
just wondering if there could be some implementation trick to make
length faster.


> The structure you are looking for is a vector (Python and Perl "lists"
> are actually vectors), not a linked list (Scheme list).  As Kon
> pointed out, length is fairly uncommon in Scheme, and heavy use may
> indicate you're programming against the Scheme paradigm.  Might I
> suggest reading the beginning of SICP to develop the proper habits, if
> you have not already.

Actually it's not a question of habit (at least I hope so :-)).  It just
happened that I was comparing the performance of some basic Chicken
functions against Python and the performance of length was a bit lower
than what I was expecting.


Best wishes,
Mario


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


[Chicken-users] New awful

2012-09-29 Thread Mario Domenech Goulart
Hi,

A new awful version (0.36) has been released today.  It begins a
transition to SXML.  The new version is still compatible with old
code, but the documentation has been updated to encourage the use
of SXML.

Here's a more detailed explanation: awful has been using
html-tags (http://wiki.call-cc.org/egg/html-tags) to generate
HTML.  The problem is that, by default, html-tags generates plain
strings.  That approach has several problems (Peter Bex nicely
explains them here:
http://sjamaan.ath.cx/posts/structurally-fixing-injection-bugs.html).
Even though the more recent versions of html-tags are able to
generate SXML code, awful still has to keep compatibility with
old code, so version 0.36 starts a transition phase: old code
still works, but there are settings to enable the operation in
SXML mode, and that mode is recommended.  In the future, only
SXML will be supported.

Porting "strings code" to SXML is not terribly painful, since
html-tags can generate SXML, but expect some warts.

Here's a simple example:

;; "Strings mode"
(use awful html-tags)

(define-page (main-page-path)
  (lambda ()
( id: "content"
   ( "Hi!"


;; SXML mode
(use awful html-tags)

(enable-sxml #t) ;; for awful
(generate-sxml? #t) ;; for html-tags

(define-page (main-page-path)
  (lambda ()
( id: "content"
   ( "Hi!"


Of course, you can use pure SXML instead of html-tags (recommended):

(use awful)

(enable-sxml #t)

(define-page (main-page-path)
  (lambda ()
'(div (@ (id "content"))
  (p "Hi!"


The default `enable-sxml' value is `#f' at the moment, but in
future versions it will be set to `#t' (and that will break old
apps).

The documentation provides more information and code examples.

Please, let me know if you find bugs.

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] Eggs breakage due to removal of deprecated features

2012-10-05 Thread Mario Domenech Goulart
Hi,

Some features marked as deprecated have been recently removed from the
*development* version of Chicken (see
http://code.call-cc.org/cgi-bin/gitweb.cgi?p=chicken-core.git;a=commit;h=e1a5773f52691c48097ae4f698081fa50f9647f7)

It seems that a lot of eggs are still using things that were
deprecated and now removed.  Please take a look at
http://tests.call-cc.org/master/linux/x86/2012/10/05/salmonella-report/#installation-failed
to see if your egg has been affected.

Here's a summary of the features that have been removed and that
are responsible for most of the breakage:

- the make macro (available as an egg now --
  http://wiki.call-cc.org/egg/make)

- required-chicken-version and required-extension-version (from
  setup-api)

Notice that some critical eggs like lookup-table, message-digest,
easyffi, numbers and string-utils are currently using features
that have been removed.  Here's a rank of reverse dependencies:

http://tests.call-cc.org/master/linux/x86/2012/10/05/salmonella-report/ranks/rev-deps.html

So, egg authors, if your eggs use removed features, please update them
so that they don't use removed features and release new versions.

Best wishes,
Mario
-- 
http://parenteses.org/mario

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


  1   2   3   4   5   6   7   8   9   10   >