IRC channel logs

2017-02-20.log

back to list of logs

<Apteryx>Hello Guile! I'd like to know what's the best option to use when a warning must be printed or an exception thrown?
<Apteryx>I saw the raise function in the manual, and some use of it in Guix/Shepherd, but I'm not totally clear as to how the "condition" procedure must be formed. Any example welcome!
<Apteryx>Seems SRFI-35 is what I should study more :)
<ryanwatk`> Anybody here know how to have multiple frames, like [0, 1 .. n]
<ryanwatk`> ? Arbitrary tiling per "workspace" inside guile-wm?
<amz3>Héllo!
<amz3>I've put the videos in the correct order, hopefully it makes sens
<amz3> https://goblinrefuge.com/mediagoblin/u/amz3/
<amz3>I hope next time my laptop will crash less often
<wingo>mooo
<mario-goulart>that's a syntax error according to https://esolangs.org/wiki/COW
<wingo>:)
<wingo>good morning mario-goulart :)
<mario-goulart>Good morning. :-)
<lloda`>wingo: (statprof p ...) gives me a line 'anon #x7fcaf3a4f820'. But when I look at ,x p that address isn't in any of the address ranges that I get. Is there a way I can find out where that address is coming from?
<wingo>hmm
<wingo>so it could be part of some support routine from guile or something i guess?
<wingo>strange tho
<wingo>pass #:display-style 'tree to statprof?
<wingo>lloda`: that might let you know how the call got there
<wingo>if not there are some debugging things you can use to find program debug info for an addr
<wingo>all the "find-program-..." functions from (system vm debug)
<wingo>but that's not a very good answer :)
<wingo>if you have a test case i can take a look
<wingo>btw! just ran some tests. on one core i get 11k reqs/s with the fibers http benchmark. on 6 i now get 57K -- a 5x speedup. getting close to linear anyway
<wingo>lol i can't reproduce those results now :/
<wingo>i wonder why.
<lloda`>wingo:
<lloda`>sorry
<lloda`>'tree helped it seems to be struct-something
<lloda`>it's freestanding code, so I'll upload and put a link here
<lloda`>will look into find-program...
<lloda`>thx for the help!
<lloda`>wingo: for the test case see https://notabug.org/lloda/guile-newra, $GUILE -L mod -s test.scm, the profile is at the end of test.scm
<lloda`>since you offered, I wouldn't want to take more of your time :)
<wingo>:)
<wingo>ACTION clones
<wingo>somehow notabug.org has gone down :P
<lloda`>I have cloned on https://github.com/lloda/guile-newra
<lloda`>yeah notabug is not super reliable ;p
<wingo>you are going to want to make check-ra and all the ra-data etc inlinable
<wingo>use define-inlinable
<wingo>lloda`: ^
<wingo>also field0
<wingo>i guess start with inlining field0 and check-ra
<wingo>and ra?
<wingo>if you want to avoid exporting macros and just export functions you can make a private %ra? etc set of interfaces and then wrap then in procedures for the expors
<lloda`>wingo: doing that cuts the benchmark times to 60%, thx
<lloda`>why can't I just (define-inlinable ra-data ...) and have the exported macro just work? I get 'can't apply #<syntax-transformer ...>' errors, but isn't that the point of define-inlinable? I'm terrible with macros, sorry...
<lloda`>I have lots of non-macro fruit to pick, anyways
<wingo>yeah that is a bit irritating
<wingo>anyway for constants you need (define-syntax foo (identifier-syntax foo-value))
<lloda`>thx, reading this https://www.gnu.org/software/guile/manual/html_node/Identifier-Macros.html
<lloda`>btw can I assume that the functions defined by define-immutable-record-type etc. are already -inlinable?
<wingo>yes
<lloda`>ok :)
<lloda`>lol I just wrote a case-lambda for ra-ref and ra-set! and that cut the times to 60% again
<lloda`>I really don't like to write versions of every function for 0, 1, 2 and x arguments :-(
<wingo>use procedural macros :)
<lloda`>yah I have to get into macros :p
***hiphish is now known as HiPhish
<HiPhish>Hello schemers. I was wondering what Guile's stance on r7rs small is? Is it something you want to support fully, or is Guile going to become its own language like Racket is? I couldn't find anything in the manual about r7rs.
<ArneBab_>HiPhish: I don’t know about an official stance, but there’s already pretty good support for r7rs in Guile. I’m not sure what is missing at the moment, though (see the r7rs-wip branch: http://git.savannah.gnu.org/cgit/guile.git/log/?h=r7rs-wip ). The only part which does not work in the r7rs benchmarks are circular lists; see http://ecraven.github.io/r7rs-benchmarks/benchmark.html
<ArneBab_>ecraven: do you plan to update the guile benchmark data for 2.1.7?
<ArneBab_>HiPhish: you can try (read-enable 'r7rs-symbols)
<ecraven>yes, just haven't had much time recently to follow new releases
<rekado_>I'm having a hard time trying to inspect a backtrace
<HiPhish>ArneBab_: So it's coming, that's all I wanted to know. I'm on 2.0.12, so I guess that I'm missing things from 2.1.x
<rekado_>here's an example: http://paste.lisp.org/display/339576
<ArneBab_>HiPhish: for a more official answer best ask on the mailing list (https://lists.gnu.org/mailman/listinfo/guile-user)
<rekado_>Is it possible to inspect values at any of the points in the backtrace?
<HiPhish>ArneBab_: Will do. Yikes, I just saw that the last commit on the r7rs branch is from 2014.
<ArneBab_>HiPhish: I don’t actually know whether much is missing from r7rs, so that might be the reason (already almost done)
<HiPhish>ArneBab_: I understand, thank you.
<ArneBab_>HiPhish: keep in mind that Guile is already part of the r7rs benchmarks
<ArneBab_>HiPhish: you’re welcome :)
<catonano_>rekado_: yes it' s possible. I did it myself before coming to the Fosdem
<catonano_>the manual has a section about debugging
<catonano_>there' s a metacommand
<catonano_>for jumping UP a frame
<catonano_>once you reach the frame you want, you can inspect values in that frame
<catonano_>it' s not intuitive, I concede, I had to read very swlowly and carefully
<catonano_>it took me a few days
<rekado_>oh, I forgot about full backtraces.
<rekado_>with those I get bindings for all values (e.g. $123)
<catonano_>full backtraces ?
<rekado_>catonano_: ,bt #:full? #t
<catonano_>ah !
<dsmith-work>Monday Greetings, Guilers
<dsmith-work>sneek: seen-arities ?
<dsmith-work>sneek: arities ?
<dsmith-work>Hmm.
<dsmith-work>sneek: paroneayea: seen-arities ?
<sneek>I've heard paroneayea: seen-arities is producing a set of the arities that have been seen
<dsmith-work>sneek: forget paroneayea: seen-arities
<sneek>Okay.
<amz3>o/
<wingo>\\o
<paroneayea>hi!
<paroneayea>dsmith-work: the seen-arities conversation was wingo explaining to me what was going on in a section of goops.scm is all
<wingo>good evening paroneayea :)
<paroneayea>hi wingo !
<wingo>ACTION introduced a gnar
<wingo>ly bug in fibers and just found it
<paroneayea>gnar :)
<wingo>yeah can we make that a noun plz :
<wingo>)
<paroneayea>sure! gnar (n): a particularly gnarly bug
<paroneayea>; also a pseudo-varlable in particularly hackily written code examples
<paroneayea>(foo gnar baz)
<wingo>:)
<Apteryx>How to test for an empty list? Apparently '() by itself isn't considered "false".
<wingo>null?
<Apteryx>OK :)
<wingo>:)
<Apteryx>Thanks.
<paroneayea>I always seem to use (eq? foo '()) instead of null? but I'm not really sure why.
<wingo>i use (ice-9 match) usually
<paroneayea>I think that habit developed when I was using #nil to represent javascript nulls
<dsmith-work>paroneayea: Yes, but the bot things you are talking to it with the work s e e n
<paroneayea>dsmith-work: o o p s
<dsmith-work>So foo is bar when baz is seen
<sneek>So noted.
<dsmith-work>sneek: So foo ?
<sneek>I've heard So foo is bar when baz is seen
<paroneayea>soooo noted.
<dsmith-work>sneek: forget So foo
<sneek>Okay.
<dsmith-work>Silly bot
<dsmith-work>paroneayea: So I try to clean those up when I see them.
<wingo>fibers 1.0.0 out :)
<amz3>wow!
<wingo>docs here as always: https://github.com/wingo/fibers/wiki/Manual
<wingo>or in tarball
<wingo>this release is very good i think -- i will switch all my web stuffs to it
<wingo>gotta get out a guile 2.2.0 tho :)
<peterbrett>wingo: I had someone e-mailing me complaining that their distro doesn't package any version of Guile 2.0
<peterbrett>I haven't responded yet
<wingo>peterbrett: strange :) it has been many years. i thought all distros did guile 2.0
<paroneayea>wingo: congrats on Fibers 1.0 :)
<wingo>tx :)
<paroneayea>wingo: I'm excited to see it
<paroneayea>wingo: and am looking forward to Guile 2.2!
<wingo>:-)
<dsmith-work>wingo: I just got an error building master guile. GOne now. doing a git clean and rebuilding.
<paroneayea>wingo: you mentioned starting a thread with some high-priority bugs blocking 2.2. I've been using 2.2 almost daily for the last couple of months, and I feel like I have a shortlist at this point. :) Maybe I can help with some of them even
<dsmith-work>"gone" as in scrolled away
<wingo>paroneayea: please do!
<wingo>i mean, the list and any help are welcome
<wingo>i will be using the mailing list over the next month
<wingo>as you know i sometimes ignore it, for better and for worse :/
<wingo>but to get out a release i need to pay attention
<paroneayea>wingo: I understand, sometimes to get things done you gotta focus
<paroneayea>which means abandoning other important things, till you come back and shuf through it
<amz3>paroneayea: can you promite guile fibers so that I can RT?
<paroneayea>amz3: I did sorta... I posted from both my account and used the guile account to promote andy's posts, though I could make one individually from the Guile account too if you like
<dsmith-work>wingo: BTW: Want to fix that annoying net_db.c:468:***Missing or erroneous `#define FUNC_NAME s_AI_ADDRCONFIG);' message?
<amz3>paroneayea: it's ok
<dsmith-work>wingo: Tune up the reg expression /^SCM_DEFINE/ to not match SCM_DEFINE_.*
<dsmith-work>in guile-func-name-check
<amz3>it make me think I did not implemented a p2p thing in pure guile
<amz3>is it ok, to try to write a procedure in guile?
<amz3>like that http://paste.lisp.org/display/339596
<amz3>AFAIK It's not possible to read the procedure back
<slyfox>i've sent a few things to bug-guile@ yesterday. Is it enough to get an attention? :) one of examples: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25803