Re: [Chicken-users] utf8/url interaction: SEGV
On Tue, Apr 21, 2009 at 06:51:37PM -0500, Peter Danenberg wrote: The following is sufficient to segfault my local chicken (3.4.0): (require-extension utf8 url) (url http://localhost;) Loading url without utf8 works fine; anyone know what sort of interaction might cause that? Are you running the latest version of utf8? -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth pgpwBMj9wtrcc.pgp Description: PGP signature ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Lisp puzzles
are you counting '() (the empty list) as an atom or not? in lisp it traditionally isnt an atom, but your definition below indicates it is. -elf On Tue, 21 Apr 2009, John Cowan wrote: These are some very old Lisp puzzles I dug up and translated to Scheme. The idea is to figure out what they do, ideally without testing them, but if you *want* to test them, nobody can stop you. ;; What do these functions do? (define (greussay l r) (cond ((atom? l) #f) ((memq l r) #t) ((greussay (car l) (cons l r)) #t) (else (greussay (cdr l) (cons l r) (define (allen l) (cond ((null? l) '()) ((null? (cdr l)) l) (else (cons (car (allen (cdr l))) (allen (cdr (allen (cdr l (define (samet x y) (if ( x 2) (+ y 1) (samet (- x 1) (samet (- x 2) y (define (goossens-moby l) (if (null? (cdr l)) (car l) (goossens-moby (cddr (append l (car l)) (define (hofstadter-g n) (if (= 0 n) 0 (- n (hofstadter-g (hofstadter-g (- n 1)) (define (hofstadter-q n) (cond ((= n 1) 1) ((= n 2) 1) (else (+ (hofstadter-q (- n (hofstadter-q (- n 1 (hofstadter-q (- n (hofstadter-q (- n 2 (define (goossens l x) (if (null? l) x (goossens (reverse (cdr l)) (car l ;; Utility function #;(define (atom? x) (not (pair? x))) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] New to Scheme Macros
Sorry if these are silly questions... 1) I've used macros before in CL, but only getting into them for the first time here in Chicken. Is define-syntax the proper thing to use to do this? 2) define-syntax looks to be standard to all schemes. Can you do everything with it that you can do with Common Lisp macros? 3) If the answer to #2 is yes, is it as convenient? 4) If the answer to either #2 or #3 is no, is there a way to get CL-style macros in chicken? Thanks! --Newbie to Scheme ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] New to Scheme Macros
2009-04-22 Jordan Cooper nefi...@gmail.com: [...] 1) I've used macros before in CL, but only getting into them for the first time here in Chicken. Is define-syntax the proper thing to use to do this? Hello, depending on your definition of proper, the answer is probably yes ;-) At least using define-syntax and syntax-rules is the standard way of defining macros in Scheme since R5RS. 2) define-syntax looks to be standard to all schemes. Can you do everything with it that you can do with Common Lisp macros? There are still a bunch of Schemes out there that don't support define-syntax or where it doesn't integrate too well with the rest of the language implementation. You also cannot do everything that is possible with Common Lisp macros using syntax-rules macros. But this is supposed to be an advantage: Macros implemented using syntax-rules are fully hygienic, ie. you don't have to care about creating all those local names with gensym or wonder whether some definition used in the macro might be shadowed by user code around its invocation, you just write down the syntax-rules macro and everything concerning scoping of variables just works right. At least in theory. In practice there are often pitfalls connected with the expansion of macros and separate compilation of sources or the usage of module systems. The latest Scheme standard R6RS tries to address this problem by specifying a module system and its interaction with macros, but not many full blown Scheme implementations support this, yet. Also, if you want to break hygiene in your macros, you cannot do that using syntax-rules but have to use either the classical Common Lisp like macros or some extension like the syntax-case construct implemented by many Schemes. syntax-case has become standard with R6RS, too, but there are also some Scheme implementations that have macro systems based on explicit renaming or syntactic closures and expose those lower level optional hygiene breaking techniques to the programmer instead of or in addition to syntax-case. 3) If the answer to #2 is yes, is it as convenient? Hygienic macros are often even more convenient to write than Common Lisp style macros, since you save typing for the implementation of identifier hygiene and you have pattern matching available to specify the shape of input expressions to be transformed in a concise way. 4) If the answer to either #2 or #3 is no, is there a way to get CL-style macros in chicken? [...] Yes, CHICKEN supports define-macro in a way very similar to Common Lisp. cu, Thomas -- When C++ is your hammer, every problem looks like your thumb. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Lisp puzzles
Elf scripsit: are you counting '() (the empty list) as an atom or not? in lisp it traditionally isnt an atom, but your definition below indicates it is. () definitely is an atom. The Lisp 1.5 manual said that atom returned true if its argument was an atomic symbol, namely NIL, which was the same as (), and false if its argument was composite. () is certainly not composite, though in Scheme it is not a symbol. In Common Lisp, it's defined in the same way I specified: (lambda (x) (not (consp x))). -- Henry S. Thompson said, / Syntactic, structural, John Cowan Value constraints we / Express on the fly. co...@ccil.org Simon St. Laurent: Your / Incomprehensible http://www.ccil.org/~cowan Abracadabralike / schemas must die! ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] New to Scheme Macros
Jordan Cooper scripsit: Sorry if these are silly questions... These questions are far from silly: giving accurate and complete answers depends also on whether you are using Chicken 3 or Chicken 4, which are very different in this respect. Let me know which one, and I can put together a reply. (I tried to write a reply that would cover both, but it got very complicated very fast.) -- No, John. I want formats that are actually John Cowan useful, rather than over-featured megaliths that http://www.ccil.org/~cowan address all questions by piling on ridiculous co...@ccil.org internal links in forms which are hideously over-complex. --Simon St. Laurent on xml-dev ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Which eggs to migrate from Chicken 3 first?
The following is a list, derived from the dependency graphs, for Chicken 3 eggs on which more than one other Chicken 3 egg depends. Eggs high up on this list should probably be migrated soon. I have excluded all eggs shown in the current Chicken 4 egg list, as well as syntax-case. 312 misc-extn 121 lookup-table 89 srfi-40 77 locale 74 srfi-29 71 format-modular 63 coerce 53 srfi-37 52 eggdoc 42 stream-ext 39 srfi-42 36 uri 24 url 23 args 20 rlimit 19 openssl 17 message-digest 17 http 16 stream-parser 10 tinyclos 7 array-lib 6 sendfile 6 iconv 6 html-stream 5 utf8 5 syntactic-closures 5 srfi-4-comprehensions 5 blas 4 tcp-server 4 stream-sections 4 ssax 4 srfi-95 4 s11n 4 job-worker 3 sxml-tools 3 srfi-66 3 rfc822 3 md5 3 format 3 dyn-vector 3 crc 3 codewalk 3 args-doc 2 z3 2 tool 2 stream-wiki 2 sha1 2 runcmd 2 pipeline 2 mime 2 graph-scc -- John Cowan http://www.ccil.org/~cowanco...@ccil.org To say that Bilbo's breath was taken away is no description at all. There are no words left to express his staggerment, since Men changed the language that they learned of elves in the days when all the world was wonderful. --The Hobbit ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
SRFI-40 is deprecated due to a memory leak. Please port SRFI-41 instead, and adapt any code that uses SRFI-40 to the new interface. On Wed, Apr 22, 2009 at 11:11 AM, John Cowan co...@ccil.org wrote: The following is a list, derived from the dependency graphs, for Chicken 3 eggs on which more than one other Chicken 3 egg depends. Eggs high up on this list should probably be migrated soon. I have excluded all eggs shown in the current Chicken 4 egg list, as well as syntax-case. 312 misc-extn 121 lookup-table 89 srfi-40 77 locale 74 srfi-29 71 format-modular 63 coerce 53 srfi-37 52 eggdoc 42 stream-ext 39 srfi-42 36 uri 24 url 23 args 20 rlimit 19 openssl 17 message-digest 17 http 16 stream-parser 10 tinyclos 7 array-lib 6 sendfile 6 iconv 6 html-stream 5 utf8 5 syntactic-closures 5 srfi-4-comprehensions 5 blas 4 tcp-server 4 stream-sections 4 ssax 4 srfi-95 4 s11n 4 job-worker 3 sxml-tools 3 srfi-66 3 rfc822 3 md5 3 format 3 dyn-vector 3 crc 3 codewalk 3 args-doc 2 z3 2 tool 2 stream-wiki 2 sha1 2 runcmd 2 pipeline 2 mime 2 graph-scc -- John Cowan http://www.ccil.org/~cowanhttp://www.ccil.org/%7Ecowan co...@ccil.org To say that Bilbo's breath was taken away is no description at all. There are no words left to express his staggerment, since Men changed the language that they learned of elves in the days when all the world was wonderful. --The Hobbit ___ 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] Which eggs to migrate from Chicken 3 first?
John Cowan co...@ccil.org writes: 52 eggdoc 19 openssl 6 iconv 5 utf8 4 tcp-server 3 format 6 sendfile 2 graph-scc These have already been ported. 17 http Should be deprecated in favor of intarweb? 5 syntactic-closures Deprecated in favor of the new native macro system. -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
Alex Shinn scripsit: 52 eggdoc 19 openssl 6 iconv 5 utf8 4 tcp-server 3 format 6 sendfile 2 graph-scc These have already been ported. They aren't in http://chicken.wiki.br/chicken-projects/egg-index-4.html, and don't have html files in the http://chicken.wiki.br/eggref/4/ directory, though, so only insiders know about them. Someone needs to fix that. -- Where the wombat has walked,John Cowan co...@ccil.org it will inevitably walk again. http://www.ccil.org/~cowan ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
2009/4/22 John Cowan co...@ccil.org: only insiders know about them. You only get told about these things if you're part of the Dark Cabal©. Now that you've heard about it, I'll have to kill you ... Leo ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
John Cowan scripsit: The following is a list, derived from the dependency graphs, for Chicken 3 eggs on which more than one other Chicken 3 egg depends. Eggs high up on this list should probably be migrated soon. It's wrong, though. It turns out that the .dot files I was using as raw data often mention dependent eggs multiple times. I'm going to add Alex's list of Chicken 4 eggs, modify my analysis code, and re-run it. -- John Cowanco...@ccil.org At times of peril or dubitation, http://www.ccil.org/~cowan Perform swift circular ambulation, With loud and high-pitched ululation. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
Phil Bewig scripsit: SRFI-40 is deprecated due to a memory leak. Please port SRFI-41 instead, and adapt any code that uses SRFI-40 to the new interface. The following eggs depend directly on the srfi-40 egg: egg-post-commit html-plots html-stream irnc-base mat5-lib ode scheme-dissect stream-base64 stream-cgi stream-ext stream-flash stream-htpasswd stream-httplog stream-ldif stream-parser stream-sections stream-wiki -- John Cowanco...@ccil.orghttp://ccil.org/~cowan Rather than making ill-conceived suggestions for improvement based on uninformed guesses about established conventions in a field of study with which familiarity is limited, it is sometimes better to stick to merely observing the usage and listening to the explanations offered, inserting only questions as needed to fill in gaps in understanding. --Peter Constable ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Re: Which eggs to migrate from Chicken 3 first?
The following is a list, derived from the dependency graphs, for Chicken 3 eggs on which more than one other Chicken 3 egg depends. Eggs high up on this list should probably be migrated soon. I have excluded all eggs known to me to be ported to Chicken 4, plus the syntax-expansion eggs. 79 misc-extn 52 lookup-table 28 coerce 27 uri 25 srfi-42 23 locale 22 srfi-29 20 srfi-37 18 srfi-40 17 url 16 http 15 args 13 stream-ext 13 rlimit 10 message-digest 8 tinyclos 7 array-lib 6 stream-parser 4 ssax 4 srfi-95 4 srfi-4-comprehensions 4 s11n 4 html-stream 3 sxml-tools 3 stream-sections 3 srfi-66 3 rfc822 3 md5 3 job-worker 3 dyn-vector 3 codewalk 3 blas 3 args-doc 2 z3 2 tool 2 stream-wiki 2 sha1 2 runcmd 2 pipeline 2 mime 2 crc -- A poetical purist named Cowan [that's me: co...@ccil.org] Once put the rest of us dowan. [on xml-dev] Your verse would be sweeterhttp://www.ccil.org/~cowan If it only had metre And rhymes that didn't force me to frowan. [overpacked line!] --Michael Kay ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
On Wed, Apr 22, 2009 at 12:11:12PM -0400, John Cowan wrote: I have excluded all eggs shown in the current Chicken 4 egg list, as well as syntax-case. [..eggs about which I have absolutely no say omitted..] 52 eggdoc I believe this was ported yesterday. 36 uri This could be deprecated in favor of uri-common/uri-generic. I don't see a big problem with them existing together, but if possible please use these. They have a much bigger testsuite and are probably much more compliant to the RFC. 24 url This egg was already marked 'Unsupported or redundant' in Eggs Unlimited 3. We should take this opportunity to put it down for good. 17 http Should be deprecated in favor of intarweb. 6 sendfile This was already ported... 5 utf8 This was already ported... 4 tcp-server 3 sxml-tools Already ported, as the sxpath egg. Other parts of the sxml-tools that should be made available for Chicken should be put in other eggs, since sxml-tools is many things all rolled into one. It's better to separate the bloat a bit. Cheers, Peter -- http://sjamaan.ath.cx -- The process of preparing programs for a digital computer is especially attractive, not only because it can be economically and scientifically rewarding, but also because it can be an aesthetic experience much like composing poetry or music. -- Donald Knuth pgpthvVWNGILm.pgp Description: PGP signature ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Problems installing intarweb
Hi peeps, I'm trying to install intarweb on my machine (uname -a: Darwin Typhoon-2.local 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386) and I'm hitting some problems with uri-generic. uri-generic installs fine, however: chicken-status defstruct ... version: 1.2 matchable . version: 2.4.2 uri-generic version: 1.12 It installs version 1.12 and intarweb requires 2.0. I've been told on IRC that I should use the latest svn trunk and this issue should be fixed. Just to confirm: Typhoon-2:~ stephen$ csi CHICKEN (c)2008-2009 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.0.2 - SVN rev. 14347 macosx-unix-gnu-x86 [ manyargs dload ptables applyhook ] compiled 2009-04-22 on Typhoon-2.local (Darwin) So it is SVN trunk and chicken-install still installs the older version. The behavior is slightly different and it seems that I'm hitting another bug: The following installed extensions are outdated, because `intarweb' requires later versions: uri-common (??? - 0.2) (uri-common is currently not installed). If I say yes, then: removing previously installed extension `uri-common' ... Error: (open-input-file) cannot open file - No such file or directory: /usr/local/lib/chicken/4/uri-common.setup-info As expected, it is not installed. Let's try installing by hand: The following installed extensions are outdated, because `uri-common' requires later versions: uri-generic (1.12 - 2.1) YAY! So I say I wish to replace... Error: the required extension `uri-generic' is older than 2.0, which is what this extension requires - please run chicken-install uri-generic So it seems that it still wants to install the old one. I have run out of ideas, sort of downloading the egg myself and running chicken-install locally. Any other ideas? --Stephen programmer, n: A red eyed, mumbling mammal capable of conversing with inanimate monsters. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] irregex bug?
http://paste.lisp.org/display/79023 $ csi CHICKEN (c)2008-2009 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.0.0 - SVN rev. 13887 linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables applyhook ] compiled 2009-04-14 on chew-z (Linux) #;1 (require-library regex) ; loading library regex ... #;2 (import irregex) ; loading /usr/local/lib/chicken/4/irregex.import.so ... #;3 (define rx (sre-irregex '(: bos (submatch (+ (0123456789))) eos))) #;4 (irregex-match rx 0) #(*irregex-match-tag* 0 () 0 1 0 1) #;5 (irregex-match rx a) #f #;6 (irregex-match-data? (irregex-match rx 0)) #f #;7 -- Anthony Carrico signature.asc Description: OpenPGP digital signature ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Thank you, Thomas and John, for the kind replies. I'm using Chicken 4. So, I imagine I can stick with syntax-rules until I run into a situation where I need something else, at which point I can either try define-macro (if I use this, do I need to explicitly gensym?) or syntax-case (though I really have no idea what this is yet) -- right? On Apr 22, 2009 8:13am, John Cowan co...@ccil.org wrote: Jordan Cooper scripsit: Sorry if these are silly questions... These questions are far from silly: giving accurate and complete answers depends also on whether you are using Chicken 3 or Chicken 4, which are very different in this respect. Let me know which one, and I can put together a reply. (I tried to write a reply that would cover both, but it got very complicated very fast.) -- No, John. I want formats that are actually John Cowan useful, rather than over-featured megaliths that http://www.ccil.org/~cowan address all questions by piling on ridiculous co...@ccil.org internal links in forms which are hideously over-complex. --Simon St. Laurent on xml-dev ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Problems installing intarweb
2009/4/22 Stephen Eilert spedr...@gmail.com: Hi peeps, I'm trying to install intarweb on my machine uri-generic installs fine, however: uri-generic version: 1.12 It installs version 1.12 and intarweb requires 2.0. I've been told on IRC that I should use the latest svn trunk and this issue should be fixed. Stephen, I will guess the upstream servers (galinha and kitten-technologies) also need to be updated. For now, you can either run chicken-install inside a copy of the SVN repository for that egg, or direct chicken-install to use a particular version: $ chicken-install uri-generic:2.1 ... $ chicken-status uri-generic .. version: 2.1 ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
2009/4/22 nefi...@gmail.com: Thank you, Thomas and John, for the kind replies. I'm using Chicken 4. So, I imagine I can stick with syntax-rules until I run into a situation where I need something else, at which point I can either try define-macro (if I use this, do I need to explicitly gensym?) A situation not mentioned above where you may prefer something else, even if not breaking hygiene, is when your macro would be better off written in procedural style; syntax-rules' exclusive reliance on pattern matching sometimes leads to byzantine code. This will be obvious when you hit it. define-macro is not available in Chicken 4. Explicit renaming is supported by the core. Documentation on ER is available at http://chicken.wiki.br/man/4/Modules%20and%20macros#explicit-renaming-macros . The eggs and the Chicken core are good places to see working examples. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
On Wed, Apr 22, 2009 at 11:28 AM, John Cowan co...@ccil.org wrote: Alex Shinn scripsit: 52 eggdoc 19 openssl 6 iconv 5 utf8 4 tcp-server 3 format 6 sendfile 2 graph-scc These have already been ported. They aren't in http://chicken.wiki.br/chicken-projects/egg-index-4.html, Yes, they are. Jim ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
On Wed, Apr 22, 2009 at 2:15 PM, Jim Ursetto zbignie...@gmail.com wrote: A situation not mentioned above where you may prefer something else, even if not breaking hygiene, is when your macro would be better off written in procedural style Forgot to mention, pattern matching is available in explicit renaming macros via the matchable extension; the foreigners egg is an example. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
Jim Ursetto scripsit: These have already been ported. They aren't in http://chicken.wiki.br/chicken-projects/egg-index-4.html, Yes, they are. Okay. I must have botched the list somehow. -- John Cowanhttp://www.ccil.org/~cowan co...@ccil.org Please leave your valuesCheck your assumptions. In fact, at the front desk. check your assumptions at the door. --sign in Paris hotel --Cordelia Vorkosigan ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Thank you, this was very enlightening, and I think clears up all my macro questions so far. Explicit renaming macros look neat; the only kinda bummer thing is having to manually pull apart the components of the expression with car/cdr/etc. instead of the destructuring happening in a more automatic way. Of course, I imagine one could write a macro to do this... :) On Wed, Apr 22, 2009 at 1:32 PM, Jim Ursetto zbignie...@gmail.com wrote: On Wed, Apr 22, 2009 at 2:15 PM, Jim Ursetto zbignie...@gmail.com wrote: A situation not mentioned above where you may prefer something else, even if not breaking hygiene, is when your macro would be better off written in procedural style Forgot to mention, pattern matching is available in explicit renaming macros via the matchable extension; the foreigners egg is an example. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Problems installing intarweb
On Wed, Apr 22, 2009 at 4:00 PM, Jim Ursetto zbignie...@gmail.com wrote: 2009/4/22 Stephen Eilert spedr...@gmail.com: Hi peeps, I'm trying to install intarweb on my machine uri-generic installs fine, however: uri-generic version: 1.12 It installs version 1.12 and intarweb requires 2.0. I've been told on IRC that I should use the latest svn trunk and this issue should be fixed. Stephen, I will guess the upstream servers (galinha and kitten-technologies) also need to be updated. For now, you can either run chicken-install inside a copy of the SVN repository for that egg, or direct chicken-install to use a particular version: I'll have to run against the repository. Passing the version seems to work - for the specific egg. It breaks again when dependent eggs are installed. --Stephen programmer, n: A red eyed, mumbling mammal capable of conversing with inanimate monsters. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
[Chicken-users] Hen mode for Emacs: macroexpand?
Hi all, another bothersome question. I'm currently using hen.el that comes with Chicken 4 for my scheme development in Emacs (together with scheme-complete). I like it fine, but one thing I rather miss from SLIME is the ability to expand the macro at point. This doesn't appear to be a feature of Hen (or I'm not seeing it?), so I was wondering if I can get this functionality into Emacs from somewhere. Thanks! ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Jordan Cooper scripsit: Explicit renaming macros look neat; the only kinda bummer thing is having to manually pull apart the components of the expression with car/cdr/etc. instead of the destructuring happening in a more automatic way. Of course, I imagine one could write a macro to do this... :) Yes. Someone should port destructuring-bind to Scheme. Note that the gensym approach used in CL only solves part of the problem of macro hygiene. It prevents the macro code from binding names that are used in the macro body with the expectation that the bindings at the macro call are in effect. However, gensyms do not and cannot protect the macro code itself from bindings that are in place at the point of call, when the macro code expects those names to be bound at the point of macro definition (typically globally). For example, if a non-hygienic macro calls the list procedure, and at the point of call the code has bound the name list to something else, the macro is screwed. This risk exists in CL, but is mitigated by the presence of separate function and variable namespaces, and by the fact that the names exported from the lisp package cannot be rebound or changed. It's still possible for this problem to bite CL macro writers, and it can't be prevented (as opposed to avoided) unless the CL implementation provides an additional hygienic macro system that expands *all* code. -- At the end of the Metatarsal Age, the dinosaurs John Cowan abruptly vanished. The theory that a single co...@ccil.org catastrophic event may have been responsiblehttp://www.ccil.org/~cowan has been strengthened by the recent discovery of a worldwide layer of whipped cream marking the Creosote-Tutelary boundary. --Science Made Stupid ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Yes, that is interesting. I noticed in the examples on the wiki that they were calling the rename procedure even for identifiers like lambda, which looked different coming from CL macros. On Wed, Apr 22, 2009 at 3:21 PM, John Cowan co...@ccil.org wrote: Note that the gensym approach used in CL only solves part of the problem of macro hygiene. It prevents the macro code from binding names that are used in the macro body with the expectation that the bindings at the macro call are in effect. However, gensyms do not and cannot protect the macro code itself from bindings that are in place at the point of call, when the macro code expects those names to be bound at the point of macro definition (typically globally). For example, if a non-hygienic macro calls the list procedure, and at the point of call the code has bound the name list to something else, the macro is screwed. This risk exists in CL, but is mitigated by the presence of separate function and variable namespaces, and by the fact that the names exported from the lisp package cannot be rebound or changed. It's still possible for this problem to bite CL macro writers, and it can't be prevented (as opposed to avoided) unless the CL implementation provides an additional hygienic macro system that expands *all* code. -- At the end of the Metatarsal Age, the dinosaurs John Cowan abruptly vanished. The theory that a single co...@ccil.org catastrophic event may have been responsible http://www.ccil.org/~cowan has been strengthened by the recent discovery of a worldwide layer of whipped cream marking the Creosote-Tutelary boundary. --Science Made Stupid ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Jordan Cooper scripsit: Yes, that is interesting. I noticed in the examples on the wiki that they were calling the rename procedure even for identifiers like lambda, which looked different coming from CL macros. Sure. Nothing says you can't do (let ((define 1) lambda 2) (if 3) (cons 4) ...) in Scheme. It's deeply weird, but it's legal. It more often comes up with things like list, used as the name of a parameter in a function that expects a list. Of course, if you do that, you can't call the global function list in your code, but hygienic macros that you invoke still can. Another case would be a sorting routine that accepts a less-than function as a parameter: calling that parameter makes the code easy to read. I kind of regret that Felix didn't provide syntactic-closures macros as well as explicit-renaming. In syntactic-closures, everything is renamed by default, and you have to turn off renaming where you need it turned off. -- Even a refrigerator can conform to the XML John Cowan Infoset, as long as it has a door sticker co...@ccil.org saying No information items inside. http://www.ccil.org/~cowan --Eve Maler ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
On Wed, Apr 22, 2009 at 1:32 PM, Jim Ursetto zbignie...@gmail.com wrote: Forgot to mention, pattern matching is available in explicit renaming macros via the matchable extension; the foreigners egg is an example. On Wed, Apr 22, 2009 at 3:55 PM, Jordan Cooper nefi...@gmail.com wrote: Explicit renaming macros look neat; the only kinda bummer thing is having to manually pull apart the components of the expression with car/cdr/etc. instead of the destructuring happening in a more automatic way. Of course, I imagine one could write a macro to do this... :) Yes -- hence the matchable extension ;) ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Problems installing intarweb
On Wed, Apr 22, 2009 at 3:59 PM, Stephen Eilert spedr...@gmail.com wrote: I'll have to run against the repository. Passing the version seems to work - for the specific egg. It breaks again when dependent eggs are installed. That is correct, however, as far as I know only base64 and uri-generic are currently affected. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: Re: [Chicken-users] New to Scheme Macros
Jim Ursetto scripsit: Explicit renaming macros look neat; the only kinda bummer thing is having to manually pull apart the components of the expression with car/cdr/etc. instead of the destructuring happening in a more automatic way. Of course, I imagine one could write a macro to do this... :) Yes -- hence the matchable extension ;) Matchable is kind of heavyweight compared to destructuring-bind, although it can of course do the same job. http://www.lispworks.com/documentation/HyperSpec/Body/m_destru.htm http://www.lispworks.com/documentation/HyperSpec/Issues/iss130_w.htm -- You escaped them by the will-death John Cowan and the Way of the Black Wheel. co...@ccil.org I could not. --Great-Souled Samhttp://www.ccil.org/~cowan ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
I propose that the following eggs be made obsolete: srfi-40 (superseded by srfi-41) uri + url (superseded by uri-generic) syntactic-closures (superseded by Chicken 4 macros) I started porting all graph eggs last night, so dyn-vector, digraph and everything graph-* is ported or in the process of being ported to Chicken 4. Also, since most of those eggs use eggdoc for documentation, I will scavenge some code from egg-post-commit and update the make-egg-index script to account for eggdoc-based documentation, instead of assuming all egg documentation resides in eggref. -Ivan John Cowan co...@ccil.org writes: The following is a list, derived from the dependency graphs, for Chicken 3 eggs on which more than one other Chicken 3 egg depends. Eggs high up on this list should probably be migrated soon. I have excluded all eggs shown in the current Chicken 4 egg list, as well as syntax-case. 312 misc-extn 121 lookup-table 89 srfi-40 77 locale 74 srfi-29 71 format-modular 63 coerce 53 srfi-37 52 eggdoc 42 stream-ext 39 srfi-42 36 uri 24 url 23 args 20 rlimit 19 openssl 17 message-digest 17 http 16 stream-parser 10 tinyclos 7 array-lib 6 sendfile 6 iconv 6 html-stream 5 utf8 5 syntactic-closures 5 srfi-4-comprehensions 5 blas 4 tcp-server 4 stream-sections 4 ssax 4 srfi-95 4 s11n 4 job-worker 3 sxml-tools 3 srfi-66 3 rfc822 3 md5 3 format 3 dyn-vector 3 crc 3 codewalk 3 args-doc 2 z3 2 tool 2 stream-wiki 2 sha1 2 runcmd 2 pipeline 2 mime 2 graph-scc ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Hen mode for Emacs: macroexpand?
On Apr 22, 2009, at 2:14 PM, Jordan Cooper wrote: Hi all, another bothersome question. I'm currently using hen.el that comes with Chicken 4 for my scheme development in Emacs (together with scheme-complete). I like it fine, but one thing I rather miss from SLIME is the ability to expand the macro at point. This doesn't appear to be a feature of Hen (or I'm not seeing it?), so I was wondering if I can get this functionality into Emacs from somewhere. Thanks! The Chicken interpreter, csi, has a toplevel command ',x' that expands a macro. The expand-full extension defines a toplevel command ',*' that recursively performs macro expansion. You might also be interested in the apropos egg. ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users Best Wishes, Kon ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Which eggs to migrate from Chicken 3 first?
On Apr 22, 2009, at 9:16 AM, Phil Bewig wrote: SRFI-40 is deprecated due to a memory leak. Please port SRFI-41 instead, and adapt any code that uses SRFI-40 to the new interface. The srfi-41 extension is available for Chicken 4. ,snip ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users Best Wishes, Kon ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] irregex bug?
Hi, Anthony Carrico acarr...@memebeam.org writes: #;1 (require-library regex) ; loading library regex ... #;2 (import irregex) ; loading /usr/local/lib/chicken/4/irregex.import.so ... #;3 (define rx (sre-irregex '(: bos (submatch (+ (0123456789))) eos))) #;4 (irregex-match rx 0) #(*irregex-match-tag* 0 () 0 1 0 1) #;5 (irregex-match rx a) #f #;6 (irregex-match-data? (irregex-match rx 0)) #f #;7 Thanks for catching this. It had already been fixed upstream, so I've pushed the fix to the chicken trunk. -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] New to Scheme Macros
John Cowan co...@ccil.org writes: Jim Ursetto scripsit: Explicit renaming macros look neat; the only kinda bummer thing is having to manually pull apart the components of the expression with car/cdr/etc. instead of the destructuring happening in a more automatic way. Of course, I imagine one could write a macro to do this... :) Yes -- hence the matchable extension ;) Matchable is kind of heavyweight compared to destructuring-bind, although it can of course do the same job. (define-syntax bind (syntax-rules () ((_ pat var body ...) (match-let ((pat var)) body ... This is both more concise and more powerful than destructuring-bind. -- Alex ___ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users