IRC channel logs

2024-07-22.log

back to list of logs

<lh>why does the manual suggest including -s in script shebangs? scripts seem to work fine without
<dckc>hm. dunno. if you find out, please do share
<lh>well, the kernel makes the filename with the shebang the last arg to the interpreter, so shebangs without -s work for the same reason that ‘guile foo.scm’ works https://git.savannah.gnu.org/cgit/guile.git/tree/module/ice-9/command-line.scm?h=15a656a77af42dd8e1b55a83b76e9069eb4dc1d6#n222
<lh>I guess it’s just included in shebang examples on the off chance that people find a way to execute a file with a leading dash. I wasn’t able to do that even with PATH=.:$PATH; -foo.scm, the kernel seems to have turned it into ./-foo.scm
<freakingpenguin>Hi all. Is it possible to construct strings that don't use \ as an escape char? Alternatively, is it possible to use write without wrapping the output in quotes?
<freakingpenguin>Basically I have a bunch of latex snippets stored in variables I need to pass to a program over stdin.
<freakingpenguin>The program expects unescaped \ constructs, so I currently use (display var) which requires double-escaping the \ in the string.
<freakingpenguin>The logic for "send string to program" is repeated elsewhere with other languages where the behavior of (display var) is preferred.
<ArneBab>freakingpenguin: you can quote it as symbols: (string-join (map symbol->string '(abc\de \abc \\\x)) " ")
<ArneBab>(but that has issues with parentheses)
<mwette>freakingpenguin: not sure of the context, but `display' does not escape stuff
<freakingpenguin>I'm finding I can either create tex strings as e.g. "\\frac{1}{2}" and use display to write \frac{1}{2} to a port, or "\frac{1}{2}" and use write, which writes "\frac{1}{2}" including quotes.
<freakingpenguin>Apologies for the long link, but here's a (wip) example of the use case: https://git.sr.ht/~freakingpenguin/guile-blocks/tree/d3bfde50ad040226339da1edae2a074f71e91d41/item/tests/language-latexml.scm
<mwette>Ah. You want raw strings. checking ...
<mwette>try this, I think it does does what you want, thought I didn't intend it to: https://github.com/mwette/guile-contrib/blob/main/hereis.scm
<mwette>You use #""" \\frac{1}{2} "hello world" bla bla """
<mwette>s/\\/\/
<freakingpenguin>mwette: Looks interesting, thanks. I'll give it a try. Also thanks ArneBab!
<mwette>OK. and it looks like hereis strings are intended to be raw
<haugh>Okay so I need to export the binding of this syntax parameter, so I'd like to support renaming this binding. However, I currently depend on literally referencing the name. For a simple example, the syntax-error that the syntax-parameter defaults to should use the user's name for the parameter, no? Is there any way to access this information from inside the module or do I need to
<haugh>export some module manipulation hacks?
<freakingpenguin>Is there a way to remove an xmlns namespace when doing xml->sxml? #:namespaces supports aliasing it but I want to remove it entirely.
<tohoyn>daviid: is file examples/adw-1/demo/adw-demo-window.scm in g-golf copyrighted to Purism for years 2017-2022?
<sneek>tohoyn, you have 1 message!
<sneek>tohoyn, daviid says: i have restructured the (g-golf) adw1-demo, and i just pushed those changes, on the devel branch, commit 4793e6ec4404e419347a4140da1c863c4dcad896 - this might give you some extra work to prepare the debian g-golf-adw-1-examples package, sorry about that, but those changes are 'for the better' ... let me know if you need any clarification and/or help - fwiw, i shall release g-golf 0.8.0-rc.5 anytime soon
<tohoyn>daviid: or is it just artificial information to fill the about dialog?
<dsmith> /query daviid
<dsmith>!uptime
<sneek>I've been serving for 7 years
<sneek>This system has been up 18 weeks, 6 days, 18 minutes
<dsmith>!uptime
<sneek>I've been aware for 7 years
<sneek>This system has been up 1 minute
<dsmith>!!
<dsmith>!uptime
<sneek>I've been aware for 16 seconds
<sneek>This system has been up 2 minutes
<dsmith>better
<dsmith>sneek, botsnack
<sneek>:)
<cow_2001>i do not understand :| http://0x0.st/Xp1C.NCAz2x3l
<mwette>cow_2001: maybe `(a . ,b) or `(a b ...)
<mwette>s/ b/ ,b/
<cow_2001>mwette: okay, it worked. i need to remember it's not ,@blah but ,blah ...
<RavenJoad>I know haunt supports redirects with the redirect builder, but why can't it redirect files (FROM side of the spec) which do not exist?