IRC channel logs

2019-08-25.log

back to list of logs

<mwette>lispmacs: look into guardians
<daviid>str1ngs: I pushed a series of patch, I suggest you pull and carefully read the one before the last (the last fixes a tiny mistake on the one before the last ...), New interface - (g-golf hl-api gtype) - unref
<daviid>str1ngs: I meant to say carefully read the doc of the 'New interface - (g-golf hl-api gtype) - unref' patch
<daviid>str1ngs: or pull, locally build the doc and read the 'unref' entry i the procedure index
<daviid>str1ngs: with these patches, g-golf is gc friendly, upon users responsibility - note that the C memory is freed to
*wingo has a patch to allow (lambda (x) (unless (number? x) (error "not a number")) (define (square x) (* x x)) (square (square x)))
<wingo>i.e. mixed definitions and expressions
<manumanumanu>wingo: beat me to it, then :D
<wingo>manumanumanu: :)
<wingo>did you start?
<manumanumanu>pushed? Can I have a look?
<wingo>not pushed yet, still testing
<wingo>shortly tho
<manumanumanu>I was only navigating psyntax.scm to get a grip
<manumanumanu>hooray then!
<manumanumanu>It won't have been in vain
<manumanumanu>anyway, the macro I wrote to shadow define, lambda, begin and all different forms of let is portable to other schemes if anyone wants to use them :D
<wingo>:)
<manumanumanu>wingo: now, what is counted as a body apart from lambda? All "implicit" (begin ...)?
<manumanumanu>together with the new letrectify that is fantastic news! I know a fair bit of code that could be un-nested a couple of steps by this and not be slower for it
<mwette>wingo: Is mixing definitions and executable expressions Scheme? If not, why do that?
<manumanumanu>mwette: many schemes do, even though it is not standard
<manumanumanu>even chibi, but it prints a warning iirc.
<mwette>manumanumanu: thanks -- I'm sure I've run into situations where I wanted to use that but can't remember any one.
<wingo>mwette: it is a superset of scheme, fwiw, like many guile features. racket takes this approach to definitions and expressions in body contexts also. the algorithm is also the algorithm for top-level expansion in r6rs. i do not know why r6rs did not do this for local definitions
<wingo>that would be good to know!
<wingo>it's a pretty straightforward transformation from internal definitions to letrec*. letrec* only came along for r6rs but was also adopted in r7rs for internal definitions iirc
<wingo>so i think it's an evolution in the direction of scheme
<manumanumanu>mwette: I have a macro implementation of it here https://hg.sr.ht/~bjoli/guile-define
<manumanumanu>but I seem to be using letrec and not letrec*
<manumanumanu>and I seem to have forgotten to update new-cond to actually work.
<manumanumanu>mwette: fixed that bug if you want to try it.
<mwette>OK, I'm convinced now.
<str1ngs>daviid: will read and test thank you
<wingo>manumanumanu: https://git.savannah.gnu.org/cgit/guile.git/diff/module/ice-9/psyntax.scm?id=20535922147cd5992330962aaa5c4986563fc905
<str1ngs>daviid just to clarify. users need to call unref explicitly to GC single instance objects only correct?
<jcowan>wingo: That's correct. However, it is also true that many R5RS-and-older implementations had letrec* under the name of letrec.
<manumanumanu>jcowan: I feel completely out of my depth here, but isn't the only difference that order of evaluation is unspecified? If an implementation chose LTR evaluation, their letrec is, by chance, a letrec*
<manumanumanu>?
<jcowan>Not so much by chance as because it occurred to nobody to do it otherwise. In addition, most programmers tended to use letrec for procedures only.
<jcowan>But when some implementations started to reorder letrec definitions, then things like (letrec ((a 32) (b a)) ...) silently did the Wrong Thing if the binding of b was reordered before the binding of a.
<jcowan>Most instances that broke were more complex and subtle than this, of course.
<jcowan>But the letrec* rule has always been the rule for internal defines.
<manumanumanu>wingo: thanks. That will be my evening reading :D
<davidl_>are there any libraries for IP address related calculations for guile?
*wingo preps a release
<wingo>good evening civodul !
<civodul>hey wingo!
<wingo>civodul: wdyt about a 2.9.4 release, are you ok with it?
<wingo>fwiw only missing thing from 3.0 is mark's fixed-rationals work and i think i'm the blocker there
<wingo>=============================================
<wingo>guile-2.9.4 archives ready for distribution:
<wingo>guile-2.9.4.tar.gz
<wingo>guile-2.9.4.tar.lz
<wingo>guile-2.9.4.tar.xz
<wingo>=============================================
<wingo>woo
<wingo>i am going to go ahead and do it, if there is any problem (i think the declarative modules thing could be an interesting discussion, or internal definitions+expressions) we can change our minds in 2.9.5
<wingo>lloda: interestingly the out-of-memory test failure was due to the inliner inlining the test harness, and thus seeing that the large allocations that were supposed to trigger the out-of-memory mechanism were removed by the optimizer because they were never used :)
***drmeister_ is now known as drmeister
<civodul>wingo: sounds good to me!
<civodul>wingo: BTW, the out-of-memory test failures occasionally show up on 2.2
<wingo>civodul: i think the errors that show up on 2.2 are different
<wingo>and 2.9 probably also has them
<wingo>but after the toplevel-inlining thing there was a new error that happened all the time
<wingo> https://alpha.gnu.org/gnu/guile/
<wingo>the .lz is still uploading but the release is out
<civodul>yay!
<civodul>congrats, wingo
<wingo>tx!
<civodul>moving very fast as always!
<civodul>declarative modules are really nice, i'm happy we can get past that
<civodul>that'll certainly help performance in many cases
<wingo> https://lists.gnu.org/archive/html/guile-devel/2019-08/msg00016.html
<civodul>"Interleaved internal definitions and expressions allowed" uh!
<civodul>i like the aesthetic appeal of this change... but that's not very RnRS, is it? :-)
<civodul>(not that i value RnRS that much these days...)
<bandali>hey civodul, i found out about skribilo recently. i think it’s very cool!
<wingo>civodul: it's an interesting point of discussion :)
<wingo>so, it is what racket does.
<wingo>and it has a well-defined expansion in terms of letrec*
<bandali>civodul, i was wondering if you’d be able to share the sources of some larger examples of using it; e.g. your personal site and/or thesis
<wingo>and it mirrors the top-level
<wingo>and it compiles efficiently
<wingo>and it's a superset of rnrs
<wingo>so, i think it's a good idea :)
<wingo>but reasonable minds can disagree and i would be happy to have the discussion!
<wingo> https://www.gnu.org/software/guile/docs/master/guile.html/Declarative-Modules.html#Declarative-Modules is updated now
<wingo>(unrelated to the mixed definitions/expressions thing)
<civodul>wingo: put this way, it sounds like a good idea yes
<civodul>i guess i internalized that somewhat silly constraint
<civodul>so it comes as a shock that the contraint is gone ;-)
<civodul>but yeah, prolly a good idea, and it's a good sign if others are doing it
<civodul>bandali: there's its user manual, which is quite big
<wingo>civodul: i went through that same process too, fwiw :)
<civodul>:-)
<bandali>civodul, ah true, will check it out, thanks :) btw, out of curiosity, do you use still use skribilo?
*wingo zzz, release all done, yay
<civodul>bandali: occasionally, yes
<civodul>oh you'll find 2 more examples here: https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/doc/
<civodul>3, even
<civodul>3 even?
<civodul>odd
<bandali>haha, neat, thanks!
<civodul>yw!
*civodul -> zZz
<civodul>happy hacking!
<daviid>str1ngs: is the question is 'does unref, in g-golf, recursively unref other instances it would hold a ref to ...', the answer is it doesn't - because as 'things are', I have no way to know if those 'inner' instances are or not still having references else where
<daviid>str1ngs: does that make sence, or did i miss-understand your question?