IRC channel logs

2021-08-20.log

back to list of logs

<mwette>sneek: later tell vijaymarupudi, if you want to dig into macro expandsion https://legacy.cs.indiana.edu/~dyb/pubs/bc-syntax-case.pdf
<sneek>Will do.
<apteryx>sneek: later tell maximed I used call/ec with a simple 'return' continuation that just (return #f) in the suspendable-port handler, and it worked! Thank you for the pointers (see: https://notabug.org/apteryx/mcron).
<sneek>Will do.
<stis>Happy greetings guilers!
<apteryx>everything is accessed by reference by default in Guile, for composite objects?
<apteryx>like if I have record A, then do (let ((my-var (some-accessor A))) (set! my-var new-value)), it'd mutate the value returned by (some-accessor A) next time it's called, correct?
<taylan>apteryx: no, that would only mutate the variable in the lexical scope
<taylan>for the change to be visible, (some-accessor A) would have to return a mutable object (e.g. as a "box"), and you would have to mutate that object (e.g. with "box-set!")
<taylan>or maybe there is a mutating counterpart to some-accessor, like some-mutator!, so you can just call (some-mutator! A new-value)
<apteryx>the value I want to set! is the field of a srfi-9 record
<dsmith-work>Happy Friday, Guilers!!
<apteryx>dsmith-work: happy friday!
*sneek dances
<maximed>apteryx: The manual has an example
<maximed>(set-employee-age! fred +inf.0) (equal? (employee-age fred +inf.0) +inf.0) ; -> #t
<maximed>or you could use 'set-field'
<apteryx>right, the problem with set-field is that I have to carry around the resulting updated record instance
<apteryx>didn't setters came stock with srfi-9
<apteryx>thanks
<taylan>apteryx: the setter doesn't return a new record object, it changes the record object in-place
<taylan>apteryx: assuming you're using srfi-9
<apteryx>yep, I realize we can define setters on srfi-9 records now, thanks to maximed
<apteryx>thanks you!
<apteryx>thank*
<stis>Hello guilers!
<stis>ls
<dsmith-work>bin dev home lost+found usr
<RhodiumToad>you forgot /tmp
<RhodiumToad>(there are only 6 paths specified by posix: /, /dev, /dev/null, /dev/tty, /dev/console, and /tmp)
<leoprikler>no /bin/sh?
<RhodiumToad>the posix shell isn't required to be called /bin/sh
<RhodiumToad>however, it's required to be the first thing named "sh" on the list of directories returned by confstr(_CS_PATH)
<RhodiumToad>(this is how e.g. Solaris got away with keeping an old non-posix shell as /bin/sh, they defined their _CS_PATH result as putting /usr/xpg4/bin first on the list)