IRC channel logs

2015-04-30.log

back to list of logs

<please_help>dsmith-work: the document I read that from specified that it was introduced in r5rs.
<ijp>certainly wasn't
<ijp>it was probably referring to one of the godawful cps macro hacks based on syntax-rules
<please_help>Here's my macro now: http://paste.lisp.org/+35WK/2
<please_help>I think it's where it needs to be. I thinks it's fairly robust, or at least I can't think of a way to break it.
<please_help>works like (expr-bind '(+ x y) ((x 10) (y 20))) ;=> '(let* ((x 10) (y 20)) (+ x y))
<please_help>It also has to work with stacking (expr-bind (expr-bind '(+ x y) ((x 10))) ((y 20))), references by name (define bind1 (expr-bind '(+ x y) ((x 10)))) (expr-bind bind1 ((y 20))), but expressions of type '(+ x (expr-bind '(+ y z) ((z 30)))) should instead be expressed with quasiquotes and an escaped macro.
<daviid>slightly of topic: do we have a [proper] bibtex entry for guile somwhere? i wrote this, http://paste.lisp.org/+35XL but using \\bibliographystyle{plain} it doesn't display the publisher entry, hence FSF does not appear in the reference. I'd like to, any hint welcome
<davexunit>the way primitive-fork works in guile is blowing my mind
<ijp>good mind blow, or bad mind blow?
<davexunit>good
<davexunit>but like, you write code that handles the return value for the child process and the parent process
<davexunit>I wonder how that actually works
<ijp>kernel does afaik
<davexunit>I feel like guile has to do *something* to handle this, but I guess not.
<davexunit>I'm currently implementing a version of clone() using primitive-fork
<wleslie>info fork
<davexunit>forking a guile process from a REPL client. I'm living dangerously.
<wleslie>you could probably get into a situation like in on the HURD where you had to type rreebboooott to reboot the system because you had two consoles attatched at the same time (:
<davexunit>haha
<davexunit>is there a way to launch a geiser REPL as root?
<davexunit>my current hack is to run a guile process from my terminal as root that spawns a repl server, and M-x connect-to-guile
<nalaginrut>morning guilers~
***michel_mno_afk is now known as michel_mno
***michel_mno is now known as michel_mno_afk
<civodul>Hello Guilers!
<civodul>ijp: congrats for GSoC!
<civodul>this is excellent news
<davexunit>hmm, Guile's sockets don't support the AF_NETLINK family :(
<jmd>
<jmd>There must be a better way...
<civodul>(do-the-other (do-that (do-this x)))
<civodul>or (define func (compose do-the-other do-that do-this))
<taylanub>jmd: IMO that style is fairly nice especially when each step uses a different variable name to make it obvious what's going on; it makes for very readable, self-explaining code
<jmd>I'll checkout compose. Thanks.
<taylanub>other times (when the actions are really short), nested procedure calls like above should be fine; if its something done often, then defining a composed procedure should be fine. it all depends...
<jmd>taylanub: Using different variable names has two problems:
<jmd>1. It's hard to think of good names.
<jmd>2. It's harder to add/delete steps.
<taylanub>might also want to define something like "pipeline" that's a reversed compose. compose usually feels backwards IMO.
<dsmith-work>Thursday Greetings, Guilers
<jmd>dsmith-work: I didn't know you were a resident of Thursday Island
***michel_mno_afk is now known as michel_mno
<please_help>(expr-eval (graph->expr (diff (s:/ 1 (s:+ 1 (s:expt 'e 'x))) 'x)) ((e 2.71828) (x 10)))
<please_help>$111 = -4.53960825295691e-5
<please_help>I think my symbolic computation framework is working fine now
<please_help>thanks guys
***michel_mno is now known as michel_mno_afk
***karswell` is now known as karswell
<jmd>Are there any plans to support unicode character code points in guile?
<davexunit>jmd: hmm? guile already handles unicode.
<jmd>So how do I, for example, test if a character is equal to - say - 'ß' ?
<jmd>#\\ß does not work
<jmd>and i don't see anything in the manual about #\\ssharp or anything.
<davexunit>(define str "ßfoo")
<davexunit>(eqv? #\\ß (string-ref str 0))
<davexunit>=> #t
<paroneayea>jmd: main problem is that guile's default encoding is sadly not utf-8
<paroneayea>but it's a fluid
<davexunit>fluuuiiiid
<jmd>davexunit: Must be a very recent thing.
<jmd>but thanks anyway.
<davexunit>jmd: perhaps my default encoding is auto set to utf-8
<jmd>davexunit: In your example, I get ERROR: In procedure scm_lreadr: #<unknown port>:2:11: unknown character name ??
<davexunit>did you try finding how to change the default port encoding?
<jmd>No. I didn't
<jmd>But it would be nice to be able to test a character independent of local environment.
<davexunit>I think one of the maintainers will straighten this out if they see this
<davexunit>I just don't know how it works
<jmd>I'll pose the question another way: I want a function which takes an integer x, and returns a character which corresponds to the unicode code point x.
<ijp>integer->char