IRC channel logs


back to list of logs

***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>Got it.
<nalaginrut>with Artanis~
<add^_>Hey wingo
<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
<add^_>"with Artanis~"
<add^_>How are you?
<nalaginrut>well, I know gst has rtsp serer
<add^_>sneek: botsnack
<wingo>i would just use gst-rtsp-server
<nalaginrut>it's too bad, then I have to open another port for rtsp
<nalaginrut>alright, maybe you're right
<nalaginrut>or I have to add new rtps server impl to inner server
<wingo>rtsp is like that
<wingo>lots of ports
<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>happy caturday, guilers.
<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>ijp: yeah
<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>some kind of define-scene macro.
<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.
<davexunit>taylanub: hmm, I should look into that.
<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
<davexunit>time to do some learning.
<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
<taylanub>Excuse me ?
<ijp>spot the statistical fallacy
<taylanub>I'll look up "kerfuffle" first of all.
<taylanub>Ah, I see what you mean.
<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>taylanub: I found a language called Elm that describes FRP:
<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>ijp: Eat that!
<ijp>tastes like chicken
<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>taylanub: also found this
<davexunit>I do web dev as my day job and the video gives examples in JS
<taylanub>.oO( Wow, so many 1-3 letter words. )
<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>there will be mutation *somewhere*
<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?
<taylanub>SICP has actual Scheme of it. :P
<ijp>the constraint solver is not really the same thing
<taylanub>I'm trying to find out differences ...
<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?
<ijp>same idea
<davexunit>oh okay.
*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
<didi>Oh well.
<ijp>hmm, yes, it is
<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>at least, I think
<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)
<sjoerd`>Anyone aware of this?
<davexunit>has anyone worked with before?
<youlysses>davexunit: Nope, looks pretty cool though.
<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
<davexunit>and what exactly they are for.
<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>well, yes
<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.
<davexunit>very cool, ijp
<ijp>the rationals implementation makes very little sense if you haven't read the paper
<davexunit>yeah that is over my head
<davexunit>I'm just looking at the use of streams in general.
<davexunit>fibonaccis is cool
<davexunit>very interesting compared to an iterative version that computes the first n fibonacci numbers.
<ijp>the in-crowd call it “corecursive”
<davexunit>oh. neat.
<davexunit>so much to learn.
<ijp>well, streams is just applying the notion of lazy evaluation to the creation of data
<sjoerd`>corecursive, nice word
***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
<davexunit>ijp: sure.
<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.
<sjoerd`>ijp: hang on
<ijp>I see it, top of master
<sjoerd`>it's the master branch, for sure
<sjoerd`>The error appears to happen (at least on my parabola system) at attemting to run guilec on a certain .scm file
*ijp groans
<sjoerd`>ijp: specifically psyntax-pp.scm
<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 think I know what happened
<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`>Something odd happened though
<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>davexunit: keenbug
<ijp>the last guy
<sjoerd`>keenbug, as in flight simulator?
<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...
<sjoerd`>luckily though
<dsmith>Well, master still builds on 32bit for me. passes make check too.
<davexunit>first try at streams: geometric series.
<davexunit>(define geometric
<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>what series?
<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
<davexunit>and map over it
<ijp>(stream-iterate halve 1/2)
<ijp>where halve is the obvious
<davexunit>thanks ijp.
<sjoerd`>ijp: everything is okay now with the compilation