Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Peter Danenberg
Quoth chi on Sweetmorn, the 5th of Confusion:
 I mean it's obvious define-macro is a bad idea.

I wonder why no one ever mentions Juergen Lorenz' wonderful define-macro:

  http://api.call-cc.org/doc/bindings#def:define-macro

Looks like it's syntactic sugar around implicit-renaming; gives one the 
apparent ability to write low-level-like syntactic-transformations, though, 
without worrying about injection, c.

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


Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Peter Danenberg
Quoth Peter Bex on Boomtime, the 1st of Confusion:
 If or were a simple procedure, it would first evaluate all its
 arguments and then call the procedure.

This is also known as applicative vs. normal order; see e.g.:

  https://mitpress.mit.edu/sicp/full-text/sicp/book/node85.html

Procedures are applicative; macros are normal.

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


Re: [Chicken-users] egg names

2015-05-05 Thread Peter Danenberg
Quoth Peter Danenberg on Setting Orange, the 52nd of Discord:
 Now to update all the dependents!

All of the dependent eggs have been updated to use hahn:

  
http://salmonella-linux-x86-64.call-cc.org/stability-4.9.0.x/gcc/linux/x86-64/2015/05/04/salmonella-report/rev-dep-graphs/hahn.html

Hopefully, we shouldn't have any more firewall-woes; etc.

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


Re: [Chicken-users] Problems installing call-with-environment-variables

2015-05-03 Thread Peter Danenberg
Matt, do you mind running a chicken-install -s cock separately and see
if it solves the installation-problem?

I've done some work recently but haven't updated its dependents to
specify the latest version.

 Really hate that name btw, very embarrassing to be working with a
 young female co-worker and have to maneuver around saying the name
 out loud, reflects very poorly on Chicken Scheme IMHO.

Isn't it a rooster-pun, given Chicken?

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


Re: [Chicken-users] egg names

2015-05-03 Thread Peter Danenberg
 There was an issue recently where a user couldn't install a package
 that dependent on cock but was unable to due to the corporate
 firewall.

That's an aggressive heuristic! Meet Hahn, by the way:

  http://wiki.call-cc.org/eggref/4/hahn

Now to update all the dependents!

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


Re: [Chicken-users] egg names

2015-05-03 Thread Peter Danenberg
 I accidentally replied direct to Peter in my reply to the
 call-with-environment-variables thread.

That's ok, I CC'd the list; I'm talking to Peter, Moritz and Mario
about a rebranding.

Might do a deprecate, fork, rename kind of thing.

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


Re: [Chicken-users] Problems installing call-with-environment-variables

2015-05-03 Thread Peter Danenberg
 I do see this Warning: in toplevel unknown procedure: branches in
 conditional expression differ in the number of results: 

I'll take a look!

 When I re-install call-with-environment-variables it now succeeds but I do
 see this:
 
 sh: cock: command not found cock-utils not installed: not creating
 documentation 

That's benign; mainly informational.

 It's not a big deal, it just felt unprofessional at that moment,
 like I was installing some software written by a 12 year old.

Hmm; maybe it's time for a rebranding.

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


Re: [Chicken-users] error with srfi-19: /usr/lib/chicken/6/locale-posix.so: undefined symbol: C_fixnum_modulo

