Guile cannot find libcurl

2024-01-31 Thread Sascha Ziemann
I tried to install akku, but Guile fails to load libcurl. I have no idea why. Can anybody imagine what is going wrong here? $ akku init nix WARNING: (guile-user): imported module (rnrs) overrides core binding `newline' WARNING: (guile-user): imported module (rnrs) overrides core binding `display'

Re: Does declaration order matter in guile?

2023-02-13 Thread Sascha Ziemann
Am So., 12. Feb. 2023 um 20:52 Uhr schrieb Taylan Kammer : > > On 12.02.2023 19:46, wolf wrote: > > > 1. When does order matter? What is going on here? > > The order matters in this case because the SRFI-9 implementation in Guile > defines > syntax (macros) rather than just variables bound to proc

Re: fun with wayland

2023-02-05 Thread Sascha Ziemann
Am So., 5. Feb. 2023 um 20:05 Uhr schrieb Matt Wette : > > 2) I am using my proposed mmap wrapper for Guile, in C, to create a file- > mapped shared drawing. What is a "file-mapped shared drawing"?

Re: Static site generator

2023-01-13 Thread Sascha Ziemann
Am Fr., 13. Jan. 2023 um 18:33 Uhr schrieb James Crake-Merani : > > I was wondering if you guys are aware of any static site generators > written in Guile. I'm looking for something that can be extended in > Guile so I can write my own code for it in Scheme. > All you need is quasiquote, unquote a

Re: bytevector seems to be missing in Guile

2023-01-08 Thread Sascha Ziemann
Am So., 8. Jan. 2023 um 01:21 Uhr schrieb Robby Zambito : > > In R7RS, the bytevector constructor is exported by (scheme base) (not (scheme > bytevector)). It seems like the confusion is caused by --r7rs not evaluating > in an environment that provides (scheme base). > Thanks, this helps! But q

bytevector seems to be missing in Guile

2023-01-07 Thread Sascha Ziemann
Is the procedure "bytevector" missing in Guile? I tried this: guile --r7rs -c '(write (bytevector 1 2 3))' R7RS defines it on page 49.

Re: list vs vector

2022-12-29 Thread Sascha Ziemann
> Clearly we're spending way much time in the GC with the vxml variant. Thanks a lot! This is a nice tutorial for statprof. What you have found out, was already my guess but I had no proof. The VXML version does not utilize the fact that the nodes are already destructured. During each visit of a

list vs vector

2022-12-28 Thread Sascha Ziemann
I spent my Christmas vacation playing with XML and tree traversal. And I have observed some strange timings, while measuring the execution time of different algorithms. My test file is the XCB XML schema: https://cgit.freedesktop.org/xcb/proto/plain/src/xcb.xsd And my test program is this: https

Re: bytevector-string-ref

2022-12-22 Thread Sascha Ziemann
> > (define str "Hello, World!") > > (define bv (string->utf8 str)) > > (define sa (make-shared-array bv (lambda (i) (list (+ i 7))) '(0 4))) > > I think this should be > > (define sa (make-shared-array bv (lambda (i) (list (+ i 7))) 4)) This seems to be the same (equal?): (make-shared-array bv

Re: bytevector-string-ref

2022-12-21 Thread Sascha Ziemann
> Is that related to "shared arrays"? This seems to be even more general (the > affine part being the offset of the slice). Thanks for the hint. I was not aware of them. But I am struggling to use them. This does not work: (define str "Hello, World!") (define bv (string->utf8 str)) (define sa (m

Re: bytevector-string-ref

2022-12-18 Thread Sascha Ziemann
Maybe having a bytevector-slice-ref with shared memory would be more flexible. The partial usage of a bytevector as a string is just one use case. There may be others.

bytevector-string-ref

2022-12-18 Thread Sascha Ziemann
I am wondering if something like bytevector-string-ref is missing in the API. Or is there any other way to extract a string from a byte vector, without copying the data twice?

how to get read-byte

2012-01-06 Thread Sascha Ziemann
I spend some time searching through the docs but I can not find a way to get read-byte as defined by SRFI-56. Is there a way in Guile?

Re: Web services on guile

2010-05-23 Thread Sascha Ziemann
2010/5/22 Romel R. Sandoval Palomo : > I think I have four alternatives: > >  1. Keep the web service consumption part of the client in C using gSOAP >  2. Write a binding of gSOAP library for Guile >  3. Write a web services library for Guile from cero >  4. Forget about PHP and use ONC RPC I fou

How to format exact rationals?

2010-05-21 Thread Sascha Ziemann
Is this the intended behavior for exact rationals? guile> (format #f "~f" (/ 1 3)) FORMAT: error with call: (format #f "~f<===" ===>1/3 ) illegal character `/' in number->string If so how to format them?