IRC channel logs

2013-07-29.log

back to list of logs

<taylanub>davexunit: Untested and unproven but I'm very confident that this API is thread-safe *IF* there is only one enqueuing and one dequeuing thread: http://sprunge.us/SSCi
<davexunit>thanks taylanub
<taylanub>I might or might not have invented something new here, it was much trickier than what the vague idea in my mind seemed to be. :P
<davexunit>for now I've put this on the backburner and moved on to refactoring my game loop to be pure functions.
<taylanub>Inevitably, the untested code had a silly mistake; fixed but still untested version: http://sprunge.us/jRNY :P
<amgarching>Hi, guilers! Is there a possibility to re-use built-in guile parser to "read" a string eventually containing #-comments. Example between ^ and $: ^symbol 1 2.0 "some # string" # comments$
<taylanub>The reader does allow some configuration, to define new # syntax, but no idea if you could abuse that feature to make it start a comment that goes until the EOL.
<taylanub>amgarching: Apparently with `read-hash-extend' you could *almost* do it; would it be acceptable if instead of just "#", the comment syntax was "##" or so ?
<amgarching>it would need to be ##(comments built of valid scheme objects)$ I think
<taylanub>Any reason you're not just using normal s-expression syntax, BTW ?
<taylanub>With ; and #| |# for comments.
<taylanub>And #; to comment out an object.
<dsmith>In guile, it's #! and !#
<dsmith>too
<taylanub>Indeed. (#| |# is now (R7RS) standard though.)
<taylanub>And apparently #! !# don't nest, while #| |# do.
<dsmith>Oh? Didn't realise that
<taylanub>Just tested ..
<dsmith>#! is sweet for scripts
<taylanub>Yeah, that was the original purpose I think, I would probably limit my usage of it to that.
<amgarching>Text format is given, example: http://dasher.wustl.edu/ffe/distribution/params/oplsaa.prm Currently I am foced to string-map! replacing # -> ; before "read"ing. This would affect strings too.
<amgarching>*forced
<taylanub>Yeah, that's no good.
<taylanub>I see a block of human text under "Literature References" .. looks like that file isn't meant for machine consumption.
<taylanub>Although the rest seems fine.
<amirouche>what about guile reader ?
<taylanub>As a hack, you could indeed define ## to start a comment, since from what I see the file always has at least two hashes for when it has any at all.
<amgarching>Yea, I was searching for how the original program deals with this section. It appears to "just ignore" everything that does not start with a valid keyword. Also a valid, though fragile procedure ...
<taylanub>I bet a biologist wrote the code ? :P
<amgarching>In other files there are real end of line comments introduced by single "#".
<taylanub>(Uh, chemist rather ?)
<amgarching>that is fortran, so whoever wrote it didnt bother much with the issues we discuss here
<taylanub>Hrm, using an s-expression reader for this format will be just endless pain .. maybe the grammar tools of Guile can help.
<jave>anyone using guile with mingw? i found some recent threads about it, but it was difficult to figure out if its usable now or what.
<taylanub>I think wingo was working on that, and I reckon em being successful, but I don't know more than that.
<jave>well, Ill have to try the compile then
<dsmith-work>I got the impression that cross compiling to mingw was in better shape than native compiling under cygwin. There was a bunch of activity there a few months ago.
<dsmith-work>jave: Check the mailing lists...
<dsmith-work>Look for Eli Zaretski (Eli Z....)
<jave>dsmith-work: yes I read those, I didnt get a feeling for if the issues were resolved or not. I can ask Eli though, now that I think about it.
<wingo>moo
***fangism-hawngry is now known as fangism
<dsmith-work>wingo: moo indeed
<add^_>:-D
<alexei___>is substring/shared which is "Like substring, but the strings continue to share their storage even if they are modified. Thus, modifications to str show up in the new string, and vice versa" going to be supported for some time? Or is it already doomed?
<taylanub>alexei___: Why should it be "doomed" ?
<wingo>alexei___: it's certainly not among the most performant parts of guile :/
<alexei___>I may confuse things, but somebody didnt like it being there
<wingo>alexei___: i think you should assume that it sticks around but that its performance will be relatively bad
<wingo>dunno though
<wingo>if it's holding back some other part of guile, it will be difficult to argue for it, and it's easy to imagine such situations
<wingo>mutable strings in scheme are a mistake.
<alexei___>any less convoluted way to replace # -> ; but leaving "symbols" like c# unchanged? http://pastebin.com/0VXkijsH Here mutability may be a good thing.
<davexunit>I don't see how mutability would give you any advantage
<alexei___>a string-fold adding a char at a time is kind of scary. Are there better ways to inrementally build strings?
<davexunit>you probably want to take advantage of regular expressions or other such functions