IRC channel logs

2022-12-16.log

back to list of logs

<garbados>any leads in the guile world on forward error correction libraries?
<chrislck>what's the most scheme equivalent of a CPP class with methods?
<chrislck>(define-record-type person (make-person name birthday) etc)
<chrislck>(define person (make-person "me" 1987)) -> it would be nice to have (person->get-age)
<chrislck>any srfi
<daviid>chrislck: unless purposefully ignoring goopds, prefer goops :)
<dthompson>I second GOOPS. (use-modules (oop goops))
<daviid>*goops ... goops ...
<dthompson>"Oops, all OOP!"
<daviid>:)
<old>garbados: Something like Reed-Solomon and Hamming?
<old>I don't think there's even a SRFI for that
<haugh>rekado, I hear ya, but I'm not saying I can do better with the same tools, just that there's clearly a need for, like, two new tools. I don't think there's anything inherently wrong with or ugly about iteratively building big strings. The sheer amount of this kind of work that needs doing in order for Guix to attain dominion definitely calls for a little abstraction.
<haugh>old, this (unread-char char port) idea is a step in the right direction, but I'm trying to apply the module system to allow users to specify their own hash extensions if they want to. I understand you really want to get something into core and this looks decent, but just bear in mind that most of the resistance you're going to run into has to do with the combination of a global value and a core lib
<ArneBab>old: I implemented very limited and inefficient hamming for a lecture: https://hg.sr.ht/~arnebab/wisp/browse/examples/hamming-file.w?rev=tip https://hg.sr.ht/~arnebab/wisp/browse/examples/hamming.w?rev=tip#L32
<ArneBab>(the first does not actually do the correction yet)
<haugh>How do you make eq? fail to equate two chars?
<haugh>Somehow I had the impression that chars were unique
<dsmith-work>Happy Friday, Guilers!!
<garbados>old: aye i’m looking for reed-solomon and hamming type stuff. if there’s nothing in guile (and no guile libraries for it that i could find) then my question is: how hard would it be to call out to C (or other lang) for these capabilities
<dsmith-work>Calling C code from Guile is relatively painless. There is a FFI for calling directly, or if needed you write a C wrapper that exposes a Scheme interface.
<dthompson>garbados: it's (usually) not hard if you use Guile's foreign function interface.
<old>garbados: Like the others say, binding to C is a matter of 1-2 lines in Guile. C++ is another beast though
<garbados>very nice
<garbados>i'll see what i can do
<old>However, error correcting code can't be that hard to implement in Guilt itself
<garbados>"can't be that hard" that's what i'm hoping! that's the path i'm considering now
<old>it might be useful to have a guile-ecc
<garbados>calling out to C will mess with continuations, which has bitten me before
<garbados>so i'd very much prefer to have an all-guile fix
<old>yes ofc
<old>stat with a simple parity error :p
<old>s/stat/start
<haugh>old, https://0x0.st/on01.txt
<haugh>sorry I don't know orgmode
<old>looks promising
<old>but it would be nice to have it in ice-9 boot so we don't have to include it everytime
<haugh>ug read-hash-extend -r /usr/share/guile/3.0
<haugh>I think that's gonna be kinda tough
<lilyp> https://srfi.schemers.org/srfi-243/
<mwette>confirmed bug 32040 still exists in 3.0.8 and one-line + one-char fix works