IRC channel logs

2021-12-06.log

back to list of logs

<apteryx>'Eich started work at Netscape Communications Corporation in April 1995. Eich originally joined intending to put Scheme "in the browser",' --> something went horribly wrong
*apteryx was reading https://en.wikipedia.org/wiki/Brendan_Eich
***Server sets mode: +ntz
<daviid>spk121: in guile-gi, do you [automaticlly] 'drop' the user_data_free_func argument [ refering to callback support/implementation ] or not? - for example, a call to gtk_list_box_bind_model in guile-gi, would users pass 4 or 5 args?
<spk121>daviid: in many places, leaving off the final args becomes NULL if the GI info says they are "nullable"
<daviid>the gi info of what arg? in the gtk_list_box_bind_model, user_data_free_func is not "nullable", and yet pygobect api doesn't require the arg ... i am trying to understand the logic to do this atomatically, in g-golf ...
<daviid>spk121: here is the [g-golf] gtk_list_box_bind_model signature - https://paste.debian.net/1222187/
<lilyp>haven't worked with Guile-GI in a while, but I'm p sure that user_arg and user_arg_free should always be null, favouring Scheme closures
<lilyp>forgot if that was implemented or you had to manually pass null
<daviid>lilyp: right, thatis the quiz:)
<daviid>pygovject forces the user to pass user_data, and drops (at import), so it hides the user_data_free_func
<daviid>and the question here is the algorithm, based on the arg def, what 'heuristic/data/name, whatever' can a gi binding implementation autonmatically drop, for example, the arg described as in line 166-191 in the above paste...
<opalvaults>hey all, can someone tell me if you're able to write emacs packages in guile, or if that effort had been halted at a certain point in time. I remember reading a mailing list entry dated ~2011? where interest was expressed in completely replacing emacs lisp..
<lilyp>opalvaults you can extend Guile Emacs in Guile, but it's currently lagging behind GNU Emacs
<opalvaults>lilyp: I didn't even know guile emacs was a thing :O cool. thanks for the info :)
<lilyp>daviid: there ought to be a GI annotation telling you [user_data for callback] and [user_data_free for callback]
<daviid>spk121: do you actually refer/use the closure/destroy index of the create_widget_func
<daviid>or something else?
<lilyp>Guile-GI has a very elaborate way of parsing such extra data in it's arg_map data structure.
<daviid>lilyp: all gibinding has the 'same 'elaborate way of parsing ...
<daviid>guile-gi isnt any more orless elaborate then anyother gi langbind :), the info ewe parse is the same ... anyway, i am looking for a concrete answer of the algorithm, not to talk about ...
<spk121>daviid: sorry, I've been AFK for months and am just getting back into it all. lilyp may know off the top of her head, but, it would take a bit to stand up a test case
<daviid>spk121: i thought you'd know exactly where that is implemented in guile-gi :) - don't worry, i'll find the exact way to ... tx
<lilyp>I think the test case would be trying to call that function with three arguments and seeing what happens
<lilyp>if it exists it's in gig_arg_map.c and gig_argument.c
<daviid>spk121: was reading gig_argument.c and gig_callback.c, but couldn't answer my quiz
***molybdenum.libera.chat sets mode: +o ChanServ
<lloda>i pushed a patch to provide srfi-4-vector-type-size from (srfi srfi-4 gnu). That's the same as SCM_BYTEVECTOR_TYPE_SIZE in C, but bytevectors having a type isn't part of the bytevector API so it seemed better to expose it as an srfi-4 extension
***taylan2 is now known as taylan
<winning-luser>Funny warning when running `./configure' for Guile 3.0.7 on Fedora 34:
<winning-luser>configure: WARNING: *** GNU Readline is too old on your system.
<winning-luser>configure: WARNING: *** You need readline version 2.1 or later.
<winning-luser>But my install readline version is 8.1
<winning-luser>installed*
<daviid>winning-luser: [i'm not a guile maintainer] the GUILE_READLINE macro that guile's configure.ac calls is defined in acinclude.m4, which should help to to further track down why this happened ... fwiw
<RhodiumToad>sneek, botsnack
<sneek>:)
<RhodiumToad>sneek, later tell civodul re. (aif), it's worse than that, it also doesn't work at all if used inside another macro, e.g. (define-syntax-rule (foo bar) (aif bar (display it) (display "no"))) can fail with 'it being unbound
<sneek>Okay.
<RhodiumToad>sneek, later tell civodul you're correct that a syntax parameter is the correct solution of course
<sneek>Got it.
<lilyp>daviid: You might want to annotate this code region to print out the argument map of a callback: https://github.com/spk121/guile-gi/blob/366f9f974916f10eaf8d11898e329b274017248c/src/gig_data_type.c#L240-L252
<lilyp>the comment says it's not used, but I don't trust comments
<civodul>RhodiumToad: sneek just sent your reply on #guix, makes sense!
<RhodiumToad>oh, it crosses channels? weird, I did not expect that
<RhodiumToad>the syntax parameter approach seemed to end up like this:
<lampilelo>fun
<RhodiumToad>(define-syntax-rule (aif val then else ...) (let ((%it val)) (syntax-parameterize ((it (identifier-syntax %it))) (if %it then else ...))
<fnstudio>hi, sorry, i'd like to quote a string from inside a docstring, like "Get a list from a string of values "0 1 2"", i suppose i need to escape the quotes
<fnstudio>i mean, is there any more idiomatic way of doing it?
<RhodiumToad>not that springs to mind
<fnstudio>RhodiumToad: ok, awesome, thanks
<fnstudio>just wanted to make sure i wasn't missing any obvious alternative
<fnstudio>thanks
<fnstudio>and... suppose i have a list '(0 1 2 3 4) and i want to assign separate values to separate variables...
<fnstudio>i'd be tempted to do it as (let ((var0 (first lst)) (var1 (second lst)) ...
<fnstudio>but that results in the list been walked through (at least part of it) each time
<fnstudio>i suppose i could create a copy of the lst at the beginning and then destructively pop the first item and associate it to a variable in a for loop?
<fnstudio>which also sounds a bit of an overkill for short lists?
<fnstudio>any other pattern i'm missing?
<RhodiumToad>match
<fnstudio>ah!
<RhodiumToad>or let-values and unlist
<fnstudio>niceee, let me have a look!! supertx!!