IRC channel logs
2015-12-22.log
back to list of logs
<yuqian>I want to get the GCD of a list of integer. But "(gcd (list 6 9 18 42))" is error. Who knows how to make the parentheses disappear? (I'm learning scheme :p) <amz3`>make the parentheses disappear? <ft>(apply gcd (list 6 9 18 42)) <amz3`>(define (gcd* . rest) (apply gcd rest)) <amz3`>ooops, it's ok I said nothing :) <yuqian>It's very useful for a green hand. <tj__>you guys know how can i read from stdin? i'm piping some scripts together. i tried reading from current-input-port, but nothing came up... maybe i messed up somewhere... <C-Keen>echo 123|guile -c '(display (read (current-input-port)))(newline)' <C-Keen>how are you reading from current-input-port? <tj__>(use-modules (ice-9 rdelim)) <tj__> ((standard_in (current-input-port)) <tj__> (first_line (read-line standard-in))) <tj__>cat a_file | ./guile_script.scm <artyom-poptsov>tj__: Hi. It seems that you forgot to add '\\' after '/usr/bin/guile'. <tj__>it works now, thanks alot artyom-poptsov and C-Keen <tj__>i'm trying some functional sound synthesis, thanks : D <davexunit>if you have guile 2.0.9 or greater, SDL2, SDL2_image, SDL2_mixer, and SDL2_ttf, you can easily compile it. <davexunit>and then run the example program to verify it works <davexunit>cd examples; ../pre-inst-env guile hello.scm <davexunit>Guix users can just run 'guix environment -l guix.scm' to get all of the dependencies <madsy>davexunit: Cool. Is it a low-level wrapper, or are pointers and such abstracted away? <davexunit>madsy: there are low-level bindings, but there are also high-level wrappers on top. <davexunit>so, it's recommened that you use the high-level stuff <davexunit>but all of the low-level things are available should you need them. <davexunit>it works for me, and my Guix package built successfully, so I think it's good <davexunit>rjmacready: should work on any platform supported by Guile and SDL2 <davexunit>I'm going to rebuild the tarball and generate a new signature <davexunit>happy to have these things discovered *before* release <rjmacready>so if i were to look for official guile modules / libraries, where is the official place to look? <rjmacready>or should any scheme library work? (as in, does guile implement guile-only stuff?) <davexunit>some scheme libraries are portable and they will work with guile <rjmacready>is CLOS avoided altogether, or are you aware of any usable implementation for scheme? <davexunit>guile has a CLOS-like OOP system named GOOPS <amz3>my guile-fuu becomes rusty, I need to pratice ;) <civodul>all my recognition to whoever provides clues or fixes for that one!