Re: [Chicken-users] Using Format
there is with eformat, but not with format. sending eformat to you separately, since its not yet in final form. -elf On Wed, 5 Dec 2007, William Ramsay wrote: Is there an easy way to format a number with a possible leading zero using format or sprintf? In other words I want 9 to show us as 09 and 10 to show is as is. Bill ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken scheme + gui on Nokia n800 or n810?
heh, are the n810s out yet? i wanted to get one and port chicken to it as my new organiser... -elf On Wed, 5 Dec 2007, Matthew Welland wrote: Has anyone attempted this? Which gui (if any) works? I see this: http://zedstar.org/blog/2007/11/07/latest-chicken-scheme-packaged-for-openmoko/ which is encouraging (Thanks go to the maintainer). However does chicken-setup work and can I install eggs? Also does it work with OS2008? Thanks. Matt ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken scheme + gui on Nokia n800 or n810?
2007/12/6, Elf [EMAIL PROTECTED]: heh, are the n810s out yet? i wanted to get one and port chicken to it as my new organiser... -elf I don't know where you are but e.g. expansys.com mt ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken scheme + gui on Nokia n800 or n810?
If you want to build Chicken for the Nokia N*** devices just install scratchbox. You can cross compile eggs with that also. Chicken runs nicely on the N770 etc. You can then just manually copy over what you need or package it. It is also possible to cross compile eggs if you follow Felix's instructions on the wiki for cross compilation. This is what I do on OpenMoko. On my Nokia I would build with scratchbox though. In terms of GUI, well I just use GTK+ as IMO it is fairly high-level and abstracted enough from raw C that it is pretty easy to use. You also get the benefit of cut 'n pasting a lot of pre-written code if you go this route. Chicken embeds easily into a GTK+ app. I just do the interface code in GTK+ and backend in Chicken. Cheers, John. On 06/12/2007, Matthew Welland [EMAIL PROTECTED] wrote: Has anyone attempted this? Which gui (if any) works? I see this: http://zedstar.org/blog/2007/11/07/latest-chicken-scheme-packaged-for-openmoko/ which is encouraging (Thanks go to the maintainer). However does chicken-setup work and can I install eggs? Also does it work with OS2008? Thanks. Matt -- ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken scheme + gui on Nokia n800 or n810?
John : [...] In terms of GUI, well I just use GTK+ as IMO it is fairly high-level and abstracted enough from raw C that it is pretty easy to use. You also get the benefit of cut 'n pasting a lot of pre-written code if you go this route. Chicken embeds easily into a GTK+ app. I just do the interface code in GTK+ and backend in Chicken. Do you mean you write the ui with gtk+ in C ? How is the wiring between that and Chicken done (which one calls the other and how) ? Thanks mt ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Problem installing silex egg
On Dec 4, 2007 6:01 AM, Kevin Hammack [EMAIL PROTECTED] wrote: I downloaded the latest chicken release and compiled it on my PowerBook running 10.4.11. Seems to work fine, but I can't get silex to load after installing it with chicken-setup. It failes (use silex) with #;1 (use silex) ; loading /home/khammack/sw/chicken/lib/chicken/3/silex.so ... Error: unbound variable: |?H__TEXT| Can anyone help? What's the output of this: DYLD_PRINT_LIBRARIES=1 csi -R silex It seems that silex.so (the compiled) egg can't be loaded for some reason and chicken tries to interpret it as source code. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] chicken scheme + gui on Nokia n800 or n810?
Yeh, the UI in C. Well, you have to decide where the borders are so this flexibility requires some discipline. The cleaner the separation the easier it would be to swap to say Qtopia on a mobile device if you needed to. Personally, I just throw stuff together and see if it runs on my phone and then (if I have time) go back and re-factor it so I am not sure how much mileage you would get from looking at my code right now but here it is: http://zedstar.org/tarballs/thumbtribes-client.tgz Cheers, John. On 06/12/2007, minh thu [EMAIL PROTECTED] wrote: John : [...] In terms of GUI, well I just use GTK+ as IMO it is fairly high-level and abstracted enough from raw C that it is pretty easy to use. You also get the benefit of cut 'n pasting a lot of pre-written code if you go this route. Chicken embeds easily into a GTK+ app. I just do the interface code in GTK+ and backend in Chicken. Do you mean you write the ui with gtk+ in C ? How is the wiring between that and Chicken done (which one calls the other and how) ? Thanks mt ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] unquote in environments
Is this an expected behavior? --daishi CHICKEN Version 2.732 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook cross ] (c)2000-2007 Felix L. Winkelmanncompiled 2007-12-04 on spirits (Linux) #;1 (use environments) ; loading /usr/local/chicken-2.732/lib/chicken/3/environments.so ... #;2 (define env (make-environment)) #;3 (eval '(let ((x 2)) `(1 2 ,x)) env) Error: unbound variable: ##sys#list Call history: syntax(quote (let ((x 2)) (quasiquote (1 2 (unquote x) eval (eval (quote (let ((x 2)) (quasiquote (1 2 (unquote x) env) syntax(let ((x 2)) (quasiquote (1 2 (unquote x syntax(begin (##sys#list (quote 1) (quote 2) x)) syntax(##sys#list (quote 1) (quote 2) x) syntax(quote 1) syntax(quote 2) eval (##sys#list (quote 1) (quote 2) x) -- ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Re: Installing as non-root fails with Chicken 2.732
IIUC, the problem exists only when using the `install-info' script provided by the `dpkg' package on Debian systems (and derivatives.) I haven't checked any recent GNU Texinfo distributions, but since `/var/backups' is somewhat Debian-specific, I believe that the `install-info' variant provided by Texinfo is free from the defect. Also, a recent version of Debian `texinfo' package (4.11.dfsg.1-2) seems to provide its own version of `install-info', which contains no references to `/var/backups'. (Basically, it's just a wrapper around GNU `install-info', which is available as `ginstall-info' from the same package.) Furthermore, as stated in `debian/transition-plan.txt', there're plans to supply `update-info-dir', thus effectively depreciating both the use of `install-info' and the use of back-up copies for `dir' files in Debian packaging. The outcome is: * GNU `install-info' may have no problems with non-root use (although I didn't check it); * Debian `install-info', although causing the problem, will probably be abandoned and replaced with a more reasonable wrapper. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unquote in environments
Daishi Kato scripsit: Is this an expected behavior? --daishi CHICKEN Version 2.732 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook cross ] (c)2000-2007 Felix L. Winkelmanncompiled 2007-12-04 on spirits (Linux) #;1 (use environments) ; loading /usr/local/chicken-2.732/lib/chicken/3/environments.so ... #;2 (define env (make-environment)) #;3 (eval '(let ((x 2)) `(1 2 ,x)) env) Error: unbound variable: ##sys#list Sure. If you create an empty environment and then invoke macros that generate calls to functions not in that environment, errors are exactly what you should expect. In this case, the macro quasiquote generates calls to the function ##sys#list: #;6 (macroexpand '`(1 2 ,x)) (##sys#list (quote 1) (quote 2) x) -- Don't be so humble. You're not that great. John Cowan --Golda Meir[EMAIL PROTECTED] ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unquote in environments
I see. Let me ask differently. #;1 (use environments) ; loading /usr/local/chicken-2.732/lib/chicken/3/environments.so ... (environment-extend! env 'with-input-from-string with-input-from-string) #;2 (define env (make-environment)) #;3 (environment-extend! env 'read read) #;4 (environment-extend! env 'with-input-from-string with-input-from-string) #;5 (eval '(with-input-from-string (let ((x 2)) `(1 2 ,x)) read) env) (let ((x 2)) (quasiquote (1 2 (unquote x How do I expand the quasiquote macro in the environment? I don't want to extend the environment to have ##sys#list. Maybe, extending macroexpand? Thanks. Daishi At Thu, 6 Dec 2007 09:24:37 -0500, John Cowan wrote: Daishi Kato scripsit: Is this an expected behavior? --daishi CHICKEN Version 2.732 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook cross ] (c)2000-2007 Felix L. Winkelmanncompiled 2007-12-04 on spirits (Linux) #;1 (use environments) ; loading /usr/local/chicken-2.732/lib/chicken/3/environments.so ... #;2 (define env (make-environment)) #;3 (eval '(let ((x 2)) `(1 2 ,x)) env) Error: unbound variable: ##sys#list Sure. If you create an empty environment and then invoke macros that generate calls to functions not in that environment, errors are exactly what you should expect. In this case, the macro quasiquote generates calls to the function ##sys#list: #;6 (macroexpand '`(1 2 ,x)) (##sys#list (quote 1) (quote 2) x) -- Don't be so humble. You're not that great. John Cowan --Golda Meir[EMAIL PROTECTED] ** XREA.COM -Free Web Hosting- http://www.xrea.com/ ** ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Using Fortmat
Actually, this brings us another question. Is it more efficient to do something like what you have below than to add an egg? By efficient, I mean both in speed and program size? I have it my head that I am better off keeping to the routines in the language rather than adding an egg. The code below does the one thing I need. Obviously I use eggs where the task is larger or impossible without. Bill Of course, there's also the poor man's string padding, using srfi-13: (define (number-pad num len) (let ((str (number-string num))) (if (= (string-length str) len) str (string-pad str len #\0 Tobia ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] unquote in environments
Thanks, John. I'll find out other workarounds. --daishi At Thu, 6 Dec 2007 10:56:19 -0500, John Cowan wrote: Daishi Kato scripsit: How do I expand the quasiquote macro in the environment? The trouble is that in Chicken all environments share the same macros, so you are stuck with the definition of quasiquote unless you override it globally with a version that doesn't invoke ##sys#list or ##sys#cons. I don't want to extend the environment to have ##sys#list. Maybe, extending macroexpand? That doesn't help much; it's not the macroexpansion that's at issue, it's the eval that's done after calling macroexpand. That eval uses the current (dynamic) environment. BTW, Felix, the claim on the wiki that the interaction environment can't be extended appears to be false: [EMAIL PROTECTED]:~/mpron$ csi CHICKEN Version 2.736 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook ] (c)2000-2007 Felix L. Winkelmanncompiled 2007-10-21 on skunk (Linux) #;1 (use environments) ; loading /usr/local/lib/chicken/3/environments.so ... #;2 foo Error: unbound variable: foo #;2 (environment-extend! (interaction-environment) 'foo 32) #;3 foo 32 -- You let them out again, Old Man Willow! John Cowan What you be a-thinking of? You should not be waking! [EMAIL PROTECTED] Eat earth! Dig deep! Drink water! Go to sleep! Bombadil is talking.http://ccil.org/~cowan ** XREA.COM -Free Web Hosting- http://www.xrea.com/ ** ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Using Fortmat
On Dec 6, 2007 10:00 PM, William Ramsay [EMAIL PROTECTED] wrote: Actually, this brings us another question. Is it more efficient to do something like what you have below than to add an egg? By efficient, I mean both in speed and program size? I have it my head that I am better off keeping to the routines in the language rather than adding an egg. The code below does the one thing I need. Obviously I use eggs where the task is larger or impossible without. It's a matter of taste, but personally I prefer to minimize dependencies. So, if the simple, hand-rolled solution does the job, I'd prefer it over the more general, but external solution. cheers, felix ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users