IRC channel logs

2017-06-13.log

back to list of logs

<ijp>Stopping for today, I need to figure out how to ensure that cps2 is closure-converted
<ijp>ACTION leaves the compile running
<catonano>sneek later tell daviid what do you mean with "kawa doesn't impose an eco system or you to compile" ?
<sneek>Will do.
<catonano>sneek later tell ijp are you working on some cps compilation ? May I ask wat are you doing ?
<sneek>Got it.
<catonano>sneek botsnack
<sneek>:)
<CustosLimen>;(
<CustosLimen>so am I misunderstanding boehmgc - or should boehmgc replace free/malloc/realloc ?
<CustosLimen> https://bpaste.net/show/8691750c5229
<CustosLimen>cos I'm seeing that
<CustosLimen>so malloc being called is from libc.so.1
<CustosLimen>ugh
<CustosLimen>ok no I'm wrong
<CustosLimen>:S
<cmaloney>One the one hand, congrats? :)
<catonano>hi mwette :-)
<CustosLimen>is it possible to make memory leaks in guile ?
<CustosLimen>like with scheme code
<CustosLimen>given there is no problem in guile or dependencies itself
<CustosLimen>hmm
<CustosLimen>was there any leaks in regex code ?
<CustosLimen> https://paste.fedoraproject.org/paste/BIgWl0cpGnWmVNOPwc6IrQ
<cehteh>leaks would be a bug, but if one keeps references to unused objects around then no garbage collector would help ypu
<cehteh>glibc allocates some memory once and doesnt free it in some functions, these are non accumulating, shouldnt leak
<CustosLimen>cehteh, so as far as I can tell - memory is being leaked but its not memory that is managed by boehmgc - and it seems to be leaking from regex
<cehteh>does it accumulate when you add more regex?
<cehteh>do you use regfree?
<CustosLimen>cehteh, it seems to accumlate every time regex is ran
<CustosLimen>and I'm not sure if regfree is being used
<CustosLimen>I did not write the code - and I'm not that familar with guile
<CustosLimen>I don't see regfree in guile document - using 2.0.11
<CustosLimen>what is supposed to call it ?
<CustosLimen>cehteh, I have a bit of hard time figuring out exactly what code is causing the "leak" that umem perceives
<CustosLimen>but not using regfree - not sure how I would even - I see it in code but as far as I can tell its not a lisp function
<cehteh>ah i was under the impression that you/guile uses posix regex
<cehteh>usually regex are implemented that you run a compiler generating some sort of state machine from the string you give as regex
<cehteh>this state machine needs some memory
<cehteh>when done you have to free that
<CustosLimen>cehteh, yeah I get it
<cehteh>there are plenty other regex implementations and guile may have its own
<CustosLimen>well guile seems to have its own
<cehteh>failing to free these state machines would lead to a leak
<civodul>Guile uses libc's (POSIX regexps)
<CustosLimen>cehteh, ok sure - but I dunno how to free them is the point more or less
<cehteh>civodul should know :D
<CustosLimen>after make-regexp is called
<CustosLimen>how does it know when to free the memory ?
<civodul>it's automatically freed, don't worry :-)
<civodul>garbage collection
<cehteh>could be as simple as dropping all references, then the gc should clean up
<CustosLimen>civodul, https://paste.fedoraproject.org/paste/BIgWl0cpGnWmVNOPwc6IrQ
<cehteh>but you may accidentally keep references around
<CustosLimen>civodul, see the problem I'm having is memory just keeps growing
<CustosLimen>and I'm seeing that as the source of the leaked memory
<CustosLimen>civodul, if it was to be garbage collected it would need to use GC_malloc - but it seems to be just using libc malloc
<cehteh>doesnt need so
<CustosLimen>?
<civodul>oh!
<CustosLimen>civodul, see the reason why I'm woried to beging with is because memory consumption is just growing
<CustosLimen>using 2.0.11 btw
<civodul>CustosLimen: what tool do you use on this paste?
<CustosLimen>civodul, umem
<CustosLimen>umem + mdb
<cehteh>i dunno how guile does that, but it could be that a GC collected object has internally some references to normal allocated objects, and its destructor takes care for a free then
<CustosLimen>cehteh, ok fair enough
<civodul>hmm no guix package for umem
<CustosLimen>cehteh, but if that is the case then something is dodgy as umem should have seen references
<cehteh>'could' .. but i dont know
<CustosLimen>cehteh, but yeah maybe
<CustosLimen>I will dtrace a bit maybe in there
<cehteh>read the source luke :D
<CustosLimen>cehteh, yea yea
<CustosLimen>;)
<CustosLimen>anyway I'm just looking for pointers if there are some
<civodul>oh that's terrible
<CustosLimen>civodul, what ?
<civodul>CustosLimen: make-regexp calls regcomp(3) and assumes that regcomp does not allocate anything internally
<civodul>which is wrong
<CustosLimen>\\o/
<CustosLimen>wew lads
<civodul>oh no
<civodul>it does have a finalizer that calls regfree
<CustosLimen>hmm ok
<CustosLimen>civodul, can you give me function anems
<CustosLimen>what is finalizer ?
<civodul>search for '^regexp_free' in libguile/*.c
<civodul>er, for '^regex_free'
<CustosLimen>ok
<civodul>CustosLimen: can you (1) come up with a reduced test case that reproduces the problem, and (2) add a printf in regex_free (or breakpoint) to see if it ever gets called
<civodul>it could be that regex_free gets called, but not frequently enough
<CustosLimen>civodul, yeah ok
<civodul>(because the GC doesn't know that there's a lot of memory associated with the regexp)
<CustosLimen>thanks for help - will get back a bit later
<civodul>davexunit: with Haunt, should one use (blog #:collections ...) to get articles by tag?
<davexunit>civodul: yes, I think so. one sec
<davexunit>I don't know if I have a handy procedure that will just generate a page for each tag
<davexunit>what are you looking for, exactly?
<civodul>exactly that, generating a page for each tag
<civodul>so that you can then list tags with links
<davexunit>I think there's a missing feature here. you can make atom feed pages for each tag, but the blog interface doesn't provide something equally convenient.
<davexunit>there is already a posts/group-by-tags procedure
<civodul>right
<civodul>so very little is missing
<davexunit>yeah
<civodul>hint hint ;-)
<davexunit>;)
<davexunit>it just doesn't fit into the collections thing because collections are declared up front.
<davexunit>the tags can't be known until you load the entire posts db
<davexunit>one sec...
<ijp>wingo: I need some help with closure conversion
<sneek>ijp, you have 1 message.
<sneek>ijp, catonano says: are you working on some cps compilation ? May I ask wat are you doing ?
<ijp>catonano: I have been trying to convert a guile->js compiler (or most of one) from the previous incarnation of (language cps) to the current one
<davexunit>civodul: I have not tested this in the slightest, but I think something like this is what you're after: http://paste.lisp.org/display/348655
<davexunit>you'd list in in your builders list like (blog-collection-per-tag #:whatever-keyword-args-you-want)
<davexunit>I can refine and add something like this to haunt proper sometime
<civodul>davexunit: thanks, i'll git it a try!
<davexunit>civodul: I like "git it a try" :0
<davexunit>:) rather
<civodul>oops! but yeah, that works ;-)
<davexunit>I think I'll start saying that when people ask me for git help
<civodul>:-)
<davexunit>civodul: let me know if you are able to make the hack work and I will integrate it into haunt proper sometime, probably instead as a #:tags? flag to the normal blog builder or something.
<paroneayea>I'm confused
<paroneayea>what does stream-lambda do sugar-wise?
<paroneayea>it seems like if I replace it with just a lambda with the same arguments I get the same result...
<paroneayea>I get what stream-cons does, but not stream-lambda
<paroneayea>oh, I guess it doesn't evaluate the first one yet.
<wingo>ijp: heya
<sneek>wingo, you have 3 messages.
<sneek>wingo, stis says: ping, how goes with the strip functionality vie -g0. Just curious what the state is.
<sneek>wingo, stis says: got guile-syntax-parse and guile-log working with guile - looks god, no severe issues.
<sneek>wingo, stis says: ping, how goes with the strip functionality vie -g0. Just curious what the state is.
<wingo>ACTION has been stuck with de-indirecting structs for a while, been a real mental blocker :P
<wingo>ijp: how can i help?
<ijp>wingo: I was just away to hit 'send' on a mail
<wingo>hehe
<wingo>i should read my mail then
<ijp>well, basically, I've been trying to update my javascript compiler from cps-old to cps-soup. Since I don't have a working master, I've been trying to do it on the two year old branch
<ijp>This has been mostly fine as a temporary measure, most of the code is going to translate with no issue, except that I don't have closure conversion
<ijp>I tried to see if I could get the current module to work with the old code, but that has not really produced anything
<ijp>as a temporary measure, I could reimplement a dump converter, but it seems like a waste to do that
<ijp>dumb*
<ijp>so basically I was wondering if you could think of any changes that would be preventing me from using the current converter
<ijp>as broad and unconcrete a question as that is
<ijp>or better, if you have any insight on to the build issue I posted to devel, since then I'd just merge
<wingo>regarding the build issue i responded just now ijp
<wingo>but unless you are making incompatible changes i would consider staying on stable-2.2
<wingo>dunno, life will probably be easier there
<ijp>well, I was having a similar issue on stable-2.2, but I am going to do a make clean before I say anthing else
<wingo>not just a make clean, do a "find . '*.go'" just to see
<ijp>right, that as well
<wingo>and check your environment
<daviid> potluck analytics
<sneek>Welcome back daviid, you have 1 message.
<sneek>daviid, catonano says: what do you mean with "kawa doesn't impose an eco system or you to compile" ?
<daviid>ACTION is dreaming guile grows up to having large user base and web site like continuum.io ... :)
<OrangeShark>daviid: a data science platform?
<daviid>sneek: later tell catonano compiling clojure is a nightmare, because you need lenigen or maven (don't recall I abandonned because precisely, you can 'just compile' and I did not want to have to learn thing i don't want to learn ... so in kawa, in a terminal: export CLASSPATH=.:./jars/youjar1.jar:./jars/yourjar2.jar; kawa -S yourkawa.scm just as easy as that, then in other kawa scheme file you can just 'import', like (import (utils))
<sneek>Will do.
<daviid>OrangeShark: an 'everything in guile' platform... :) not just science, gui, database, .. but actually we are on a good track, very good track, just a matter of time...
<daviid>sneek later tell catonano the compile command is 'kawa -C foo.scm' not kawa -S (I just did hit the wrong key while writing, it is -C you want ...)
<sneek>Will do.
<daviid>OrangeShark: then we'd have a page like this https://www.continuum.io/, download potluck... and change the world :):)
<OrangeShark>daviid: oh okay :)
***logicmoo is now known as dmles
***dmles is now known as dmioles
***dmioles is now known as dmiles
<daviid>wingo: as it is, does potluck includes what it needs from guix or does it require guix installed 'proper'?
<daviid>is it possible to use potluck to globally intall, i.e. in /opt ?
<catonano>so
<sneek>Welcome back catonano, you have 2 messages.
<sneek>catonano, daviid says: compiling clojure is a nightmare, because you need lenigen or maven (don't recall I abandonned because precisely, you can 'just compile' and I did not want to have to learn thing i don't want to learn ... so in kawa, in a terminal: export CLASSPATH=.:./jars/youjar1.jar:./jars/yourjar2.jar; kawa -S yourkawa.scm just as easy as that, then in other kawa scheme file you can just 'import', like (import (utils))
<sneek>catonano, daviid says: the compile command is 'kawa -C foo.scm' not kawa -S (I just did hit the wrong key while writing, it is -C you want ...)
<catonano>daviid: thanks. Now I get what you mean
<catonano>daviid: I aso share your dream of having an all guile environment
<catonano>sneek later tell ijp: ah, a js compiler. Good luck !
<sneek>Okay.
<catonano>sneek: later tell daviid thanks. Now I get wat you mean
<sneek>Will do.
<catonano>sneek: later tell daviid I also share your dream of am all guile environment
<sneek>Will do.
<catonano>sneek: botsnack
<sneek>:)
<dsmith-work>Why is it that every language/platform/environment seems to have this unstoppable urge to reinvent Make ?
<cmaloney>because Make works really well for C-line environments and not so great for non-C environments
<cmaloney>that and Windows-based installs / compiles
<daviid>cmaloney: that is, to me, a false statement, not sure what made you beleive this
<sneek>Welcome back daviid, you have 2 messages.
<sneek>daviid, catonano says: thanks. Now I get wat you mean
<sneek>daviid, catonano says: I also share your dream of am all guile environment
<dsmith-work>I think there is some kind of relation to "Greenspun's Tenth" going on.
<cmaloney>experience with Java / JavaScript.
<dsmith-work>I apolgize for the rant.
<cmaloney>dsmith-work: heh
<dsmith-work>I just involved in doing an Android app, and there is yet another builder scripting thingy.
<dsmith-work>s/just /just got /
<daviid>I'll stick to autoconf/configure/make/texinfo till ... mayyyyybe I give it a go to potluck, to boost guile actually
<ijp>wingo: You must have been right about a stale .go, since the build is progressing fine
<sneek>Welcome back ijp, you have 1 message.
<sneek>ijp, catonano says: ah, a js compiler. Good luck !
<ijp>I'm still a little confused, but I'll make sure and respond on the thread