IRC channel logs
2014-07-19.log
back to list of logs
<dje42>Is there a canonical way to silence "possibly unused top-level variable" warnings from the compiler? <dje42>I have a function that is called from C which the compiler of course can't see. <ijp>,sneek later tell dje42 remove unbound-variable from the #:warnings option in %auto-compilation-options <nalaginrut>is there a given way to check if hash-table is empty? <ijp>there is no procedure provided for that <davexunit>guile's native hash table implementation leaves much to be desired. <ijp>you can use things like hash-fold to implement it, but it feels wasteful <ijp>davexunit: I just always use srfi 69 or r6rs hashtables <ijp>well, unless I want weak tables <davexunit>yeah, that is a better implementation, but slower I guess. <ijp>an extra indirection for 69, two for r6rs <davexunit>it would be nice to unify things, but I don't know how difficult it would be or how much API breakage there would be. <davexunit>what drives me crazy about guile's implementation is that the hashing procedure can't be provided in the constructor <davexunit>so we end up having like 3 versions of each type of operation in order to suppport a couple built-in hashing procedures and custom ones. <ijp>as far as I know, the original api was because you were able to use vectors as hashtables <ijp>we got rid of that behaviour, I think <davexunit>yeah, I can just srfi-69, but I just don't like having 3 different implementations of hash tables hanging around. when I search the documentation for procedures I have to be careful to check which implementation I'm looking at. <nalaginrut>I always use the native one, so far so good, because I write another abstraction in my code, so it's easy to port, in principle <nalaginrut>I prefer performance rather than portable, so I think less on portable <nalaginrut>There's an ancient Chinese proverb: In the world of Kungfu, speed defines the winner. <ijp>there's a proverb for everything <ijp>e.g. slow and steady wins the race <nalaginrut>it depends on what you believe, not how many proverbs