IRC channel logs

2016-03-18.log

back to list of logs

<amz3`>héllo guilers!
<janneke>hey amz3
<lloda``>can (format) print a floating point number without the decimal point?
***lloda`` is now known as lloda
<taylan>lloda: do you mean literally just without the point, like 2.3 -> 23?
<taylan>oh it seems 'format' really insists on putting a dot somewhere. :)
<taylan>scheme@(guile-user)> (format #f "~1,0F" 0.2)
<taylan>$4 = "."
<Arandur>My Guile distribution appears to be missing some of the SRFI packages -- specifically SRFI 43. Error msg: "no code for module (srfi srfi-43)". Where can I get these?
<Arandur>Distribution is from the "guile-2.0" package on Linux Mint.
<lloda>taylan: yeah
<taylan>for cutting out the decimal part (2.3 -> 2), I guess (inexact->exact (truncate x)) is the easiest way...
<lloda>of course I can round etc. but it's a pain
<lloda>I found this with ~i which would require me to do (exact (truncate (real-part x))) (...)
<lloda>:-/
<lloda>(format) is a true snake nest last time I looked, too
<taylan>I'm looking at SRFI-48... where is Guile's 'format' documented?
<taylan>oh, found it
<taylan>and yeah, this thing is insane O_o
<taylan>(format #t "~d pupp~:@p" 5) ⊣ 5 puppies
<lloda>haha, that's great
<wingo>:)
<wingo>there is a printf implementation somewhere in guile-gnome, taken from slib
<wingo> http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gw/support/printf.scm
<wingo> http://git.savannah.gnu.org/cgit/guile-gnome.git/tree/glib/gnome/gw/support/slib.scm
<rain1>hi
<rain1>I'm having trouble reproducing this bug https://debbugs.gnu.org/cgi/bugreport.cgi?bug=20087
<rain1> http://lpaste.net/875305586076418048 this is the sort of thing I get
<rain1>why is it increasing by 13 each time? from libguile/symbols.c it looks like it should increase by 1
<cojy>for me its 47 lol
<rain1> http://lpaste.net/2308908146984222720 got it
<rain1>how to compile guile quickly after changing a .c file in libguile?
<taylan>rain1: re-run 'make'? or how do you mean?
<rain1>make is taking so long..
<rain1>I suppose I have to wait
<taylan>make from scratch will take long. subsequentially it will only recompile what you changed.
<taylan>I guess one could rig the build system or pass some arg to make that says "only compile libguile, don't bytecode .scm files"...
<taylan>don't bytecode-compile*
<rain1>How can i run my guile now that make finished?
<lloda>without installing it you mean?
<rain1>yeah!
<rain1>I don't want to install since I already have guile
<davexunit>rain1: if you are building from the git repo or extracted tarball, run meta/guile
<rain1>thanks a lot that worked!
<jmarciano>I am thinking of using (and to run the second expression.
<jmarciano>like (and (do this) (if positive, do this))
<jmarciano>or how others do?
<davexunit>(and (first-thing) (second-thing) ...)
<rain1>did you want to use the result of (do this) ?
<jmarciano>yes I see. Is it OK or people do in different? I am using it to check first expression and to run second one if first is true
<rain1>may be better to use (when condition body ...)
<jmarciano>I am intending to set! variable if true
<jmarciano>it gives me now same result with when
<jmarciano>aha yes, but with when I cannot make numerous expressions?
<jmarciano>aha it works
<jmarciano>when is only for one test, but and is for multiple tests
<jmarciano>ok good to know thanks
<rain1>how about (when (and X Y Z) things ...)
<davexunit>it all depends on the circumstace
<davexunit>if, when, and, and=>, etc.
<jmarciano>davexunit: you are long time with Guile, right?
<davexunit>jmarciano: sort of, I've been using it for a little over 3 years.
<jmarciano>my only touch with guile programmers is here or through sources.
<jmarciano>so I am trying to figure out the styles of programming, editing, what to use in which case and so on
<jmarciano>I figured out, parenthesis I rather put in separate lines, so that each inner expressions could be easier evaluated. Is it correct?
<jmarciano>I am trying to find equivalent for: http://perldoc.perl.org/perlstyle.html
<lloda>people only do that when hacking on something. The default style is to end like
<lloda> this)))))
<lloda>which is a bit inconvenient. But you can select sexprs instead of lines.
<davexunit>jmarciano: this is the style guide, more or less: http://mumble.net/~campbell/scheme/style.txt
<davexunit>lots of good stuff in here
<davexunit>jmarciano: parentheses get lonely when they are on lines by themselves, so make sure they stick together.
<lloda>emacs doesn't support #; or #| |# properly, fonts end up all wrong usually
<jmarciano>lloda: you said: I can select sexpress instead of lines. How?
<jmarciano>davexunit: thank you for link, I was sleeping...
<jmarciano>is there emacs mode that automatically moves me to next lines according to style?
<rain1>yes, paredit mode
<rain1>you can install it with guix I think
<jmarciano>I cannot find it on elpa
<davexunit>paredit is at least on melpa
<davexunit>and yes, also guix
<holomorph>git clone http://mumble.net/~campbell/git/paredit.git/
<holomorph>;)
<jmarciano>holomorph: thanks, I prefer to find it through melpa.
<jmarciano>I know git, etc. sure. But now when I discovered melpa...
<jmarciano>already done...
<jmarciano>very nice
<jmarciano>is there anyway, while typing in emacs, pressing TAB, to get command expansions?
<jmarciano>I feel in power, when using emacs, little more orientation and I am running
<rain1> http://mumble.net/~campbell/emacs/paredit.html
<rain1>this will be useful
<davexunit>jmarciano: when you are ready to bring your Guile hacking to the next level, you'll want to learn Geiser
<davexunit> http://geiser.nongnu.org
<rain1>I sent a reply to a guile bug with number @ bugtracker address, but no reply and nothing shows up on the stiet
<rain1>site*
<rain1>does it wait for a person to approve it?
<lloda`>jmarciano: in normal Emacs https://www.gnu.org/software/emacs/manual/html_node/emacs/Expressions.html
<lloda`>you climb to the paren on the left with C-M-u and the select with C-M-SPC
<lloda`>it's powerful
<rain1>did i send my mail wrong? what to expect?
<jmarciano>lloda` I am trying that out, I can C-M-u, but what is C-M-SPC not working...
<jmarciano>davexunit: yes I have geiser, sure
<jmarciano>but does that give me possibility, to auto-expand in emacs buffer?
<davexunit>jmarciano: geiser provides completion and fun stuff like that
<jmarciano>with tab or how?
<davexunit>I don't know the key stroke off-hand, but you use emacs so it should be easy to look up :)
<davexunit>and there's the manual
<jmarciano>C-M-i for expansion then TAB works.
<jmarciano>yes that helps.
<jmarciano>only I ma not getting faster...
<jmarciano>I was using 2 xterm terminals and switching between windows. Here I try to use emacs directly.
<davexunit>yeah that's a pretty inefficient way to work
<rain1>it saves struggling with geiser mode bugs tbh
<rain1>at least in a terminal i can see things like error messages
<davexunit>you can see error messages with geiser...
<rain1>what do you mean
<davexunit>what do *you* mean?
<rain1>ok
<davexunit>Geiser will display error messages when you evaluate something that throws an error
<rain1>hi civodul
<rain1>i sent a fix for the gensym bug
<rain1>i didn't get any automated reply and it doesn't show up on the bugtracker though, I was wondering if that's expected?
<davexunit>rain1: I saw a patch come in
<rain1>ty
<amz3>héllo again!
<lloda`>jmarciano: if you have an old version of Emacs maybe you need to toggle M-x transient-mark-mode to see the active region
<cojy>do you need to do anything special for submitting guile patches?
<amz3>cojy: out of curiosity, what are you fixing?
<cojy>nothing yet but if i dont have to jump through hoops like ive heard you have to for some other gnu projects ill add some oeprators to the delimited continuations library
<amz3>oh
<amz3>cojy: what does this new operator do?
<cojy>it's not new but there's missing ones like using your own prompts and shift0 that are really useful
<jmarciano>lloda`: I have newest emacs, though I am not sure what is "active region"
<lloda`>cojy: git format-patch TAG is the preferred format
<lloda`>reviews can take a while, so you have to be patient
<lloda`>jmarciano: when you are on a left paren (like the left of this) and press C-M-space, you should see the whole region from ( to ) highlighted. That would be your active region
<jmarciano>let me see
<jmarciano>yes now it works, it was bound to window manager...
<stis>hej guilers!
<amz3>!
<stis>anyone are there any nice articles that explain the strategoes of the new guile compiler?
<stis>wingo: ^^
<davexunit>stis: http://wingolog.org
<lg> http://oortr.com/ZjllYz
<davexunit>spam link ^
<davexunit>be wary of clicking
<jmarciano>someone still thinks that IRC on freenode can be used for spam.... hahahha