***frofroggy1 is now known as frofroggy
***Shozan is now known as SHODAN
<ArneBab_>should I re-fill changed paragraphs in doc/ref/guile-invoke.texi? ***ecraven- is now known as ecraven
<roelj>I'm trying to run a command from Guile with: (status:exit-val (system* guile-bin "-c" (format #f "~s" "my-expression"))) . Unfortunately, it does not work. Running the command manually works though. <taylan>roelj: I think you need to use ~a instead of ~s, or something <taylan>yeah, I was testing it wrong. this works for me: <taylan>scheme@(guile-user)> (status:exit-val (system* "guile" "-c" (format #f "~s" '(exit 1)))) <taylan>what exactly fails for you? are you sure that the argument you pass to 'format' is a sexpr, and not a sexpr-in-a-string? (in the latter case you need to use ~a) <taylan>(well, the whole 'format' is redundant in that case) <roelj>Where, here's the full command I'm trying to run: /gnu/store/hyk2i7b8mwbrbiyqk5sgrfgds9zvcrn5-guile-2.0.11/bin/guile --no-auto-compile -c "(begin (unless (access? \\"/home/roel/pipelines/rnaseq-out\\" F_OK) (mkdir \\"/home/roel/pipelines/rnaseq-out\\")) (map-in-order mkdir (quote (\\"/home/roel/pipelines/rnaseq-out/rnaseq-initialize-2016-05-18\\" \\"/home/roel/pipelines/rnaseq-out/rnaseq-initialize-2016-05-18/read_counts\\" <roelj>\\"/home/roel/pipelines/rnaseq-out/rnaseq-initialize-2016-05-18/logs\\" \\"/home/roel/pipelines/rnaseq-out/rnaseq-initialize-2016-05-18/jobs\\" \\"/home/roel/pipelines/rnaseq-out/rnaseq-initialize-2016-05-18/DEanalysis\\"))))" <roelj>So, the sexpr is a quoted string, which I then quote again to pass it as a quoted string to the system* call. <taylan>roelj: (format #f "~s" "my-expression") returns "\\"my-expression\\"", which with -c just evaluates to the string "my-expression" <roelj>So what if the expression is (display "Hello"). <taylan>(system* guile "-c" '(begin ...)) would be the right way. or if you already have a string, just (system* guile "-c" string) <taylan>(system* guile "-c" '(display "hello")) <taylan>(system* guile "-c" (format #f "~s" '(display "hello"))) <davexunit_>why would you ever shell out to guile when you're running guile already? <roelj>davexunit_: Good question. I'm trying to do this with other interpreters as well. <roelj>davexunit_: For Guile I can directly execute the code, but for Python, I will have to shell out. <davexunit_>it's just a good general rule to shell out only as a last resort. <roelj>It's called "shelling out" for a reason, heh <ArneBab_>roelj: for Python you should be able to exec(codestring) <roelj>ArneBab_: Oh really.. Let me read about exec :) ***petercom1and is now known as petercommand
<wingo>so no thoughts on my async io in guile screed then <davexunit>I don't have anything constructive beyond "hell yeah!" <wingo>i am thinking the scheme port implementation, which should basically be the only caller of port read functions from scheme, should always be nonblocking <wingo>so the read/write functions from scheme's perspective will return two values, the number of bytes read/written and a waiter, or #f <wingo>s/waiter/waitable/ or maybe s/waiter/completion/, dunno <ArneBab_>wingo: will I have to adjust wisp for this? <wingo>this is much lower level, like below read-char <dsmith-work>ERROR: In procedure scm_lreadr: tests/ports.test:793:30: unknown character name ?? <wingo>weird, i thought i fixed that <wingo>evidently my fix to that didn't make it in <wingo>dsmith-work: fixed, tx for the report <wingo>it was just a prob in the test so no need to rebuild fwiw <wingo>janneke: is HANDLE on windows always the same as int? <wingo>or i guess it's an unsigned int <wingo>i am wondering what the canonical value for a bad HANDLE is <wingo>like -1 for file descriptors <wingo>i thought you were the person that knew all the things janneke <janneke>ACTION is such a terrible encyclopedia <janneke>i'm working to write a truly minimal lisp interpreter in assembly -- prototype in C can almost interpret itself now <janneke>i'm learning even more how amazing lambda is, scheme/lisp is so amazing <davexunit>ACTION once again thinks about a Scheme-like->GLSL compiler <ArneBab_>janneke: doing that in assembly means, you could use it for bootstrapping something bigger <janneke>ArneBab_: that's the idea...Hmm, how about bootstrapping some kind of operating system? <ArneBab_>as soon as you’re at a point where you can build a C compiler which can build an old GCC, you’ve effectivelyl bootstrapped anything you like <ArneBab_>well… maybe as first step a simple sh and an m4 interpreter to be used by autotools <janneke>ArneBab_: a friend of mine is working on a sh interpreter in guile <ArneBab_>janneke: could you push your lisp in assembly fare enough that it can run the sh interpreter? <janneke>but yeah, parsing a tiny c compiler would be the big next target <janneke>ArneBab_: i'm not sure...i looked at psyntax.pp and that realy scared the bejezus out of me <janneke>probably you don't need all of modern define-syntax for to process PEG?