RE: Exporting a nonexistent variable

2024-11-05 Thread Maxime Devos
I’ve send it to bug-guile, should appear in the issue tracker soon

RE: Exporting a nonexistent variable

2024-11-05 Thread Maxime Devos
#74210

RE: [PATCH] At-exit hook

2024-11-07 Thread Maxime Devos
On Thu, 7 Nov 2024 17:10:45 +0100 Maxime Devos wrote: > On Thu, 7 Nov 2024 12:23:08 +0100 > >Maxime Devos wrote: > >> ‘atexit’ functions are run at ‘exit’. ‘exit’ can be run from signal > >> handlers (*). Since the hook runs Scheme code, it could do a lot of > >

RE: [PATCH] At-exit hook

2024-11-07 Thread Maxime Devos
even ‘malloc’, so likely I’m looking in the wrong places. Best regards, Maxime Devos

RE: [PATCH] At-exit hook

2024-11-07 Thread Maxime Devos
On Thu, 7 Nov 2024 12:23:08 +0100 >Maxime Devos wrote: >> ‘atexit’ functions are run at ‘exit’. ‘exit’ can be run from signal >> handlers (*). Since the hook runs Scheme code, it could do a lot of >> AC-unsafe things, resulting in problems. >> >> (*) glibc docum

Re: [PATCH] Fix make-custom-port in case encoding is #f

2025-02-02 Thread Maxime Devos
econd fluid-ref invocation. and=> would avoid that. Best regards, Maxime Devos

Re: [PATCH v2] Fix make-custom-port in case encoding is #f

2025-02-02 Thread Maxime Devos
That seems about right. Now only needs to wait for someone able to actually merge this, I think. Best regards, Maxime Devos

RE: rdelim: Add new procedure `for-line-in-file`.

2024-12-15 Thread Maxime Devos
>Where is BREAK defined? Break is defined by ‘while’: https://www.gnu.org/software/guile/manual/html_node/while-do.html

RE: [PATCH v3] rdelim: Add new procedure `for-line-in-file`.

2024-12-16 Thread Maxime Devos
/commit/cc0e84cd56df3b07d378f710df39f8822317a2a2 • https://git.sr.ht/~old/guile-parallel/tree/master/item/parallel.scm#L29 • (what’s missing here, is a way to override Guile’s dynamic-wind in a transparent manner) Best regards, Maxime Devos

RE: [PATCH v2] rdelim: Add new procedure `for-line-in-file`.

2024-12-16 Thread Maxime Devos
passing ‘get-char’ you can act on each character, with ‘get-line’ I’m not sure what the difference would be, but apparently it’s not ‘read-line’ (?), if you give it a JSON reading+parsing proedure you iterate over all JSON objects, with get-u8 you iterate over bytes etc.. Best regards, Maxime Devos

RE: [PATCH v2] rdelim: Add new procedure `for-line-in-file`.

2024-12-16 Thread Maxime Devos
user might want to set CLOEXEC or other flags, or uncompress input, …) Also, documentation is missing. Best regards, Maxime Devos

RE: [PATCH v2] rdelim: Add new procedure `for-line-in-file`.

2024-12-16 Thread Maxime Devos
’t heard a good argument yet for _not_ generalising it. (*) I.e., while it technically does parse something (extract line from text), it doesn’t parse the line itself (which in many cases will need to happen), and ‘recognising a line as a line’ is kind of trivial. Best regards, Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
needs time, and those other parts would remain unanswered. Also, when I (of my own volition, and in absence of external obligations competing for time) _choose_ to spend some extra time on writing beyond necessity, then it’s up to myself whether to consider this extra effort ‘waste’ or not, or

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
e assuming “\n” is a line delimiter. This is true under Unix according to the documentation. But it doesn’t say anything about non-Unix systems. Best regards, Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-relatedfunctions.

2024-12-20 Thread Maxime Devos
brary. See Venerable Port Interfaces, and See Writing Scheme Values, for >documentation. Contrary to what R6RS prescribes, neither module automatically >convers line feed characters to the line terminator of the end-of-line style. (Please check the last point, seems like something that should be tested experimentally and I don’t have a Guile setup on this computer.) (Also, docstrings are to be modified accordingly) Best regards, Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
.) Rather, either the used newline in the test needs to be adjusted per-platform, or the documentation of read-line needs to be adjusted to that \n is always a newline. Also, it’s also not a proper “back to the track” reply, since it ignores the ‘generalisation’ component of the track. Regards, Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
s would be needed), as I probably mentioned earlier in some other words. Also, "anyone” includes me. You should stop wasting _my_ time by repeating your ad nauseum messages -- whether it’s for just repeating your opinion, or intended for (fallacious) argumentation or persuasion, it is quite ad nauseum. Regards, Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
Can you stop it with the repetitive claims of “this is just my proposal, I have freedom to state it, you don’t need to persuade me, etc.”? I’ve heard you the first, dunno, 5 or so times. Except for the “just” qualifier, I did not disagree anywhere. For why you shouldn’t do those repetitive claim

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
nstead of “\n” is the line feed (I don’t know whether it recognised “\n”, IIRC it doesn’t). Regards. Maxime Devos

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-relatedfunctions.

