IRC channel logs


back to list of logs

<dsmith-work>{appropriate time} Greetings, Guilers
<mwette>dsmith-work: same to you
<stis>Godag guilers!
<cwebber>so I thought I remembered there being a recommendation for a non-autotools build system for guile that was guix compatible
<cwebber>but now I don't remember what it was
<cwebber>I do remember ijp had guildhall allll the way back in the day
<cwebber>but I think that's not what I'm asking about
<tohoyn>cwebber: that sounds interesting
<cwebber>dsmith-work: env?
<dsmith-work>cwebber: Wrong window
<cwebber>ah :)
<cwebber>I thought it was an answer to my question :)
<Sheilong>I am trying to use string-replace-substring from ice-9 string-fun. However, even importing this module, the interpreter yields in Unbound variable when I attempt to use it.
<dsmith-work>Sheilong: Works here (3.0.7)
<dsmith-work>scheme@(guile-user)> (string-replace-substring "a ring of strings" "ring" "rut")
<dsmith-work>$1 = "a rut of struts"
<Sheilong>Might be the version that I am using here -> GNU Guile 2.2.3
<dsmith-work>Added in 2.9.9
<dsmith-work>(so 3.0.0)
<apteryx>Would someone have a clue as to how to insert a prefix to every line output by a process? It should cover at least standard error and output streams.
<Sheilong>I wrote a version myself
<apteryx>seems I'd like to define my own port 'buffering' procedure
<apteryx>e.g., override what the 'line' buffering logic does to insert a prefix before each line of output
<apteryx>perhaps what I want is achieved through "soft ports"
<Sheilong>is there a procedure that allow me to multiplying a char in a string, for instance: (repeat-str "a" 5) -> "aaaaa"?
<apteryx>Sheilong: sadly not as succintly as that
<avp>Sheilong: Try this: (make-string 5 #\a)
<apteryx>ah, I stand corrected! for single chars repeat
<Sheilong>avp: thanks.
***jackhill_ is now known as jackhill
<Sheilong>Do you know any nice guide on how to indent Scheme programs? My indentation skills are too bad.
<apteryx>Emacs should go a long way
<apteryx>It'd be nice to have a guile-fmt though
<apteryx>Sheilong: also look into using the Emacs paredit mode; it'll allow you to (mostly) forget about balancing parens
<apteryx>I've reached some place where I have a soft port that inserts a prefix, but it doesn't seem to work in combination with 'with-output-to-port' and 'system' ?
<Sheilong>I will take a look on that. I am using highlight-parentheses in my emacs config file. But I do bad indent when coding
<apteryx>seems to work with (set-current-output-port my-port) instead of (with-output-to-port my-port ...). Weird.
<apteryx>is current-output-port global or per-process (e.g., when using primitive-fork ?)
<apteryx>or it could be a Geiser issue; I'll retry in a barebone REPL.
<dsmith-work>Sheilong: Ya. Emacs know how to indent properly. If you are looking for a description, this might be about the same:
<Sheilong>I mostly don't know when is it appropriated to break lines in applying a procedure to its arguments.
<dsmith-work>Sheilong: Rule 4
<Sheilong>Thank you
<dsmith-work>You just get used to what "good" indentation looks like. Then when the code gets indended "wrong", you know there is a misplaced paren somwhere.
<dsmith-work>Things like paredit really help.
<Sheilong>Here for instance I thinkt that the indentation of encrypt-user-profile isn't nice
*apteryx is still wondering how to globally hijack the stdout/stderr of a Guile program
<dsmith-work>apteryx: You probably don't want to pipe those to another process that inserts the prefix on each line..
<dsmith-work>So if you do something at the port level, you can miss things done at the fd level.