IRC channel logs
2023-04-10.log
back to list of logs
<haugh>Does guile provide any info I could use for indentation? Currently I manually maintain lists of words with the number of expressions with "special indentation". For example, I give 'receive' a value of 2, 'match' 1, and don't list 'if', 'and', or 'or'. It's getting old <haugh>alternatively if there's a decent standalone formatter, that would save me a lot of time <haugh>what's the difference between leaving something out and marking it 0? <dsmith>Note that guile does have some emacs code for special indenting of some forms. <dsmith>Ahh yes. `.dir-locals.el` in the source root dir <flatwhatson>haugh: from the comment there "if the value of the property is zero, then when the first form is on a separate line, the next lines will be indented with 2 spaces instead of the default one space" <dsmith>Hmm. Never tried it, but it might be possible to use emacs in --batch mode to format scheme files.. <daviid>flatwhatson: for info, i sent an email to the guile-software webpage mainainer - to ask they update/publish guile-openai, guile-prepscheme and guile-gemini - it generally takes a few days, sometimes a bit mkore, but it will eventually be processed ... <daviid>dsmith: could you add that if someone wants to ask for some changes or post a new project, just send an email to tantalum, <sph at posteo dot eu> <old>I've just started The Little Learner today <old>oh okay it's an API stuff with OpenAI stuff <old>can we have ChatGPT as a bot here? <old>Although I would prefer to keep sneek <dadinn>I've discussed with mnieper a few months ago some problems I've run into with (ice-9 expect) <dadinn>I think it was on #scheme channel actually :/ <Zelphir>I am trying to concurrently write to an out-port and read from the corresponding in-port, but I seem to be doing something wrong. I currently have this code: http://0x0.st/HXwI.scm Can anyone tell me what I am doing wrong? <Zelphir>No error, just that it does not output the "Hello!\n"s I would expect it to. <Zelphir>At first I thought it might be about buffering and not flushing, but that does not seem to be the case, since I switched to non-buffered and also tried using `get-line' instead of getting some amount of bytes. <Zelphir>The `endless-writer' does output its message to current output port, but the line-reader does not get to outputting anything it seems. As if it hangs with the first `get-line'. <Zelphir>And when I try it in a REPL it also hangs when I try to `get-line' from the in-port. <dadinn>seems to be working for me: (call-with-input-string <dadinn>sorry, seems to have dropped off <Zelphir>But wait, that is a new in-port created by call-with-input-string, right? I would like to read from the one corresponding to the `out' port, reading whatever `endless-writer' writes. Maybe I am misunderstanding. <Zelphir>Ah, you are saying, that the reader works, but the writer might not. <Zelphir>Hm, then I have to investigate the `endless-writer'. <dadinn>are you using an input-output port? <dadinn>you should be able to both read and write to it <Zelphir>I am using (pipe) to create a pair of corresponding ports. See further up in the code, in the `match-let'. <dadinn>sorry, I meant (popen:open-pipe* OPEN_BOTH) or something like that <Zelphir>(Ultimately this is just getting more familiar with concurrently reading and writing, so that I can output shell command outputs while shell commands are running, trying to implement a "guile shell", wherein I use things like `(cd "some/dir")' and so on. But it is all very early and might end up being just another learning project.) <Zelphir>I will take a look at `(popen:open-pipe* OPEN_BOTH)'. <unmatched-paren>is it possible to disable the "non-constant format string" warning for a single usage of format? <Arsen>guile-lib appears to not support multiple guile versions simultaneously too well <Arsen>what is the intended way to do something like that? <Zelphir>dadinn: I think open-pipe(*) is only for shell commands. I intended to use input and output ports for functions, which shall be equivalents to some shell commands. For example `pwd' would be `(pwd)' function. I already have a fallback for using shell commands, but intended to implement relevant things like current working directory or pipes `|' or input and output redirections for those functions in Guile. Ultimately hopefully achieving a more <Zelphir>readable syntax and more composable shell. <Arsen>root@stable ~ # guile-3.0 -c '(display (%site-dir)) (newline)' <Arsen>installing into this location (and the analogous site-ccache) seems sane, and is what I've been doing for other packages, but this one also has a pkg-config file and does not actually use this site-dir <dadinn>I would assume you can nest these to achieve what you want <Zelphir>Still find it surprising that the code I wrote does not output anything and might have a mistake in my endless writer. <old>Is it possible to parameterize a module? <old>For example, I want to use module M. That module uses an external shared library. The path of that library is defined a configuration time. <old>so something like: module.scm.in as a (define libray "@LIB@") <old>But would it be possible to do something like #:use-module ((module) #:parameterize (library "my-library.so")))? <old>would that even make sens for all of the phases? e.g, expand, load, eval <old>(is-a? #(1) <array>) => #f