Camelia, the Perl 6 bug

IRC log for #moe, 2013-04-03

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

All times shown according to UTC.

Time Nick Message
00:12 sivoais joined #moe
00:55 jnap joined #moe
01:55 sivoais joined #moe
02:47 moe [moe] stevan pushed 10 new commits to dot-moe: http://git.io/BToX5Q
02:47 moe moe/dot-moe 476acd1 Stevan Little: adding in self-literal node
02:47 moe moe/dot-moe 5510401 Stevan Little: should be using the proper sigil here
02:47 moe moe/dot-moe 4a00fc1 Stevan Little: ?: belongs in Any, not Boolean
02:50 moe [moe] stevan pushed 10 new commits to master: http://git.io/ma8Dgw
02:50 moe moe/master 544e51a Stevan Little: adding in self-literal node
02:50 moe moe/master c4b7c36 Stevan Little: should be using the proper sigil here
02:50 moe moe/master fce6fac Stevan Little: ?: belongs in Any, not Boolean
05:26 melo joined #moe
05:52 crux joined #moe
06:50 melo joined #moe
06:52 tobyink joined #moe
07:01 melo joined #moe
08:17 melo1 joined #moe
10:10 melo joined #moe
10:41 tobyink joined #moe
10:41 auggy joined #moe
12:07 arnsholt joined #moe
12:46 arnsholt joined #moe
13:04 jnap joined #moe
13:24 bluescreen joined #moe
13:25 sahadev joined #moe
13:31 moe [moe] prakashk force-pushed prakashk/explicit-coercion from 342de61 to 2e6df2a: http://git.io/FZb-TA
13:31 moe moe/prakashk/explicit-coercion b4b624d Prakash Kailasa: last one in a group of statements can end with semicolon
13:31 moe moe/prakashk/explicit-coercion 6e5a53c Prakash Kailasa: print parse errors when processing code from file or passed with -e option; assume reasonable defaults for all REPL options.
13:31 moe moe/prakashk/explicit-coercion 2e6df2a Prakash Kailasa: explicit coercion methods (Int, Num, Bool, Str) and operators (+ for Int, ? for Bool and . for Str). This breaks FloatLiterals in a small way (.2 should be written as 0.2 to mean a float number)
13:31 moe [moe] prakashk pushed 1 new commit to prakashk/explicit-coercion: http://git.io/zCY4VQ
13:31 moe moe/prakashk/explicit-coercion fe93e6a Prakash Kailasa: handle comments
13:33 moe [moe] prakashk pushed 1 new commit to prakashk/explicit-coercion: http://git.io/JGiIHQ
13:33 moe moe/prakashk/explicit-coercion 81e4a15 Prakash Kailasa: remove commented code
13:36 masak heh, prefix:<.>
13:36 masak it makes a weird kind of sense. I like it!
13:36 masak Moe: half Perl 5, half Perl 6. 100% cop.
13:40 moe [moe] prakashk opened pull request #75: Explicit coercion and a few other minor changes (master...prakashk/explicit-coercion)  http://git.io/fSkmoA
13:46 jasonmay stevan: no love for my class matchers? :)
13:47 jasonmay I should beef up the matchers some more
14:01 am0c joined #moe
14:01 stevan class matchers?
14:02 jasonmay thisclass should haveMethod ("foo")
14:02 jasonmay etc
14:02 jasonmay if you use the ClassMatchers trait in the sui9te
14:03 stevan oh
14:03 moe [moe] stevan pushed 1 new commit to master: http://git.io/8utFUA
14:03 moe moe/master df5c166 Stevan Little: Merge pull request #75 from MoeOrganization/prakashk/explicit-coercion...
14:03 stevan I totally forgot about those
14:12 moe [moe] stevan pushed 1 new commit to master: http://git.io/Te5Z4g
14:12 moe moe/master c516dba Stevan Little: context class
14:25 moe [moe] stevan pushed 7 new commits to dot-moe: http://git.io/y1IxNg
14:25 moe moe/dot-moe 09a773a Prakash Kailasa: last one in a group of statements can end with semicolon
14:25 moe moe/dot-moe 72fd1bc Prakash Kailasa: print parse errors when processing code from file or passed with -e option; assume reasonable defaults for all REPL options.
14:25 moe moe/dot-moe 6d76983 Prakash Kailasa: explicit coercion methods (Int, Num, Bool, Str) and operators (+ for Int, ? for Bool and . for Str). This breaks FloatLiterals in a small way (.2 should be written as 0.2 to mean a float number)
14:31 tobyink joined #moe
14:44 gizmomathboy joined #moe
16:13 umask001 joined #moe
16:18 sahadev joined #moe
16:25 stevan so question for the group
16:25 stevan https://gist.github.com/st​evan/235d99609194bc4294bf
16:25 stevan which one do you like best, arrow or dot
16:28 perigrin classes are getting the ^ sigil?
16:28 jasonmay dot looks best to me
16:29 jasonmay in that example
16:29 rafl the dot together with the -> for function literals seems odd to me
16:29 perigrin especially wiht the -> operator in the params to traverse
16:29 jasonmay granted I have been writing ruby the past year
16:29 perigrin rafl: see I thought the other way :)
16:30 * phaylon is in team dot
16:30 jasonmay only part that is throwing to me is $.attr.foo
16:31 jasonmay but I could live with that
16:31 perigrin jasonmay: see I've always seen $. as having an invisible "this"
16:32 perigrin $this.parent.foo
16:32 perigrin has $this.foo;
16:33 phaylon but $.foo points directly at the attr, not a method though, right?
16:33 jasonmay that makes me imagine foo as a method
16:33 phaylon so maybe $privates.foo :)
16:33 stevan perigrin: thats a temporary thing (the ^)
16:33 perigrin phaylon: yes but again I did some hard time in Java so I wasn't weirded out by that either.
16:34 stevan could change it to $!foo
16:34 stevan which is the more proper private
16:34 phaylon well, they're more in the "know your identifiers" and less "let the sigil talk to you" camp :)
16:34 perigrin stevan: fair enough ... I liked your pre-moe suggestion of ^ as the meta sigil.
16:34 stevan p6 style
16:34 phaylon yea
16:34 jasonmay oh right $.foo in p6 is an attr with an accessor isn't it
16:34 phaylon and ! does have a dot :)
16:34 stevan yeah
16:35 masak as a p6er, I'm most thrown by the combination of '$.attr' and '$obj->method' :)
16:35 stevan yeah
16:35 masak to me, those are in some sense "the same" semantics.
16:35 stevan I dont like the pointy sub with -> methods
16:35 masak so it should be '$->attr' or '$obj.method' :P
16:35 stevan and I don't like $.foo with . methods
16:36 phaylon btw, I assume class { method foo { return $.bar } has $.bar = 23 } will work, which is why they aren't simply normal lexicals?
16:37 jasonmay I think that does work
16:37 stevan yeah it should work
16:37 phaylon right
16:38 jasonmay and will work
16:38 stevan so is no one in support of ->?
16:38 masak in Perl 6, 'has $.bar' means something much like 'has $!bar' (private), plus 'add implicit accessor method if there isn't already one'.
16:39 doy i agree with masak about $.foo vs $thing->foo
16:39 doy being weird
16:39 masak so 'return $.bar' is completely fine, since it's a method call.
16:39 doy the reasoning for the $.foo syntax is that it looks like a shorthand for $self.foo
16:40 stevan https://gist.github.com/st​evan/f511018440e6a2f52830
16:40 stevan s/$./$!/
16:40 jasonmay perfect!
16:41 stevan I kinda like the colon
16:41 stevan https://gist.github.com/st​evan/74ad8384114ff3ebca59
16:42 perigrin try •
16:42 perigrin fuck with people.
16:42 stevan haha
16:42 masak by the way, there's a subtlety in the syntax around '$.foo' that took us years to notice -- does '&.foo()' call the accessor, or the thing returned by the accessor? in Perl 6, it does the former, and you have to use '&.foo.()' or equivalent for the latter.
16:42 stevan right, I remember that one
16:43 masak haha, the colon. Perl 6 used to have that for private attrs. :)
16:43 stevan why was it changed?
16:43 masak I don't remember. lemme ask on #perl6.
16:44 phaylon stevan: is 'self' a lexically bound keyword? I see you're using it in a pointy sub
16:44 perigrin because Rule #3 Larry get's teh colon.
16:44 stevan phaylon: yes
16:44 masak might be recorded in the amendments to the Apocalypses, actually. I'll check.
16:44 phaylon ah
16:44 stevan it plucks the current invocant out of the environment
16:45 phaylon nice
16:45 masak no, it just says "We've change the : twigil to !" :)
16:45 masak [sic]
16:46 masak Apocalypse 12 is full of the $:foo form.
16:46 masak if I had to *guess*, I would guess that '.' and '!' rhyme better with each other, and '!' kinda screams "private, hands off!"
16:47 stevan yeah
16:47 masak from a purely literary point of view, ':' is kinda odd.
16:47 stevan well I think : and . work well too
16:47 masak sure.
16:47 * stevan ponders
16:47 stevan I am always hesitant to fly off course
16:48 perigrin masak: from a litterary point of view ; is a horrible line terminator
16:48 perigrin and $.foo is even worse
16:48 masak moritz++ points out that we do use the ':' twigil, but it's kinda unusual: '$:foo' is an implicit named parameter.
16:48 phaylon also, $:foo is now an auto-named thingy, right?
16:48 masak yes :)
16:48 phaylon yea, that :)
16:48 masak it's new compared to A12.
16:49 phaylon even with just :$foo and :foo($bar) it gives : a semantic meaning that people would transfer to $:foo as well if thdy see it
16:50 stevan well I don't plan on supporting the autonamed parameters
16:51 perigrin do you plan on supporting $!foo vs $.foo in the perl6 sense?
16:52 stevan yeah, probably
16:52 perigrin then you probably want a pair of twigils that compose nicely :)
16:52 perigrin and that upgrade nicely to perl6
16:52 stevan $:foo and $.foo dont work for you?
16:53 perigrin it doesn't get around the issues you're having with $.foo already no?
16:54 masak why pick '$:foo' when Perl 6 already rejected it in favor of '$!foo'? that feels like giving the infix:<~~> operator an antiquated behavior just because.
17:00 masak stevan: or, like this. as a p6 user I would use Moe and '$:attr' without grumbling. it's just syntax. but I would silently wonder why you didn't go with '$!foo' when you had the chance. :)
17:02 stevan masak: yeah the perl 6 compat is the winning argument really
17:03 perigrin masak: as a Moose user I silently wonder why you made non-private the easier syntax in perl6 ... so it's fair :)
17:04 PerlJam perigrin: to encourage people to use their accessors of course
17:05 perigrin fair enough, are these read-only or read-write accessors?
17:05 PerlJam by default read-only.
17:06 perigrin is there a different twigil for read-write? $¡foo? (Is that only for spanish?)
17:06 PerlJam heh.
17:07 PerlJam no, just "is rw" in the decl.
17:07 PerlJam has $.foo is rw;
17:07 sahadev i think, as a general guiding principle, if Moe is deviating from Perl5 syntax or introducing new syntax missing in Perl5, it should ask WWP6D and go with the P6 answer.
17:08 doy well
17:08 doy maybe
17:08 PerlJam sahadev: or at least not make any syntactic decisions that would preclude the P6 answer.
17:08 sahadev PerlJam: yes.
17:08 doy perl 5 tried that already, and it got them in kind of a mess
17:08 doy there are a lot of things in perl 6 that don't really make sense in isolation
17:09 PerlJam doy: it wasn't the syntax that was the problem, but the semantics :)
17:09 stevan sahadev: I agree, but would append "within reason" to the end
17:09 sahadev doy: that's why I said "guiding principle", not a rule :)
17:09 sahadev exceptions apply when it makes sense.
17:13 masak right. my reaction about '$:foo' was because I didn't see the reason to deviate from what Perl 6 already does well.
17:17 moe [moe] stevan created arrow-moe-archive from master (+0 new commits): http://git.io/4-2Wnw
17:18 stevan probably did this all wrong, but dot-moe is now master
17:18 moe [moe] stevan force-pushed master from 5a54d79 to f584c65: http://git.io/KPdMbA
17:18 stevan I most likely screwed up people's history
17:18 stevan sorry
17:25 doy for what it's worth, the right way to do that without breaking things is to do "git merge -s ours master" on the dot-moe branch (which will make master an ancestor of dot-moe without changing the contents of the dot-moe branch at all), and then merge dot-moe into master, which will then be a fast-forward
17:26 stevan ah
17:26 stevan sorry
17:26 masak doy++ # hadn't seen it expressed like that before
17:31 PerlJam stevan: don't apologize so much.  innovators and early adopters should *expect* breakage in various forms  :)
17:34 stevan PerlJam: sorry
17:34 stevan :P
17:34 PerlJam :)
18:57 awwaiid ok... just to throw this out there, why do we need the . between the $ and the instance variable at all? $foo is just lexical-instance-scoped
18:58 tobyink joined #moe
18:58 awwaiid seems annoying that I have to repeat that fact every time I use the variable
18:58 doy that is how scala views things, and it is rather nice there
19:00 stevan awwaiid: well, thats how p5-mop did it too, but honestly it creates a bunch of edge cases
19:00 awwaiid do tell
19:00 stevan well first of all
19:00 stevan method accessor ($foo) { $foo = $foo }
19:00 stevan method accessor ($foo) { $.foo = $foo } is nicer
19:01 awwaiid that's definitely the first one that came to mind, accessor/constructor verbosity
19:01 awwaiid method accessor ($foo') { $foo = $foo' }
19:01 stevan yuk
19:02 stevan :P
19:02 awwaiid ok, then let : be part of var names
19:02 awwaiid method accessor ($:foo) { $foo = $:foo }
19:02 awwaiid (brainstorming)
19:02 jasonmay we're just spitballin here
19:02 stevan this is where the whole "try not to deviate from Perl 6" comes in
19:02 awwaiid you broke my perl5 maybe I'll break your perl6 :)
19:02 stevan but what is the difference between
19:03 stevan method accessor ($:foo) { $foo = $:foo }
19:03 stevan and
19:03 stevan method accessor ($foo) { $:foo = $foo }
19:03 stevan mine saves one charcter
19:03 awwaiid the difference is that I'll probably use the accessor a lot more often
19:03 awwaiid er
19:03 stevan awwaiid: you already have a perl 5
19:03 awwaiid the instance var
19:03 stevan true
19:04 stevan but I already saved you $self->
19:04 awwaiid I do liek that
19:04 stevan so I think I have some to spare
19:04 stevan and . vs ->
19:04 stevan 1/2 as fast to parse
19:04 stevan or twice as not-slow
19:04 awwaiid you know what they say ... give 'em an inch...
19:06 awwaiid did you run into other edge cases?
19:11 awwaiid damnit, I keep half typing a suggestion before realizing that I'm just describing ruby and that isn't quite what I want either :)
19:13 stevan awwaiid: the other issue is closures
19:13 stevan basically variable name clashes
19:13 awwaiid where you want to switch back and forth between closed and unclosed?
19:13 stevan true, less of an issue
19:13 * awwaiid notes that closures are the way to his heart
19:15 stevan awwaiid: tell you what, you can change the -> ($x) { ... } if  you want :)
19:16 leedo joined #moe
19:20 awwaiid pft. trying to trick me by giving me something that is already beautiful
19:21 masak fwiw, in Perl 6, the '!' in '$!foo' is *optional*. but epsilon people actually jump at using that.
19:21 masak having the twigil indicate object scope is just plain nice, IMO.
19:21 awwaiid well, I just want my suggestion of eliminating the addition of scope-indicator-twigil since it doesn't appear strictly necessary to be on the official record :)
19:22 masak object scope is weird.
19:23 awwaiid devil's advocate: should there be a twigil for other scopes -- class, file, dynamic, (method, loop)?
19:23 jnap joined #moe
19:24 masak again, feel free to have a look at the prior art on this: http://perlcabal.org/syn/S02.html#Twigils :)
19:25 kthakore hallow
19:26 awwaiid thanks masak, I don't think I ever read it all layed out this way, or at least not in a long time
19:30 kthakore hi awwaiid
19:30 awwaiid greetings kthakore
19:38 moe [moe] stevan pushed 1 new commit to master: http://git.io/0yvIOg
19:38 moe moe/master 2f93a5b Stevan Little: add in %ENV
19:46 moe [moe] stevan pushed 1 new commit to master: http://git.io/hvd8XQ
19:46 moe moe/master 55b92f5 Stevan Little: adding exit()
19:49 sahadev don't mean to muddy the waters further by bringing up another issue, but I think this is probably a trivial one. What should "@a1 == @a2" mean in Moe? Is it the P5 semantics we want here (true if both arrays have same length), or do we want to test for equality at deeper, elemental level?
19:50 stevan hmm
19:50 stevan good question
19:54 sahadev P6 offers 'eqv' for the latter
19:56 masak ...with the rationale that '==' numifies, so "compare length" makes a lot of sense :)
19:57 sahadev right
19:58 sahadev perhaps, I should go with the "guiding principle" that I mentioned earlier, and assume the question moot :)
19:58 stevan sahadev: this is where your original ContextInTheAST proposal would come in handy
20:01 sahadev yes
20:13 Tene joined #moe
20:37 bluescreen joined #moe
21:22 moe [moe] stevan pushed 3 new commits to master: http://git.io/r3DLYA
21:22 moe moe/master 88e3909 Stevan Little: if/elsif/else is now working
21:22 moe moe/master 70bffb4 Stevan Little: cleaning up the try/catch/finally
21:22 moe moe/master 034b446 Stevan Little: while/until loops and tests
21:22 am0c joined #moe
21:27 moe [moe] stevan pushed 1 new commit to master: http://git.io/MVTJcw
21:27 moe moe/master c178a42 Stevan Little: delete this comment
21:48 bluescreen joined #moe
21:55 gizmomathboy joined #moe
22:17 melo joined #moe

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