Re: Hashing a procedure object reliably

2025-04-11 Thread Olivier Dion
On Fri, 11 Apr 2025, Vivien Kraus wrote: > Hello, > > Le vendredi 11 avril 2025 à 09:49 -0400, Olivier Dion a écrit : >> But some fields seems to >> not be taken into account and you will end up with fetching >> substitute >> in the store.  I want to avoid th

Hashing a procedure object reliably

2025-04-11 Thread Olivier Dion
of a package field and ask to build it, usually it will rebuild it. But some fields seems to not be taken into account and you will end up with fetching substitute in the store. I want to avoid this element of surprise in my case. Thanks, Olivier -- Olivier Dion oldiob.ca

Embedding stuff in ELF section of compiled module

2024-11-09 Thread Olivier Dion
re any way for adding section to the compiled ELF, something along like: (embed-bytevector ".my_section" #vu8(bytes ...)) If not, I wonder if this is something that could be appreciated for other users as well? Thanks, Olivier -- Olivier Dion EfficiOS Inc. https://www.efficios.com

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

2024-05-10 Thread Olivier Dion
--cut here---end--->8--- but I found your format to be easier to read. -- Olivier Dion oldiob.ca

Re: Question about handling SIGINT properly in Guile

2024-04-13 Thread Olivier Dion
ce. Typically, before the process get re-scheduled or after a system call. So sending a signal is not immediate. Furthermore, Guile also queues the signals and deliver them to threads with async marks I think. -- Olivier Dion oldiob.ca

Re: Writing on Guile optimization: what are anon #x... functions?

2024-04-05 Thread Olivier Dion
On Sat, 06 Apr 2024, Artyom Bologov wrote: > Hi y'all, > > I'm making a blog post on Guile optimization gotchas I learned. But I > find that one piece of the picture is missing there: anon functions in > the profiler output. Like "anon #x117f408" Anonymous, i

Re: Quiet compilation for scripting

2024-03-15 Thread Olivier Dion
On Fri, 15 Mar 2024, Keith Wright wrote: > Olivier Dion writes: > >>>> Like the warning says, you ought to either use the GUILE_AUTO_COMPILE >>>> environment variable or use the `--no-auto-compile' switch. >>>> Unfortunately, there is no `--quiet&#x

Re: Quiet compilation for scripting

2024-03-15 Thread Olivier Dion
On Fri, 15 Mar 2024, wrote: > On Fri, Mar 15, 2024 at 01:31:43PM -0400, Olivier Dion wrote: >> On Fri, 15 Mar 2024, ks...@sent.com wrote: >> > I am in the process of rewriting in Guile a script that I use >> > regularly. Running Guile 3.0.9, when I execute a file con

Re: Quiet compilation for scripting

2024-03-15 Thread Olivier Dion
lt;---cut here---end--->8--- Note the usage of `--no-auto-compile' which will prevent Guile from auto-compiling file, while still loading already compiled modules. [...] -- Olivier Dion oldiob.ca

Re: Understanding `symbol??` macro from okmij.org

2024-03-14 Thread Olivier Dion
heme standards and implementations contain syntax-case. Ah, and I though that syntax-rules was always written in term of syntax-case. I see. Thank you! -- Olivier Dion oldiob.ca

Re: Understanding `symbol??` macro from okmij.org

2024-03-14 Thread Olivier Dion
't understand how `abracadabra` > helps with that, or why it helps, to pass something undefined. > > Can someone help me understand, what is going on there? > > Actually I am trying to understand the whole page, and I got there while > looking > for a good `assert` m

Re: Is it possible to write program only in Guile?

2023-10-18 Thread Olivier Dion
. less than great. > > But other than that I am using the same shebang. No auto-compile, but you still compile your file in your project! I just avoid the noisy warnings, although they are sometime useful. -- Olivier Dion

Re: Is it possible to write program only in Guile?

2023-10-18 Thread Olivier Dion
mething? I always have this shebang now in my Guile scripts (might not work on fedora because the guile binary is guile3): #!/bin/sh #-*-Scheme-*- exec guile --no-auto-compile -e main -s "$0" "$@" !# -- Olivier Dion

Re: Is it possible to write program only in Guile?

2023-10-18 Thread Olivier Dion
, the second way is the best way IMHO. NOTE: I've been mentioning C here because C is actually the only runtime that has a well defined and not insaned ABI. Using FFI with C++ is simply not possible and you will need something like SWIG. Regards, old -- Olivier Dion

Re: guile or scheme used to implement make or meson

2023-09-12 Thread Olivier Dion
but it shows that it is possible to make an entire build system with only Guile core. -- Olivier Dion oldiob.dev

Re: guile or scheme used to implement make or meson

2023-09-12 Thread Olivier Dion
ic and useful is to make a build system in Guile where the DSL that replaces Makefiles is Scheme. -- Olivier Dion oldiob.dev

Re: readlink system calls

2023-08-22 Thread Olivier Dion
On Tue, 22 Aug 2023, Christopher Baines wrote: > When looking at strace for various Guile things, I'm seeing a lot of > readlink system calls for directories in the load path, e.g. Is this not more a side effect of using Guix (the GNU store) than Guile itself? -- Olivier Dion oldiob.dev

Re: srfi64 test group

2023-08-17 Thread Olivier Dion
ception. IIRC, test-group must be in between a test-begin/test-end pair forms? --8<---cut here---start->8--- (use-modules (srfi srfi-64)) (test-begin "bar") (test-group "foo" (test-assert #t)) (test-end "bar") --8<--

Re: What's to be considered on-topic for Guile mailing lists? (Re: The message chain with an happy ending)

2023-07-05 Thread Olivier Dion
work on Guile core itself, myself included. However, I find it difficult to contribute in general and to have feedback. -- Olivier Dion oldiob.dev

Re: Recommended project structure

2023-06-09 Thread Olivier Dion via General Guile related discussions
On Fri, 09 Jun 2023, wolf wrote: > On 2023-06-08 23:33:47 -0400, Olivier Dion wrote: >> On Fri, 09 Jun 2023, wolf wrote: > That is pretty embarrassing mistake on my part, the link is: > https://www.erikedrosa.com/2017/10/29/guile-projects-with-autotools.html > . I had a quic

Re: Recommended project structure

2023-06-08 Thread Olivier Dion via General Guile related discussions
d reading on this topic? I do not see any link in your message so I can not say. -- Olivier Dion oldiob.dev

Re: Static site generator

2023-01-13 Thread Olivier Dion via General Guile related discussions
Artanis but to my knowledge this is only for dynamic websites if I'm not > mistaken. Haunt. Blog examples: - Mine : https://oldiob.dev/ - David Thompson : https://dthompson.us/ and many others use it. -- Olivier Dion oldiob.dev

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-08 Thread Olivier Dion via General Guile related discussions
the guile in the previous environment, which does not have its load path set correctly I think! -- Olivier Dion oldiob.dev

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-08 Thread Olivier Dion via General Guile related discussions
On Sun, 08 Jan 2023, Zelphir Kaltstahl wrote: > On 12/31/22 21:31, Olivier Dion wrote: >> On Sat, 31 Dec 2022, Zelphir Kaltstahl wrote: >> >>> Maybe I can already make use of it in coming AoC puzzles. >> Any sort of feeback is welcome! > > Hello Olivier!

Re: guile-fibers timerfd_create bug (was: Re: [ANN] Guile-Parallel 1.0.0 released)

2023-01-03 Thread Olivier Dion via General Guile related discussions
c in the manual,but nothing on Mac > os,timerfd_create seems to be part of Gnu C library.But you should know > that better than me. timerfd is Linux only as far I as I know. -- Olivier Dion oldiob.dev

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-03 Thread Olivier Dion via General Guile related discussions
On Tue, 03 Jan 2023, Damien Mattei wrote: > on Mac os i have (only) one error: > In procedure dlsym: Error resolving "timerfd_create": "dlsym(RTLD_DEFAULT, > timerfd_create): symbol not found" I can replace timerfd with timer_create(). It's POSIX compliant. -- Olivier Dion oldiob.dev

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-02 Thread Olivier Dion via General Guile related discussions
On Mon, 02 Jan 2023, Olivier Dion via General Guile related discussions wrote: > On Mon, 02 Jan 2023, Greg Troxel wrote: >> Maxime Devos writes: >> >>>> epoll is as I understand it linux only so that's not a reasonable >>>> dependency. fibers

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-02 Thread Olivier Dion via General Guile related discussions
ee on Guix, libev has relative timers. I don't know if it's portable like libevent though. Will look at both thanks! -- Olivier Dion oldiob.dev

Re: [ANN] Guile-Parallel 1.0.0 released

2023-01-02 Thread Olivier Dion via General Guile related discussions
On Mon, 02 Jan 2023, Greg Troxel wrote: > O > Olivier Dion via General Guile related discussions > writes: > >> I haven't use fibers a lot, but I think that if you ever need to handle >> asynchronous I/O, for now you should stick with fibers. Also, fibers >>

Re: [ANN] Guile-Parallel 1.0.0 released

2022-12-31 Thread Olivier Dion via General Guile related discussions
r from my benchmarks. -- Olivier Dion oldiob.dev

[ANN] Guile-Parallel 1.0.0 released

2022-12-30 Thread Olivier Dion via General Guile related discussions
l. Regards, old -- Olivier Dion oldiob.dev

Re: interfacing C and guile

2022-12-30 Thread Olivier Dion via General Guile related discussions
ry (cfunc 3 27 (string->pointer "toto")). It's available in the module (system foreign). -- Olivier Dion oldiob.dev

Re: list vs vector

2022-12-28 Thread Olivier Dion via General Guile related discussions
Sample count: 920 Total time: 33.514138568 seconds (10.50369987 seconds in GC) --8<---cut here---end--->8--- Clearly we're spending way much time in the GC with the vxml variant. Why? I don't know :-( -- Olivier Dion oldiob.dev

[RFC PATCH 0/2] Strings interpolation

2022-12-10 Thread Olivier Dion
; (quote buz)) #"@me@@gnu.org" -> (format #f "~a...@gnu.org" me) #"me@@gnu.org" -> "m...@gnu.org" #"@@no-suffix@" -> "@weird" #"@@suffix@@" -> "@weird@" Olivier dion (2): Add reader extension for interpolat

[RFC PATCH 1/2] Add reader extension for interpolated strings.

2022-12-10 Thread Olivier Dion
From: Olivier dion Interpolate strings of the form #"The string @(eval this)". When no interpolation is required, simply return the raw string. For example, #"foo" will return "foo". When interpolation is required, return an expression that format the string

[RFC PATCH 2/2] Add tests for strings interpolation reader extension.

2022-12-10 Thread Olivier Dion
From: Olivier dion * test-suite/tests/reader.test: Add the tests. --- test-suite/tests/reader.test | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test index 27daf6106..fb31575dd 100644 --- a/test-suite/tests

Looking for a computation benchmark in Guile

2022-11-10 Thread Olivier Dion via General Guile related discussions
If so a link to them or an implementation in Guile would be awesome. If you have a scenario like that, please contact me! -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-11-10 Thread Olivier Dion via General Guile related discussions
;s mutex. In some very rare cases, ice-9 futures deadlock because of it. Maybe it's not the case here I haven't read the code you've mentioned. Just letting you know. -- Olivier Dion oldiob.dev

Re: escaping from a recursive call

2022-11-10 Thread Olivier Dion via General Guile related discussions
w version and update all the > github and documentation online.Soon i hope... I haven't tackle your minterm problem directly here, but from a glimpse of it, I don't see which part can be parallelize? Furthermore, you have a global state `err` that will impose penalty for sure. Ma

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
ol Mechanisms > Prompts or here <https://www.gnu.org/software/guile/manual/html_node/Prompts.html>. -- Olivier Dion oldiob.dev

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
t here---end--->8--- There's probably other way of doing so that I'm not aware of. -- Olivier Dion oldiob.dev

Re: escaping from a recursive call

2022-11-09 Thread Olivier Dion via General Guile related discussions
(cons n (loop (1- n (pk (foo 5)) (pk (foo 10)) --8<---cut here---end--->8--- -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-10-13 Thread Olivier Dion via General Guile related discussions
. running with (iota 1) I don't see any synchornization issue also. -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-10-13 Thread Olivier Dion via General Guile related discussions
(when (< i rest) (let ((i (+ i base))) (vector-set! output i (proc (vector-ref input i (lp (1+ i) output)) --8<---cut here---end--->8--- -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-10-13 Thread Olivier Dion via General Guile related discussions
On Thu, 13 Oct 2022, Damien Mattei wrote: > i trying to use your code but it seems there is a ) mismatch > somewhere? Right there's a missing ')' a the end to close the procedure, sorry about that. -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-10-13 Thread Olivier Dion via General Guile related discussions
mare and i do not want to have this in functional > programming. You're free to use my example of `par-map-vector` and tweak it to your needs. But maybe it's time for a `guile-parallel` for fast high level parallel. If others are interested in that, I can make one. -- Olivier Dion oldiob.dev

Re: map-par slower than map

2022-10-12 Thread Olivier Dion via General Guile related discussions
base (- (vector-length input) rest))) (let lp ((i 0)) (when (< i rest) (let ((i (+ i base))) (vector-set! output i (proc (vector-ref input i (lp (1+ i) output)) --8<---cut here---end--->8--- -- Olivier Dion oldiob.dev

Re: http-request bearer token syntax for Twitter v2 api

2022-10-12 Thread Olivier Dion via General Guile related discussions
" --8<---cut here-------end--->8--- -- Olivier Dion oldiob.dev

exit-hook never executed

2022-09-22 Thread Olivier Dion via General Guile related discussions
body* ...) fini)) --8<---cut here---end--->8--- But it would be nice to a have a hook for finalization like `exit-hook' that is hidden from the user. Though? -- Olivier Dion oldiob.dev

Re: GC Warning: Repeated allocation of very large block

2022-09-19 Thread Olivier Dion via General Guile related discussions
cation by the GC, it will never reclaim it. Since it's the Scheme stack and I suppose it's tail call optimized, that should not impact the GC. The most important thing would be to check the memory usage of the program with a tool like `htop'. If there's leak, you will see that the memory usage percentage keep increasing. -- Olivier Dion oldiob.dev

Re: How can i make executable guile file to process command line arguments?

2022-08-18 Thread Olivier Dion via General Guile related discussions
On Thu, 18 Aug 2022, Jacob Hrbek wrote: > I have this file which i use to interact with a version controlled > repository similar to a Makefile. > > How can i make it work with e.g. `./file.scm echo wheee` -> Will execute > the `(define (echo msg) ...)` and output `wheee` in the terminal? You c

Re: Using Guile 2.2 modules with Guile 3

2022-08-06 Thread Olivier Dion via General Guile related discussions
On Sat, 06 Aug 2022, Maxime Devos wrote: > On 06-08-2022 17:11, Olivier Dion via General Guile related discussions > wrote: >> Hi, >> >> Say I want to use guile-dbi wich use Guile 2.2. Is there any danger for >> me to use it with Guile 3.0? I see that Guile will r

Using Guile 2.2 modules with Guile 3

2022-08-06 Thread Olivier Dion via General Guile related discussions
Hi, Say I want to use guile-dbi wich use Guile 2.2. Is there any danger for me to use it with Guile 3.0? I see that Guile will recompile the module because the already compiled one does not match, I guess. Other than that, any side effects? Regards, old -- Olivier Dion oldiob.dev

Re: mmap for guile

2022-06-26 Thread Olivier Dion via General Guile related discussions
AP_SHARED or MAP_PRIVATE? I think it's important to mentioned this point. Regards, old -- Olivier Dion oldiob.dev

Re: [EXT] Re: guile program distributed as single executable?

2022-06-07 Thread Olivier Dion via General Guile related discussions
t single file and setup thing to run in the Guile's VM. -- Olivier Dion oldiob.dev

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Chris Vine wrote: > On Fri, 11 Mar 2022 09:58:59 -0500 > Olivier Dion wrote: >> I'm not sure this is related to the functions themself but instead the >> underlying filedescriptor opened iwth ON_NONBLOCK? > > The problem I am referring to is di

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Maxime Devos wrote: > Olivier Dion via General Guile related discussions schreef op do 10-03- > 2022 om 18:46 [-0500]: >> I haven't check the implementation details, but I think it's just a >> question of buffering.  `get-bytevector-n` will block

Re: Question about an error with ports

2022-03-11 Thread Olivier Dion via General Guile related discussions
On Fri, 11 Mar 2022, Chris Vine wrote: > On Thu, 10 Mar 2022 18:46:34 -0500 > Olivier Dion via General Guile related discussions > wrote: >> On Thu, 10 Mar 2022, Zelphir Kaltstahl wrote: >> >> > Just one question: Why is get-bytevector-some better than >>

Re: Question about an error with ports

2022-03-10 Thread Olivier Dion via General Guile related discussions
ry usage and multiple allocations. Again, it depends on the usage. Regards, old -- Olivier Dion Polymtl

Re: Question about an error with ports

2022-03-10 Thread Olivier Dion via General Guile related discussions
? bv) (put-bytevector out-port bv) (loop (get-bytevector-some in-port)) you should not close OUT-PORT. This break the REPL in my case if using the `current-output-port`. -- Olivier Dion Polymtl

Re: with-exception-handler experiment

2022-03-09 Thread Olivier Dion via General Guile related discussions
he initial result (0 0) and thus you're ending up with 0 run, 0 failed. Try with [() (lambda (proc) (run-and-count proc result)] like you did for the other cases. Regards, old -- Olivier Dion Polymtl

Re: Exception handling - symbol for encoding exception type?

2022-03-08 Thread Olivier Dion via General Guile related discussions
ead to other > programs or code bases. I would almost always make a type if the exception can be handled by user code. For internal raise/catch, not necessary. This is also better for testing purpose with srfi-64 `test-error` where you can specify the error type. -- Olivier Dion Polymtl

Re: good papers on graphics in scheme/lisp?

2022-03-02 Thread Olivier Dion via General Guile related discussions
/c/c-indent.html>. There's also <https://www.nongnu.org/nyacc/> that can be helpful if you're familiar with LALR(1) parsers. Regards, old -- Olivier Dion Polymtl

Re: Shell commands with output to string

2022-02-23 Thread Olivier Dion via General Guile related discussions
On Thu, 24 Feb 2022, Blake Shaw wrote: > Olivier Dion via General Guile related discussions > writes: >> This is great and should be merged into the standard library of Guile. >> Maybe not at it's (I have not read everything), but this would be trully >> benifical to

Re: Shell commands with output to string

2022-02-23 Thread Olivier Dion via General Guile related discussions
. That person would just ask: Does Guile has support for MongoDB? And proceed to dismiss it. Of course, some hackers like me just like to learn new stuffs. It took me about an one hour into Scheme course of the MIT on youtube to understand that I just found the holy grail of programming language. And yet, I have not find the answer to the `profit` question. -- Olivier Dion Polymtl

Re: Shell commands with output to string

2022-02-22 Thread Olivier Dion via General Guile related discussions
On Tue, 22 Feb 2022, Leo Butler wrote: > Olivier Dion via General Guile related discussions > writes: > >> On Tue, 22 Feb 2022, Zelphir Kaltstahl wrote: >>> Hello Guile users! >>> >>> How would I run a shell command from inside Guile and get its out

Re: Shell commands with output to string

2022-02-22 Thread Olivier Dion via General Guile related discussions
ell% (cons get-string-all args))) (define-public (shell$ . args) (apply shell% (cons get-line args))) Then (shell "ls" "-l") The $ variant is to get a single line in the output. -- Olivier Dion Polymtl

Re: 'guild compile' and C(++) extensions (in the context of LilyPond)

2022-02-19 Thread Olivier Dion via General Guile related discussions
-- MODULES = foo.scm GOBJECTS = $(MODULES:%=%.go) %.go: %.scm | program @echo GUILD; ./program compile $< $@ Hope that can help. -- Olivier Dion Polymtl

Re: Proposal: Deep Dive into the Guile Docs & Makeover Proposal

2022-02-19 Thread Olivier Dion via General Guile related discussions
irst started using Guile because of its easy integration with the C runtime and clear documentation on how to interlop it. If it was not for that, I would probably have dismiss Guile and select Lua instead. TLDR: I don't think we should discard anything that is C-centric in the manual. -- Olivier Dion Polymtl

Re: Proposal: Deep Dive into the Guile Docs & Makeover Proposal

2022-02-18 Thread Olivier Dion via General Guile related discussions
stem` and rename `POSIX/File System` to just `File System`. Best regards, old -- Olivier Dion Polymtl

Re: Guile cookbook ?

2022-02-12 Thread Olivier Dion via General Guile related discussions
mples of how o do things in Guile > ? > > Even things that are no related to Guix ? I think it would be best to kept them apart. A Guile cookbook is definitively a good idea. It would be very trivial to start this as a org-mode file and share it on a public repo, possibly adding a link to the main

Re: [PP?] GNU Guile 3.0.8 released

2022-02-11 Thread Olivier Dion via General Guile related discussions
I find this to be critical. It's a real pain to not have dependencies tracking in a build system. How could this be fixed? Does generating *.d files like GCC does for C would work? -- Olivier Dion Polymtl

Re: Ideas for making Guile easier to approach

2022-02-10 Thread Olivier Dion via General Guile related discussions
l of this. -- Olivier Dion Polymtl

Re: Ideas for making Guile easier to approach

2022-02-09 Thread Olivier Dion via General Guile related discussions
#f)) then in srfi/tests.scm: (define-module (srfi tests)) (alias-module (srfi srfi-64)) Ideally, something like this should be supported instead: (define-module (srfi srfi-64) #:alias (srfi tests)) -- Olivier Dion Polymtl

Re: Newbie thoughts on Guile Hall + Guix

2022-02-09 Thread Olivier Dion via General Guile related discussions
be the first step of this roadmap. -- Olivier Dion Polymtl

Re: Proposal: Deep Dive into the Guile Docs & Makeover Proposal

2022-02-08 Thread Olivier Dion via General Guile related discussions
pages. I had to learn that the hardway by reading multiple times the manual, and looking at Guix and Guile source code. -- Olivier Dion Polymtl

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Olivier Dion via General Guile related discussions
On Sun, 06 Feb 2022, Maxime Devos wrote: > Olivier Dion schreef op zo 06-02-2022 om 17:05 [-0500]: >> > Is it restricted to Makefiles, or can it also be used without >> > generating Makefiles?  If not, things like progress bars should be >> > easy >> >

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Olivier Dion via General Guile related discussions
/oldiob/cbuild Note that this is WIP and highly glued to my project and requirements. But in the essence, I think it's doing a good job of offering a descriptive way for defining a Guile+C project instead of managing Makefiles and auto-tools stuffs. -- Olivier Dion Polymtl

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Olivier Dion via General Guile related discussions
On Sun, 06 Feb 2022, Vivien Kraus wrote: > Hello,  > > Le dimanche 06 février 2022 à 11:35 -0500, Olivier Dion via General > Guile related discussions a écrit : >> As much as I like hall for pure Guile project, >> it's difficult to integrate extension libraries wri

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Olivier Dion via General Guile related discussions
ject, and since I'm very familiar with Makefiles, it only support Makefiles for now. What would be the other targets you have in mind? -- Olivier Dion Polymtl

Re: Newbie thoughts on Guile Hall + Guix

2022-02-06 Thread Olivier Dion via General Guile related discussions
(files '("bar/bar.c")) (ldflags '(-lsomelib)) (packages '(some-other-lib) ---- this description end up generating a `guix.scm`, `makefile`, `pre-install-env`, `foo/config.scm` and `include/config.h`. Packaging is just a matter of shipping the `makefile` with the source codes. -- Olivier Dion Polymtl

Re: Need help embedding Guile

2021-12-29 Thread Olivier Dion via General Guile related discussions
so though and I think for example that libgc might be a problem there. -- Olivier Dion Polymtl

Re: SD4F: (exist? procedure-**maximum**-arity)

2021-12-28 Thread Olivier Dion via General Guile related discussions
;s your first impression of the book? I was thinking of asking it for my birthday :-) -- Olivier Dion Polymtl

Re: Need help embedding Guile

2021-12-22 Thread Olivier Dion via General Guile related discussions
rue (the default), the module will be unlinked from the global module tree after the evaluation returns, to allow MOD to be garbage-collected. So I _think_ you're guarantee here that all references in your module will be garbage collected. You can then do a single `gc/finalizer`. -- Olivier Dion Polymtl

Re: Need help embedding Guile

2021-12-21 Thread Olivier Dion via General Guile related discussions
Once Guile is done reading your inputs, the child process dies and all its memory is reclaimed by the OS. > I'd appreciate some confirmation of the validity of my approach and > also some tips on a couple of loose ends. I think it's a valid approach. -- Olivier Dion Polymtl

Support for more atomic operations

2021-11-25 Thread Olivier Dion via General Guile related discussions
operations would be faster if available as primitives in the VM, if that's possible? -- Olivier Dion Polymtl

Re: foreign objects and the garbage collector

2021-09-21 Thread Olivier Dion via General Guile related discussions
On Tue, 21 Sep 2021, adriano wrote: > Hi Olivier, > > thank you very much for your reply > > Il giorno dom, 19/09/2021 alle 14.11 -0400, Olivier Dion ha scritto: >> On Sun, 19 Sep 2021, adriano wrote: >> > >> > > > > > >> > It'

Re: foreign objects and the garbage collector

2021-09-19 Thread Olivier Dion via General Guile related discussions
o a wrapper named `open-my-resource` to do the conversion of scm_string to C raw pointer before calling `open-my-resource%` in this particular case. This is just an example, but it shows you that you can call foreign C primitives easily without any C code, and that you have to use a dynamic context to manage the lifetime of the C resources. -- Olivier Dion Polymtl

Re: backing out of debugger

2021-09-14 Thread Olivier Dion via General Guile related discussions
f that's any better than typing ,q plus Enter :) You could define a procedure that calls geiser-repl-exit N time with the prefix argument. Note that geiser-repl-exit already takes a prefix argument, but will simply kill the process instead of exiting N repl. -- Olivier Dion Polymtl

Re: Trouble creating SRFI-9 Record in C

2021-09-10 Thread Olivier Dion via General Guile related discussions
a wrapper, you're effectively creating a procedure that can use the `make-foo` syntax because it's in Scheme and it's solved a expansion time. -- Olivier Dion Polymtl

Contract programming in Guile

2021-07-17 Thread Olivier Dion via General Guile related discussions
(begin (format #t "Failed post-condition: ~a\n" condition) (exit 1 '((>= result 0))) result)) -- Olivier Dion PolyMtl

Portability of Guile

2021-07-02 Thread Olivier Dion via General Guile related discussions
ource and applying patch if necessary. Since Guile 2.0 or Guile 3.0, is this possible? -- Olivier Dion PolyMtl

Re: Guile 3.0.7 compile cache messages

2021-06-01 Thread Olivier Dion via General Guile related discussions
re Foundation, Inc. > > License LGPLv3+: GNU LGPL 3 or later <http://gnu.org/licenses/lgpl.html>. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > > Best regards, > Zelphir > > -- > repositories: https://notabug.org/ZelphirKaltstahl > > -- Olivier Dion PolyMtl

Check if thread is in Guile mode

2021-05-17 Thread Olivier Dion via General Guile related discussions
Hi, Is there a way to check if the current thread is in Guile mode? Something along like: bool is_guile_init = scm_in_guile_mode() would be nice to have. -- Olivier Dion PolyMtl

Re: Somehow I have got this "thunk" thing wrong.

2021-03-06 Thread Olivier Dion via General Guile related discussions
On Sat, 06 Mar 2021, Taylan Kammer wrote: > On 06.03.2021 01:31, Olivier Dion via General Guile related discussions > wrote: >> You've quoted the whole s-exp. Which means lambda is never applied. >> You have to apply lambda in order to create a procedure. > > Just a

Re: Somehow I have got this "thunk" thing wrong.

2021-03-05 Thread Olivier Dion via General Guile related discussions
;a (lambda () (display "event a\n"))) (cons 'b (lambda () (display "event b\n"))) (cons 'c (lambda () (display "event c\n")) (define res (hash-ref stuff 'a)) (res) -- -- Olivier Dion PolyMtl

Re: C extensions

2021-02-21 Thread Olivier Dion via General Guile related discussions
; } -- Note that throwing an error might be easier to do in Scheme itself: -- (throw 'invalid-argument) ------ > > double mu = scm_to_dou

Re: C extensions

2021-02-21 Thread Olivier Dion via General Guile related discussions
that? Perhaps some of it > could For your example, use the following predicates: -- scm_is_inexact(x) && scm_is_true(scm_positive_p(x)) ------ > be: > SCM_REALP > scm_misc_error > > Any tips? -- Olivier Dion PolyMtl

Re: [ANN] (potato make) - makefiles in scheme

2021-02-15 Thread Olivier Dion via General Guile related discussions
a string that gets > passed to the shell. > > I'll probably rename the ':' syntax for the sake of SRFI-119 wisp > compatibility. Translated to wisp, this really would look like a > dialect of makefile. > > No official tarball yet. I'll do that soonish after I get better > coverage in the test suite. I was just a bit proud of this silly > hack, and wanted to show it off. Thanks for reading. > > Regards, > Mike Gran > -- Olivier Dion PolyMtl

Re: Guix records

2021-02-09 Thread Olivier Dion via General Guile related discussions
ic to combine (guix records) and guile-json somehow, but > I'm not sure how. If guile-json' license is compatible with Guix' license, I don't see any problem with taking the code from Guix and adapting it for guile-json. > > Sorry I couldn't provide any useful

  1   2   >