Re: Deprecated current-milliseconds

2023-12-07 Thread Lassi Kortela
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

Deprecated current-milliseconds

2023-12-06 Thread Lassi Kortela
Hi, Version 5.3 csc gives the warning: Use of deprecated identifier `current-milliseconds' from module `chicken.time'. for (at least) these modules: * scheme.time (r7rs) * sendfile * srfi-18 Is there a drop-in replacement for this procedure? -l

Re: Question about how to check a symbol is bound

2023-06-23 Thread Lassi Kortela
 (define-record egg-info    name author desc)  (define (show-egg-info egg)    (define (symbol-value sym) (##sys#slot sym 0))    (define (getter field-name) (symbol-value   (string->symbol    (format #f "egg-info-~a"    field-name    (let ((fields

Re: srfi-tools egg

2023-04-25 Thread Lassi Kortela
I was originally thinking about doing that, but since the srfi program needs the greater srfi-common file tree it's part of to be present in $SRFI_HOME to be able to run effectively, I changed my mind. Seemed easier to just check out the repository into the right spot and run

srfi-tools egg

2023-04-25 Thread Lassi Kortela
We now have an up-to-date .egg file for the `srfi` command line tool, a new program maintained by the SRFI Editor and volunteers to help run the SRFI process. The source tree is here: https://github.com/scheme-requests-for-implementation/srfi-common/tree/master/srfi-tools Typing

Re: Different versions of syntax-rules

2023-04-25 Thread Lassi Kortela
I seem to remember that in R7RS, an underscore matches anything, which is not entirely compatible with R5RS, where you could actually use an underscore as a variable name. That seems correct. I can find the underscore rule in neither R5RS nor SRFI 46, but it is present in R6RS and R7RS.

Different versions of syntax-rules

2023-04-20 Thread Lassi Kortela
Chicken currently has two different implementations of syntax-rules: - synrules.scm in chicken-core - synrules.scm in the r7rs egg I'm far from an expert, but at a glance it looks like the r7rs egg's version is indeed R7RS compliant whereas the chicken-core version is r5rs. R7RS (and R6RS)

General comments

2023-01-05 Thread Lassi Kortela
Arguably that's a feature - in Scheme you'll always be sure of the performance characteristics of the type you're working with, and you'll always know what type you're working with. Also, by not having generics for collection types you avoid quite a performance overhead related to dispatch. But

Re: Partial automation of egg dependencies

2022-11-22 Thread Lassi Kortela
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)'. *

Re: Partial automation of egg dependencies

2022-11-21 Thread Lassi Kortela
Actually, perhaps the best way would be to use a custom build using csm to build the components of the egg. A little bit of inventiveness might be required, but I think it should be possible. This would make the egg depend on csm. I don't mind this for programs, but for eggs that are just

Re: Partial automation of egg dependencies

2022-11-21 Thread Lassi Kortela
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.

Re: Partial automation of egg dependencies

2022-11-20 Thread Lassi Kortela
It's ambiguous. There can be (and are) eggs that export procedures of the same name. Procedures are exported from modules, not from eggs, right? Where's the conflict? Dependencies shouldn't get out of sync, and updated versions may change what is exported... so I would question exactly

Partial automation of egg dependencies

2022-11-20 Thread Lassi Kortela
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.

Re: New egg: gmi

2022-10-28 Thread Lassi Kortela
I wrote an egg for the Gemini network protocol at . I haven't ended up as an active user of Gemini, so if someone more active wants to take over the egg, I can move the repo under your account. Last we checked, the openssl egg had trouble with some

Re: CHICKEN version dependent expansion

2022-06-28 Thread Lassi Kortela
#;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

Re: CHICKEN version dependent expansion

2022-06-28 Thread Lassi Kortela
I am trying to define a function depending on the version of CHICKEN. I was thinking to use "cond-expand" for this purpose, but found no suitable feature in the documentation #;1> (cond-expand (chicken-5 'a) (chicken 'b) (else 'c)) a

Re: Bare-Metal Suitability

2022-06-27 Thread Lassi Kortela
as a beginner you're probably better off finding an implementation that requires less of an OS footprint. - Loko Scheme runs on bare metal x86-64. - Gambit Scheme has been used to compile bare metal code. - Ribbit is a new ultralight Scheme from Gambit's author. - There are various

Re: What are the long-term goals for R7RS in Chicken?

2021-07-18 Thread Lassi Kortela
But I"d like to stress the fact that run-time and compile-time file locations may differ, also things like dynamic loading vs static linking come into play. In the end this is a build issue, not necessarily a question of run-time semantics. Sorry, I was being ambiguous. The natural strategy

Re: What are the long-term goals for R7RS in Chicken?

2021-07-18 Thread Lassi Kortela
Note that include-files and loaded libraries are two different things, also in CHICKEN, libraries are usually compiled, so the .sld convention is only partially useful. The convention (observed at least by Chibi, Gambit, and Gauche) is that each .sld file contains one define-library form.

Conditional include

2021-07-18 Thread Lassi Kortela
Lassi: The fact that different Schemes have different conventions for where their library files are is actually a great convenience to me when developing SRFIs.  All the actual code goes into files named *-impl.scm (or multiple names if there are multiple files).  Then each library file or

Re: What are the long-term goals for R7RS in Chicken?

2021-07-18 Thread Lassi Kortela
Currently you can switch to R7RS more by installing the egg and running csc with "-R R7RS -X R7RS", which is a mouthful, and could be abbreviated, that doesn't look to me like too much hassle. Anybody for a "-r7rs" option that does the above? +1 for an easy command line flag! Gauche and

What are the long-term goals for R7RS in Chicken?

2021-07-18 Thread Lassi Kortela
Is there a consensus on how deeply to integrate R7RS into Chicken? It seems mostly R7RS compliant as it stands. Are there any technical or ideological blockers to basing core Chicken on R7RS-small in the future? The main point of divergence seems to be the native module system, which offers a

Re: Build static binaries of chicken apps in a docker container

2021-06-25 Thread Lassi Kortela
Currently is uses my own Chicken docker images (Images: https://hub.docker.com/r/lattay/chicken , Dockerfile: https://github.com/Lattay/chicken_docker ) so it can work on AMD64 or ARMv7 (nice for RPi 2 and 3), but it is very simple and can easily be used for other base images. Your

Re: chicken-doc instructions recommend extracting tar file as root

2021-05-08 Thread Lassi Kortela
For a proper fix, could chicken-doc be modified to download the tar file, sanity-check its contents, and unpack it safely into the user's home directory instead? Alternatively, if the documentation is shipped in some kind of file format with an index for fast lookup, it doesn't need to be

chicken-doc instructions recommend extracting tar file as root

2021-05-08 Thread Lassi Kortela
Currently https://wiki.call-cc.org/eggref/5/chicken-doc instructs users to run: curl https://3e8.org/pub/chicken-doc/chicken-doc-repo-5.tgz | sudo tar zx in a directory that's often located within /usr. This is not ideal from a security perspective, especially given that that the remote file

Re: filter

2021-01-28 Thread Lassi Kortela
I suggest, to include a filter routine with two values, the sublist which passes the test and the sublist which fails In Scheme that procedure is called `partition`, also from SRFI 1: https://srfi.schemers.org/srfi-1/srfi-1.html#partition `filter` returns one list containing the values that

Re: Web page with quick links to all C4 and C5 egg versions

2021-01-14 Thread Lassi Kortela
I wonder if I'm missing the actual meessage that page is trying to convey. Is it about showing CHICKEN 4 eggs that are "missing" in CHICKEN 5 or vice-versa? That's one use of it -- or it shows if C5 has a different version of the same egg than C4. * Some extensions that are eggs in CHICKEN

Re: Web page with quick links to all C4 and C5 egg versions

2021-01-12 Thread Lassi Kortela
Isn't that page similar to https://eggs.call-cc.org/4/ and https://eggs.call-cc.org/5/ in terms of content? It collects both Chicken 4 and Chicken 5 versions of the information on the same page, which is its main point. Regarding to the link to the eggs-[45]-latest repos, I think that can

Web page with quick links to all C4 and C5 egg versions

2021-01-11 Thread Lassi Kortela
Here's a listing of all eggs with - egg name - description - license - latest egg version number for Chicken 5 - latest egg version number for Chicken 4 - link to egg documentation (wiki) and git repo for both versions - color indicator saying whether each version is up to date or not

Re: Source code formatter?

2021-01-11 Thread Lassi Kortela
The problem with pretty printer is that it is not designed for source: it does not keep comments and blank lines. +1 Scheme reader that preserves them: - https://github.com/weinholt/laesare Work-in-progress formatters: - https://github.com/paines/scmfmt (uses Chicken pretty printer) -

Re: Chicken on Debian

2021-01-10 Thread Lassi Kortela
dnormandin@ASUSLAP:~$ sudo apt install chicken-bin=5.2.0 E: Version '5.2.0' for 'chicken-bin' was not found 5.2.0 is in Debian Testing and Unstable. https://repology.org/project/chicken/versions

Re: New egg: SRFI-87: => in case clauses

2020-11-21 Thread Lassi Kortela
currently doesn't mention SRFI 87.

Re: New egg: unveil

2020-11-21 Thread Lassi Kortela
I'd like to add the following new egg, which provides unveil(2) support for CHICKENs running under OpenBSD Nice feature! unveil() works together with pledge(). There already seems to be a pledge egg at . Any chance the two eggs could be merged?

Re: Establishing Git repos for miscellaneous Chicken tools

2020-11-17 Thread Lassi Kortela
Sure. What should it be called? Is "chicken-tools" ok? Or "chicken-integrations" or "chicken-contrib"? Or even more generically, "chicken-scheme" which doesn't exist yet. It could be "chicken-emacs" but Dan suggested: an organization that focuses on Chicken tool integration would be good;

Re: Establishing Git repos for miscellaneous Chicken tools

2020-11-17 Thread Lassi Kortela
Sounds good to me. Thanks for organizing this. Great. Mario, can you create the org since from our initial group of contributors you are the one most closely associated with Chicken?

Re: Establishing Git repos for miscellaneous Chicken tools

2020-11-17 Thread Lassi Kortela
Please note that what I wrote was just a suggestion to prevent future problems. I don't mean to impose anything. If you think using GitHub, GitLab or whatever git host available would be a good solution, that's absolutely fine by me. I use GitHub myself. It was just a small remark to avoid

Re: Establishing Git repos for miscellaneous Chicken tools

2020-11-17 Thread Lassi Kortela
Switching git hosting solutions should be just a matter of changing the git URL. AFAICT this can be achieved by turning off the issue tracker and wiki on GitHub repos. This would mean we use the mailing list, Chicken's issue tracker, or email/irc for coordination. Since it's just a few tools,

Establishing Git repos for miscellaneous Chicken tools

2020-11-16 Thread Lassi Kortela
We spoke with Mario and Dan about gathering Git repos for all the Chicken Emacs packages under one roof, and Dan suggested adding other tools such as an LSP server into the mix. We thought it'd be convenient to start an organization on GitHub or GitLab to do this, but are not sure whether the

Re: Determining the correct, most up-to-date source/document for scraping CHICKEN SRFI metadata from

2020-11-11 Thread Lassi Kortela
Another option is to add an S-expression like (provides-srfi 1 2 3) into the .egg file of each egg that implements one or more SRFIs. This would make the information independent of the package name, and the `eggs-5-latest` Git repo already aggregates all eggs, so an indexer could clone that

Re: New egg for SRFI 193: Command line

2020-10-23 Thread Lassi Kortela
Thanks for your contributions to CHICKEN. No problem, sorry for taking so long! You can edit the wiki anonymously, but since you are maintaining eggs, I'd highly recommend using a personal wiki account (reason being every time we see an anonymous edit we must check whether it is spam or not).

Re: New egg for SRFI 193: Command line

2020-10-23 Thread Lassi Kortela
Everything seems to be in order, I’ve added the egg to the repository! :) Thank you very much. Unfortunately it has a bug (my fault): chicken-install pre-compiles it into a .so and (import (srfi 193)) in csi loads that .so instead of loading the source .scm file. The library uses cond-expand

New egg for SRFI 193: Command line

2020-10-22 Thread Lassi Kortela
Based on the code posted to chicken-hackers previously, here's an egg for SRFI 193: . test-new-egg says: < srfi-193 (1 of 1) Fetching[ ok ] 0s Reading .egg[ ok ]

Best way to track and isolate project dependencies?

2020-09-10 Thread Lassi Kortela
Does Chicken support installing eggs into a project-specific directory, and using only those eggs for that project (ignoring system-wide ones)? I.e. something like Python's venv (https://docs.python.org/3/library/venv.html) and similar tools for other languages. General-purpose libraries are

Docker container of Chicken's git master

2020-05-03 Thread Lassi Kortela
docker run -it schemers/chicken:head Currently updated manually. The release containers also continue to be maintained: docker run -it schemers/chicken:4 docker run -it schemers/chicken:5

Docker images updated

2020-03-01 Thread Lassi Kortela
Congrats on the new release. We updated our Docker image to match: $ docker run -it weinholt/chicken CHICKEN (c) 2008-2020, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 5.2.0 (rev 317468e4) There's now also a Chicken 4 image: $ docker run -it weinholt/chicken:4 CHICKEN (c)

Re: Trying to understand chicken limitations

2019-12-23 Thread Lassi Kortela
There's a persistent myth among programmers that interpreters are slow. I disagree that this is a myth. Interpreted code is typically anywhere from 5x to 100x slower than compiled code depending on the features of the interpreter and quality of the compiled code. The real issue is that

Re: Trying to understand chicken limitations

2019-12-23 Thread Lassi Kortela
As for S7, I would use Chibi instead: it's more modern and probably faster. It's a little-known fact that S7's author, Bill Schottstaedt still actively maintains it (https://ccrma.stanford.edu/software/s7/). S7 is the scripting language for three audio/music programs: Snd, Radium, and Common

Re: RAM usage of applications?

2019-11-30 Thread Lassi Kortela
I added (let loop () (loop)) after the (print "Hello world") so I could watch the process, and Windows is charging it with 2.6 MB.  I don't know how, if at all, Windows allocates DLL memory to applications with the DLL open. The DLL file can be substantially larger than the runtime image if

Re: RAM usage of applications?

2019-11-30 Thread Lassi Kortela
The Chicken DLL is about 3.4MB, of which a good deal will be relocation tables and such. I'm a Cygwin user, so my C library is included in cygwin1.dll, which is about the same size [...] The native Windows C library, also a DLL, is about 1MB, depending on the OS version [...] So the RAM

Re: [Chicken-users] Snowtar C5 patch

2019-09-17 Thread Lassi Kortela
Additionally, if anyone knows of a mirror for scheme now! packages/code, I'd love to explore these and package some up for C5 (I'm awaiting on a response from the person who maintained the website, as far as I can tell). Are you talking about ? It's maintained by Alex

[Chicken-users] Docker container for Chicken

2019-08-14 Thread Lassi Kortela
A prebuilt container based on Debian Linux is now available. To boot into csi: $ docker run -it weinholt/chicken To explore the container's Linux system: $ docker run -it weinholt/chicken bash The container's size is 87MB. Dockerfile at

Re: [Chicken-users] Changing the chickadee home page to C5

2019-07-31 Thread Lassi Kortela
I'd like to take this opportunity to thank the people who made Chickadee possible. It is a pleasure to use. We aspire to eventually index documentation for all Scheme standards, implementations and libraries in one place, and Chickadee is a big inspiration for the interface.

Re: [Chicken-users] GraphQL libraries coming soon

2019-07-25 Thread Lassi Kortela
On 25.07.2019 10.36, Mark Janssen wrote: I am currently working on a GraphQL PoC at work. The chicken deployment story combined with GraphQL suppport would be very nice. Great, welcome aboard! It's always exciting to get things done faster. 1. Think about N+1 early, most real life projects

[Chicken-users] Status of srfi-64 egg

2019-07-24 Thread Lassi Kortela
Seems there used to be a srfi-64 egg ("A Scheme API for test suites"). But there's currently no page for it in the Chicken wiki - neither for Chicken 4 or Chicken 5. Does anybody know about its status, and whether it's being brought back to Chicken 5? I'll volunteer to help with this if

[Chicken-users] GraphQL libraries coming soon

2019-07-24 Thread Lassi Kortela
We're exploring making a GraphQL API for the Schemedoc project ( and - new members welcome :) Since we want to do as much as possible in Scheme, I'll write GraphQL client and server libraries to support the

[Chicken-users] Easiest way to find origin repos of Chicken eggs

2019-07-23 Thread Lassi Kortela
Is there a global index (one file or web page) that links to the git/hg origin repo of every Chicken egg? ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users

Re: [Chicken-users] Interaction of subprocess and condition handling

2019-07-19 Thread Lassi Kortela
Sorry, that code cleared the FD_CLOEXEC flag instead of setting it. Fixed code at . ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users

Re: [Chicken-users] Interaction of subprocess and condition handling

2019-07-19 Thread Lassi Kortela
Obviously in Chicken you would not exit the parent, but you'd exit the child with code 126 as here. In Chicken you'd probably want some fancy way to propagate the errno value from the child to the parent after a failed execve(). It's unwise to do something like _exit(errno); One solution would

Re: [Chicken-users] Interaction of subprocess and condition handling

2019-07-19 Thread Lassi Kortela
I think you'd basically have to replicate the following C traditional programming technique in whatever mixture of Scheme and C is appropriate for Chicken. So when you run "./spawn date" it succeeds and prints output from the standard Unix "date" utility. But when you run "./spawn nonexistent"

Re: [Chicken-users] Interaction of subprocess and condition handling

2019-07-19 Thread Lassi Kortela
OK, I perused the chicken-core git repo. posixunix.scm defines the 'process' procedure. It's a wrapper for the 'process-impl' procedure in the same file. process-impl does a lot of setup, then: (chicken.process#process-fork (lambda () ;; ...set up input and output pipes...

Re: [Chicken-users] Interaction of subprocess and condition handling

2019-07-19 Thread Lassi Kortela
Thanks for helping out :) *Normally*, closing both ports returned from "process" will do a waitpid(2) (or the equivalent) and throw an exception if WIFEXITED returns false. So WIFEXITED checks for a normal exit (instead of being terminated by signal, e.g. segfault or kill -9). But what if

