--cut here---end--->8---
but I found your format to be easier to read.
--
Olivier Dion
oldiob.ca
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.e. lambda
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' or `--
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
---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
ards 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
bracadabra`
> 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` macro ... rabbit hole and
. 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
ething?
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
ry, 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
public, but it shows that it is
possible to make an entire build system with only Guile core.
--
Olivier Dion
oldiob.dev
listic 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
exception.
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<--
uile 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
is topic?
I do not see any link in your message so I can not say.
--
Olivier Dion
oldiob.dev
ut 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
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 Ol
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 now w
s 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
>> wa
m my benchmarks.
--
Olivier Dion
oldiob.dev
s,
old
--
Olivier Dion
oldiob.dev
3 27 (string->pointer "toto")). It's available in the module
(system foreign).
--
Olivier Dion
oldiob.dev
e 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
" -> (format #f "~a...@gnu.org" me)
#"me@@gnu.org" -> "m...@gnu.org"
#"@@no-suffix@" -> "@weird"
#"@@suffix@@" -> "@weird@"
Olivier dion (2):
Add reader extension for interpolated strings.
Add tests for strings
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
or an implementation in Guile would be awesome.
If you have a scenario like that, please contact me!
--
Olivier Dion
oldiob.dev
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
ion 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. Maybe doing a
divide and conquer approach? In that case I would hi
chanisms > Prompts
or here <https://www.gnu.org/software/guile/manual/html_node/Prompts.html>.
--
Olivier Dion
oldiob.dev
-end--->8---
There's probably other way of doing so that I'm not aware of.
--
Olivier Dion
oldiob.dev
)))
(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
ghtmare 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
-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
))
--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
r 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
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
hink it's important
to mentioned this point.
Regards,
old
--
Olivier Dion
oldiob.dev
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 differe
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 just like
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
>&g
ltiple allocations. Again, it depends on the usage.
Regards,
old
--
Olivier Dion
Polymtl
(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
lt (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
://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 all
or
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
LES = foo.scm
GOBJECTS = $(MODULES:%=%.go)
%.go: %.scm | program
@echo GUILD; ./program compile $< $@
----
Hope that can help.
--
Olivier Dion
Polymtl
uile 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
o 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
fix.
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
on to all of this.
--
Olivier Dion
Polymtl
ine-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
rst step of this
roadmap.
--
Olivier Dion
Polymtl
at 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
>> >
ob/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
iar with
Makefiles, it only support Makefiles for now. What would be the other
targets you have in mind?
--
Olivier Dion
Polymtl
(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
st impression of the book? I was
thinking of asking it for my birthday :-)
--
Olivier Dion
Polymtl
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
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
such 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'd be
r 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
ny 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
y 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
gin
(format #t "Failed post-condition: ~a\n" condition)
(exit 1
'((>= result 0)))
result))
--------
--
Olivier Dion
PolyMtl
and
applying patch if necessary.
Since Guile 2.0 or Guile 3.0, is this possible?
--
Olivier Dion
PolyMtl
tware 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
Note that throwing an error might be easier to do in Scheme itself:
--
(throw 'invalid-argument)
--
>
> double mu = scm_to_double (_mu);
> double sigma = sc
But this put
burden of maitenance into my hands.
Thus, I'm looking for an alternative, perhaps there's a Guile library
(other than Guix' module) or a SRFI that offers similar feature?
--
Olivier Dion
PolyMtl
try to build your program in guile and post
> back here.
Well the software in question is a video game engine. But I managed to
integrate Guile into the engine, deactivating the Guile context in
critical section of C code. Work like a charm!
--
Olivier Dion
PolyMtl
;; and so on..
)))
--
I agree that such predicate should be part of the buitlin API.
--
Olivier Dion
PolyMtl
--
Note that the readline module is loaded by my home configuration.
Anyone has encountered this fault before?
--
Olivier Dion
PolyMtl
unfortunately.
Thus, does anyone had similar experiences in the past? Are my worries
even valids?
--
Olivier Dion
PolyMtl
97 matches
Mail list logo