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
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
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
--cut here---end--->8---
but I found your format to be easier to read.
--
Olivier Dion
oldiob.ca
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
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
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
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
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
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
'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
. 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
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
, 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
but it shows that it is
possible to make an entire build system with only Guile core.
--
Olivier Dion
oldiob.dev
ic and useful is to make a build system in Guile
where the DSL that replaces Makefiles is Scheme.
--
Olivier Dion
oldiob.dev
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
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<--
work on
Guile core itself, myself included. However, I find it difficult to
contribute in general and to have feedback.
--
Olivier Dion
oldiob.dev
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
d reading on this topic?
I do not see any link in your message so I can not say.
--
Olivier Dion
oldiob.dev
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
the guile in the previous environment, which does
not have its load path set correctly I think!
--
Olivier Dion
oldiob.dev
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!
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
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
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
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
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
>>
r from my benchmarks.
--
Olivier Dion
oldiob.dev
l.
Regards,
old
--
Olivier Dion
oldiob.dev
ry (cfunc 3 27 (string->pointer "toto")). It's available in the module
(system foreign).
--
Olivier Dion
oldiob.dev
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
; (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
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
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
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
;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
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
ol Mechanisms > Prompts
or here <https://www.gnu.org/software/guile/manual/html_node/Prompts.html>.
--
Olivier Dion
oldiob.dev
t here---end--->8---
There's probably other way of doing so that I'm not aware of.
--
Olivier Dion
oldiob.dev
(cons n (loop (1- n
(pk (foo 5))
(pk (foo 10))
--8<---cut here---end--->8---
--
Olivier Dion
oldiob.dev
. running with (iota 1) I
don't see any synchornization issue also.
--
Olivier Dion
oldiob.dev
(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
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
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
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
"
--8<---cut here-------end--->8---
--
Olivier Dion
oldiob.dev
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
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
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
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
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
AP_SHARED or MAP_PRIVATE? I think it's important
to mentioned this point.
Regards,
old
--
Olivier Dion
oldiob.dev
t single file and
setup thing to run in the Guile's VM.
--
Olivier Dion
oldiob.dev
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
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
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
>>
ry
usage and multiple allocations. Again, it depends on the usage.
Regards,
old
--
Olivier Dion
Polymtl
? 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
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
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
/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
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
. 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
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
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
--
MODULES = foo.scm
GOBJECTS = $(MODULES:%=%.go)
%.go: %.scm | program
@echo GUILD; ./program compile $< $@
Hope that can help.
--
Olivier Dion
Polymtl
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
stem` and rename `POSIX/File System`
to just `File System`.
Best regards,
old
--
Olivier Dion
Polymtl
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
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
l of this.
--
Olivier Dion
Polymtl
#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
be the first step of this
roadmap.
--
Olivier Dion
Polymtl
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
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
>> >
/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
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
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
(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
so
though and I think for example that libgc might be a problem there.
--
Olivier Dion
Polymtl
;s your first impression of the book? I was
thinking of asking it for my birthday :-)
--
Olivier Dion
Polymtl
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
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
operations would be faster if available as primitives in
the VM, if that's possible?
--
Olivier Dion
Polymtl
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'
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
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
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
(begin
(format #t "Failed post-condition: ~a\n" condition)
(exit 1
'((>= result 0)))
result))
--
Olivier Dion
PolyMtl
ource and
applying patch if necessary.
Since Guile 2.0 or Guile 3.0, is this possible?
--
Olivier Dion
PolyMtl
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
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
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
;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
;
}
--
Note that throwing an error might be easier to do in Scheme itself:
--
(throw 'invalid-argument)
------
>
> double mu = scm_to_dou
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
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
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 - 100 of 105 matches
Mail list logo