Re: require-extension and require-library

2021-12-22 Thread Evan Hanson
Hi Erica,

require-extension and require-library are only equivalent when import
libraries ("import.scm" files) are available for the given name, which
isn't the case in your interpreted example.

When main_a.scm starts, it implicitly tries to import module "extra" as
a first step, and no such module is available (since "extra.scm" has not
been evaluated yet and there is no file "extra.import.scm" to load).

When main_b.scm starts, it firstly evaluates "extra.scm" (thereby
registering module "extra") and _then_ imports module "extra", which
works since the module is known to the runtime.

That doesn't really help achieve your goal of making the compiled and
interpreted cases works the same, I know, but it hopefully helps to
explain the difference in behaviour between those files.

Cheers,

Evan



Re: Help with egg definitions

2021-12-20 Thread Evan Hanson
Hi Robert,

On 2021-12-19 15:10, foggy wrote:
> I have my program split up using `(declare (unit ...))` and `(declare (uses
> ...))` (no includes), and compile the program by passing all the source
> files to csc. Is this the wrong way to go about splitting things up?

Based on the above, I *think* you can get chicken-install to do what you
want with something like the following. Your source files can probably
remain unchanged, too, as long as the units and filenames all match.

((component-options (linkage static))
 (components
  (extension a (modules) (source "src/a.scm"))
  (extension b (modules) (source "src/b.scm"))
  (program example (component-dependencies a b

The "static" linkage flag tells it to compile via object files and the
empty "modules" form tells it you're not using modules in those files.
Maybe give that a try for a start?

Cheers,

Evan



Re: Chicken git egg: bug & patch

2021-06-15 Thread Evan Hanson
Hi there,

Just to follow up on this, these issues have been fixed in version 0.2.0
of this egg. Thank you Kristian and megane for the helpful discussion!

This is a good use case for (strong) locatives since they can be handled
just like pointers by the FFI but still hook memory up to the GC.

Evan



Re: Chicken git egg: bug & patch

2021-06-14 Thread Evan Hanson
I think we can probably just use blobs and locatives to keep things
simple, without needing to involve finalizers or similar tricks.  This
library is pretty good about leaving memory management up to the client,
and they provide an object for indirection (the git_buf) when that's not
possible. I'll have a look when I get a chunk of spare time.

Thank you Kristian for digging into this, it is very helpful.

Evan



Re: Chicken git egg: bug & patch

2021-06-13 Thread Evan Hanson
Hi Kristian,

On 2021-06-12 15:36, Kristian Lein-Mathisen wrote:
> I think I may have come across a bug in the git egg.

You're right! THanks for pointing this out, I guess you must be the
first person to use that `frombuffer` procedure.

Everything you've said looks correct to me, I'll try to publish a fix
for this soon.

Evan



Re: Source code formatter?

2021-01-12 Thread Evan Hanson
Hi Paul,

On 2021-01-11 16:53, Vasilij Schneidermann wrote:
> Evan Hanson wrote one: https://git.foldling.org/schematic/

I did. I actually forgot about that! But I did, a while ago, and I've
been using it ever since, which I guess means it works?

You can install the "schematic" egg and try piping Scheme through the
"schematic-format" command to see whether it will work for your use
case. Theoretically it ought to work with other Schemes as well,
although I only ever tested the R7RS compatibility with Chibi and
Gauche.

Note that, despite the name, this is just an indenter, not a formatter
i.e. it won't wrap lines or rewrite your code in any way. I tend to
agree with Vasilij that such things are better left to the programmer.
But, for the sole purpose of auto-indentation, I think it's pretty OK.
The man page is available in Markdown format here:

https://git.foldling.org/schematic/tree/master/schematic-format.1.md

I have this command hooked up to the '=' keybinding in Vim, so that (for
example) the keystroke '=ap' auto-indents the current paragraph:

autocmd FileType scheme setlocal equalprg=schematic-format\ -b\ ~/.lispwords

I've attached my lispwords file in case it's useful. It includes a
handful of CHICKEN's special forms that have funky indentation
conventions. Dunno if any of this is helpful, but if you do give it a
try and run into issues just shout and I'll try to help!

All the best,

Evan
((λ 2)
 (and-let 1)
 (and-let* 1)
 (begin0-let 1)
 (begin0-let* 1)
 (begin-for-syntax 1)
 (begin-syntax 1)
 (call-with-input-pipe 0)
 (call-with-input-request 0)
 (call-with-input-string 0)
 (call-with-output-pipe 0)
 (call-with-output-string 0)
 (condition-case 1)
 (declare 1)
 (define-constant 1)
 (define-for-syntax 1)
 (define-inline 1)
 (define-macro 1)
 (define-record 1)
 (define-record-printer 1)
 (define-syntax-rule 1)
 (define-type 1)
 (fluid-let 1)
 (fluid-let* 1)
 (foreign-lambda 1)
 (foreign-lambda* 1)
 (foreign-safe-lambda 1)
 (foreign-safe-lambda* 1)
 (handle-exceptions 3 3 1)
 (if-let 1)
 (if-let* 1)
 (let-optionals 1)
 (let-optionals* 1)
 (or-let 1)
 (or-let* 1)
 (match 1)
 (match-lambda 1)
 (match-lambda* 1)
 (match-let 1)
 (match-let* 1)
 (module 3 3 1)
 (receive 3 3 1)
 (test-group 1)
 (unless-let 1)
 (unless-let* 1)
 (when-let 1)
 (when-let* 1)
 (with-current-directory 0)
 (with-input-from-encoded-file 0)
 (with-input-from-pipe 0)
 (with-input-from-port 0)
 (with-input-from-request 0)
 (with-input-from-string 0)
 (with-output-to-pipe 0)
 (with-output-to-port 0)
 (with-output-to-string 0))


New program: sq (jq wrapper for S-expressions)

2021-01-01 Thread Evan Hanson
Hi there,

Over the holidays I've cleaned up and released a little tool that lets
you use jq [1] to muck with S-expressions. You can install it with
`chicken-install sq`, links to sources below.

It currently only supports inputs that satisfy the JSON representation
used by SRFI-180 [2] (which is also the one used by the medea egg), but
I may extend it to support arbitrary S-expressions in the future. 'Til
then I hope it's a useful little hack for someone.

 - Wiki: https://wiki.call-cc.org/eggref/5/sq
 - Repository: https://hg.sr.ht/~evhan/sq
 - Issues: https://todo.sr.ht/~evhan/sq

That's all, have a happy 2021!

Evan

[1]: https://stedolan.github.io/jq/
[2]: https://srfi.schemers.org/srfi-180/



Re: Need help testing SRFI-194: Random data generators

2020-12-03 Thread Evan Hanson
Hi Sergey,

On 2020-11-16 13:36, noosph...@mailc.net wrote:
> The comments to this test say "testing random source, which is
> implementation specific", and it only provides a single
> test for the Guache Scheme implementation.
> 
> Would anyone more experienced in dealing with randomness on Chicken be
> able to provide me with a good Chicken test to substitute for this
> Guache test?

I've just had a look and this test group seems to be specifically testing
the library's behaviour when an implementation-provided random-source is
used. Is that right? If so, I think it's fine to leave this test disabled
for CHICKEN since it doesn't actually provide any such random-source;
instead, one would just use the sources provided by srfi-27, I expect? And
that already seems well-covered by the tests.

That's just my two cents, though, please let me know if I've misunderstood
how these libraries hang together (or the purpose of the test, I suppose).

Cheers,

Evan



Re: New egg: unveil

2020-11-29 Thread Evan Hanson
On 2020-11-21 13:27, Lassi Kortela wrote:
> > 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?

That makes sense to me. I'm not sure what name would be best to use for
this, but as the author of the pledge egg I think it makes sense to
bundle these procedures in one way or another.

Evan



Re: Chicken 5.2.0 build fails on Gnu Hurd

2020-10-19 Thread Evan Hanson
Hey Andrew,

On 2020-10-19 19:29, Andrew Eggenberger wrote:
> The macro is not set in the chicken-config.h file.
> 
> I think the easiest way to test would probably to start with a
> pre-installed virtual image.
> 
> Instruction from https://www.debian.org/ports/hurd/hurd-install:
> 
> You can also get a pre-installed image and run it in qemu:

Thanks for those instructions, and for having a closer look at what's
going wrong.

For what it's worth I've just used that disk image to build the 5.2.0
tarball and a fresh clone of chicken-core.git, and that macro is present
in both cases. That is using the standard `make PLATFORM=hurd` invocation.

Cheers,

Evan



Re: Chicken 5.2.0 build fails on Gnu Hurd

2020-10-18 Thread Evan Hanson
Hi Andrew,

> This is confusing because it looks like SEARCH_EXE_PATH is defined to 1 in
> Makefile.hurd.

Interesting. Can you confirm that macro is defined in the generated
chicken-config.h file?

What's the easiest way to run GNU Hurd on another Linux (e.g. Debian),
to reproduce? I used to test Hurd builds with Vagrant, but the base box
went away a few years ago and I don't know of another way to test this.

Cheers,

Evan



Re: Best way to track and isolate project dependencies?

2020-09-10 Thread Evan Hanson
Hi Lassi,

I mostly do what Alice says, using egg files to manage builds regardless
of whether the software will be released as an egg, just to benefit from
chicken-install's smarts about compiler flags and so on. So, to answer
your second question, yes the eggs facility can be used to track
dependencies in development just as well as for release. (Note that
non-egg dependencies such as C libraries are out of scope for
chicken-install, so for that you'll need some other tool.)

To your first point about dependency isolation, I sometimes use direnv
[1] alongside a tool I wrote [2] to install CHICKEN into each project's
directory and use that version whenever I'm working on it. It works a
bit like venv in the end, but I don't have to remember to activate it:

# install chicken into a local directory
$ dust install 5.2.0 ./chicken

# configure direnv to put that chicken on the path
$ cat .envrc
PATH_add "$(pwd)/chicken/bin"

# run chicken-install with -no-install to install dependencies and
# build the software (defined by a local egg file)
$ chicken-install -n

This gives you control over the CHICKEN version as well as eggs. If you
didn't care about that you could also have direnv manage just
CHICKEN_INSTALL_REPOSITORY and CHICKEN_REPOSITORY_PATH, I just find it
easier to think about this as an all-or-nothing thing.

Note there is also cenv [3] which can isolate eggs for your project by
shuffling environment variables as well, but I haven't tried it.

Cheers,

Evan

[1]: https://direnv.net/
[2]: https://git.sr.ht/~evhan/dust
[3]: https://github.com/ursetto/cenv



CHICKEN 5.2.0 in Nixpkgs and Guix

2020-03-03 Thread Evan Hanson
Hi there, one more.

CHICKEN 5.2.0 is now also available via Nixpkgs (unstable channel) and
Guix (default channel).

Cheers,

Evan


signature.asc
Description: PGP signature


Re: Behavior of #!optional

2020-03-03 Thread Evan Hanson
Hi Théo,

I don't know whether there are any firm guarantees about that behaviour,
but functionally it's safe to rely on, yes. That idiom you mentioned is
pretty handy, I use it myself sometimes.

Under the hood, #!optional arguments are expanded in a let*-style
binding form (as opposed to a "normal" let binding, where they wouldn't
see one another), so later values can refer to earlier ones.

Cheers,

Evan



Dust and asdf builds updated

2020-03-01 Thread Evan Hanson
Hi there,

CHICKEN 5.2.0 is now available via dust [1] and the asdf version
manager [2] (using the "chicken" plugin), as well.

[1]: https://wiki.call-cc.org/egg/dust
[2]: https://asdf-vm.com/

Happy hacking,

Evan


signature.asc
Description: PGP signature


Re: It would be nice if glob "/*/*" worked

2019-11-28 Thread Evan Hanson
On 2019-11-28  8:38, Kristian Lein-Mathisen wrote:
> I may be missing the point here, but is'nt it just easier to use find-files?

I think there are situations where one is more natural than the other.

find-files is strictly more powerful, but it's not as concise or
readable for many use cases so I'm considering the limitations of the
glob procedure independently.

Best,

Evan



Re: It would be nice if glob "/*/*" worked

2019-11-27 Thread Evan Hanson
Hi Matt,

This would be nice indeed, I've also found myself wanting this feature
before. I don't know of an existing solution, but I think it would be
best if we made it "just work" with the existing glob procedure.

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

Cheers,

Evan


signature.asc
Description: PGP signature


Re: [Chicken-users] how do i load a module? none of the docs seem to help... :(

2019-08-09 Thread Evan Hanson
Hi Kay,

On 2019-08-09 17:19, masukomi wrote:
> I then generate `hello.import.scm` and `hello.so` with `csc`
> 
> What _exactly_ do i need to put in code in order to import the `hello`
> module in such a way that when I compile the thing importing it with
> `csc -static thing-importing-hello.scm` I don't get "csc: could not
> find linked extension hello"

hello.so is a dynamic library, so it won't work when compiling the
program with -static. For that, you need to compile hello.scm to an
object file and link it into the program. Assuming you're using CHICKEN
5.x, try this:

$ csc -unit hello -cJ hello.scm
$ csc -link hello -static thing-importing-them.scm
$ ./thing-importing-them
hello world

thing-importing-them.scm can contain just the following:

(import (hello))
(greet)

Cheers,

Evan

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


[Chicken-users] [ANN] CHICKEN plugin for asdf-vm

2019-07-20 Thread Evan Hanson
Hello,

There is now a CHICKEN plugin for the asdf version manager 
(https://asdf-vm.com/).

If you use asdf-vm on x86-64 Linux or FreeBSD, you can use it to install CHICKEN
with the following commands:

  asdf plugin-add chicken
  asdf install chicken 5.1.0
  asdf global chicken 5.1.0

All the best,

Evan

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


[Chicken-users] [ANN] CHICKEN version manager

2019-06-22 Thread Evan Hanson
Hi there,

I wrote a tool that lets you quickly install and switch between multiple
versions of CHICKEN [on x86-64 Linux hosts].

It's a bit like chicken-belt [1] or opam switch [2], except that it
installs from prebuilt binaries so it's a bit faster and doesn't require
a build toolchain on the target. I figured now would be a good time to
announce it, since it offers an easy way to install CHICKEN 5.1.0 while
the package managers catch up.

Find the project here:

  https://eggs.call-cc.org/5/dust

If it works for you, or more particularly if it doesn't, I'm keen to
hear about it.

Cheers,

Evan

[1]: https://eggs.call-cc.org/5/chicken-belt
[2]: https://opam.ocaml.org/doc/Usage.html#opam-switch

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


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

2019-06-09 Thread Evan Hanson
Thanks John.

On 2019-06-09 22:23, John Cowan wrote:
> The output of "make test" was over 20,000 lines, some of which do have the
> string "fail" in them.  I've posted it at
>  if anyone wants to take a look.

That's actually a successful run; the tests exit early (with a non-zero
exit status) if any of the tests fail.

Best,

Evan

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


Re: [Chicken-users] [ANN] API bindings for sr.ht

2019-05-27 Thread Evan Hanson
On 2019-04-29 21:24, Evan Hanson wrote:
> I've written a client library for the sr.ht REST APIs.

Just a small follow-up: this project now includes a CLI program for
interacting with the APIs. It only supports the build and paste services
at the moment, but I've found it convenient for triggering jobs from the
command line, for example:

$ export SRHT_ACCESS_TOKEN="your-access-token-goes-here"
$ topham create job -n "Example build" < build.yaml
((id . 1234))
$ topham get job 1234
((id . 1234)
 (status . "running")
 (setup_log ...)
 (tasks . #(...))
 (runner ...))

> Find the project here:
> 
>   https://git.sr.ht/~evhan/topham
> 
> If you're unfamiliar with sr.ht (aka sourcehut), you can find out more
> about it here:
> 
>   https://sourcehut.org/

Happy hacking,

Evan

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


[Chicken-users] [ANN] API bindings for sr.ht

2019-04-29 Thread Evan Hanson
Hi everyone,

I've written a client library for the sr.ht REST APIs.

Well, most of them. Since writing the egg and sending this email, the
git.sr.ht service has grown an API, so that will still need to be done.
But the rest of the services (builds, lists, paste, meta) are working.

Find the project here:

  https://git.sr.ht/~evhan/topham

If you're unfamiliar with sr.ht (aka sourcehut), you can find out more
about it here:

  https://sourcehut.org/

Cheers,

Evan

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


Re: [Chicken-users] repository pathname, location and customisation, lib64

2019-04-06 Thread Evan Hanson
Hi Marco,

On 2019-03-25  6:08, Marco Maggi wrote:
> Am I  correct in saying that  the README in Chicken's  distribution is
> missing  a  note saying  that  we  should  *not* "strip"  the  installed
> binaries?  If I strip them I get errors later when installing eggs.

What are the errors?

I don't think it matters one way or the other, but would be interested
to know if it does.

Evan

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


Re: [Chicken-users] Chicken 5 support for srfi-113

2019-03-20 Thread Evan Hanson
Hi Jeremy,

On 2019-02-27 22:54, Jeremy Steward wrote:
> Seems I also added chicken 5 support for srfi 113 (sets and bags) some time 
> ago, and never bothered to add it to the coop.
> 
> Can someone add this too?

Seems this one got lost. That's done now!

Thanks,

Evan


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


Re: [Chicken-users] I modified lua.setup

2019-03-20 Thread Evan Hanson

Hi newblue,

The best way is probably to get in touch with the egg's maintainer and 
send them your changes.


For the lua extension, that's Felix 

Cheers,

Evan

On 20/03/19 2:06 AM, newblue wrote:
I modified the lua extensions to enable dlopen support on Linux. I 
modified the lua extension package, but I don't know how to commit my 
changes.

thank you all.

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



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


Re: [Chicken-users] eggs failing to install on freebsd 12

2019-02-24 Thread Evan Hanson
Hi greadley,

You might try exporting CSC_OPTIONS or CHICKEN_OPTIONS, which should be
inherited by the compiler when it's invoked by `chicken-install'.

I'm a bit surprised that setting C_INCLUDE_PATH didn't work. You might
try adding "-verbose" to CSC_OPTIONS as well, to see what flags are
being passed to the compiler in the end.

HTH,

Evan

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


Re: [Chicken-users] build failure and some questions about using chicken-belt

2019-02-24 Thread Evan Hanson
Hi Heinz,

On 2019-02-24 13:30, ipc...@arcor.de wrote:
> Also, I'm a bit unsure how to proceed afterwards. My plan was as follows:

The steps you've laid out there should work. The fact that `make' is
trying to recompile from Scheme sources indicates that the timestamps on
the files extracted from the tarball are wrong. Try scrapping those
directories and re-extracting them from the distribution tarball, as
Alexander says, and let us know if that doesn't sort it.

Best,

Evan

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


Re: [Chicken-users] Comparse recursive parser

2019-02-17 Thread Evan Hanson
Hi there,

On 2019-02-16 19:33, Joe Anonimist wrote:
> Unfortunately the recursive-parser procedure is not documented and
> the above code just keeps looping.

Regarding `recursive-parser', note that this has nothing to do with
recursive parsing per se, but rather exists to simplify *syntactic*
recursion, i.e. referring to a parser before it has been defined. For
example:

  (define a*b
(any-of (sequence (is #\a) (recursive-parser a*b))
(is #\b)))

Without `recursive-parser' you would need to enclose the parser body
manually somehow. Regardless, the infinite recursion you're seeing is
due to your grammar, as megane says.

Best,

Evan

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


Re: [Chicken-users] hahn/salmonella issues

2019-02-05 Thread Evan Hanson
Hi Heinz,

On 2019-02-05 16:09, lundi wrote:
> > $ cat file.scm | sed 's/^[ \t]+//' | grep -e "^;;;" | cut -b 5- > file.wiki
> 
> I considered writing documenting comments in Markdown and then pipe those
> through markdown-svnwiki, but I feel like there's little benefit over just
> writing comments directly in svnwiki syntax.
> 
> Obviously there's a lot of room for improvement here. For instance it would
> be great to have a way of automatically converting procedure definitions
> into (fn args) blocks.

I hesitate to mention this since I'm pretty sure I'm the only person who
uses it, so it hasn't really been battle-tested (and it's not really
documented either), but the schematic egg might do what you're looking for.

In particular, the `schematic-wiki' program will generate svnwiki tags
for commented (toplevel) procedure definitions, with each tag followed
by the comment. So, if you use svnwiki syntax for the comments, the
result could be copied into a wiki page without any changes:

# chicken-install schematic
$ schematic-wiki -c ";;;" < file.scm

There's also a program called `schematic-extract' that generates
S-expressions instead of text, which you could post-process somehow.
There are some details about the expression format here:

  https://git.foldling.org/schematic.git/tree/0.2.1/schematic-extract.1.md

These are also available as library procedures, but again that's totally
undocumented (the irony, I know)... Ping me if you end up using this and
I'll try to help.

All the best,

Evan

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


Re: [Chicken-users] Issue when linking statically

2019-01-29 Thread Evan Hanson
On 2019-01-29 10:51, Jörg F. Wittenberger wrote:
> On Jan 28 2019, Evan Hanson wrote:
> >  http://wiki.call-cc.org/man/5/Egg%20specification%20format#linkage
> 
> This claims "This property only makes sense for extension libraries."
> whereas the snippet came from the .egg file for the resulting program.

Ah, right. In that case you probably need to include -L -static in the
csc options as well, for a fully-static executable. The "normal" -static
flag only affects linkage for the CHICKEN libraries and extensions.

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


Re: [Chicken-users] Issue when linking statically

2019-01-28 Thread Evan Hanson
Hi Jörg,

Rather than (csc-options ...) you might try (linkage static):

  http://wiki.call-cc.org/man/5/Egg%20specification%20format#linkage

Evan

On 2019-01-28 14:07, Jörg F. Wittenberger wrote:
> Hi all,
> 
> trying link a CHICKEN 5 program against the openssl egg fails badly for me.
> 
> In the egg file I have openssl among the dependencies and
> (component-options
>  (csc-options -static -v )
>  (link-options
>   -L "-pthread -l:libssl.a -l:libcrypto.a"
>   ))
> 
> This links successfully, but when the resulting executable is started with
> -:d I see:
> 
> ; loading /home/u/chickens/5.0.0/lib/chicken/9/openssl.import.so ...
> [debug] entering openssl...
> 
> which looks as if I have to ship the file - which would be bad.
> 
> In fact I have another module, which I wrote, which too does not like to be
> linked statically. So in fact I wonder what could have gone wrong.
> 
> Thanks so much
> 
> /Jörg
> 
> 
> 
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users

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


Re: [Chicken-users] HMAC for CHICKEN 5

2019-01-27 Thread Evan Hanson
Hi Thomas,

On 2019-01-27 17:54, Thomas Hintz wrote:
> I've updated the HMAC egg for CHICKEN 5. If it seems done right it'd be
> cool to see it living in the coop. I forget what URL is needed but it
> lives here: https://code.thintz.com/chicken-scheme-hmac/ If possible
> could I also get the CHICKEN 4 coop location updated to the same?

That's all done, and the updates should be available once the egg
mirrors pick them up.

Cheers,

Evan

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


Re: [Chicken-users] Static CHICKEN for variety of Linux + Windows platforms

2019-01-25 Thread Evan Hanson
On 2019-01-05 19:28, Zach van Rijn wrote:
> If it may be of interest, I've cross-built CHICKEN statically
> (against musl [1]) for a variety of Linux platforms, and both
> 32- and 64-bit Windows via MinGW-W64 on Linux.

Wow, this is fantastic, what a nice resource. Thanks for including
CHICKEN, Zach!

> and of course Windows (these _may_ be broken, as they require
> stubbing out a handful of symbols related to [2]; please let me
> know if something doesn't work right):
> 
>   * i686-w64-mingw32
>   * x86_64-w64-mingw32
> 

I couldn't tell from the thread you linked what the problem might be
with these builds. Can you tell whether it was something related to the
toolchain or whether there is some issue with CHICKEN itself?

Cheers,

Evan

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


Re: [Chicken-users] SaarCHICKEN Spring 2019 in Saarbrücken, Germany

2019-01-21 Thread Evan Hanson
Enjoy! Sadly I can't make this one but I wish you happy hacking.

Evan

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


Re: [Chicken-users] bind egg: uint8_t

2019-01-15 Thread Evan Hanson
Hi Sven,

Basic support for [u]int8_t has been added to bind 1.2.4. These map to
the [unsigned-]byte FFI types. Note that this means they will not check
for overflowing values but will be truncated instead, per the warning
here: http://api.call-cc.org/5/doc/foreign/types#def:byte. You mentioned
you aren't accessing those struct members so hopefully this won't be a
problem for you.

If the new version doesn't work properly for you please hit the list
again and I'll try to help. Otherwise, enjoy!

On 2019-01-08  9:10, Sven Hartrumpf wrote:
> "Version History" in http://wiki.call-cc.org/eggref/5/bind contains
> "initial release for CHICKEN 4", which should be "CHICKEN 5".

Fixed, thank you!

Evan

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


Re: [Chicken-users] Nix shell with a non chicken project

2019-01-13 Thread Evan Hanson
Hi David,

On 2018-12-08 14:45, David Smith wrote:
> I'm trying to get a nix shell environment working which has chicken with
> stone packages available. However the project is not a chicken project, it
> just needs the compiler to be available with the packages. I tried to use
> an eggDerivation as described in
> https://nixos.org/nix-dev/2015-April/016869.html however it requires a src
> attribute. Since this is not a chicken project the are no chicken source
> files (they are generated by something else). How can I build a chicken
> environment with the packages I need available with nix shell?

I'm not totally sure what you mean so apologies in advance if I
misunderstand, but the "src" attribute doesn't need to specify local
files but typically uses a helper like `fetchurl` instead. For egg
dependencies, you can use `fetchegg`.

So, for example, to set up a shell that has CHICKEN and the matchable
extension available, you could put the following in ./shell.nix:

with import  {};
let
  matchable = eggDerivation {
name = "matchable-1.0";
src = fetchegg {
  name = "matchable";
  version = "1.0";
  sha256 = "01vy2ppq3sq0wirvsvl3dh0bwa5jqs1i6rdjdd7pnwj4nncxd1ga";
};
  };
in
  stdenv.mkDerivation {
name = "chicken-shell";
buildInputs = [ chicken matchable ];
  }

With that in place, running `nix-shell` will give you a shell with csc,
csi, etc. available and the matchable extension installed.

Is that what you're after?

Evan

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


Re: [Chicken-users] chicken-bind: don't get output for 'mosquitto.h'

2018-12-10 Thread Evan Hanson
Hi Christoph,

On 2018-12-03 10:59, Christoph Lange wrote:
> I have problems using 'chicken-bind'. I'm trying to make 'mosquitto', the
> MQTT library, available to Chicken. But
> 
> *chicken-bind -follow-include mosquitto.h*
> 
> gives me a practically empty 'mosquitto.scm' file:
> 
> Any idea, where I should look for the solution of this?

It's often necessary to tweak header files to some degree before bind
can handle them, since it's not a general-purpose C processor. This
usually means at least stripping preprocessor noise (some of which will
go unevaluated), since that can confuse further parsing.

Attached is a diff against that mosquitto.h file you linked which allows
chicken-bind to work, and the resulting mosquitto.scm file.

Hope that helps,

Evan
diff -ru a/mosquitto.h b/mosquitto.h
--- a/mosquitto.h	2018-12-10 21:33:36.527448557 +1300
+++ b/mosquitto.h	2018-12-10 21:33:07.715295078 +1300
@@ -17,32 +17,9 @@
 #ifndef MOSQUITTO_H
 #define MOSQUITTO_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(WIN32) && !defined(WITH_BROKER) && !defined(LIBMOSQUITTO_STATIC)
-#	ifdef libmosquitto_EXPORTS
-#		define libmosq_EXPORT  __declspec(dllexport)
-#	else
-#		define libmosq_EXPORT  __declspec(dllimport)
-#	endif
-#else
-#	define libmosq_EXPORT
-#endif
-
-#if defined(_MSC_VER) && _MSC_VER < 1900
-#	ifndef __cplusplus
-#		define bool char
-#		define true 1
-#		define false 0
-#	endif
-#else
-#	ifndef __cplusplus
-#		include 
-#	endif
-#endif
+#define libmosq_EXPORT
 
+#include 
 #include 
 
 #define LIBMOSQUITTO_MAJOR 1
@@ -86,14 +63,14 @@
 	MOSQ_ERR_PLUGIN_DEFER = 17,
 	MOSQ_ERR_MALFORMED_UTF8 = 18,
 	MOSQ_ERR_KEEPALIVE = 19,
-	MOSQ_ERR_LOOKUP = 20,
+	MOSQ_ERR_LOOKUP = 20
 };
 
 /* Error values */
 enum mosq_opt_t {
 	MOSQ_OPT_PROTOCOL_VERSION = 1,
 	MOSQ_OPT_SSL_CTX = 2,
-	MOSQ_OPT_SSL_CTX_WITH_DEFAULTS = 3,
+	MOSQ_OPT_SSL_CTX_WITH_DEFAULTS = 3
 };
 
 /* MQTT specification restricts client ids to a maximum of 23 characters */
@@ -1765,8 +1742,4 @@
  */
 libmosq_EXPORT void *mosquitto_userdata(struct mosquitto *mosq);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif

;;; GENERATED BY CHICKEN-BIND FROM mosquitto.h

(begin
  (define-constant LIBMOSQUITTO_MAJOR 1)
  (define-constant LIBMOSQUITTO_MINOR 5)
  (define-constant LIBMOSQUITTO_REVISION 4)
  (define-foreign-variable
LIBMOSQUITTO_VERSION_NUMBER
integer
"LIBMOSQUITTO_VERSION_NUMBER")
  (define-constant MOSQ_LOG_NONE 0)
  (define-constant MOSQ_LOG_INFO 1)
  (define-constant MOSQ_LOG_NOTICE 2)
  (define-constant MOSQ_LOG_WARNING 4)
  (define-constant MOSQ_LOG_ERR 8)
  (define-constant MOSQ_LOG_DEBUG 16)
  (define-constant MOSQ_LOG_SUBSCRIBE 32)
  (define-constant MOSQ_LOG_UNSUBSCRIBE 64)
  (define-constant MOSQ_LOG_WEBSOCKETS 128)
  (define-constant MOSQ_LOG_ALL 65535)
  (define-constant MOSQ_ERR_CONN_PENDING -1)
  (define-constant MOSQ_ERR_SUCCESS 0)
  (define-constant MOSQ_ERR_NOMEM 1)
  (define-constant MOSQ_ERR_PROTOCOL 2)
  (define-constant MOSQ_ERR_INVAL 3)
  (define-constant MOSQ_ERR_NO_CONN 4)
  (define-constant MOSQ_ERR_CONN_REFUSED 5)
  (define-constant MOSQ_ERR_NOT_FOUND 6)
  (define-constant MOSQ_ERR_CONN_LOST 7)
  (define-constant MOSQ_ERR_TLS 8)
  (define-constant MOSQ_ERR_PAYLOAD_SIZE 9)
  (define-constant MOSQ_ERR_NOT_SUPPORTED 10)
  (define-constant MOSQ_ERR_AUTH 11)
  (define-constant MOSQ_ERR_ACL_DENIED 12)
  (define-constant MOSQ_ERR_UNKNOWN 13)
  (define-constant MOSQ_ERR_ERRNO 14)
  (define-constant MOSQ_ERR_EAI 15)
  (define-constant MOSQ_ERR_PROXY 16)
  (define-constant MOSQ_ERR_PLUGIN_DEFER 17)
  (define-constant MOSQ_ERR_MALFORMED_UTF8 18)
  (define-constant MOSQ_ERR_KEEPALIVE 19)
  (define-constant MOSQ_ERR_LOOKUP 20)
  (define-constant MOSQ_OPT_PROTOCOL_VERSION 1)
  (define-constant MOSQ_OPT_SSL_CTX 2)
  (define-constant MOSQ_OPT_SSL_CTX_WITH_DEFAULTS 3)
  (define-constant MOSQ_MQTT_ID_MAX_LENGTH 23)
  (define-constant MQTT_PROTOCOL_V31 3)
  (define-constant MQTT_PROTOCOL_V311 4)
  (define mosquitto_message-mid
(foreign-lambda*
  integer
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->mid);"))
  (define mosquitto_message-topic
(foreign-lambda*
  c-string
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->topic);"))
  (define mosquitto_message-payload
(foreign-lambda*
  (c-pointer void)
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->payload);"))
  (define mosquitto_message-payloadlen
(foreign-lambda*
  integer
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->payloadlen);"))
  (define mosquitto_message-qos
(foreign-lambda*
  integer
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->qos);"))
  (define mosquitto_message-retain
(foreign-lambda*
  bool
  (((c-pointer (struct "mosquitto_message")) s))
  "return(s->retain);"))
  (define make-mosquitto_message
(foreign-lambda*
  (c-pointer (struct "mosquitto_message"))
  ((integer mid)
   

Re: [Chicken-users] Duplicate symbol errors with functors and -static flag

2018-11-20 Thread Evan Hanson
Hi Antoine,

The issue here is the "./" prefix on $(SCHEME_OBJECTS). Your project
works fine with just the following change:

3c3
< SOURCE_PREFIX = ./
---
> SOURCE_PREFIX =

CHICKEN uses a naive string comparison to deduplicate object files, so "./a.o"
and "a.o" are considered to be distinct. The first of these files you provide
explicitly in the Make rule for "test" (which is fine), while the second of
them comes from CHICKEN's dependency resolution (as a prerequisite of the
functor instantiation, b-foo). Because the two differ as strings, they are not
deduplicated, both are passed to clang, and you get a linking error.

We may want to improve on this in the future by normalising filenames or
comparing them as paths, but for right now that is the cause and what you can
do to solve it.

All the best,

Evan

P.S. Thank you for the very high-quality reproduction.

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


Re: [Chicken-users] pp and write ignore keyword-style

2018-11-20 Thread Evan Hanson
Hi Sven,

On 2018-11-20 22:51, Sven Hartrumpf wrote:
> pp and write (in chicken 5) do not respect the parameter (keyword-style);
> Only display respects keyword-style.

This behaviour is intentional, for the reasons John describes.

Refer to ticket #1332 for specifics about the change:

  https://bugs.call-cc.org/ticket/1332

Cheers,

Evan

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


Re: [Chicken-users] porting eggs experiences and questions

2018-08-27 Thread Evan Hanson
On 2018-08-25 14:01, Jörg F. Wittenberger wrote:
> Maybe it makes more sense to have the -n switch only in effect for the egg
> in the current directory while still installing dependencies.

That makes sense to me.

In the case where people don't want dependencies to be installed either,
they can set CHICKEN_INSTALL_REPOSITORY and CHICKEN_REPOSITORY_PATH to
install into a throwaway repository. It's not as easy to go the other
direction.

Evan

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


Re: [Chicken-users] C5 Type declaration issue

2018-08-24 Thread Evan Hanson
Hi Jörg,

Thanks for reporting this problem. You might have already noticed, but
this will be fixed in RC 2.

Best,

Evan

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


Re: [Chicken-users] egg-index-4

2018-08-23 Thread Evan Hanson
Hi Martin,

On 2018-06-25 13:14, Martin Schneeweis wrote:
> is there a way to change the following page:
> 
>   http://wiki.call-cc.org/chicken-projects/egg-index-4.html
> 
> I assume this page is produced programmatically (no edit-link on top of
> the page)

It is, yeah. The info comes from the eggs themselves.

> The egg "environments" belongs to the category "Unsupported or
> redundant" (at least I assume so because
> http://bugs.call-cc.org/ticket/643 was merged into the master branch 7
> years ago)

That's right, and it was marked as obsolete a while back, but the
versioning of the egg was such that the new category wasn't picked up.
It should be fixed now, or rather the next time the page is generated.

Thanks for pointing that out!

Evan

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


Re: [Chicken-users] reexport - not working as expected (or I have wrong expectations)

2018-07-21 Thread Evan Hanson
Hi Martin,

The reason for this behaviour is that `reexport' only manages syntax, i.e.
it imports and exports module identifiers but does not load libraries.
This is similar to the distinction between `use' and `import' in C4.

On 2018-07-21 14:31, Martin Schneeweis wrote:
> Isn't "reexport" supposed to import? (in chicken-5 there is no
> "use" (I think))

That's right, in C5 there is `import' (which corresponds to C4's `use')
and `import-syntax' (which is C4's `import').

> chicken-4: Yes, when I add "(use mod-a)" in mod-b then I can call
> "test-a" in mod-b - but calling "test-a" in mod-c still leads to the
> same runtime error 

I believe that this will work as expected in C5.

>   - and if I also have to include "(use mod-a)" in mod-c (or
> "(import mod-c)" in chicken-5) then the purpose of "reexport" is
> defeated. No?

I can see the case for making `reexport' load the implementation, and
potentially adding a `reexport-syntax' form to provide the current
syntax-only behaviour. I may open a feature ticket for this (or you can if
you have an account on bugs.call-cc.org), but this won't be changed in C4.

All the best,

Evan

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


Re: [Chicken-users] Broken `utf8#string-fill!`?

2018-07-12 Thread Evan Hanson
On 2018-07-12 18:10, John Cowan wrote:
> You can't fill a literal string; you have to treat it as immutable.

The same happens for non-literal strings, so that's not the problem here.

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


Re: [Chicken-users] Broken `utf8#string-fill!`?

2018-07-12 Thread Evan Hanson
On 2018-07-12 16:09, Henry Hu wrote:
> `utf8#string-fill!` isn't working for me.  Anyone experiencing this problem?

Hey Henry, just wanted to confirm that I see the same behaviour.

No suggestions though, sorry.

Evan

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


Re: [Chicken-users] Reason to Celebrate

2018-07-01 Thread Evan Hanson
Congratulations Dr. Chust!

I won't be able to make it to Munich, so you'll just have to party that
little bit extra for me.

All the best,

Evan

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


Re: [Chicken-users] 3 new CHICKEN eggs: stb-image, stb-image-write and stb-image-resize

2018-06-08 Thread Evan Hanson
On 2018-06-08 14:35, Kristian Lein-Mathisen wrote:
> CHICKEN 4 release-info files:
> https://github.com/kristianlm/chicken-stb-image/raw/master/stb-image4.release-info
> https://github.com/kristianlm/chicken-stb-image-write/raw/master/stb-image-write4.release-info
> https://github.com/kristianlm/chicken-stb-image-resize/raw/master/stb-image-resize4.release-info
> 
> CHICKEN 5 release-info files:
> https://github.com/kristianlm/chicken-stb-image/raw/master/stb-image5.release-info
> https://github.com/kristianlm/chicken-stb-image-write/raw/master/stb-image-write5.release-info
> https://github.com/kristianlm/chicken-stb-image-resize/raw/master/stb-image-resize5.release-info
> 
> Please inspect and, if worthy, add to the coop!

Added! Nice work, thanks Kristian.

Evan

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


Re: [Chicken-users] The eggs index needs release dates displayed

2018-02-21 Thread Evan Hanson
Hi John,

On 2018-02-21 16:09, John Gabriele wrote:
> How about instead adding a link to its online repo (at github, gitlab,
> bitbucket, ...)? Is there a way to add those links to the eggs index
> page? That would be an excellent improvement.

Authors are encouraged to link to sources on the egg's wiki page, and
many do, but this is not done in a structured way so can't currently be
added to the index.

Another option might be to take this info from locations list that
Henrietta uses [1], with some string munging and a bit of guessing.

[1]: http://bugs.call-cc.org/browser/project/release/4/egg-locations

Note that many (most?) eggs, including some of the most robust and
widely-used eggs such as "matchable" and "numbers", currently live in
that Subversion repository, too, so won't have stars, likes, or whatever
else use as a metric. TBPH your best bet for this is probably just to
drop into #chicken and ask what people tend to use for a given task.

> Does the egg packaging format support a field for release date?

It doesn't, but this is something to consider. It might be possible to
add this by making the distributed egg fetcher (which itself lives here
[2]) determine and keep track of the release date somehow. Or maybe not,
I haven't thought too hard about it.

[2]: http://code.more-magic.net/henrietta-cache

Anyway, your feedback is appreciated, it's certainly worth a look.

Happy hacking,

Evan

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


[Chicken-users] [ANN] Heroku buildpack updated to 4.13.0

2018-01-22 Thread Evan Hanson
Hello,

The CHICKEN buildpack for Heroku has been updated to version 4.13.0, the
latest stable release. (Actually, it was updated last month, but I
forgot to send an email.) This is now the default version that is used
when no other version is specified in your application's meta file.

 https://bitbucket.org/evhan/heroku-buildpack-chicken

If you run any trouble upgrading your applications, please let me know.

Cheers,

Evan


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


Re: [Chicken-users] c-string-list gives segmentation violation

2018-01-03 Thread Evan Hanson

Hey David,

On 2018-01-04  8:23, David Ireland wrote:

Any suggestions would be appreciated.


You probably want something like this for return-c-string-list instead:

 (define return-c-string-list
   (foreign-lambda* c-string-list ()
 "const char* f[] = { NULL };"
 "C_return(f);"))

char** (a pointer to a char pointer) and char* f[] (an array of char
pointers) are different in a way that matters, here.

Cheers,

Evan

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


Re: [Chicken-users] permissive checking of sum types

2018-01-02 Thread Evan Hanson

Hi David,

Sorry for the slow response, but I'd just like to confirm what it seems
you've already intuited about CHICKEN's type system.

Simply put, CHICKEN's type-directed compilation pass will only optimise
a program when it's *certain* that a given type is correct, and it will
only issue a warning when it's *certain* that a given type is incorrect.
In your example, the type of `value4` may or may not be incorrect, so
nothing is done.

It sounds like you're expecting a much more strict interpretation of
type annotations, but that's not how CHICKEN currently works. It is, as
you say, permissive in its treatment of type annotations.

Cheers,

Evan

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


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

2017-12-12 Thread Evan Hanson

Hi folks,

Test results for 4.13.0rc1 below. Better late than never, I figure.

Installation and tests all worked as expected.

Cheers,

Evan


# CentOS


Operating system:  CentOS 6.9
Hardware platform: x86_64
C Compiler:GCC 4.4.7 (Red Hat 4.4.7-18) [x86_64-redhat-linux]

Operating system:  CentOS 6.9
Hardware platform: x86_64
C Compiler:Clang 3.4.2 [x86_64-redhat-linux-gnu]

Operating system:  CentOS 7.4
Hardware platform: x86_64
C Compiler:GCC 4.8.5 (Red Hat 4.8.5-16) [x86_64-redhat-linux]

Operating system:  CentOS 7.4
Hardware platform: x86_64
C Compiler:Clang 3.4.2 [x86_64-redhat-linux-gnu]


# Debian


Operating system:  Debian 7
Hardware platform: x86_64
C Compiler:GCC 4.7.2 (Debian 4.7.2-5) [x86_64-linux-gnu]

Operating system:  Debian 7
Hardware platform: x86_64
C Compiler:Clang 3.0 (Debian 3.0-6.2) [x86_64-pc-linux-gnu]

Operating system:  Debian 8
Hardware platform: x86_64
C Compiler:GCC 4.9.2 (Debian 4.9.2-10) [x86_64-linux-gnu]

Operating system:  Debian 8
Hardware platform: x86_64
C Compiler:Clang 3.5.0 (Debian 3.5.0-10) [x86_64-pc-linux-gnu]

Operating system:  Debian 9
Hardware platform: x86_64
C Compiler:GCC 6.3.0 (Debian 6.3.0-18) [x86_64-linux-gnu]

Operating system:  Debian 9
Hardware platform: x86_64
C Compiler:Clang 3.8.1 (Debian 3.8.1-24) [x86_64-pc-linux-gnu]


# Ubuntu


Operating system:  Ubuntu 14.04
Hardware platform: i686
C Compiler:GCC 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) [i686-linux-gnu]

Operating system:  Ubuntu 14.04
Hardware platform: i686
C Compiler:Clang 3.4 (Ubuntu 3.4-1ubuntu3) [i386-pc-linux-gnu]

Operating system:  Ubuntu 14.04
Hardware platform: x86_64
C Compiler:GCC 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) [x86_64-linux-gnu]

Operating system:  Ubuntu 14.04
Hardware platform: x86_64
C Compiler:Clang 3.4 (Ubuntu 3.4-1ubuntu3) [x86_64-pc-linux-gnu]

Operating system:  Ubuntu 16.04
Hardware platform: i686
C Compiler:GCC 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) [i686-linux-gnu]

Operating system:  Ubuntu 16.04
Hardware platform: i686
C Compiler:Clang 3.8.0 (Ubuntu 3.8.0-2ubuntu4) [i386-pc-linux-gnu]

Operating system:  Ubuntu 16.04
Hardware platform: x86_64
C Compiler:GCC 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.5) [x86_64-linux-gnu]

Operating system:  Ubuntu 16.04
Hardware platform: x86_64
C Compiler:Clang 3.8.0 (Ubuntu 3.8.0-2ubuntu4) [x86_64-pc-linux-gnu]


# Haiku


Operating system:  Haiku Nightly (hrev51517)
Hardware platform: x86_64
C Compiler:GCC 5.4.0 [x86_64-unknown-haiku]


# DragonflyBSD


Operating system:  DragonFly 4.8-RELEASE
Hardware platform: x86_64
C Compiler:5.4.1 (DragonFly) [x86_64-pc-dragonflybsd]


# FreeBSD


Operating system:  FreeBSD 10.3-RELEASE
Hardware platform: x86_64
C Compiler:GCC 6.4.0 [x86_64-portbld-freebsd10.3]

Operating system:  FreeBSD 10.3-RELEASE
Hardware platform: x86_64
C Compiler:Clang 3.4.1 [x86_64-unknown-freebsd10.3]

Operating system:  FreeBSD 11.0-RELEASE
Hardware platform: x86_64
C Compiler:GCC 6.4.0 [x86_64-portbld-freebsd11.1]

Operating system:  FreeBSD 11.0-RELEASE
Hardware platform: x86_64
C Compiler:Clang 3.8.0 [x86_64-unknown-freebsd11.0]


# OpenBSD


Operating system:  OpenBSD 6.0
Hardware platform: x86_64
C Compiler:GCC 4.2.1 [amd64-unknown-openbsd6.0]


# Windows


Operating system:  Cygwin (CYGWIN_NT-6.1) 2.9.0
Hardware platform: i686
C Compiler:GCC 6.4.0 [i686-pc-cygwin]

Operating system:  Cygwin (CYGWIN_NT-6.1) 2.9.0
Hardware platform: x86_64
C Compiler:GCC 6.4.0 [x86_64-pc-cygwin]

Operating system:  MinGW MSYS2 (MINGW32_NT-6.1) 2.9.0
Hardware platform: i686
C Compiler:GCC 7.2.0 [i686-w64-mingw32]

Operating system:  MinGW MSYS2 (MINGW64_NT-6.1) 2.9.0
Hardware 

Re: [Chicken-users] Any suggestions for a project?

2017-11-20 Thread Evan Hanson

Hi Daniele,

In my experience the most important thing is to pick a topic you find
intriguing from the get-go. You'll probably drift toward one such topic
anyway, and if that's actually *off-topic* for your thesis then you'll
be unhappy. Or at least, your advisor will be.

Anyway, whatever project you choose I'm sure the folks on this mailing
list will be happy to help. Some things I personally think it would be
fun to work on are:

 - A musical programming tool or an API to communicate with
   SuperCollider, PureData, Max/MSP, or the like.
 - Algorithmic composition software for generating short stories,
   poems, text-based adventures and so on.
 - A "recipe analyser" that can take recipes in the zillion different
   forms that they take online and normalise (or at least classify)
   them, accounting for differences in formatting, units, terminology,
   etc. This would be an ML project, probably.

Let us know what you decide on in the end!

Cheers,

Evan

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


Re: [Chicken-users] Macros not found when using eval

2017-08-14 Thread Evan Hanson

Hi mel,

You can use the "-compile-syntax" flag with csc(1), which will include
the macro definition in the compiled code and thus make it available at
runtime. Let us know how that works out.

As for your second question, it's tough to say much without an example,
but I'm guessing you're looking at a situation like this:

   ;; foo.scm
   (module foo (kons)
 (import scheme)
 (define (kons a b)
   (cons a b)))

   ;; bar.scm
   (use foo)
   (display (eval '(kons 1 '(2 3  ; <--- Error: unbound variable: kons
   (newline)

To which the solution is:

   ;; bar.scm
   (eval '(use foo))
   (display (eval '(kons 1 '(2 3
   (newline)

This imports the module at runtime and makes it available in `eval`.

Of course if I've guessed your problem incorrectly just let us know and
we'd be happy to help with anything else.

Cheers,

Evan

On 2017-08-13 17:32, mel aise wrote:

Hello!
I'm having some trouble with the following program:

(define-syntax kons
 (syntax-rules ()
   ((_ a b)
 (cons a b

(display (kons 1 '(2 3)))
(newline)
(display (eval '(kons 1 '(2 3
(newline)

(It's a contrived example but gets to whats going on haha)
When run with csi everything works fine,
but when compiled and then run, 'eval' throws an unbound variable error

I may be missing something but is there a way to let 'eval' find syntax
that has been defined?
I'm also having a similar issue with 'use'ing a module and 'eval' not being
able to find procedures defined in that module



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



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


Re: [Chicken-users] Passing in a scheme function into C to be called later

2017-07-18 Thread Evan Hanson

Hi David,

On 2017-07-18 15:21, David Astels wrote:

Subscribing is puzzling me and I assume someone has encountered a
similar situation at some point.  I need to be able to pass a scheme
function to a call to a C function. It then gets stored and is needs to
be called by the message received callback (a C function).


This is a pretty common pattern, and the easiest approach is usually to
define a C-space procedure with `define-external`. See the "Callbacks"
section of the manual: http://api.call-cc.org/doc/foreign/callbacks

Cheers,

Evan

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


Re: [Chicken-users] reachable top-level functions and variables

2017-07-12 Thread Evan Hanson

Hi Sven,

Have you tried `csc  -analyze-only -debug d`?

This will give you a full list of value definitions, including module
prefixes for any identifiers bound within a module. This may not be
precisely what you mean by "reachable", but it might be a start.

Cheers,

Evan

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


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

2017-05-01 Thread Evan Hanson
Hi Matt,

On 2017-04-30 23:10, Matt Welland wrote:
> I think -keep-installed is detecting the egg already installed to the system
> - but it should be looking at the deploy directory when deploying.

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

What version of CHICKEN are you using, and if it's 4.11.1 or older, is it
possible for you to upgrade?

Evan

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


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

2017-04-30 Thread Evan Hanson
Hi Matt,

You're very close. The only step you missed was emitting an import file
for your "other" module so that csc knows what to do when you "(import
other)" in main.scm.

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

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

Cheers,

Evan

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


Re: [Chicken-users] pass/retrieve arguments by reference in lazy-ffi

2017-03-17 Thread Evan Hanson
Hi Kevin,

I doubt anyone will be able to test your program, not having access to
"cpuidsdk.dll", but it's unsurprising that it exits silently; there's
nothing in your program that would do anything else, so it's probably
just running from start to finish and quitting when it's done. Without a
call to `print` or some other side-effecting expression, that's to be
expected.

Does the same happen when you load your file in interactive csi session?

HTH,

Evan

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


Re: [Chicken-users] A question about keywords and symbol->string

2017-03-16 Thread Evan Hanson
Hi there,

On 2017-03-16 17:22, megane wrote:
> Currently symbol->string strips any keyword prefixes when applied to
> keywords (e.g. (symbol->string 'foo:) returns "foo"). Is this correct
> behavior?

That's the correct behaviour, yes. symbol->string basically ignores
keywords and treats them just like normal symbols in this regard.

> Is there a way to get the full symbol name (i.e. #:foo -> "#:foo", and
> foo: -> "foo:")?

Not really. #:foo and foo: are both textual representations of the same
symbol. The "style" of the keyword isn't kept around after it's read, so
all the runtime knows is that (a) there's a symbol "foo" and (b) it's a
keyword. It's not specifically a "prefix" or "suffix" keyword until
written out again.

Anyway, to get a string that *looks* like a keyword, the easiest option
is probably to go via the written representation with something like:

   (format "~s" foo:)

However note that this is sensitive to the keyword-style parameter, as
hinted at above:

   (parameterize ((keyword-style #:prefix)) (format "~s" #:foo)) ; => ":foo"
   (parameterize ((keyword-style #:suffix)) (format "~s" #:foo)) ; => "foo:"
   (parameterize ((keyword-style #f))   (format "~s" #:foo)) ; => "#:foo"

Hope that helps,

Evan

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


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

2017-02-13 Thread Evan Hanson
Hi Claude,

Thanks for testing the RC, it's appreciated.

On 2017-02-13 21:32, Claude Marinier wrote:
> With current MinGW-w64 and PLATFORM=mingw-msys : builds successfully and
> checks die with the same error as 4.11.
> 
> [panic] invalid encoded numeric literal - execution terminated
> 
> See http://lists.nongnu.org/archive/html/chicken-users/2016-08/msg9.html
> 
> If I am the only one experiencing this error, is it worth pursuing?

You are not the only one -- this is a known issue and something we'd like to
fix but haven't gotten to yet. Refer to https://bugs.call-cc.org/ticket/1344
and please feel free to elaborate if you have any details to add.

Cheers,

Evan

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


Re: [Chicken-users] Results of testing CHICKEN 4.12.0.rc1 on various platforms

2017-02-07 Thread Evan Hanson
On 2017-01-28 16:44, Peter Bex wrote:
> On Wed, Jan 25, 2017 at 08:41:02PM +0100, alexander.she...@web.de wrote:
> > Your patch solves the problem with the POSIX tests. Now only the deployment
> > tests fail, but deployment is probably unsupported on Android, because the
> > Android dynamic linker lacks the "rpath" feature.
> 
> I don't know if we can somehow avoid running those tests on platforms
> where it's known not to work...

We already disable the deployment tests on some platforms, so we'd just
need some way to reliably determine from sh(1) whether we're on Android
or not. The other cases of this use `uname -s`, so perhaps that would
work. Alexander, could you tell us what that command reports on Android?

Evan


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


[Chicken-users] [ANN] CHICKEN 4.12.0 release candidate 2 available

2017-02-06 Thread Evan Hanson
Hello everyone,

The second release candidate for CHICKEN 4.12.0 is now available for
download:

  http://code.call-cc.org/dev-snapshots/2017/02/06/chicken-4.12.0rc2.tar.gz

The SHA-256 sum of that tarball is:

  19bc4d2e2a866a84f5fcd71af55b4c924fa1409ad990e9d912e41d1975da7a3a

The list of changes since version 4.11.0 is available here:

  http://code.call-cc.org/dev-snapshots/2017/02/06/NEWS

There have been only minor changes since the previous release candidate.
These specifically relate to the iOS, macOS and Android platforms.

Please give this snapshot a try and report your findings to the mailing
list, particularly if you're able to contribute a test report for one of
the aforementioned platforms. Here's a suggested test procedure:

  $ make PLATFORM= 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:

  Operating system: (e.g., FreeBSD 10.1, Debian 8, Windows 7 mingw-msys)
  Hardware platform: (e.g., x86, x86-64, PPC)
  C Compiler: (e.g., GCC 4.9.2, clang 3.6)
  Installation works?: yes or no
  Tests work?: yes or no
  Installation of eggs works?: yes or no

Thanks in advance!

The CHICKEN Team


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


Re: [Chicken-users] New egg: lmdb-lolevel

2017-01-10 Thread Evan Hanson
Hey Caolan,

Looks cool, added. It should become available in the next few minutes.

Cheers,

Evan

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


Re: [Chicken-users] New egg - directory-tree

2016-11-01 Thread Evan Hanson
Hi Peter,

On 2016-11-01 13:59, Peter Nagy wrote:
> while working on a small home project I decided to port gauche's
> (create|check)-directory-tree functions over to chicken and release my
> first (small) egg.

Looks useful, thanks!

> Let me know if anything else is needed from my side, if not I will
> make a tag on gitlab to finalize the release.

Everything looks good to me, it just needs a tag. I've just added it to
the repository, so it will become accessible shortly after the tag is
created.

> I think I managed to get everything done based on the wiki except
> documentation. Can I create it within my project in some format and it
> would get linked in wiki.call-cc.org/eggref/4 ? Or should I just
> create the page for my egg there and add the docs there?

The latter. Some people keep a version of the documentation in the
project tree, but actually putting it on the wiki is a manual process.

Cheers,

Evan

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


Re: [Chicken-users] compiled program + REPL ?

2016-10-24 Thread Evan Hanson
Hi there,

I'd say (2). IME the nrepl egg from the fine folks at Adellica is a nice
option for this: http://wiki.call-cc.org/eggref/4/nrepl

Possibly also (5) with some blood, sweat and tears, but AFAIK nothing like (4)
exists.

Cheers,

Evan

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


Re: [Chicken-users] Compiling multiple modules into a single executable

2016-10-16 Thread Evan Hanson
Hi Josh,

On 2016-10-16 21:13, Josh Barrett wrote:
> Oh. Thanks. Can you generate a .import without compiling your module?

You can use the "-analyze-only" flag:

   $ csc -analyze-only -emit-import-library foo foo.scm

Note that you must specify the modules whose import libraries should be
generated with "-emit-import-library" (or "-j") in this case; using "-J" won't
suffice.

Cheers,

Evan

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


Re: [Chicken-users] set! on unbound variable

2016-09-23 Thread Evan Hanson
Hi Jinsong,

Not a bug, but certainly something that can be confusing if you don't
expect it. In your example, `helo` is implicitly defined as a toplevel
variable at the point of `set!.

The difference is noted (very, very succinctly) in the manual here:

  http://wiki.call-cc.org/man/4/Extensions%20to%20the%20standard#set

Unfortunately there's not currently a way to generate a warning in this
situation, that I know of.

Cheers,

Evan

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


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

2016-09-20 Thread Evan Hanson
Oh, I should also point out that if you install the egg with
`chicken-install -D fuse-debug ...`, it will log filesystem requests as
the server receives them (to stderr, IIRC). Might be useful as a quick
way to see what's going on without breaking out the heavy tools.

HTH,

Evan

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


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

2016-09-20 Thread Evan Hanson
Hi Matt,

Interesting, cool project. Here are a few guesses at your questions,
without having had a look at the specific steps to reproduce.

On 2016-09-19 22:24, Matt Welland wrote:
> 1. Can't open a fossil on hashfs:

I'd bet this is caused by SQLite trying to lock a file with flock(2),
which isn't implemented by hashfs.scm or, for that matter, by the egg
itself. I'd like to add support for flock callbacks at some point, but
even then you'd still need to extend hashfs.scm to do something
meaningful with that callback in order to get Fossil to work (assuming
I'm right about the underlying issue, that is...).

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

There's a longstanding TODO in the egg relating to explicit blocksize
handling, and I'd bet money this is down to that. In short, the egg only
bothers to fill the st_size field of stat structs, leaving st_blksize
empty since there isn't really a block size associated with a synthetic
filesystem anyway. Usually this is fine since the size in bytes is
already provided and most tools will just use that (or assume 512 as the
block size, in some cases), but it might be that du(1) is taking that
empty field at face value and reporting odd sizes as a result. On Linux,
you can get du(1) to report the "real" size of a file (i.e. in bytes,
not blocks) with `du -b`, so in your example `du -bsh` *should* report
nonzero values for nonempty directories, unless there's something else
going on.

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

This might be similar to #3. I may have a go at fixing that TODO soon,
and if I do I'll let you know -- I'd be curious to see if that is indeed
the cause.

Cheers,

Evan

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


Re: [Chicken-users] r7rs improper redefinition of imported symbol

2016-09-19 Thread Evan Hanson
Hi John,

You're quite right, this was indeed a bug relating to which bindings are
implicitly available within R7RS libraries.

This should be fixed in 0.0.5, just released and available shortly. If you
could have a go with that version and let me know if you still run into
problems, I'd appreciate it.

Thanks for the report and the nice little test case.

Cheers,

Evan

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


Re: [Chicken-users] generate numerical list

2016-07-11 Thread Evan Hanson
Hi Jinsong,

SRFI-1 provides `iota' -- http://api.call-cc.org/doc/srfi-1/iota

Cheers,

Evan

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


Re: [Chicken-users] New egg: level-sexp

2016-07-05 Thread Evan Hanson
Hey Caolan,

Looks cool.

Added, thanks.

Evan

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


Re: [Chicken-users] Understanding modules?

2016-05-21 Thread Evan Hanson
Hi Norman,

A quick note about units and modules: the two are different things used
for different purposes. The former has to do with controlling the
compilation and linking of separate application components, whereas the
latter is about namespace management. The hunt continues for the best
way to explain either of these features in the manual (particularly
without confusing the two with one another, or with other features such
as deployment or the use of dynamic libraries), but they're almost
entirely orthogonal and equally useful, just for different things.

> Deployment: Either in the 'Modules' page (along with the other examples at
> the end) or in the 'Deployment' page, it would be useful to show how to
> deploy a program using modules.  The obvious things don't appear to work:

This looks like a bug to me. Based on the commands you listed, that
application "main/main" should work fine, so I suggest reporting this on
bugs.call-cc.org, if you don't mind. 

> I've assembled a short list of minor buglets in eggs and egg documentation.
> Is it best if I report them here, or should I ask for an account on
> http://bugs.call-cc.org ?

The best approach is probably to report these individually on
bugs.call-cc.org. The documentation for any given egg is generally
managed by that egg's maintainer, so bug reports about their
documentation will ideally be grouped by extension rather than in one
big ticket so they can be correctly assigned.

Thanks very much for the detailed write-up -- feedback like this is
quite valuable.

Cheers,

Evan

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


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

2016-05-14 Thread Evan Hanson
Hi Matt,

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

This behaviour is now provided by http://api.call-cc.org/doc/pathname-expand

The posix-extras egg still needs to be updated as such.

Cheers,

Evan

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


Re: [Chicken-users] Chicken 4.10.0 and 4.10.1 - 'check' fails

2016-04-20 Thread Evan Hanson
Hi Claude,

It's likely you're running into this issue: http://bugs.call-cc.org/ticket/1269

Note that it has been fixed in the 4.11 release candidate.

Cheers,

Evan

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


Re: [Chicken-users] Is there interest in this Prolog interpreter packaged as an egg?

2016-02-21 Thread Evan Hanson
On 2016-02-21 15:21, Jeronimo Pellegrini wrote:
> (compile -X r7rs -R r7rs -s -O2 "pll.scm"  -unit pll)
> (compile -X r7rs -R r7rs -s -O2 "pll.import.scm"   -unit pll)

You shouldn't use "-unit pll" here. That's what's causing the error, and
in this simple case where you're compiling a more-or-less standard
extension that provides shared libraries, you don't need it.

The software looks very cool, by the way. Thank you for packaging it.

Cheers,

Evan

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


Re: [Chicken-users] Need help to figure out where this strange performance impact is coming from

2016-01-14 Thread Evan Hanson
On 2016-01-13  9:32, Dan Leslie wrote:
> IIRC, there's been ongoing efforts to remove SRFI-1 from core; which
> may explain your observations regarding Master.

Just for the record, Dan's right that moving srfi-1 out of core and into
an egg is being done as part of CHICKEN 5, but there are no plans to
drop srfi-1 from core in the 4.X release series.

Evan

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


Re: [Chicken-users] Any decent web development framework

2015-12-28 Thread Evan Hanson
On 2015-12-27 23:56, 机械唯物主义 : linjunhalida wrote:
> (get "/" (lambda (request)  "hello")
> (get "/from/:id" (lambda (request) (sprintf "hello ~A" (request 'id
> (get "/page/:id" (lambda (request)
>   (let ((data ($query (from pages) (where (= id (request 'id))
> (render "templates/page" ('data data

Awful is somewhat similar to Sinatra, and basically does what you're
describing, so I'd suggest having another look at it. It's worked for me
in the past, anyway.

Or, as others have mentioned, you can use Spiffy directly, hand-roll a
`render` method, and maybe use some helper eggs for things like routing:

http://api.call-cc.org/doc/spiffy-request-vars
http://api.call-cc.org/doc/spiffy-uri-match

Cheers,

Evan

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


Re: [Chicken-users] Bug: define-foreign-type causes confusing messages to be printed

2015-12-22 Thread Evan Hanson
Thanks John,

Issue #1237 has been created for this issue: 
https://bugs.call-cc.org/ticket/1237

The detailed report is appreciated.

Evan

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


Re: [Chicken-users] [ANN] sdl2 and sdl2-image 0.1

2015-12-19 Thread Evan Hanson
On 2015-12-19 21:19, John Croisant wrote:
> Version 0.1 of the sdl2 and sdl2-image eggs are now ready!

These look great, and fantastically thorough. Very nice work.

FWIW, the sdl2 egg fails to build with gcc-4.6:

In file included from sdl2-internals.c:14:0:
lib/sdl2-internals/custom-functions.c: In function 
‘chickenSDL2_RotateSurface90’:
lib/sdl2-internals/custom-functions.c:212:3: error: ‘for’ loop initial 
declarations are only allowed in C99 mode
lib/sdl2-internals/custom-functions.c:212:3: note: use option -std=c99 or 
-std=gnu99 to compile your code
lib/sdl2-internals/custom-functions.c:213:5: error: ‘for’ loop initial 
declarations are only allowed in C99 mode
lib/sdl2-internals/custom-functions.c: In function 
‘chickenSDL2_FlipSurface’:
lib/sdl2-internals/custom-functions.c:267:3: error: ‘for’ loop initial 
declarations are only allowed in C99 mode
lib/sdl2-internals/custom-functions.c:268:5: error: ‘for’ loop initial 
declarations are only allowed in C99 mode

Building with gcc-5 instead worked fine. The sdl2-image project didn't
have this problem.

All tests pass, the examples work, and eggsweeper is great. This is on
Debian sid.

> Here are the release-info files for the two new eggs. Please add them to
> egg-locations. :)

Done.

Thanks much, John.

Evan

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


Re: [Chicken-users] How do you compile multiple modules into a single executable?

2015-12-19 Thread Evan Hanson
Hi Josh,

I think the following is what you're after.

 $ cat foo.scm
 (module foo * (import scheme) (define (foo) 1))
 $ cat bar.scm
 (import foo)
 (print (foo))
 $ csc -c -unit foo -emit-import-library foo foo.scm
 $ csc -uses foo bar.scm foo.o
 $ ./bar
 1

Note that when compiling bar.scm with foo as a unit this way, (use foo)
becomes (import foo).

Cheers,

Evan

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


Re: [Chicken-users] How do you compile multiple modules into a single executable?

2015-12-19 Thread Evan Hanson
The `compiling` feature specifier is only expanded when compiling, so
something like `(cond-expand (compiling (import foo)) (else (use foo)))`
ought to work.

To be totally honest, in this specific situation you can actually get away
with using just `(use foo)` since the "-uses foo" flag tells csc that foo
is a unit and doesn't need to be loaded at runtime either way, but to avoid
confusion I think it's best to use the right form for the situation.

Hope that helps,

Evan

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


Re: [Chicken-users] Why define-constant is not a constant?

2015-12-07 Thread Evan Hanson
Hi Joe,

That's not really what `define-constant` is for. Here, "constant" means
"constant value", not "lexical identifier that can't be changed".

Even so, the compiler does happen to do what you're expecting (as
opposed to the interpreter, where `define-constant` is equivalent to
`define`):

$ cat foo.scm
(define-constant test1 "initial value")
(define test1 "I got changed")
(print test1)
$ csc foo.scm
$ ./foo
initial value

Cheers,

Evan

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


Re: [Chicken-users] Hello! I'm new and need some pointers please ~

2015-12-01 Thread Evan Hanson
Hi Federico, and welcome.

Stylistically, a cond expression like this[1] can be more clearly
written as a case (http://api.call-cc.org/doc/scheme/case).

Similarly, this[2] can be rewritten as a case if you make `string-head`
return characters rather than strings of length one. This will also be
much more efficient. Your string helpers should also probably use
string-length, ref, et al. as well, rather than converting back and
forth to a list, which is quite wasteful.

[1]: 
https://github.com/gosukiwi/chicken-brainfuck/blob/master/src/parser.scm#L72
[2]: 
https://github.com/gosukiwi/chicken-brainfuck/blob/master/src/tokenizer.scm#L10

On 2015-11-28 20:25, Matt Gushee wrote:
> http://api.call-cc.org/doc/ [...] Look for the 'chickadee' egg.

+1. There is also the chicken-doc egg, if you fancy the command line:
http://wiki.call-cc.org/eggref/4/chicken-doc

> Also, I glanced at your code; I noticed you were using various (declare
> (unit ...)) and (declare (uses ...)) declarations. As I understand it,
> those declarations may or may not be formally deprecated, but they are not
> much used any more; the general practice these days is to use modules
> rather than units.

Declaration are very useful, but it's true that they're most useful when
you know your way around the toolchain fairly well, and have specific
ideas about how you want the compiler to behave. People coming from
high-level languages usually find modules more intuitive, especially as
a way to organize code.

On 2015-11-29  1:11, fedekun wrote:
> (Oh btw, any recommended book on Scheme which I follow along using
> CHICKEN?)

My personal favorite is TSPL, which is a fantastic book for learning
Scheme (R5RS, not CHICKEN in particular): http://www.scheme.com/tspl3/.

Best regards,

Evan

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


Re: [Chicken-users] new egg macro-rules

2015-11-26 Thread Evan Hanson
Hi Juergen,

This is a handy interface, thanks for extracting it.

FWIW, it looks like the procedural-macros *procedure* (the documentation
procedure) isn't exported. I'm not sure if that's intentional or not,
but it's mentioned on the wiki page.

Speaking of which, do you use some tool to generate wikidoc from those
#|[...]|# forms?

Evan

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


[Chicken-users] [ANN] git-fs

2015-11-25 Thread Evan Hanson
Hi all,

Last year I wrote a program that serves Git repositories as read-only
file systems. I showed it to some folks at ICC and it's been stable for
a while now, so I figured I'd announce it here too.

  http://git.foldling.org/git-fs.git/

The most recent binary package, git-fs_0.0.3-x86_64.deb, is known to
work on Debian sid, at least. Let me know if you run into installation
problems.

Best regards,

Evan

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


Re: [Chicken-users] one more egg - need advice how wrt. exports

2015-11-03 Thread Evan Hanson
On 2015-11-03 21:29, "J??rg F. Wittenberger" wrote:
> Firstly I have not found a way to rename identifiers on export (as in
> r6rs libraries).  Is there really no way or did I miss it?

There is really no way. 

Except for the obvious way of simply using `define` within your module.
But, I doubt that's what you're after.

It'd be a nice feature to have at some point, not least because the R7RS
mandates it.

Evan

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


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

2015-10-09 Thread Evan Hanson
Hi Matt,

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

I'd try closing `oup` once you've written your graph to the process, for
example by making the thunk you use for the "dot writer" thread look like:

(lambda ()
  (with-output-to-port oup
   (lambda ()
 (map print indat)
 (close-output-port oup

Cheers,

Evan

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


Re: [Chicken-users] Hypergiant egg install fails, and some other eggs

2015-10-01 Thread Evan Hanson
On 2015-10-02 11:03, Robert Herman wrote:
> In any case, Termbox has not dependencies

IIRC termbox bundles a C library (perhaps just one file?) that it compiles
during chicken-install. In that sense, it does have one dependency. It'd be
worth checking that, to see whether it makes some assumptions about the
platform, and whether it's compatible with your Windows environment.

Cheers,

Evan

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


Re: [Chicken-users] ldap-bind egg

2015-08-30 Thread Evan Hanson
Hi Caolan,

Added.

You may also want to add libldap to the egg's metafile as a
(foreign-depends ...), for informational purposes.

Cheers,

Evan

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


Re: [Chicken-users] vim support for s-expression comments

2015-08-27 Thread Evan Hanson
On 2015-08-26 11:02, Blake Sweeney wrote:
 These look nice thanks! It would be great if you could put these into a
 git repo, to make them easier to use with a package manager. Either way,
 thanks for providing them!

OK, I've pushed them to http://git.foldling.org/vim-scheme.git/.

Tested with Vundle, works.

Cheers,

Evan

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


Re: [Chicken-users] vim support for s-expression comments

2015-08-26 Thread Evan Hanson
Hi Sven,

I maintain reasonably good Vim configurations for Scheme and CHICKEN,
available at http://foldling.org/~evhan/misc/vim/. They can be dropped
into the corresponding paths of your ~/.vim directory.

Cheers,

Evan

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


Re: [Chicken-users] Bug in readline 4.0 egg; missing function

2015-08-07 Thread Evan Hanson
On 2015-08-07 18:30, Alexej Magura wrote:
 Fixed the problem; rolled out v4.1.0 of the Readline egg.

Works here with Readline library version 6.3.

Evan

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


Re: [Chicken-users] CHICKEN 4.10.0 release candidate 4 available

2015-07-27 Thread Evan Hanson
Hi Tim,

Thanks for the report, it's much appreciated.

On 2015-07-27 15:31, Tim van der Linden wrote:
 The [panic] line (marked with  in front) might be a possible
 failed test?

That panic line is fine and expected -- it's part of the test.

 Furthermore, as you can see, the system does progress a bit but hangs
 at the last line. I have let it run for 2 hours, and it did not get
 past this GCC compiling step. Either this Atom system is too weak to
 run these test in a timely fashion, or something else is going
 wrong...

Looks like you're running into an issue with GCC 4.9 that a few others
have encountered, as well -- the runtime tests do indeed run
indefinitely on some platforms when that compiler is used.9. If
possible, could you rerun that build with C_PLATFORM=some other gcc so
that we can see the whether the remaining tests pass, that GCC bug
notwithstanding?

Thanks again,

Evan

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


Re: [Chicken-users] read-u8vector: types.db inconsistent with documentation

2015-06-24 Thread Evan Hanson
Thanks Andy, this warning is indeed incorrect. A patch has been
posted to fix it.

Evan

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


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

2015-05-20 Thread Evan Hanson
On 2015-05-20 11:49, Stephen Eilert wrote:
 Just a heads up: chicken won't be able to import anything as soon as it is
 installed, due to the fact that new system environment variables get added.
 Logging out (or restarting) is enough to fix it.

Ah, thanks Stephen, this caught me up too. I can confirm that the
installer works on Windows 7 after logging out and in again. It's
probably worth mentioning this step somewhere on the project page.

Anyway, nice work, thanks to everyone involved!

Evan

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


Re: [Chicken-users] Statically Linking Eggs

2015-05-18 Thread Evan Hanson
Hi Nick,

On 2015-05-18  9:12, Nick Andryshak wrote:
 Would it be feasible to make my own object files for eggs that don't
 include them by using chicken-install -retrieve, and then compiling the
 sources?

Yes, and it's straightforward to do for most extensions -- I've used
this approach for a few projects myself -- but it requires manually
compiling every single dependency in turn so the task balloons very
quickly unless you consciously avoid using eggs with many dependencies.

Evan

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


Re: [Chicken-users] Statically Linking Eggs

2015-05-18 Thread Evan Hanson
Hi Nick,

On 2015-05-11 13:31, Nick Andryshak wrote:
 But can you statically link Eggs anymore? There's like 40 files in the
 deployment folder after deploying only one extension, I'd like a single,
 static executable. Is this possible?

It's possible if all of the eggs you need to use provide suitable object
files for static compilation, but this is not currently supported in any
meaningful way by the toolchain and it's unlikely to be possible for all
of those 40 files you're trying to use.

The sysexits egg is a very simple example of an extension that provides
an object file for static linking:

$ cat foo.scm
(import sysexits)
(exit exit/ok)
$ chicken-status -f sysexits
/usr/local/lib/chicken/7/sysexits.import.so
/usr/local/lib/chicken/7/sysexits.o
/usr/local/lib/chicken/7/sysexits.so
$ csc -static -uses sysexits foo.scm /usr/local/lib/chicken/7/sysexits.o
$ ./foo

However, this practice is not widespread.

Evan

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


  1   2   >