2012-12-13 Thread Peter Danenberg
I have to completely reinstall Chicken, incidentally, when I start
getting `undefined symbol' errors.

They start cropping up for benign-looking things like srfi-13 symbols;
it's bizarre.

It may be more of a mandelbug than a heisenbug: it appears
chaotically.

 On Thu, Dec 13, 2012 at 07:10:51PM -0300, Hugo Arregui wrote:
  Well, it's finally working!. I just remove the complete chicken
  installation, and then rebuild from zero.
 
 Good to hear!
 
 It's unfortunate we don't know what caused it though, in case
 someone else runs into it again.  Ah well :)
 
 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
 
 ___
 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] error with srfi-19: /usr/lib/chicken/6/locale-posix.so: undefined symbol: C_fixnum_modulo

2012-12-13 Thread Peter Danenberg
Thanks, Peter; I'll keep a log next time.

Quoth Peter Bex on Boomtime, the 55th of The Aftermath:
 On Thu, Dec 13, 2012 at 04:33:17PM -0600, Peter Danenberg wrote:
  I have to completely reinstall Chicken, incidentally, when I start
  getting `undefined symbol' errors.
  
  They start cropping up for benign-looking things like srfi-13 symbols;
  it's bizarre.
  
  It may be more of a mandelbug than a heisenbug: it appears
  chaotically.
 
 Since you get it more often, could you please try to document your
 exact approach the next time it occurs?  OS and Chicken version, plus
 build options would be very nice to know.  Having some notes or a
 log might help us pin down the exact cause and fix it, if possible,
 or at least maybe provide a workaround.
 
 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
 
 ___
 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] Can we make csi login shell ?

2012-11-07 Thread Peter Danenberg
Quoth z_axis on Sweetmorn, the 19th of The Aftermath:
 I feel csi can also be login shell.

Especially given Peter Bex' new scsh-process egg, which mimics the
so-called Scheme-Shell:

  http://wiki.call-cc.org/eggref/4/scsh-process

nothing stops you from issuing:

  chsh -s /usr/local/bin/csi

after editing /etc/shells.

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


Re: [Chicken-users] [ANN] New rest-bind Egg

2012-11-04 Thread Peter Danenberg
Thanks, Andy; you've simultaneously scratched two of my itches with
REST + OAuth. Good work!

 Hi everyone,
 
 I've written an egg that generates scheme wrappers to REST-like HTTP
 APIs. The functionality is not complete yet but I thought I'd put it out
 there in case it's useful to anyone else.
 
 It currently handles building requets as well as writing and reading
 request and response bodies but doesn't handle custom headers in responses.
 
 Comments on the API are welcome!
 
 
 http://wiki.call-cc.org/eggref/4/rest-bind
 
 
 
 Regards,
 @ndy
 
 -- 
 andy...@ashurst.eu.org
 http://www.ashurst.eu.org/
 0x7EBA75FF
 
 
 ___
 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] Egg repo request

2012-09-02 Thread Peter Danenberg
It's as simple as adding release-info and asking someone to update 
egg-locations; see e.g.:

  http://wiki.call-cc.org/releasing-your-egg#github-git

On Sep 2, 2012, at 17:44, Matt Gushee m...@gushee.net wrote:

 Hello, everyone--
 
 Well, I will soon have finished my first real Chicken Egg ... so can someone 
 give me access to the repo, please, so I can publish it? BTW, I'm hosting it 
 on GitHub, if that makes a difference. Thank you!
 
 --
 Matt Gushee
 ___
 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] Egg repo request

2012-09-02 Thread Peter Danenberg
I bug the devs on a regular basis (couple times a month) to update 
egg-locations; stop by #chicken on Freenode for immediate action.

It's true that you need SVN credentials to authenticate in the wiki; ask Mario. 
That doesn't stop you from editing anonymously in the meantime, however.



On Sep 2, 2012, at 18:25, Matt Gushee m...@gushee.net wrote:

 Hi, Peter--
 
 On Sun, Sep 2, 2012 at 6:55 PM, Peter Danenberg p...@roxygen.org wrote:
 It's as simple as adding release-info and asking someone to update 
 egg-locations; see e.g.:
 
   http://wiki.call-cc.org/releasing-your-egg#github-git
 
 
 Yes, I read that. But I thought that, since I will be releasing 1 or 2 more 
 eggs in the near future, I thought maybe I should have access to update the 
 info myself. Plus the fact that I plan to provide documentation--don't I need 
 to be granted wiki access (~= repo access ?) for that?
 
 --
 Matt Gushee
 ___
 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] ANN: lazy-seq, a port of Clojure's lazy sequence API

