<butterypancake>so my employer is threatening me that they might make me create a gui soon <butterypancake>I've never used guile but it looks interesting. If I write the backbone in guile it's easy to write a minmal javascript frontend? <RhodiumToad>butterypancake: are you looking to display in a browser or just be an ordinary GUI app? <butterypancake>he wasn't super specific but we've done both before as a company so yes <butterypancake>I would like our apps to be CLIs so I can script tests. Ideally I'd then have buttons in a web app or native gui just call the snippet that the corresponding CLI command would do <butterypancake>Our apps don't have a lot of configurations. Our previous GUIs have like 10 buttons tops and maybe 1 or 2 text boxes for input (usually number inputs) <butterypancake>we usually deploy to windows but linux is a posibility (one which I personally want to keep open because I like FOSS) <RhodiumToad>I don't know offhand of any good way to do a native gui on windows from guile, so I guess webapp would be the way to go ***catonano_ is now known as catonano
<butterypancake>does it produce a file with only the SCM marcro expansions, or is it everything else too <butterypancake>I think I'm missing the info page where it describes snarfing. I've got the function snarfing page and snarfing macros page. is there one for what snarfing is? <dsmith>You need more than just writing C functions. You also need to add the C funcs to the Scheme symbol tables. <dsmith>"snarfing" is a separate preprocessor pass expands the function definition macros into C code that loads the Scheme symbol table. <dsmith>It writes out .x files, which the C code then includes. <dsmith>Usually inside of some kind of init function. <dsmith>The .x files usually contain a sequence of scm_c_define_gsubr() calls. <daviid>tohoyn: you may always ask, because whn I am not or not availabl, I read the log and answer lter, when I can ... <tohoyn>daviid: ok. you probably noticed my message about G-Golf autogen.sh. <daviid>tohoyn: others may answer as well ... <daviid>automae as always worked ... i did suspect an installation problem <reepca>are the revealed-count modifications in port->fdes and release-port-handle thread-safe? <tohoyn>daviid: it would be convenient for me to have getters and setters in addition to accessors <tohoyn>daviid: because Theme-D doesn't have accessors <tohoyn>daviid: so that getters and setters are automatically imported when their class is imported <daviid>tohoyn: all methods associated with GIObjectInfo are imported <tohoyn>daviid: yes, but the importing is not the main thing in this <tohoyn>daviid: if G-Golf had getters and setters I could just "import" them to Theme-D <tohoyn>daviid: I'll think about this a little more. Perhaps I could implement getters and setters using accessors (in Theme-D). <tohoyn>daviid: i.e. to generate the getters and setters automatically <daviid>but you have those, they are provided by the typelib itself, currently as 'long names', do plan to implement shortname methods, but that is not the highest priority for now ... <tohoyn>daviid: I they imported by G-Golf? <tohoyn>daviid: how are they named? consider e.g. can-default property of <gtk-widget>. <daviid>you already know that :) - gtk-widget-get-can-default ... <tohoyn>daviid: it seems that getter and setter of GtkWindow property default-width are not imported. <daviid>it is not provided by Gtk itself ... you must use the property accessors, oor gtk-window-get-default-size <tohoyn>daviid: gtk-window-get-default-size is not available <tohoyn>daviid: but gtk-widget-get-can-default is <daviid>tohoyn: it is available, but I see, testing it, there is a bug when there was no default-size specified at creatio time ... will fix it <daviid>tohoyn: yes, i was working on it, it is because it s type is 'interface, not a 'object - will fix that to, tx for the report <daviid>tohoyn: i pushed a fix for fundamental 'out args that may return NULL, you may pull, make, install and try gtk-window-get-default-size <daviid>tohoyn: the 'interface type is far more compicated to solve, but I'm on it, I was already on it ... it will take some time, but I will let you know ... <tohoyn>daviid: gtk-widget-set/get-can-default work fine <daviid>but you pass one arg only, it needs both the width and height <daviid>which is what the error message reports ... <daviid>*you pass two args, it needs three args ... ***apteryx_ is now known as apteryx
<tohoyn>daviid: ok, the calls work now but get-default size returns two #f's after I do set-default-size. <tohoyn>daviid: gtk-window-get/set/-default-width are still not defined <daviid>it is not defined, in is not in Gtk <tohoyn>daviid: ok. I meant earlier that just this kind of getters and setters would be useful for me. <tohoyn>daviid: the property is defined, though <daviid>tohoyn: I won't provide things that are not in the typelib <daviid>but of course you may define those yourself ... <tohoyn>daviid: yes, I'll try to autogenerate the getters and setters for Theme-D <wingo>i wonder what a scribble-like approach to texinfo would look like <civodul>the surface syntax is not too dissimilar <civodul>but yeah, there's room for exploration in that area! <wingo>no idea why people do cdn's tbh for projects like this, are their bandwidth bills really that high? weird <civodul>i'm not convinced the module bit is really important here <civodul>there's a reader that turns the documents into Scheme <civodul>and then you can choose to write "mostly text" or "mostly code" <daviid>tohoyn: I pushed a fix for gtk-window-set-default-size - Note that now, and that is the expected behavior, as described in the Gtk doc, gtk-window-get-default-size will return -1 -1 when default size has not been explicitly set <daviid>tohoyn: ther ar still other fundamental tag types for 'out args, when you hit one let me know ... <daviid>*still missing/no well defined ... <tohoyn>daviid: OTOH gtk-list-store-set-value works. The string-pointer property of the last argument of gtk-list-store-set-value is #<unbound> whereas for gtk-tree-store-set-value #f. <tohoyn>It would be nice if you could run/load compiled guile programs directly from the guile command line, like "guile -e main -s program.scm" works for Scheme files. <str1ngs>tohoyn: you mean from the REPL? is so you can do (main '(arg0 arg1)) <str1ngs>provided you load the file of course. <tohoyn>str1ngs: I mean shell command line <str1ngs>maybe I misunderstand. but you can use guile -e main -s . in a shebang <str1ngs>so you can then do ./foo.scm arg1 arg2 <tohoyn>can I access the fields of unions and structs in G-Golf? I need fields of GdkEvent and GdkEventWindowState. <str1ngs>you can use accessors to get GdkEvents for example on key-press you would use (!keyval event) <str1ngs>I eported to html until daviid has a new release. ***amiloradovsky1 is now known as amiloradovsky
<tohoyn>str1ngs: I read the documentation but I found no way to access fields of a GdkEventWindowState <tohoyn>daviid: function gtk-action-group-add-actions is undefined ***rekado_ is now known as rekado
<tohoyn>when I try to access a menubar defined with GtkBuilder I get the following error: No variable named <g-menu> in #<directory (g-golf hl-api object) 55c15f35f500> <tohoyn>the function causing this is gtk-builder-get-object <str1ngs>tohoyn: I have not used GtkBuilder with g-golf. I find it easier to create my widgets using goops classes <str1ngs>tohoyn: generally No variable named <g-menu> can be resolved by import it's Namespace. provided the type is supported by g-golf of course. <str1ngs>tohoyn: what signal uses GdkEventWindowState? <str1ngs>I should be able to test that signal with GtkApplicationWindow? <str1ngs>tohoyn: what do you need from this event? ***wxie1 is now known as wxie
<tohoyn>str1ngs: changed-mask and new-window-state <heisenberg-25>How do I change the value for a specific key in a hash table that is stored in an atomic box? (ice-9 atomic). <str1ngs>tohoyn: as far as I can tell <gdk-event> is not complete yet. I think it's best to wait for daviid to help answer this question. <tohoyn>str1ngs: ok. I'll code the menu bars and tool bars without builder or UI manager. <str1ngs>tohoyn: probably you can use builder to a limited degree. but for custom widgets I doubt it will work since you need to provide a class init for those things <str1ngs>tohoyn: looks like builder works to a degree ***leoprikler_ is now known as leoprikler
<tohoyn>str1ngs: do you have any example about implementing menu bars and menus without ui manager? <dsmith-work>butterypancake: Did you see my message about snarfing? <daviid>tohoyn: str1ngs: I will read and answer/solve what you wrote about ... but anything complcted, then it comes after this 'interface problem I was and still eed to work on ... <daviid>tohoyn: you should _never_ access gdk-event fields 'yourself', and fwiw, in gtk4 it will be an opaque struct - if you miss an api, let me know, but I thought I did implement most of them ... <tohoyn>daviid: it should be possible to access different event types (GdkEvent is a union of them) and fields of each event type (a struct type) <daviid>tohoyn: you may access the state of a gdk-event sing (!state a-gdk-event-instance) - all this is in the g-golf manual, please read that section, it's good, if not feedback welcome ... <daviid>tohoyn: yu should use the accessors g-golf provides <tohoyn>daviid: is it possible to access fields of GdkEventWindowState? <daviid>forget bout how there are represented, this will becoe totally hidden in gtk4, and you don't need to know this to use gtk3, just use the accessors <daviid>could you build locally and read the manual ... <daviid>str1ngs: you can locally install the html doc running make install-html, fwiw <tohoyn>daviid: is it possible to access fields changed_mask and new_window_state (GdkEventWindowState)? AFAIK !state is not related to GdkEventWindowState. <daviid>tohoyn: it's not related, I've asked about those accessors on #introspection - let's see <daviid>sneek: later tell tohoyn wrt the gtkbuilder - <g-menu> related bug, could you prepare a snipset, so I can reproduce locally. tx <sneek>dsmith, dsmith-work says: something else <sneek>dsmith was in #guile 16 hours ago, saying: The .x files usually contain a sequence of scm_c_define_gsubr() calls.. <sneek>RhodiumToad was in #guile 0 seconds ago, saying: sneek: seen RhodiumToad?. <dsmith-work>No other indication of where thats happening. Not sure what is triggering it. <str1ngs>daviid: yes, I know I build the docs and pushed to a server so I could give tohoyn something to reference. <daviid>ah ok, the doc is online as well, but maybe not the very latest, need to update that <daviid>str1ngs: I ned to add a C function to libg-golf <daviid>because those very specific gdk accessors are not in gdk itself <str1ngs>the struct fields that tohoyn needs? also I don't think !state works for that window signal. <daviid>so I don't have to rewrite everything <str1ngs>I have a huge znc despite not being in the channle haha <daviid>do yu know what header file I need to add to have access to gdkevent and genevent structures, so i can add a C function ... <str1ngs>daviid: it's probaby /usr/include/gtk-3.0/gdk/gdkevents.h <daviid>ah, wait, ebassi is answering on #intrspection <str1ngs>I don't think they are meant to be used this way. <str1ngs><gdk/gdk.h> makes more sense from what ebassi is saying. <str1ngs>sometimes you need to include some platform stuff but it's rare. <str1ngs>and gdkevents.h is found with gtk, strange <str1ngs>offtopic I thought PKG_CHECK_MODULES already did AC_SUBST <str1ngs>daviid: I need to afk for awhile, but I'll check the back logs when I get back. <rekado>still WIP but I thought it might already be useful <RhodiumToad>the channel message should maybe be updated to point to the right site? <lfam>RhodiumToad: That's not what I am seeing <RhodiumToad>someone with owner privs (rlb, civodul, wingo) can update the join message with a chanserv command <RhodiumToad>with /msg chanserv set #guile entrymsg ...text of message here... ***ChanServ sets mode: +o civodul
<iv-so>Hello, everyone. Is there a reliable way to find guile bytecode among other ELF binaries? Can I strip .go files? If so, how to do it? <RhodiumToad>you can check things like the machine type, ABI, and the presence of .guile.* sections? <daviid>rekado: I wnted to try the earch, thanks - but I've just noticed, while trying, that if I am in a log, today's #guile log for example, 24.04.2020, then hit back to list of logs, in brings me back to the list of #guix logs :) <daviid>rekado: by the way you changd the order of the logs date, thanks! much better for the 'usual case' ... <iv-so>Thanks for answer. Will try. <civodul>C-c C-k and declarative modules don't go together well