IRC channel logs
2023-05-09.log
back to list of logs
<RhodiumToad>huh. the posix module wimps out on providing the sigset_t functions <lloda>daviid: assoc assq assv are already in r5rs so <lloda>i think having multiple versions might be even more confusing than the lack of consistency :-\ <RhodiumToad>I think the only real answer is pick the one you like best and stick with it <apteryx>is there something in Guile to check if a string is an IPv4 or IPv6 value? <civodul>apteryx: you can use inet-pton as a heuristic <civodul>see (gnu services base) as an example <ArneBab>daviid: nowadays I prefer having both key alist and alist key: one is more useful for looking into an ad-hoc datastructure, the other for looking into a datastructure in a variable (assoc key (iota 5)) vs. (list-ref my-numbers (+ i 3)). <ArneBab>And I wish tutorials would teach that :-) <daviid>lloda: you wrote ' i wish this could be fixed somehow. Move the old functions to a module, make a new module with fixed defs' - so i wrote the module of your wish :) - i don't use those personally <apteryx>what does ->bool do? it doesn't appear to be documented <apteryx>and search engines are utterly useless <apteryx>and where are things such as AF_INET6 defined? they seem to be unbound in my REPL <civodul>->bool returns a Boolean from the given value <apteryx>interesting; I'd have intuitively thought (boolean x) should have done that <apteryx>should (ipv6-address? "2607:5300:60:6b0::c05f:543") return #t? it returns #f <apteryx>I had a 'strip-port/maybe' pre-processing filter that is not safe with IPv6 <RhodiumToad>the list of canonicalization rules for printing ipv6 addresses is surprisingly long <RhodiumToad>ACTION tends to do his own input/output code for ip addresses, because of the sheer horrors perpetrated by inet_aton <apteryx>we do not have a guile-wireguard module yet, do we? <gnucode>are there any "modern" projects that are written in prescheme? <mirai>apteryx: I'm right now working exactly on that <mirai>apteryx: are these endpoints always in IP:PORT form? <mirai>the port will need to be validated with a (<= 0 (string->number x) 65535) as well <mirai>ideally these kinds of “useful” general purpose predicates would go into a (gnu services configuration utils) module for reusability <apteryx>or in Guile ;-) I'm sure Python has those. <apteryx>mirai: these are wireguard peer endpoints, they can be either host names or IPs (ipv4 or ipv6) and can have a :port suffix