Camelia, the Perl 6 bug

IRC log for #moe, 2013-02-08

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

All times shown according to UTC.

Time Nick Message
00:32 moe [moe] jasonmay pushed 22 new commits to jasonmay/sub-arguments: http://git.io/H_O34w
00:32 moe moe/jasonmay/sub-arguments fb3ccd9 Stevan Little: reorganize the literal syntax examples and add some more as well
00:32 moe moe/jasonmay/sub-arguments 90f0a30 Stevan Little: reworking the operator examples
00:32 moe moe/jasonmay/sub-arguments 4057286 Stevan Little: few more array literals
00:47 jasonmay that rebased kinda weird
00:47 moe [moe] jasonmay force-pushed jasonmay/sub-arguments from 2bc0380 to f8c9263: http://git.io/1lYnrQ
00:47 moe moe/jasonmay/sub-arguments 2617d3a Jason May: Make the interpreter a class instead of an object
00:47 moe moe/jasonmay/sub-arguments 113f501 Jason May: Pass arguments into subroutines
00:47 moe moe/jasonmay/sub-arguments c073267 Jason May: Move interpreter utils into its own file
00:54 stevan joined #moe
01:34 moe [moe] stevan pushed 2 new commits to runtime-improvements: http://git.io/VAuVAg
01:34 moe moe/runtime-improvements e8254f2 Stevan Little: adding in Range Literals to the AST and Interpreter (also adding tests)
01:34 moe moe/runtime-improvements 4e32d2d Stevan Little: added support for ranges (the parser bits could use work, but its doing what I want it to do)
01:34 stevan the spec/syntax-examples/ is a great motivator for adding features :)
01:39 perigrin expand the syntax-examples!
01:39 perigrin wait ... are things parsable yet?
01:44 jasonmay perigrin: yeah man! you should try out the REPL
02:31 jasonmay .oO( pluggable sigils, bound to custom objects )
02:31 jasonmay #sleepingpillinducedideas
02:33 doy honestly, i question the usefulness of sigils at all with the "everything is a reference, everything is an object" model
02:33 jasonmay exactly
02:33 jasonmay they are pretty much just for show
02:34 doy in perl 6, they actually are meaningless, except for imposing a restriction on the types of values that are allowed to be stored in the variable
02:34 doy and i think that really just makes things more confusing
02:37 hobbs well, having *a* sigil impacts things like string interpolation and figuring out whether you're talking about a variable or a method
02:37 hobbs it's more that they might as well all be $
02:37 jasonmay like php!
02:37 doy hobbs: yeah
02:39 jasonmay I am for all $
02:39 hobbs I want Moe to be the first language to actually use the ¢ sigil
02:39 jasonmay heh
02:41 perigrin hobbs: do that and london.pm will demand £
02:42 perigrin doy: unless you have a coercion thing like moritz was talking about the other day
02:42 hobbs and ¥ is only used for variables imported from Ruby
02:43 perigrin then $foo[0] vs @foo[0] ... the first would possibly be a coercion on the second into a scalar value as opposed to a list/tuple/arrayref
02:44 perigrin one of the things in my world that makes perl5 perl5 is variant sigils.
02:44 jasonmay without globs we can use * for referencing java classes maybe
02:44 stevan_ joined #moe
03:04 doy perigrin: yeah, maybe
03:09 sivoais joined #moe
03:09 stevan joined #moe
03:11 celogeek joined #moe
03:11 stevan joined #moe
03:24 sivoais joined #moe
05:14 am0c joined #moe
08:42 clintongormley joined #moe
10:03 tobyink joined #moe
11:56 clintongormley joined #moe
13:29 gizmomathboy joined #moe
13:35 tadzik https://github.com/MoeOrganizatio​n/moe/blob/master/spec/syntax.md seems to suggest that "for" always means a C-style loop, while "foreach" always means, well, foreach. Is that so, or is it just a coincidence?
13:38 masak it might be a worthwhile datapoint that Perl 6 keeps 'for' (for the list iteration syntax), invents 'loop' (for infinite loops and the C-style syntax), and deprecates 'foreach'.
13:47 stevan tadzik: just a coincidence
13:48 stevan those syntax examples are not complete yet
13:48 tadzik *nod*
13:48 stevan though I would lean more towards being consistent
13:48 stevan meaning either going the way of p6 and removing foreach
13:49 stevan or making foreach one construct and for another
13:49 stevan but no need to commit now
13:49 stevan at this point my goal is to get as much of that syntax working, we can work out fine details later
13:50 tadzik I like how you're mostly recreating Perl 6 but still telling everyone that it's just Perl 5 improved :P
13:51 stevan haha
13:51 stevan it is a radically simplified p6 if anything
13:51 tadzik this ways everyone jumps on the "Improve Perl 5!" wagon, while they won't every jump into the "implement Perl 6 wagon"
13:51 stevan shhhh
13:51 tadzik oh, that's fine, even awesome
13:52 tadzik sorry, didn't mean to blow your cover :P
13:52 stevan ;)
13:56 tobyink stevan: have you thought of something along the lines of NOT_MOE: { ... } as a way of introducing a block that will not be executed by moe?
13:57 tobyink So that if you want to write code using, say, try/catch that runs in both moe and perl5, you'd just do... NOT_MOE: { use Try::Tiny }
13:57 tadzik well, you need to parse the inner block anyway, don't you
13:58 tadzik to know where it ends, so you'll eventually need a full-blown Perl 5 parser
13:58 stevan tobyink: yes actually I have
13:58 stevan though I am not sure it would be able to do that
13:58 tobyink tadzik: I don't see why you'd need to parse the block any more than you need to parse qq{...} and then discard it.
13:59 stevan I was more thinking that it wouldn't be allowed to cross the gap
13:59 stevan so something like
13:59 stevan my $variable_in_moe = perl5 { $some_perl5_code };
13:59 tadzik what if the Perl 5 code has } inside?
13:59 tadzik you escape it?
13:59 tadzik how do you know if it's some crazy Perl 5 } or your perl5 block terminator?
13:59 stevan then $variable_in_moe->() could return a proxied Perl 5 data structure
14:01 stevan tobyink: I did this in OCaml once
14:01 stevan https://gist.github.com/st​evan/ce835d10395640410507
14:01 tobyink stevan: by "the gap" are you referring to embedded libperl within moe?
14:01 stevan yes
14:02 tobyink Because I'm not talking about that; I mean I want to write a polyglot module that can be used in perl5 and in moe. And I want to use try/catch.
14:02 tobyink So I want to be able to load Try::Tiny if running under perl5, but use built-in try/catch in moe.
14:03 stevan yeah, I wont say it is impossible, but it is not a design goal at the moment :)
14:03 tobyink There's always stuff like: use if ($^X =~ /moe$/), "Try::Tiny"; but that's pretty ugly.
14:04 stevan well
14:04 stevan so part of the (unreleased) grand plan
14:04 stevan is to have a series of Perl::Critic policies that could be run against Perl 5 code to enforce some level of Moe compat
14:05 tobyink We need "Stevan's Little List of Goodness and Light".
14:05 stevan and for the parts that slip through, (and I am wildly waving my hands here) we could maybe use PPI to transform the code
14:05 stevan tobyink: yeah I am still working on my list
14:06 stevan I am doing a lot of reading of CPAN and Perl 6 docs
14:09 masak stevan: let us know if there's *anything* we can do to help with the Perl 6 docs.
14:10 stevan masak: nothing at this point, I am just reading them over and refamiliarizing myself with them
14:10 stevan masak: a couple weeks ago I adopted the policy of "always defer to Perl 6"
14:10 stevan so if I am unsure of a design question, I just go there
14:10 jasonmay wwp6d
14:10 stevan hehe, yeah
14:10 masak stevan: wow, that's wonderful news.
14:11 masak it's like you realize that we have a deep interest in redesigning Perl, or something :P
14:11 clintongormley hahaha
14:11 clintongormley masak: ++
14:12 jasonmay not to mention you guys have put an overwhelming amount of thought in the design
14:12 masak right.
14:17 jnap joined #moe
14:18 stevan yeah, what jasonmay said :)
14:21 PerlJam thought backed by implementation even.  :)
14:21 stevan really? cause i was talking to chromatic and he said ....
14:21 stevan :P
14:21 jasonmay haha
14:22 PerlJam I just *knew* someone was going to bring up chromatic.
14:22 jnap (runs off to read perl blogs)
14:22 PerlJam (I was even thinking about preempting it, but I was too slow)
14:22 stevan I have been combing through the NQP stuff too
14:22 stevan jasonmay: https://github.com/munificent/magpie worth looking at
14:23 stevan http://magpie-lang.org
14:23 jnap oh gosh, wow its all full of little Perl7s and so forth
14:26 stevan jasonmay: https://github.com/munificent/magpie​/blob/master/src/com/stuffwithstuff/​magpie/interpreter/Interpreter.java << strangly familiar
14:26 jasonmay unicorn! :(
14:26 jasonmay there we go
14:28 jasonmay nice
14:30 stevan its a pretty interesting language, kind of like Scala, Ruby and Python had a mutant child
14:38 * masak enjoys mutant child languages
14:38 bluescreen joined #moe
14:40 jnap *enjoys languages I an use at $work and that don't get laughs when I pitch my startup ideas to venture capitalists*
14:41 stevan jnap: wait, shuttershock has switched over to Python?
14:41 stevan or did you not mean the same languages :)
14:43 jnap most of the devops people there like python, don't want to touch Perl with a 10foot pole
14:44 jnap stevan:  yup, same languages :)
15:06 alh stevan: Anyone hacking on the null -> undef conversion? Seems like a decent way to familiarize myself
15:06 alh https://github.com/MoeOrganization/moe/issues/42
15:09 stevan alh nope, please do your work as a branch of runtime-improvements
15:09 alh Thanks
15:11 stevan I should probably merge runtime-improvements into master
15:12 stevan jasonmay: any objections to me merging runtime-improvements down into master?
15:13 jasonmay no objections
15:13 stevan ok, gimme a moment
15:13 alh I'll wait then :)
15:14 jasonmay stevan: by the way I made some changes to sub-arguments, closures work at the basic level and have a few extra tests to show this
15:14 jasonmay I wouldn't be surprised if I'm missing a bunch of edge cases
15:15 awwaiid hello
15:16 awwaiid did anyone steal my branch yet? or did you get 2+2 working some other way?
15:16 jasonmay doy/stevan: https://github.com/MoeOrganization/moe/comm​it/f8c9263c64acdb2740f80d2f39afe306ba8f8577
15:17 jasonmay it felt a little too easy - I'd be happy to hear some scenarios that would be broken in my implementation :)
15:17 jasonmay awwaiid: I've been working to the point of getting methods to be declared/called in the interpreter so the parser would work completely
15:18 awwaiid ah, so that then my test won't crash with "method '+' not defined" or whatever, eh?
15:18 jasonmay I think 2 + 2 would return the 'stub' object
15:19 moe [moe] stevan merged master into runtime-improvements: http://git.io/A9sFwA
15:19 awwaiid well. I just need to switch it so that my test stops with the AST instead of trying to interpret it. Then we can switch it to 'stub' instead of method invoke or whatever
15:19 moe [moe] stevan merged runtime-improvements into master: http://git.io/xw8lBA
15:19 jasonmay it's been making me think about the whole bootstrapping process too
15:20 stevan ok, merged
15:20 stevan alh: please use master now :)
15:20 jasonmay awwaiid: sure - either way works
15:21 jasonmay awwaiid: I have been doing interpreter stuff due to inertia I guess
15:21 awwaiid very good
15:22 alh Thanks!
15:26 jasonmay awwaiid: I can't wait to have basic binary operators though! all I have to test functions and stuff are increment and decrement right now
15:27 jasonmay for all my tests leading up to getting methods working in the first place
15:27 am0c joined #moe
15:27 jasonmay and then I'll come back around and make the tests nicer with those operators
15:33 jasonmay we should get a moe eval bot in here ;)
15:36 masak yes, that is incredibly valuable.
15:36 masak it basically pulls feature/bug discussion into the channel in a very constructive way.
15:36 awwaiid the only trick that I did in my branch was to pull in the packrat parser stuff
15:45 moe [moe] wolfsage opened pull request #51: For #42 - Rename "Null" to "Undef". (master...issue-42-rename-null-undef)  http://git.io/AjatkA
16:24 sahadev joined #moe
17:23 stevan http://blogs.perl.org/users/stevan_little​/2013/02/what-is-moe-a-clarification.html << just FYI
18:05 genehack stevan: i just realized you left out "payback to Ingy for Mousse"
18:05 jberger_ joined #moe
18:05 genehack or whatever it was
18:06 jberger_ stevan, was this what you meant by attributes behaving like lexicals?
18:06 jberger_ https://gist.github.com/jberger/4740303
18:07 jberger_ not that AUTOLOAD is a hack, and should be replaced by being a trait
18:07 jberger_ s/not/note/
18:08 jberger_ see line 46 for the goodies
18:08 sri eeep, lvalues
18:10 stevan jberger_: nope
18:10 sri jberger_: stevan prolly means this https://github.com/stevan/p5-mop/blob/ma​ster/t/010-core/103-hash-attribute.t#L14
18:10 stevan yes, thanks sri
18:11 jberger_ drat, we thought we were on to something
18:11 stevan we?
18:11 jberger_ run4flat and I
18:11 stevan ah
18:11 jberger_ David Mertens
18:11 stevan https://github.com/stevan/p5-mop/blob/ma​ster/t/000-examples/001-basic-example.t
18:12 stevan that is a more involved example
18:12 * sri loves p5-mop *sob*
18:12 stevan jberger_: what you have there is just lvalue accessors, which are nice and all (C# has 'em)
18:12 * jberger_ hugs sri
18:12 * stevan pats sri on the head, don't cry my little liebchen
18:12 jberger_ ok I see what you mean
18:13 jberger_ lvalue subs + Devel::Declare could get you close
18:13 jberger_ but thats even more hacky
18:13 stevan Devel::Declare itself is hack
18:13 jberger_ you would have to declare the attribute at compile-time
18:13 stevan y
18:14 jasonmay callparser is cool, that guy ain't, sheeeit
18:14 stevan jberger_: yes, what the p5-mop stuff does it basically desugar into this
18:14 jberger_ indeed
18:14 stevan has $x = 0 becomes has(\(my $x), 0);
18:15 * jberger_ nods
18:15 jberger_ well, we just were having a little fun
18:15 jberger_ go about your business
18:15 jberger_ :-)
18:16 stevan fun is a good thing :)
18:16 jberger_ definitely
18:20 jberger_ if nothing else, run4flat learned some /Moo(se)?/
18:23 jnap just found http://twitter.github.com/scala_school/ if nobody else has linked it here yet
18:23 jnap some parts are too light for me, but it did help
18:36 japhb stevan++ # tags for http://blogs.perl.org/users/stevan_little​/2013/02/what-is-moe-a-clarification.html
18:39 clintongormley joined #moe
18:53 stevan :)
19:18 clintongormley joined #moe
19:27 dams joined #moe
20:08 moe [moe] brianphillips opened pull request #52: prefix vs. postfix increment and decrement (master...pre-post-increment-decrement)  http://git.io/9PIFLg
20:08 bphillips joined #moe
20:30 jnap bphillips++
20:30 jnap is the small stuff like that which would kill us if missing
20:30 bphillips jnap: ha! thanks for noticing :-)
20:31 bphillips (context: https://github.com/MoeOrganization/moe/pull/52 )
20:34 jnap scala seems to love that match case syntax
20:34 jnap makes me sorta wish our given when did seem to scare everyone of
20:35 jnap off even
20:35 bphillips I was looking for a ternary in scala, appears that's not available...
20:35 jnap there's probably some convention that allows for similat
20:36 rafl if is an expression already
20:39 rafl oh. end i often end up with an Option and getOrElse for some things i might be using the ternary operator for in perl and similar languages
21:11 jasonmay how did gphat describe it? "// for normal human beings"?
22:10 bluescreen joined #moe
22:30 gizmomathboy joined #moe
22:42 stevan_ joined #moe
22:43 stevan_ joined #moe
23:06 jberger_ joined #moe
23:37 clintongormley joined #moe
23:53 stevan joined #moe
23:53 stevan joined #moe

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