IRC channel logs

2023-04-05.log

back to list of logs

<old>dsmith: hmm same behavior with execve
<old>looks like the kernel force argc > 1
<old>>= *
<old>hm look at one of the comment in the lwn article
<old> POSIX says that argv == NULL isn't allowed:
<old> Probably the confusion is for a simple reason. The two things are more or less the same. If the execve() function is called with argv == NULL, the kernel actually constructs a NULL-terminated array argv with argv[0] == NULL and calls main(argv,0). Thus for the called application, these two things are indistinguishable.
<daviid>dsmith: hello! any news on getting your hands on g-golf (and cairo ...)?
<daviid>*the patched guile-cairo ...
<rlb>haugh: due to some weirdness in erc notifications, I never saw dsmith's earlier mention wrt your clojure question. Not sure whether I'll be able to help, but did you still have questions there?
<haugh>rlb, gosh that was a while ago. IIRC my question was about how people accustomed to clojure's data-oriented API design adapt to guile and its lack of dict-y literals. set-fields solves almost all my issues, though. I think you were mentioned as a sort of clojure ambassador :)
<rlb>Hah, well I do mess with clojure a good bit, but don't know where that leaves me.
<rlb>How does set-fields help?
<rlb>ACTION is curious
<rlb>And if you need a clojure-ish vector or other persistent data structures, there are some potential options -- e.g. lokke relies on a(n adjusted) version of wingo's "fash" code, for hash-maps, and a hand-rolled (C) implementation of clojure's persistent vectors...
<rlb>i.e. https://github.com/lokke-org/lokke/blob/main/mod/lokke/fash.scm (which is then wrapped up for the clojure side)
<rlb>fwiw, there are some fixes in there that might make it preferable to the upstream version wingo pasted a while back (and upon which it's based).
<rlb>The vector implementation is here, but that'd be harder to use (being a C extension) -- happy to help if it's useful, though: https://github.com/lokke-org/lokke/blob/main/lib/lokke-vector.c
<rlb>Note that fash doesn't (unfortunately) yet have a "dissoc".
<rlb>lokke cheats (just tombstones keys), but someday I'll need to fix it.
<rlb>(also here at the moment: https://git.sr.ht/~rlb/lokke fwiw)
<rlb>There's also I think a C++ implementation of a bunch of persistent stuff someone suggested -- I'll have to go remember the name...
<rlb>Oh, right: https://github.com/arximboldi/immer I think they also said that they'd been experimenting with some guile integrations.
<haugh>rlb, Prior to learning the GNU extensions to SRFI-9, I was getting frustrated with managing and converting between many different record types, something I have to do a lot. I'm not very familiar with Clojure, but I understand the general API paradigm of replacing objects with nested data structures, and I was looking for advice from people who'd moved from that paradigm into Guile's symbolic approach to data. set-fields is the game-changer for me
<haugh>because it combines lists of getters, which is easier to wrap in new syntax than the recursive application of setters. It's a subtle difference that adds up.
<rlb>Ahh.
<haugh>rlb, Very interesting datatypes. I haven't got to fashes yet but I've bookmarked your modifications alongside them in my plan. The idea of functional vectors is very appealing to me at this point.
<haugh>I'm encouraged to see that fashes are just matching records under the hood :)
<rlb>iirc wingo may also have a fector (vector) type, but I'm not (currently) using it -- found out about it after I implemented the clj-style vectors (from the articles) in C :)
<rlb>i.e. via https://hypirion.com/musings/understanding-persistent-vector-pt-1
<rlb>(at least if I got it right)
<haugh>HA, yes. I'm working on predicate combinators at the moment and I just noticed Racket's implementation solves a lot of my issues. That's what we get for skipping research :)
<old>mwette: jtd is awesome!
<old>I think it would be possible to use guile-ncurse to have the REPL on bottom and listing around current IP in a top frame
<old>like in GDB
<dokma>Is this equivalent?
<dokma>SCM arguments = SCM_EOL;
<dokma>scm_c_define("arguments", arguments);
<dokma>to this:
<dokma>SCM arguments = scm_c_eval_string("(define arguments '()) 'arguments");
<mwette>old: ty
<mwette>Is clojure scoping lexical or dynamic?
<old>is anyone maintaining guile-tap ?
<old>repo has been untouched for 2 years
<old>also wondering if it would be possible to couple srfi-64 and TAP
<rlb>mwette: lexical, though you an also define dynamic-vars which are fluid-ish, per-thread, dynamic-scope (with limited "conveyance" of the bindings across certain concurrency-related operations).
<rlb>(fwiw: https://clojure.org/reference/vars#conveyance)
<_graywolf>Is it possible to have a parameter with a convertor, that is initially set to an invalid/unset value? It does not seem to be the case, but just checking if I missed something.
<mirai>are these surrounding # characters expected?
<mirai>(format #t "Expected: ~a, ~a; Unexpected: ~a;~%" 'foo '-foo '1-foo)
<mirai>Expected: foo, -foo; Unexpected: #{1-foo}#;
<mwette>rlb: ty
<mwette>di
<Arsen>does guile do srfi-110 (sweet/t-expressions)? is there any plan to?
<cow_2001>now this https://yuvallangerontheroad.codeberg.page/mirror-sarabander-sicp/html/3_002e2.xhtml
<old>cow_2001: that's a cool texinfo you have there
<yuna>me?
<cow_2001>i've mirrored it from sarabander's github repository
<cow_2001>:|
<haugh>Arsen: we have curly-infix from SRFI-105: https://www.gnu.org/software/guile/manual/html_node/SRFI_002d105.html
<Arsen>ah, fun!
<Arsen>thanks
<haugh>Arsen, see also: https://hg.sr.ht/~arnebab/wisp
<Arsen>oo, sweet
<cow_2001>would you put me in scheme jail if i used '( blah ) as multiline comments?
<mwette>yes: why not use #| .... |#