<cky>ArneBab_: Just one small comment. It should be "a SRFI" and not "an SRFI". ***ceverett is now known as _zxq9_
<slucx>(string-set! "hello" 0 #\\A) => string is read-only <slucx>- Scheme Procedure: string-set! str k chr <slucx> Store CHR in element K of STR and return an unspecified value. K <slucx> must be a valid index of STR. <nalaginrut>slucx: you may generate a string with make-string <slucx>It's like C's string and char array <slucx>nalaginrut: I make a string with length 1 use (define ss (make-string <nalaginrut>sneek: later tell slucx because string-cope does a new copy <mark_weaver>slucxx: string-copy takes only one string argument, and allocates a fresh new copy. it doesn't copy into an existing string. <mark_weaver>e.g. (string-copy "hello") returns a copy of "hello" that you can now mutate <slucxx>mark_weaver: I got it, thank you ;-) <sneek>slucxx, nalaginrut says: because string-cope does a new copy <mark_weaver>slucxx: if you pass a string as the second argument, it should raise an error. it does for me, anyway. what version of guile are you using? <slucxx>string-copy just have on argument <mark_weaver>slucxx: so now I'm confused. You asked why (string-copy ss "hello") doesn't overflow the string in 'ss'. but that should have raised an error about the second argument. Does it not raise an error for you? <mark_weaver>I get: ERROR: In procedure string-copy: ERROR: Wrong type (expecting exact integer): "hello" <slucxx>It's my fault, my really code is that, <slucxx>(let ((ss (make-string 1))) (set! ss (string-copy "hello"))) <mark_weaver>that works because 'ss' is actually a pointer to a string object. <slucxx>i think everything is point within scheme <slucxx>ss just keep the point of new string <mark_weaver>actually, we represent some immutable types as immediates. <mark_weaver>but yes, you can think of everything as a pointer, and you won't go wrong. <mark_weaver>yes, exactly, you were just setting 'ss' to point to the new string and discarding the other one. <mark_weaver>okay, I'm off to spend some time with my family. happy hacking! ***cluck` is now known as cluck