Re: [Chicken-users] Mutual recursion w/ comparse

2015-05-29 Thread Moritz Heidkamp
Hi Matt, On 29 May 2015 02:24 CEST, Matt Gushee wrote: Actually, this is just a copy of the 'vac' macro from json-abnf; I changed the name because I had no idea what 'vac' means - whereas 'mrp' stands for 'mutually recursive parser'. just a nit-pick: You also need this kind of thing for self

Re: [Chicken-users] u8vector to numbers bignum

2015-05-29 Thread Peter Bex
On Thu, May 28, 2015 at 08:18:14PM -0700, chi wrote: Also, a number-u8vector function would be nice. Converting a number to a hex string, then taking every 2 characters of that and converting that back to a number, for each element of the u8vector, just to keep me from accessing the number's

Re: [Chicken-users] u8vector to numbers bignum

2015-05-29 Thread cowan
chi scripsit: Ironically, that is exactly what the SRFI-27 module implements. http://wiki.call-cc.org/eggref/4/srfi-27#random-sources Could make an insecure random source, or even a totally non-random random source I imagine. I had no idea it was so comprehensively extended. -- John Cowan

Re: [Chicken-users] u8vector to numbers bignum

2015-05-29 Thread Stephen Eilert
On Thu, May 28, 2015 at 9:09 PM, John Cowan co...@mercury.ccil.org wrote: Peter Bex scripsit: If this is such an important feature it may make more sense to include a proper PRNG. Different applications will want fast crude random-ish numbers, PRNGs, cryptographic PRNGs, or full quantum

Re: [Chicken-users] Mutual recursion w/ comparse

2015-05-29 Thread Matt Gushee
Hi, Moritz-- On Fri, May 29, 2015 at 3:00 AM, Moritz Heidkamp mor...@twoticketsplease.de wrote: I also saw that comparse provides a similar macro called 'recursive-parser', but for some reason that didn't work when I tried it. Maybe I was using it wrong. That's right -- it's slightly

[Chicken-users] Scheduled call-cc.org server maintenance

2015-05-29 Thread Mario Domenech Goulart
Hi, The call-cc.org server will undergo scheduled maintenance on, May 30th, at 07:00h EST. The expected maintenance duration is 3 hours. During the maintenance time, the services provided by the following subdomains will be unavailable: * bugs.call-cc.org * code.call-cc.org *

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Michele La Monaca
On Fri, May 29, 2015 at 3:10 AM, Jinsong Liang jinsongli...@gmail.com wrote: Thank you Michele! This is a nice example. Nice but maybe not very useful: (apply-syntax or (#f (+ 1 2) (print hello))) is just a longer and more cumbersome version of (or (#f (+ 1 2) (print hello))) A far more

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Jinsong Liang
Thank you for more examples! I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should I start with? Also, I have heard that, different from Lisp, macro

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Matt Gushee
Hi, Jinsong-- On Fri, May 29, 2015 at 6:25 PM, Jinsong Liang jinsongli...@gmail.com wrote: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread John Cowan
Jinsong Liang scripsit: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should I start with? Define-macro is completely obsolete and not supported

Re: [Chicken-users] u8vector to numbers bignum

2015-05-29 Thread chi
(define (bignum-u8vector/host-byte-order num) (unless (bignum? num) (error Argument is not a bignum! num)) (let* ((word-size (cond-expand (64bit 8) (else 4))) ; Is there a better way? (bignum-contents (##sys#slot num 1)) ; Digits preceded by sign word (bignum-digits