IRC channel logs


back to list of logs

<Labu1>So big that I'm lost in, thx your help I find all what I want to find
<tcolgate>hi, don't suppose I could ask some non-guile specific scheme questions? (inspired by the little schemer)
<tcolgate>I'll take my Qs to #scheme I think
<amz3>the gnunet bot will for some go based logger, maybe it's time to write our own bot...
<amz3>will be replaced
<amz3>Labu: FWIW, I almost never use optional arguments for some reason
<Labu>hello amz3
<Labu>I don't understand. optional argument ?
<amz3>Labu: sorry, I mixed conversation
<amz3>Labu: what are you trying to do using guile?
<Labu>I love guile
<Labu>at now I try to make a restfull ws with
<Labu>I began with the router
<MaliRemorker>i tried to submit a bug report to and didn't get any automated feedback. Is this expected behaviour?
<Labu>MaliRemorker: with email ?
<MaliRemorker>Labu: yeah, with email
<MaliRemorker>as a patch
<MaliRemorker>, pardon
<MaliRemorker>not guile-bug
<MaliRemorker>(but i did send to a correct email address)
<Labu>it's take a while wait some hours
<MaliRemorker>good to know
<amz3>Labu: I do webdev too, don't hesitate to ask question
<Labu>ok thx amz3 did you made a lib or framework to dev with guile ?
<amz3>Labu: I am putting something together, but it's missing some stuff like csrf protection, documentation and a nice theme
<amz3>I will try to publish something tonight
<amz3>Labu: are you subscribed to the mailling list?
<Labu>ok nice amz3 !
<Labu>I am not subscribed to mailling list, sadly
<amz3>well, I will ping you via IRC then
<Labu>ok thx amz3
<Labu>I stay around
<amz3>Labu: you know what I am too lazy to do a release right now, look at this project
<amz3>Labu: it's mostly snarfed from 'guix web' I added a few helpers, see src/web/ directory
<amz3>Labu: you can run the app using: cd src && sh web.scm
<amz3>Labu: see at the bottom of web.scm how the router is done, it's a 'match' over spitted uri path components
<Labu>thx amz3 I am looking
<Labu>oh! framasoft has a gitlab
<Labu>nice amz3
<Labu>what I try to do it's a router factory wich take an associative list of paths with handler associated and return a router like yours
<Labu>what is guix web amz3 ?
<mwette>oops -- sorry
<Labu>ah ok guix the package manager
<amz3>Labu: How do you plan to implement parametric urls?
<Labu>amz3 it's a good question. I don't know yet. I began yesterday
<amz3>well, be aware that I tried that way and it's difficult
<Labu>amz3: ok
<Labu>my first idea would be to delegate this two function associated with the path amz3
<Labu>to a*
<Labu>to the*
<Labu>and parsing path to search specific token
<amz3>Labu: it's not worth the trouble, match based router can achieve a similar purpose
<Labu>amz3 the problem is indeed the router which must handle dynamic url
<Labu>amz3 another thing if I want to be resource oriented I must define method (GET, POST, PUT...) in the resource itself
<Labu>I don't know I do that yet
<Labu>how I'll do that yet
<amz3>in the resource itself?
<amz3>I am not sure what do you want
<Javyre>Hi, the manual strongly recommends *not* using finalizers, but I need to have destructors for the foreign object's slots... is there a cleaner way of doing this?
<spk121>Javyre: in my humble opinion, finalizers are the way to go if you need finalization. They are no problem if they can be called at any time from any thread after you're done with your foreign object.
<spk121>But, your finalization should be a dead simple thing: a 'free' or a 'close' or whatever. And it should only touch the specific foreign object in question.
<Labu>amz3 in a rest point of vue
<Javyre>what about the allocations? guile won't be able to properly judge how much memory im using
<spk121>Javyre: if you alloc outside of guile and don't use bdw-gc for allocation, you need a finalizer
<Apteryx>Is it good practice to raise an exception in a match clause that unexpectedly doesn't match anything? What's the idiomatic way to raise an error in Guile?
<Apteryx>(error ...?) :)
<amz3>good question
<spk121>(error ...) is easiest. It throws a misc-error.
<amz3>well, the problem with error is that it always throw misc-error
<spk121>scm-error if you want a specific type of error: wrong-type etc,
<Apteryx>spk121: OK, thanks!
<Apteryx>I see many places in Guix where we use match clause without acting on the 'unexpected' case. This seems equivalent to writing IFs considering only one branch, which is not very robust. It might break farther with cryptic errors or it might run with undefined behavior ;)
<Apteryx>Oh! I'm wrong. If you only include one match clause, the error throwing mechanism is already built-in :)
<Apteryx>From the doc: If no clause matches, throw an exception with key
<Apteryx> ‘match-error’.
<Apteryx>that explains it. Sweet!