<daviid>need to loop from 1968 [as an example], 1+ ... till I find an available port to spawn a server, catching [ignoring] errors of all unsuccesfull attempts: any example that I could copy? ***La`Tisha is now known as Islaminati
<yc`>hi, is it possible to use a macro before it is defined? I get `Wrong type to apply #<syntax-transformer ..> error when I use a record constructor before doing `(define-record-type ...)`, for now I put all record definition at top but I like to split them into different modules... <ijp>I think the answer is "it depends" <ijp>it should be fine most of the time <yc`>well, it doesn't appear to work for me, using modules is little frustrating when I still have to think about code evaluation order. <yc`>maybe I should stop having modules including each other <ijp>a literal include, or use-modules? <ijp>yc`: are these modules mutually recursive? <ijp>e.g. (define-module (foo) #:use-module (bar)) (define-module (bar) #:use-module (foo)) <yc`>ya, I suppose that is a bad thing to do? <ijp>yc`: it can be problematic <yc`>ijp: it mostly works, although I get some warnings about missing definition but thye get defined later on, but macro just doesn't work. <ijp>well, it may be to do with imports being processed before exports (which is a known issue whose fix hasn't been applied) <ijp>but without an example I can't be more specific <ijp>I think civodul's exports patches would allow this, but yes <nalaginrut>I think Guile will support this, but I still refactored some modules of Artanis to eliminate such bad reference dependency <nalaginrut>or it's hard to read the code and reason about the architecture <ijp>nalaginrut: like I say, the patch is there, it just never got applied <nalaginrut>people maybe confused with the current error msg <nalaginrut>sometimes I could write wrong import module which may cause the same problem <nalaginrut>and the error msg doesn't provide useful info for me to find out problem <nalaginrut>it's better to have some status on r7rs branch ;-) <janneke>would it be nice to have catch accept a list of keys? <janneke>ie, something to go between symbol and #t? <janneke>i was trying to read the code in boot-9 but don't understand it yet <wingo>janneke: yes i guess that would be nice <wingo>or in general, the ability to discriminate more on whether a handler actually handles the exception... <lloda>hello, can I use match-lambda for a function taking > 1 args? <lloda>say (map (match-lambda* (((a b) c) ...)) '((a b) (a b) ...) '(c c ...)) instead of (map (match-lambda (((a b) c) ...)) '(((a b) c) ((a b) c) ...)) <wingo>lloda: yes, it's even spelled match-lambda* :) <wingo>on my side i never remember which is which <wingo>i guess the * should make me think of bnf grammars <civodul>damn, i didn't know about match-lambda* <lloda>it seems typical to add * to alternates, however they differ <lloda>maybe one can intern the shared-array root and return the (with-shape ) array? but it probably doesn't work like that. <wingo>do you think it is correct to error on those arrays? <lloda>i've fumbled a bit with the recurs and make-non-immediates :( <wingo>do i understand correctly that this is the case of a non-contiguous literal array <wingo>or just a literal array with different bounds? <lloda>literal arrays are always contiguous <lloda>just a literal array (with different bounds, but it doesn't work now either way) <lloda>#2() -> don't know how to intern error <lloda>actually I would very much like to deprecate lower bound != 0, will write to the list about that (not much hope, but...) <lloda>if you don't have the time, I could use a clue. `(make-non-immediate ? ,(with-shape (recur (shared-array-root obj)) (array-shape obj))) ?? does one have to place the shared somewhere with static-??? -> i'm pretty lost down there <wingo>sorry, ploughing through 2K work mails at the same time :P <wingo>so asm-constants is a vhash mapping object -> label <wingo>the label represents the point in the image corresponding to the object <wingo>that space in the image -- that allocated memory -- may need some fix-up when the image is loaded <wingo>for example if it references other objects in the image <wingo>so there is a list of "inits" held by the assembler <wingo>which is a list of VM instructions needed to initialize the objects <wingo>it is built in reverse order, so the last instruction in the list will be executed first <wingo>in that way all the sub-objects of an object are already initialized when the object itself comes to be initialized <wingo>the first cell has the tag and some flags, the second cell is a pointer to a scm_i_t_array it seems <wingo>(seems a needless indirection to me; they could be allocated together) <wingo>and i guess they can be allocated together <lloda>i think it's both, the pointer is to right after (not sure now) <lloda>so one has to build the scm_i_t_array by hand here? <wingo>so the words are like tag+flags, pointer-to-word-2, vector, base, dim 0, dim 1, ... <wingo>so first you recurse to build the backing store, and you have a label for the backing store <lloda>(recur shared-array-root obj)? <wingo>then you do the same for the dimensions (which are pairs, no?) <lloda>(recur (shared-array-root obj))? <lloda>the array-shape is a list of (lower-bound upper-bound) lists <wingo>yeah but in memory is it a list? <wingo>i think in memory it's just an array <wingo>yeah, then dim 0, dim 1 etc are three ssize_t values <wingo>which really should be uintptr_t... <lloda>isn't intptr_t 32 bits? but the sizes could be larger <wingo>intptr_t is as big as your pointers are wide <wingo>ok i think the ssize_t thing is fine <wingo>that gets written out in a second phase <wingo>there you see how we initialize the 4 words in the string <wingo>one of the words points to a sub-object (the stringbuf) <wingo>there we just write a zero, and know that it will be fixed up at runtime <wingo>otherwise we write the words as they will be in memory <wingo>so there you will have to add a case for arrays -- to recreate the memory structure of an array <wingo>and for the word that points to the vector you just write a zero <wingo>you'll also have to add a case to byte-length (around line 1252) <lloda>thanks a lot, that should help me finally do it. ***aburgess_ is now known as aburgess
<Islaminati>dsmith-work, I believe in the systemic punishment of subroutines-as-parameters. <Islaminati>There should be a constitutional principle to forbid it. ***Islaminati is now known as keem
<dsmith-work>Heya stis. I just saw something about prolog and was reminded of you.. <davexunit>pretty neat presentation: "Organizing Functional Code for Parallel Execution; or, foldl and foldr Considered Slightly Harmful" by Guy L. Steele - http://vimeo.com/6624203