2024-12-20 Thread Maxime Devos
> Thanks for your patches! Applied now. Regardless of the question whether to generalise, there was also the thing about the test testing for returning #true even though this behaviour isn’t documented anywhere. Also, there was the thing about needing to verify whether (ice-9 rdelim) always rec

RE: [PATCH] test-suite: Add tests for `for-rdelim-in-port`-related functions.

2024-12-20 Thread Maxime Devos
t’s a similar kind of nonsense I don’t want to deal with either (the generalisation Is trivial so nothing needs to be shown, what you are claiming is different from what you are doing, and I did no cheap talking), so consider yourself added to the blocklist. Bye, Maxime Devos

RE: Keywords in GOOPS methods

2024-11-23 Thread Maxime Devos
>Any opinions on what is best: Having a define-method* or having the >functionality in define-method itself? You can’t unify define-method with define-method* without making some arbitrary choices in some special cases (the same applies to define-method* too actually, and also to define-method

RE: Keywords in GOOPS methods

2024-11-23 Thread Maxime Devos
doesn’t. A variant with untyped keyword arguments: (define-method (f (a ) (b )) (pk 'positional)) (define-method (f (#:key foo)) (pk 'optional-keyword foo)) (f #:foo 'bar) Who should win? Both are a quite specific match. Best regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-19 Thread Maxime Devos
use scm_i_ttyname. Also, the explanation in the commit message belongs in a (code) comment, so people don’t have to track down the commit that introduced the changes. Best regards, Maxime Devos

RE: Calling Glibc's malloc(3) from Guile

2025-01-19 Thread Maxime Devos
). (For a non-malloc example, see the bug report (+ patch) about GOOPS methods and ,trace.) Best regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-22 Thread Maxime Devos
’t think it can be shortened: it’s for Guile (so a SCM_ prefix for namespacing), it’s for syscalls (so _SYSCALL suffix), and it’s a variant for locking/unlocking (so LOCKED in the middle). Nothing to remove there, I’d think. Best Regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-21 Thread Maxime Devos
t regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-21 Thread Maxime Devos
e. How is fixing ttyname outside the scope of fixing ttyname? Previously, you said that: >[context: ttyname] >In any case, I'm happy to fix all the problems if we can be confident […] Best regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-21 Thread Maxime Devos
ing else that simply takes a long while. During this time, the scm_i_misc_mutex is locked, so other threads that want to use ttyname can’t progress for a long duration! The variant of the SCM_SYSCALL loop I provided, avoids these issues. Best regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-21 Thread Maxime Devos
. (In case of unclarity and to be really sure to not copy too much, strncpy exists where n=length of array excluding space reserved for terminating zero, and things could be initialised to \0.) Best regards, Maxime Devos

RE: [PATCH 1/1] fport_print: handle ttyname ENODEV

2025-01-21 Thread Maxime Devos
are here about not exceeding the nominal maximum for its own sake, rather it’s just to have a sufficiently large buffer. Best regards, Maxime Devos

RE: Removing program-arities export

2025-01-05 Thread Maxime Devos
xist, and hence many of the procedures in that module still make sense, including program-arities. In particular, arity information is still recorded (in .guile.arities), so it should be made / kept accessible somewhere. Best regards, Maxime Devos

RE: Removing program-arities export

2025-01-15 Thread Maxime Devos
mplementation exists for bootstrapping the Scheme Scheme interpreter, so it’s of less interest to get arity information in there.) Best regards, Maxime Devos.

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
0 (with some error margin to deal with inexactness). I'm pretty sure it's in radians. (Usually I'd mention something about documentation here, but IIRC Guile-Lib has some set-up where it copies docstrings.) Best regards, Maxime Devos

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
: For which θ is θ/π and tan(θ) rational? Assume t=tan(θ)∈ℚ. Note that sin (2θ)=(2t)/(1+t^2)∈ℚ. Since sin(2θ) is rational and 2θ/π is rational, then 2θ is an integer multiple of π/2. So, θ is an integer multiple of π/4. (For the other direction, this can be verified with a lookup table.) Best regards, Maxime Devos

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
On 16/02/2025 11:31, Maxime Devos wrote: Some others you can add: * tangent * arcsine * arccosine * arctan One more thing: arctan2. Can be implemented in terms of arctan, but getting the sign right is inconvenient.

Re: [PATCH v2 guile-lib] src: (math trigonometry): Add it.

2025-02-17 Thread Maxime Devos
ception, or (arctan +infinity) being inexact 90.0, this wouldn't work as-is. + (< (sqrt (expt (- value estimate) 2)) margin)) That's simply (< (abs (- value estimate)) margin), no? Or does Guile not have 'abs'? Best regards, Maxime Devos

Re: [PATCH guile-lib] src: (math trigonometry): Add it.

2025-02-16 Thread Maxime Devos
On 16/02/2025 12:19, Maxime Devos wrote: I'm going to look into what's the case for 'tan'. For 'tan', tan(pi/4)=tan(45°) is rational as well - I'm going to look into whether the 'S' of 'tan' is only the integer multiples pi/4, or whether

<    1   2   3   4