2012-06-03 Thread Peter Danenberg
Quoth Alex Shinn on Prickle-Prickle, the 8th of Confusion:
 Now, if we have a whole program or library which consistently uses
 lazy streams instead of lists, we can import srfi-41 renaming all
 the stream-* bindings by removing the stream- prefix.

Interesting idea; the attached program will, however, reliably cause
Chicken to SIGSEGV.
(require-library srfi-41)

(import
 (rename srfi-41
 (stream? list?)
 (stream-pair? pair?)
 (stream-null? null?)
 (stream-occupied? occupied?)
 (stream-null null)
 (stream-cons cons)
 (stream-lambda lambda)
 (stream-car car)
 (stream-cdr cdr)
 (stream-of constantly)
 (stream-let let)
 (stream-match match)
 (stream-append append)
 (stream-concat concat)
 (stream-drop drop)
 (stream-drop-while drop-while)
 (stream-filter filter)
 (stream-fold fold)
 (stream-for-each for-each)
 (stream-map map)
 (stream-from from)
 (stream-iterate iterate)
 (stream-length length)
 (stream-range range)
 (stream-ref ref)
 (stream-reverse reverse)
 (stream-scan scan)
 (stream-unfold unfold)
 (stream-unfolds unfolds)
 (stream-zip zip)
 (stream-intersperse intersperse)
 (stream-split split)
 (stream-member member)
 (stream-partition partition)
 (stream-finds finds)
 (stream-find find)
 (stream-remove remove)
 (stream-every every)
 (stream-any any)
 (stream-and and)
 (stream-or or)
 (stream-fold-right fold-right)
 (stream-fold-right-one fold-right-one)
 (stream-assoc assoc)
 (stream-equal? equal?)
 (stream-quick-sort quick-sort)
 (stream-insertion-sort insertion-sort)
 (stream-maximum maximum)
 (stream-minimum minimum)
 (stream-max max)
 (stream-min min)
 (stream-sum sum)
 (odd-numbers-stream odd-numbers)
 (even-numbers-stream even-numbers)
 (cardinal-numbers-stream cardinal-numbers)
 (natural-numbers-stream natural-numbers)
 (prime-numbers-stream prime-numbers)
 (hamming-sequence-stream hamming-sequence)))

(define (factorial n)
  (ref (scan * 1 (from 1))) n)

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


Re: [Chicken-users] ANN: lazy-seq, a port of Clojure's lazy sequence API

2012-06-03 Thread Peter Danenberg
Quoth Alex Shinn on Prickle-Prickle, the 8th of Confusion:
 You mis-matched your parens - it should be:
 
   (define (factorial n)
 (ref (scan * 1 (from 1)) n))
^^^
 
 Presumably you compiled to get a segfault - the interpreter gives an
 arity error.

Interesting; I took the example straight off of the wiki.[1] It gives a
segfault for me in csi, even with the adjusted placement of n.

Footnotes: 
[1]  http://wiki.call-cc.org/eggref/4/srfi-41#examples


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


Re: [Chicken-users] ANN: lazy-seq, a port of Clojure's lazy sequence API

2012-06-03 Thread Peter Danenberg
Quoth Christian Kellermann on Prickle-Prickle, the 8th of Confusion:
 Which version of chicken is this? I get the arity error for both csi
 and compiled version for chicken master.

It's a vanilla 4.7.0:

  λ ~/prg/scm/aima-chicken/ master* chicken -version
  (c)2008-2011 The Chicken Team
  (c)2000-2007 Felix L. Winkelmann
  Version 4.7.0 
  linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
  compiled 2011-08-10 on localhost.localdomain (Linux)

It segfaults on compiled as well as interpreted Chicken; as someone
mentioned in #chicken, by the way, we've been seeing a lot of SEGVs
lately.

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


