IRC channel logs
2014-05-09.log
back to list of logs
<jmd>At what size does an alist become untenable? <taylanub>how often will you do look-ups from this alist, how often will you insert new values, does your application need to be fast at all, or about how much? <taylanub>I'd say, write your code in the simplest/cleanest way first, care about optimization later. Maybe provide an abstracted mechanism to do lookups and insertions to some "dictionary" of yours, which you can then change to use different types of dictionaries (alist, hash-table) easily <jmd>I need to populate an alist in a recursive procedure. It gets a bit hairy. Is there an easier way? <taylanub>I don't see the difference between populating an alist from a recursive procedure and populating it from any other procedure... <jmd>Its just a case of how to terminate the recursion <jmd>What is the clean way to set the exit status from guile? <jmd>nalaginrut: makes sense <nalaginrut>jmd: the original posix one is primitive-exit, I think <nalaginrut>I have no plan for Python, but I'd like to see it ;=) <jmd>I need to convert a string containing a hexidecimal representation of an int (eg 0xABDE) into a number. Is there a function that will do that for me? <taylanub>it works on #x..., simply replacing the 0 to # comes to mind but that might be a bad solution <jmd>ok. I'll strip off the 0x then. *nalaginrut lost his smart phone...he feel terrible... <daviid>hello guilers, happy friday all indeed! <daviid>within a given module [not an executable script], shouldn't all dynamic-call be encaps in (eval-when (compile load eval) ...) ? <dsmith-work>daviid: Only if you need to evaluate it when compiling, loading, ... <dsmith-work>daviid: I've found you need to wrap calls to load-extension <dsmith-work>In that case, you probably DO need to evaluate it when compiling, loading, ... <daviid>dsmith-work: thanks, I'll send a patch, there are 4 calls in that gtype.scm file which needs to... <daviid>it can't be armful to surround these by an eval-when anyway, I realize it is more not to trigger warning at compile time <daviid>1) why did it not trigger a warning for the first call to scm_list_ref? 2) how to avoid these warnings and/or anything wrong whith these calls? *taylanub wonders what the difference between load and eval are, re. eval-when <taylanub>(i.e. 'expand & eval' parallel 'compile & load', the former for uncompiled code, the latter for compiled) <dsmith-work>Yeah, I wish the docs on that had a little more explanation. <taylanub>I'm reading the 2.1 manual, it seems pretty clear to me. Except on why it recommends (expand load eval), excluding compile from the list ... <taylanub>oh sorry, expand is not related to whether the code is or isn't compiled <daviid>is this not a bug in libguile/list.c[h] ? <daviid>impossible for me to understand the compiler does not raise a warning for the first call: ret.xx = scm_to_double (scm_list_ref (scm, 0)); ? <daviid>I can see scm_list_ref expects the following 2 args: (SCM list, SCM k) <daviid>then it calls i = scm_to_ulong (k); <dsmith-work>daviid: Only calls that need to be made in the specified condiftions. <daviid>dsmith-work: and no eval-when is equal to (eval-when (load eval) ...) right? <daviid>because if not, they should be surrounded by... not a big deal thought, these days almost nobody uses eval I guess