IRC channel logs

2018-03-17.log

back to list of logs

<ArneBab>is seek gone?
<ArneBab>sneek
<ArneBab>for spk121: you can eval wisp-scheme-read-file, i.e. (primitive-eval (cons 'begin (wisp-scheme-read-file "examples/enter-three-witches.w")))
<ArneBab>(import (language wisp))
<ArneBab>^ needs this beforehand
<rekado>I’m playing with goops and I wonder how I can ensure that a class instance only accepts certain values for its slots.
<rekado>The acceptable values are defined as an enumeration
<rekado>I tried adding a “setter” method, but whenever I invoke the enumeration predicate I cannot load the file.
<rekado>(the error message is unreadable macro expansion gibberish)
<rekado>(define-method ((setter diet) (instance <species>) new-val)
<rekado> (slot-set! instance 'diet (<diet> new-val)))
<rekado>it looks like (<diet> new-val) is evaluated at definition time, but I really want it to use the *value* of “new-val” instead of taking “new-val” to be a symbol that should be checked with the <diet> predicate.
<rekado>The problem is that it’s a “predicate macro”, not a regular function predicate.
<rekado>I now use “make-enumeration” and “enum-set-member?” directly.
<Labu>Hello
<Labu>I'am on NetBSD and I have some issue with procedure as described in guide to run a guile script https://www.gnu.org/software/guile/manual/html_node/The-Meta-Switch.html#The-Meta-Switch
<Labu>in NetBSD guile is in /usr/pkg/bin
<Labu>I could use /usr/bin/env guile but I get an error: "env: guile -e main -s No such file or directory"
<Labu>Do you know a workaround ?
<janneke>Labu: i think the manual in unfortunate in this respect
<janneke>you need to use the second insert/example with
<janneke> ... /guile \\
<janneke> -e main -s
<ArneBab>Labu: you can use shell indirection: http://www.draketo.de/proj/py2guile/#sec-2-2-3-2-1
<ArneBab>Labu: essentially write a shell script which calls
<ArneBab>exec guile -e main -s "$0" "$@"
<Labu>Hi ArneBab janneke
<ArneBab>Labu: the reason for your problem is that unix treats everything after the first space in the hashbang as one argument, and env cannot find guile -s ...
<ArneBab>bbl
<Labu>janneke: I tried this too
<Labu>ArneBab: thx I try this
<Labu>it works thx
<ArneBab>Labu: glad to :-) — it’s one of the really cool tricks with Guile. It works because #! starts an inline comment, and !# ends it.
<ArneBab>that merges hashbang and scheme into something which is bigger than its parts.
<ArneBab>I just found the example in the official documentation: https://www.gnu.org/software/guile/manual/html_node/Scripting-Examples.html#Scripting-Examples -- the last example
<Labu>indeed ArneBab, I was just reading it when you answer me
<spk121>hi
<spk121>ArneBab: thanks
<ArneBab>spk121: you still saw it? nice!
<spk121>yeah. checked the log this morning
***ayys_ is now known as ayys
***ayys_ is now known as ayys
<mwette>hi all; been working to learn glib dbus -- back later
<amz3>heya guilers