Hello,
I would like to dispatch exceptions based on errno, in particular to
return #f on ENOENT, and re-raise the exception otherwise. My current
(working as far as I can tell) solution is:
--8<---cut here---start->8---
(with-exception-handler
(λ (exc
Hello,
Zelphir Kaltstahl writes:
> Without getting into the details, perhaps my peg utils module could be useful
> for you:
>
> https://codeberg.org/ZelphirKaltstahl/advent-of-code-2024/src/commit/3f64ee60297ccc89085c9425522bd8b8e83fe99d/utils/peg-tree-utils.scm
That does definitely look very u
Hi :)
I recently discovered the (ice-9 peg) module, and it seems really
useful. However I have to admit I struggle a bit with processing the
tree produced by it.
Let me put forward an example:
--8<---cut here---start->8---
(use-modules (ice-9 peg))
(define-
edures (mainly
due to the assumption of there being a performance impact).
Have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
Matt Wette writes:
> This looks like a bug in the compiler to me.
Will send a bug report.
> For example, check the `format-analysis' procedure in
> language/tree-il/analyze.scm
I had a look, but have to admit that procedure is beyond me, at least
for now.
>
> try this: (apply format #f "~65c"
PS: The subject is misleading. I originally noticed the warning with ~vc, but
during writing the email realized that ~65c warns as well and forgot to adjust
it.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hello,
when reading the documentation for (ice-9 format), this part of
description of ~c caught my eye:
> If the charnum parameter is given then an argument is not taken but
> instead the character is (integer->char charnum) (see
> Characters). This can be used for instance to output characters
Hello,
On 2024-08-11 21:52:42 -0500, Diego Antonio Rosario Palomino wrote:
> Hello, i am a new scheme user trying to exploit the peg library but have
> encountered the following error :
>
> guile c.scm
> ;;; note: source file /home/diego/Documents/Guile/c.scm
> ;;; newer than compiled
> /hom
tional dependency without any warnings?
For example, is there a way to convince the Guile that those specific variables
will be bound? How do people commonly approach this?
Thanks,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
and use-modules.
Have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
your no-computer time :)
>
> --
> Linus Björnstam
>
> On Wed, 5 Jun 2024, at 17:02, Tomas Volf wrote:
> > Hello,
> >
> > I am getting following warning from a guild compile:
> >
> > warning: possibly unused local top-level variable `%foo?-procedure
truct
in Guile?
Are there other options? How are you approaching it?
Thank you and have a nice day,
Tomas Volf
PS: I am not even sure why this warning happens, the `foo?' syntax transformer
is exported and *does* reference it (as far as I can tell from ,expand).
--
There are only tw
op-level pollution, but with bit of care it seems
to be manageable. Sometimes, when I mess up, it requires restarting the REPL,
but I can skip the expensive parts of the setup, so it is pretty fast.
Thank you both again and have a nice day,
Tomas Volf
0: The full procedure is an install scrip
uot; way of "write a function, run it whole against a
test". Since this is Scheme, and I *can* evaluate single expressions in the
procedure body, I would like to use that to my advantage. Somehow.
I realize this is a very open-ended question/email.
Have a nice day,
Tomas Volf
--
The
On 2024-04-26 03:05:51 -0400, Nikolaos Chatzikonstantinou wrote:
> Hello list,
>
> I want to talk about some issues I've encountered with Guile. I'll
> quickly summarize the points and I'll expand below.
>
> 1. Can't connect geiser from emacs to a remote REPL server unless
> versions match.
> 2. Do
/guile.c:94
If you check module/web/server/http.scm in the guile's repository, you will
notice there is this line:
(sigaction SIGPIPE SIG_IGN)
Which caused the signal to be ignored instead of using the default handler
(which is to die).
Have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
ompilation-quiet or something would work. I would
actually want that as well, but never got to writing the patch.
Have a nice day,
Tomas Volf
--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
signature.asc
Description: PGP signature
popen)
((ice-9 popen) #:select ((open-pipe . foo-bar
After that you have both `open-pipe' and `foo-bar' available, pointing to the
same procedure. At this point you could just re-define `open-pipe' to something
else and use the `foo-bar'.
Maybe there is
bigger) file descriptors than select.
>
> So I suggest using poll, not select.
I did not realize there is (ice-9 poll), seems to be undocumented. I can live
with being linux-only, so poll should work for me. Thanks :)
Have a nice day,
Tomas Volf
--
There are only two hard things in Compu
))
It still does not work:
read-char (non-block):
Alarm!
;; Result: #
;; 51.581392s real time, 0.000371s run time. 0.00s spent in GC.
I would have expected to receive EWOULDBLOCK. But let's not get distracted by
the non-blocking variant.
So, what would be a good way to do
rd from it:
scheme@(guile-user)> (eq? #:hello (symbol->keyword (string->symbol
"hello")))
$1 = #t
There might be a direct way, but this is what I managed to put together after
digging in the manual.
Have a nice day,
Tomas Volf
--
There are only two hard things
Hi,
thanks for the answers.
On 2023-11-28 01:51:46 +0100, Maxime Devos wrote:
> (set! copy-file improved-copy-file)
>
> This replacement 100% functioning assumes no inlining, nobody capturing the
> old copy-file on the top-level, nobody calling the C function directly ...
In that case this is w
Hello,
I would like to replace a core binding. I know that I can define a module like
this:
(define-module (foo))
(define-public (copy-file a b)
(display "TODO: implement file copy\n"))
And I can later use it
scheme@(guile-user)> ,use (foo)
scheme@(guile-user)> (copy-file
23 matches
Mail list logo