***iskarian is now known as Guest427
<dsmith>RhodiumToad: How about non-continuable-error? ? <RhodiumToad>dsmith: that doesn't do what you might think it does <RhodiumToad>that tells you whether an exception object has a &non-continuable element in it <dsmith>I was thinking that depends on how the exception was raised. If the continuable flag was set or not. <dsmith>Up to the coder of the exception to get it right. Right? <dsmith>That section of the manual is a bit light on examples. <RhodiumToad>(with-exception-handler (lambda args (format #t "print2 ~S ~S\n" args (non-continuable-error? (car args))) 'continued) (lambda () (raise-exception (make-exception (make-error) (make-exception-with-message "foo!")) #:continuable? #t))) <RhodiumToad>(with-exception-handler (lambda args (format #t "print2 ~S ~S\n" args (non-continuable-error? (car args))) 'continued) (lambda () (error "foo!"))) <RhodiumToad>that clearly isn't a continuable error, get non-continuable-error? still returns #f <dsmith>If you set #:continuable? to #t or #f, non-continuable-error? always is #f <RhodiumToad>right, because non-continuable-error? is a property of the exception object, not of the way it was raised <RhodiumToad>non-continuable-error? is true only for exceptions of type &non-continuable <RhodiumToad>(which happens to be what gets raised if you try and continue after raising with #:continuable? #f) <dsmith>I wonder if this is what was intended. <dsmith>sneek: later tell wingo So what's up with #:continuable? ? *daviid added a revealer.scm (g-golf) example (based on the revealer.c, from gtk-4-examples that comes with gtk-4) which demonstrate how to use <gtk-builder>, <gtk-revealer>, g-timeout-add and a detailed signal-name - the screenshot is 'static', but the 'real' example 'animates' 9 revealer instances, fun :) <wingo>dsmith: honestly, not very fleshed out. such an exception needs to be raised via raise-continuable tho <sneek>Welcome back wingo, you have 1 message! <sneek>wingo, dsmith says: So what's up with #:continuable? ? <wingo>or raise exn #:continuable? #t <wingo>hey ppl, any idea why MysteriousSilver can't post to the channel? <wingo>is the channel misconfigured or is there something MysteriousSilver should do? *wingo irc idiot who happens to have op privs <taylan>we're probably still registered users only? <lloda>I did need to register before i could post ***chris2 is now known as Guest3021
<lloda>erc didn't tell me anything, my chat window looked as if the messages were getting through, but they weren't ***Guest3021 is now known as chrislck
<chrislck>Is there anyway to assign some guile code to be called when a SCM object gets gc'd? <chrislck>(let ((my-object (newArray))) ...work on my-object...) <chrislck>my-object will eventually be gc'd but the newArray is C code which allocates and must be freed. <chrislck>(let ((my-object (newArray))) ...work on my-object... (freeArray my-object)) <RhodiumToad>wingo: the channel is set to that unregistered users can join but not speak; if you want to change that, you can remove the -q $~a mode <leoprikler>chrislck: there are finalizers, specifically pointer finalizers <chrislck>thx both -- finalizers are very new to me. is there a one-liner that I can use? <leoprikler>not so much a one-liner, but we've used them e.g. in guile-fontconfig (no release yet, but it works™ for some tests) <RhodiumToad>is there a way to use finalizers from pure guile code (i.e. not using C)? I didn't find one on a quick search <sarna>hey, which architectures does guile support? is it only x86_64 and i386? I can't really find it on the main page <wingo>jit support on arm64, armv7, i386, x86-64. without jit on pretty much everything else that you can compile linux on. not great windows support currently tho <sarna>hey wingo, I just watched your talk! :D I was mostly wondering if I could run guile on my RPi, thanks! *RhodiumToad has run guile on an rpi <RhodiumToad>had to fix some bugs, but those fixes are all in recent versions <RhodiumToad>pretty sure all of the code outside the jit library itself is intended to be architecture-neutral <RhodiumToad>the channel is currently set to only allow registered and identified nicks to talk <RhodiumToad>it's to cut down on spam, though it may not be necessary <sarna>damn, I can't install guile on my RPi :( aarch64, debian <sarna>complains about libc6 version (expects >= 2.29 but debian only has 2.28 it seems) <sarna>if I try `apt install guile-3.0` it complains that I don't have guile-3.0-libs, if I try `apt install guile-3.0 guile-3.0-libs` it tells me libc6 is too ancient <RhodiumToad>and I don't use linux so probably not the best person to help <chrislck>leoprikler: thx looks like it's the solution :) <sarna>RhodiumToad: what do you use? BSD? <RhodiumToad>(for which guile does need a couple of patches, mainly to do with bad assumptions about off_t) <RhodiumToad>(thanks to *BSDs having never been infected by the ghodawful largefile hacks) <chrislck>leoprikler: looks good. however my constructor doesn't need an argument, and am struggling to make it work. <chrislck>something like (newArray)... it's populated via something like (InsertAt array 1 1) and finalized via (freeArray) <dsmith>sarna: The bot here ran on an rpi for a while. Now it's on a beaglebone black. <rlb>Oh, though I should perhaps mention that on some of the platforms some tests have been marked as "unreliable", and their failures ignored. <sarna>dsmith-work: it's a pretty small board! my rpi is beefier, I got the new one <sarna>rlb: thanks, that's a lot of archs 👀 <leoprikler>chrislck: you should still have something like an array* that's returned by newArray and wrapped by your <array> <sneek>Welcome back vijaymarupudi, you have 1 message! <sneek>vijaymarupudi, leoprikler says: scm_gc_protect <vijaymarupudi>ah yes, that's for storing it in the heap, I think I can live with the gc for the stack variables for now <vijaymarupudi>I wanted to ask for any large guile project I can read the source code of and learn from! <maximed>any particular reason bytevector=? doesn't accept offset & length arguments, or a bytevector-range=? doesn't exists, besides ‘that's not RnRS’? <maximed>fwiw, I worked around this lack with bytevector->pointer & pointer->bytevector <maximed>maybe something for (system foreign): (define (bytevector-range bv offset length) (pointer->bytevector ...))? <maximed>I've seen the combination pointer->bytevector & bytevector->pointer a few times before (or was it the other way around?) <vijaymarupudi>sarna: haha I was expecting that :) however I suspect that it's macro heavy, which might be a bit difficult for me to understand right now <maximed>except for the 'package' macro, Guix doesn't use macros all that much <maximed>There are plenty of procedures in guix/lint.scm, for example <maximed>lilypond hould be a good example of a guile project as well <maximed>And gexp (#~) is a macro as well. Actually, Guix uses plenty of macroology. But there's plenty of ‘procedurology’ as well. <leoprikler>Don't forget about Guix' advanced record wizardry.