IRC channel logs

2016-04-13.log

back to list of logs

***xieyuheng is now known as xieyuheng-sleepi
***xieyuheng-sleepi is now known as xieyuheng-afk
<wingo>good day civodul :)
<civodul>howdy, wingo!
<jmd>Which characters are not valid in symbol names?
<ArneBab_>moin
<davexunit>jmd: any valid string character is a valid symbol character
<jmd>(
<davexunit>however, some symbols must use a different syntax
<jmd>" "
<davexunit>to quote them properly
<jmd>'
<jmd>'this is not a symbol
<davexunit>(define #{" "}# 7)
<davexunit>scheme@(guile-user)> #{" "}#
<davexunit>$20 = 7
<davexunit>all of the things you mentioned can be symbols
<davexunit>(string->symbol "'this is not a symbol")
<jmd>I get "unbound-variable" when I try to do that.
<davexunit>you still need to quote symbols
<davexunit>#{foo}# is equivalent to foo
<davexunit>which would be a variable or macro reference
<davexunit>'#{foo}# is the symbol 'foo
<davexunit>notice above how I was able to define a variable whose name is " "
<jmd>Ok. So let me rephrase the question: Which characters need to be escaped in symbol names?
<davexunit>I don't know the exhaustive list
<davexunit>see the Scheme standard documents for that
<jmd>What are the common ones?
<davexunit>the things you've mentioned
<davexunit>anything that is syntax for something else
<davexunit>44 is a number, for example. if you want a symbol named "44", then it must use the #{}# syntax
<davexunit>you'll find out pretty quick if something is or is not a valid symbol
<jmd>But \\x44 is ok?
<jmd>x44
<davexunit>yes because that isn't a number
<rain1> https://www.gnu.org/software/guile/manual/html_node/Symbol-Read-Syntax.html#Symbol-Read-Syntax
<davexunit>thanks rain1
<rain1>why does guile use #{ .. }# instead of the usual | | ?
<davexunit>rain1: both work
<davexunit>'|foo bar baz|
<davexunit>ah, that doesn't work!
<davexunit>so there's a difference
<davexunit>#{}# may have whitespace
<davexunit>|| may not
<rain1>ohh
<rain1>i see
<jmd>rain1: The link "Formal Syntax" in that url gives 404
<davexunit>jmd: could you file a bug report?
<jmd>ok
<rain1> http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.1.1
<rain1>so complex!
<rain1>jmd, why do you ask anyway? are you generating scheme code or something?
<jmd>Yes. I'm generating.
<rain1>from what host language?
<jmd>c++
<rain1>ah...
<rain1>tricky
<rain1>an easy way out might be to produce only symbols like [a-z-+<>!?][0-9a-z-+<>!?]+
<davexunit>rain1: sorry I was wrong about ||
<davexunit>or at least according to the docs
<davexunit>it doesn't work in my guile repl
<rain1>strange! I wonder why they have both syntaxes then
<rain1>it seems like we could do with just one
<rain1>probably too late to change
<davexunit>I don't know why in this case, but Guile supports many Scheme standards
<davexunit>which differ in a variety of ways
<davexunit>well, the doc says why.
<davexunit>#{}# is defined by R5RS
<rain1>what!!
<davexunit>|| is R7RS
<rain1>I've been using R5RS for ages and I never knew that!
<rain1>thats so funny
<davexunit>or no, I may be misreading again...
<davexunit>yup, bad reading comprehension.
<davexunit>"Guile provides an extended symbol read syntax that allows the inclusion of unusual characters"
<davexunit>this is a Guile special
<davexunit>sorry for the confusion.
<rain1>ah okay, but I still wonder why they invented it
<davexunit>because r7rs didn't exist
<davexunit>and I also see why |foo bar| didn't work for me. you have to specifically enable this.
<rain1>I guess the | thing comes from common lisp originally
<rain1>this isn't guile related but.. wow https://eprint.iacr.org/2016/367.pdf
<rain1>openssl just jams garbage into your RNG like uninitialized buffers, encryption keys!!, etc.
<wleslie>if you want wow, there's also http://tomasp.net/coeffects/
<paroneayea>hello #guile!
<davexunit>hey paroneayea
<rain1>hello
<rain1> https://savannah.gnu.org/projects/8sync
<rain1>the download link gives me 404 http://ftp.gnu.org/gnu/8sync/
<rain1>oh I found the browse sources link now, I didn't notice it before
<paroneayea>rain1: yup I need to make a release
<paroneayea>rain1: hopefully this week.
<rain1>good luck! I should do that too with my lib
***xieyuheng-afk is now known as xieyuheng
<dsmith-work>Morning Greetings, Guilers
***wleslie_ is now known as wleslie
<paroneayea>civodul: I'm considering using skribilo for 8sync instead of normal texinfo files, though do you know if anyone has a nice example of using skribilo with autotools?
<paroneayea>civodul: no worries if not an easy off-hand example, I could read up further... I still get nervous around tweaking autotools setups :)
<paroneayea>I guess I'm being foolish
<paroneayea>ignore me!
<civodul>paroneayea: the only example that comes to mind is Skribilo itself
<civodul>however note that the Info output of Skribilo is not as nice as that of makeinfo
<paroneayea>civodul: hm ok!
<paroneayea>civodul: if that's true, maybe I should stick to texinfo for now, since I'm trying to do things more gnu-like with 8sync than I did with mediagoblin ;)
<cojy>i'm having trouble understanding how 8sync works, is there a write up on it anywhere?
<paroneayea>cojy: not sufficiently yet. Probably the best route to learning how it works is to read up on delimited continuations (if you haven't already) and try out the demos, especially the irc demo
<paroneayea>you can set up a bot and do live hacking with it if you use geiser + emacs
<paroneayea>cojy: you don't really need to know how delimited continuations work to *use* 8sync, but if you want to understand it
<paroneayea>you might be interested
<paroneayea>cojy: 8sync is pretty young. Sorry that the documentation is not very clear yet!
<civodul>paroneayea: using Texinfo is more "reasonable" and more GNU-like, indeed ;-)
<civodul>and Guile has a Texinfo parser anyway
<civodul>so at some point, we could have a Texinfo reader in Skribilo
<davexunit>I added a texinfo reader to Haunt
<davexunit>using Guile's texinfo parser
<davexunit>has some limitations, but it works.
<paroneayea>I guess I'm more interested in a nice texinfo writer :)
<davexunit>it can't handle images it seems
<wingo>it should be able to handle images i think
<paroneayea>(though I'm glad guile has a nice texinfo reader!)
<wingo>if it doesn't, could be a bug, or could be a bug in the texinfo->foo procedures
***xieyuheng_ is now known as xieyuheng
<paroneayea>oh
<paroneayea>civodul: skribilo writes out info, not texinfo? that's interesting
<paroneayea>ACTION has never looked much at the info format itself
<civodul>correct
<daviid`>wingo: don't you have a texinfo writer somewhere as well? the guile-gnome doc generator? don't know
<rubdos>Is it possible to use GOOPS from within the Guile C API?
<davexunit>rubdos: you can call out to Scheme from C, yes.
***mejja_ is now known as mejja
***Fuuzetsu is now known as Guest8510
***karswell` is now known as karswell
***holomorp1 is now known as holomorph
***Fuuzetsu is now known as Guest87374