IRC channel logs

2020-10-27.log

back to list of logs

***catonano_ is now known as catonano
<daviid>str1ngs: and other g-golf followers/users, I just pushed all (14) patches that I was working on - str1ngs, you'll have to checkout the files that were updated by the patches you mannually applied before to pull ...
<daviid>with those patches, g-golf fixes a few bugs and most importantly, now offers full support for GIInterfaces, as goops classes/instances that, for the former, are inherited when applicable, such as GtkBox and GtkOrientable - or not, like in/for the 'open <gtk-application> signal (second argument)
<daviid>here is such a (minimal/useless) 'open <gtk-application> signal example - https://paste.debian.net/1168790/
<daviid>here is a 'hello-world' example that shows an inherited GIInterface use, the 'orientation <gtk-box> slot (note that the orientation may also be dynamically changed, calling set-orientation ... - https://paste.debian.net/1168793/
***amiloradovsky1 is now known as amiloradovsky
***apteryx_ is now known as apteryx
<leoprikler>Isn't GtkBox a normal class tho?
<leoprikler>Ahh, this is about GtkOrientable, right?
<wingo>o/
<str1ngs>daviid: great thanks. I'll test with nomad now see how things go.
<str1ngs>daviid: looks good so far 👍, only thing I had to change was add 'query %gi-method-short-names-skip. I'll know more once I port my <gtk-vbox> to <gtk-box>.
<dsmith-work>UGT Greetings, Guilers
<mwette>howdy
<Labu>Hi mwette
<mwette>Hi Labu
<refcfar>Is there a way to search for a particular function from external libraries a'la Haskell's hoogle?
<refcfar>I see for example `substitute*` being used in some module (or online example) and I want to know where that comes from
<str1ngs>refcfar: for external modules that are not currently being used that is very hard to do. in the context of substitute* you could use git grep "(define-syntax sub". I used emacs with helm-git-grep since it handles fuzzy greps. for modules that are loaded though you can use 'help from a REPL and also apropos is helpful.
<refcfar>I'll try `git grep`. A searchable online library documentation database would be nice though
<str1ngs>refcfar: it sounds useful. but in practice I'm not sure it's required. try this for examples . guix repl. then (use-modules (ice-9 session)) and (help substitute*) here you can see it's found in (guix build utils)
<refcfar>Well that was useful!
<refcfar>So, newbie question: what exactly is ice-9? A base library shipped by default with guile? How can I discover the available submodules?
<str1ngs>refcfar: also if you use Emacs and geiser and geiser is setup properly. geiser will contextually show where a definition is found if geiser-autodoc-mode is enabled. I think it is enabled by default.
<refcfar>I'm a kakoune convert I'm afraid. Hard to go back.
<str1ngs>refcfar: ice-9 is a fictional state of water. but really it really it just indicates a guile internal functionality. thing of it as a standard lib names spacing for gulie.
<str1ngs>err guile*
<dsmith-work>sneek, where are you?
<refcfar>I hadn't heard of ice IX. Wikipedia makes no mention of it being fictional though https://en.wikipedia.org/wiki/Ice_IX
<refcfar>Ohh, I should have read the top part about there being a novel
<refcfar>Hmm, how do you use a module in an expression passed to `guile -c`? `use-modules` is apparently unbound
<str1ngs>refcfar: use-modules should be bound try for example guile -c "(use-modules (ice-9 session))" .
<refcfar>Woops. Silly mistake
<refcfar>I wrote `use-submodules` for some reason
<lloda>i use import :p
<dsmith-work>sneek: ice-9?
<sneek>Someone once said ice-9 is "a nod to the fictional substance in Kurt Vonnegut's novel, Cat's Cradle, capable of acting as a seed crystal to crystallize the mass of software" <http://wingolog.org/archives/2009/01/07/a-brief-history-of-guile>
<refcfar>I'm confused about `source-properties`. Isn't it supposed to return useful data about the expression? No matter what identifier or expression I give it I always get `()` returned
<refcfar>`(source-properties identity)` => `()`
<refcfar>`(supports-source-properties? identity)` => `#t`
<refcfar>I seem to remember a really cool thing in Clojure where you could run `source` on any expression and it would return the actual source definition
<justin_smith>refcfar: it's very hacky but it exists - it uses metadata on the variable to store the file / line
<justin_smith>err, the metadata store it, the source macro uses that metadata (usually there for debugging / error messages) to read and print it
<justin_smith>so it doesn't work for values input in the repl (you can't go back and read that document again)
<dsmith-work>I think old interpreted guile used to be able to regen/recover the Scheme source of a procedure.
<refcfar>How is it used? `(pretty-print (source identity))` (in a source file) returns `#f`
<dsmith-work>But not anymore.
<dsmith-work>The source properties are used in error messages.
<dsmith-work> https://www.gnu.org/software/guile/manual/html_node/Source-Properties.html
<dsmith-work>The example with (xxx) and xxx is not up to 3.x guile though
<dsmith-work>scheme@(guile-user)> (xxx)
<dsmith-work>;;; <stdin>:1:0: warning: possibly unbound variable `xxx'
<dsmith-work>ice-9/boot-9.scm:1669:16: In procedure raise-exception:
<dsmith-work>Unbound variable: xxx
<refcfar>But so how do I get it to return something useful?