IRC channel logs

2013-09-12.log

back to list of logs

<davexunit>hey youlysses
<youlysses>davexunit: What's up?
<davexunit>youlysses: not too much. just perusing the internet now that I'm home from work.
<davexunit>maybe writing some code in a bit...
<youlysses>davexunit: Coolio.
<davexunit>I guess I am going to work on a quadtree implementation.
<davexunit>I feel like it would be cool if it was a pure data structure, but I don't think it will work out that way.
<nalaginrut>morning guilers~
<davexunit>morning nalaginrut
<nalaginrut>heya davexunit
<nalaginrut>Arne`: have your problem solved?
*nalaginrut have to leave for a whiel
<nalaginrut>while
*nalaginrut come back
*davexunit just wrapped up some basic SDL audio functions for guile-2d
<nalaginrut>davexunit: good news!
<nalaginrut>I wonder if it's possible to support HTML5 in the future, I mean guile-2d
<nalaginrut>then we may try web game either
<davexunit>that would be tough.
<davexunit>I wouldn't even know how to begin with that.
<davexunit>things are very much tied to C libraries like SDL, OpenGL, FreeImage, FreeType, etc. right now.
<nalaginrut>if the interface is well defined, I think it's possible
<nalaginrut>maybe an abstract layer is enough
<davexunit>I try to define the interface such that the user doesn't have to interact with the underlying library wrappers.
<nalaginrut>yeah
<davexunit>but there's no abstraction currently to interchange what libraries are being used.
<davexunit>and I wouldn't know how to translate guile code into JS that can be run in the browser.
<nalaginrut>we don't need to translate it
<nalaginrut>just generate the related JS code
<nalaginrut>alright, sounds like some kind of compile...
<davexunit>yeah, it would be something like libgdx does
<nalaginrut>well, seems some problem is there, since I saw color.scm is not HTML5 compatible design
<davexunit>libgdx is a java lib, but you can compile html5 versions of the program.
<nalaginrut>but it's possible to do, one approach is to write color->html for translate
<davexunit>yeah, literally nothing is built with the though that this is going to be able to run in a browser ever.
<davexunit>color uses opengl style color.
<davexunit>where channels have values in the range [0,1]
<nalaginrut>hmm..I think you're right, we'd better translate it to JS, if it's an aim to support HTML5
<nalaginrut>and maybe depends on some JS lib
<davexunit>yeah.
<davexunit>that's a *big* project
<nalaginrut>maybe this http://cocos2d-javascript.org/
<nalaginrut>cocos2d is popular nowadays
<davexunit>I'll be focusing on making this usable on gnu/linux for the time being
<nalaginrut>yes
<davexunit>I took a few pages out of cocos2d's book for guile-2d
<nalaginrut>you have to make it usable on GNU first
<nalaginrut>ah~
<davexunit>for instance, scenes and actions
<davexunit>actions are composable functions that operate over a period of time. they work with coroutines.
<nalaginrut>I think the scheduler processes each obj one by one, without interruption?
<davexunit>in cocos2d?
<nalaginrut>no, guile-2d
<davexunit>the scheduler has a queue of thunks
<davexunit>and it just runs them when the time comes
<nalaginrut>I'm thinking a green-thread scheduler design, I don't if I should add time-interrupt
<nalaginrut>s/I don't /I don't know
<davexunit>yeah I don't have any logic to interrupt coroutines that take too much time yet.
<nalaginrut>I design this for the server, so I think agenda way maybe not enough
<davexunit>perhaps not.
<davexunit>my agenda has served me well thus far.
<nalaginrut>oh, I'm not meaning it's not enough for you
<davexunit>not enough for artanis?
<nalaginrut>I want to add actor-model based server for Artanis
<davexunit>cool.
<nalaginrut>but I'm still blocked with scheduler
<davexunit>oh no. I've just discovered that guile-2d programs gradually slow down over time.
<davexunit>damn it.
<nalaginrut>oops
<nalaginrut>In my mind, I have to handle the thread which trapped into an infinite loop
<davexunit>perhaps shanecelis can assist you
<davexunit>I believe he's implemented or plans to implement something similar for emacsy
<nalaginrut>one of the approaches is watch-dog, it's very easy to implement with sigaction&delimited-continuation
<nalaginrut>oh, nice, I'll check emacsy soon
<nalaginrut>hah, seems emacsy is the current most popular guile stuff
<davexunit>yes indeed.
<davexunit>have I sent you a screenshot of the demo I'm working on? http://goput.it/tagl.png
<nalaginrut>nice, a relative complete demo game is attractive for users
<davexunit>yeah.
<davexunit>and it's self-serving. :P
<davexunit>the whole reason I'm writing guile-2d is so that I can write a shoot-em-up game with Guilel
<davexunit>Guile*
<nalaginrut>undefined macro: AM_EXTRA_RECURSIVE_TARGETS
<nalaginrut>in emacsy
<davexunit>uh oh
<nalaginrut>I don't know what it is
<davexunit>time to file an issue
<nalaginrut>reported
<davexunit>this slow down issue is going to be hard to debug.
<davexunit>I haven't found the culprit yet.
<nalaginrut>is it relative to scheduler?
<nalaginrut>it's not realtime scheduler
<davexunit>no I think it's something with the update loop.
<davexunit>I could remove the scheduler to reduce variables.
<nalaginrut>alright
<nalaginrut>BTW, I didn't find scheduler of emacsy
<davexunit>hmmmm
<davexunit>maybe he hasn't written it yet
<davexunit>I know he has some thoughts about how to approach it though
<nalaginrut>yeah, it's an important question, anyone solved it first will be very worthy
<nalaginrut>since we still don't get the idea how to implement green-thread with delimited-continuation
<nalaginrut>alright, seems agenda could be enough
<nalaginrut>since green-threads accepts one-block-then-all-block situation, the solution have to be async multiplex, like epoll
<nalaginrut>alas...I don't want to add C code for Artanis, so maybe a new server project would be better
<nalaginrut>s/async multiplex/async I/O multiplex
<nalaginrut>telnet miku.acm.uiuc.edu 23
<aidalgol>Will it download a virus to my machine???
<aidalgol>(jk)
<aidalgol>Gah! That's close enough to a virus!
<nalaginrut>yes, that could be a virus
<nalaginrut>let me see if how to make it a virus
<nalaginrut>could be the old worm, but seem impossible harm
<aidalgol>That's no worm, that's a monster.
<nalaginrut>is it possible to convert image from webcam to terminal-escape-string?
<nalaginrut>then we don't need x.264 & rtsp
<nalaginrut>;-P
<aidalgol>Probably, but you'd have to use libcaca to make it viewable on today's screens.
<nalaginrut>yeah
<youlysses>Backtracking a-bit, I'm excited for Emacsy, but once guilemacs hit's upstream, I'm not sure how relevant it'll be to my interests. :^P
<nalaginrut>the reason I expect guile-emacs is I want to try JS for emacs plugin (run away...)
<youlysses>nalaginrut: I want to get to a point, where I feel confident/competent enough to write a wayland compositor for Emacs and use Emacs for *all* of my day-to-day computing and guilemacs is the only semi-reasonable way I see that happening. :^P
<nalaginrut>well, I'm trying to introduce GNU/kernel to people as possible, so I have to cut emacslism sometime ;-D
<youlysses>nalaginrut: GNOME is right around the corner and I expect to be the eventual default, for the GNU Guix based distro coming fairly soon. :^)
<nalaginrut>ah, speak to Guix, can you use Guix on Hurd now?
<youlysses>nalaginrut: Idk, did Guile 2.x ever get up and going on it?
<nalaginrut>I think it's OK now, and braunr's private repo show me it's OK
<nalaginrut>but I don't know if it's update for official repo
<nalaginrut>anyway I can use Guile2 on my hurd
<youlysses>From what I'm aware, that was really the only "big" roadblock. There are some cool things, like linking up to a stowfs to act as a more direct route than on Linux -- but I don't think that is needed to function? Probably something better asked on #hurd or #guix, tbh.
<youlysses>That being said, from the little I know, I'd think it'd be working -- if not very, very close to it. :^P
<nalaginrut>are you using Hurd in daily life?
<youlysses>nalaginrut: I have it on my 10 y/o compaq, but until it gets usb-support it's fairly useless to/for me. I plan to switch in 2 or-so years time and I'm interested in implementing dvorak support at some-point. :^P
<nalaginrut>yeah
<nalaginrut>it's slow I think
<nalaginrut>I mean current hurd
<nalaginrut>I installed it on a not-so-bad-old-machine
<nalaginrut>even opensuse-13.1 with gnome3.9 works fine on it
*youlysses is still shocked they've been able to hack it on top of Mach, after all this long ... they have to be reaching the breaking point soon though.
<nalaginrut>but when I ssh to it, and fix Guile but, I found it's slow while multi-works
<nalaginrut>I think it's to do with the SMP support
<nalaginrut>and I think it's not so efficient for the network
<youlysses>It must be such-a pain to gut the system and move to a new microkernel base, if they've been able to put up with such a (from what I can tell) non-ideal system for so long. :^P
<nalaginrut>no other microkernel to choose? except L4
<nalaginrut>maybe just try it as exokernel, I've heard of such voice, dunno
<youlysses>Let's start a crowd-funding campaign, which is doomed to fail (because "Linux is good enough"), for the development of a new microkernel. :^U
<nalaginrut>for practical purpose it's good enough
<youlysses>Well assuming I can get usb working reliably, and some network card that'll work with it all be happy. :^P
<nalaginrut>it depends on Mach or Hurd?
<nalaginrut>my USE keyboard/mouse suit can't work under fluxbox
<nalaginrut>USB
*youlysses wonders how Wayland will work on the Hurd "out-of-the-box" and/or if there's anything special needed to be done for the graphics stack that he isn't aware.
<nalaginrut>what's the hard point?
<nalaginrut>graphic driver?"
<youlysses>nalaginrut: Yeah, graphic-card/driver support, I think (from too my very limited knowledge) would pose as a problem. :^P
<nalaginrut>dunno, maybe the point is a good microkernel
<youlysses>nalaginrut: Or major systems in-place for compatibility for Linux drivers. :^P
<nalaginrut>yup
<nalaginrut>a linux-2-hurd layer
<nalaginrut>for drivers
<civodul>Hello Guilers!
<nalaginrut>heya
<wingo>moin
<nalaginrut>hi wingo
<civodul>hello wingo
<wingo>morning civodul :)
<Chaos`Eternal>helo, can i use a syntax definition which is not exported by a module?
<Chaos`Eternal>like (define error (@@ (ice-9 match) error))
<Chaos`Eternal>but i want to use (@@ (ice-9 match) match-one)
<Chaos`Eternal>how can i?
<civodul>the answer is "no"
<dsmith>too late...
<dsmith>Morning Greetings, Guilers
<stis>good afternoon you schemishes hackers!
<ArneBab>nalaginrut: actually I think the page-caching stuff is pretty slow on the Hurd, but if you run it is KVM, it just uses the Linux (host) page-cache and gets pretty fast.
<ArneBab>nalaginrut: I didn’t yet get to solve the reader problem. But I had to postpone it after ~3h, so this was not a whole day of trying.
<ArneBab>how can I replace every substring in a given string by a different substring?
<ArneBab>something like (replace "abc" "ab" "de") ⇒ "dec"
<ArneBab>(info did not help me, because I did not understand whether it says that string-replace does what I want or not…)
<ArneBab>(but it does not seem to do that)
<ArneBab>Do I have to do that manually with string-contains?
<ArneBab>note to google: When I type “replace string in string guile”, I do not mean *guide*!
<ijp>afternoon
<cky>sneek: later tell Chaos`Eternal As I understand it, you can actually import non-exported bindings from a module. Whether that will continue to work, that's a different question.
<sneek>Got it.
<cky>ijp: o/
<ijp>hmm, build-cps-exp's sole purpose is to save a little typing
<ijp>wouldn't it have just been better to a different constructor name convention?
<ijp>%const rather than make-$const
<ijp>also, it's broken at the repl
<ijp>which is weird, because the spec for cps is very similar to the one for tree-il
<ijp>maybe it's the 'joiner' parameter?
<ijp>oh wait, no, of course, there is no way to convert cps into object code yet
*ijp smacks forehead
<shanecelis>hello
<shanecelis>Guile doesn't have a good way of adding documentation to values, right? So no one will be upset if I add a (define-variable var-name var-value "doc-string") to Emacsy?
<taylanub>shanecelis: I think there's "object documentation" or something as a generalization of procedure documentation.
<ijp>there is no "variable documentation" though
<ijp>but you could use the documentation object property on variable objects
<shanecelis>taylanub: cool. I found that in (ice-9 documentation)
<taylanub>I suppose the best way would be to put the documentation onto the variable-object that a module holds.
<ijp>good thing we have this echo
<shanecelis>:)
<taylanub>So one could generate documentation of whole modules ...
<shanecelis>taylanub: Good idea. That way it stays around even if mutated.
*taylanub always catches up 2 seconds after ijp.
<ijp>don't flatter yourself :)
***ijp` is now known as ijp
*foeniks had the idea to make character-from string reading with streams. Looked up stream-car, stream-cons, etc. Wrote an open-file-as-stream. Then discovered `port->stream` in the docs..
***LAMMJohn1on is now known as LAMMJohnson
<shanecelis>Does Guile have anything like __line__ or __file__?
<ijp>no, and no
<shanecelis>Thanks.
<shanecelis>#__line__ and #__file__ coming up.
<ijp>sigh, not more #
<davexunit>hahaha
<davexunit>moar reader extensions
<ijp>every time someone adds something to #, I brutally murder a kitten
<ijp>think of the kittens!
*taylanub is wordless.
<taylanub>.oO( I think "speechless" is the term. )
<taylanub>Let's construct "I think" clauses in our thoughts.
<ijp>actually, it looks like I was wrong
<ijp>current-source-location and current-filename
<shanecelis>oh sweet!
<ijp>I figured the info had to be in syntax-objects somewhere, but I didn't think we exposed it
<taylanub>Hrm, "firm 'pencils down' date" of GSoC 2013 is in 11 days .. I'm excited about any last patches to Guile Emacs.
<shanecelis>taylanub: Are you working on Guile Emacs? Or just watching the progresss?
<icelesstea>What actually is the state of Guile Emacs ? o.o Last time I checked it was sort of, half way working maybe.
<ijp>taylanub is just a cheerleader
<taylanub>shanecelis: I made some very minor contributions, mostly watching.
<taylanub>What ijp said. :P
<ijp>icelesstea: I've stopped asking because bipt never responds when I do
<shanecelis>taylanub: cool. No, I'm impressed you know when GSoC ends.
<taylanub>icelesstea: It's been usable for some time but hadn't really replaced the Elisp evaluator, just embedded libguile and made the Elisp evaluator use some of its data-types; currently there's a branch that also uses libguile symbols, and after that bipt said that ey'd start working on replacing the evaluator finally, I think that was about two weeks ago.
<shanecelis>Yeah, apparently BT Templeton (bipt) doesn't respond to anybody really, not even his GSoC mentor.
<taylanub>Haha. :D
<taylanub>Just silently doing all the work!
<ijp>ijpbot: shoot taylanub
*ijpbot loads its shotgun and blasts taylanub
<shanecelis>Probably off in a cave somewhere storing, up solar power, and heading back to civilization for supplies and to drop off patches.
<ijp>I'm suffering from writers block on that bot just now
<taylanub>Writers block ? Is that like when an author has a mental block and can't continue ?
<ijp>yes
<taylanub>For me it's the opposite, I'm normally blocked and occasionally open up and do some work. :(
<ijp>documenting something tends to make me not want to code on it for a while
<taylanub>I suppose it can give one that "local maxim" feeling, making the next step seem large and tiresome ...
<ijp>ijpbot: botsnack
<ijpbot>my favourite snack!
<taylanub>ijpbot: So .. when you becomin' sentient ?
<ijp>hmm, wonder why it didn't respond
<ijp>ijpbot: ping
<ijpbot>pong
<taylanub>ijpbot: Are you already smart enough to ignore the taylanub ?
<taylanub>Seems to me like a yes.
<ijp>actually, a working 3 way handshake is a fun idea for a simple "inverting the inversion" style bot function
<ijp>ijpbot: are you ignoring taylanub?
<ijp>it should be erroring when there isn't a command
<taylanub>ijpbot: Don't just error silently in the corner .. talk about your problems!
<ijp>oh, whoops
<ijp>when I got rid of one error behaviour, I accidentally got rid of the other too
<ijp>if I had that 'one armed if' warning, I meant to write, I'd have never introduced it
<ijp>ijpbot: eval whos-an-idiot?
<ijpbot>ijp
<ijp>ijpbot: are you ignoring taylanub?
<weinholt>if i had a 'one armed if' warning i'd have a warning for this very sentence
<ijp>weinholt: clever
<ijp>ijpbot: are you ignoring taylanub?
<ijpbot>No such command are
<ijp>better
<ijp>weinholt: I do want to add that warning (at least locally), but adding warnings is a pain ....
<weinholt>scheme compilers could do with more warnings
<ijp>IIRC it requires additions in 3 separate places
<weinholt>if you look at an optimizer you're probably going to see it handling error cases by returning the original code as-is, error and all. that would be a fine place to output a warning
<ijp>I think we handle warnings before optimising
<davexunit>random announcement: I'm going to attempt to make a 0.1 release of guile-2d before the gnu 30th birthday celebration.
<ijp>the errors I'm getting from srfi 9 records are horrible
<ijp>"source expression failed to match any pattern in form" when I forget an argument to a call in a function
<ijp>I'm happy that it tells me I'm using it wrong, and it shows the form, but it's not a helpful message
<ijp>assuming my wishful thinking wasn't to wishful, ijpbot should snarf #emacs style "let's" silliness
<ijp>hmm, one bug, it doesn't create the db file if it doesn't exist
<mark_weaver>taylanub: trying to escape characters that you send to a shell is a very fragile and unreliable method. Better to use 'system*' or 'open-pipe*' which avoid the shell entirely.
<ijp>what's the best way to test for that, 'system-error' isn't a very informative key
<ijp>I suppose I could check the errno for ENOENT
<mark_weaver>ijp: catch 'system-error' and then use 'system-error-errno' to extract the errno from the handler args.
<ijp>ah, I even see a function system-error-errno, but it seems silly that it takes the whole arg list rather than just the rest value
<mark_weaver>agreed.
<ijp>mark_weaver: beat me to it by a whisker
<mark_weaver>:)
<mark_weaver>ArneBab: you should compile to scheme, not to tree-il. you shouldn't call 'primitive-eval', just translate to scheme code.
<mark_weaver>ArneBab: your reader should read just a single top-level expression.
<mark_weaver>ijp: you mentioned unhelpful error messages from srfi-9: can you give me an example?
<mark_weaver>ijp: you mentioned unhelpful error messages from srfi-9: can you give me an example?
<ijp> http://paste.lisp.org/display/138940
<ijp>both of those uses of functions are incorrect, but you get a "failed to match" error
<ijp>bbiab
<mark_weaver>ah, that's because they were created by 'define-inlinable' and 'define-tagged-inlinable', so they're actually macros.
<mark_weaver>I guess we should modify 'define-inlinable' and 'define-tagged-inlinable' to produce better error messages when called with the wrong number of arguments.
<ijp>yeah, it was quite obvious that they were macros