<jmarciano>it is usable to me very much, but not to others <jmarciano>but Perl's unicode mess... is too much in comparison to Guile <lloda>I don't think there's anything standard <jmarciano`>I am going to do it simpler than that gist. Like splitting the string simply. <wingo>splitting the string doesn't work for quoted delimiters <jmarciano`>but GuixSD is based on Guile, and I tend to use through Guix package manager... <ArneBab_>I hope that I can get it to a state where it can be shipped with Guile by default <ArneBab_>as a convenient way to get pure Scheme modules <jmarciano`>I understand yes. I am not sure what is better. Everyone wants to install it in different places. <jmarciano`>GNU distribution, GuixSD is offering separated profiles, so I rather tend to use it through Guix package manager. <jmarciano`>what would be easiest way to open up graphical window in Guile? Similar to gxmessage or zenity, that I may ask user for 3-4 lines and finished. <cojy>is there any way to limit stack growth so a bad recursive function doesn't just keep consuming more memory until my whole system locks up? <davexunit>cojy: yes, but I can't remember the name of the form right now <dsmith-work>jmarciano`: You could fork off a zenity or whatever... <jmarciano`>some procedures gives errors, how do I avoid that, with a check? <mark_weaver>there's also 'false-if-exception', but that's probably best avoided, because it's better to catch only selectively what you expect <amz3>jmarciano`: thunk is a lambda without args <amz3>say (lambda () (do something useful)) is a thunk <jmarciano`>I just want to use (stat "file") and if there is no file, I get error. <amz3>(lambda () (/ 1 x)) is thunk that can fail <amz3>IIRC there is a procedure to check for the existance of a file <amz3>(define (path-exists? path) <amz3> "Return #true if path is a file or directory. <amz3> #false if it doesn't exists" <amz3>jmarciano`: so you can use access? procedure to check for the existence of a file <amz3>I don't use much exception in Guile, however I don't have much Guile code <janneke>i think that in gnu we use path for a list of directories <amz3>janneke: what do you mean? <janneke>/usr/bin: file name that happens to be a directory (also a file) <jmarciano`>amz3: when you put description there, it remains for apropos? <jmarciano`>only I don't need your definition, better just access? <jmarciano`>mario-goulart: when we say binding for zenity, does it mean, it binds to C functions? And uses maybe some library? <amz3>janneke: this is surprising to me, python os.path module deals both with files and directories but not with PATH <mario-goulart>jmarciano`: no, it shells out the zenity program. Bindings for the zenity tool. <jmarciano`>so it just calls like (system "zenity -- stuff")? <jmarciano`>if I use within lambda, (let () something), will something remain after for lambda? <jmarciano`>I am inside of (define some (lambda. -- I use (if and within it, use let variable) but that variable is not showing outside. <rain1>would you like to show the code? <jmarciano`>yes, from yesterday, I must improve it to include SSL... <jmarciano`>I learn from cluets, not from complete solutions, that hurts <rain1>this looks like it should work <rain1>is there any problem? with that code <rain1>I can suggest a style improvement <jmarciano`>the set! is correct? so far? How would you use inside variable? <rain1>here's how with LET instead of SET! <jmarciano`>because in that manner i don't need to define something outside of lambda <jmarciano`>because I have many websites, it is easier to read directory and generate config. <jmarciano`>for ssl, if it detects ssl file, generates ssl config automatically <rain1>you don't pass ssl-section into nginx-http-conf <rain1>oh but you call it inside the if <jmarciano`>well I told you it works, SSL is working already... <rain1>you don't need toh let anymore <rain1>andy ou could change the IF to a WHERE <rain1>because ssl-section is not used <jmarciano`>not so easy with letsencrypt, if multiple subdomains, they put it under one... but ok so far <jmarciano`>rain1: do I use "root" in nginx-http-conf(s) wrong? <rain1>its fine but you could remove it <rain1>(lambda(website root) -> (lambda(website) <jmarciano`>because one root is defined before that, so I dont know which one is going to be used <rain1>(nginx-https-conf n root) -> (nginx-https-conf n) <rain1>the uses of root refer to the innermost lambda <jmarciano`>so in lambda, if I use variable, it is not used the one from outside? <rain1>most important concept in lisp <jmarciano`>of course I must know where which variables apply <bavier>haha, just reading through guile source, and see that it includes support for the Cray1 <linas>dumb question: I get this error: `warning: possibly unbound variable` whenever I compile code that references some guile function defined in a C library. <civodul`>bavier: that thing about pointers on Cray always seemed weird and intriguing to me :-) <fhmgufs>What's the easiest way to get the index of the first element in a vector being equal to a specified value? <fhmgufs>I mean the opposite of (vector-ref vec i) => elem i.e. for example (vector-index vec elem) => i (I know that there's already a procedure vector-index) <fhmgufs>Is there a function or another way to do that? <fhmgufs>Iterating over the vector with (for each) and setting an auxiliary variable seems too inelegant to me. <davexunit>fhmgufs: seems like you already found the answer <davexunit>(vector-index (lambda (x) (equal? x thing)) #(...)) ***amz3 is now known as luc2
***luc2 is now known as amz3
<fhmgufs>davexunit: Ah, yes, thanks. I should have tried this. :) <fhmgufs>The major advantage of Scheme is that everything is logical. <Jookia>Part of me is bothered by lack of infix operators, but the other part of me keeps reminding myself how often I'd wrap things since I didn't remember precedence, or more importantly, didn't think the people reading my code would