<mark_weaver>Jookia: fwiw, Guile supports SRFI-105 (curly infix) syntax <rain1>it breaks the uniformity of having everything prefix <rain1>btw I think it's ok to close the gensym bug since it's all documented and people don't seem to mind the issue [and guile/guix works despite it] <rain1>I started to write a reply but it got long and I don't the issue is so serious <mark_weaver>okay. fwiw, it does bother me somewhat, and if I thought a fully satisfactory solution was possible, I would do it. <rain1>I looked into where gensym is used in guile, very very rarely <rain1>it's used in the assembler (gensym "constant") <rain1>I tried to break it by making a file wit constant<n> for n=1 to 1000 but it didn't have any problem <mark_weaver>yeah, the thing is, in many cases, the same symbol can be used in two different contexts where they will never be compared with equality anyway <rain1>mostly I think it's not a problem because gensyms that are created are put into their own little 'space', and aren't compared against other symbols from other placse <rain1>yep exactly what I was thinking ***wleslie is now known as verte
***verte is now known as wleslie
<rekado>can Guile's compiler make use of type hints? I have some Common Lisp code with "declare" statements for type declarations and I want to port this to Guile. <civodul>you could (define-syntax-rule (declare stuff ...) #t) <df_>hello, I have induced a segfault in the latest guile built from git <jmarciano>df_: I have tried with Guile from Guix package, and no segfault. <df_>yes, it doesn't happen with 2.0 <df_>hmm, my guix has 2.0.11, maybe it's out of date <df_>that sha1 sum matches my git checkout... <df_>just building from that archive <df_>yes, this machine is rather fast but unfortunately rather non-libre as a result :( <rain1>maybe a couple hours? i didn't time it <df_>I have a couple of libreboot laptops, they just take a lot longer to compile guile on :) <df_>I think the x200 and t400 are equivalent <jmarciano>df_: compiles, tested as ./meta/guile from build directory, no problems, no segfault <df_>guess I'll have a poke around in gdb <jmarciano>when guile is compiled, can that compiled file be used on other machine without guile? Like standalone? <df_>the .go file? no, it's bytecode for the guile vm <df_>I assume there's some way to bundle the whole lot into a binary together though <jmarciano>This is how I read single line from pipe: (display (read-line (current-input-port))) <jmarciano>how do I read multiple lines? like cat text | guile.scm <rain1>jmarciano, where is read-line from? <rain1>i mean which shceme module must I import? <amz3>jmarciano: try the following <amz3>(use-modules (ice-9 rdelim)) <amz3>(pk (read-string (current-input-port))) <rain1>ERROR: no code for module (readline) <jmarciano>I don't know if readline is for reading from pipe <jmarciano>rain1: this is like lambda, only with defines, right? <rain1>using recursion as a loop to read more and more lines <jmarciano>line becomes one line... I see that. if checks for eof. <jmarciano>cons make a new pair with line first, (read-lines) or new line second. <jmarciano>I guess I am wrong with ^ above last sentence, am I? <jmarciano>when I change '() to '"" I get basically same result, but is it same? <rain1>or a single string: all lines <jmarciano>if string, then I would not be using cons probably, rather <jmarciano>I am simply not yet used with all procedures, need to learn them <rain1>instead of cons/'() it would be string-append/"" <amz3>jmarciano: have you tried the code i pasted? <amz3>(use-modules (ice-9 rdelim)) <amz3>(pk (read-string (current-input-port))) <jmarciano>for reason that I did not understand pk, I overviewed it <amz3>pk is 'peek stuff' just there for debug purpose <jmarciano>but info guile, does not give me definition of pk <amz3>replace it with display or something <amz3>pk display and return it argument <amz3>when there is a single argument <jmarciano>basically I don't need pk, it is for debugging <amz3>otherwise it display all arguments and return the last <jmarciano>but it did work with (define inputfile (pk ... <jmarciano>that is input pipe, now I have to write string and feed to program <jmarciano>is there way in emacs to get TAB expansion of commands for guile? <jmarciano>I use it, only I dont know how to get TAB expand <df_>hmm, er, it just works for me I think <df_>you have a running guile repl? <df_>oh, there's a separate package called ac-geiser for autocomplete support <df_>or alternatively company apparently supports it if you prefer that: <davexunit>and there's another way to expand inside a scheme buffer <davexunit>and inspecting the key bindings in your scheme buffer <jmarciano>it is self-documenting, but does not know what I think <davexunit>anyway my point is that the emacs or the geiser manual will tell you what you want to know <wingo>paroneayea: i rebased the ethreads branch; you might be interested re: 8sync <kristofer>is there a way to reference the current element in the init argument of make-list? <janneke>what about (list 1 2 3) or even '(1 2 3) <kristofer>right, but as the list gets large, that's tedious <bavier>kristofer: unfold is sometimes also useful <rekado>jmarciano: by default C-h is the help prefix in Emacs. <rekado>when you run Emacs in a terminal and you have configured your terminal in a certain way this may have been altered. <rekado>^H is the control character for backspace. It might be swallowed by the terminal application. <paroneayea>wingo: btw, have any chance to look at the elisp branch? O:-) <wingo>paroneayea: sure i can look at elisp now <wingo>paroneayea: actually where is that branch? i don't think i see it in git <wingo>i only see an old branch from bipt <paroneayea>wingo: it's not on the guile main repo because I don't have access to that <wingo>if you are interested in the elisp work to that extent you should be able to push to master i think <wingo>paroneayea: can you apply via savannah to be in the gnu org? ***michaniskin_ is now known as michaniskin
<roelj>When I use SRFI-9 for define-record-type, and I would like to expose records to C code, how would I go about doing that? <taylan>roelj: you should be able to get SCM pointers to the getter and setter procedures, constructor, type predicate, etc. <taylan>roelj: using the module API for instance... dunno how your program is structured. <roelj>taylan: I haven't written the C part yet, as I try to figure out how I could use records. Ideally, I would like to store the values in the record in a C struct.