IRC channel logs

2021-05-17.log

back to list of logs

<taylan>seconded :)
<taylan>good night guilers
<mwette>night -- installed bytestructures-1.0.10 today
***sneek_ is now known as sneek
<wingo>moo
***apteryx_ is now known as apteryx
<abralek>Hi all, Can I somehow generate Unix password hash for /etc/passwd with guile?
<abralek>I see crypt, but I also have to generate sha512-crypt
<lampilelo>abralek: (crypt "passphrase" "$6$salt")
<lampilelo>more info in the libc documentation: info "(libc) Passphrase Storage"
<lampilelo>more useful than the man page
<abralek>lampilelo: wow I see, It parses the prefix. Many thanks!
<apteryx>How can I check if a possibly unbound variable is bound?
<daviid>apteryx: see module-bound?
<daviid> module-variable
<apteryx>ah right. I got confused thing variable-bound? would be a shorthand for (module-variable (current-module) 'var-symbol)
<apteryx>apparently it's not
<apteryx>thinking*
<daviid>module-bound? is available, but undocumented]
<apteryx>OK! thanks
<daviid>apteryx: see the def of module-bound? in (ice-9 boot-9)
<apteryx>works well! I used (module-bound? (current-module) 'my-proc-symbol)
<chrislck>(defined? 'variable)
<lampilelo>is it possible that scm_gc() segfaults when a pthread mutex is locked when in guile mode? seems that switching to scm_pthread_mutex_lock() stopped the crashes but i can't really prove it
<apteryx>chrislck: even better, thanks!
<dsmith-work>Monday Greetings, Guilers
<lampilelo>is there a way of debugging memory (in)correctness when dealing with guile? valgrind is pretty useless with this wall of text due to gc, are there any suppression files floating around?
<terpri>rlb, lokke looks really neat! iiuc in clojure, nil is false but not an empty sequence?
<rlb>Right, iirc, it actually *is* JVM "null", i.e. java null.
<rlb>basically "the null pointer" (ish).
<rlb>And also iirc (cf. that link wrt "null punning") clojure used to support empty sequences acting as nil/false, but changed that early on for reasons in that doc.
<rlb>"making clojure lazier"
<rlb>In clj false is false, and nil is faise. And for sequences/collections now, you call (seq something) i.e. (when (seq something) ...) is idiomatic.
<taylan>who controls the contents of http://www.gnu.org/software/guile/manual/ ?
<taylan>there's an unresolved, trivial, 8 year-old bug about it :D
<terpri>rlb, and (seq nil) is false?
<terpri>er, true, i meant
<rlb>nil is false, and (seq []) becomes nil.
<rlb>[] is the empty vector.
<terpri>ah
<rlb> https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/seq
<terpri>"(seq nil) returns nil" is potentially quite helpful (because it sounds like Lispy behavior)
<terpri>taylan & rlb, it's also useful to remember that we completely control the interface between scheme and lisp/clojure, and that we can define any useful semantics for #nil that don't break scheme programs
<justin_smith>terpri: clojure's "conj" (a close relation to a lisp cons) treats nil as an empty vector, its "cons" (list specific) treats nil as an empty list
<terpri>justin_smith, ah, good to know
<justin_smith>clojure's "into" (kind of like (partial reduce cons)) treats nil as an empty list
<justin_smith>rlb: a gotcha about clojure's false is that unlike java, only Boolean/FALSE is false in conditionals, and any other false which is not identical to that value is effectively true - this allows faster bytecode at the price of weird code misbehaving
<terpri>so far it sounds like clojure nil is treated very much like lisp nil, enough that guile shouldn't need separate #clojure-nil and #lisp-nil (which would turn the boolean cube into a...boolean dodecahedron? :P)
<justin_smith>identical as in the "idenitcal?" function - meaning "a pointer to the same object in memeory"
<justin_smith>haha
<justin_smith>boolean tessaract!
<terpri>lol
<terpri>lambda: the ultimate platonic solid
<justin_smith>if my memory was better I'd have a paula beans file-not-found quip ready
<rlb>justin_smith: depending on what you mean, I believe nil is also false.
<rlb>(when-not nil (prn :yep))
<rlb>:yep
<rlb>
*rlb wishes clojure had picked unless :)
<leoprikler>(defalias unless when-not) :D