IRC channel logs

2013-05-17.log

back to list of logs

<nalaginrut>morning guilers~
<jmd>Somebody sent me a guile fragment where strings were compared with 'string=' I've never seen that before. I tthought equal? was the thing.
<ijp>well, there are stricter versions of equality that check types
<ijp>though I forget the difference between string= and string=?
<ijp>oh right, string= let's you specify subranges
<jmd>I see, thanks.
***ceverett is now known as zxq9
<dsmith>sneek, macros?
<sneek>Someone once said macros is http://hipster.home.xs4all.nl/lib/scheme/gauche/define-syntax-primer.txt
<dsmith>ijp, WHat is it about that you don't like?
<dsmith>Woah! 66 in #guile!
<ijp>people walk away with the idea that these are somehow good macros to write
<dsmith>ok
<ijp>when really it a lot of it is creative abuse
<micro__>ijp what would you recommend as a good macro primer?
<ijp>dybvigs syntax-case introduction is okay
<micro__>discovered: https://www.youtube.com/watch?v=5FlHq_iiDW0 yesterday
<ijp>but if it's syntax-rules you are after, it's kind of transparent isn't it?
<micro__>which was an 'aha' moment.
<micro__>macros - all new to me.
<ijp>(define-syntax-rule (foo bar) (baz quux zot))
<ijp>see (foo bar) replace with (baz quux zot). simple.
<micro__>mechanics are ok - it's 'proper'application
<micro__>there's lots of talk abot macros being abused (as your point concerning define-syntax-primer.txt)
<ijp>the rule of thumb is, if you think you need a macro, you are almost certainly wrong
<micro__>ok - will keep that in mind.
<ijp>you won't, no-one ever does
<ijp>it seems to be one of those lessons you learn the hard way
<micro__>a right of passage?
<ijp>I wouldn't go that far
<micro__>:)
<ijp>just plain old "everyone thinks they are special"
<ijp>the thing about macros is that they infect your code, and beget more macros
<micro__>do you have an example of code where macros are used judiciously?
<shanecelis>hey guilers
<shanecelis>I think I found a bug.
<ijp>What did you do? What did you get? What did you expect? What are you running? etc.etc.
<shanecelis>Yep, yep. https://gist.github.com/shanecelis/5599411
<shanecelis>Maybe this is the correct behavior. If it were strings, I'd probably expect similar behavior.
<ijp>well, you aren't allowed to mutate literals
<shanecelis>oh really?
<ijp>I think we give errors for that in strings now
<fbs>seems to work fine in .9
<shanecelis>I think doing similarly for typed array literals would be good.
<shanecelis>fbs: In .9, setting x doesn't overwrite y?
<ijp>doesn't happen here either
<shanecelis>Cool. Maybe I just have to update then.
<fbs>#f64(1.0 1.0 2.0)#f64(0.0 1.0 2.0)s
<shanecelis>This makes me wish I hadn't patched guile to allow for a reader macro that emits no symbols (I needed #line pragmas).
<shanecelis>Makes upgrading harder.
<wingo>#line pragmas, interesting
<wingo>i guess reader macros are the way to do that
<wingo>shanecelis: yes so those arrays are literals and thus may share storage
<wingo>we don't currently signal an error on mutation, but we should
<wingo>i think we will be able to do so in 2.2
<lloda`>+1 for we should, those are nasty errors
<wingo>we could do so in 2.0 with additional flags, but there's no space for those flags in pairs, and you would want to catch the pair case
<wingo>in 2.2, most memory is read-only and thus can be mprotected, and we can do the segfault dance to signal an error
<davexunit>is there a document anywhere that says what features 2.2 will bring?
<davexunit>or what is planned?
<wingo>not really -- it's mostly the new vm that doesn't have anythign central written about it
<ijp>it will smite the heads of our enemies
<wingo>there are a number of cleanups but those aren't interesting
<wingo>i hope to write about the vm soon, now that it's almost finished
<wingo>it's quite a bit faster and should have better memory usage
<wingo>and is an important step on the path to native compilation
<davexunit>I look forward to reading about it.
<davexunit>guile development is exciting. :)
<wingo>it's kindof a slog but some points are exciting, yes :)
<davexunit>as a bystander it's exciting. I can only imagine the challenging problems that need to be solved.
<davexunit>I don't know how much technical debt guile has.
<wingo>it has some, but not as much as it used to
<wingo>would be nice if we could use a generational gc at some point, but i'm not sure we will be able to
<wingo>a moving gc, i mean...
<davexunit>I find myself fighting with the gc when writing a "realtime" application
<davexunit>gc pauses hurt.
<wingo>yeah, understood
<davexunit>but that's a problem with any gc'd programming language.
<wingo>probably, yes; though the rust people seem to be having a good time reasoning about gc with types
<davexunit>oh interesting
<davexunit>the common technique to avoid gc runs is using pools, but sometimes that's hard to do.
<wingo>isolates sound interesting, like what the dart people do
<wingo>anyway, lots of fun things :)
<wingo>in the end you always have to tune for good performance, even with C++
<davexunit>yeah, imo my biggest issue that I've encountered so far is dealing with lots of floating point operations in Guile.
<davexunit>because of reasons you and mark_weaver have explained in the past.
<wingo>yep, need to do better in that regard
<wingo>there is quite a road to walk before we can have good fp performace
<wingo>*performance
<wingo>basically we need native compilation, and ideally adaptive compilation like what v8 does
<davexunit>v8 is quite the piece of work.
<wingo>yep
<civodul>Hello Guilers!
<wingo>heya civodul :)
***sethalve_ is now known as sethalves
<wingo>finishing up the ELF foo
<wingo>pretty stoked about this!
<civodul>wingo: excellent!
*civodul needs to look into all this
<wingo>yeah!
<wingo>or if not we'll talk at ELS :)
<wingo>hey, long weekend!
*wingo still doesn't have the hang of french holidays :)
<civodul>long weekend again, yep :-)
<civodul>yeah i guess i'll have to get an update from you at ELS
<wingo>yeah
<wingo>i think i'm going to rebase wip-rtl to a new branch and start merging trivial patches to master and submitting larger ones to guile-devel
<wingo>sound like a plan?
<civodul>wingo: yes, sounds good!
<wingo>i'll send some mails first with some perspective
<wingo> http://article.gmane.org/gmane.lisp.guile.devel/16370
<tupi`>how nice!
<fbs>nice writeup