Re: [Chicken-users] New egg: hopefully
Am 18.12.2015 um 23:37 schrieb Sudarshan S Chawathe: > Thanks for the updated pointer to the source. > > I installed the egg in the usual way ('chicken-install' in the directory > with the source files) but could not run the included test > (test/run.scm) successfully, although csc compiles it fine. (Details > below.) In interactive use, I get an error: > > cannot load extension: hopefully-intern > > Perhaps I'm missing something obvious, or perhaps the tests/run.scm is > for internal use only? It's actually supposed to be runable. Though it does open internal modules for testing. I just released a minor update (which should only impact performance). Please try that one. I just did rm hopefully* from my repository, thus it should no longer find the module under the outdated name... and still run.scm compiled for me. But you never know. I'm glad you're trying this out. But before you use it too much, please see the new "Issues" section: http://wiki.call-cc.org/eggref/4/hopefully Comments very much appreciated. CU /Jörg > > Regards, > > -chaw > > > $ csc run.scm > $ ./run > D Initial: set > D Value in other thread is unchanged...: 9 > D #: also in other thread former ref is still unchanged... > D even after commit. (Note: tests caching of references to fields.): 9 > D Value in other thread is unchanged...: 9 > D Second round expecting changed value: 252 > D #: also in other thread former ref is still unchanged... > D even after commit. (Note: tests caching of references to fields.): 9 > > Error: (run.scm:161) assertion failed: (= (obox-v b1) 455) > > Call history: > > run.scm:159: step! > run.scm:123: mutex-unlock! > hopefully.scm:224: transaction-commit! > hopefully.scm:165: hopefully-intern-atomics#stmtnx-owner > hopefully.scm:167: hopefully-intern-atomics#stmtnx-id > hopefully.scm:168: hopefully-intern-atomics#stmtnx-refs > hopefully.scm:199: loop > hopefully.scm:196: loop > hopefully.scm:186: loop > hopefully.scm:177: hopefully-intern-atomics#transaction-close! > hopefully-intern-atomics.scm:119: transaction-reset! > hopefully-intern-atomics.scm:33: ##sys#block-set! > run.scm:161: obox-v > run.scm:22: hopefully-intern-atomics#current-transaction > hopefully-intern-atomics.scm:68: %current-transaction > run.scm:161: ##sys#error<-- > $ > > ___ > Chicken-users mailing list > Chicken-users@nongnu.org > https://lists.nongnu.org/mailman/listinfo/chicken-users > ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Emacs Geiser trouble
I looked into the archives and found the announcement of Geiser now working with Chicken. However, I'm not getting it to work. I open a .scm file, M-x geiser, choose Chicken. But with every C-x-e, Emacs says No Geiser REPL for this buffer (try M-x run-geiser) Odd because there's the Chicken REPL, open and ready, which I started when Geiser asked me which REPL. LB ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Emacs Geiser trouble
It probably thinks it's a Guile file and not a Chicken file. When that happens it is looking for a Guile REPL and ignoring your Chicken REPL. To see if this is happening look for the word "Guile" or "Chicken" in the modeline; if you see Guile and not Chicken then things are misconfigured. You can do one of two things to fix this: 1. Force Geiser to use only Chicken, as in my custom variables: (custom-set-variables '(geiser-active-implementations (quote (chicken))) '(geiser-default-implementation (quote chicken)) '(safe-local-variable-values (quote ((geiser-scheme-implementation quote chicken) 2. Or, and this is a superior method if you intend to work with others, you could declare to Emacs what Scheme the file is for by placing this comment at the top of the file: ;; -*- geiser-scheme-implementation: 'chicken -*- Happy Hacking! -Dan Lawrence Bottorffwrites: > I looked into the archives and found the announcement of Geiser now working > with Chicken. However, I'm not getting it to work. I open a .scm file, M-x > geiser, choose Chicken. But with every C-x-e, Emacs says > > No Geiser REPL for this buffer (try M-x run-geiser) > > Odd because there's the Chicken REPL, open and ready, which I started when > Geiser asked me which REPL. > > LB > ___ > 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] New egg: hopefully
Thanks for the update. I see the same behavior with tests/run.scm as before: Compilation with csc is fine, but executing the resulting file 'run' gives exactly the same error as before: Error: assertion failed: (= (obox-v b1) 455) (Detailed error message is same as in my earlier message.) The other problem I mentioned in my earlier message, regarding testing in csi, was a red herring and my fault: I had forgotten that I had '(use r7rs)' in my .csirc. Once I started a csi session with default settings, the result of interactively evaluating the forms in tests/run.scm was the same as above: Everything is fine until it fails the above assertion. In case it matters: I'm testing using Chicken 4.9.0.1 on Debian Jessie (8.2) 32-bit x86. Regards, -chaw ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] [ANN] sdl2 and sdl2-image 0.1
Version 0.1 of the sdl2 and sdl2-image eggs are now ready! The sdl2 egg provides bindings to Simple DirectMedia Layer 2 (SDL2), a popular library used in games and other media-rich software. The sdl2-image egg provides bindings to SDL2_image, a library for loading various types of image files to be used with SDL2. I have made an effort to create programmer-friendly, convenient, thorough, and well-documented bindings. They take care of the annoying low-level C stuff for you, so you can focus on making your game. Although the version numbers for these libraries are only 0.1, they are ready to start using now. Some features have not been implemented yet, but it is already possible to create many types of games, even 3D games using OpenGL (when combined with the gl-utils or opengl eggs, for example). Several demos and example programs are available to help you get started. Large backwards-incompatible changes are unlikely, but there may be small tweaks and fixes to the API if problems are discovered. There may be some bugs, but they will be fixed promptly if you report them to the issue tracker. * sdl2 docs: http://wiki.call-cc.org/eggref/4/sdl2 * sdl2-image docs: http://wiki.call-cc.org/eggref/4/sdl2-image * Examples: https://gitlab.com/chicken-sdl2/chicken-sdl2-examples * Issue tracker: https://gitlab.com/chicken-sdl2/chicken-sdl2/issues I also intend to eventually create bindings for other libraries, such as SDL2_ttf (text rendering), SDL2_mixer (sound effects and music), and SDL2_gfx (shape drawing and image transformation). Here are the release-info files for the two new eggs. Please add them to egg-locations. :) https://gitlab.com/chicken-sdl2/chicken-sdl2/raw/master/sdl2.release-info https://gitlab.com/chicken-sdl2/chicken-sdl2-image/raw/master/sdl2-image.release-info Cheers, - John Croisant ___ 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
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] [ANN] sdl2 and sdl2-image 0.1
Evan Hanson scripsit: > Building with gcc-5 instead worked fine. That's because the default for GCC 5.x is --std=c11 instead of --std=c89. The safest approach is to insert --std=c89 into the build commands. -- weirdo:When is R7RS coming out? Riastradh: As soon as the top is a beautiful golden brown and if you stick a toothpick in it, the toothpick comes out dry. ___ 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?
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?
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] How do you compile multiple modules into a single executable?
Is there any way to use (cond-expand) to decide whether to (use) or (import) depending on if the program's compiled or not? On Sat, Dec 19, 2015, 20:57 Evan Hansonwrote: > 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
[Chicken-users] How do you compile multiple modules into a single executable?
So I have file foo.scm, which contains module foo, and file bar.scm which calls (use foo). My question is, how do I compile these both down to a single executable, as opposed to having executable bar, which uses foo.so? I've tried several approaches but I always get errors at compilation, as both files generate a function C_toplevel, which, as I understand, is how chicken wraps generated code. I also tried compilation units, the standard solution to this, but they seemed to cause weird errors in combination with (use), and (module). ___ 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
On 12/19/15 11:11 PM, Evan Hanson wrote: 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. Thanks for this report. I have fixed the issue by changing the code to declare the variables before the for loop. I will make a 0.1.1 bugfix release in a few days, after more people have had some time to maybe report some more bugs. :) For future reference, here is the issue I filed on your behalf: https://gitlab.com/chicken-sdl2/chicken-sdl2/issues/29 Thanks again! - John Croisant ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users