IRC channel logs

2016-03-24.log

back to list of logs

<mark_weaver>Jookia: fwiw, Guile supports SRFI-105 (curly infix) syntax
<rain1>you shouldn't use infix :S
<mark_weaver>why not?
<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, gensym is best avoided anyway
<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
<civodul>Hello Guilers!
<nalaginrut>heya
<janneke>hi!
<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>no, there's no such thing
<civodul>you could (define-syntax-rule (declare stuff ...) #t)
<rekado>okay.
<df_>hello, I have induced a segfault in the latest guile built from git
<df_> http://paste.lisp.org/display/311294
<jmarciano>df_: I have tried with Guile from Guix package, and no segfault.
<jmarciano>did not try from git
<df_>yes, it doesn't happen with 2.0
<jmarciano>let me see
<jmarciano>is this one: http://hydra.nixos.org/build/33552826
<df_>hmm, my guix has 2.0.11, maybe it's out of date
<jmarciano> http://hydra.nixos.org/build/33552826/download/4/guile-2.1.2.1-43a03.tar.xz I am doing this one
<df_>that sha1 sum matches my git checkout...
<df_>just building from that archive
<jmarciano>me too
<df_>same issue
<jmarciano>my laptop is slower to compile...
<jmarciano>I am at: GUILEC ice-9/peg/string-peg.go
<df_>yes, this machine is rather fast but unfortunately rather non-libre as a result :(
<rain1>guile takes a looong time
<rain1>maybe a couple hours? i didn't time it
<jmarciano>df_: the only non-libre I have is BIOS
<jmarciano>until I find libreboot friendly laptop
<df_>I have a couple of libreboot laptops, they just take a lot longer to compile guile on :)
<wleslie>such a cool name. libreboot.so
<jmarciano>you sell?
<df_>no, I use them
<jmarciano>ok
<jmarciano>which libreboot laptop is fastest?
<df_>I think the x200 and t400 are equivalent
<jmarciano>aha ok
<jmarciano>df_: compiles, tested as ./meta/guile from build directory, no problems, no segfault
<jmarciano>like define, set-car what you had on paste
<df_>weird
<df_>are you on x86_64?
<jmarciano>yes
<df_>what distro?
<jmarciano>Debian
<df_>same here :(
<df_>guess I'll have a poke around in gdb
<df_>thanks for trying
<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)))
<amz3>héllo :)
<jmarciano>how do I read multiple lines? like cat text | guile.scm
<rain1>jmarciano, where is read-line from?
<jmarciano>from pipe I guess
<jmarciano>maybe I can check with eof
<rain1>i mean which shceme module must I import?
<rain1>yes eof-object?
<amz3>jmarciano: try the following
<jmarciano>readline
<amz3>(use-modules (ice-9 rdelim))
<amz3>(pk (read-string (current-input-port)))
<rain1>ERROR: no code for module (readline)
<jmarciano>(use-modules (ice-9 readline))
<jmarciano>I don't know if readline is for reading from pipe
<jmarciano>I have rdelim also
<rain1> http://lpaste.net/8323134114085470208
<rain1>not tested..
<rain1>but an idea
<jmarciano>yes readline has nothing with it
<jmarciano>it works, now i need to study this
<jmarciano>rain1: this is like lambda, only with defines, right?
<rain1>yea
<rain1>using recursion as a loop to read more and more lines
<jmarciano>function basically uses itself
<rain1>yes!
<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>it appends to the line, the new line, ok
<rain1>it builds up alist
<rain1>a list
<jmarciano>when I change '() to '"" I get basically same result, but is it same?
<rain1>there is a differenc
<rain1>do you want a list of lines
<rain1>or a single string: all lines
<rain1>?
<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>exactly
<rain1>instead of cons/'() it would be string-append/""
<amz3>jmarciano: have you tried the code i pasted?
<jmarciano>which one
<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
<jmarciano>let me try
<jmarciano>yes that works correctly as expected
<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
<jmarciano>aha now I get it completely
<amz3>pk display and return it argument
<amz3>its*
<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
<amz3>exactly
<jmarciano>but it did work with (define inputfile (pk ...
<jmarciano>so rain1 that is also for you...
<jmarciano>that is input pipe, now I have to write string and feed to program
<jmarciano>maybe pipe
<jmarciano>that is module popen ice-9 probably
<jmarciano>is there way in emacs to get TAB expansion of commands for guile?
<df_> http://www.nongnu.org/geiser/
<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:
<df_> http://www.nongnu.org/geiser/geiser_2.html#Friends-1
<davexunit>jmarciano: it tab completes at the repl
<davexunit>and there's another way to expand inside a scheme buffer
<jmarciano>at repl yes
<davexunit>I recommend reading the geiser manual
<davexunit>and inspecting the key bindings in your scheme buffer
<davexunit>with C-h b
<davexunit>emacs is self-documenting after all
<jmarciano>C-h is delete
<davexunit>what?
<jmarciano>it is self-documenting, but does not know what I think
<davexunit>that's the prefix for help commands
<jmarciano>my C-h is like Backspace
<davexunit>alright
<davexunit>well I don't know why that is the case
<peterbrett_work>jmarciano: Use "M-x help" then
<davexunit>anyway my point is that the emacs or the geiser manual will tell you what you want to know
<davexunit>you just need to read
<jmarciano>installed ac-geiser and it simply works
<jmarciano>Now I can read pipes, write pipes, good for processing markdown and other stuff. http://paste.lisp.org/display/311305
<wingo>paroneayea: i rebased the ethreads branch; you might be interested re: 8sync
<kristofer>good morning!
<kristofer>is there a way to reference the current element in the init argument of make-list?
<kristofer>I want to make a simple list of integers
<janneke>what about (list 1 2 3) or even '(1 2 3)
<kristofer>right, but as the list gets large, that's tedious
<holomorph>iota
<bavier>kristofer: unfold is sometimes also useful
<kristofer>iota is the one! thanks so much
<amz3>wingo: did you have a chance to have a look at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23000
<dsmith-work>Thursday Greetings, Guilers
<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: oooh
<paroneayea>wingo: btw, have any chance to look at the elisp branch? O:-)
<jmarciano>rekado: I will check it out later
<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
<wingo>amz3: i have not, will look
<paroneayea>wingo: it's not on the guile main repo because I don't have access to that
<paroneayea>here it is:
<paroneayea> https://gitlab.com/dustyweb/guile
<paroneayea>merge-bipt-elisp-wip branch
<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?
<paroneayea>wingo: sure, applying!
<paroneayea>wingo: request sent!
***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?
<roelj>Is it at all possible?
<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.