IRC channel logs

2015-07-31.log

back to list of logs

<androclus>hey, all.. is anyone using guile-dbi?
<androclus>hmm.. :-) .. if not.. is anyone using any other (guile-based) api to connect to a database? any you can recommend?
<androclus>..the reason i ask is because when i try to connect in with guile-dbi using the guile-dbd-mysql driver, and connect to my mysql-5.0 server, i get the error message:
<androclus>(1 . Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled))
<mark_weaver>androclus: guile-dbi definitely sees a fair bit of use, but I don't have much experience with it myself
<mark_weaver>what version of guile-dbd-mysql are you using?
<androclus>mark_weaver: thanks for responding.. i am using guile-dbd-mysql 2.1.4, which appears to be the last one developed. (from http://download.gna.org/guile-dbi/)
***michel_mno_afk is now known as michel_mno
<janneke>morning!
<amz3>héllo :)
<amz3>nalaginrut: you don't like my template language ;)
<amz3>skribe reader is written maintained by civodul
<amz3>I don't know hos he adds the bracket and keyword syntax to the guile reader
<amz3>ACTION afk for while
<amz3>nalaginrut: will PR it anyway to artanis ;)
<nalaginrut>amz3: no ,actually I like it ;-)
<nalaginrut>I never thought (@ (name "john")) could be converted to keywords style (@ :name "john")
<nalaginrut>is cleaner
<nalaginrut>amz3: what I want is something like BNF, then I can put it on manual of Artanis to guide users try it
<nalaginrut>oops, it couldn't be in artanis ;-)
<nalaginrut>at least in my blog
<nalaginrut>artanis won't include static pages generator, since it's big enough now, and is still growing
<nalaginrut>ACTION doesn't expect one day Artanis is as big as GCC, but seems it going that direction...
<amz3>as big as GCC?
<amz3>afaik GCC is a massive project :)
<amz3>there is not need for BNF, the syntax is the same as scheme (mostly)
<amz3>it really looks like rails template language afaik
<amz3>except it use a scheme syntax and scheme code to script the template like artanis does
<nalaginrut>amz3: it's a joke ;-)
<amz3>pfff :O
<amz3>:x
<amz3>I am amazed
<amz3>that said, when I have look at django, I am impressed by the cruft
<amz3>I should pull some time, to work with artanis for the real and see how the RDBMS frontend works
<nalaginrut>amz3: I ever wanted to write a slim like template syntax, http://slim-lang.com/
<amz3>I don't like yaml :/
<nalaginrut>but finally I stopped, since the frontend guys shout on me, "s-expr is shit no matter how you dress it"
<amz3>I will by sfx-template.com and build a website for it, they will be amazed
<amz3>yeah, that's the problem with sxml based templating, if youi don't know scheme it looks dubious
<nalaginrut>well, then I think maybe we don't have to please them
<amz3>^^
<amz3>nalaginrut: I have an idea to deal with application and sub-application, are you aware of this concept? it's from Django, but probably rails as something similar
<amz3>flask has blueprints
<amz3>the idea is to not have globals at all :)
<nalaginrut>amz3: is fine to add more template syntax, but it's recommended not to add them to Artanis core, you know I have plan to write pkg-manager for Artanis, right? That's for plugins
<amz3>ACTION should not spread idea for the sake of it
<nalaginrut>so folks may add what they like as plugins, I'll reduce Artanis core in the future
<nalaginrut>a massive project is hard to maintain
<amz3>nalaginrut: yeah, something like that, that can resolve dependencies, it would be awesome. That is the problem with django, when an app requires another app, etc... it becomes tedious. Even if compared to apt the use-case is simple
<amz3>gcc is not :p
<nalaginrut>amz3: GCC is a miracle, although it's huge, it's still maintainable, but as I know, it's very hard to touch something in it, like register allocator ;-)
<nalaginrut>and there's no one can explain it clearly (read from a paper)
<amz3>there is several frontend, several backend, several optimization engine that is all :)
<amz3>put some ast inside the thing, and you have the gcc
<amz3>by the way, gcc was a something called gcc-xml (more or less) that output the ast of the c code, this can be a starting point for building a automatic dynamic ffi, instead of writing a c parser in scheme
<amz3>I started to have a look at it, but right now my coding level regarding processing xml is not up to the task
<amz3>ACTION is thinking
<amz3>what is the correct way to do:
<amz3>(sxml-match node [(,tag-name . ,rest) tag-name])
<amz3>I'm trying to capture any node. I am trying to filter nodes based on some attribute value (even if it doesn't appear in the above example)
<dsmith-work>Happy Friday, Guilers!!
<amz3>happy friday dsmith-work
<amz3>sxml-match expects that the node/tag name to be explicit
<amz3>here is the mockup function that doesn't work as expected:
<amz3>(define (strip-foreign-declarations gcc-sxml)
<amz3> (map (lambda (node)
<amz3> (pk 'node node)
<amz3> (sxml-match node
<amz3> [(tag (@ (context ,context) . ,rest)) context]))
<amz3> gcc-sxml))
<amz3>tag should be "free form".
<amz3>I got around this behavior by specifying several match rule for each node
<amz3>a match rule for each node
<rekado->amz3: the skribe reader uses the guile-reader library, which has support for skribe-exp.
<rekado->amz3: there's a reader definition in the skribilo sources.
<amz3>yes i did not want have a dependency on skribillo. Since the code for skribe reader is short I include it in sfx.scm
<amz3>I should probably write a note on my blog
<zacts>hello guilers
<zacts>so I noticed: http://wingolog.org/archives/2014/01/12/a-continuation-passing-style-intermediate-language-for-guile
<zacts>and also http://wingolog.org/archives/2015/07/27/cps-soup
<zacts>I just woke up
<zacts>but does this imply that guile 2.2 may have a full compiler?
<davexunit>zacts: guile 2.0.x already has a compiler
<davexunit>it's a compiler for the bytecode vm
<davexunit>not a native compiler
<zacts>oh I see
<zacts>so a bytecode compiler
<zacts>ok cool
<davexunit>guile 2.2 has both a new VM and bytecode compiler
<zacts>so will the main improvements for 2.2 be speed?
<zacts>oh yes
<zacts>and what benifits will the new VM and bytecode compiler bring.
<zacts>?
<davexunit>guile 2.2 will be much faster
<zacts>the . should have been a ?
<zacts>oh nice!
<davexunit>also, there's no longer a fixed-size stack.
<davexunit>and the VM is a register machine now, not a stack machine.
***michel_mno is now known as michel_mno_afk
<zacts>what implications would a fixed sized stack have versus a register machine?
<davexunit>zacts: you're mixing up 2 things. are you asking the difference between a stack machine and a register machine?
<zacts>oh I'm sorry
<davexunit>guile could've switched to a register machine without remvoing the stack limit
<zacts>oh
<zacts>I see
<davexunit>so yeah, there's 2 important high-level changes
<zacts>what are the implications of not having a fixed-sized stack now?
<davexunit>sorry if I bundled them up into one when I was talking about them.
<zacts>oh no, I think it's more my naiveness of being new to some of these ideas
<zacts>I have much to learn, and still SICP to complete
<davexunit>zacts: maybe an example is the best way to explain it.
<davexunit>let's take the 'map' procedure
<zacts>ok
<zacts>it maps a procedure onto a list?
<zacts>to every item in a list
<davexunit>yeah
<davexunit>(map 1+ '(1 2 3)) returns '(2 3 4)
<zacts>ok
<davexunit>in guile 2.0.x, if you wanted to implement 'map' that works for *any* size list
<davexunit>you couldn't implement it recursively
<davexunit>because you'd run out of stack frames
<zacts>oh interesting
<davexunit>you have to implement it iteratively
<davexunit>the side-effect of that is that the generated list is backwards, and must be reversed as a final step before being returned to the caller.
<zacts>ah ok
<zacts>cool
<davexunit>with a stack that dynamically expands, 'map' can be implemented as its natural recursion
<davexunit>(define (map f l) (if (null? l) '() (cons (f (car l)) (map f (cdr l)))))
<davexunit>use that procedure on a huge list in guile 2.0.x and enjoy your stack overflow exception :)
<davexunit>ACTION thinks about how to implement a remote debugging repl for a guile web server
<davexunit>say a request comes in, and I want to stop execution at a certain point and inspect the environment at the repl.
***pastaf_ is now known as Pastaf