Perl 6 - the future is here, just unevenly distributed

IRC log for #testml, 2012-12-28

| Channels | #testml index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 GitHub139 [testml-tml] ingydotnet pushed 1 new commit to coffee: http://git.io/EJfCNw
00:00 GitHub139 testml-tml/coffee 6d90c27 Ingy döt Net: add spec
02:50 rking Random TestML question, about the "implicit loop" syntax.
02:51 rking If you say: *text.uppercase == *upper
02:51 rking Could you ever say: *text.uppercase == upper
02:51 rking Or text.uppercase == *upper
05:29 ingy rking: well no for 2 reasons
05:29 ingy it compiles to something like this:
05:32 ingy BlocksWithAllPoints('upper', 'lower').each {EQ(uppercase(Point('text')), Point('upper')}
05:32 ingy some blocks may not have both points
05:33 ingy and *foo also means Point('foo') # for current block
05:33 ingy make sense?
05:35 ingy I think you can actually override the GetBlocks behaviour
05:35 ingy in TestML.pm
05:35 ingy GetBlocks('a', 'b', '!c')
05:36 ingy sec
05:50 ingy nah, looks like I didn't expose it
05:50 ingy although reading through TestML.pm is great
05:50 ingy I put good stuff in there
05:52 ingy I like the idea of adding .Each
05:53 ingy I already have (){} function definers
05:54 ingy foo ={…}
05:54 ingy so no reason that this wouldn'
05:54 ingy t work:
05:54 ingy foo({…})
06:01 ingy hrm
06:01 ingy I just thought of something big I need to decide on
06:02 ingy so in your bridge class
06:02 ingy you say
06:03 ingy def uppercase(string); return string.upcase; end
06:03 ingy but that's not how testml.pm works
06:04 ingy string is not a real perl string
06:06 ingy iit's a TestML::Str object
06:07 ingy def uppercase(string); return string.value.upcase; end
06:08 ingy but it might be worse...
06:08 ingy def uppercase(context, string); return string.value.upcase; end
06:08 ingy context gives access back into the state of the TestML system
06:09 ingy but basically that could be $self
06:09 ingy grr, need to break some eggs
06:10 ingy back to your thing
06:17 ingy *text.uppercase == *upper   _should_ be able to be written as   BlocksWith('text', 'upper').EachBlock({Point('text').uppercase.EQ(Point('upper'))})
06:19 ingy I can kinda see why {x|…} is preferable to (x){…}
06:21 ingy rking: ^^
06:22 rking ingy: It just doesn't seem very iteratey to me
06:23 rking Seems like it's splatting out the args as an array on both sides
06:24 ingy bbl
06:24 ingy but no, blocks on left, block on right
06:44 rking I don't get it.
06:44 rking The *foo and *bar are like, "instantiate a point here" and they imply a loop
06:45 rking Seems more scrutable to make the loop explicit and the var names stay the same
06:45 rking Unadorned, that is
17:43 ingy I think it works very nice in pratice
17:44 ingy most testml programs are one line
17:45 ingy what don't you get?
18:17 rking joined #testml
21:56 ingy rking: you know how 'a = func' doesn't call func in coffee?
21:57 rking ingy: Yes, that which I hate.
21:57 ingy I was just ruminating on: a = {func}
21:57 ingy a = &func
21:57 ingy is obvious
21:58 ingy anyway
21:58 ingy I've been thinking a lot today on testml call semantics
21:59 ingy I'll write up a little blurb on my current thinking
22:48 GitHub54 [testml-tml] ingydotnet pushed 1 new commit to coffee: http://git.io/hCKxMA
22:48 GitHub54 testml-tml/coffee 51b2bc5 Ingy döt Net: write up call semantics
22:48 ingy rking: ^^
22:55 rking ingy: Skimmed it; will try to read deeper later

| Channels | #testml index | Today | | Search | Google Search | Plain-Text | summary