IRC channel logs
2024-05-11.log
back to list of logs
<daviid>lilyp: if possible, remove anything that makes the page obsolate, like do not specify the latest G-Golf version, or any other thing that makes the page obsolate 'on releases' .. thanbks <daviid>lilyp: while at suggesting .. please if possible re-sue the desription that is on the g-golf website, just grab that html code 'as is', including the highlighted code example ... thanks! <daviid>lilyp: i'd remove (entirely) the scheme 'intro', just keep Gnu Guile, and i'd remove the guile-gi entry - my 2c <daviid>lilyp: fwiw, as their page 'title' is scheme, i'd even not use GNU Guile as 'our' subtitle, but GNU G-Golf ... the language binding name should be the "Docs Language Bindings Scheme" very first title, not Guile, which is in the name and in the description ... <daviid>lilyp: i wish i'd have a account and handle this myself, but the GNOME projects only accepts gaagle/git accounts ..., on my dead body (and they do not offer any way to create an account 'by themselves') <Kolev>daviid: By Git accounts, do you mean GitHub? <Kolev>There's nothing wrong with self-hosted GitLab, or other forges. <daviid>their self hosted gitlab instance is fine, but to propose a change 'there', like GNU G-Golf as the(a) "Docs Language Bindings Scheme" entry, you need an account with (giveup on)github or gaagle ... on my dead body <Kolev>daviid: Oh, you can't make a regular account on their GitLab? That's lame. <ano>why (system* ...) is noticeable slower than (system ...)? <Kolev>That's a shame. I prefer system*. <ano>shame? how's that even possible (system* "echo" "foo") takes 1sec while (system "echo foo") executed immediately? even cannot remember so slower proglang/stdlib tbh <Kolev>ano: Guix seems to prefer separate strings for args, for some reason. <wolfdog>oh wow I just did `(system* "echo" "hi")` on my machine and it froze the REPL :S <Kolev>I don't like how the ` symbol is part of Scheme, so `(foo)` is ambiguous. <ano>Kolev: that's always the correct/sane way to pass args (separately) <ano>wolfdog: so 4.2ghz x 8 cores 3 years old cpu + guile -O3 lto build on gentoo isn't enough to exec (system* "echo" "foo") immediately? <ano>is there a way to profile/debug or something? <Kolev>ano: So system* is superior, were it not for the performance hit. <ano>is there a way to set SHELL called by (system ...)? <old>ano: Look at man page system(3) <old>The system() library function behaves as if it used fork(2) to create a child process that executed the shell command specified in command using execl(3) as follows: <old>execl("/bin/sh", "sh", "-c", command, (char *) NULL); <old>so short answer, no. It uses wathever the system shell /bin/sh is <lilyp>daviid: I'm using Gitlab SSO, not as great as can be, ik, but with gnome you already have to make a deal with gitlab anyway ._. <lilyp>I'll look into your list of improvements <lilyp>daviid would you have the infra to host a GI-themed doc as part of G-Golf? That'd make things easier imho <rlb>ano: there's no reason that should be slow (it's not here). <rlb>guile -c '(system* "echo" "foo")' here takes about 2 hundredths of a second (real), so I'd suspect some local issue. <ano>ugh nvm, local != locale, need some sleep <rlb>atm I have en_US.utf8 <rlb>Though that shouldn't matter... <ano>is there a shortest way to write (list (cons KEY VALUE)) ? <ano>where KEY/VALUE are vars <rlb>...If you mean by character count, perhaps `((,KEY . ,VALUE))? <ano>yep, not sure if easy readable tbh <lilyp>(define-syntax-rule (conses (a b) ...) (list (cons a b) ...))? <lilyp>daviid: is the hello world still correct? peg-solitaire is nice and all, but we ought to have a complete example imho <daviid>lilyp: thanks - the title should be GNU G-Golf, not Guile(through G-Golf), Guile is not a GI lang binding ... and is mentionned in the description 'anyway' ... <daviid>i am not interested to poste a 'omplete example' there, just a snipset ... examples are complete in the distro, and all listed with screensot and link to the source on the web site ... <daviid>the important thing is tohave a 'presence', that never goes obsolete, and points to the g-gofl and guile wb site <daviid>ideally, all occurrences of the words G-Golf and Guile would link to their respective web site, then we are 'all covdred' ... <daviid>lilyp: wrt your last commet 'As per request, I further reduced the documentation to only cover G-Golf. This is not to judge Guile-GI, but it appears to be stuck atm.', feel free to still add a second entry, the title of which would be Guile-GI and the desription as you prefer ... the important thing is to have one entry per GI lang binding, then others may add their prefered scheme GI lang binding entry later ... my 2c <ArneBab_>ano: srfi-1 (alist-cons KEY VALUE '()) is closest in readability for me (less structure overhead and it’s re-usable for extending. <euouae>Hello how do you setup a different guile binary and include path for modules? <euouae>what I've done (and it works) is to write this script: <https://termbin.com/x914> which is under guile-hoot/build/run, and it runs the locally built guile-HEAD <euouae>then I have a .dir-locals.el in my project directory with ((nil . ((geiser-guile-binary "~/code/git/guile-hoot/build/run.sh")))) <euouae>but more normally, I should be able to either set $PATH (or geiser-guile-binary) to the bleeding-edge guile binary and include arguments somehow -L~/path/to/include <graywolf>How can I get help for a macro? Assuming (define-macro (x) 1): ,d x leads to unknown file:21:3: source expression failed to match any pattern in form x <graywolf>,d (module-ref (current-module) 'x) does work but I wonder it there is some less verbose way <ano>why list? pair? returns #t for both '(STR) and '(STR . STR) ? <rlb>ano: pair *is* a cons, which is what lists are built from. So (1 2 . 3) is just an "improper list", i.e. a list where the last cons pair in the list doesn't have the empty list as its cdr. <rlb>Or (1 2 3) is just (cons 1 (cons 2 (cons 3 '()))), and each cons is a pair. <ano>so '(STR) is a list and pair at the same because it's (cons "STR" '()) ? <rlb>'(1 . 2) is a pair, but not a proper list. <rlb>Related: srfi-1 proper-list?. <ano>why '(STR . (STR)) is ?proper-list? (STR) doesn't look like empty list to me <ano>e.g. (cdr '(STR . (STR))) returns (STR), at the same time (?proper-list '(STR . (STR)) returns #t <rlb>Did you try evaluating that at the repl? i.e. it's just (STR STR). <rlb>...which is (cons 1 (cons 2 '())) <rlb>It's just a different way to write it using the dot (pair) reader syntax. <ano>so there is no(?) sane way to define pair of lists which isn't [proper-]list? <rlb>Any nesting of conses that ends in '() is a proper list, and so any cdr that's a list, (empty or not) is "proper". <rlb>(any cdr that's itself a proper list) <rlb>So depending on exactly what you meant -- "no", I think. <ano>what's the way to distinguish keys from values in nested alist then, if keys/values can be lists too? <rlb>The key's just whatever's the car, and the value's whatever's the cdr. <rlb>...given say (cons (cons k1 v1) (cons (cons k2 v2) ...)) <mwette> according to r7rs list? should return #f for an improper list <rlb>which is `((,k1 . ,v1) (,k2 . ,v2) ...) <ano>so alist isn't real data structure and cannot be distinguished from others? also why there is no(?) ?alist <rlb>Right, alist is just a way of using cons pairs to build an associative data structure -- a convention. <rlb>Also you probably wouldn't want to use an alist? (or list?) much if you don't have to, because they have to traverse the whole thing to answer the question. <ano>is there a *real* associative data structure that can be nested? <rlb>alists can be nested just fine? i.e. a value can be an alist? <rlb>Alists are the default associative structure, but guile also has hash tables. <rlb>(which are more appropriate for larger maps) <ano>is there a way to define nested hash table in one expression? <rlb>Perhaps via the alist->hash... functions? <rlb>And you may want to favor the srfi hash table functions if portability is important (as compared to the guile-specific ones). <dthompson>the hash table api is procedural. there isn't syntax for hash table literals like some other languages. <lilyp>daviid all the other languages have the language name first, hence why <daviid> lilyp: but i 'still' would prefer GNU G-Golf as the title ... could you do that for me please - if ebassi 'still' prefers the scheme flavor first, he'll do that as he commit ... tx <rlb>(and see the comments at the end, perhaps) <shawnw>Should be able to use that to make your own hash literals. <rlb>I can't recall the details right now, but if it's relevant, and if I recall correctly, there are currently some issues (unless this is what we want) with changes to the reader if you want to be compatible with other languages. <rlb>i.e. I think what I recall is something like "the reader doesn't reset at the end of a module" -- caused trouble when I was working on lokke, and I had to change plans. <rlb>Planned to delve a bit and bring it up for discussion, but haven't gotten back to it. <lilyp>daviid: it's not just about ebassi – I personally feel weird deviating from the style that is <tomnor>(format #f "hello" 3) gives a warning <tomnor>is that for historical reasons or is it some smartness with that? <tomnor>I mean, it seems to me it should be an error <tomnor>In the simple-format I get a printed warning but also a traceback in the repl