IRC channel logs
2016-05-04.log
back to list of logs
<paroneayea>huh, (@@ (module) foo) results in an unrewindable partial continuation <paroneayea>I guess, not the most surprising, but a little bit surprising :) <paroneayea>kristofer: lets you import a variable from a module <akkad>hmm... seems no one actually uses guile in Makefiles directly <akkad>googling away. perhaps I'm doing it wrong. <akkad>$(guile) and Makefile and you name it. <koz_>#{...}# is something that can't be read back in. <wingo>ecraven: guile's syntax for unprintable symbols <ecraven>hm.. one of the benchmarks expects |837| etc. <wingo>i think b/c guile has always treated '|837| as the same as (string->symbol "|837|") <wingo>so it's an incompatible change <wingo>i believe there is a reader option to turn on the r6rs/r7rs syntax <wingo>(read-enable 'r7rs-symbols) i think <wingo>chuck that in your prologue and all should be well i would guess <ecraven>if I run that on 2.0 on the repl, it doesn't work :) is it 2.1 only? <wingo>it's in the manual anyway :) <ecraven>I'm typing at the repl, maybe I'd need to use read <wingo>no, it works on the read side <wingo>scheme@(guile-user)> (read-enable 'r7rs-symbols) <wingo>$1 = (r7rs-symbols square-brackets keywords #f positions) <wingo>there might be a separate setting for how symbols are written <wingo>scheme@(guile-user)> (print-enable 'r7rs-symbols) <wingo>$3 = (r7rs-symbols escape-newlines quote-keywordish-symbols reader highlight-suffix "}" highlight-prefix "{") <ecraven>there's some dirty black magic going on with actually creating the file that is used to run the test... /tmp/larcenous/Guile/...scm is the result <ecraven>with actual r7rs versions of guile some of the preprocessing can probably be removed <wingo>we should just add --r6rs and --r7rs command-line options <wingo>scheme peek-char currently 4 times slower than c :P <wingo>guile 2.0: 1.4s for 1e7 peek-chars <wingo>guile master with C: about 0.360s <wingo>guile master with scheme: 1.6s currently <wingo>i hope to get down to 0.5s, we'll see <ecraven>from the test runs I did now with 2.0, guile seems to be on the slower side <ecraven>(of course I'm mostly running native-code compiling schemes, so that's a bit biased :) <wingo>i miss having scheme48 on benchmarks, that helped us ;-) <ecraven>oh, I'll put those other schemes back on <ecraven>just need to test each one, to make sure at least a few benchmarks run :) <ecraven>there's sagittarius and kawa that are slow :) <wingo>ecraven: you tease us with hints at guile 2.1 benchmarks :) <taylan>ACTION quits work at the end of this month -- will hopefully be able to work on the R7RS branch then <ecraven>how do I get read-line in guile 2.1? <civodul>or did you mean Readline, for interactive use? <ecraven>sorry about the obvious question, but how do I require this? require? load? use? <civodul>the first verifiable benchmarks for Chez \\o/ <ecraven>note that petite is insanely fast in comparison to the others <davexunit>never realized performed so terribly vs. pretty much any other scheme <davexunit>though I'm not sure how to read some of these graphs. is it better if the bar is bigger or smaller? <civodul>well i'm not surprised that mit, chicken, larceny, and chez perform better than Guile, i think that's expected :-) <civodul>i'm more surprised about Gauche, which seems to perform pretty well <davexunit>civodul: I didn't expect MIT scheme to perform better. I thought it was slow. <ecraven>the guile-2.1 run isn't finished yet, a few tests are still missing <civodul>the different between 2.0 and 2.1 is often smaller than i'd expect <civodul>well, it's hard to tell if it's "small" <ecraven>I'll try to make guile run all the tests later <ecraven>just need to get the right imports and aliases going <taylan>not sure if R6RS has vector-map? could be that we don't have it in stable or master (though the wip-r7rs branch implements all of R7RS so it must be there) <civodul>ecraven: would be nice to categorize the benchmarks, like: "i/o", "computational", "floating point computations", "vectors", "homogeneous arrays" <davexunit>guile 2.1 has greatly improved performance for my games, but sometimes I wonder if I should have just used Chicken... <taylan>ecraven: is chibi-unknown the current head(terminology?) of the hg repo? <mark_weaver>ecraven: vector-map is in SRFI-43, R6RS, and R7RS, all slightly different :) <mark_weaver>the SRFI-43 vector-map passes indices to the provided procedure <mark_weaver>R6RS and R7RS behave more like the list-based 'map', and differ only in their handling of lists of different lengths. R7RS stops at the shortest list, and iirc R6RS is more strict about that <mark_weaver>Guile's R6RS vector-map is poorly implemented, converting all the vectors into lists, running 'map' and then converting back to a vector. the other implementations in Guile are more efficient <mark_weaver>bah, I just realized that the single-vector case of my R7RS vector-map implementation simply calls the R6RS vector-map. I guess at the time, I didn't realize how slow our R6RS vector-map was. <paroneayea>lisp game jam is coming along pretty well. I can finally walk around the world, and do a few things. <paroneayea>I'm also getting a better sense of what things cause unwindable partial continuations :) <wingo>on my side i have peek-char implemented in scheme in a branch <wingo>so that a blocking read can eventually suspend and later resume <wingo>still noodling on its performance tho <paroneayea>lots of GOOPS method things (well, in guile 2.0), @@ / module-ref (so I reaallllly have to be careful about dependency ordering) are the things that bit me a few times <davexunit>and that whole "simulation" is described with pure functions and immutable data <davexunit>(the low resolution is not caused by a limitation of guile, but by a limitation of my own artistic abilities) <kristofer>I can't run sly because of my old graphics card <kristofer>davexunit, by immutable you mean it creates a new record for each change in state? <kristofer>I'm trying to grok this monadic stuff, which I expected to find in this example <davexunit>I use a loosely defined monad to describe the rendering pipeline <davexunit>but interactions between game objects are really just referentially transparent procedures <kristofer>I'm playing with gdbm and would like to implement some sort of immutable state like the guix store does with the filesystem <optikalmouse>I'm having a problem running the hello world web server example on cloud9 <optikalmouse>I installed guile 2.0, I pretty much copied the example from the home page and it doesn't seem to be running, not sure if it's a code issue or if it's an issue with the virtual machine i'm working in <davexunit>I have made many a web server with guile. it works. <optikalmouse>ok so it's a cloud9 thing, cool I'll try and wget localhost and see what happens <optikalmouse>thx, I just need a sanity check before my 2nd cup o' coffee <optikalmouse>davexunit: potentially...not sure how to pass the binding ip address to #'run-server <mark_weaver>optikalmouse: something like (run-server <handler> #:open-params (list #:host <name-or-addr-string> #:port 80)) I guess <optikalmouse>is that in the guile reference manual? I was looking through Web Server and it doesn't seem to mention that <mark_weaver>it's probably not adequately documented. patches welcome, and in the meantime use the source :) <mark_weaver>the list of arguments after #:open-params is passed to 'http-open' here ^ <mark_weaver>or pass in a socket that you've already created if you prefer <mark_weaver>the socket is the only argument used in 'http-open'. the other keyword arguments are only used to create the default socket, if you don't pass one in. <optikalmouse>I'm used to emacs lisp and other schemes that don't have keyword args or pass them as a hash a la ruby style <davexunit>optikalmouse: the guile manual documents this <optikalmouse>ok awesome...I may have to start reading it on my commute. <mark_weaver>see section 6.6.8 of the guile manual for more on keywords <mark_weaver>optikalmouse: btw, your notation #'run-server looks like common-lisp. in modern scheme, #' has a different meaning, used in our macro system. <ecraven>taylan: no, but chibi has no way of reporting its version from inside scheme, it seems :-/ <taylan>ecraven: but there's also a versioned chibi. what's the "unknown" one? <ecraven>the point is, I need some function I can call in the active scheme. chibi has none, it seems :-/ <taylan>ecraven: oh, it moved to GitHub didn't it? I forgot. <ecraven>taylan: I asked Will Clinger, and he kindly agreed that it is a good idea <ecraven>I've added support for a few more Schemes (though I need to fill out the shims) <ecraven> so you are very welcome to provide pull requests if you feel I'm treating your Scheme unfairly :) <ecraven>taylan: that the benchmarks be developed further apart from larceny <ecraven>they will stay with larceny, of course, but the code on github will support more than those <taylan>oh I see. I meant Chibi with GitHub. <taylan>since I had asked whether it's the hg head and you said no, I was confused :) <taylan>heh, looks like I already updated my local chibi repo to use the git repo. I forgot all about it. <taylan>Chez is so wicked fast it's WTF. I wonder if it supports monkey-patching like in Guile, for interactive development... <taylan>IIRC bindings from the standard library are immutable at least, so it probably inlines a ton of stuff <ecraven>taylan: look at npcompiler.sch (I think), that has all the new compiler passes for chez <taylan>nalaginrut: I mean the ability to change the binding of any top-level variable in any module at runtime <taylan>(info "(guile) Module System Reflection") <nalaginrut>alright, so it provides a way for it, but need higher level abstract for practice <mark_weaver>nalaginrut: in Guix, we use monkey patches to workaround various bugs in earlier versions of Guile. <nalaginrut>I think it's just wrap bytecode into an elf, AOT is not ready <nalaginrut>but at least in my machine, guile-2.1 has same performance with Chez on (fib 1000000) <dsmith-work>nalaginrut: You are probably meaning Native Code compiler? <davexunit>nalaginrut: that is ahead-of-time compilation <nalaginrut>alright, most of the time I use AOT for native code generating <dsmith-work>nalaginrut: Did you ever get Chez cross-compiling working? <nalaginrut>I think it's a specific term for native code generating, think about Android, it uses delvik, but then it released a AOT compiler <nalaginrut>in general, we may call JVM bytecode generating an AOT too <nalaginrut>dsmith-work: no, it requires /usr/lib/libncures in arm32le <nalaginrut>dsmith-work: the current cross compile of Chez is not so good to use, we have do some work manually to make it work <dsmith-work>nalaginrut: Seems like there is a step that *requires* running natively. <nalaginrut>it's better to write a new cross compile framewwork (in Makefile), and download dependencies then cross compile them too <nalaginrut>dsmith-work: but anyway, I ever expect Chez could be used for bare metal <nalaginrut>I want to use Scheme in bare metal, Chez brings lot of inspirations <nalaginrut>it's very good project I ever dream, especially the AOT part ;-)