[Chicken-users] Interaction of subprocess and condition handling

2019-07-18 Thread Lassi Kortela
How do you handle errors signaled by the 'process' procedure from the (chicken process) module in Chicken 5? When I try things like (receive (from-child to-child child) (condition-case (process command args) (_ () (values #f #f #f))) ...) I get weird

Re: [Chicken-users] Building the openssl egg on MacOS

2019-07-15 Thread Lassi Kortela
I maintain the openssl egg these days. Very nice, thanks for your efforts! Ugh. I've always had the impression macOS gets worse with each release, but this is ridiculous, almost as if they expect everyone to use XCode for development... I find that the usability gets better with each

Re: [Chicken-users] Building the openssl egg on MacOS

2019-07-15 Thread Lassi Kortela
I spent a _little_ while digging into the details of this a few months ago, and my understanding is this: * Apple were suffering version-skew hell because (reportedly) the OpenSSL folk kept changing the ABI for the library. * So they lost patience and deprecated OpenSSL on macOS Sounds

[Chicken-users] Mapping the idiosyncrasies of building the OpenSSL egg on many operating systems

2019-07-15 Thread Lassi Kortela
I investigated how to get openssl working on all the major BSD-derived operating systems. Here are the results: The shell script used and the build logs I got are here:

[Chicken-users] Building the openssl egg on MacOS

2019-07-15 Thread Lassi Kortela
On MacOS Mojave, "chicken-install openssl" fails because the OS doesn't ship any pkg-config definition file for its version of the openssl library. The pkg-config definition is supposed to be in a file called 'openssl.pc' but 'sudo find / -name openssl.pc 2>/dev/null' turns up no such file for