IRC channel logs

2015-08-03.log

back to list of logs

<nalaginrut>morning guilers~
<sneek>Welcome back nalaginrut, you have 1 message.
<sneek>nalaginrut, amz3 says: I'm trying to improve the definition of dynamic ffi bindings for my lib (the article on my blog in french). What do you think of this way of declaring bindings, can it work with other kind of c code? https://friendpaste.com/45Hol9olJmAdGnIK4mZIjQ
<septopus>evening!
<nalaginrut>amz3: I think it's fine for c-background-schemers, I will try to write cffi someday
<nalaginrut>amz3: and gcc-xml could be a choice for that, but you have to convert it to sxml and traverse it, which is inefficient
<nalaginrut>amz3: I think a relative simple C front end on Guile is better
***michel_mno_afk is now known as michel_mno
<nalaginrut>amz3: well, the game is cool, you want to implement the server-side with Artanis? ;-)
<amz3>I need to focus on getting something done, that's why I re-write wiredtiger bindings using a /more correct/ method
<amz3>I'd really like to use #sly for the frontend
<amz3>maybe I will convert my blog to artanis at some point
<amz3>héllo everybody :)
<amz3>hooking my blog to the indieweb is a project i have
<nalaginrut>amz3: if you are interested in implementing the server side with Artanis, you have to wait for 0.3 or later, for the high concurrent server core plus well websocket support
<nalaginrut>anyway, 0.1 is coming, which contains MVC
<nalaginrut>hmm...new server core should appear in 0.2, my bad...
<amz3>I'll make sure to test the 0.2
<amz3>nalaginrut: the thing preventing from using aratanis right now is that it requires a global config and guile-dbi
<amz3>it should be possible to use artanis without guile-dbi ou dbi-postgres
<amz3>the async core server is really intersting
<nalaginrut>amz3: I can remove guile-dbi prerequisite, and the latest Artanis supports local config
<amz3>because when I've setup artanis 0.1 it won't run the serverr withouit dbi
<amz3>ah ok cool :)
<nalaginrut>amz3: if you're using the latest master branch, you may try `art help'
<nalaginrut>`art create prj_name' will create a dir to hold all local stuffs, just like `rails'
<nalaginrut>amz3: you can run the server without DB, you have to remove #:use-db?
<nalaginrut>amz3: for an instance, (run #:use-db? #t) will init DB, but (run) won't
<nalaginrut>I'm sorry these feature are new, so I haven't put them in manual
<amz3>sneek: later tell nalaginrut you need document all the things all the time nalaginrut ;)
<sneek>Got it.
<lloda>there is a module M with a structure type S and a function F that operates on instances of S. You import M and after a long computation you create an instance of S. Then you find out that F had a bug, so you fix it and reload M. But now F doesn't accept your instance of S, because recompilation has created a new type S' that is incompatible with the S you had before...
<ArneBab_>lloda: suffering and pain from expensive interdependencies?
<MotherFatherGent>So when I compiled 1.8.8 it took about 1.5 minutes, then I compiled 2.0.9 and it took about 15, and now I'm compiling the latest from git and it's been going on for hours, is that normal?
<csed>MotherFatherGent: Hours? I'd go with no.
<csed>I can give it a try once I get home and let you know.
<MotherFatherGent>csed, hmm, well, I'll see when it finishes, but are the newer versions supposed to take that much longe?
<csed>MotherFatherGent: Like I said, I doubt it. Configuring now.
<csed>make -j 4 on an i7-3520M.
<MotherFatherGent>You got home quickly.
<csed>MotherFatherGent: Meh, figured I'd do it now.
<csed>Slow day.
<MotherFatherGent>And you're getting it from the git at the gnu page, the latest and greatest?
<mark_weaver>the first time build takes a long time to bootstrap, yes
<csed>MotherFatherGent: Latest and greatest.
<mark_weaver>it's a consequence of trying to bootstrap a compiler using itself
<MotherFatherGent>mark_weaver, ohh, I see. So it's possible for whatever reason it didn't bootstrap the first time?
<mark_weaver>guile 1.8 had no compiler at all
<MotherFatherGent>I probably should add that this point that the first 1.5 compile was a standard emerge from Gentoo's default repositories whereas this one is from an overlay.
<mark_weaver>and the compiler is getting increasingly sophisticated over time
<MotherFatherGent>Ahh, that might explain the difference as well.
<mark_weaver>and so the bootstrap process, which involves running the compiler within a slow interpreter as the modules of the compiler are built, is a very slow process
<mark_weaver>and getting slower as the compiler becomes more complex
<mark_weaver>one possibility would be to distribute the .go files as a separate tarball, to speed it up, as an option
<mark_weaver>many other similar compilers don't even bother having a bootstrap scheme, and just force you to start with a binary of the compiler.
<mark_weaver>ACTION goes afk
<MotherFatherGent>Well, it's done now in 1:45 hours.
<MotherFatherGent>Also, it doesn't seem to create a symlink to just guile, only guile-2.2 exists, hmm, I should probably make that.
<rlb>ACTION cheers for solid guile-X.Y (multi-version) support
***michel_mno is now known as michel_mno_afk
<amz3>so building a cli app is as easy as (match (command-line) (("my command" (my-command (cddr (command-line))))
<amz3>there is also some support in guile but I don't feel like using it
<Chaos`Eternal>helo, guilers
<davexunit>hey there
<amz3>héllo
***dje is now known as xdje
<rekado->hello, guilers
<rekado->I'm trying to add the skribe-reader from skribilo to haunt.
<rekado->the reader almost works, but the s-expression I get seems to need some more evaluation.
<rekado->for example (p [hello ,(+ 1 2)]) is read as (p (quasiquote ("hello " (unquote (+ 1 2)) "")))
<rekado->but what I want is to have the unquoted expression evaluated like: (p "hello 3")
<rekado->or rather (p "hello " 3 "")
<davexunit>does the skribe reader allow one to "escape" and evaluate arbitrary scheme expressions
<davexunit>perhaps not
<rekado->code that is not inside (p [ ... ]) does get evaluated.
<rekado->for example, I have a function 'ref' that returns (a (@ (href foo)) bar)
<davexunit>hmm
<davexunit>guess I need to learn about the skribe language
<rekado->when placed on the same level as (p ...) it works.
<rekado->normally, [] is treated as a quasiquoted list. Any unquoted expression should be evaluated.
<davexunit>oh okay, I was about to ask about that
<davexunit>I didn't see the opening `
<rekado->I'm just not sure if this is the readers job or if I need to do something with the expression I read.
<rekado->I'm all new to readers.
<davexunit>me too
<davexunit>if the code outside the (p ...) form is being evaluated, I would expect the unquoted stuff to also be evaluated
<rekado->the difference is that the code outside the (p [...]) is not inside any [].
<davexunit>why do you need the []?
<davexunit>I'm really clueless here
<rekado->the skribe syntax is simple: (p [Hello world]) becomes (p "Hello world").
<davexunit>so symbols become strings
<rekado->(p [Hello ,name]) becomes (p "Hello rekado") if (define name "rekado")
<davexunit>and concatenated
<rekado->Here's an example: http://www.nongnu.org/skribilo/index.html#example
<davexunit>rekado-: what is the output of (p [Hello 3]) ?
<rekado->(p (quasiquote ("hello 3")))
<rekado->forgot to mention the quasiquote before.
<rekado->I'm looking at the output of my skribe reader in haunt.
<davexunit>and (p [Hello ,3]) ?
<davexunit>rekado-: I'm very excited about this, btw.
<davexunit>if I convert my blog, Skribe looks like a good format to use
<rekado->(quasiquote ("hello ,3"))
<rekado->(p ...)
<davexunit>hmmm interesting
<davexunit>um, (p [Hello ,(3)]) ?
<davexunit>and then, (p [Hello ,("3")]) ?
<rekado->the example above (with [hello ,name]) was what I expect according to the docs, whereas the other snippets were observed output.
<rekado->my apologies for the confusion
<davexunit>ok
<amz3>(p [hello ,name]) works?
<rekado->thing is, I don't have a working setup of skribilo, so I cannot really check against the proper output.
<davexunit>ohhhh
<davexunit>I thought you were using skribilo
<rekado->amz3: no, it doesn't.
<rekado->davexunit: no, I'm just using code from skribilo, namely the actual reader procedures.
<amz3>afaik (p [hello ,name]) is not valid skribe reader, as for (p [hello ,(+ 1 2)]) in sfx I join the output to create the string "hello 3"
<davexunit>rekado-: I wonder if we should just depend on skribilo rather than snarfing?
<davexunit>anyway, neither here nor there.
<amz3>it's more or less (string-join (map my-eval content-of-quasiquote))
<rekado->skribilo does a lot more than what I need, so I only looked at the reader code.
<rekado->I think my problem may just be a result of double quoting or something.
<davexunit>yeah
<davexunit>something like that
<davexunit>sorry I can't be of much help
<amz3>rekado- what do you think you are double quoting?
<rekado->I have a document like this: http://paste.lisp.org/display/152944
<rekado->and this is the reader: http://paste.lisp.org/display/152944#1
<rekado->the *haunt* reader
<amz3>yes, i get the haunt reader
<rekado->almost the same as the sxml-reader
<amz3>yes
<amz3>I think I can get what you need using the sfx script i've sent
<rekado->%skribe-reader is just copied from skribilo/reader/skribe.scm
<amz3>actually it's the first step I've solved to get sfx working
<amz3>let me check
<davexunit>rekado-: it's gotta be the outer quasiquote
<rekado->yes, I think so, too.
<davexunit>I think you want to use another format for describing the post metadata
<davexunit>that the skribe reader can handle
<rekado->yes, I can try that.
<davexunit>I don't know what that would look like
<rekado->I never thought my mind was so simple, but it seems I cannot easily think about things when double quoting is involved.
<davexunit>rekado-: for now, try having that .skr file have *only* the (p ...) form
<davexunit>and make up metadata
<davexunit>hardcode it
<amz3>passing your post using sfx output <!DOCTYPE html><title /><tags>test</tags><content><p>hello abcdef</p>310</content>
<davexunit>and see if you can get the proper output
<amz3>(I removed the (figure))
<rekado->amz3: what is sfx?
<amz3>it's on guile mailling list
<rekado->oh, okay
<davexunit>it's amz3's templating system
<rekado->davexunit: or maybe I could use the skribe reader just for the (content ...) form.
<davexunit>rekado-: perhaps
<davexunit>that would be cool
<amz3>I was thinkg about another syntax that is inspired from racket's pollen
<amz3>somewhat inspired from racket
<rekado->Isn't pollen what's used by "practical typography"?
<amz3>yes
<amz3>he does #(foo bar baz) where # is special character
<amz3>but I'll rework you example to try to make it look like pollen
<rekado->yes. He uses this funny trapezoid thingie.
<amz3>it's very efficient for writting text, the thing is that, that is not skribe reader, it requires another kind of reader
<amz3>yes
<amz3> https://github.com/mbutterick/pollen
<rekado->davexunit: skribilo does not export the actual reader, so reusing it from (skribilo reader skribe) would not work without modification to skribilo.
<davexunit> http://practicaltypography.com/why-racket-why-lisp.html
<davexunit>rekado-: I see.
<rekado->guile-reader has support for 'skribe-sexp', which is what is ultimately used to read the syntax.
<amz3>here is sfx code, but it does thing that you don't need for haunt reader https://friendpaste.com/cgdyKJdXsOK9XNF4sDiIb
<davexunit>rekado-: oh cool, so we just need a guile-reader dependence + some glue?
<rekado->davexunit: yes.
<rekado->I'll prepare a patch when it works for me.
<rekado->amz3: nice.
<davexunit>rekado-: very excited.
<davexunit>I've been meaning to rework the site build system to better accomodate site auto-rebuilding in 'haunt serve'
<amz3>I think that this kind of syntax is nice for writing blog posts: https://git.framasoft.org/snippets/49
<rekado->amz3: I like the simplification of attributes.
<amz3>thx
<rekado->amz3: I get a 404 on the link you posted
<amz3>retry it works for me
<davexunit>404
<amz3>another paste https://friendpaste.com/cgdyKJdXsOK9XNF4sDgkV
<amz3>there is an extra period for title, but it's basically pollen syntax with , instead of triangles
<amz3>this syntax can be achived.
<amz3>actually without a new reader
<amz3>I'm not sure actully
<amz3>do you want me to try ?
<amz3>I'd a modification of sfx, I will remove all the code about templating to keep only the skribe reader and the code to interpret the example pseudo pollen file
<rekado->why would you need the skribe reader at all? (Or are you using it already for sfx?)
<amz3>each line is basically `[ content-of-the-line ]`
<rekado->yes
<amz3>I don't know how do it otherwise
<amz3>it should be possible
<amz3>since skribe reader is a composition of reader
<rekado->I think it's nice, though personally I consider the additional parentheses as a feature. I got used to them, you know :)
<amz3>ok
<rekado->currently, my blog posts are written in markdown, so changing the syntax to pollen/sfx would be a smaller change than to use full-blown skribe syntax.
<rekado->I don't know.
<davexunit>rekado-: I've still gotta write that markdown haunt reader...
<davexunit>that would let you migrate without much change
<amz3>sfx is basicaly html it's painful somewhat
<rekado->it's not so bad --- I take the conversion as an opportunity to fix typos and add updates to some posts.
<rekado->sfx looks like a nicer sxml, like skribe.
<amz3>in the sfx.scm code the following line reads every (form) you can tweak things here https://friendpaste.com/cgdyKJdXsOK9XNF4sDiIb
<rekado->ACTION has to go now
<davexunit>see ya rekado-
<amz3>like add quote or something
<davexunit>happy hacking
<amz3>cu
<mark_weaver>dsmith-work: sneek is not responding to my commands. any idea what's wrong?
<mark_weaver>oh, nevermind, I guess he lost his connection
<mark_weaver>and now he's back