IRC channel logs

2015-09-02.log

back to list of logs

<taylanub>mark_weaver: you were interested in this a while back, and I made some big updates, including the long desired syntactic API, so maybe you'd like to take a look again: https://github.com/taylanub/scheme-bytestructures
***cluck` is now known as cluck
<mark_weaver>taylanub: I will, thanks!
<paroneayea>daviid: guile-opengl (and thus sly) do not use the ffi btw
<paroneayea>oh, daviid is not on
<paroneayea>to continue replying anyway, I think davexunit would *like* a version that uses the ffi anyway
<mark_weaver>paroneayea: I think you're mistaken
<mark_weaver>I think guile-opengl uses the dynamic FFI
<davexunit>paroneayea: you're thinking of guile-sdl
<davexunit>which is a C extension
<davexunit>I want to rid myself of that one as soon as possible
<davexunit>by upgrading to SDL2 and starting the guile-sdl2 project using the FFI
<davexunit>among other annoyances, guile-sdl just doesn't build on OS X.
<davexunit>so multiple people that otherwise would have tried Sly just moved on.
<paroneayea>ohhh
<paroneayea>davexunit: okay!
<paroneayea>so you're right.
<paroneayea>mark_weaver: you too ;)
<paroneayea>sorry!
<paroneayea>for spreading confusion
<davexunit>still musing about the best means of combination for rendering
<davexunit>haven't been super happy with the <model> data type as of late.
<davexunit>a monadic combinator style might be better.
<davexunit>that way I can write the imperative, side-effect laden rendering procedures and lift them into the render monad.
<davexunit>where they can be easily composed to from complex scenes.
<davexunit>to form*
***cluck``` is now known as cluck
<crodjer>With geiser mode, how can I quickly get out of the backtrace (I mean get rid [x]) to the top level.
<crodjer>If I write ',help', I end up with the prompt: 'scheme@(guile-user) [5]>'
<crodjer>On more usage, the number increases fast.
<adhoc>,q i think
<crodjer>Yes. But it isn't much useful when the prompt says [255].
<crodjer>I guess there is some command that geiser runs frequently which is silently failing.
<daviid>crodjer: afaict, this is the symptom of a bad geiser installation/configuration
<crodjer>I use el-get. I guess that doesn't set things up correctly.
<daviid>verify your installation
<crodjer>Ahh, I have errors in *geiser messages*. That will help me out with debugging this.
<daviid> http://www.nongnu.org/geiser/geiser_2.html#Installation
<crodjer>daviid: Yes. I will now.
<crodjer>Thanks.
<daviid>wc!
<crodjer>Otherwise, the workflow seems very nice.
<crodjer>I am trying to learn scheme through SICP.
<crodjer>Have there been efforts on getting scheme to run on the browser? Like clojurescript.
<daviid>crodjer: emacs + guile + geiser rocks, forget about clojurescript like toys :)
<crodjer>daviid: I meant so that one could not write JS (because it absolutely doesn't rock)
<crodjer>Anyway, I think I am starting to see some power that comes out of simplicity of Scheme.
<daviid>crodjer: since your are learning, stick to the environment of your coice for a while, guile is really good, especially coupled with/to geiser, but there are ohers of course, mit scheme has a dedicated module for sicp, racker has a beginner 'sort of' gui environment. I hope you can fix geiser and stick to guile, it's worth the investment imo.
<daviid>s/racker/racket
<crodjer>daviid: Fixed the issues now. The `el-get` recipe takes care of setting up geiser. All I had to do was remove installation calls from my config.
<daviid>great!
<crodjer>I am going to continue with guile/geiser for now. Didn't really like DrRacket.
<crodjer>Coming from Haskell, I really miss static typing in Scheme.
<daviid>cool, welcome!
<daviid>schemers don't like static typing in general, but I won't enter in this talk, it just don't interest me :) I just wanted to get you up and running for now
<crodjer>daviid: Sure. Thanks for the help.
<daviid>crodjer: welcome!
<ecraven>crodjer: you might be interested (conceptually) in parenscript (which is for common lisp, but something like it could be built on top of any Scheme)
<crodjer>ecraven: parenscript sounds interesting.
<ArneBab>crodjer: there has been a try during this years GSoC to get scheme to run in the browser, but it isn’t finished (hopefully that’s a “yet”). See https://lists.gnu.org/archive/html/guile-user/2015-06/msg00007.html
<crodjer>ArneBab: Interesting.
<crodjer>I hope the effort continues as well.
<ArneBab>yes
<crodjer>Is there a standard (portable across scheme implementations?) way of modularizing scheme code?
<taylanub>crodjer: so-so. some implementations support R6RS libraries. recently some support R7RS libraries. personally I think R7RS is the way forward, but the Guile development team and community is kind of undecided (or against R7RS) from what I can tell.
<taylanub>crodjer: in https://github.com/TaylanUB/scheme-bytestructures you have an example for how one can make an R7RS-and-Guile library, by putting the library/module boilerplate into separate files. (sadly this doesn't work with R6RS, which has no 'include')
<taylanub>(it's also annoying on Guile because the include-from-path usage means that Guile's auto-compiler won't pick up changes to the included files; you have to 'touch' the files containing 'define-module' (under guile/) to induce a recompilation)
<crodjer>taylanub: So Guile implements a few parts of R7RS?
<taylanub>crodjer: Guile implements most actual functionality in R7RS, but needs some last bits to fall in place to make R7RS libraries easily usable with Guile. there were some instructions on how to get a mostly R7RS environment in the REPL...
<taylanub> https://gnunet.org/bot/log/guile/2014-11-15#T513734 here
<taylanub>it could be that you need to build the r7rs-wip development branch
<crodjer>Got it.
<crodjer>Was just curious about these things. I haven't yet reached a stage where I need modules/R7RS features (don't know what they are really)
<amz3>héllo :)
<ecraven>crodjer: they help you keep your namespaces separate
<please_help>I'm getting guile[pid]: segfault at 0 ip 00007fde1e6362cc sp 00007fff8903cbd0 error 4 in libafopencl.so.3.1.0[7fde1d9c6000+10eb000] which results in what looks like a gpu lockup. Not sure if it's an FFI problem or a library problem though.
<sneek>Welcome back please_help, you have 1 message.
<sneek>please_help, taylanub says: I finished the macro-based version of bytestructures. I'll work on a new test suite next; meanwhile you can ping me on any bugs you find (or other issues you have).
<ArneBab>sneek: late tell wingo: could you msg me when you have a few minutes?
<sneek>wingo:, ArneBab says: could you msg me when you have a few minutes?
<ArneBab>sneek: later tell wingo: could you msg me when you have a few minutes?
<sneek>Got it.
<ArneBab>sneek: botsnack
<sneek>:)
<amz3>héllo remi`bd
<crodjer>ecraven: Yes. But while solving SICP, I didn't find much need for namespaces yet.
<remi`bd>hi!
<civodul>hey, remi`bd
<amz3>remi`bd: if you need proof-reading, I can help :)
<amz3>I'm not native english speaker though
<adhoc>amz3: thats ok, you work with someone that is =)
<adhoc>i'm up for doing proof-reading tech doco.
<amz3>maybe it's forbidden by gsoc rules
<remi`bd>thanks!
<desiderantes>Hello, i am interested in embedding Guile as a scripting language for my application, but i can't find a good updated tutorial about doing it, can anyone provide me with one?
<desiderantes>I am planning to write some Vala bindings for Guile
<davexunit>desiderantes: while Guile can be embedded, it's typically best to extend guile.
<davexunit>that is, write pure scheme extensions or C shared libraries that Guile can load.
<dsmith-work>Wednesday Greetings, Guilers
<desiderantes>davexunit, so Guile as a scripting language for my app is discouraged?
<desiderantes>Well, that's unexpected
<davexunit>desiderantes: no, but most people do not understand the difference between embedding and extending.
<davexunit>if you really want to embed, the guile manual goes through the details pretty well.
<davexunit>I learned all about the C API from the manual.
<davexunit>back when I was embedding guile into C applications
<davexunit>but I would think hard about what you really want. do you really want to embed guile, or do you want to write your program as an extension to guile that can be composed with other guile extensions?
<desiderantes>I want users to write quick plugins for the app
<desiderantes>Exposing my app as a GUile extension is a different scenario
<davexunit> https://gnu.org/software/guile/manual/html_node/Programming-in-C.html#Programming-in-C
<desiderantes>davexunit, thanks a lot!
<ArneBab>desiderantes: the guile manual describes in detail how to embed guile. When I started I was pretty surprised at that, because its more detailed at embedding than at using Guile to directly build programs.
<desiderantes>somehow i overlooked that
<davexunit>desiderantes: there's a good amount of stuff in there. might not be instant gratification but I recall a few tutorial-like segments that got me going.
<davexunit>you'll learn about thinks like "smobs", which allow you to expose your C data structures as scheme objects
<desiderantes>davexunit, basically i will expose some GObjects
<desiderantes>It's a messaging app written in Gtk+
<davexunit>this is a time where I wish our GTK bindings and extensions were in better shape. thankfully we have daviid around working on that.
<desiderantes>Nice
<davexunit>Vala is an unfortunate language and it would be so much better to encourage people to write gnome software using Guile instead.
<desiderantes>I, however, know almost nothing about Scheme, so i'll take my time to learn it
<davexunit>the basics are not hard to learn
<davexunit>the core of Scheme is very small
<desiderantes>davexunit, Vala integrates better into the GObject ecosystem, and it's a formalism controlled by GNOME people, very close to C#
<desiderantes>They, however, decided on JS as the main language
<davexunit>both unfortunate choices. I wish they focused on Guile instead, it being better than both and the official extension language of GNU, of which GNOME is part.
<desiderantes>davexunit, can Guile run another language besides Scheme?
<davexunit>yes, Guile is a platform providing a VM and compiler.
<davexunit>but people should write their programs in Scheme.
<davexunit>it's certainly better than JavaScript.
<desiderantes>davexunit, JavaScript is way more popular
<davexunit>sure.
<davexunit>so is PHP.
<desiderantes>ACTION has to work with a PHP app, i know the pain
<amz3>can you run other supported languages of the Guile VM when embeddeding?
<davexunit>javascript isn't as terrible as PHP, but it's stilll not very good.
<davexunit>amz3: I honestly do not know enough to answer.
<davexunit>I've only used Scheme on Guile. :)
<davexunit>I totally understand why GNOME would choose JavaScript for familiarity reasons, but I think long term it's a suboptimal choice.
<amz3>desiderantes: do you know the state of finalterm ?
<davexunit>but perhaps some day Guile could be used as the platform on which to run GNOME's JavaScript extensions.
<desiderantes>amz3, dead
<desiderantes> http://worldwidemann.com/finally-terminated/
<amz3>sad
<desiderantes>using Mx was a terrible decision
<dsmith-work>Wednesday Greetings, Guilers
<please_help>with guile 2.0.11, guile tries to evaluate the final output when using guile -e '(load "something.scm")', is that normal?
<please_help>for instance, I'd get "error: wrong type to apply #t" if the script returned #t.
<davexunit>please_help: yes, this is normal
<davexunit>you want -c, probably.
<please_help>oh I see, thanks
<stis>evening guilers!
<paroneayea>hey desiderantes
<paroneayea>welcome to #guile!
<paroneayea>desiderantes: cool to hear
<ecraven>what is the recommended way to deal with enums in the dynamic ffi? just a bunch of define's based on the enum values (maybe auto-generated from C?)
<paroneayea>ecraven: there's an enums library I used
<paroneayea> #:use-module (rnrs enums)
<paroneayea>ecraven: look at that for docs
<daviid>davexunit: where is your sxml-html code ? I'm browsing your git and it appears it's not top listed
<davexunit>daviid: it's in the haunt repo
<daviid>ah ok
<davexunit>daviid: https://git.dthompson.us/haunt.git/blob/HEAD:/haunt/html.scm
<daviid>thanks
<davexunit>yw
<daviid>davexunit: the [same] code listed as part of your blog article has far more escape chars, just curious, why is that?
<paroneayea>davexunit: http://pamrel.lu/1c776/ these have been helpful to me btw
<daviid> http://dthompson.us/rendering-html-with-sxml-and-gnu-guile.html
<davexunit>daviid: I need to fix that article
<paroneayea>super simple procedures, but since I'm using json like crazy in this json-ld lib, having stuff that deals with the "json alists" has been nice
<paroneayea>so I'm not constantly having to cdr them and cons on '@
<daviid>davexunit: so the latest and bet version is the hant one then
<davexunit>daviid: the reason is that you should use UTF-8 encoding
<davexunit>not try to escape everything under the sun
<daviid>s/bet/best
<daviid>ok i see
<davexunit>I need to update the article when I'm not so lazy
<paroneayea>davexunit: I wonder if less needs to be done if xhtml5 was used
<davexunit>if you look at the current implementation I don't escape a damn thing
<davexunit>except the usual <, >, and friends.
<ecraven>paroneayea: thanks
<davexunit>paroneayea: you should implement those in terms of 'match' to avoid the car/cdring
<paroneayea>davexunit: the procedures I just pasted?
<davexunit>yeah
<paroneayea>davexunit: I suppose so, will asjust
<paroneayea>adjust
<davexunit>I think you could do without json-acons
<davexunit>I would convert the JSON expression immediately to data types that made sense for the domain
<davexunit>an 'object->alist' procedure would just strip the leading '@
<davexunit>and 'alist->object' could add it.
<paroneayea>davexunit: hm, that may be wise
<paroneayea>davexunit: however, I think I'm going to wait until I've tested this code before I do that refactoring
<paroneayea>davexunit: so one reason *not* to do that though
<paroneayea>in json-ld, you may be converting json-ld documents to and from different contexts
<paroneayea>which are also json documents, possibly embedded
<paroneayea>recursively converting to alists without the @ then going back
<paroneayea>might not be so great
<paroneayea>that's two recursive conversions
<paroneayea>plus, I need a way to distinguish between alists and lists
<paroneayea>and the @ is the only way to tell
<davexunit>I think you may want a better intermediate representation.
<davexunit>but then again I don't know your code. :)
<davexunit>but my hunch is that json-ld deserves a different representation that can converted to the "sjson" format.
<daviid>wingo: heya! I have 3 requests :), 2 kind of urgent :) (1) could you grant me savannah admin priv for guile-gnome or upload tarball and sig for 2.16.3 yourself; (2) wrt guile-clutter split request [I hope you did read related emnails], do you agree? wether yes or no, could you please answer brandon's email asap, thanks; (3) did you or could you review and give me a feedback wrt jan's patches for guile-gnome, here
<daviid> https://lists.gnu.org/archive/html/guile-gtk-general/2014-07/threads.html
<wingo>hello :)
<paroneayea>davexunit: so... maybe! and my initial activitystuff structure involved converting the json to an intermediate representation, but then I thought about how the theory of json-ld is that manipulating json is supposed to be comfortable to developers because it's generally close to your language's types
<paroneayea>davexunit: so I figured json-ld should stick mostly to the "just json" route
<wingo>sure i will do that tomorrow, those privs are on another machine for me i think
<paroneayea>davexunit: but I'm not totally sure.
<daviid>ok, thanks
<davexunit>paroneayea: just keep hacking and you'll know if your data structures are good or bad. :)
<paroneayea>davexunit: :)
<davexunit>that's what I do with sly. hack awhile, say "this sucks", and rewrite. ;)
<paroneayea>davexunit: the real test of things might be once I start doing complicated conversions between contexts
<paroneayea>alists are fine in the tens but
<paroneayea>the activitystreams context has 500 items!
<paroneayea>that's a really long way to travel for alists
<paroneayea>especially if you're converting each item
<paroneayea>and that means for each item, checking against a 500 item large alist
<paroneayea>so something better may be needed. But in the meanwhile, I just want this damn thing to work!
<davexunit>a vhash will probably prove to be better, which is a good argument for converting to a different representation for json-ld. ;)
<paroneayea>I initially was using vhashes... heh...
<davexunit>just carry on, don't mind me.
<paroneayea>o/ wingo
<paroneayea>what's the haps?
<desiderantes>paroneayea, sorry i was afk
<wingo>paroneayea: coming back from an irc hiatus to fix my guix :)
<paroneayea>wingo: fun :)
<daviid>whaaat? epiphany page-source launches libreoffice :)
<paroneayea>davexunit: wrote some sjson->vjson and vjson->sjson converters... https://github.com/cwebber/activitystuff/commit/295c527624d2852384162784c144b535ef1f7233 it's pretty fast! and also: ice-9 match made that into a trivial exercise :)
<davexunit>paroneayea: nice!
<davexunit>paroneayea: rather than using (? pair? ...) you should test for pairs or lists via the matching syntax especially for that
<paroneayea>davexunit: oh right I forgot about that syntax...
<paroneayea>davexunit: will make that adjustment, thanks for that advice
<davexunit>((a . b) ...) or ((items ...) ...)
<davexunit>or ((head . tail) ...)
<davexunit>yw
<paroneayea>nice, this conversion back and forth is in the low miliseconds
<paroneayea>more than okay enough to make vhashes an intermediate representation.
<wingo>ACTION sometimes thinks we should use racket's match syntax
<amz3>I have strlen that segfault using ffi.
<amz3>any idea why this happens?
<amz3>I mean, pointer->string segfault on strlen
<paroneayea>...(doing a search for racket match pulls up tennis matches)
<paroneayea>wingo: what in particular do you feel guile's match misses?
<paroneayea>hash-table is nice I suppose :)
<paroneayea>I guess define-match-expander could be nice
<davexunit>being able to extend the matcher would be nice
<davexunit>but I'm not familiar with racket's match syntax
<stis>if you like to play with it ...
<stis>it's included in guile-syntax-parse
<stis>racket's match ^^
***cluck` is now known as cluck
<paroneayea>stis: looks down with gitorious :(
<paroneayea>;_; so much good software lost with gitorious
<stis>it's on gitlab now
<paroneayea>stis: oh nice
<paroneayea> https://www.gnu.org/software/guile/gnu-guile-projects.html needs an update
<stis>yeo!
<stis>yep!
<stis>good catch!
<civodul>paroneayea: definitely
<wingo>if anyone needs a thing of mine from gitorious lmk and i'll upload it to gitlab
<civodul>the gitorious folks screwed us
<paroneayea>civodul: well... I have some empathy
<paroneayea>the nature of centralized hosting on the web
<paroneayea>leaves a few people with some large bags to hold
<paroneayea>we really need to make hosting things easier
<paroneayea>because at the moment it's soooo painful to run so many things
<paroneayea>so we all end up on "pseudo-free silos"
<civodul>ah yes, right
<civodul>i was referring to the fact that they said it'd be back up read-only
<paroneayea>ah yes
<civodul>which it isn't
<paroneayea>civodul: that does suck
<paroneayea>civodul: improving the above is the main reason btw that I am interested in guix :)
<paroneayea>reproducible recipes which can compose easy deploys
<civodul>heheh, there's potential for that
<civodul>yeah
<paroneayea>guix needs a lot more before we get there but it's moving along nicely I think
<davexunit>we'll get there
<paroneayea>davexunit: I am also optimistic :)
<davexunit>granted I need to get back to work on wip-container and wip-deploy
<paroneayea>I need to return to guix things as well; I've been spending time on the federation stuff instead. too much to do!
<daviid>this doesn't seem to be correct: (img (@ (scr "my-image.png") (align "bottom")))
<davexunit>s/scr/src/
<daviid>oh, tx! :)
<davexunit>np
<davexunit>ACTION goes afk
<stis>argh nothing beats debugging with printf's
<stis>yah bug squashed