IRC channel logs

2020-02-05.log

back to list of logs

<daviid>heya guilers
<sneek>Welcome back daviid, you have 3 messages.
<sneek>daviid, str1ngs says: thank you I would start with this example.
<sneek>daviid, str1ngs says: hello daviid when you have a second can you look at this example. http://paste.debian.net/1128761 . calling run javcript gives "match" "no matching pattern" callback. Here is the webkit reference https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-run-javascript . I'm assuming GAsyncReadyCallback has not been implemented? note I'm not actually calling using this asynchronously
<sneek>daviid, str1ngs says: also GAsyncReadyCallback reference https://developer.gnome.org/gio/stable/GAsyncResult.html#GAsyncReadyCallback
<dsmith>greets
<dsmith>Does anyone remember some Guile code that would make a dot dependency graph of which modules use which modules?
<daviid>dsmith: greets
<dsmith>I can't seem to find it in the guile sources. Or the scwm sources. And I *know* I was using something like that at one time..
<dsmith>Was tracking down circular dependencies in scwm.
<dsmith>Heya daviid
<daviid>dsmith: I can't help, though I have a (very) vague memory of this being mentioned here, a (few? :)) decade(s) ago, not sure
<dsmith>No worries.
<dsmith>grep and sed and echo to the rescue.
<dsmith> echo 'digraph g {' ;grep ':use-module (app scwm' *.scm | sed -n 's/.scm:.*#:use-module (app scwm//p' | tr -d \) | sed 's/ / -> /'; echo '}' ) > ~/deps.dot
<dsmith>(as a start anyway)
<daviid>dsmith: if scwm is in guix, guix has one, afaict, i still don't use guix :)
<daviid> https://guix.gnu.org/manual/en/html_node/Invoking-guix-graph.html
<daviid>oh, you mean strict guile scheme modules, forget about mu suggestion then ...
<daviid>str1ngs: could you please repost, the debia pate expired, sorry
<daviid>str1ngs: this link expired http://paste.debian.net/1128761
***jonsger1 is now known as jonsger
<str1ngs>daviid: here you go. http://paste.debian.net/1129210
<daviid>ok tx, will look at it asap
<str1ngs>my closure might be wrong. it replicates the C signature. though passing NULL or #f would be enough for now.
<dsmith>daviid: Yeah, just within scwm. It's old. From around Guile 1.3.5 I think.
<apteryx>what's the most idiomatic way to solve a problem where I have two same length lists, and one of the lists contains a boolean that "enables" or "disables" the values of the second list? The goal is to recreate a list with only the "enabled" values.
<dsmith>I'd look at filter. Can filter take multiple args like map?
<RhodiumToad>fold-right?
<RhodiumToad>filter only takes a predicate and one list
<dsmith>Bah. Battery died.
<apteryx>dsmith: yikes. This used to happen to me a lot because of my use of ratpoison (lack of any notification system).
<apteryx>now I have an mcron job that beeps the battery before it does ;-)
<apteryx>beeps the PC speaker*
<apteryx>RhodiumToad: fold-right. Will read on it.
<apteryx>thanks
<dsmith>scheme@(guile-user)> (use-modules (srfi srfi-1))
<dsmith>scheme@(guile-user)> (filter-map (lambda (p v) (if p v #f)) '(#t #f #t #f) '(a b c d))
<dsmith>$1 = (a c)
<RhodiumToad>ahh, filter-map
<RhodiumToad>hm
<dsmith>Only tricky thing, is if your "value list" has any #f values, they will be removed..
<RhodiumToad>that'll be a problem if any element of the list is itself #f, though?
<dsmith>Yep
<dsmith>In Haskell, I'd try some combo of zip filter and map. But I'm just learning.
<daviid>str1ngs: the problem is that g-golf still misses an implementation for callback GIArgument types
<daviid>str1ngs: for info, when the type-tag of an argumet is interface, currently g-golf handles enum, flags, struct and object, so I need to work on this to also handle callback - for info as well, you may look at (g-golf hl-api function), prepare-gi-args-in (line 562 ...), then the match type-desc starts line 580, and fails since there is no 'callback type-desc code yet :)
<chrislck>(fold-right (lambda (a b c) (if a (cons b c) c)) '() p v)
<dsmith>There ya go.
<daviid>str1ngs: i run your example, manually scroll down and how funny: on the bottom right of the page, "Today's random packageā€¦" Guile-gome :):)
<dsmith>So no one does corba with gnome anymore, right?
<daviid>str1ngs: it might be interesting to display the 'full url' 'somewhere' when we hover over a link (?)
<daviid>dsmith I don't know, but isn't it that corba has been deprecated, not sure
<daviid>str1ngs: because of this missing callback type, even if yu pass #f or %null-pointer, it will raie an exception
***jonsger1 is now known as jonsger
<str1ngs>davexunit: thanks for the feedback. for now I'll use a typelib function when I need to call javascript.
<str1ngs>daviid: hovering over a link my actually be more of a challenge then you might thing. unless webkit has some primitive for this. Which as far as I know it does not. you would have to use DOM introspection. which requires either javascript injection or IPC via a web extension. javascript would need the missing GAsyncReadyCallback at the very least. for nomad I'm hoping to add some kinda DOM introspection that uses scheme, but I think
<str1ngs>that will be quite the challenge. see https://wiki.gnome.org/Projects/WebKitGtk/ProgrammingGuide/Cookbook#Dealing_with_DOM_Tree for reference.
<str1ngs>daviid: if you think of anything in regards to DOM introspection. let me know it's not going to be an easy problem to solve I think.
<civodul>Hello Guilers!
<nly>hi civodul :)
***lavaflow_ is now known as lavaflow
<lloda>scm_array_handle_bit_elements_offset is undocumented (?)
<lloda>oh it's mentioned, just no heading and not in the index :-/
***dddddd_ is now known as dddddd
<dsmith-work>{appropriate time} Greetings, Guilers
***matijja``` is now known as matijja
<bandali>greetings
<bandali>dsmith-work, are you the author/maintainer of sneek?
<sneek>I'll keep that in mind.
<dsmith-work>bandali: Ya
<bandali>dsmith-work, cool! would you consider changing the "tell" functionality to default to "later", and only relay the message immediately with "now"?
<bandali>it's a somewhat regular occurrence over at #guix :-)
<bandali>also, is it free software?
<dsmith-work>bandali: Yes, I'd like to fix that. Its just very lightly warmed over port of the old sarahbot that used to inhabit #scheme
<bandali>dsmith-work, ah, thanks. i'd be happy to send a patch if it's free software. if not, i'll leave you to it :-)
<dsmith-work>Which was running on some JVM based Scheme. (can't remember at the moment)
<dsmith-work>bandali: I'd like to release it, but I have a lot of work to do on it first. And i've just been busy with other stuff.
<bandali>dsmith-work, awesome! and gotcha, no worries. would appreciate a ping if/when you get around to doing it
<sneek>Will do.
<daviid>str1ngs: I want to fix the missing gi-argument and g-value array types first - and while working on it, I can look at and fix 'implemented feature' bugs - then I will look at the callback gi-argument type
<daviid>str1ngs: wrt webkit2 'hover feedback', I know next to nothing about webkit2 and even less about DOM ... but I'd look at and snarf some of the epiphany-browser code, which does exactly that ... my 2c
<daviid>*hver user feedback
<str1ngs>daviid: regards to g-value array etc . thanks for looking at that. meantime it's not a huge rush. for types g-golf can't handle right now I just call via my typelib.
<str1ngs>daviid: epiphany uses a web extension . which means a client/server model using DBUS
<str1ngs>eventually though maybe if I wire up an extension I could use g-golf with https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebPage.html. that might allow DOM introspection with scheme :)
<daviid>str1ngs: you should be able to just introspect a WebKitDOMDocument
<str1ngs>daviid: yep, but that's only available from the webkit process when it loads an extension. which is the PITA part
***ng0_ is now known as ng0
<civodul>i see "anon" entries in (statprof) profiles and i wonder in which case we should expect Guile to lack source location info
***janneke_ is now known as janneke
*civodul just watched https://fosdem.org/2020/schedule/event/guile2020/ -- pleasant & insightful!
<lfam>Agreed, great talk from wingo!
<civodul>it's good to hear a reflection on the user base, handling changes, etc.
<civodul>i tend to be conservative, but i think Guile 2.0 upwards has done a great job at handling changes
<civodul>the 1.8 to 2.0 was a bit more bumpy :-), but that was probably unavoidable
<civodul>*transition
<dsmith-work>civodul: Yes. Getting the bot running on 3.0 was not near as traumatic some of the previous efforts.
<civodul>yeah
<civodul>changing GCs would have the potential to be traumatic, as wingo mentions