IRC channel logs


back to list of logs

<stis>Hello guilers!
<sneek>Welcome back dsmith!!
<dsmith>sneek, botsnack
<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>Not an emacs user
<haugh>alternatively if there's a decent standalone formatter, that would save me a lot of time
<flatwhatson>become an emacs user :)
<flatwhatson>haugh: here's what emacs does for scheme indentation:
<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"
<haugh>thank you both
<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>sneek: guile-software?
<sneek>Its been said that guile-software is
<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>
<dsmith>sneek, forget guile-software
<sneek>Consider it forgotten.
<dsmith>sneek, guile-software is Send an email to tantalum, <sph at posteo dot eu> to make changes or post a new project.
<dsmith>sneek, guile-software?
<sneek>I've heard guile-software is Send an email to tantalum, <sph at posteo dot eu> to make changes or post a new project.
<daviid>dsmith: great, thanks!
<dsmith>daviid, Looks good?
<daviid>perfect tx
<old>what's guile-openai
<old>I've just started The Little Learner today
<daviid>old: and
<old>oh okay it's an API stuff with OpenAI stuff
<old>that cool
<old>can we have ChatGPT as a bot here?
<old>Although I would prefer to keep sneek
<dadinn>hi all
<Zelphir>Hi dadinn
<dadinn>I've discussed with mnieper a few months ago some problems I've run into with (ice-9 expect)
<sneek>wb dsmith :D
<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: Can anyone tell me what I am doing wrong?
<dadinn>Zelphir: Do you get some error?
<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> "Some stuff here..."
<dadinn> (lambda (in)
<Zelphir>Oh I will try that.
<dadinn>sorry, seems to have dropped off
<dadinn>Zelphir: your code seems to be working for me:
<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
<Zelphir>dadinn: Here is what I have so far. Next step is supposed to be reading output of functions/commands while they are running, instead of only being able to see anyting, when a function/command has finished, because then the function/command returns.
<dadinn>Zelphir: with-input-from-port and with-output-to-port are possibly the ones you are looking for:
<dadinn>I would assume you can nest these to achieve what you want
<Zelphir>I'll look at that, thanks!
<Zelphir>Still find it surprising that the code I wrote does not output anything and might have a mistake in my endless writer.
<dsmith>sneek, botsnack
<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: as a (define libray "@LIB@")
<old>But would it be possible to do something like #:use-module ((module) #:parameterize (library "")))?
<old>would that even make sens for all of the phases? e.g, expand, load, eval
<old>(array? #(1)) => #t
<old>(is-a? #(1) <array>) => #f
<old>is that intended?