IRC channel logs


back to list of logs

<codemac>Would anyone mind helping me with a usage of syntax-case?
<codemac>I'm trying to make my own verison of define-struct, but I think I have a deep misunderstanding somewhere, so I've reduced it to a small printer thingie, I'll paste here in a moment.
<codemac>Basically, with syntax case, I'd like a way to go from a symbol, add some text around it, and then use it as a symbol again.
<ijp>#` not #'
<codemac>oh lord.
<codemac>thank you.
<ijp>easy to overlook
<codemac>that really clears up a lot !
<codemac>now I get to better errors at least
<ijp>#,foo is (unsyntax foo), we could unparse that in the error, but I don't remember if we do that for unquote
<codemac>it still doesn't work complaining about a raw symbol in macro, but I'm still struggling with syntax->datum stuff I think
<ijp>codemac: basically, rather than deal with symbols, macros deal with syntax objects which carry around some extra information (source location, lexical environment, etc.)
<ijp>syntax->datum strips it, datum->syntax adds it
<ijp>the first argument to datum->syntax is an identifier whose information to use for the datum
<ijp>so (datum->syntax #'name (string->symbol ...)) here
<ijp>we should add an identifier-append, or an identifier-format or something
<codemac>that would be neat!
<ijp>everyone has probably written their own
<paroneayea>hi davexunit
<paroneayea>and *
<paroneayea>I'm thinking about combinators
<paroneayea>I feel like I've been working with them more and more, but have a hard time understanding a clear example of what *makes* something a combinator
<paroneayea>is it the way that you can "chain" calls to each other?
<davexunit>paroneayea: it's about a set of operations that satisfy the closure property
<davexunit>1 + 2 = 3
<davexunit>number + number = number
<davexunit>closure property satisfied
<paroneayea>davexunit: I see... I think
<ijp>there isn't really a good definition
<paroneayea>I thought closure was about the ability for a type of data contains more of that type of data
<paroneayea>like lists of lists
<paroneayea>though I guess you can consider larger numbers to be "containing" the smaller numbers...
<ijp>closure would be far too broad imo
<paroneayea>what it "feels like" to me is that I can chain expressions
<davexunit>paroneayea: the chaining happens because everything satisfies the closure property
<davexunit>closure in the math sense
<davexunit>not the lexical scope sense
<davexunit>ijp is probably right that it is too broad, but I can't think of anything better.
<paroneayea>yeah I got that
<paroneayea>like they talk about "closure" in sicp
<paroneayea>I guess integer arithmetic doesn't feel like "closure" to me because I don't think of it as heirarchical
<davexunit>the picture language section explains it
<paroneayea>I should go over the picture language section again
<davexunit>(* (+ 1 2) 3)
<paroneayea>I didn't understand it the first time
<ijp>in the lc, a combinator is a closed lambda term
<ijp>in the no free variables sense
<paroneayea>lambda calculus is something I need to understand better also ;)
<ijp>much general
<paroneayea>so much to explore!
<ijp>if you know a functional language, you know about as much as you need to know
<davexunit>paroneayea: think about map/filter/fold. there's no hierarchy there necessarily
<ijp>maybe sprinkle in some church rosser to taste
<davexunit>(filter odd? (map (lambda (x) (* x x)) '(1 2 3 4)))
<davexunit>each expression evaluates to a list, so we can combine them.
<paroneayea>davexunit: okay, yeah
<paroneayea>I think that makes sense
<paroneayea>davexunit: ijp: thanks for your thoughts :)
<paroneayea>ACTION re-reads 2.2 of SICP
<paroneayea>hoo yay, fixed the json pretty printer
<quigonjinn>davexunit: It seems that the git repo for your guile-parser-combinators isn't working. I didn't check it yesterday
<janneke>ACTION got records and lalr up in mes and parses the simplest of C programs :-)
<janneke>slowly starting to appreciate the idea of a VM
<dsmith-work>Wednesday Greetings, Guilers
<quigonjinn>dsmith-work: greetings
<kr2>Hello, I have a question regarding GOOPS and modules, I have documented it here (I was trying (guile)Merging Generics)
<ijp>I strongly suggest defining your generics in a module and importing that
<kr2>That makes sense, thank you!
<ijp>as an aside, you can have multi file gists
<kr2>(I'm from a Java background) Essentially something to act as an interface, then implementation elsewhere?
<kr2>Did not know that :)
<ijp>kr2: basically I think merge-generics causes more harm than good
<ijp>kr2: anyway, I think your issue is simpler, you didn't define a method for <b> on y
<ijp>if you s/y/x/ it goes through fine
<kr2>ijp: So I would hope it calls the method for <a> on y, as <b> is a subclass of <a>
<kr2>What I am trying to acheive is have <a> as an 'abstract class' that defers the implementation of x to its subclasses, then have <b> as a concrete subclass implementing x
<ijp>oh right, I misread some of that code
<ijp>kr2: hmm, I've been trying a few different things, but I keep getting that error
***dje__ is now known as xdje
<ijp>yeah, I don't understandit
<kr2>Thanks anyway, I don't seem to manage to get around it either, so I'll perhaps try the mailing list
<amz3`>paroneayea: have you seen the message about guile-curl? it's solution for doing https
<davexunit>amz3`: it's not a solution. there's guile-gnutls, too.
<davexunit>the problem is that guile doesn't support https out-of-the-box
<paroneayea>amz3`: I hadn't seen it
<amz3`>davexunit: it works out of the box, I compiled the sources from git yesterday
<davexunit>amz3`: you cannot use guile's web modules with https endpoints out of the box
<davexunit>like http-get, for example.
<amz3`>the API is not very nice, but it's direct bindings of libcurl for which must have loads of doc
<davexunit>"out of the box" means "comes with Guile"
<amz3`>guile-curl works out-of-the-box, it's not a builtin of guile
<davexunit>the point is that it should be built-in
<davexunit>(http-get "") should just work
<davexunit>that's what I mean by "out of the box"
<paroneayea>the gnutls hack that guix does still does I think leaks the descriptor right?
<paroneayea>or maybe that was fixed
<paroneayea>though as davexunit said, it should work out of the box
<amz3`>you don't understand or don't want to understand
<davexunit>amz3`: sorry but you're the one not understanding here.
<amz3`>I understand that http-get should work with https, i'm not saying otherwise
<paroneayea>no need for anyone to get mad at anyone
<amz3`>the bug in Guile is still valid
<paroneayea>let's not escalate a friendly conversation
<paroneayea>amz3`: I think you and davexunit are "close" in agreement: I think davexunit was saying it wasn't "the solution"
<paroneayea>whereas you were saying "it's a current solution'
<amz3`>yes, exactly
<paroneayea>so let's be cool about it :)
<sneek>ACTION sprays icy cold water over the combatants
<amz3`>sneek: botsnack
<spk121>Hi. I saw mention of curl and (web modules) in the logs. Not ideal, but, the curl bindings and (web response) can sorta be made to work together.
<spk121>looks like this...