***shader` is now known as shader
<nalaginrut>sneek: later tell wingo IIRC you wrote guile-gstreamer? I want to use it for a rtsp server <sneek>Welcome back wingo, you have 1 message. <sneek>wingo, nalaginrut says: IIRC you wrote guile-gstreamer? I want to use it for a rtsp server <wingo>i would just use gst-rtsp-server <nalaginrut>it's too bad, then I have to open another port for rtsp <nalaginrut>or I have to add new rtps server impl to inner server <nalaginrut>yes, but I found it support url-remap, so ports may saved <youlysses>This convo was awhile ago -- but what's the deal with Guile and SDL2? Are the binding being or planned to be rewritten, or just being left as-is for now? <davexunit>I'm trying to brainstorm some ways in which I can create a declarative way to define how a game functions in guile-2d. <davexunit>a game scene has state and render/update/keydown/keyup/etc callbacks. <davexunit>right now, guile-2d is too procedural in this regard. <taylanub>davexunit: Do you know of "reactive programming" ? <taylanub>Or "functional reactive programming", FRP, is the full name I think. <ijp>on the game level, it's a bit more obvious, since you have a state machine with states corresponding to scenes. Within a scene seems more problematic. <davexunit>I guess I'm looking for a way to describe a scene in a nice way. <davexunit>a scene would have a name, render/update/key input procedures, and some state <davexunit>taylanub: I have heard of it, but I don't know anything about it. <davexunit>I saw the DSL that guix provides for describing packages and I think it's fantastic. <taylanub>If I got it right, FRP is similar to the "constraints system" used in 3.3.5 of SICP. The basic idea is that you define some relations between objects' state such that mutating any one object will induce a chain reaction that also updates all other related objects. <taylanub>I recently heard of it a lot in #iphonedev since it's a paradigm that lends itself well for GUI programming, and I think you could benefit from it too. <ijp>which you say, even though you didn't have any idea what it is <taylanub>ijp: I tend to rely on my intuition a lot. :P <ijp>good thing computers understand what you mean, right?? <taylanub>Explaining it to them is the boring part! <taylanub>That's why I like Lisp so much .. more thoughts, less typing. :P *ijp loads his ld50 and ODs taylanub. <ijp>I have no idea what that one refers to, but meh <taylanub>Apparently lethal-dose-50% is the dose required of a material to kill 50% of a population under test conditions. <ijp>taylanub: I don't consider myself to be the world's greatest judge of character, but somehow I saw the #emacs kerfuffle 25 minutes ago, and no-one else did <ijp>spot the statistical fallacy <taylanub>The statistical fallacy ? That you conclude that no one else did ? <ijp>well, basically, I can only observe the people that did actually respond. Not the sensible ones who stayed quiet. <davexunit>I think this kind of thing is exactly what I want to implement <davexunit>it will keep me out of callback hell for sure. <taylanub>Hmm, I had Asian chicken stuff yesterday, it always makes me wonder how they can cook it *so* soft. <taylanub>And why the rest of the world didn't adopt that style of preparing chicken. <davexunit>I do web dev as my day job and the video gives examples in JS <didi>ijp: Thank you for the Rabbit reference. call-by-name is brilliant. <davexunit>I'm curious as to how some of these JS FRP libraries work. <davexunit>you can do something like: var foo = Mouse.position <davexunit>and when Mouse.position changes, somehow the variable foo changes as well? <taylanub>I don't think one can change variable-declaration and assignment semantics in JS so it probably requires the binding to be made explicitly and the usage of an alternative assignment function. <davexunit>yeah, I'm a bit confused as to how it works. <ijp>davexunit: I expect Mouse.position is an object? <davexunit>surely, in Scheme, we could make something like this work? (define foo (mouse-position)) <davexunit>and foo would yield the current mouse position as a pair or something. <davexunit>and somehow the variable reference would be automatically updated so that we can treat foo as a regular variable? <taylanub>One could do it with mutation but it would probably be cleaner if the retrieval of a value were through a procedure call. Either like parameters, where the parameter itself is a procedure, or through a `value-of' procedure that takes such an object. <davexunit>somewhere the current value of the mouse pointer would need to be stored. <davexunit>do have some psuedo-scheme that this would look like? <ijp>the constraint solver is not really the same thing <ijp>for a start, it works in multiple directions <taylanub>Does this one disallow auto-mutation of a cell that was explicitly given a value ? <ijp>reactive programming is more like an extension of streams <davexunit>so I suppose I should learn how streams work first? <ijp>davexunit: you've used pipes before? *davexunit goes to read the stream docs <didi>Is it possible to always ,pretty-print? <ijp>it should be possible, but I don't know if it's easy <ijp>this is sort of what the 'print' option does, but you can't just pass in pretty-print, since it expects different arguments <ijp>try (use-modules (ice-9 pretty-print)) (define (pp repl val) (pretty-print val)) then ,option print pp <ijp>might need a call to newline in pp <didi>While executing meta-command: ERROR: unknown repl option print <ijp>what version are you using? <ijp>that might be a 2.0.9 addition <ijp>it's probably still possible, just with more hoop jumping <didi>Nah, that's fine. Thanks. <ijp>hmm, I'm not sure you can put that behavior in your .guile though, since the repl isn't started until after your .guile is evaluated <ijp>(ice-9 command-line) confirms ***sneek_ is now known as sneek
<sjoerd`>Guys, i just attempted a rebuild of 6871327, and got a nasty error guile: uncaught throw to misc-error: (load-thunk-from-memory expected p_filesz == p_memsz () #f) <youlysses>I lived in St.Louis for 20 years and I'm probably moving back after I graduate ... but I never heard of "strangeloop" -- ironically, quite quuer. :%U <davexunit>youlysses: I'm trying to bring some functional reactive stuff to guile. <youlysses>davexunit: Ah, yeah -- that would be pretty cool. :^) <davexunit>I feel like I could get a naive version of it working. <davexunit>I'm currently trying to learn how to use streams <ijp>someone, I forget who, did something that was supposedly frp a while back (maybe jan), but I didn't really understand what made it frp <ijp>good thing I have this great memory, eh? <davexunit>would a use case of a stream be something like representing an infinite series? <ijp>for instance, I have infinite streams of primes and rationals <davexunit>you mentioned using streams as the basis for frp, and I think it makes sense. <ijp>the rationals implementation makes very little sense if you haven't read the paper <davexunit>I'm just looking at the use of streams in general. <davexunit>very interesting compared to an iterative version that computes the first n fibonacci numbers. <ijp>the in-crowd call it “corecursive” <ijp>well, streams is just applying the notion of lazy evaluation to the creation of data ***linas__ is now known as linas_
<ijp>you may not want it all, and it might be expensive to compute, so should only evaluate what is necessary <davexunit>ijp: yeah. figuring out how to apply that to say: mouse cursor updates <sjoerd`>ijp: could you help me with the question posted about 1.5 hours ago? <ijp>davexunit: I think the best thing to do would be to play with the existing ones in elm (as you saw) and haskell, and asking on the relevant irc channels <ijp>a simple event stream for mouse movement is probably simple enough, but when you start adding in user events and so on, I imagine it gets really complex <ijp>sjoerd`: is that master or stable? <davexunit>I feel like if I can get something like mouse/key input then I will be well on my way. <ijp>if it's master, I'd need to do a rebuild <davexunit>unfortunately I don't know haskell so reading the syntax is a bit tough. <ijp>I see it, top of master <sjoerd`>The error appears to happen (at least on my parabola system) at attemting to run guilec on a certain .scm file <ijp>probably means you've got a borked elf file then <sjoerd`>I think so, I am looking at possible clues <ijp>gah, and psyntax takes forever to compile <sjoerd`>strange thing is, ice-9/eval.go is compiled without further ado <sjoerd`>The only thing I also notice is: ports.c: In function 'scm_peek_char': <sjoerd`>ports.c:2235:30: warning: 'len' may be used uninitialized in this function [-Wmaybe-uninitialized] <sjoerd`> scm_i_unget_bytes_unlocked ((unsigned char *) bytes, len, port); <sjoerd`>I just did a proper make clean again <ijp>well, that could be an issue down the road, but I don't think its relevant here <sjoerd`>When I was running make without doing just that, it took boot.scm as part of the psyntax-pp compilation <sjoerd`>Now, I am running make, and I don't notice anything about this <sjoerd`>Could it be caused by some build-order pollution? <ijp>beats me why he chose that name <ijp>I was Mr. Unoriginal and used my initials <sjoerd`>Well, I know that the games with that name (-bug) has an incredible list of bugs indeed <sjoerd`>But that doesn't have to do with free software... <dsmith>Well, master still builds on 32bit for me. passes make check too. <davexunit> (stream-cons 1 (stream-map (lambda (n) (/ n 2)) geometric))) <ijp>I'm building just now, but I can see it taking a while <davexunit>this will take some time to wrap my head around. <davexunit>except the geometric series starts at 1/2... <davexunit>I'm guessing there's a better way to write this without the initial term? <ijp>1/2, 1/4, ...., 1/(2^n),... ? <ijp>(stream-map (lambda (n) (/ 1 (expt 2 n))) (stream-from 1)) <davexunit>oh so we start with a stream that counts up from 1? <ijp>ooh, ooh, even better <ijp>(stream-iterate halve 1/2) <ijp>where halve is the obvious <sjoerd`>ijp: everything is okay now with the compilation