Re: [Chicken-users] ANN: lazy-seq, a port of Clojure's lazy sequence API

2012-06-02 Thread Peter Danenberg
This is great, Moritz; thanks!

I've missed the transparent laziness of seqs in Scheme, too; I never
use SRFI-41 because of the bizarre parallel-universe SRFI-1 that they
had to create.

In fact, SRFI-41 is a parallel Scheme due to the fundamental things
they had to re-implement: cons, lambda, let, null, match, c.

Stream-cons, stream-lambda, c. are so fucking verbose!

Quoth Moritz Heidkamp on Pungenday, the 7th of Confusion:
 Fellow Chickeneers,
 
 a few weeks ago I (more or less silently) released the lazy-seq egg
 which I hereby retroactively announce to the public. For a bit of
 discussion on why I made it and how it compares to SRFI 41 streams, read
 my blog article about it here:
 http://ceaude.twoticketsplease.de/articles/lazy-sequences-in-scheme.html
 
 Hope it's useful to someone!
 
 Moritz
 
 ___
 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] ANN: FreeTDS egg

2011-05-18 Thread Peter Danenberg
Quoth Felix on Pungenday, the 65th of Discord:
 Absolutely. Thanks for the information, Peter.

Thanks, Felix; I should mention that Peter Bex and I put about 80
hours into it: I provided some plumbing, and Peter improved it (among
other things) with a postgres-like API.

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


[Chicken-users] ANN: FreeTDS egg

2011-05-17 Thread Peter Danenberg
Response Genetics, Inc. [1] funded the development of a FreeTDS egg
for connecting to e.g. MSSQL and Sybase databases:

  http://wiki.call-cc.org/eggref/4/freetds

It's encouraging to see commercial interest in Chicken.


Footnotes: 
[1]  http://www.responsegenetics.com/


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


Re: [Chicken-users] ANN: Test version of new egg release system available

2011-03-30 Thread Peter Danenberg
Quoth Peter Bex on Prickle-Prickle, the 16th of Discord:
 This was done during the Chicken hacking weekend in Cologne, and
 thanks to the further efforts of Mario and Moritz this week, the
 system can now be taken for a test run.

Fantastic work, guys; I wish I would have been at Köln: it sounds like
it was an orgy of rapid development.

Whose responsible for updating egg-locations, by the way: the usual
suspects, or anyone with an svn account?

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


Re: [Chicken-users] Backslash-symbol changed from \ to \\ between 4.5.0 and 4.6.0

2010-10-07 Thread Peter Danenberg
Quoth Felix on Setting Orange, the 61st of Bureaucracy:
 See the manual chaprter Non-standard read syntax - Escapes in
 symbols.

Thanks for adding that, Felix.

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


Re: [Chicken-users] Backslash-symbol changed from \ to \\ between 4.5.0 and 4.6.0

2010-10-06 Thread Peter Danenberg
Quoth Felix on Prickle-Prickle, the 60th of Bureaucracy:
 This change is intentional. `\' is now a (single) escape character.
 The reading of keywords is indeed incomplete, yet.

Ok; is the consensus, then, that I should escape all my backslashes in
symbols with another backslash from 4.6.0 onwards?

I agree with Peter Bex, though, that R5RS seems to be mum on the
matter of backslashes in identifiers; according to 7.1.1 [1], in fact,
these are the only explicitly allowed symbols in addition to letters
and numbers:

! $ %  * / :  =  ? ^ _ ~ + - . @

It might have been presumptuous of me to depend on the 4.5.0
behaviour; but it would be nice, on the other hand, to document the
change somewhere.

Footnotes: 
[1]  
http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.1.1


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


[Chicken-users] Backslash-symbol changed from \ to \\ between 4.5.0 and 4.6.0

2010-10-05 Thread Peter Danenberg
In 4.5.0, this sufficed to create a backslash symbol:

  '\

whereas in 4.6.0, we need:

  '\\

This change screws up a scheme-latex transformer I had written,
unfortunately; can we revert to the old behaviour, or can I revert
locally by using `set-read-syntax!'?

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


