IRC channel logs

2023-03-31.log

back to list of logs

<flatwhatson>rekado: i have a preliminary openai-text implemented on the devel branch if you want to play with it
<flatwhatson>it looks like fine-tuning can be done using their cli tools, as an interim solution. i'll be on vacation for a few days, so those won't land until next week
<flatwhatson>also open to API changes if something is annoying
<daviid>flatwhatson: maybe you wana (both) sync and collaborate your efforts ... https://github.com/aconchillo/guile-openai
<flatwhatson>oh right! heh... that makes three
<daviid>flatwhatson: they are very nice and very good guile hacker, i am sure you'll find a way to not duplictate these efforts ... we are a snmall 'group', we can't offer to loose time
<daviid>(re)doing things ... i think
<daviid>flatwhatson: also, fyi, gitlab, is so heavy, so is (giveup on) github, that it kills my gnome browser session, if you'd consider moving to souurcehut, notabg, or better, savannah ... this world doesn't need any non free s/w based git provide4r, it would help if we help the world ... my 2c, no pun, but please think about it ... tx!
<flatwhatson>yes i'm open to moving elsewhere, i'm split across github & gitlab currently but wondering whether a self-hosted gitea might be the best long-term
<daviid>flatwhatson: ok, but before you find the time to self-host, it be nice to move to one of the above, which only takes minutes, and help us help the world ... tx
<flatwhatson>daviid: you can just clone without browsing, if it's an immediate problem
<daviid>flatwhatson: sure, but that doesn't help the world, what would help the world is that those of us who are working on free s/w, guile related even more i think, totally ban, for the rest of our (short) life, any none free s/w git service - there are so many now a days ...
<flatwhatson>you are preaching to the choir my friend
<daviid>flatwhatson: you think so? count how many giule projects are actually on none free s/w git provider - it is a very very very high number, a disaster imo - but i made my point - no pun, but if you could move those nice and excellent projects you are working on, that would be ezxcellent
<flatwhatson>ok, i will bump it up the priority list :)
<daviid>thanks! for the world ... but i also got depressed to see how many of us seems to not pay much attention to this 'slopery slope' of things ... thank you
<flatwhatson>daviid: i have migrated my projects to notabug: https://notabug.org/flatwhatson
<daviid>flatwhatson: fantstic! thanks
<daviid>impressive (those projects you are working on ...) and a releaf i can browse in peace :) -
<daviid>i'll email the guile-software list maitainer to advice you moved there ...
<daviid>and ask they update all your projects listed there ...
<daviid>ACTION is trying to implement next-vfunc, which is to define-vfunc what next-method is to define-method ... nor exactly a piece of cake, but fun! 
<daviid>*a relief :)
<lloda>i don't understand why ^C sometimes fails to interrupt a routine launched from the repl
<lloda>i thought it happened bc when it was busy on some C loop but that doesn't seem to be the case. I have it happen on Scheme code as well (not pure Scheme code, but code that goes in and of C repeatedly)
<lloda>what is precisely what enables/disables this mechanism?
<lloda>i don't touch sigint myself, but libraries i call may :-\
<dsmith>sneek, botsnack
<sneek>:)
<sneek>Yey! dsmith is back!!
<dsmith>sneek, botsnack
<sneek>:)
<old>lloda: I think that Guile intercept signals and will call the callback (or throw an exception) at a synchronization point
<old>If you're in a busy loop that does not have such synchronization, you're doom I guess
<old>At least I think that's the reason. Need a Guile maintainer here for the true answer
<daviid>flatwhatson: it occurs to me your README[.xx] still need a bit of love, looking at https://notabug.org/flatwhatson/prescheme-demo, i see How to build ... git clone https://gitlab.com/flatwhatson/prescheme-demo.git ...
<daviid>probably all other projects as well ...
<daviid>flatwhatson: i thought you had a guile-precscheme project somewhere, or does my mem failsme?
<atuin>hi
<haugh>Can I generate a docstring for a generated syntax transformer? I can get the correct (string-append whatever ...) in the right place, but both syntax-rules and lambda (for syntax-case) expect a string literal. Can I perform the string-append at expansion time? Is this what eval-when is for?
<old>haugh: have you tried with set-object-property! ?
<haugh>old, I'm trying to generate docstrings for macros, which are not first-class objects
<haugh>the actual usefulness of such a docstring is negligible, but my interest is really more about the limits of syntax-case. If this is possible, then /so much/ more is also possible.
<sneek>wb dsmith
<old>haugh: hmm to get a string literal I do not think that's doable
<haugh>D:
<old>none literal would not work?
<haugh>don't know
<old>well does not work for procedure
<old>I can't even get to ,describe a syntax-transformer
<haugh>,d (syntax-rules () "doc" ((_ f) f))
<haugh>,d (lambda (x) "doc" (syntax-case x () ((_ f) #'f)))
<haugh>uh
<haugh>,d (syntax-rules () "doc" ((_ f) f))
<haugh>,d (lambda (x) "doc" (syntax-case x () ((_ f) #'f)))
<old>got it for you
<old>hold on
<old>gotta paste it
<old> https://paste.sr.ht/~old/885e42c29ff6bbcfa65ed4130dc4a9c3d70da8ea
<old>hope that can help!
<haugh>WOW, TIL about macro-transformer. Thanks very much!
<old>pleasure :-)
<mwette>lloda: There is some signal handling stuff in (ice-9 top-repl) but I don't see how it blocks ^C.
<dsmith>sneek! sneek! Why are you not coming back?
<dsmith>sneek, botanack
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been running for 2 minutes and 32 seconds
<sneek>This system has been up 2 minutes
<dsmith>There's a goot bot
<qookie>what's the convention for naming things? for example, what does prefixing a name with % mean? (e.g. %resolve-variable in ice-9/eval.scm)
<haugh>qookie, a % prefix usually means "internal". For instance, I usually mark some of the procedures generated with define-record-type this way when I'm going to wrap them with additional behavior. Don't take any convention too seriously, though.
<qookie>haugh: ah, that makes sense, thanks
<lilyp>suffix '?' means "predicate", i.e. returning #t or #f, and '!' means "destructive", i.e. potentially changing the values passed as input as a side effect
<whereiseveryone>For anyone interested, Sunday Demo: Live Loading Common Lisp Systems with Guix https://mail.gnu.org/archive/html/guix-devel/2023-03/msg00363.html
<gnucode>whereiseveryone: that certainly looks cool. Will it be recorded?
<sneek>dsmith: wb!!
<whereiseveryone>gnucode yes it will
<dsmith>sneek, botsnack!
<sneek>:)
<unmatched-paren>hello guilers, is it possible convert a record into a struct and then iterate over its fields somehow?
<unmatched-paren>or just iterate over the field
<unmatched-paren>fields
<unmatched-paren>oh, i think i've found it
<jlicht>Is there anything I need to do to have (web client)'s http-get decode UTF-8 in response bodies?
<unmatched-paren> https://paste.sr.ht/~unmatched-paren/ba9e347aec589fe3572e07d5baf51e0dd7a2e70b <- i got it working :)
<mwette> unmatched-paren: sweet
<unmatched-paren>is there a list of *all* fundumental compound objects? i know there's cons cells, vectors, structs, and records (which are based on structs but I don't see a way to "lower" them), but i don't know if there are more
<unmatched-paren>(i'd like to make a sort of "generic map" structure)
<unmatched-paren>s/structure/procedure/
<mwette>I could be wrong, but I thought structs and records are really vectors
<unmatched-paren>oh, are they? interesting...
<mwette>In guile, records are structs, i think. What about bytevectors and bitvectors?
<unmatched-paren>oh, yeah, those
<mwette>I think a struct is a vector where the first element is a vtable.
<mwette>Thought I think (vector? x) will fail on records and structs. But I'd bet (struct? x) on a record x will succeed.
<mwette>Just tried. Yes, for (srfi-9) record type x (struct? x) => #t
<mwette>And (vector? x) => #f, so scratch that claim.
<unmatched-paren>does dynamic-wind return the last value in THUNK?
<sneek>Welcome back dsmith!!
<dsmith>sneek, botsnack
<sneek>:)
<unmatched-paren>ACTION tests, it does
<haugh>(match (make-rec 0 1) (($ <rec> fields ...) fields)) ; ⇒ 0
<haugh>:/
<haugh>this ellipsis does nothing. too bad! it would basically solve that entire problem
<lloda>old: what is a synchronization point? i don't see the expression used in the Guile sources
<lloda>i was reading https://www.cons.org/cracauer/sigint.html and trying to understand Guile's SIGINT handler in light of that
<lloda>bytevectors and bitvectors are their own types, i mean they have unique scm_tc7_xxx tags
<lloda>that is explained in libguile/scm.h
<unmatched-paren>why does this return "" rather than "Hello.", even if it's evaluated several times?
<unmatched-paren> https://paste.sr.ht/~unmatched-paren/279c4a1e94be7ca63aeeca16d4f29ff92e54c90e
<old>lloda: Look at 6.22.3: Asynchronous interrupts
<old>the primitives system-async-mark, call-with-[un]blocked-asyncs
<old>As an implementation detail, signal handlers will effectively call ‘system-async-mark’ in a signal-safe way, eventually running the signal handler using the same async mechanism.
<old>look at libguile/asyn.c the procedure scm_async_tick()
<mwette>unmatched-paren: try adding (force-output port) after (newline port)
<unmatched-paren>mwette: i've tried that
<unmatched-paren>but adding (seek port 0 SEEK_SET) works
<old>unmatched-paren: that how file descriptor work at the OS level
<old>writing to a port move the cursor of the underlying filedescriptor
<old>seeking to the beginning effectively reset that cursor
<unmatched-paren>old: thanks, that makes sense
<old>it's a common problem for me at least
<unmatched-paren>ACTION wishes Guile had a REWIND procedure...
<lloda>so do we need to have scm_async_tick () calls in more places (?)
<old>lloda: not sure. scm_async_tick seems to be used whenever there's an EINTR coming from libc
<old>not in a lots of place
<old>there's no definition of what's a safe-point
<old>nor if a guile procedure that do a lot of computation will ever be in a safe-point
<old>Are safe-points only defined in C?
<old>Lot's of hole here to fully understand
<lloda>yeah
<lloda>i think at the very least when guile writes to the terminal, it should let you interrupt it
<old>well writing is a system call
<old>interrupting a systemcall usually return EINTR
<old>Guile check for EINTR in such place to run async stuffs
<lloda>but it doesn't really work rn
<old>right I know your case, I've had the same frustration many time :-p
<old>maybe civodul or wingo would know more about it
<dsmith>rekado, Ahem.. Logs...
<unmatched-paren>Is it possible to create some kind of "compound port" that when written to will output to multiple other ports?
<unmatched-paren>A bit like the tee(1) command...
<flatwhatson>unmatched-paren: it's certainly possible to write one using custom ports: https://www.gnu.org/software/guile/manual/html_node/Custom-Ports.html
<unmatched-paren>flatwhatson: oh, nice, thankn
<unmatched-paren>thanks
<rekado>dsmith: https://logs.guix.gnu.org/guile/2023-03-31.log#012408
<rekado>I restarted it now.