IRC channel logs

2017-01-04.log

back to list of logs

***sturm_ is now known as sturm
<rekado>oh my, David Kastrup’s email about the LilyPond 2.20 release process contains so many claims about “the Guile maintainers” and their intentions…
<wleslie>sigh
<wleslie>probably nothing new, though
<rekado>the good news is that LilyPond already works with Guile 2; bad news is that it’s really slow.
<jmd>What's slow? Lilypond or its development?
<wleslie>the story was that guile 2.0 broke a very unhygenic interface that wasn't sustainable in the new compiler. janneke ended up doing most of the porting to Guile 2. probably they haven't had much time to polish that.
<amz3>hello all
<amz3>paroneayea: the 8sync post on the mailling list is interesting
<amz3>I started reading the background theory
<amz3>math dual has always been an intersting concept I am wondering how it translates into programming stuff
<OrangeShark>hello everyone
<paroneayea>sneek: later tell amz3 I'm glad you found it interesting :)
<sneek>Will do.
<ArneBab_>rekado: does "works" mean, it can now create pdfs from ly files?
<ArneBab_>rekado: that would be great news!
<ArneBab_>rekado: do you mean this? "So I really would urge the Guile-2 warriors to fold their work into the
<ArneBab_>mainline. We want it distributed by default, but probably with a
<ArneBab_>stronger warning against --enable-guilev2 (or what it was called),
<ArneBab_>bluntly mentioning the speed of LilyPond dropping to a third." — http://lists.gnu.org/archive/html/lilypond-devel/2016-12/msg00348.html
<ArneBab_>dropping to a third sounds like it’s solvable
<davexunit>ArneBab_: read the paragraphs below it
<davexunit>those are the ones with the mean tone
<ArneBab_>davexunit: above it some have an unfriendly tone, but much, much less than the past emails I saw
<ArneBab_>it sounds like lilypond is finally on track to work with Guile 2.0
<davexunit>I've just read it all now and it's really nasty
<davexunit>sorry, the paragraphs were *above* what you quoted, not below.
<ArneBab_>maybe I feel it differently, but what I see is a pretty positive message masked by deep frustration
<ArneBab_>it could also have been written as "Lilypond on Guile 2.0 now WORKS! It still only gets 30% of the speed, but it works."
<davexunit>what I read is that david wants 1.8 forever
<davexunit>he has delusions that guile is no longer an extension language
<wleslie>it doesn't sound as biting as anything he said on the guile list
<wleslie>guile-dev specifically
<ArneBab_>^ that’s what I mean
<ArneBab_>compared to what I was used to, this is really nice
<rekado>guess I was just lucky then that I didn't read his other messages on the Guile lists.
<davexunit>I try to avoid reading things from him on mailing lists
<ArneBab_>He seems to be really frustrated because some hacks required lots of effort to fix due to changes in Guile. I can sympathize with that — likely he also does not have the time (and energy) to address them properly, so that it feels like the carpet got pulled out from under him.
<davexunit>he's taken opportunities to put down guile on emacs-devel and stuff
<davexunit>the problem is that they relied on some unspecified behavior that just happened to work on guile 1.8
<davexunit>the code should never have worked, and now david expects bug compatibility for major version releases.
<ArneBab_>yes, but there’s nothing to be done about that
<ArneBab_>the really positive part in his message is, though: please merge guile2 work into mainline
<davexunit>you're right :)
<paroneayea>hi everyone :)
<davexunit>hey paroneayea
<paroneayea>I'm so close to a 0.4 release of 8sync
<davexunit>yay!
<paroneayea>I have a good tutorial
<paroneayea>or what I think is one
<paroneayea>and actors now can have auto-init and auto-cleanup (something to run on shutdown, either of the actor or the whole system) actions
<paroneayea>properly clean up file descriptors, etc :)
<paroneayea>lots of other improvements
<paroneayea>this is going to be the first release I'm going to really ask others to play with
<paroneayea>hopefully we can find out how well the ideas of 8sync pass with other people :)
<ArneBab_>paroneayea: cool!
<davexunit>paroneayea: that's some good progress!
<davexunit>when you release I should try to follow the tutorial and see how it goes
<davexunit>last night I implemented a rasterizer for vector line segments. sample output: http://i.imgur.com/6tjE8K3.png
<davexunit>so you can draw pretty vector lines with guile :)
<paroneayea>davexunit: it would be great if you could try it
<paroneayea>ACTION opens screenshot
<paroneayea>davexunit: hey great :)
<davexunit>there's more complicated things to do from here, like dashed lines and curves, but this is a good first step.
<paroneayea>nice and antialiased too
<davexunit>yeah
<davexunit>there's several end cap styles to choose from, too.
<davexunit>round caps are shown here.
<davexunit>I'd like to do outline polygons, but I need to learn how to render the join points so the result isn't gross.
<ArneBab_>davexunit: nice!
<davexunit>thanks :)
<davexunit>paroneayea: I would read your tutorial if you have it available somewhere, I just can't actually write the code yet.
<ArneBab_>lilypond source, general-scheme.cc, line 274: "//scm_protects is available only in Guile versions before 2.1."
<ArneBab_>^ no wonder they are frustrated
<ArneBab_>"hey, we found a solution which finally works" … next release … "it got removed…"
<paroneayea>davexunit: ok, in about 2 hours I'll have the last section done, and then I'll export it to html :)
<davexunit>cool :)
<paroneayea>davexunit: keep in mind: there's probably more mutation than you'd like, but functional actors will become an option in the future... I put some things in place to make them more possible already
<davexunit>it's an imperative thing, it's okay :)
<davexunit>everything I've been writing is imperative lately
<paroneayea>:)
<davexunit>managing the ol' opengl state machine
<paroneayea>whee
<davexunit>which I've finally developed a pretty nice way of handling
<davexunit>and I took a page out of Bagger's (from #lispgames) book for some of the API
<davexunit>he made the observation that rendering is applying a function (a shader in OpenGL) to a vertex array with some arguments (known as uniforms)
<davexunit>so I wrote gpu-apply
<paroneayea>davexunit: wow coool
<davexunit>(gpu-apply shader vertices #:uniform-1 foo #:uniform-2 bar)
<davexunit>it's as good of a rendering interface as I've ever been able to make.
<davexunit>I also made efficient sprite rendering a lot simpler from the user's perspective.
<davexunit>just wrap your draw-sprite calls in the with-batched-sprites form and you're good to go!
<paroneayea>:D
<paroneayea>ArneBab_: https://fosdem.org/2017/schedule/event/naturalscriptwritingguile/ might be fun to an experiment sometime btw where we try to put together something combined with mudsync to make writing "multiplayer interactive fiction" look natural like this maybe even to a non-programmer
<paroneayea>ArneBab_: looking forward to your talk
<paroneayea>heck, I'm looking forward to all of these https://fosdem.org/2017/schedule/track/gnu_guile/
<paroneayea>it's too bad it's on the same day as the decentralized networking track though, those are my two tracks of interest. Oh well, that's how conferences go :)
<ArneBab_>paroneayea: that is something I’d really love to see
<ArneBab_>paroneayea: same for me :)
<ArneBab_>(two tracks)
<avoine>\\o/ /me is going at FOSDEM
<davexunit>those talks all look great
<paroneayea>avoine: nice! see you there :)
<paroneayea>I hope mine gets recorded this time ;)
<paroneayea>it'll be nice to put up on 8sync's homepage
<davexunit>I hope everything gets recorded because I won't be there :)
<paroneayea>oh
<paroneayea>civodul: dang I wonder if we need to finalize the panel after all if the FOSDEM people want our schedules finalized by Saturday
<davexunit>hmm, I wonder if floats need to be boxed before passing them off to the ffi
<davexunit>hopefully that can be optimized, will need to read some disassembly to know for sure.
<dsmith-work>Morning Greetings, Guilers
<wleslie>(apply coffee dsmith-work)
<dsmith-work>Yeah! should be done about now..
<dsmith-work>Mmmm
<civodul>paroneayea: we should check with Pjotr and Manolis, most likely we'll be scheduled at a different time
<daviid>hello guilers, hny all!
<paroneayea>civodul: yeah I just sent an email
<paroneayea>we'll see!
<civodul>cool, thanks!
<davexunit>can guile do anything like common lisp's restarts?
<davexunit>the use-case is to redefine a buggy procedure when an exception is thrown and then resume the program at that point
<dsmith-work>davexunit: Whoah
<davexunit>I don't know much about common lisp, but I ran into this http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html
<paroneayea>davexunit: I've wondered whether r6rs conditions supported it
<paroneayea>there's a raise-continuable thing I looked at but didn't understand
<davexunit>paroneayea: I'll look into it, I'm still wrapping my head around it.
<davexunit>all I know is that it would really help me with my game engine
<dsmith-work>So something blows up in the middle of some procedure. You rewrite it (so now new code). Seem like the restart would continue from where it blew up in the old code. How would it know to restart from the middle of the new code?
<dsmith-work>ACTION boggles
<paroneayea>davexunit: if you make progress figuring it out, let me know
<davexunit>I want to catch an exception, pause the game, spin and poll the REPL server until the user calls a resume function, then restart from where the exception occured.
<paroneayea>davexunit: I guess it wouldn't work *in general* though
<paroneayea>using the r6rs conditions
<davexunit>dsmith-work: you'd redefine the buggy function, and then restart from that function call.
<paroneayea>even if raise-continuable worked
<davexunit>it wouldn't be *after* that call, it would *on* that call.
<paroneayea>it would only work for raise-continuable using procedures
<davexunit>paroneayea: hmm okay
<davexunit>maybe there's a trick I can play to deal with it.
<paroneayea>davexunit: 8sync's engine is also "failure friendly" but it doesn't drop to a REPL
<paroneayea>it more or less spits out errors to the console, propagates them to actors who are waiting on information from other actors, and just keeps running
<davexunit>in my case I'd add a hook that the user could set to do whatever
<davexunit>most common case would be just poll the repl server for awhile.
<paroneayea>that way you can "see" the error in progress and fix it
<dsmith-work>davexunit: Ok.
<davexunit>paroneayea: yeah I did something similar in sly
<davexunit>the thing I really want and could never figure out though is to make a REPL server that I could pass a stack to and enter the debugger
<davexunit>because the exception happened in the game loop, not in the REPL session.
<paroneayea>yeah I'm not sure how to do that
<paroneayea>maybe the game loop could *enter* a repl?
<paroneayea>separate from the listening one
<paroneayea>and you could make that a configurable opttion:
<paroneayea>either do the "print and keep running" option, or "drop to a repl"
<davexunit>that works as a start, but it's not a very good solution.
<davexunit>because it's not my happy geiser repl
<paroneayea>davexunit: I hear you
<davexunit>I could edit in emacs and stuff
<paroneayea>though! imagine you're entering some long thing in geiser's repl buffer
<davexunit>and then drop back to the console repl and ,q when I'm ready to continue
<paroneayea>and suddenly an error happens in the running problem
<paroneayea>program
<paroneayea>and it clobbers it
<paroneayea>I wonder about that
<davexunit>there's all sorts of potential problems like that :)
<davexunit>I think it would have to be a new repl command
<paroneayea>a new repl buffer? :)
<davexunit>to drop into the current debugging sessions
<davexunit>...
<paroneayea>oh
<davexunit>I think that might be perfect, actually.
<paroneayea>I see
<paroneayea>oh :)
<paroneayea>ha
<davexunit>stacks are first class in guile
<davexunit>I can save it to a global
<davexunit>and write a metacommand to open the debugger and use that stack
<paroneayea>but geiser somehow has to be "pinged"
<paroneayea>to open that new buffer
<paroneayea>how do you do that?
<davexunit>no new buffer at all
<paroneayea>oh I see
<davexunit>the user, at their already open REPL, runs a metacommand
<paroneayea>,chicka-debug
<davexunit>yeah!
<davexunit>this is crazy enough to work
<davexunit>brb!
<paroneayea>:D
<paroneayea>davexunit: let me know if you get this working
<paroneayea>I'm very interested.
<paroneayea>I could maybe supply this as a feature for 8sync, too.
<paroneayea>davexunit: hm
<paroneayea>davexunit: I think I could make this work
<paroneayea>davexunit: for 8sync's case, I think it won't stop the whole program
<paroneayea>just, instead, the terminal will print out "exception caught, see ,debug-8sync" or something
<paroneayea>and you can ,debug-8sync which will list a set of stacks to hack on
<paroneayea>or
<paroneayea>,debug-8sync 0 for example
<paroneayea>to enter the 0 indexed "caught" stack
<paroneayea>but 8sync will keep running
<paroneayea>so if other actors are doing things
<paroneayea>they will keep doing them
<paroneayea>the whole program won't shut down
<random-nick>many common lisp REPLs use conditions and restarts when an error occurs
<davexunit>paroneayea: okay, I'll let you know.
<davexunit>the game engine itself will have no knowledge of it, it will just capture the stack upon exception, stash it in a global, and call on-error-hook
<davexunit>I'm very excited that this suddenly just clicked. did you know you were a rubber duck, paroneayea?
<davexunit>hopefully there's nothing I'm forgetting about the way the stack and debugger APIs work that makes this not possible.
<paroneayea>davexunit: happy to be your rubber duck, any time davexunit :)
<paroneayea>you too anyway, since now I have a great idea for a new feature :)
<davexunit>:)
<davexunit>the guix code has an example of this sub-repl creation
<paroneayea>davexunit: ooh, where?
<davexunit>guix/monad-repl.scm
<davexunit>it doesn't make a debugger, but it does make a new sub-repl
<davexunit>(system repl error-handling) has the code I need
<davexunit>I'll write my own version of call-with-error-handling
<davexunit>yeah, I can just use a custom on-error procedure for this
<davexunit>unfortunately no such option exists for trap-handler, so I wouldn't be able to capture breakpoints.
<paroneayea>davexunit: thanks :)
<davexunit>this looks surprisingly easy to do
<paroneayea>interesting
<paroneayea>trap-handler too
<paroneayea>that would be useful
<davexunit>that will require a change to guile core :)
<paroneayea>davexunit: it's already there
<paroneayea>in call-with-error-handling
<davexunit>it doesn't allow a custom handler though
<paroneayea>oh, you're right.
<davexunit>add that and we're golden
<davexunit>it's a backwards compatible change
<davexunit>so maybe such a patch would be accepted.
<paroneayea>yeah
<davexunit>the (debug) case in the (case on-error ...) form is the code I'm gonna snarf
<paroneayea>nice :)
<davexunit>I just need to wrap the body of that lambda in another lambda
<davexunit>and set! a global so it contains that lambda
<davexunit>the repl metacommand will simply apply the thunk and voila!
<paroneayea>davexunit: though https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25300
<paroneayea>davexunit: not sure if you saw that bug...
<paroneayea>presumably that needs to be fixed first
<davexunit>ah, yeah.
<davexunit>but for now I'm not interested in breakpoints
<davexunit>confession: I never use them
<paroneayea>I use tracing
<davexunit>what I want is to be able to stick a call to something like (debugger) anywhere in the code and have that spawn a debugger.
<paroneayea>yeah
<davexunit>used to that from ruby
<davexunit>very nice
<paroneayea>something like pdb.set_trace() in python
<davexunit>I know it's possible
<paroneayea>it would be nice to maybe also be able to set a scope where guile didn't optimize away much of the locals on the stack
<paroneayea>or run guile like --less-optimized for debugging
<paroneayea>--less-good
<paroneayea>;)
<davexunit>you can do the latter
<paroneayea>oh you can??
<davexunit>-O0
<paroneayea>:O
<davexunit>turns off all optimizations
<paroneayea>wat
<paroneayea>how did I not know about this
<davexunit>guix will likely use that when it switches to guile 2.2
<davexunit>so that all of the package modules compile quickly
<davexunit>since things compile slower now that there are so many lovely optimizations applied
<paroneayea>ACTION nods
<paroneayea>cool
<paroneayea>the more I know.
<davexunit>:)
<paroneayea>davexunit: https://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Restarts.html mit-scheme seems to have restarts
<davexunit>why is mit-scheme in many ways still the best scheme? heh
<paroneayea>:)
<paroneayea>oh
<paroneayea>I must be missing something obvious :(
<paroneayea>my dynamic-wind is ignored by SIGINT (ie, C-c)
<paroneayea>there must be a way to change this behavior
<paroneayea>oh right I think andy rewrote the docs about system asyncs
<paroneayea>ACTION reads
<paroneayea>ok, I think I got it.
<wingo>happy new year's, guilers :)
<artyom-poptsov>Happy new year, wingo
<davexunit>hey wingo, happy gnu year.
<wingo>:)
<avoine>Happy new year
<civodul>howdy wingo, best wishes!
<tokage>it's still some months till 64 ARMS
<paroneayea>hi, happy new year wingo and *
<paroneayea>wingo: mind seeing if my understanding of suspendable-ports is correct?
<paroneayea>wingo: my understanding is, if you do anything that does read/write bytes, it'll always suspend to the scheduler, regardless of whether there is information available yet
<paroneayea>right?
<paroneayea>so there's no need to manually yield after a read-line or etc
<paroneayea>because it'll always have suspended to the scheduler after every call to read-bytes anyway
<paroneayea>I'm writing 8sync docs and was about to write documentation as if I was sure of this, and then realized I wasn't totally. The code seems to indicate as much
<wingo>hi
<paroneayea>but suddenly I'm self-doubting :)
<paroneayea>hi wingo !
<paroneayea>I hope you don't mind my pester'y questions.
<wingo>no prob :)
<wingo>let's say you put-u8 on a suspendable port
<wingo>if the port has buffering (see Buffering in manual) and there is space in the buffer, then the operation succeeds immediately, without suspending anything
<wingo>similarly for reading
<wingo>the suspendable ports facility only calls the current-read-waiter / current-write-waiter if guile tries to read/write on a port,
<wingo>there's not enough in the buffer / the buffer is full,
<wingo>and the port is nonblocking
<paroneayea>wingo: okay, excellent, thanks for the clarity
<paroneayea>in that case, I *will* put a yield in here, and explain why that's a good idea :)
<wingo>as you like :) why do you think it's a good idea?
<paroneayea>apparently I'm the one learning from this tutorial :)
<wingo>well, i can just read your docs anyway :)
<paroneayea>wingo: oh, well... I dunno, it seems like a good idea to prevent one thing from flooding
<wingo>but it doesn't seem like a good idea to me
<paroneayea>ok :)
<paroneayea>well maybe the existing behavior was just fine, handle as many lines as you can
<wingo>if you want line buffering on output, use setvbuf to get that effect
<paroneayea>but at the very least, it's a good thing to understand what the behavior is ;)
<wingo>or if you want to limit input buffering, similarly setvbuf can give you a maximum to process at once (but in bytes rather than lines)
<wingo>heh yeah
<paroneayea>wingo: oh ok, setvbuf makes sense.
<paroneayea>that' probably much more sensible.
<paroneayea>The More I Know, again!
<paroneayea>wingo: quasi-relatedly, did you see this overexuberant email I sent? http://lists.gnu.org/archive/html/guile-user/2017-01/msg00005.html
<wingo>paroneayea: neat!
<wingo>i haven't seen it yet
<wingo>just got back home yesterday from holidays
<paroneayea>wingo: hope they were happy holidays :)
<wingo>yes, and likewise for you :)
<wingo>did you see the parallel fibers things? regrettably requires dev guile
<wingo>i'll release another guile soon, hopefully with davexunit's patches too
<paroneayea>wingo: I saw it... I haven't gotten to try it yet
<wingo>yeah it's a little half-baked
<paroneayea>wingo: btw, it would be useful if you had time to look at the guile-fibers patch I sent to guix
<wingo>i tried parallelizing the web server and ran into a problem that needed a deeper fix
<paroneayea>I think I'm much more likely to use guile-fibers if properly packaged
<wingo>sure
<paroneayea>if you have time, that is :)
<paroneayea>I aim to get guile-8sync in guix after next release as well :)
<paroneayea>then maybe we can get more guilers actively playing with these things
<paroneayea>wingo: anyway, the parallelizing stuff looks fun. :)
<wingo>:)
<wingo>yeah i want to pop this off my plate and release guile 2.2
<wingo>er, stack of plates anyway :)
<paroneayea>yay