IRC channel logs

2021-06-04.log

back to list of logs

***Server sets mode: +ntz
<dsmith>sneek: help later tell
<dsmith>goodbot
<Noisytoot>sneek: botsnack
<sneek>:)
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>sneek: seen wingo
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>sneek: seen wingo
<sneek>wingo was last seen in #guile 5 hours and 45 minutes ago, saying: instead the function should be identified via its code (ip).
<dsmith>sneek: help later tell
<dsmith>sneek: help
<dsmith>sneek: later tell dsmith-work testing
<sneek>Got it.
<dsmith>sneek: tell dsmith-work testing
<dsmith>sneek: tell dsmith-work testing
<dsmith>sneek: later tell dsmith-work testing
<sneek>Got it.
<dsmith>sneek: seen wingo
<sneek>wingo was last seen in #guile 5 hours and 52 minutes ago, saying: instead the function should be identified via its code (ip).
<dsmith>sneek: bugs?
<sneek>Someone once said bugs is Send reports to bug-guile@gnu.org, and see bug reports at https://bugs.gnu.org/guile
<dsmith>sneek: atest is a test
<dsmith>sneek: atest is a test
<sneek>I'll keep that in mind.
<dsmith>sneek: seen someone here that sometimes answers to wingo
<sneek>Nope.
<dsmith>heh
<dsmith>sneek: what is atest?
<sneek>Last time I checked atest is a test
<dsmith>sneek: where is atest?
<dsmith>sneek: atest?
<sneek>atest is a test
<dsmith>sneek: forget atest
<sneek>Consider it forgotten.
<dsmith>sneek: later tell dsmith-work testing
<sneek>Got it.
<dsmith>sneek: tell dsmith-work testing also
<dsmith>sneek: help later test
<dsmith>sneek: atest is also something else
<sneek>So noted.
<dsmith>sneek: atest
<dsmith>sneek: atest is something
<sneek>Understood.
<dsmith>sneek: atest?
<sneek>atest is something
<dsmith>sneek: atest?
<sneek>Last time I checked atest is something
<dsmith>sneek: something else?
<sneek>I could be wrong, but atest is something
<dsmith>sneek: forget atest
<sneek>Okay.
<dsmith>sneek: forget something else
<sneek>Consider it forgotten.
<dsmith>sneek: help later test
<dsmith>sneek: help later tell
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>sneek: tell lloda Hello!
<sneek>lloda, dsmith says: Hello!
<dsmith>Well! The somewhat useless "tell" coommand is working again.
***jackhill is now known as jackhill[m]
***jackhill[m] is now known as jackhill
<tohoyn>statprof-display doesn't display call counts even though I use #t as the third argument to statprof-reset
<tohoyn>what is wrong?
<tohoyn>calling statprof with "#:count-calls? #t" doesn't work either
<dsmith>sneek: botsnack
<sneek>:)
<dsmith>sneek: seen rlb?
<sneek>rlb was last seen in #guile 2 days ago, saying: But I *did* like being able to write clj code for the browser (though I haven't been doing any of that for a good while now)..
<dsmith>sneek: help later tell
<dsmith>sneek: later tell help
<manumanumanu>sneek: botsnack
<sneek>:)
<wingo>dsmith: yeah, see what (system vm frame) does
<wingo>(get proc name from ip)
<dsmith>wingo: The tricky bit is getting to the SCM frame when you only have the scm_thread *
<wingo>all of this should be done from scheme fwiw
<wingo>in (system vm frame)
<wingo>there you have the ip because you have the stack trace
<canant>Hi Guys,
<canant>I'm a newbie on guile and trying to be familiar with and understand the fundamental concepts.
<canant>I couldn't get the Parameters concept. Why we need this instead of passing data as arguments?
<canant>make-parameter and parameterize are very hard to understand for someone like me from the C/C++ world.
<canant>Any help? :)
<taw10>canant: Think of it as kind of like an improved version of a global variable
<taw10>You *could* pass things round as arguments everywhere, but I'm sure you've encountered situations where that becomes a complete mess. Parameters fix that
<canant>Thanks, taw10. Are there any meaningful examples rather than simple official ones?
<canant>Those ones are so simple.
<canant>Uploaded file: https://uploads.kiwiirc.com/files/9055ec35f4afe73098c6e4dec0748470/pasted.txt
<taw10>I use it in one of my projects to help allow essentially arbitrary code to be used to create a certain type of object (https://github.com/taw10/starlet) - (lighting-state ...) expands to (parameterise ((current-state (make-empty-state))) ...), so anything inside the lighting-state form has access to the current "state" object
<tohoyn>you could also consider fluid-let
<tohoyn>see e.g. https://www.informatik.uni-kiel.de/~scheme/doc/mzscheme/node20.htm
<canant>Thanks again taw10 and tohoyn. I'm looking into those.
<taw10>Just for comparison, imagine how my lighting-state thing would look using arguments. I'd have to use some macro magic to inject the argument into every sub-form that needs it. And since there can be any type of form there, I'm not sure that's even possible.
<taw10>tohoyn: Guile doesn't seem to have fluid-let. Guile parameters are built on top of fluids, though. The manual recommends to use parameters rather than fluids. But sure, it's the same basic idea.
<leoprikler>tohoyn: with-fluid* and with-fluids* work kinda like let but take thunk as procedures
<tohoyn>taw10: fluid-let is easy to implement. see https://paste.debian.net/1199993/.
<lloda>you can use parameterize
<lloda>there's a bunch of stuff that has multiple versions in Guile, the original Guile version, the srfi version, the standard version
<lloda>i try to stick to one
<dsmith>Guile modules (which predate r6rs (and r5rs)) are mostly just mapping of names to scheme objects.
<dsmith>R6rs modules (or is it libraries?) expose *immutable* bindings to objects.
<dsmith>For the benefit of compilers I guess.
<dsmith>But sometimes, you just need to provide a value that can change.
<dsmith>So then comes in parameters.
<dsmith>Through an immutable binding, you get or mutate a value.
<lloda>you don't need a parameter for that. You can export a box
<dsmith>Did r6rs provide boxes?
<tohoyn>use one-element vectors
<dsmith>I've always thought the parameters were a r6rs thing. Pretty sure Guile didn't have them until it started added r6rs support.
<lloda>guile had fluids, which are the same thing
<dsmith>Yes. But I think r6rs lib immutability is the "why?" of parameters.
<mwette>sneek: botsnack
<sneek>:)
<dsmith-work>Happy Friday, Guilers!!
<sneek>Welcome back dsmith-work, you have 4 messages!
<sneek>dsmith-work, dsmith says: testing
<sneek>dsmith-work, dsmith says: testing
<sneek>dsmith-work, dsmith says: testing
<sneek>dsmith-work, dsmith says: more testing
<dsmith-work>goodbot
*sneek wags
***thecatster is now known as thecatster_
<manumanumanu>dsmith-work: parameters are for dynamic binding. I use them to change behaviour of libraries whern parameters doesn't cut it
<manumanumanu>You _can_ use parameters to change variables in a library, but boxes are probably more efficient
<dsmith-work>manumanumanu: Soo... You use parameters when parameters aren't good enought? ;^}
<manumanumanu>dang
<dsmith-work>heh
<manumanumanu>I meant parameters as in function arguments
<dsmith-work>Indeed. :)
<dsmith-work>But still fun.
<dsmith-work>(Please! No offence meant!)
<lispmacs[work]>manumanumanu: this is scheme. Infinitely recursive explanations are okay.
<lispmacs[work]>how do I change the current working directory, in regards to relative paths in (load path) commands?
<lispmacs[work]>(chdir path) seems to work
<lispmacs[work]>sneek: give lispmacs a botsnack
<sneek>:)
<lispmacs[work]>sneek: quit smiling
*sneek gives lispmacs[work] a botsmack
***rekado_ is now known as rekado
<amirouche>goodbot