<lokli>hello all. how can i reproduce (format #f "~s" "hello") in scheme code without format? Just simple string escaping. <amz3>lokli: it's not supported <amz3>what would mean simple string escaping anyway? <lokli>amz3, exactly what this piece of code does. replace \\ with \\\\, same goes for ". I guess i will just write a manual mapping function <amz3>sorry I don't understand <lokli>turns out is is way easier: (call-with-output-string (lambda (p) (write "hello\\n\\a\\b\\fworld\\n" p))) ***_hanhart_ is now known as _hanhart
<mark_weaver>lokli: good, you found the answer yourself, using 'call-with-output-string' and 'write'. <lokli>mark_weaver, thanks. i am trying to write code, that can be portable across implementations. Dont know how to go around different modules conventions. Can you please give me any pointers? <lokli>mark_weaver, i mean for example match modules. in guile i would put (use-modules (ice-9 match)), but same source would not be understood by other implementations. Is there any way around it? <mark_weaver>another option is to use 'cond-expand', e.g. see modules/srfi/srfi-64/testing.scm <lokli>mark_weaver, thanks, that looks like exactly what i need <jyc>is there some setting I can do to make backtraces more easy to use? <jyc>for example, right now I am getting this error from somewhere: <jyc>ERROR: Wrong number of arguments to #<procedure 3059de0 at ice-9/eval.scm:330:13 (a)> <mark_weaver>jyc: compile your code, and the errors will usually be more helpful <mark_weaver>the primitive evaluator doesn't do a very good job with error messages. <mark_weaver>(there's no reason it couldn't, but since we usually compile code there's been less effort spent on it) <jyc>mark_weaver: Cool, just tried that and it works a lot better. Thanks again for the help ***siel_ is now known as siel