IRC channel logs

2016-05-12.log

back to list of logs

<paroneayea>mudsync & lisp game jam post-mortem http://www.gnu.org/software/8sync/news/mudsync-lisp-game-jam.html
<ArneBab>paroneayea: wohoo! I want to marry that with my d6 module to add a skill-test and combat system!
<paroneayea>ArneBab: :)
<paroneayea>ArneBab: it wouldn't be hard probably
<paroneayea>ArneBab: if you want to give it a shot, I'd be happy to talk aobut it
<ArneBab>I don’t think it would be hard :)
<paroneayea>*about
<ArneBab>paroneayea: I’ll come back to you as soon as I find some undisturbed time :)
<paroneayea>:)
<roelj>I'm having a hard time with the following expression: (format port "~a~%" `(mkdir ,(process-output process)))
<roelj>I would like to get the "" around ,(process-output process)
<roelj>But I am at a loss on how to achieve that
<daviid>roelj: use ~S instead of ~A
<ArneBab>paroneayea: a small but completely playable scenario sounds about optimal for a 10 day jam
<roelj>Doesn't that put "" around (mkdir as well?
<daviid>roelj: no, just the forat output
<daviid>format*
<roelj>Woah hey, indeed
<roelj>Thanks!
<ArneBab>gn8
***mejja_ is now known as mejja
***daviid is now known as Guest22493
***daviid` is now known as daviid
<wingo>ACTION just did a fresh bootstrap; took some 40 minutes
<frofroggy>ACTION applauds
<amz3`>héllo
<amz3`>est ce que c'est possible d'avoir une coroutine qui soit aussi un context manager en Python 3.4?
<amz3`>oops!
<amz3`>est ce que c'est possible d'avoir une coroutine qui soit aussi un context manager en Python 3.4?
<amz3`>sorry again
<wingo>;)
<alezost>on this channel, the right question would be "est ce que c'est possible d'avoir une coroutine qui soit aussi un context manager en Guile 2.1.2?"
<amz3`>alezost: they are context managers in guile?
<alezost>amz3`: sorry, I don't even know what a "context manager" is. It was a joke (apparently not funny)
<amz3`>no it was funny
<amz3`>i was just wondering whether the concept exists in Guile
<amz3`>AFAIK, context manager replace construction like (with-input-from-file FILENAME THUNK)
<amz3`>everything that comes with a with prefix
<amz3`>it's used with `with' keyword in python...
<ArneBab_>that’s essentially just: (let ((thing ...)) run thing.__enter__() at the beginning, ensure that thing.__exit__() runs at the end, even in case of exceptions)
<ArneBab_>amz3`: here’s an implementation of with for Guile ☺ https://bitbucket.org/ArneBab/wisp/src/a5bce7619ac447da2ed4c05178bafad5dffa30a4/examples/with.w?at=default&fileviewer=file-view-default#with.w-27
<peterbrett_work>ArneBab_: Why not use dynamic-wind ?
<ArneBab_>peterbrett_work: I did not yet use it
<ArneBab_>peterbrett_work: do you have an example how that would look?
<peterbrett_work>dynamic-wind is as far as I can tell _exactly_ "with for Guile"
<peterbrett_work>Without any further work required ;-)
<ArneBab_>ah, cool!
<peterbrett_work>Actually that is a slight lie, it doesn't have syntactic sugar
<davexunit>with-* macros and call-with-* procedures are typically implemented using dynamic-wind
<ArneBab_>well, then Michele Simionato fits: All turing complete languages solely differ in syntactic sugar :)
<peterbrett_work>It's true
<peterbrett_work>I suppose you could add the addendum "and how good the standard tools are at checking whether your code is broken"
<peterbrett_work>But that's more of a tooling issue rather than a language issue
<ArneBab_>though not irrelevant
<ArneBab_>→ important
<peterbrett_work>I think it is quite important, actually
<ArneBab_>yes…
<peterbrett_work>But the core point is true, in terms of what you can achieve with a particular programming language
<peterbrett_work>The only difference is the syntactic sugar
<ArneBab_>essentially all that differs is that enter and exit can be replaced with define-method
<ArneBab_>between dynamic-wind and what I wrote
<peterbrett_work>I think you're write
<ArneBab_>(I did not check whether it works, though…)
<peterbrett_work>*right
<peterbrett_work>Unlike my English
<ArneBab_>:)
<ArneBab_>that’s the essential part of the with keyword in python: It’s an API for implementing things to use in a context
<amz3`>ArneBab_: the implementation looks nice
<ArneBab_>thanks :)
<ArneBab_>I’m not sure, however, whether it’s safe for continuations and such
<amz3`>it's terse.
<amz3`>Are you defined methods?
<amz3`>or it's plain procedures?
<ArneBab_>I now adapted it to actually do what it should :)
<ArneBab_> https://bitbucket.org/ArneBab/wisp/src/777ccb1c3859a672d04e66fcc9853750bcdc3999/examples/with.w?at=default&fileviewer=file-view-default#with.w-33
<ArneBab_>^ why I think this is actually a pretty good idea in Python
<ArneBab_>with this implementation, using with to bind a port ensures that the port is closed after the with-block
<peterbrett_work>I think that probably is still not continuation-safe.
<amz3`>but not if you dynamic wind somewhere... (wild guess)
<amz3`>:p
<ArneBab_>I think that’s true, and I’d like it to be continuation safe.
<ArneBab_>But my try at switching to dynamic-wind failed…
<amz3`>peterbrett_work: you mean that Guile, can keep track of which port is opened where?
<ArneBab_>I now documented that possibility/uncertainty as FIXME (but will leave it at that for the moment)
<ArneBab_>would you be interested in a scheme-version? (non-wisp)
<ArneBab_>whether or not, here it is ☺ http://paste.lisp.org/display/315878
<ArneBab_>amz3`: in case you want to re-use the code
<ArneBab_>^
<amz3`>I know nothing to goops :p
<ArneBab_>do you mean you don’t want to use it, or you did not use it yet?
<ArneBab_>you could for example do things like with (thread-pool ...) as pool …
<ArneBab_>where all threads are joined automatically when the operation is done
<ArneBab_>(thread-pool as an imagined function to create a thread pool)
<amz3`>I mean i did not use it yet
<ArneBab_>ah, ok
<ArneBab_>what I’m using is pretty basic: (define-method (function-name (parameter <type>))
<ArneBab_>when calling function-name with a parameter of type <type>, this implementation is used
<ArneBab_>essentially just specialization of the function
<dsmith-work>[appropriate time] Greetings, Guilers
<frofroggy>greetings
<wingo>the guile 2.1.2 benchmarks on https://www.nexoid.at/tmp/scheme-benchmark-r7rs.html make no sense to me
<wingo>why slower than 2.0? i will have to try this thing myself
<davexunit>wingo: I'm glad you've seen this. been wondering about the results.
<wingo>to me they don't look consistent with earlier reports from this same benchmark
<wingo>ACTION shrug
<wingo>ecraven: so like on paraffins, there's variance due to gc but for me 2.2 is always faster than 2.0. could you have possibly compiled your guile 2.1 with -O0 or something?
<wingo>ecraven: likewise for compiler, on my machine guile 2.0 is 30s, whereas 2.2 is 19s
<ArneBab_>amz3`: for Python with, it’s simple: Since iterators cannot be continued from the same position multiple times, it can simply close the file after the with block. For Scheme we might have to ensure that the file is open and seeked to the same position…
<ecraven>wingo: I used the archlinux package, whatever that does
<ecraven>every scheme I use, I use the available package (quite a few were recently added by me :)
<ecraven>so things should be mostly reproducible
<wingo>ecraven: and if you run, say, the compiler benchmark for guile 2.0 and 2.1, do you reproduce the results on your benchmark page?
<wingo>pretty strange stuff :)
<wingo>i.e. "bench guile compiler" with the two guiles
<ecraven>wingo: sorry, I don't quite understand that question.. reproduce it on my page how?
<wingo>ecraven: i mean if you run "bench guile compiler"
<wingo>at the console
<ecraven>(also, that page should move to github pages soon, my /tmp/.. path isn't too permanent)
<wingo>does it produce the numbers that are posted on your /tmp/ benchmark page?
<ecraven>I run GUILE=guile-2.2 GUILD=guild-2.2 ./bench guile compiler
<ecraven>yes
<ecraven>well, last time I ran it, it did
<wingo>that should be sufficient
<ecraven>I'll start an entire new run over pentecoste
<wingo>i just think it's pretty strange how your numbers are entirely different from mine.
<wingo>relatively.
<ecraven>well, I'll investigate the arch linux package
<ecraven>also, I'll rebuild guile-2.1
<ecraven>wingo: the pkgbuild just runs ./autogen.sh ; CFLAGS="" ./configure ; make LDFLAGS+="-lpthread"
<ecraven>is the CFLAGS="" a problem?
<wingo>yes the CFLAGS="" is the problem.
<wingo>b/c the default cflags, which are -g -O2, only get set if CFLAGS is unset.
<wingo>afaiu.
<ecraven>ok, I'll see whether -O2 works.. for some reason, the guy building the package must have thought it was necessary
<ecraven>I'll check this out tomorrow, then I'll let you know
<wingo>coolio, good luck
<wingo>fixing arch's guile 2.1/2.2 packages would be a great outcome :)
<mthl>wingo: Isn't "-g -O2" defined in AM_CFLAGS instead of CFLAGS?
<wingo>mthl: i think no? when i want to disable optimizations i set CFLAGS, not AM_CFLAGS
<wingo>AM_CFLAGS is what the package should set; CFLAGS comes from the user afaiu
<wingo>and if the user doesn't set a CFLAGS, then it defaults to -g -O2
<mthl>yes but when the user set CFLAGS it is only prepended to AM_CFLAGS to let override the defaults
<mark_weaver>I've definitely noticed that if I set CFLAGS to some other optimization level, then the -g -O2 is no longer present.
<wingo>mthl: you are right but -g -O2 is not in AM_CFLAGS; it is the default for CFLAGS if CFLAGS is unset
<wingo>again, AFAIU.
<mark_weaver>mthl: libguile/Makefile.am contains: AM_CFLAGS = $(GCC_FLAGS) $(CFLAG_VISIBILITY)
<amz3>héllo
<mark_weaver>mthl: on my i686 system, neither of those variables on the right-hand-side contains -O2 or -g
<ecraven>is there a problem with the git repo? no luck cloning right now
<wingo>ecraven: sadly i think yes, all of savannah git is down
<wingo>or was this morning
<ecraven>hm.. any mirrors?
<wingo>i don't think so :/
<mark_weaver>savannah git via ssh works, but that's only available to people with a savannah account
<wingo>the head of https://github.com/quartzli/guile is up to date with the head of guile master, fwiw
<wingo>it's only one patch past the release tarball
<wingo>ACTION just searched, didn't do much digging
<mthl>mark_weaver, wingo: Yes I have checked and "-g O2" is effectively set in CFLAGS by the configure script.
<wingo>cool, that would explain ecraven's numbers
<wingo>always good to have an explanation :)
<ecraven>I'm rebuilding as soon as git works again with -O2
<wingo>mark_weaver: all looking fine to you with wip-port-refactor?
<amz3>post count: 2
<mark_weaver>wingo: sadly, I lack the bandwidth right now to do a proper review, but from your descriptions it sounds good and I trust your judgement here
<wingo>coolio
<random-nick>so ports are cool io? :-)
<amz3>random-nick: right!
<amz3>paroneayea: thanks for the like on twitter!
<frofroggy>ACTION reads SICP
<random-nick>Twitter has likes?
<amz3>new stuff (instead of stars)