IRC channel logs

2013-12-14.log

back to list of logs

***mario-go` is now known as mario-goulart
<TaylanUB>mark_weaver: Wow, thanks for the quick fix! :)
<mark_weaver>thanks for the report :)
<zacts>hi guile hackers
<GermanGT>Hi
<zacts>I can't seem to build guile-wm, but I'll have to try again tomorrow
<sbp>is there a way to suppress the copyright prologue in the repl?
<sbp>(from .guile)
*sbp finds define *version* in 2.0.9/share/guile/2.0/system/repl/common.scm
<sbp>and (define (repl-welcome repl) (display *version*) ...)
<sbp>ta da:
<sbp>(set! (@ (system repl common) repl-welcome)
<sbp> (lambda (repl) (begin
<sbp> (display (format #f "GNU Guile ~A" (version)))
<sbp> (newline))))
<ArneBab>sneek: later tell mark_weaver so maybe I should at one point write a wisp-SRFI as a simplified version of the readable SRFI
<sneek>Got it.
<ArneBab>sneek: botsnack
<sneek>:)
<davexunit>hey guilers
<mark_weaver>greetings, davexunit!
<sneek>Welcome back mark_weaver, you have 1 message.
<sneek>mark_weaver, ArneBab says: so maybe I should at one point write a wisp-SRFI as a simplified version of the readable SRFI
<davexunit>working on event propagation for my signals module.
<mark_weaver>ArneBab: yeah, I think that would be worthwhile.
<davexunit>a tree of event handlers is built, and I'm trying to figure out how to provide a way to stop event propagation. has anyone here done much event-based programming?
<mark_weaver>what kind of events do you mean? UI events, or internal-value-changed events?
<mark_weaver>or something different?
<davexunit>just arbitrary types of events. basically just a hook with some callbacks.
<davexunit>when running the hook, it calls the callback procedures in sequence. I would like to add the additional feature of a callback being able to stop further callbacks from being run.
<civodul>davexunit: i've done some of that with Hop, but it's the way you would to it in C or JS
<civodul>Fulax could insert a HipHop plug here
<davexunit>I think I've come up with something that I like for what I'm doing.
<davexunit>going to hack it together and see how the code looks.
<Fulax>the DOM API have a capture boolean flag for that purpose
<civodul>Fulax: davexunit has an FRP framework, so i guess he's after something more elegant ;-)
<Fulax>civodul: I don't have such a thing in HipHop because event emissions are instantaneously globals, and there is not such thing as event propagation in HipHop :)
<civodul>right :-)
<civodul>i'd expect an "FRP sucks, SRP rules" kind of plug here
<civodul>that's what i meant :-)
<Fulax>ahah :)
<davexunit>:)
<Fulax>well, actually I'm doing a sort of FSRP, or SFRP
<civodul>even better
<civodul>FrTime is just FRP right? not synchronous
<Fulax>not synchronous, so is flapjax
<Fulax>so you have update glitches
<Fulax>complex implementation
<davexunit>I'm going a very simple route.
<davexunit>when you set the value of a signal it gets propagated to all listeners at that moment.
<Fulax>so you suspend the current execution to invoke the listeners ?
<davexunit>it's not multithreaded.
<davexunit>because my game engine is not multithreaded. I use coroutines instead.
<Fulax>I actually have something similar in my DSL, you can attach callback to any node of the AST, and some special events propagates through the AST firing callabacks
<Fulax>I thought about capturing events there, I have a place-holder for it, but not implemented yet :)
<davexunit>I've read that that there's many ways to implement FRP, you can "pull" on the signals or "push" from them.
<Fulax>(I mimic the DOM Events2 API)
<davexunit>I go the push route because that way there's no polling.
<davexunit>signals only update when their input signals change.
<Fulax>I see. So you can (or theoritically could) express signal statuses as equations about their input signals?
<davexunit>here's the code I wish I had: (define mouse-click-count (signal-fold + 0 (signal-constant 1 mouse-clicks)))
<davexunit>here we've expressed (functionally) how to count mouse clicks.
<davexunit>there's imperative, impure, mutation-riddled code behind it, of course. :)
<civodul>though it could use monads, it seems, no?
<civodul>(yeah that's my thing these days)
<davexunit>yes, I think so.
<davexunit>if I write the code right that will be an implementation detail :)
<Fulax>so, something like (every mouse-click (emit mouse-click-count (+1 mouse-click-count))) is not functionnal? (real question, that the way I do my SRP)
<davexunit>Fulax: that looks functional to me, as well.
<davexunit>what is the S in SRP?
<Fulax>Synchronous
<davexunit>ah okay
<Fulax>You divide the time into logical units where you compute your signals propagations
<Fulax>between units, you can read and write to the external environment
<Fulax>the S can bring determinism :)
<davexunit>cool. :)
<davexunit>I'm taking a lot of my inspiration from http://elm-lang.org and SRFI-41 streams.
<Fulax>ReactiveML follows that model (if you have heard of it)
<davexunit>haven't used an ML
<Fulax>I don't like the time-varying values concept
<Fulax>I had a bad experience with FrTime in DrScheme years ago that was going slower and slower as time passes
<Fulax>maybe it changed
<davexunit>hmm, I don't see why it would go slower and slower.
<davexunit>unless it was doing unecessary computation.
<Fulax>or memory leaks :)
<Fulax>however the animation.ss lib of DrRacket was fun to use
<Fulax>it really looked like FRP, but without having to deal with Behavior and Signals concepts
<Fulax>we used it at the university for the functionnal programming course
***heroux_ is now known as heroux