IRC channel logs
2015-09-19.log
back to list of logs
<ArneBab>can you figure out the guile load path from the package? :) <paroneayea>ArneBab: I can figure out pretty easily what to do with the .scm files, but I don't know what to do with the .w files <ArneBab>you don’t need to install the .w files <ArneBab>./bootstrap.sh turns them into .scm files, and they are all you need <ArneBab>just wisp-scheme.scm and language/wisp/spec.scm <paroneayea>ArneBab: so just those ones need to be on the guile path? <ArneBab>also they need to be precompiled when you want to run with --language=wisp <ArneBab>if you just want to use ,L wisp in guile, that’s not needed <paroneayea>ArneBab: btw, how does the project do the .w -> .scm stuff? <ArneBab>there’s wisp.scm which converts wisp files into regular scheme <ArneBab>and wisp-guile.w is converted to regular scheme by wisp.py :) <ArneBab>(there’s a monotonically *de*-creasing number of parsing bugs from wisp.py over wisp-guile.w so wisp-scheme.w — the first two have known errors) <paroneayea>ArneBab: might be neat if we can reduce the amount of bootstrapping by starting with guile rather than python <ArneBab>I could include wisp.scm in the release tarball <paroneayea>I mean the initial bootstrapping process written in guile rather than python, if it were to eventually be included in guile core :) <ArneBab>the bootstrapping process is just the shell script — to include wisp in core I’d leave out wisp.py <ArneBab>and bootstrap directly from wisp.scm <ArneBab>the current bootstrapping pretty much follows the historical development of wisp: I first wrote the python-based parser, then I wrote a wisp parser in wisp, then I wrote a second, cleaner wisp-parser in wisp. The first wisp-based wisp-parser can be used to bootstrap the second. <ArneBab>is wisp-scheme.scm at the top-level in the path <ArneBab>can you also do (use-modules (language wisp spec))? <paroneayea>ArneBab: I accidentally dumped the filename in the directory name, if you can believe it <paroneayea>so it was language/wisp/spec.scm/spec.scm and language/wisp/spec.scm/spec.go <ArneBab>ah, yepp, that seems like an error which can happen pretty easily <paroneayea>ArneBab: if you push out a new version and change the way building works btw <ArneBab>to make that clean, I could add a --bootstrap flag to configure which runs through the whole process <paroneayea>scheme@(guile-user)> (use-modules (language wisp spec)) <ArneBab>I also started to see the setlocale problem here, but I thought it was a local setup problem… <paroneayea>warning: failed to install locale: Invalid argument <paroneayea>ArneBab: I think I'll submit it to the list and ask for advice there <ArneBab>I also get the setlocale thing with Gentoo, but don’t know why <paroneayea>ArneBab: it's a bit weird having to do two blank lines after every wisp statement to get it to eval <ArneBab>because that would break functions which have a single empty line between statements <ArneBab>I stumbled over that dozens of times with Python <ArneBab>then you throw the code in the interpreter and it doesn’t <paroneayea>so users can configure at the interpreter how many <RET> they want :) <ArneBab>because the interpreter executes pre-emptively <paroneayea>ArneBab: it feels like two modes I'd like to switch between <ArneBab>the current development version includes an addition which allows finishing a statement with a final period <paroneayea>it doesn't go "flush" with the code you're writing :( <ArneBab>(which uses the “reserved for future experiments trailing dot” from SRFI-119) <ArneBab>I did not release that yet, because I’m still testing (and writing the PhD draft) <ArneBab>essentially wisp just turns the parens around <ArneBab>since lines starting with paren are much more common than lines starting without paren <ArneBab>^ that’s the big difference to readable and SRFI-49: avoiding a special case for single-element lines <ArneBab>(and it’s a source of errors — the discussion with the readable folks isn’t completely closed on that from my side — I can’t yet say whether the problem will persist with somewhat better tooling) <ArneBab>(like warning when you begin a line with a string or number without preceding . <paroneayea>ArneBab: at some point I'd like to dig into guile's compiler, and it sounds like you're interested in this becoming a guile core thing <ArneBab>(I think it’s the right way to go, though) <paroneayea>would you be okay with relicensing as LGPLv3 and shooting for guile upstream? <paroneayea>it seems like a good entry-level way for me to get into the compiler, since you've done the brunt of the work <ArneBab>paroneayea: you can have a look at language/wisp/spec.scm to see the compiling it currently does <ArneBab>paroneayea: but first: thank you very much for creating the guix package! <paroneayea>ArneBab: hm, wisp-mode is in desparate need of good C-j support in emacs :) <paroneayea>ArneBab: thanks for working with me on this today! <ArneBab>I would love to already have nice keep-indentation and indentation cycling via tab… <ArneBab>paroneayea: thank you for taking it up! <paroneayea>ArneBab: yes something python-mode like would be nice <ArneBab>what do I do when make needs guile to run but I just deinstalled guile? <ArneBab>(to get the new version the unclean way…) <daviid>do we have a built-in that would do (... '(a b c d) '(1 2 3 4)) -> '(a 1 b 2 c 3 d 4) what would be its name or a good english name if i write it ? <please_help>it should probably be called something like unzipn* as it matches the unzip<#> pattern in srfi-1 except it returns a list instead of multiple values. <daviid>please_help: ah, tx, did not look at srfi-1 :) but wrote these 2, don't know about the naming though? [and list-insert could accept any number of list but this is a quick thing I needed immed...] http://paste.lisp.org/+3BX1 <mark_weaver>sneek: later tell daviid: a simple way to write that is: (define (interleave a b) (concatenate (map list a b))) <mark_weaver>sneek: later tell daviid: (interleave '(a b c d) '(1 2 3 4)) => (a 1 b 2 c 3 d 4) <mark_weaver>sneek: later tell daviid: to generalize to arbitrary numbers of lists: (define (interleave . lls) (concatenate (apply map list lls))) <paroneayea>btw protip for wisp if you don't use it already, ArneBab_ <ArneBab_>paroneayea: I don’t use it yet — thanks! <sneek>daviid, you have 3 messages. <sneek>daviid, mark_weaver says: a simple way to write that is: (define (interleave a b) (concatenate (map list a b))) <sneek>daviid, mark_weaver says: (interleave '(a b c d) '(1 2 3 4)) => (a 1 b 2 c 3 d 4) <sneek>daviid, mark_weaver says: to generalize to arbitrary numbers of lists: (define (interleave . lls) (concatenate (apply map list lls))) <daviid>hi paroneayea! how is hacking today? <paroneayea>daviid: I need to get out a blogpost on state of the goblin instead <paroneayea>however, next week, which I was going to spend on federation, I think I am going to spend on guix stuff instead, because of the talk <paroneayea>meanwhile I am idly reading module/languages/ of guile :) <daviid>ok, needs to be done too i guess ... i'm on guile-clutter and grip-clutter today <daviid>i have to give a try to kawa as well, i don't like clojure so much and hate the idea to have to learn yet anotner ecosystem ... maybe not today but will do <taylanub>I need to do some good testing though. struct alignment is tricky as hell. <daviid>taylanub: i wish i had the time and the skil to inject your work in g-wrap <amz3>I am always surprised to see that much people use kawa <amz3>always in the sens, that even the obscure implementation/language have user <amz3>yes kawa seems to me like obscure implementation <amz3>but it looks that I'm wrong <amz3>at least the top commenter gives a detailed answer about why to choose it over the three other languages <amz3>which means kawa *has* users <daviid>amz3: i really don't and never did think kawa is/was obscure, it is just scheme [almost, see consciensly taken decisions about partial continuation implementation], it's just that it compiles to jvm blabla <daviid>i posted the link here because, presumably, i'm not the only one who has to face this clojure 'problem' and 'ecosystem', coming from scheme ... and tere are at least 2 alternatives, as it appears, really well and deeply analyzed by the author adn in the responses... <taylanub>daviid: what's g-wrap? my library is in dire need of actual use, to test its capabilities, so I might work on integrating it into something. <daviid>taylanub: oh, g-wrap is used by guile-gnome and guile-clutter, see here: <sirgazil>But I'm failing to use the "predicate" property of options <sirgazil>The error I get is in the comment in that same URL ^ <paroneayea>more fun than doing the work I'm supposed to be :) <mark_weaver>sirgazil: you need to change the "'" to "`" and put a comma "," before 'file-exists?'. <mark_weaver>the problem is that since that's a quoted structure, you were giving it the symbol 'file-exists?' instead of the procedure. <daviid>paroneayea: yeah, mark_weaver is a wizard :) and he does that with 1 kid in each hand ... :) <mark_weaver>"`" is a shorthand for "quasiquote", which is a templating mechanism. it means that not everything in the structure is quoted; you can "unquote" things with comma, and then those parts will be evaluated and their values inserted into the template. <sirgazil>Ah, I didn't understand that part in the documentation. Thank you mark_weaver and paroneayea for taking a look :) <mark_weaver>daviid: the kids are out for a few hours, so I'm free!! :) <paroneayea>sirgazil: I encourage you to look at the quasiquote part of the docs to see why this is <sirgazil>I will, thanks. I need to understand why quoting and quasiquoting :) <daviid>of (define-method (compute-get-n-set (class <gparam-class>) s) using %hacky-struct-ref %hacky-struct-set! <taylanub>"Should be unnecessary once the patches submitted to guile-devel on 10 April 2008 are accepted." O_o <taylanub>do Guile's struct-ref/struct-set! have anything to do with C structs? I'm not sure if I understand the relation. <daviid>taylanub: also, everybody here will rather recommend to integrate your work to/with/within the FFI ... so ignorant like me can 'just' access any C struct <taylanub>yes, I'll work on FFI integration eventually. <daviid>taylanub: that's a much better focus :) <daviid>then we can rewrite g-wrap to use the FFI, and improve h2defs.py, so 1 day it just read any C .h file and writes the wraper for us <taylanub>I also have it on my long-term plans to write something that generates bytestructure code from C headers, but no idea what the best approach would be. maybe a GCC plugin. <daviid>taylanub: this is behond my knowledge, but I wish we could totally automatically wrap C code: is this an ignorant dream ? or 1 day we could acheive this? <taylanub>not my expertise either, but from my imagination: a mechanic transformation/wrapping of all #defines, type definitions, global variables, functions, etc. should be possible given enough effort, but even then there will be the problem of C libraries being designed in line with C idioms like manual creation/destruction of objects. probably some human intervention is necessary for a good Scheme <taylanub>wrapper of an arbitrary C library. otherwise one will be forced to "write C in Scheme" as they say <please_help>there were utilities to automatically generate ffi wrappers, and lazy-ffi in chicken is pretty automatic as well. <please_help>the utility I was thinking of was called SWIG, though its guile support is broken at the moment. <daviid>please_help: never used it, I trusted our maintainers who did not either, they knew about it, and rotty [the g-wrap author] is a very knoledgeable person, they wrote g-wrap, our swig... <daviid>g-wrap is from the 'old school', it generates C code, sing SCM_..., compiled in a lib.a we load and use... I wish a knowledgeable guiler could look at g-wrap and help me to rewrite it to use the FFI instead <daviid>then we would port h2defs.py to guile, adapting it to the new g-wrap 'capacity', and work toward full automation, step by step... <daviid>it's not too bad as it is becausse the C code is generated, so drastically reducing human errors, but the modern ffi would be much better of course <daviid>just wrapping glib generates 6000 lines of C code, gtk 33000 lines of C code <paroneayea>ArneBab_: I wish there was a way to make the REPL "flush" on any of the continuing "..." lines with the user's first line <paroneayea>it's kind of confusing working with wisp otherwise <paroneayea>I think this is true of a lot of non-scheme stuff at guile's repl though <paroneayea>there needs to be a "flush" repl option or the like