IRC channel logs

2014-08-24.log

back to list of logs

<mark_weaver>dje42: I can't reproduce the problem on my system either
<mark_weaver>(here I'm running GNU Guix, which is nearly unmodified latest upstream GNU code)
<dje42>thanks for trying!
<mark_weaver>on a dual-core 32-bit 686
<mark_weaver>it's interesting that they report having gdb hang before even running the program
<mark_weaver>when you run "gdb ./test" how much of the program is run before the gdb prompt?
<dje42>Yeah, my theory is that is a typo. All gdb does is do an initial read of the debug info, the program is not run. Nor are any shared libraries loaded yet, so gdb doesn't even know if the app is multithreaded (since libpthread hasn't been loaded yet).
<mark_weaver>the reason I ask is because, although the bug report summary suggests that the problem happens only on multi-threaded programs, but that seems like a red herring here.
<mark_weaver>dje42: do you know about the mechanism by which libgc suspends all threads before running garbage collection?
<mark_weaver>I don't know the full details, but basically it uses rarely-used signals (e.g. SIGPWR) to get all threads in the signal handler before running GC.
<mark_weaver>I wonder if this is causing problems with GDB.
<dje42>I know I dug into the mechanism once ... alas not much stayed in cache.
<mark_weaver>we should probably find out what version of libgc are being used by those who see the problem.
<dje42>Indeed!
<mark_weaver>and also what version of guile
<dje42>Yeah. I added that to the bug report. I"m hoping someone replies with the data.
<mark_weaver>it would also be good to ask for clarification: are people really seeing this hang before they even run the program?
<mark_weaver>well, I see that you've essentially asked that question already.
<dje42>fingers crossed that someone replies with good data
<mark_weaver>dje42: btw, the gdb manual says that you add a prefix when importing (gdb), you can use (use-modules ((gdb) #:renamer (symbol-prefix-proc 'gdb:)))
<mark_weaver>a nicer way is this: (use-modules ((gdb) #:prefix gdb:))
<mark_weaver>sorry, it's gdb/guile/README where I saw that
<dje42>I don't remember ever reading about #:prefix. Nice though.
<dje42>guile doc bug?
<mark_weaver>hmm, yes, you're right
<mark_weaver>the docs for 'resolve-interface' at least mention the other options #:hide, #:prefix, and #:version, but don't describe what they do, and use-modules should mention all of them.
<dje42>mark_weaver: Someone mentioned that the lockups occur with libgc 7.4.2 but disappear with libgc 7.2d.
<mark_weaver>dje42: ah, interesting. I'm using 7.4.0 at the moment.
<mark_weaver>(and cannot reproduce the problem)
<mark_weaver>dje42: I can reproduce the gdb hang bug on my system when using libgc-7.4.2.
<mark_weaver>the problem does not occur with libgc-7.4.0
<mark_weaver>the problem happens after "run". I see a single "hello world!" and then it hangs.
<dje42>Thanks. Good to know.
<mark_weaver>I guess a bisect on the libgc source might be warranted
<daviid>mark_weaver: i made the suggested change [fuilds.c], but it did not solve the problem
<mark_weaver>daviid: okay, thanks for trying. since we last talked I looked more carefully and found some other thread-safety problems with the garbage collection of fluids
<daviid>the full trace is the same, i don't think it's worth sending it
<daviid>ok
<mark_weaver>daviid: for now, you could work around the problem by using my alternative implementation of par-map
<daviid>for info i did a git pull before the change and i'm now on 2.0.11.61-c6a7-dirty
<daviid>ok, i have to find it i don't think i have it anynore
<daviid>should i revert the change then [SCM_UNDEFINED...]
<mark_weaver>might as well
<daviid>ok, do you have the patch at your hand [the par-map one]
<mark_weaver>yeah, I can find it.
<daviid>anyway i am exhauted, have to rest, be back tomorrow or monday
<mark_weaver>okay, sleep well!
<daviid>ah great could you send it to me by email?
<mark_weaver>will do
<daviid>tx, good night too
<lemur_with_banan>mark_weaver, wingo doesn't seem to be in this channel often any more though.
<lemur_with_banan>What is his position any way that he knows so much.
<lemur_with_banan>THat you kneel in reverence to his knowledge.
<mark_weaver>well, he's the one who implemented partial continuations in guile, and so he's familiar with that part of the code.
<mark_weaver>*delimited continuations
<mark_weaver>but more generally, he's contributed more code to guile than anyone else
<mark_weaver>but "kneel in reverence to his knowledge" is a bit of a stretch. what I actually said was that wingo was a better person to ask about this.
<lemur_with_banan>Yes, but it does sound dramatic and stuff.
<lemur_with_banan>I did not even know guile had delimited continuations.
<mark_weaver>I might guess that non-continuable exceptions make sense because sometimes the code throwing the error doesn't have any sensible way to continue.
<lemur_with_banan>Hmm, to me at least it makes more sense that that is a property o the handler inspecting the condition than the site that raises the condition.
<mark_weaver>I don't know why you would say that. the code throwing the exception is what has to know how to continue, and thus it's the code that knows whether it's feasible to be continuable.
<lemur_with_banan>Well, the code that throws the exception is often a library function
<lemur_with_banan>Well, let'sput it like this, a specific use case, list-ref, throws an exception when it's out of bounds.
<lemur_with_banan>But if I know for a fact that the list only contains numbers, I might just want it to return #f
<lemur_with_banan>In which case the handler for whatever exception it throws can do that.
<lemur_with_banan>Truth be told though, I'm thinking a system of lexical rather than dynamical exceptions might be better suited for this.
<taylanub>lemur_with_banan: you can catch an uncontinuable exception like out-of-bounds and provide an alternative value; it's just that you don't need to tell the procedure throwing that exception that it needs to return that
<taylanub>so list-ref itself can't continue, and tells you so, but you're free to continue your own procedure after that with whatever value you want instead of what you wanted list-ref to give you
***karswell` is now known as karswell
<tadni>Guile really might need to work on it's marketing and/or what make it easier of people to be aware of relevant projects. I was just watching https://www.youtube.com/watch?v=VADudzQGvU8 and Perry proposed that basically to implement a new Lisp in the same way Guile Emacs is doing it.
<tadni>I think the problem is historical baggage. In the comments someone makes him aware of Guile's attempt to do just what he is pleading the community to work on and he says "I've been aware of Guile and that plan since Guile was built many many years ago -- it is going nowhere, and probably should be ignored."
<lemur_with_banan>tadni, scheme in general I feel.
<lemur_with_banan>There is essentially _no_ entry level literature almost on modern scheme.
<lemur_with_banan>I
<lemur_with_banan>I've been wanting to write a tutorial for a while, just never got to it.
<lemur_with_banan>I'm also not the most qualified person.
***lemur_with_banan is now known as french_cheese
<tadni>french_cheese: How entry level?
<french_cheese>Like your typical tutorial explaining python or ruby.
<french_cheese>tadni, how did you learn scheme?
<tadni>french_cheese: Well, still in the process -- but my introduction was more-so messing around with DSL in it. Guix was great to get my toes wet.
<french_cheese>tadni, that's how most seem to have learnt it, by hacking around until they got it or very outdated things like SICP which don't really teach modern scheme
<tadni>I typically write while I learn and have a bit of a general introduction in Scheme. That being said, language introductions are a bit lame -- what I would rather see is a more introductory early HS level intro to Compsci in scheme.
<french_cheese>That doesn't really serve to make scheme significantly more marketable though.
<french_cheese>Like, 80% of the people whom I know that work scheme have written a scheme interpreter in scheme.
<french_cheese>That use scheme*
<tadni>french_cheese: Writing a interpreter makes is more marketable of a lang?
<french_cheese>I'd really love for there to be a book on modern scheme like say real world ocaml.
<french_cheese>No, I mean, 80% of the people who use scheme seem to have relatively advanced knowledge about the language.
<french_cheese>As in, there seems to be nothing that teaches entry level knowledge for those that simply want to start from the ground up and have never used scheme before but want to learn it.
<tadni>french_cheese: Ah. Well it's complexly simple. One can sit down and learn everything they need to learn about it's core.
<ijp>modern scheme?
<french_cheese>One can, but there's no literature for it.
<ijp>never heard of it
<french_cheese>ijp, as in, not what it's in SICP.
<tadni>french_cheese: From the ground up, meaning prior programming knowledge?
<french_cheese>ijp, with modules, record types, standardized exceptions.
<ijp>tspl4
<french_cheese> https://realworldocaml.org/v1/en/html/a-guided-tour.html this is a really good book
<ijp>but that's still not enough to write a "Real World" book
<ijp>maybe a real world racket, or a real world guile, or a real world chicken. but not a real world scheme
<ijp>maybe in 5 years time, but I wouldn't hold my breath
<tadni>In 5 years time, will most implementations even be on R7RS?
<tadni>Or maybe 8, if they get to it by then ... doubtfully.
<french_cheese>ijp, it's not about the real worldness but about how well it explains it.
<ijp>tadni: implementations may support it, but that is a very different thing people using it
<ijp>french_cheese: have you checked The Scheme Programming Language
<ijp>it should be available online
<french_cheese>Yeah, I know it
<tadni>ijp: Well, I mean if you preferred implementation switches to it -- I'd think the individual using such implementation would be using it. :^P
<french_cheese>That's close to a language specification
<ijp>tadni: not really
<ijp>proof: r6rs
<french_cheese> http://www.scheme.com/tspl4/intro.html#./intro:h1 I mean,
<ijp>Qed.
<ijp>anyway, I hope Real World Ocaml grows old more gracefully than Real World Haskell did
<tadni>ijp: Besides racket though, how many big implementations are using R6RS though? :^P
<ijp>whole chapters of that are worthless now
<french_cheese>That basically almost assumes you already know scheme and just want it rigorously defined.
<ijp>tadni: define big implementation
<french_cheese>tadni, you mean attempt to support it?
<ijp>ikarus was, racket does, we try to, chez did, larceny did
<french_cheese>Racket's default mode does not conform to r6 in many ways, it has an r6 mode which is typically caleld with a different executable.
<tadni>ijp: Why "did"?
<ijp>poor choice of words
*tadni would like to see a resurgence of Scheme in-general as an introductory lang.
***french_cheese is now known as shilliamwatner