IRC channel logs

2020-04-24.log

back to list of logs

<butterypancake>so my employer is threatening me that they might make me create a gui soon
<butterypancake>I did web dev for 3 months once and I really didn't like it
<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)
<RhodiumToad>what platforms would you need to run on, if native?
<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>I'm not sure I quite understand what this snarfing thing does
<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.
<tohoyn>daviid: are you there?
<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
<daviid>which you apparently solved ...
<daviid>I am on debian testing to, fwiw
<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
<tohoyn>daviid: just like other methods
<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: great!
<tohoyn>daviid: I they imported by G-Golf?
<daviid>all methods are imported
<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>tx
<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
<tohoyn>daviid: gtk-tree-view-get-model returns a pointer instead of an <gtk-list-store> object. see https://paste.debian.net/1142716/ .
<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: there is something wrong with the getters and setters. see https://paste.debian.net/1142717/ .
<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.
<daviid>ok will look
<tohoyn>daviid: gtk-window-get/set/-default-width are still not defined
<daviid>it is not defined, in is not in Gtk
<daviid>that's not a g-golf 'problem'
<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
<tohoyn>daviid: ok
<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>hey wingo
<wingo>heya :)
<civodul>the surface syntax is not too dissimilar
<civodul>but yeah, there's room for exploration in that area!
<wingo>looking at https://docs.racket-lang.org/scribble/layers.html it sounds tricky, a scribble approach produces a module rather than a datum
<civodul>arf, cloudfare :-/
<wingo>yarr
<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>like in Skribilo
<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
<tohoyn>daviid: ok
<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: function gtk-tree-store-set-value does not work. see https://paste.debian.net/1142735/ .
<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.
<daviid>ok, will look
<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>str1ngs: yes
<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>and (!type event) to get the type
<str1ngs>tohoyn: here in this updated docs you can see GdkEvent. https://bufio.org/doc/g-golf/Events.html#Events
<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
<tohoyn>daviid, str1ngs: is GtkBuilder supported by G-Golf? GtkUIManager is deprecated. It says something about compiler options in https://developer.gnome.org/gtk3/stable/GtkBuilder.html#gtk-builder-connect-signals .
***rekado_ is now known as rekado
<dsmith-work>Happy Friday, Guilers!!
<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: here a terminal widget derived from <vte-terminal> http://git.savannah.nongnu.org/cgit/nomad.git/tree/scheme/nomad/gtk/widget.scm?h=feature-g-golf#n221 there are more widgets examples in that file. might help
<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?
<tohoyn>str1ngs: window-state-event
<str1ngs>I should be able to test that signal with GtkApplicationWindow?
<str1ngs>tohoyn: alos http://git.savannah.nongnu.org/cgit/nomad.git/tree/scheme/nomad/gtk/frame.scm?h=feature-g-golf is a more complete derive goops class. I find it better the GtkBuilder myself
<str1ngs>also*
<str1ngs>tohoyn: what do you need from this event?
<str1ngs>regards to window-state-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
<str1ngs>tohoyn: see http://paste.debian.net/1142772.
<str1ngs>tohoyn: and the glade file https://paste.gnome.org/pwrbv2grq
***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>yes it' i the manual
<daviid>could you build locally and read the manual ...
<tohoyn>daviid: I just read it
<daviid>ok, the Gdk -> Events section
<daviid>tohoyn: here is an example - https://paste.debian.net/1142813/
<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>Got it.
<dsmith-work>sneek: later tell dsmith something
<sneek>Okay.
<dsmith-work>sneek: tell dsmith something else
<sneek>dsmith, dsmith-work says: something else
<dsmith-work>sneek: seen dsmith?
<sneek>dsmith was in #guile 16 hours ago, saying: The .x files usually contain a sequence of scm_c_define_gsubr() calls..
<RhodiumToad>sneek: seen RhodiumToad?
<sneek>RhodiumToad was in #guile 0 seconds ago, saying: sneek: seen RhodiumToad?.
<dsmith-work>There is this odd message happening:
<dsmith-work>In procedure caddr: Wrong type (expecting pair): ()
<dsmith-work>But the bot code does not use caddr anywhere.
<RhodiumToad>is the code up anywhere?
<dsmith-work>No other indication of where thats happening. Not sure what is triggering it.
<dsmith-work>No yet. Getting close.
<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
<str1ngs>what do you need to add?
<daviid>because those very specific gdk accessors are not in gdk itself
<daviid>are you on #introspection?
<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 can log into #introspection
<daviid>there is no log
<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>one sec
<str1ngs>daviid: it's probaby /usr/include/gtk-3.0/gdk/gdkevents.h
<str1ngs>typedef union _GdkEvent GdkEvent;
<daviid>#include <gdkevents.h> fails
<str1ngs>you might need <gdk/gdkevents.h>
<daviid>that fails to
<str1ngs>with pkg-config flags?
<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.
<daviid>#include <gtk/gtk.h> fails here
<daviid>
<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.
<daviid>str1ngs: ok
<rekado>yo, guilers, the logs now support a simple search: http://logs.guix.gnu.org/guile/search?query=nick%3Awingo+moo
<rekado>still WIP but I thought it might already be useful
<dsmith-work>rekado: Hey! That's awesome.
<RhodiumToad>the channel message should maybe be updated to point to the right site?
<RhodiumToad>sneek: logs?
<sneek>Last time I checked logs is http://logs.guix.gnu.org/guile/
<RhodiumToad>PvNotice(ChanServ): Welcome to #guile! This channel is logged, see <https://gnunet.org/bot/log/guile>.
<RhodiumToad>that ^^ is the message sent to joiners
<lfam>RhodiumToad: That's not what I am seeing
<lfam>Welcome to #guile. See https://gnu.org/s/guile for more information. Guile 3.0.2 is out! <https://gnu.org/s/guile/news/gnu-guile-302-released.html>. This channel is logged, see <http://logs.guix.gnu.org/guile/>. Bug database at <https://bugs.gnu.org/guile>.
<lfam>That's what I see
<RhodiumToad>that's the topic, not the message sent to joiners
<RhodiumToad>that's the topic, not the message sent to joiners
<lfam>Ah
<lfam>Right
<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
*civodul tries
<civodul>i think i did it, woo!
<RhodiumToad>that appeared to work, yes
<civodul>thanks for the hint, RhodiumToad
<RhodiumToad>yw
<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?
<RhodiumToad>dunno about stripping them, never tried
<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: then 'manually' getting to http://logs.guix.gnu.org/guile/, I don't see the search box, is the search available or did I missunderstood and it will be in a few days maybe?
<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
<civodul>uh
<civodul>we should adjust Geiser