Re: define-typed: checking values on proc entry and exit

2024-05-11 Thread Vivien Kraus
nstead of (ret? res). What do you think? Best regards, Vivien

Re: [ANN] Guile Hoot 0.4.1 released!

2024-04-30 Thread Vivien Kraus
explain how we can make such a pure module, but which exports something? I tried to add #:pure to a module of mine, and it complains that I’m calling define… Thank you for the release anyway. Vivien

Re: guile or scheme used to implement make or meson

2023-09-12 Thread Vivien Kraus
lement make in guile than do a whole new build system. Vivien

Re: comparator in match pattern

2023-06-28 Thread Vivien Kraus
Le mercredi 28 juin 2023 à 17:10 +0200, Damien Mattei a écrit : > Vivien , your solution is not working: > > (let ((/ 42)) >   (match (list 1 42) >     ((c (? (cut equal? <> /))) > c))) > ;;; :30:2: warning: wrong number of arguments to `# (lambda () (lambda-case

Re: comparator in match pattern

2023-06-28 Thread Vivien Kraus
Le mercredi 28 juin 2023 à 15:51 +0200, Vivien Kraus a écrit : > So, you want to match against the / symbol, not the value of a > variable > named /? Sorry, I misread. You actually have a variable named /. So this code is the only relevant one: (use-modules (ice-9 match) (srfi srfi-

Re: comparator in match pattern

2023-06-28 Thread Vivien Kraus
able (why not), you can do: (use-modules (srfi srfi-26)) (let ((/ 42))  (match (list 1 42)  ((c (? (cut equal? <> /)))  c))) In any case, no need to write "list" in the pattern. Vivien

Re: comparator in match pattern

2023-06-28 Thread Vivien Kraus
== something) would be translated as (? (cut equal? <> something)) if you import srfi-26 for cut (or cute, if something needs to be evaluated once). Vivien

Re: overload a procedure

2023-02-19 Thread Vivien Kraus
43)) (define-method (+ (a ) (b )) (vector-append a b)) (+ #(1 2 3) #(4 5)) Vivien

Re: relocatable guile on windows

2022-12-04 Thread Vivien Kraus
Native-Windows-Support.html I hope this can help make your work more maintainable. Best regards, Vivien

Re: Fibers web server: use multiple server sockets

2022-11-02 Thread Vivien Kraus
fully up? As far as I understand, there is no such thing with shepherd. As for systemd, this [1] is an interesting read and it shows that it’s up to me to write my server such that it can adapt to dynamic configuration changes. [1] https://systemd.io/NETWORK_ONLINE/ Vivien

Fibers web server: use multiple server sockets

2022-11-02 Thread Vivien Kraus
do it myself? Are you OK with GOOPS? Do you prefer parameters? Do you have other options? Best regards, Vivien

Re: Does the eval-when example work?

2022-10-21 Thread Vivien Kraus
Le jeudi 20 octobre 2022 à 10:53 +0200, Maxime Devos a écrit : >  If so, this is not exactly what I am looking for. I am looking for a > > way to run the (date) form during the compilation phase, and save > > the > > date to the compilation unit so that it does not change. Is this > > possible? >

Does the eval-when example work?

2022-10-19 Thread Vivien Kraus
is not exactly what I am looking for. I am looking for a way to run the (date) form during the compilation phase, and save the date to the compilation unit so that it does not change. Is this possible? Best regards, Vivien

Re: Some help needed to use curl lib to download binary file

2022-07-29 Thread Vivien Kraus
If get-file returns a string, you can do: (call-with-output-file "download.zip"   (lambda (port)     (put-string port (get-file get-file-link)))   #:encoding "ISO-8859-1") Best regards, Vivien

Re: [ANN] nyacc 1.07.0 released

2022-05-30 Thread Vivien Kraus
nah.nongnu.org/nyacc.git Could you update it in guix also? Best regards, Vivien

Re: Module dependencies

2022-03-19 Thread Vivien Kraus
Hello Jérémy, Le samedi 19 mars 2022 à 11:10 +0100, Jérémy Korwin-Zmijowski a écrit : > I would like to visualize all the modules a given module depend on. Guix seems to do it in (guix modules), see extract-dependencies, but I’m not sure it’s very robust.

Re: Exception handling - symbol for encoding exception type?

2022-03-08 Thread Vivien Kraus
omposed of a new message and an existing exception, and no information will be lost. More generally, don’t bother with a new exception type until you need it to do something useful. Of course, this is my opinion, others may view the problem differently. Vivien signature.asc Description: This is a digitally signed message part

Re: timestamp

2022-02-12 Thread Vivien
e-time time-utc 0 1607841890))  ;; Zero for nanoseconds comes before the seconds Vivien

Re: Newbie thoughts on Guile Hall + Guix

2022-02-10 Thread Vivien
me days or weeks to understand dynamic wind, handling exceptions, and prompts. The continuation concept doesn’t exist in popular programming languages, so it’s hard to make one of these quick hands-on guide "You did this in python, do that in guile". I’m not sure there’s an easy solution though. Vivien

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Vivien Kraus
right track to let us use C libraries without writing a single line of C code. Vivien

Re: Newbie thoughts on Guile Hall + Guix

2022-02-05 Thread Vivien
igure.ac and Makefile.am, for instance. It shouldn’t be too hard for hall to support gettext: hall already knows the list of source files, so it can generate POTFILES.in. We would just need to specify the LINGUAS list in hall.scm and it could do the rest. As a conclusion, hall fits exactly what I expect it to do, and it’s almost always a pleasure to work with, but I wish it were more functional (not keeping hall.scm, configure.ac and Makefile.am as state) and I think it should support gettext natively. Vivien

Re: Fibers 1.1.0 released

2022-01-31 Thread Vivien
es and suspendable i/o out of the box; to me these two features make little sense if there’s no Fibers on top of that. What do you think? Best regards, Vivien

Questions about PEG parsing

2021-10-23 Thread Vivien Kraus via General Guile related discussions
) ((significant digits ...) (produce (+ (* sum 10) significant) digits))) (peg:tree (match-pattern NATURAL "256")) Are there downsides? Maybe the production should be pure, if the result gets memoized? Best regards, Vivien

Trying to fix propagated-inputs in Guix for Guile libraries

2021-10-14 Thread Vivien Kraus via General Guile related discussions
.go files? Does guile even works if there’s no corresponding source code for a compiled module? Vivien

Re: Exception handler installed when handling a continuable exception

2021-09-30 Thread Vivien Kraus via General Guile related discussions
Hello, I finally figured it out: Le mercredi 25 août 2021 à 21:08 +0200, Maxime Devos a écrit : > This also happens without #:continuable?. > Here's a simpler test case: > > (with-exception-handler > (lambda (exn) > (catch #t > (lambda () (error "to be caught")) > (lambda e (pk

Re: foreign objects and the garbage collector

2021-09-04 Thread Vivien Kraus via General Guile related discussions
ded. That being said, make-pointer (from (system foreign-library)) is probably what you are expecting. It should work with gps_close. Best regards, Vivien

Pattern matching: what does (= f pat) do?

2021-08-10 Thread Vivien Kraus via General Guile related discussions
ield of an object. Based on the given example, and some experiments on my part, I think that the description should be: (= f pat) applies f, and matches pat in the result Am I correct? Vivien

Exception handler installed when handling a continuable exception

2021-08-09 Thread Vivien Kraus via General Guile related discussions
-port) (raise-exception (make-exception-with-message "What should I say?") #:continuable? #t Is this a bug? Best regards, Vivien

Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-04 Thread Vivien Kraus via General Guile related discussions
c style issue, but > we could certainly expand it for more general formatting. I did not notice because it is not in master yet. But that’s good news, at least for guix now. Vivien

Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-04 Thread Vivien Kraus via General Guile related discussions
Ludovic Courtès writes: >> I am trying to use the guile reader to read scheme comments, in >> addition to the syntax elements. I know with syntax-source where a >> syntax object starts, and I can know where it ends by using a spying >> soft port and re-reading it. However, the #\return ambiguity

Re: Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-04 Thread Vivien Kraus via General Guile related discussions
Keith Wright writes: > Well, I think it is too special interest and > way too damn big for a general user discussion list. I am sorry, I made a double mistake by send it here and sending it inline, because I did not realize that updating gnulib would be so huge. I suggest that we move to the bug

Syntax locations are ambiguous: can we track source 'offset' and 'length'?

2021-08-02 Thread Vivien Kraus via General Guile related discussions
r this is relevant to read-syntax. So, is there a way to track source offset and length for syntax objects? Best regards, Vivien

Re: Demanding Interoperability to Strengthen the Free (Libre) Web: Introducing DISFLUID

2021-08-02 Thread Vivien Kraus via General Guile related discussions
er one, I don’t have a 1.0 release yet). Since that code will most likely be run on web servers, have you considered releasing it under the AGPL? Best regards, Vivien

Re: Demanding Interoperability to Strengthen the Free (Libre) Web: Introducing DISFLUID

2021-07-31 Thread Vivien Kraus via General Guile related discussions
Hello, Le samedi 31 juillet 2021 à 10:58 +0200, Dr. Arne Babenhauserheide a écrit : > Maybe some hacks I needed for my (unfinished) implementation of the > downloadmesh can be useful to you: The "missing headers" were missing in Guile, but I added them for my server (I did it with declare-header!

Re: Demanding Interoperability to Strengthen the Free (Libre) Web: Introducing DISFLUID

2021-07-31 Thread Vivien Kraus via General Guile related discussions
Hello, Le samedi 31 juillet 2021 à 14:14 +0800, Nala Ginrut a écrit : > Is it possible to cooperate with a modern web framework? It seems it > doesn't require JS and browser, so I don't know if http can still > work as usual. It is not tied to a particular framework, the specification is based on

Demanding Interoperability to Strengthen the Free (Libre) Web: Introducing DISFLUID

2021-07-30 Thread Vivien Kraus via General Guile related discussions
Hello Guile users, I’m writing a Solid server in guile: https://disfluid.planete-kraus.eu/ https://labo.planete-kraus.eu/webid-oidc.git/ The main point of Solid [1] is to separate the web applications from the data they use in an interoperable way. It’s in the spirit of Activitypub, but closer

(web client) with suspendable ports

2021-07-15 Thread Vivien Kraus via General Guile related discussions
should be non-blocking too. Or is there a way to do this that I missed? Best regards, Vivien

Re: re-writing algorithms in Guile

2021-06-29 Thread Vivien Kraus via General Guile related discussions
Le mardi 29 juin 2021 à 09:56 +0200, to...@tuxteam.de a écrit : > On Mon, Jun 28, 2021 at 04:38:50PM -0500, Tim Meehan wrote: > > Say for instance, I have found an algorithm for scalar function > > minimization on a website, written in C. It is posted with a > license for > > use. If I write someth

Re: re-writing algorithms in Guile

2021-06-28 Thread Vivien Kraus via General Guile related discussions
Hello, Le mardi 29 juin 2021 à 04:09 +, Nate Rosenbloom a écrit : > since the algorithm itself > stays the same. This reason is not stated in the Stack Exchange post, and I believe it’s inaccurate (although, I am not a lawyer either). I think the reason is that you are reading the original im

Re: Python-on-guile

2021-04-25 Thread Vivien Kraus via General Guile related discussions
Hello, Le dimanche 25 avril 2021 à 12:54 +0200, Dr. Arne Babenhauserheide a écrit : > (next frontier: compete with math that’s implemented via numpy — you > can find RPython implementations of the basics of numpy in the > pypy-sources: > https://foss.heptapod.net/pypy/pypy/-/tree/branch/default/py

Are char* and signed char* compatible (SCM_BYTEVECTOR_CONTENTS)?

2021-02-26 Thread Vivien Kraus via General Guile related discussions
Hello, I’m trying to use a bytevector from C. 1. According to an example in the manual, SCM_BYTEVECTOR_CONTENTS can be assigned to a char*. 2. Also from the manual, it is a signed char*. 3. I've found this question online saying they are not compatible ( https://stackoverflow.com/questions/1276

A Web client with cache for guile!

2021-02-21 Thread Vivien Kraus via General Guile related discussions
. Because of the recent announce of the guile potluck on this list, combined with the recent release of guile-oauth, I thought there could be some shared interest for this subject. Best regards, Vivien