IRC channel logs

2014-04-28.log

back to list of logs

<nalaginrut>morning guilers~
<nalaginrut>oops, 74 people
<b4283>nalaginrut: is 74 good or bad?
<nalaginrut>b4283: I believe it's around 64 these months everyday
<nalaginrut>at this time
<b4283>that means ppl interested in guile had increased, yay
<nalaginrut>yeah
<zacts>hello
<nalaginrut>I'm glad to see that SMOB is going to be obsoleted, it's hard to play with it
<zacts>I can't wait until nalaginrut's guile web server takes off.
<zacts>I want to convert my blog to use it
<nalaginrut>zacts: you mean Artanis? or Ragnarok? anyway, my brand new server design will appear in Artanis soon
<zacts>oh cool
<zacts>for now I'll use chicken eggs
<zacts>but I would rather use guile, I like guile better
<nalaginrut>I have to do so, because something in webframework better to handle in server, like limit uploaded file size
<nalaginrut>no mention websocket, so I have to add a new server to Artanis
<zacts>ok
<nalaginrut>zacts: the site of Artanis is also built with hyde of Chicken
<nalaginrut>it's nice to try it for static site
<nalaginrut>I wish Artanis could go for dynamic side
<zacts>nalaginrut: my site is static
<zacts>except I would love to use guile/chicken to parse my markdown
<nalaginrut>zacts: I wish there's a markdown parser in Artanis, but now there're lot of higher priority work for it
<zacts>k
<zacts>ok
<nalaginrut>;-)
<ZombieChicken>has anyone here compiles a static guile and used it in an initramfs for the init script?
<mark_weaver>ZombieChicken: GNU Guix produces demo VM images with Guile as PID 1. I don't recall if it's static or not.
<mark_weaver>search for "boot to guile"
<zacts>mark_weaver: I'm seriously considering posting my FreeBSD guile patches in their current form for someone else to finish my work.
<mark_weaver>zacts: okay, fair enough. thanks for working on it.
<zacts>also, I have some other projects that are interesting me more, and are more high priority, and I may be a bit busy with catching up on my college math this summer thru the winter.
<zacts>I'll post a link with the patches here probably..
<zacts>and possibly on the mailing list
<zacts>btw, can I send attachments on the mailing list?
<mark_weaver>yes
<zacts>ok, thanks
<ZombieChicken>Are the files in /usr/lib64/guile/2.0/ccache/ and /usr/share/guile/2.0 required for guile to operate?
<civodul>Hello Guilers!
<civodul>ZombieChicken: yes
<civodul>why?
<ZombieChicken>I'm thinking of putting guile 2.x into my initramfs so I can write my initfile in it
<ZombieChicken>and I wanted to double-check so I didn't go through the trouble of compiling a static guile and all that fun crap just to have it fail because it was missing required files
<civodul>aah, did that too ;-)
<civodul> https://lists.gnu.org/archive/html/guile-user/2013-02/msg00131.html has some details
<ZombieChicken>ty
<ZombieChicken>lol. 2nd time someone mentioned that to me
<civodul>ah :-)
<civodul>so basically yes, you need all these files and a statically-linked Guile
<civodul>you also need to make sure libgc doesn't require /proc
<civodul>it's OK with recent versions, otherwise you need to build it with CPPFLAGS=-DUSE_LIBC_PRIVATES
<ZombieChicken>yeah. This is starting to look like it might be !!!FUN!!!
<civodul>surely :-)
<ZombieChicken>libgc == glibc?
<civodul>no, bdw-gc (the garbage collector)
<ZombieChicken>k
<wingo>moin
<wingo>hey civodul, did you have any thoughts on the foreign objects facility?
<civodul>wingo: you're referring to a message?
<civodul>(i'm lagging behind)
<wingo>np
<wingo> http://article.gmane.org/gmane.lisp.guile.devel/17104
<civodul>ah, i see it, lemme see
<wingo>it's only from yesterday
<wingo>so you're not really behind :)
<civodul>good :-)
<civodul>i just replied
<wingo>excellent, thanks
***wleslie is now known as markov-kosh
***markov-kosh is now known as wleslie
<wingo>doc/oldfmt.c wat
<wleslie>c as a documentation format
<wleslie>echo "int main () { printf(\\"Usage: ... " > README.c
<wingo>:)
<amirouche>héllo guix
<amirouche>...
<wingo>:)
<lamefun>is syntax cs
<taylanub>lamefun: ?
<lamefun>is syntax case the only way to access contents of syntax objects?
<taylanub>There's also syntax->datum
<lamefun>?(
<lamefun>(datum-syntax x (syntax-datum x)) is the same as x?
<lamefun>or do i lose info?
<taylanub>not sure about that, might want to check out R6RS and/or the Guile manual
<lamefun>also is there a less annoying record syntax that would define accessors automatically like get-record-field
<taylanub>You mean SRFI-9 is annoying ?
<lamefun>yes
<atheia>lamefun: you could try your luck with r6rs syntactic records
<atheia>Afaik they allow accessors etc. to be optionally specified and to generate them automatically otherwise.
<atheia>(if memory serves me well…)
<ijp>atheia: if names are not given, they get generated according to the usual pattern
<ijp>there's also other bells and whistles, some dubious, some less so
<ijp>lamefun is gone, but I would intuitively think that (datum->syntax x (syntax->datum x)) would be a the same as x, although probably not eqv? or equal?
<taylanub>Is source data in syntax objects ? If so, those would probably be lost.
<ijp>hmm, maybe not, because syntax->datum strips info recursively, whereas datum->syntax seems like a one level thing
<taylanub>hrm, was there a separate procedure that does one-layer stripping of syntax ?
<ijp>frankly, I can't think of any reason why you would organise your code in this manner, though
<madsy>I wonder, in larger Guile projects, do people turn everything into modules and load them with (use-module), or do they use (load)?
<civodul>madsy: modules, definitely!
<ijp>it usually makes more sense to use modules
<civodul>load is from the 70s or so ;-)
<ijp>for a start, load *technically* does not work with macros
<amirouche>I'd like to rewrite the following sexp (guile.is.a.super.language) to (guile is a super language)
<amirouche>how can I do that?
<amirouche>Also, if it doesn't require me to prepend every dotted name with somthing, like I pull a switch and all dotted names are converted
<taylanub>amirouche: foo.bar is just a symbol like any other, you can "process" it into another symbol by turning it into a string with symbol->string, doing your changes, then getting back a symbol with string->symbol.
<amirouche>but how can I make it a global behavior of the parser
<amirouche>what macro procedure do you recommand?
<taylanub>why do you need that ?
<amirouche>experience
<amirouche>taylanub: see my mail on guix-ml
*taylanub looks
<amirouche>there is an attachment and I explain the thing
<amirouche>it about gexp
*taylanub has never seen # for quotation in e-mail before
<taylanub>It's a little long, I tried to skim it, am I right in that you just want to write code like that for the sake of visual appeal ?
<dsmith-work>wingo: So what to name a new Scheme C ABstraction?
<wingo>dsmith-work: haha
<wingo>"foreign objects" is apparently the thing :)
<taylanub>amirouche: if so, that's very non-standard and a bit crazy IMO, you might want to look into SRFI-105 instead which would allow e.g. {foo[bar][baz][bat]} to turn into something like ($bracket-access$ foo bar baz bat)
<amirouche>that's it thanks!
<amirouche>taylanub: sorry If you feel stalked, but do you know all SFRIs?
<taylanub>no, only about .. 4-5 or so ?
<amirouche>ok
<amirouche>thanks a lot! http://sourceforge.net/p/readable/wiki/Scheme-tutorial/
<amirouche>there is no shame to know all SFRI :)
*taylanub despises "readable" sexprs :) should start an "unreadable" movement to oppose them :P (SRFI-105 is fine, and the sanity limit IMO)
<amirouche>I kept looking for this thing and was always redirected to SFRI-110 which propose a indentation based syntax + curly-infix-notation
<amirouche> http://srfi.schemers.org/srfi-110/srfi-110.html
<amirouche>without parents the expressions seems "unbound" somehow
<taylanub>yeah, that's the extension to 105. to be precise, they started the "readable" project separately (originally called "sweet expressions"), which was split into a couple stages building up on each other, then they started to specify those parts as SRFIs
<taylanub> http://readable.sourceforge.net/
<ijp>dsmith-work: (ice-9 immigrants)
<ijp>or perhaps émigrés
<wingo>biculturals
<ijp>I come from the land of the ice-9 and snow, from the midnight sun where the hot springs blow
<dsmith-work>ijp: Excellent!
<ijp>they come over here, use our memory, steal our locks,....
<wingo> http://article.gmane.org/gmane.lisp.guile.devel/17110
<civodul>wingo: you've written all this doc already, woow!
<civodul>:-)
<wingo>i wrote it today, but it was mostly based on the smob doc :)
<civodul>looks good to me
<wingo>great
<wingo>probably the example can be trimmed down
*wingo spreads fud about finalizers and mark procedures :)
<civodul>:-)
<daviid>wingo: nice, and the doc is really clear, well done!
***fangism-ctrl-Z is now known as fangism
***wingo_ is now known as wingo
<davexunit>wingo: foreign structs look great, but I have a (probably unfounded) concern about the overhead it introduces by using GOOPS.
<davexunit>GOOPS turns procedures like + into methods, afaik.
<wingo>davexunit: that's not really the case
<davexunit>well, great. happy to be wrong.
<wingo>the + vm opcode always dispatches to scm_sum in the case of non-fixnum types
<wingo>and scm_sum always branches down to the generic case if it doesn't handle the type
<wingo>and if the generic case is that + has not been turned into a primitive-generic, then at that point an error is raised
<wingo>but if it is a generic, only then does it dispatch to the + generic
<davexunit>thanks.
<davexunit>makes sense.
<wingo>so there is no runtime overhead for normal arithmetic
<davexunit>foreign structs look great. I've been desiring an API like this for writing wrappers.
<wingo>basically primitive-generics are a way to specify what happens when a primitive fails to apply
<wingo>great
<davexunit>the docs are really good, too. lots of examples.
<wingo>it's possible to backport as well, importing locally into your project -- there are a couple bugs to work around, but it's doable
<wingo>tx, though i stole most of them from the smob docs :)
<wingo>tree shaking the manual...
<davexunit>heh
<ijp>zacts: you asked a short while back how I can read so much?
<ijp>zacts: the important thing is consistency, as the following graph shows http://shift-reset.com/tmp/bookplot.png
***develo is now known as naboo
<naboo>hello, i learn guile-ncurses and need to write code with internationalization, could anyone tell me where should i start with it?
<taylanub>naboo: maybe (info "(guile) Gettext Support")
<taylanub>(for i18n)
<naboo>taylanub: and what about wide characters in code?
<taylanub>naboo: Guile is fine with UTF-8 source code
<taylanub>(or what did you mean?)
<civodul>it can also do textual I/O in any encoding
<naboo>taylanub: yes i mean utf-8 source code, but i have some troubles with utf-8 strings when i run script on my console using guile-ncurses
<naboo>instead of ł or ó i get ? and ?
<ijp>ncurses + unicode sounds like a recipe for trouble
<taylanub>naboo: could that be a problem of your terminal ?
<naboo>or if i use (setlocale LC_ALL "") some other
<naboo>my terminal is bash in new Debian
<naboo>so terminal is not a problem
<taylanub>bash is a shell, not a terminal
<civodul>naboo: you need that (setlocale LC_ALL "") call to tell Guile to use locale encoding for ports by defautl
<civodul>*default
<naboo>civodul: i use it, as wrote above
<ijp>I have an odd suspicion that guile-ncurses does not use wide character support
*ijp checks docs
<naboo>ijp: that is sad, great tool and i can't write polish characters :(
<civodul>naboo: does (display "λ") do the right thing?
<civodul>(assuming you have a UTF-8 locale)
<rlb>wingo: one note about the file desrcriptor example -- you might also consider emphasizing that freeing that kind of resources via a finalizer should be a last resort, i.e. the normal case should be explicit (or implicit via with-foo) cleanup.
<wingo>rlb: good idea
<ijp>hmm, I see some functions that indicate it was implemented, so I might be wrong
<ft>I'm pretty sure you can build guile-ncurses with ncurses-wide
<naboo>civodul: yes it prints λ
<rlb>i.e. at a minimum make sure your "foo" has some way to clean it up other than the finalizer.
<civodul>naboo: then yes, could be a ncurses issue
<naboo>so i need to look into configure help of guile-ncurses
<naboo>bingo!
<naboo>there is --with-ncursesw
<naboo>thanks for help
<civodul>oh, good to know :-)
<naboo>i'll check if it do the thing
<naboo>will call here
<naboo>wow, it works
<civodul>when that happens, one must shout: "Guile is great!"
<civodul>twice
<ijp>when it doesn't work, you shout it four times, and louder
<naboo>heh (Guile is great!) (Guile is great!) :D
<civodul>:-)
*sneek shouts AND waves