Re: [Chicken-users] Backslash-symbol changed from \ to \\ between 4.5.0 and 4.6.0

2010-10-05 Thread Peter Danenberg
Quoth Peter Danenberg on Pungenday, the 59th of Bureaucracy:
 [C]an we revert to the old behaviour, or can I revert locally by
 using `set-read-syntax!'?

Fortunately or unfortunately, this hideous hack suffices to bring back
the 4.5.0 behaviour without permanently modifying the global
read-table:

  (define (call-with-read-syntax char-or-symbol proc thunk)
(let ((old-read-table (copy-read-table (current-read-table
  (dynamic-wind
  (lambda () (void))
  (lambda ()
(set-read-syntax! char-or-symbol proc)
(thunk))
  (lambda () (set! current-read-table
   (lambda () old-read-table))

  ;;; 4.5.0 behaviour: '\ = '\
  (call-with-read-syntax
   #\\
   (lambda (port) '\\)
   (lambda ()
 (with-input-from-string '\\ read)))

  ;;; 4.6.0 behaviour: '\\ = '\
  (with-input-from-string ' read)

I didn't see any mention of this change to the reader in NEWS; was it
intentional?

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


[Chicken-users] Re: couchdb: send-temp-view-request (patch)

2010-05-31 Thread Peter Danenberg
Quoth Moritz Heidkamp on Sweetmorn, the 5th of Confusion:
 very nice, thanks for the patch -- I have applied it to trunk
 and tagged a new release so it show up in the egg repo shortly!

Great; thanks, Moritz! Have you tried deploying Scheme to your CouchDB
view server with couchapp, by the way?

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


[Chicken-users] Re: couchdb: send-temp-view-request (patch)

2010-05-31 Thread Peter Danenberg
Quoth Moritz Heidkamp on Sweetmorn, the 5th of Confusion:
 I don't think you can use Scheme to write couchapps, you'd probably
 need something like Scheme2JS if I am not mistaken.

If you set the language attribute in your design document, couchapp
will happily deploy it:

  
http://groups.google.com/group/couchapp/browse_thread/thread/73f7e8fe4243b41b/6d09352e9b2fa0d5?lnk=raot

Without buying into the whole couchapp framework, it should give you
the ability to write Scheme views in paredit; without having to embed
scheme into JSON strings. It's purely convenience.

I'll give the view server a try and see what I can come up with.

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


[Chicken-users] srfi-27-reference

2010-01-19 Thread Peter Danenberg
After fixing some unbound variables in srfi-27, but after finally
being defeating by some arity errors, I decided to create
srfi-27-reference; which is an unoptimized replacement for srfi-27.


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


[Chicken-users] vector-lib ported to hygienic chicken

2010-01-15 Thread Peter Danenberg
 the
   ;; bounds of a _list_, not a vector.
-  (let ((lst (check-type list? lst 'list-vector)))
-(let-optionals maybe-start+end
-((start 0)
- (end (length lst)))  ; Ugh -- LENGTH
-  (let ((start (check-type nonneg-int? start 'list-vector))
-(end   (check-type nonneg-int? end   'list-vector)))
-((lambda (f)
-   (vector-unfold f (- end start) (list-tail lst start)))
- (lambda (index l)
-   (cond ((null? l)
-  (##sys#error 'list-vector list too short
-   `(list ,lst)
-   `(attempted end ,end)))
- ((pair? l)
-  (values (car l) (cdr l)))
- (else
-  (##sys#not-a-proper-list-error lst 
'list-vector
+  (let*-optionals maybe-start+end
+  ((start 0)
+   (end (length lst)))  ; Ugh -- LENGTH
+(let ((start (check-type nonneg-int? start list-vector))
+  (end   (check-type nonneg-int? end   list-vector)))
+  ((lambda (f)
+ (vector-unfold f (- end start) (list-tail lst start)))
+   (lambda (index l)
+ (cond ((null? l)
+(error list was too short
+   `(list was ,lst)
+   `(attempted end was ,end)
+   `(while calling ,list-vector)))
+   ((pair? l)
+(values (car l) (cdr l)))
+   (else
+;; Make this look as much like what CHECK-TYPE
+;; would report as possible.
+(error erroneous value
+   ;; We want SRFI 1's PROPER-LIST?, but it
+   ;; would be a waste to link all of SRFI
+   ;; 1 to this module for only the single
+   ;; function PROPER-LIST?.
+   (list list? lst)
+   `(while calling
+ ,list-vector
 
 ;;; (REVERSE-LIST-VECTOR list [start end]) - vector
 ;;;   Produce a vector containing the elements in LIST, which must be a
@@ -1244,20 +1332,24 @@
 ;;; This also diverges on circular lists unless, again, LENGTH returns
 ;;; something that makes - bork.
 (define (reverse-list-vector lst . maybe-start+end)
-  (let-optionals maybe-start+end
+  (let*-optionals maybe-start+end
   ((start 0)
(end (length lst)))  ; Ugh -- LENGTH
-(let ((start (check-type nonneg-int? start 'reverse-list-vector))
-  (end   (check-type nonneg-int? end   'reverse-list-vector)))
+(let ((start (check-type nonneg-int? start reverse-list-vector))
+  (end   (check-type nonneg-int? end   reverse-list-vector)))
   ((lambda (f)
  (vector-unfold-right f (- end start) (list-tail lst start)))
(lambda (index l)
  (cond ((null? l)
-(##sys#error 'reverse-list-vector list too short
- `(list ,lst)
- `(attempted end ,end)))
+(error list too short
+   `(list was ,lst)
+   `(attempted end was ,end)
+   `(while calling ,reverse-list-vector)))
((pair? l)
 (values (car l) (cdr l)))
