<rotty>weinholt: thanks. I wondered about that; seems like an issue that one would stumble upon quite soon, if you did any system-level stuff using Guile's R6RS support <rotty>s/wondered about that/wondered about that too/ <dftxbs3e>hi, how can I construct a list and conditionally have, or not, an element in that list? <dftxbs3e>I'm a Scheme noob sorry. (cons (fun "thing") (fun "thing2")) - I'd like thing2 to only be in the list on some condition <dftxbs3e>chrislck, could you share an example? I have no idea how I'd use it for this here <chrislck>plus, you're not constructing a list by using cons... you're constructing a pair <dftxbs3e>okay, I really know nothing about Scheme. <chrislck>make sure to read every word in every page :) <rlb>So <applicable-struct>s #:procedure isn't passed the instance? Assuming I'm thinking straight, for persistent types, it might much more useful if it were? And if so, I'm wondering if we might be able to fix it somehow, maybe an alternate slot name that does, or... <rlb>hmm, actually I suppose it might depend on how it's implemented... ***jr0 is now known as Guest20845
<mwette>also `(a ,(if cond '(b) '()) c) => (a c) OR (a b c) <mwette>uh, that is, `(a ,@(if cond '(b) '()) c) => (a c) OR (a b c) <RhodiumToad>rlb: easy enough to use a closure that calls a method <chrislck>does anyone know how exactly to import/load srfi-180 json work-in-progress? <civodul>today it's been 9 years since Guile 2.0 ***jr0 is now known as Guest33885
<rlb>RhodiumToad: sure, but I was (possibly incorrectly) assuming that capturing a new closure on every operation might be a lot more expensive than having one lambda that is just called with the instance being "applied" every time. <rlb>(found another bug in pfds) <rlb>(Doesn't handle more than two collisions at a given site correctly in some cases.) <rlb>I'm wondering what might be the better choice these days to implement a very efficient parser for a reasonably simple (sexp based) language like edn? https://github.com/edn-format/edn Is the peg parser fairly fast, or would recursive C likely still be better, or flex/bison, or...? I don't mind maintaining a C implementation, but of course all else equal, scheme would be better. <rlb>mwette: this fixes it in scm_raw_ihash: <rlb> case scm_tc7_symbol: <rlb> return scm_i_symbol_hash (obj); <rlb>+ case scm_tc7_keyword: <rlb>+ return scm_i_keyword_hash (obj); <stis>yeah, Happy Birthday guile! <rlb>oh, and of course in keywords.h: #define SCM_I_KEYWORD_HASH(x) scm_i_symbol_hash (SCM_CELL_OBJECT_1 (x)) <rlb>Guess we just overlooked keywords there. <rlb>Oops, and of course that should be an uppercase call. <civodul>rlb: good catch! (the lack of proper keyword hashing)