<daviid>sneek: later tell fhmgufs (create-signal <gtk-window> 'bluefox #f '()) ***dje is now known as xdje
***Guest28442 is now known as micro`
<trough>Is there a built-in way to write radians? <trough>Nevermind, I think I found the answer: no. <paroneayea>if you want to join the lisp game jam pre-release party for mudsync <davexunit>now I need to make a big tarball of all the guile stuff I used and attempt to write a script that will compile it for people. <wingo>if you have a port that uses iconv for decoding <wingo>and the input ends before a character is decoded <wingo>then the "length" of the invalid byte sequence is not set (the *len arg to get_iconv_codepoint in 2.0) <wingo>so you could end up advancing the read pointer by a trash value <wingo>maybe in 2.0 len doesn't matter. <wingo>b/c peek-char will unget that number of bytes <wingo>whew, peek-char and read-char in scheme totally done. <wingo>dunno how much c i can remove though :/ <wingo>for utf-8 and latin-1 encodings it's faster than guile 2.0 (though slower than c) <wingo>that's for peek-char, i think read-char is similar but it has to do some more work to update positions and we don't compile "case" as well as we could <wingo>encodings needing iconv appear to be slower than 2.0 currently <wingo>i'm pretty sure read-line et al can be *much* faster than 2.0 tho <rekado>davexunit: you probably read about subscriptions in Elm and turning away from signals and FRP in general. I'm curious to hear your thoughts on this. <rekado>looks like the Process stuff in Elm is similar to delimited continuations. <bentanweihao>Hi all! I have a pretty basic question that I'm stumped on <df_>bentanweihao: I'm not clear what you're trying to do, do you want a procedure with a variable number of arguments? <mejja>try: (define foo (lambda vals vals)) <df_>so something like (define (foo . args) < args is a list containing the arguments > ) <bentanweihao>hmm why doesn't (define (foo) (lambda (values) values)) work then? <df_>that defines a procedure that returns a procedure <df_>roughly speaking (define (foo ...)) is shorthand for (define foo (lambda ...)) <df_>er, yeah, looks like the repl wraps that in an implicit (values) <random-nick>would "generator functions" be implemented in guile with prompts where the handler set!s the procedure instance to the new delimited continuation each generation? <davexunit>generators can be implemented with delimited continuations <davexunit>would depend on the implementation, I think. <trough>How can I append an integer variable to a string? <random-nick>as in you want to convert the integer into a string? <trough>Is it possible to pad the number with zeros? <random-nick>what does #~ before a sexp mean? is that a guix extension? <davexunit>random-nick: yes. that's a reader macro in guix. <random-nick>is there some special code in guile that is reserved for guix? <davexunit>random-nick: no, it just uses guile's reader macro API. <davexunit>never looked for it or reached for reader macros <davexunit>random-nick: what do you mean by a "closure"? <davexunit>from the perspective of the Guile implementors, a "closure" is an implementation technique, not something that a user sees. <friedr>I want to automatically run geiser (for autodoc support) when I'm opening a file in scheme mode unless there's already a running instance. Is there a function to get that information? <friedr>I thought it's better to ask here, because most of you use Geiser for editing, right? <davexunit>friedr: add a hook to the scheme major mode? <davexunit>and figure out a predicate to test for the existence of a geiser repl <friedr>Yes, that's not the problem, but I need to know whether it's already running. <roelj>friedr: I'm also interested in this. So far I've had good experience with just running a repl at Emacs startup a <davexunit>where geiser-guile-repl-p is left as an exercise for you. <friedr>Actually your geiser-guile-repl-p was what I wanted to ask for. :) <friedr>Maybe just running one Geiser at startup is good enough. <davexunit>I usually have 1 or 2 geiser repls running at any given time <davexunit>and my emacs sessions last for many days at a time <roelj>davexunit: What's the reason for having multiple REPLs open at any time? (just curious) <davexunit>roelj: I have a REPL open for random hackery (usually quick math) and often enough I connect to running Guile programs for live hacking <roelj>Cool. The graphics look a bit like Volfied <roelj>Ah, I see you're using SDL. That must perform pretty well then <davexunit>there's a lot of overhead in the way I've chosen to implement game state with pure functions <roelj>Is that inherent to the functional programming style? <roelj>Or just the time constraints for entering the game competition? <roelj>davexunit: I wrote an AI for "Planet Wars" about a year ago and I implemented the performance-critical things in C. <roelj>SDL is doing most of the performance-critical stuff already I guess <davexunit>guile 2.1 has solved a number of my performance problems <davexunit>and allowed me to remove the use of a C library for matrix multiplication <random-nick>davexunit: closures as functions which preserve at least some variables <jmarciano>davexunit: nice game to learn from, I have seen the animation on the page (after your email to Guile mailing list=) <jmarciano>looks similar to something I was making in assembly on Motorola CPU <sapienTech>hey all, I've been working with guile for a while, but haven't been able to figure out how values like #f #t #:optional... are defined. For example, I can't make my own functions or macros starting with # <sapienTech>I imagine they are similar to " which lets the parser know that a sting is coming up? <dsmith-work>sapienTech: You *can* use string->symbol to create a symbol with any chars. But that's what you are asking. <dsmith-work>There is way to extend the reader. read-hash-extend I think. <sapienTech>dsmith-work: thanks for the response. I will look into reader extensions to give me some practice working with these concepts. At a high level, does the reader designate characters like % & and # as special values that it will interpret differently from other ascii values? <sapienTech>and if that is the case, what does it do once it reads these characters? for example once it sees #f, how does that get represented in the AST? <dsmith-work>sapienTech: Well, the reader returns a "datum" per the Scheme specs. <sapienTech>okay so it seems like there are some things i need to read more about, what would be the best resource for learning about the reader + datums, the SRFI's? <dsmith-work>sapienTech: For Scheme, I'd read the apprropriate RnRS spec. Note that the read-hash-extend thing is very guile specific. <dsmith-work>sapienTech: The point is, the reader returns data, not scheme.