(else
-(##sys#not-a-proper-list-error lst 
'reverse-list-vector
+(error erroneous value
+   (list list? lst)
+   `(while calling ,reverse-list-vector)
 
+)
Index: vector-lib.meta
===
--- vector-lib.meta (revision 17002)
+++ vector-lib.meta (working copy)
@@ -1,10 +1,11 @@
 ;;; vector-lib.meta -*- Hen -*-
 ((egg vector-lib.egg)
- (files vector-lib.scm vector-lib.html vector-lib.setup)
+ (files vector-lib.scm vector-lib.setup TODO)
  (doc-from-wiki)
  (category data)
  (synopsis
-   A port of the reference implementation of SRFI-43 with additions and 
fixes)
+   A port of the reference implementation of SRFI-43)
  (license Artistic)
+ (test-depends test)
  (author
-   Taylor Campbell, with CHICKEN-specific modifications by William S. Annis. 
Adapted to final version and bugs fixed by Zbigniew Szadkowski))
+   Taylor Campbell; ported from scratch to hygienic Chicken with test suite 
by Peter Danenberg.))
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] srfi-63 ported to hygienic chicken

2010-01-15 Thread Peter Danenberg
Quoth Peter Danenberg on Setting Orange, the 15th of Chaos:
 Ported from scratch + test suite

Whoops; slight typo in the test suite.
diff -Naur srfi-63-orig/srfi-63.meta srfi-63-new/srfi-63.meta
--- srfi-63-orig/srfi-63.meta   1969-12-31 16:00:00.0 -0800
+++ srfi-63-new/srfi-63.meta2010-01-15 06:31:56.619694745 -0800
@@ -0,0 +1,10 @@
+((egg srfi-63.egg)
+ (file srfi-63.scm
+   srfe-63.setup
+   TODO
+   tests/run.scm)
+ (category data)
+ (license Artistic)
+ (author Aubrey Jaffer, ported to hygienic Chicken with test suite by Peter 
Danenberg)
+ (synopsis Homogeneous and heterogeneous arrays)
+ (test-depends test))
diff -Naur srfi-63-orig/srfi-63.scm srfi-63-new/srfi-63.scm
--- srfi-63-orig/srfi-63.scm1969-12-31 16:00:00.0 -0800
+++ srfi-63-new/srfi-63.scm 2010-01-15 06:31:56.617695834 -0800
@@ -0,0 +1,561 @@
+array.scm Arrays for Scheme
+; Copyright (C) 2001, 2003, 2005, 2006 Aubrey Jaffer
+;
+;Permission to copy this software, to modify it, to redistribute it,
+;to distribute modified versions, and to use it for any purpose is
+;granted, subject to the following restrictions and understandings.
+;
+;1.  Any copy made of this software must include this copyright notice
+;in full.
+;
+;2.  I have made no warranty or representation that the operation of
+;this software will be error-free, and I am under no obligation to
+;provide any services, by way of maintenance, update, or otherwise.
+;
+;3.  In conjunction with products arising from the use of this
+;material, there shall be no use of my name in any advertising,
+;promotional, or sales literature without prior written consent in
+;each case.
+
+;;@code{(require 'array)} or @code{(require 'srfi-63)}
+;;@ftindex array
+
+;; (require 'record)
+;; (require 'multiarg-apply)
+
+;;; chicken-specific module
+(module
+srfi-63
+(array?
+ equal?
+ array-rank
+ array-dimensions
+ make-array
+ make-shared-array
+ list-array
+ array-list
+ vector-array
+ array-vector
+ array-in-bounds?
+ array-ref
+ array-set!
+ A:floC128b
+ A:floC64b
+ A:floC32b
+ A:floC16b
+ A:floR128b
+ A:floR64b
+ A:floR32b
+ A:floR16b
+ ;; A:floQ128b
+ ;; A:floQ64b
+ ;; A:floQ32b
+ A:fixZ64b
+ A:fixZ32b
+ A:fixZ16b
+ A:fixZ8b
+ A:fixN64b
+ A:fixN32b
+ A:fixN16b
+ A:fixN8b
+ A:bool
+ )
+
+(import scheme chicken)
+
+(use records)
+
+(define array:rtd
+  (make-record-type array
+   '(dimensions
+ scales;list of dimension scales
+ offset;exact integer
+ store ;data
+ )))
+
+(define array:dimensions
+  (let ((dimensions (record-accessor array:rtd 'dimensions)))
+(lambda (array)
+  (cond ((vector? array) (list (vector-length array)))
+   ((string? array) (list (string-length array)))
+   (else (dimensions array))
+
+(define array:scales
+  (let ((scales (record-accessor array:rtd 'scales)))
+(lambda (obj)
+  (cond ((string? obj) '(1))
+   ((vector? obj) '(1))
+   (else (scales obj))
+
+(define array:store
+  (let ((store (record-accessor array:rtd 'store)))
+(lambda (obj)
+  (cond ((string? obj) obj)
+   ((vector? obj) obj)
+   (else (store obj))
+
+(define array:offset
+  (let ((offset (record-accessor array:rtd 'offset)))
+(lambda (obj)
+  (cond ((string? obj) 0)
+   ((vector? obj) 0)
+   (else (offset obj))
+
+(define array:construct
+  (record-constructor array:rtd '(dimensions scales offset store)))
+
+;;@args obj
+;;Returns @code{#t} if the @1 is an array, and @code{#f} if not.
+(define array?
+  (let ((array:array? (record-predicate array:rtd)))
+(lambda (obj) (or (string? obj) (vector? obj) (array:array? obj)
+
+;;@noindent
+;;@emph{Note:} Arrays are not disjoint from other Scheme types.
+;;Vectors and possibly strings also satisfy @code{array?}.
+;;A disjoint array predicate can be written:
+;;
+;;@example
+;;(define (strict-array? obj)
+;;  (and (array? obj) (not (string? obj)) (not (vector? obj
+;;@end example
+
+;;@body
+;;Returns @code{#t} if @1 and @2 have the same rank and dimensions and the
+;;corresponding elements of @1 and @2 are @code{equal?}.
+
+;;@body
+;;@0 recursively compares the contents of pairs, vectors, strings, and
+;;@emph{arrays}, applying @code{eqv?} on other objects such as numbers
+;;and symbols.  A rule of thumb is that objects are generally @0 if
+;;they print the same.  @0 may fail to terminate if its arguments are
+;;circular data structures.
+;;
+;;@example
+;;(equal? 'a 'a) @result{}  #t
+;;(equal? '(a) '(a)) @result{}  #t
+;;(equal? '(a (b) c)
+;;'(a (b) c))@result{}  #t
+;;(equal? abc abc)   @result{}  #t
+;;(equal? 2 2)   @result{}  #t
+;;(equal? (make-vector 5 'a)
+;;(make-vector 5 'a))@result{}  #t

Re: [Chicken-users] vector-lib ported to hygienic chicken

2010-01-15 Thread Peter Danenberg
 The new test suite is good, but the patch is mostly noise and reverts
 some changes that were made for Chicken.

You're right; I implemented it from scratch when I didn't see srfi-43
in the repo (before I realized it had a synonym). I was pleased,
though, that it basically worked out-of-the-box.


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


[Chicken-users] utf8 and scsh-regexp

2009-12-14 Thread Peter Danenberg
Using 3.4.0, the following fails:

  (require-extension syntax-case scsh-regexp utf8)
  (regexp-substitute/global #f ä ä ae)

It works, however, without utf8; the problem is, I need to do
unicode-aware string-list decomposition.

Is there a quick fix to scsh-regexp by, say, making it aware of the
utf8?


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


Re: [Chicken-users] Questions about modules

2009-06-15 Thread Peter Danenberg
 I've noticed that some identifiers are available without importing
 anything.  Is there a list of these identifiers?

Take a look at:

  http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.1.1

especially under the nonterminals syntactic keyword and expression
keyword.


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


[Chicken-users] utf8/url interaction: SEGV

2009-04-21 Thread Peter Danenberg
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?


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


Re: [Chicken-users] SRFI-27 and 3.5.0

2009-02-28 Thread Peter Danenberg
Quoth Jim Ursetto on Boomtime, the 57th of Chaos:
 The patch is attached below, and I have also applied it to the
 repository.

Should we just pull it down from:

   https://galinha.ucpel.tche.br/svn/chicken-eggs/chicken/branches/chicken-3/

or are you going to make a release?


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


Re: [Chicken-users] Segmentation Fault in C_mutate on Chicken 3.5.0 (OpenBSD i386)

2009-02-26 Thread Peter Danenberg
Quoth Taylor Venable on Boomtime, the 57th of Chaos:
 Happily, this seems to have been fixed by reverting the SRFI-18
 implementation in devel release 3.5.1 - thanks!

Christ; no wonder SRFI-18 is in core: its reach is almost ubiquitous.


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


[Chicken-users] SRFI-18 and 3.5.0

2009-02-25 Thread Peter Danenberg
SRFI-18 seems to be broken in 3.5.0; the following produces a
segfault:

(require-extension srfi-18)
(thread-join! (thread-start! (lambda () 'foo)))

Disassociating thread creation and activation with MAKE-THREAD has the
same effect.

THREAD-SLEEP! also diregards the timeout and returns immediately (when
THREAD-JOIN! doesn't segfault).

I'd submit a bug, but trac.callcc.org is down.


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


[Chicken-users] SRFI-27 and 3.5.0

2009-02-25 Thread Peter Danenberg
SRFI-27 seems to be broken in 3.5.0; doing (require-extension srfi-27)
results in:

Error: call of non-procedure: #unbound value


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