IRC channel logs

2019-09-19.log

back to list of logs

<str1ngs>sneek: later tell daviid. thanks. It works for me I'm using my own typelib where I can connect the signasl on class initialization. it's unrelated to nomad. something else I'm working on
<sneek>Got it.
<rlb>Is there something unusual about equal? The goops docs say that (define-generic foo) should promote any procedure foo to a generic and that works fine for say string-compare in 2.2.6, but not for equal?
<rlb>scheme@(guile-user)> (use-modules (oop goops))
<rlb>scheme@(guile-user)> (define-generic equal?)
<rlb>scheme@(guile-user)> equal?
<rlb>$1 = #<procedure equal? (#:optional _ _ . _)>
<rlb>
<wingo>i think it's a primitive-generic
<wingo>primitive-generics first use primitive code then dispatch to a generic if the types aren't primitive
<wingo>they are pretty squirrely though as they break modularity
***civodul` is now known as civodul
*spk121 is trying to understand how Guile starts up. 'compile-shell-switches' is a tangle
<civodul>spk121: what do you mean, "how Guile starts up"?
<civodul>it loads boot-9.scm :-)
<spk121>civodul: imagine some idiot wanted to write a graphical debugger for Guile in Guile w/ guile-gi. haha. You start off by launching the GUI and the kicking off a sort of sandboxed sub-guile to interpret the program to debug. It gets a bit complicated with call-with-prompt, capturing stdin/stdout, and splitting the debugger's command line switches w/ the programs command line switches
<spk121>not that you really wanted to know, ;-)
<civodul>spk121: i wouldn't call that person an idiot but rather a fearless hacker :-)
<civodul>when you say sandbox, do you mean container?
<lloda>it's weird how container has come to mean sandbox
<civodul>what's even more weird is how container has come to mean Docker
<civodul>but that's not what i meant in this case ;-)
<lloda>ok, sorry :D
<lloda>and yeah to the Docker thing :-/
<civodul>heh
<jcowan>civodul: And indeed the fearless hacker would be able to reach that goal, were it not for ... moose and squirrel!
<civodul>heheh :-)
<jcowan>I think the English invented the word "squirrel" so as to have a word that no non-anglophone could pronounce properly.
<civodul>wait, i didn't even write it, how do you know i don't pronounce it correctly? ;-)
<rekado>“squowl.”
<jcowan>I don't. But with the English w, the English r, and the English dark l in its own syllable, that's a lot.
<jcowan>It basically has no regular vowels at all
<jcowan>"Strč prst skrz krk."
<jcowan>and that's just r-vowel, not also l-vowel
<ecraven>use sanskrit, it has l-vowel (but not m-vowel :-/)
<spk121>I am in a constant battle with squirrels over who gets to eat the avocados from my tree. So far, squirrels 1000, me 3.
<dsmith-work>Thursday Greetings, Guilers
<spk121>civodul: I suppose I mean container more than sandbox. I think, in practice I mean the evaluation of external code in the environment provided by a module. Where that environment is within a control-flow barrier or prompt. Where that environment mimics the environment available at the top REPL, but has redirected all the standard ports. Heck, i dunno. i wanna run the things but without the things getting to see a bunch of Gtk funct
<spk121>ions that it doesn't care about
<civodul>oh i see, so potentially a different process (or thread) to avoid blocking, but not necessarily a container in the Linux sense
<spk121>right. Probably a thread rather than a process, so that the debugger (the outer program that will spawn the thread that runs external code) will be able to add traps and capture hooks.
<rlb>wingo: thanks -- and I can get equal? promoted to a generic, just not via define-generic, i.e. I can stash equal? somewhere else, then (define equal? #f), and then define-generic works. Maybe this is a bug?
<rlb>i.e. this made it sound like it should have worked if I'm reading it right: https://www.gnu.org/software/guile/docs/master/guile.html/Extending-Primitives.html
<rlb>(extend-primitive-generic! doesn't work either)
<rlb>(on equal?)
<rlb>s/extend/enable/
<rlb>Looks like goops itself has some special accommodations for equal? https://git.savannah.gnu.org/gitweb/?p=guile.git;a=blob;f=module/oop/goops.scm;h=837a667e6025b6f8ed7818e5a8efe064cca7843d;hb=791cae940afcb2b2eb2c167fe438be1dc1008a73#l2335 Perhaps I'll file a bug later. Sounds like maybe (define-generic equal?) was intended to work.
<ilyaigpetrov>Hi. It seems like `(define deposit #f)` binds deposit to some temporary variable? Could you, please, tell me what hash symbol means here? It's from https://www.gnu.org/software/guile/docs/master/guile.html/Shared-Variable.html#Shared-Variable
<hugh_marera>is the logs.guix.gnu.org/guile/ down? i am getting this message "Resource not found: http://0.0.0.0:3333/guile" when i click on the link
<rekado>hugh_marera: oh, you’re right!
<rekado>looks like an older version of the tool got started after the reboot
<rekado>I’ll fix it in a moment
<hugh_marera>great
<rekado>it’s back. Sorry about that and thanks for the report!
<spk121>ilyaigpetrov: Unless I misunderstand the question, (define deposit #f) sets a the module-level variable 'deposit' to the value FALSE. So initially you can't call 'deposit' like a function, because it is just the FALSE constant. Later in the example 'deposit' gets set to a lambda: a procedure. At that point, you can call it like a function.
<spk121>#t and #T are TRUE, #f and #F are FALSE
<ilyaigpetrov>thank you
<civodul>#t is also #true, and #f is also #false :-)
<civodul>i've been thinking we should adopt the long names instead of #t and #f in our code bases
<davexunit>I had no idea that #true and #false existed
<civodul>it's from R7, i think
<zacts>how does goops differ from CLOS, or is it pretty much the same idea?
<davexunit>zacts: it's like a CLOS-lite
<zacts>oh, I see. cool
<davexunit>not as featureful as CLOS, but has a lot of good stuff.
***jao- is now known as jao
<jcowan>#true and #false are indeed in R7. Alex Shinn came up with them because I had overlooked a test that I ran on many Schemes including Chibi and said that Chibi didn't pass, where in fact it did.
<jcowan>He thought that was because I didn't see the #t, but actually it was just that my eyes skipped over Chibi in the long, long list of outputs.
<jcowan>So he proposed #true and #false, but nobody, not even Chibi, outputs them, because backward compatibility.