Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-21

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:36 whiteknight joined #perl6
01:02 scott_ joined #perl6
01:04 xinming joined #perl6
01:29 tokuhirom joined #perl6
01:52 fgomez joined #perl6
01:56 adu joined #perl6
01:56 mattp_ joined #perl6
02:06 quietfanatic joined #perl6
02:13 rsimoes joined #perl6
02:27 orafu joined #perl6
02:37 cognominal joined #perl6
02:40 sorear o/ cognominal
02:41 telex joined #perl6
02:50 Entonian joined #perl6
02:52 leprevost joined #perl6
03:04 tokuhirom joined #perl6
03:33 baest joined #perl6
03:41 am0c joined #perl6
03:42 jaldhar joined #perl6
03:43 kurahaupo joined #perl6
04:03 sudokode joined #perl6
04:55 estrai joined #perl6
05:14 GlitchMr joined #perl6
05:41 masak morning, #perl6
05:48 sorear o/ masak
05:51 kaleem joined #perl6
05:51 odoacre joined #perl6
05:52 birdwindupbird joined #perl6
05:58 * masak has one more day of teaching, and then can focus on reintegrating his consciousness with that of #perl6
06:01 wtw joined #perl6
06:16 adu morning
06:16 tadzik morning
06:16 adu my consciousness will be here
06:21 * sorear is struggling to work out parsing details in non-bootstrap
06:38 sisar joined #perl6
06:45 adu sorear: what is non-bootstrap?
06:48 adu did you mean nom?
06:51 cog_ joined #perl6
07:15 kresike joined #perl6
07:15 kresike good morning all you happy perl6 people
07:17 tadzik hello kresike
07:18 fhelmberger joined #perl6
07:18 kresike hello tadzik
07:18 sorear hello tadzik and kresike.
07:19 kresike sorear, o/
07:25 [particle]1 joined #perl6
07:29 sisar joined #perl6
07:36 moritz \o *
07:36 kresike moritz, o/
07:40 * moritz just got Finnish spam mail, and the spam filter did not recognize it
07:42 tadzik sjn: ping
07:42 jnthn morning o/
07:42 tadzik hello jnthn
07:42 sjn tadzik: pong
07:43 tadzik sjn: when do Oslo.pm meetings usually start? 18?
07:43 sjn jnthn: hey, you're one of those guys that haven't signed up for the moose hackathon yet! :)
07:44 sjn tadzik: yeah, something like that... 18:30 most times, but sometimes earlier
07:44 jnthn sjn: I did the initial bit of the registration, just didn't get through all of the other steps :)
07:44 jnthn sjn: I'll get to it very soon.
07:44 jnthn sjn: Things have been...busy.
07:44 sjn place and time are usually announced om the mailing list a few days before (or on the same day, if we're lazy:)
07:45 sjn jnthn: please do it today
07:45 tadzik sjn: ok, we'll be there with zby on 90%-ish chances
07:46 sjn jnthn: the sign-up deadline is hard. I *have to* send a complete list of attendees to the hotel, and can't add any new names after the cut-off date
07:47 sjn jnthn: meaning, if you "forget" to sign up much longer now, you'll miss the boat
07:47 sjn and there's no chance to get the next one
07:48 sjn the finality of this final deadline is *very* final, deadly and line-shaped! :)
07:52 frettled It's an actual deadline!  The line will be dead!
07:52 jnthn OK, I've done sign-up now. You can relax (at least, about me :))
07:52 kresike How does one distinguish a dead line from a live one ?
07:53 jnthn sjn: ^^
07:53 frettled jnthn++ :)
07:53 jnthn This is the first day in a while when I have loads of free time to actually do stuff.
07:54 * frettled is not an organiser or disorganiser this time.
07:54 jnthn Like, clear up my ridiculous email backlog :)
07:54 frettled jnthn: wow!  Time to go out and enjoy the sunshine (if you have any) ;)
07:54 jnthn Yes, we have some :)
07:54 jnthn I'll try and do that too :)
07:55 sjn jnthn: great! :)
07:57 am0c_ joined #perl6
07:57 sorear I... think I will probably have to pass on this.
08:00 sjn jnthn: ok, I've confirmed your attendance now
08:02 jnthn sjn: Great. :)
08:02 brrt joined #perl6
08:02 shachaf If you're golfing and you come up with a program which is correct but which no computer will ever finish computing more than a few digits of the output of, does it count?
08:15 * moritz 's handicap is too bad to answer that :-)
08:19 am0c_ joined #perl6
08:20 dakkar joined #perl6
08:43 sisar joined #perl6
09:19 cognominal joined #perl6
09:24 cognominal joined #perl6
09:29 cog_ joined #perl6
09:47 snearch joined #perl6
09:59 yves_ joined #perl6
10:02 noam joined #perl6
10:30 ab5tract joined #perl6
10:31 daxim joined #perl6
10:51 noam joined #perl6
10:52 spider-mario joined #perl6
10:52 jaldhar joined #perl6
10:56 noam joined #perl6
10:59 noam joined #perl6
10:59 noam joined #perl6
11:01 noam joined #perl6
11:02 brrt left #perl6
11:08 GlitchMr joined #perl6
11:17 dalek rakudo/nom: 0e8d1a1 | pmichaud++ | docs/ChangeLog:
11:17 dalek rakudo/nom: Some ChangeLog updates.
11:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0e8d1a16eb
11:18 noam joined #perl6
11:20 Vlavv` joined #perl6
11:20 dalek rakudo/nom: e93b935 | pmichaud++ | docs/announce/2012.06:
11:20 dalek rakudo/nom: Update announcement a bit.
11:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e93b935311
11:21 jimmy1980 joined #perl6
11:32 noam joined #perl6
11:40 noam joined #perl6
11:55 noam joined #perl6
11:58 tokuhirom joined #perl6
12:09 cuckoo joined #perl6
12:22 JimmyZ joined #perl6
12:40 cognominal joined #perl6
12:49 drbean joined #perl6
12:49 sisar joined #perl6
12:59 PacoAir joined #perl6
13:07 jimmy1980 joined #perl6
13:09 Psyche^ joined #perl6
13:12 MayDaniel joined #perl6
13:13 cognominal joined #perl6
13:18 atrodo joined #perl6
13:19 daxim joined #perl6
13:23 skids joined #perl6
13:34 dalek rakudo/nom: 65dc805 | pmichaud++ | src/core/ (3 files):
13:34 dalek rakudo/nom: Refactor <prior> and $last_save handling for matches.
13:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/65dc80520b
13:52 edit_21 joined #perl6
14:07 tyatpi joined #perl6
14:13 jnthn pmichaud++ # nice cleanup
14:18 noam joined #perl6
14:32 kresike bye all
14:50 noam_ joined #perl6
14:55 kaleem joined #perl6
15:10 ggoebel joined #perl6
15:10 kaare_ joined #perl6
15:18 aindilis joined #perl6
15:24 noam_ joined #perl6
15:26 harmil Something to think about for strict/debug/validation/whatever: It's very, very easy in the separated Grammar/Actions model to have a method called "exper" and a rule called "expr" and to spend a LONG time trying to figure out why you're not getting your AST built!
15:27 tadzik :)
15:28 jnthn Maybe Grammar::Debugger should have something to help with that issue.
15:28 TimToady maybe we can find a better way to bind actions to grammars...
15:29 colomon +1 +1
15:29 moritz +1 +1
15:31 harmil Well, one obvious way would be to introduce a syntactic binding such as "action expr { make … }" or "method expr is action { make … }" …if you're going to do that, then can I humbly suggest that the $/ parameter becomes implicit?
15:32 harmil I get tired of typing ($/) ;-)
15:33 * TimToady is reminded of switch statements that can tell you when you've left out one of the enum values
15:33 harmil Doing that would allow the parse method on the grammar to run-time check the actions in the :actions parameter matched existing rules. However, you still can't do anything at compile-time… and perhaps should not.
15:33 TimToady well, the real problem is binding to derived grammars
15:33 jnthn Using a grammar as a role could perhaps result in a role that requires the implementation of matching methods.
15:33 harmil TimToady: Can you give an example?
15:34 jnthn But that's...too magical.
15:34 jnthn It'd get compile time checking though :)
15:34 jnthn But a bit too much, because sometimes its legit for a grammar rule to have no action method.
15:34 thou joined #perl6
15:34 harmil jnthn: it's common, in fact.
15:34 jnthn harmil: Agreed.
15:35 harmil I very often have, for example, string bodies that I just .Str in a parent action
15:35 TimToady but we could detect an action that has nothing to bind to in the grammar
15:35 jnthn True...but then utility methods... :)
15:36 jnthn OTOH they can be written as submethods or privates.
15:36 harmil yes, if we know which things are actions (vs. utility methods in the action object)
15:36 jnthn Or subs.
15:36 TimToady and it could be a special declarator
15:37 jnthn Or alternatively, a new trait.
15:37 harmil TimToady: yeah, that's where I was going. I was just adding in extra magic for that declarator handling the default signature.
15:37 TimToady but we still have the derivation problem
15:37 jnthn class FooActions actions FooGrammar { }
15:37 TimToady now derive an anonymous grammar from FooGrammar; how do you attach it?
15:38 harmil jnthn: that still doesn't let you clearly separate actions from utility methods. It's probably easier and cleaner to put that trait on the methods.
15:38 harmil TimToady: I think you still have to :actions it when calling .parse
15:38 jnthn TimToady: Well, the other question that always comes up in this space is slangs...
15:39 jnthn TimToady: How do they specify their actions.
15:39 jnthn harmil: Well, above I suggested you don't have utility methods but instead write the utility stuff as something else. Or somewhere else. :)
15:39 jnthn harmil: I agree that may be overly restrictive.
15:39 TimToady harmil: when you're calling into .parse, you may be calling into a largish hierarchy of (mostly) anonymous grammars, so one :actions doesn't cut it
15:40 jnthn Well, Rakudo solves this problem with:
15:40 jnthn %*LANG<MAIN>          := Perl6::Grammar;
15:40 jnthn %*LANG<MAIN-actions>  := Perl6::Actions;
15:41 TimToady it seems we need some kind of namespace for grammars and actions to rendezvous in
15:41 TimToady whether that's dependency injection or just something like it
15:46 majrmovies joined #perl6
15:48 noam_ joined #perl6
15:50 vmspb joined #perl6
15:52 harmil OK, so I'm still not sure I entirely grasp the problem. I've written up a concrete example if anyone wants to hack it up to describe what they mean… https://gist.github.com/2966586
15:52 harmil Or not if you have better things to do ;-)
15:53 PerlJam harmil: what does "action" actually do?  Is it just a synonym for "method"?
15:53 harmil Yes
15:53 harmil You could also spell that "method foo is action" if you're not fond of a new alias for method
15:54 harmil TimToady: I think the anonymous grammar problem is solved when you do the checking at run-time
15:54 harmil And when you have a grammar take a :actions seems to be the right time to do that
15:54 harmil *modulo all the  problems with using "run time" in a Perl 6 context...
15:55 harmil And yes, that's the world's worst AST ;-)
15:57 harmil Totally other random point: thank you to whoever came up with :parameter{:hashkey1, :hashkey2} Yes, it only saves me 2 characters over :parameter({:hashkey1, :hashkey2}), but I'm using it so often that I'm really glad to have it!
15:57 mikemol_ joined #perl6
16:01 * TimToady bows
16:12 moritz :$parameter is one of my favorite shortcuts
16:14 quietfanatic I've used that one in hash definitions s well as argument lists.
16:14 harmil Yeah, I love saying "sub ast_foo($bar, $baz) { {:type<foo>, :$bar, :$baz} }" … it's just so damned clean
16:14 harmil actually, it's usually "(:$bar, :$baz)" in the parameter list as well, but you get the idea
16:15 pmichaud good morning, #perl6
16:15 harmil howdy, pmichaud
16:16 moritz good am, pm
16:16 harmil heh
16:16 jnthn morning, pmichaud
16:17 jnthn pmichaud: Wait, weren't you up and committing like, a few hours ago? :)
16:17 moritz that was michaudbot, I think :-)
16:17 jnthn ah, my mistake! :-)
16:17 pmichaud jnthn: yes, that was me.  :)
16:18 harmil Hmmm… I have a function that returns a pair… I want to pass off that pair as a named parameter. Simply a(b()) doesn't seem to work. How do I do that?
16:18 pmichaud I have some more commits to make, but they're a little too risky for a release day.
16:18 quietfanatic a(|b()) perhaps?
16:18 pmichaud harmil: a(|b())
16:18 moritz pmichaud: that's what we have branches for :-)
16:18 jnthn pmichaud: Well, could always drop 'em in a branch.
16:18 harmil Tried that, i got "No such method 'FLATTENABLE_LIST' for invocant of type 'Pair'"
16:18 quietfanatic er
16:18 moritz well, that's a rakudobug then
16:18 harmil ah, ok
16:18 jnthn That's probably fixable.
16:18 pmichaud yeah, I can do it in a branch.
16:18 moritz iirc I once tried to fix that, and didn't have much luck
16:19 quietfanatic harmil: in the meanwhile, try a(|hash(b()))
16:19 pmichaud harmil: in the meantime, maybe  a(|%(b()))
16:19 moritz because I didn't know much about that FLATTENABLE protocol
16:19 jnthn Should the pair be treated as a named param?
16:19 jnthn *arg
16:19 timotimo remind me again, how does one define operator precedence of self-made operators in perl6?
16:19 moritz jnthn: yes
16:19 pmichaud timotimo: is tighter, is looser
16:19 quietfanatic and is equiv
16:19 moritz timotimo: sub infix:<foo> is tighter(&infix:<+>) { ... } # NYI in rakudo
16:19 PerlJam pmichaud: I'm not releasing for another 8 or 9 hours.  you've got t ime
16:19 PerlJam :-)
16:20 pmichaud PerlJam: it's still a bit much
16:20 pmichaud PerlJam: it's not "can I finish in time", but more of "can I be sure the result won't introduce an unwanted regression"
16:20 timotimo that's sweeter
16:20 timotimo than scala does it :)
16:21 PerlJam how does scala do it?
16:21 timotimo the first letter of the function name defines the tightness
16:21 timotimo well, not letter
16:21 PerlJam *boggle*
16:21 timotimo symbol
16:21 pmichaud the fixes are the final adjustments to eagerness, which for some reason causes a regression in :global handling... and since I'm planning to re-do :global handling anyway... it's a bit much :)
16:21 timotimo so is tighter(&infix:<+>) will put it at tighter than +, but looser than atything defined to be tighter than + before this "is tighter" is put there?
16:22 PerlJam next thing you'll tell me that variables that start with i,j,k, or l are all interger typed in scala
16:22 moritz or that h, j, k, l move the cursor left, down, up, right :-)
16:23 mtk0 joined #perl6
16:23 pmichaud timotimo: close, not precisely correct.  It'll put it tighter than +, which will be the same precedence as anything else that was defined as "is tighter(&infix:<+>)"
16:23 TimToady a(|(b(),)) might also work
16:24 moritz pmichaud: I thought it's added inbetween
16:24 pmichaud moritz: it's added in between %additive and %multiplicative, yes
16:24 jnthn moritz: Trying a patch for the | with pairs.
16:24 TimToady two tighters are supposed to be equiv
16:24 pmichaud but if I have  sub infix:<xyz> is tighter(&infix:<+>) { ... }   and sub infix:<abc> is tighter(&infix:<+>) { ... }   then both of them are the same precedence
16:25 pmichaud which isn't exactly what timotimo said :)
16:25 pmichaud but is what TimToady++ just said :)
16:26 pmichaud afk for a bit
16:27 moritz ok, makes sense on second (or third) thought
16:28 * PerlJam wolfs down his 10th tamale
16:28 PerlJam one of the nice things about south texas is there is no shortage of people offering you food
16:29 MayDaniel joined #perl6
16:29 PerlJam (of course, there is a reason Corpus Christi is the obesity capitol of texas)
16:29 jnthn > sub foo() { :a(42) }; sub bar(:$a) { say $a }; bar(|foo())
16:29 jnthn 42
16:29 jnthn \o/
16:29 moritz \o/
16:29 jnthn Guess I should spectest :)
16:30 TimToady we've also conjectured an 'is between' that produces a new level "halfway between" two other predecence levels
16:30 moritz you can always get that now already
16:30 moritz if you  a is tighter than b
16:30 moritz and then c is tighter than a
16:30 TimToady no, that's not halfway
16:31 TimToady there's no way to create a new independent level without something like 'between'
16:31 spider-mario joined #perl6
16:32 TimToady (or by peeking at the string precedences involved and manufacturing something)
16:32 PerlJam Are the string precedences available?
16:32 TimToady not officially
16:33 TimToady maybe we were gonna do that with a combined 'is tighter() is looser()' in the same declaration
16:34 TimToady moritz: or is that what you were saying?
16:34 timotimo what might i be doing wrong? http://use.perl.org/use.per​l.org/~masak/journal/39568 doesn't work for me :|
16:35 moritz timotimo: use.perl.org broken
16:35 moritz TimToady: no
16:35 daxim http://use.perl.org/use.perl.​org/_masak/journal/39568.html
16:35 timotimo oh no what did i do?
16:35 moritz TimToady: I think my mental picture of tighter/looser still is wrong
16:35 pmichaud daxim++
16:35 timotimo oh, that's nonstandard
16:35 timotimo thanks, daxim
16:35 dalek rakudo/nom: 4d79923 | jnthn++ | / (2 files):
16:35 dalek rakudo/nom: Make | flattening work on pairs, which flatten as named arguments.
16:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d799234fc
16:36 daxim http://strangelyconsistent.org/blog/an-int​roduction-to-mazemaking-in-literate-perl-6
16:36 jnthn harmil: there you go ^^ :)
16:37 timotimo even better
16:37 moritz jnthn++ # putting it in Enum right away, not Pair
16:37 moritz jnthn++ # fast fix
16:38 pmichaud TimToady had mentioned at yapc::na that one of the reasons for having  =>  produce Pair instead of Enum is to support a => b => c => d => ...   style chaining and still be able to mutate the results.
16:39 moritz I don't think I've ever used => chains in p6
16:39 PerlJam I know I've never used them
16:39 pmichaud iirc, it's for doing things using a lisp car/cdr style framework, as TimToady++ describes it
16:40 pmichaud TimToady: when you get a chance, could you construct a use case code example for => as Pair ?
16:40 pmichaud (or point us to one?)
16:41 moritz are cons mutable in lisp?
16:41 PerlJam don't think so
16:42 PerlJam (but I haven't actually used lisp in well over a decade :)
16:42 pmichaud 2.5 decades here :-)
16:42 timotimo an idea when rakudo will get class Foo is also { ... }?
16:43 timotimo n: class Foo { method a() { 1 }; } class Foo is also { method b() { 2 }; }; say Foo.new().b()
16:43 p6eval niecza v18-7-ga660099: OUTPUT«[31m===[0mSORRY![31m===[0m��Strange text after block (missing comma, semicolon, comment marker?) at /tmp/nEwN2KeFQ1 line 1:�------> [32mclass Foo { method a() { 1 }; }[33m�[31m class Foo is also { method b() { 2 }; }[0m��Parse failed��»…
16:43 timotimo n: class Foo { method a() { 1 }; }; class Foo is also { method b() { 2 }; }; say Foo.new().b()
16:43 p6eval niecza v18-7-ga660099: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Two definitions found for symbol ::GLOBAL::Fooâ�¤â�¤  first at /tmp/PPb0cw4T_7 line 1â�¤  second at /tmp/PPb0cw4T_7 line 1 at /tmp/PPb0cw4T_7 line 1:â�¤------> [32m method a() { 1 }; }; class Foo is also [33mâ��[31m{ method b() { 2 …
16:43 jnthn timotimo: It's not been spelt "is also" for ages
16:43 timotimo aaw :(
16:43 [Coke] b: class Foo { method a() { 1 }; } class Foo is also { method b() { 2 }; }; say Foo.new().b()
16:43 p6eval b 922500: OUTPUT«===SORRY!===␤Confused at line 22, near "class Foo "␤»
16:43 jnthn It's augment class Foo { ... } now
16:43 timotimo i read it in masaks post about labyrinths and i thought it was kind of cute
16:43 jnthn And Rakudo implements it.
16:44 mtk0 joined #perl6
16:44 pmichaud (need MONKEY_TYPING?)
16:44 PerlJam The Internet's memory is long even of things that should be forgotten
16:44 timotimo :)
16:44 jnthn Yes, you have to use MONKEY_TYPING TO DO IT
16:44 jnthn er, *to do it
16:44 pmichaud oh dear, it looks like MONKEY_TYPING CAUSES EVERYTHING ELSE TO BE ALL CAPS
16:44 pmichaud :-P
16:45 jnthn No, it just makes people want to shout :P
16:45 PerlJam as long as they don't start throwing things
16:46 masak good evening, #perl6. from a train! \o/
16:47 TimToady moritz: yes, see http://stackoverflow.com/questions/170931​/replace-an-item-in-a-list-in-common-lisp and http://stackoverflow.com/questions/869529/diffe​rence-between-set-setq-and-setf-in-common-lisp
16:47 jnthn What a life...training all day, then training for more hours in the evening. :P
16:48 timotimo is there no event loop like library for perl6 yet?
16:49 timotimo is probably quite hard to do it right, isn't it?
16:50 [Coke] tcl does it. :)
16:50 masak what's that supposed to mean? :)
16:51 jnthn timotimo: I think tadzik++ did the few bits of work in this area that we have so far.
16:51 pmichaud Two people asked me in the hallway track about non-blocking (socket) I/O, said they would really like to do some stuff with Rakudo and Perl 6 when we had that working.  Do we have it working?  ;-)
16:51 jnthn timotimo: MuEvent, iirc.
16:52 dalek rakudo/nom: 61f6f14 | jnthn++ | src/Perl6/Grammar.pm:
16:52 dalek rakudo/nom: <arglist> happily parses empty space here, then we could get nasty errors if whitespace fell in the wrong place rather than good errors or the module being loaded. Add a check against it.
16:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/61f6f14693
16:53 sorear good * #perl6
16:55 timotimo oh, MuEvent sounds pretty nice
16:56 harmil As long as it's not Muvent, I'm cool
16:56 timotimo "i like to muvent, muvent"?
16:56 harmil ugh
16:56 harmil ;)
16:56 * PerlJam throws a talking lion at harmil
17:07 timotimo hm, why can't i tell an IO::Socket::INET what SOCK_ type i want when instantiating it? will there be a way in the future?
17:07 timotimo (until now i can use the numbers in the PIO module, but that feels dirty
17:07 moritz timotimo: probably just NYI
17:08 timotimo ah, indeed, can't create a SOCK_DGRAM socket
17:11 timotimo i'll see if there's anything i can do about that
17:11 moritz ++timotimo
17:13 Chillance joined #perl6
17:13 pmichaud r: my $undefined; my $x = $undefined ~ '... and so forth';  say $x;
17:13 p6eval rakudo 65dc80: OUTPUT«use of uninitialized value of type Any in string context  in block <anon> at /tmp/2a1kc8mbRW:1␤␤... and so forth␤»
17:13 pmichaud the REPL gives me
17:13 pmichaud use of uninitialized value of type Any in string contextMethod 'message' not found for invocant of class 'Any'
17:14 pmichaud that "Method 'message' not found for invocant of class 'Any'"  seems LTA
17:14 moritz it means the exception printer was triggered even though there was no exception
17:15 pmichaud shall I file a rakudobug for it?
17:15 jnthn pmichaud: oops, I didn't see you had taken RT#113590 and I accidentally a patch...
17:15 jnthn Well, if it spectests
17:15 masak pmichaud: please do.
17:15 pmichaud jnthn: no problem, if your patch works :)
17:15 jnthn pmichaud: It fixes the bug :)
17:16 jnthn And probably others.
17:16 pmichaud I tried a patch last week and got failures.
17:16 pmichaud (and then halted work on it because of yapc::na)
17:16 jnthn OK, we'll see what this one does in spectest...
17:16 pmichaud jnthn: can you nopaste the patch, ooc?
17:17 jnthn pmichaud: https://gist.github.com/2967127
17:17 jnthn pmichaud: spectest running now
17:18 jnthn pmichaud: I suspect the colonpair handling wants some twiddles overall there, but this is less wrong at least.
17:19 jnthn No failures by S04
17:19 pmichaud jnthn: that patch doesn't look like what I tried... so I suspect it might work :)
17:20 pmichaud (I don't remember exactly what I tried... but that wasn't it :-)
17:20 jnthn Also (unrelated to this patch) we seem to have some passing todos.
17:21 pmichaud exception bug is RT#113776
17:22 masak pmichaud++
17:22 * timotimo doesn't see where the error originates :|
17:23 dalek rakudo/nom: d5f39a2 | jnthn++ | src/Perl6/ (2 files):
17:23 dalek rakudo/nom: Canonicalize regex names properly so that they will properly participate in protoregex dispatch and <sym> will get set properly.
17:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d5f39a2c34
17:24 timotimo well, i can, but i can't find Parrot_io_socket, which i think is where the error comes from ...
17:24 vmspb Hello, question about precedence:
17:24 pmichaud jnthn++  # fix for french angles
17:24 vmspb if L1 is tighter(L0) {} and Lx is looser(L1) {}
17:24 jnthn moritz: Is https://rt.perl.org/rt3/Tic​ket/Display.html?id=112586 sufficiently dealt with by now?
17:24 vmspb then Lx == L0 or L0 < Lx < L1 ?
17:24 jnthn moritz: If so, resolve or testneeded?
17:24 timotimo there it is
17:24 harmil rn: my $x={:a, :b}; given "a" { when $x { given $_{"a"} { when True { say $_ } } } }
17:25 p6eval niecza v18-7-ga660099: OUTPUT«Potential difficulties:â�¤  Smartmatch against True always matches; if you mean to test the topic forâ�¤    truthiness, please use :so or *.so or ?* instead at /tmp/W7bT3Omw1p line 1:â�¤------> [32men "a" { when $x { given $_{"a"} { when [33mâ��[31mTrue { say $_…
17:25 p6eval ..rakudo 61f6f1: OUTPUT«postcircumfix:<{ }> not defined for type Str␤  in method gist at src/gen/CORE.setting:9439␤  in sub say at src/gen/CORE.setting:6970␤  in block <anon> at /tmp/JRcQhe6gzf:1␤  in block <anon> at /tmp/JRcQhe6gzf:1␤  in block <anon> at /tmp/JRcQhe6gzf:1␤␤»
17:25 moritz jnthn: looking...
17:25 pmichaud vmspb: L0 < Lx < L1
17:25 moritz jnthn: yes, testneeded
17:25 harmil OK, so ignoring the True matching thing…. why is Rakudo getting an indexing eror?
17:25 jnthn moritz: done
17:25 pmichaud harmil: strings don't have a postcircumfix:<{ }>
17:26 harmil But… I'm not indexing a string
17:26 harmil ever
17:26 moritz yes you do
17:26 PerlJam harmil: you are.  $_{"a"}
17:26 jnthn Huh?
17:26 moritz $_{"a"}
17:26 pmichaud is   when $x { ... }  supposed to topicalize $x ?
17:26 jnthn No
17:26 harmil Oh hell
17:26 jnthn given sets $_
17:26 harmil OK, I reversed the case of my test and never noticed
17:26 harmil doh
17:27 harmil Thepart that made it hard to see is that in my real code (which isn't all one line) Rakudo got all lazy and reported the error inside the when.
17:27 pmichaud harmil: which when ?  ;-)
17:28 harmil Theinner one
17:28 harmil So when I was saying, "say $_" that's when it was executing the postcircumfix:<{}>
17:29 harmil which is valid laziness, but made it really hard to understand what was going on
17:29 pmichaud correct, because $_{"a"}  returns a Failure
17:29 pmichaud which doesn't throw until you use it.
17:29 harmil right
17:29 pmichaud the Failure probably needs to record the point of its creation (if it doesn't already) and to report it (which it doesn't already)
17:30 moritz we need to store the original error location, and make that available in the backtrace
17:30 pmichaud I suspect Failures already have the original error location
17:32 pmichaud &fail creates an exception using "die" and builds a Failure object from that.
17:33 moritz maybe we .throw it instead of .rethrow-ing it
17:34 pmichaud well, I think there are two exceptions involved here.
17:34 pmichaud we want to throw one at the point of the fail, and another at the point where the Failure is used.
17:34 pmichaud that way we end up with the dual backtraces
17:34 pmichaud I'm fine if rethrowing would handle that as well, though.
17:35 pmichaud method Int(Failure:D:)        { $!handled ?? 0   !! $!exception.throw; }
17:35 pmichaud method Num(Failure:D:)        { $!handled ?? 0e0 !! $!exception.throw; }
17:35 pmichaud method Numeric(Failure:D:)    { $!handled ?? 0e0 !! $!exception.throw; }
17:35 pmichaud multi method Str(Failure:D:)  { $!handled ?? ''  !! $!exception.throw; }
17:35 pmichaud multi method gist(Failure:D:) { $!handled ?? $.perl !! $!exception.throw; }
17:35 pmichaud maybe those should be .rethrow ?
17:35 pmichaud (src/core/Failure.pm)
17:35 timotimo i'm suggesting the following amendment to IO/Socket/INET.pm: add a constant PROTO_AUTO = 0;, use it as the default value. reason: if the socket function gets 0 as the protocol, it will figure out what protocol to use by itself, saving rakudo the trouble of opening /etc/protocols (and whatever's the equivalent on windows)
17:36 moritz pmichaud: maybe, yes
17:37 timotimo additionally, i would probably try to make parrot get the actually used protocol number and set it on the socket object or something
17:38 jnthn afk for a bit
17:39 sudokode joined #perl6
17:47 birdwindupbird joined #perl6
17:47 * timotimo tries compiling
17:48 mikemol_ joined #perl6
17:55 dalek roast: ffe1467 | moritz++ | S (2 files):
17:55 dalek roast: unfudge some tests for rakudo; fix one
17:55 dalek roast: review: https://github.com/perl6/roast/commit/ffe14670e9
17:57 moritz that should remove the passing TODOs
18:02 timotimo hum, i don't even need udp sockets, still i'm improving perl6s support for them
18:02 timotimo fun times
18:03 timotimo afk for a bit
18:04 flussence .oO( we should have built in sctp sockets just to be different )
18:15 * masak looks at moritz' ufo branch
18:16 harmil r: sub a(List $l=List) { say "List $l" if $l.defined } ; a($(1,2,3))
18:16 p6eval rakudo d5f39a: OUTPUT«Nominal type check failed for parameter '$l'; expected List but got Parcel instead␤  in sub a at /tmp/AYQiMQlZxY:1␤  in block <anon> at /tmp/AYQiMQlZxY:1␤␤»
18:16 harmil Hmm… is there any way to make that work?
18:17 masak `List $l=List` better written `List $l?`, not that that solves your problem.
18:17 pmichaud a(@(1,2,3))
18:17 harmil That is, to say, can I define a sub that says, "Parcels past as this parameter should be converted to List"
18:18 harmil pmichaud: that would be nice, but my parameter is coming out of a Match object
18:18 masak List(Parcel) $l
18:18 pmichaud List(Positional) $l
18:18 harmil oh, interesting. I'll try that
18:18 pmichaud Positional $l as List
18:18 masak doesn't work yet.
18:19 pmichaud r: sub a(Positional $l as List) { say $a.WHAT; };  a((1,2,3));
18:19 p6eval rakudo d5f39a: OUTPUT«===SORRY!===␤Variable $a is not declared␤at /tmp/YC4lLzg5hW:1␤»
18:19 pmichaud r: sub a(Positional $l as List) { say $l.WHAT; };  a((1,2,3));
18:19 p6eval rakudo d5f39a: OUTPUT«Unable to coerce value for '$l' from Parcel to List; no coercion method defined␤  in sub a at /tmp/53hlCBanIf:1␤  in block <anon> at /tmp/53hlCBanIf:1␤␤»
18:20 harmil Well, at least it's *trying* to coerce ;)
18:20 masak I think there should be such a coercion method.
18:20 pmichaud r: sub a(Positional $l as Array) { say $l.WHAT; };  a((1,2,3));
18:20 p6eval rakudo d5f39a: OUTPUT«Array()␤»
18:20 pmichaud the Array() coercer exists.
18:21 pmichaud so, perhaps add
18:21 pmichaud method List() { self.list }
18:21 pmichaud to src/core/Any.pm
18:24 pmichaud although it somewhat begs the question... why not just use
18:25 masak moritz: could you tell me what changing '::' to ':' in https://github.com/masak/ufo/commit/c9​4c693948df906cf5a9a9995e47b43abeea6304 means?
18:25 masak (be ause I don't know and I'm curious)
18:25 pmichaud r: sub a(@l) { say "List @l[]" if @l.defined };  a((1,2,3))
18:25 p6eval rakudo d5f39a: OUTPUT«List 1 2 3␤»
18:25 masak s/be ause/because/
18:25 moritz masak: compatibility with non-GNU make
18:25 masak moritz: in GNU make, what does '::' mean?
18:25 masak rn: say Module
18:25 p6eval rakudo d5f39a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Module' called (line 1)␤»
18:25 p6eval ..niecza v18-7-ga660099: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤ 'Module' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1401 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /home/…
18:26 moritz masak: I'm not sure either
18:26 harmil pmichaud that might be the better approach
18:27 masak moritz: if we're aiming for compatibility with non-GNU make, do you have a particular make in mind? is there someone who will maintain that compatibility? do we know it's worth aiming for?
18:27 PacoAir joined #perl6
18:27 * masak has grown wary with age :)
18:27 pmichaud I think we have to consider nmake, at least.
18:27 jnthn If ufo and/or panda worked on Windows, I'd be less of a sad panda :)
18:27 pmichaud (for windows)
18:28 pmichaud or whatever the Windows 'make' is.
18:28 harmil Windows make is gmake, given Cygwin...
18:28 pmichaud in 2009 someone patched Rakudo's makefile to use a bunch of ::'s, and I immediately reverted it.
18:29 masak I'm fine with considering nmake. but that requires someone to actually make sure it works.
18:30 masak ooh, delegating dependency handling to the Makefile, instead of manually topo-sorting. why didn't I think of that? :) moritz++
18:30 pmichaud without going into the details of "which make to target", I think we have to ultimately fix:
18:30 pmichaud 18:27 <jnthn> If ufo and/or panda worked on Windows, I'd be less of a sad panda :)
18:31 pmichaud Windows is a huge target, especially for newcomers.
18:31 masak aye.
18:31 harmil rn: my $s = "foo, "; $s.subst(/\s*<[,]>\s*$/, ""); say $s
18:31 p6eval rakudo d5f39a, niecza v18-7-ga660099: OUTPUT«foo, ␤»
18:31 pmichaud if we're not doing so already, we also need to be packaging up binaries for windows.
18:31 harmil am I missing something? does subst just return the substituted value?
18:32 pmichaud harmil: inplace modifications are almost always done using  .=
18:32 harmil ah
18:32 harmil ok
18:32 masak I'm fine with targeting nmake. I'm not sure how to best do it, and make sure ufo stays nmake-compatible.
18:32 pmichaud .= is a much more generic pattern than having some methods that do inplace modifications and others that do not.
18:32 masak if some Windows user wants to step up and help ufo target nmake, that would be -Ofun.
18:33 harmil is it possible for subst to notice its return value is being ignored and whine?
18:33 pmichaud note that we manage to successfully keep rakudo and nqp's makefiles windows compatible :)
18:34 pmichaud harmil: if/when we have sink context implemented, it might be possible to have .subst return a value that carps on that, yes.
18:37 moritz masak: I want compatiblity with every make
18:37 moritz masak: which is why I want ufo to generate rather simple makefiles
18:38 moritz masak: ie only use normal dependencies, variable interpolations and non-parameterized rules
18:38 pmichaud moritz: +1 +1
18:38 * [Coke] can help with windows makefile targetting.
18:38 [Coke] just not during work hours for a bit.
18:38 moritz currently ufo shells out to 'find', which is why it won't work on windows
18:38 masak [Coke]: nice!
18:39 moritz but the generated makefiles are much closer to run on windows now
18:39 masak moritz: your ufo branch has been rebased on top of master, merged, and culled.
18:39 masak I think we can do without `find`. mini-tote emulates `find`.
18:40 masak moritz: oh, and thank you for your contributions. it's nice to see someone make ufo saner for once.
18:42 moritz masak: :-) you're welcome
18:50 * [Coke] really would like to hack on something not java for a while. :P
18:52 timotimo flussence: i'd love to use sctp for something some day. it seems so ridiculously cool and useful
19:08 birdwindupbird joined #perl6
19:15 tadzik good evening
19:16 colomon joined #perl6
19:17 moritz \o tadzik
19:18 fridim_ joined #perl6
19:21 mtk joined #perl6
19:23 not_gerd joined #perl6
19:23 not_gerd hello, #perl6
19:23 phenny not_gerd: 15 Jun 20:50Z <pmichaud> tell not_gerd  no, and I had forgotten about it.  Thanks for the ping/reminder.  I'd be happy if a bug was filed and I was made the owner of the bug.
19:23 not_gerd masak: I did do a (partial) ufo port to pure perl6 -- https://gist.github.com/2891292
19:24 not_gerd it was unusabbly slow due to parsing speed (1.5s on my machine)
19:24 not_gerd ^unusably
19:29 masak not_gerd: interesting exercise. one day it might even be fast ;)
19:31 not_gerd to clarify: it still relies on make (but only uses portable syntax), but does not use shell commands (rm, find) but invokes a perl6 script instead
19:32 not_gerd which translates to a 1.5s delay on every command invoked by make :(
19:34 MayDaniel joined #perl6
19:36 not_gerd the find replacement could probably be used with current ufo ( https://gist.github.com/2942255 )
19:37 moritz yes, looks good
19:38 masak yes, I believe so.
19:38 masak I find &f.() somewhat unidiomatic compared to &f()
19:38 moritz just write f()
19:39 moritz no need to ues the sigil
19:39 masak I don't mind the & when it's a parameter. that adds a kind of clarity/parallel.
19:39 masak but the dot is superfluous.
19:41 moritz I often like the dot when the expression before it is something more complicated than a mere variable
19:42 masak oh, then it adds visual distance, I guess.
19:42 masak yeah, I can see that. the dot somehow says "treat the lhs as an object that can be invoked"
19:44 not_gerd I'm still at the cargo-culting phase where using perl6 is concernced
19:44 masak r: multi sub infix:<+>(&f, &g) { -> { f; g } }; ({say "OH"} + {say "HAI"}).()
19:44 p6eval rakudo d5f39a: OUTPUT«OH␤HAI␤»
19:44 masak \o/
19:44 masak that is *awesome*.
19:44 moritz is that, like, monadic nonesense?
19:45 jnthn No, it's overloading operators with unrelated meanings :P
19:45 masak no, it's just subverting addition to mean sequencing.
19:45 colomon yeah, that's exactly the problem with it
19:45 masak I promise not to do it in production code.
19:45 jnthn masak: Surely there's something nicer in unicode for sequencing? :)
19:45 masak bloody prudes. :P
19:46 flussence r: multi sub infix:<·>(&f, &g) { ... } # ?
19:46 p6eval rakudo d5f39a:  ( no output )
19:46 TimToady see http://rosettacode.org/wiki/​Function_composition#Perl_6
19:47 TimToady though maybe you want to overload ; for this instead, oh wait
19:48 masak ;)
19:48 colomon TimToady++
19:49 masak I bet there is some reason ; is a terminator and not an operator.
19:49 masak though I can't think of it immediately.
19:50 sorear I might have to hurl if someone makes ; overridable. :D
19:51 colomon sorear++
19:51 colomon ;)
19:51 huf meh, surely you can always define ; to be an operator
19:52 huf even if you cant use ;
19:52 tadzik eeeeek
19:52 tadzik btw, we were discussing today at $work how is it that so many programmers can't write fibonacci on the interview
19:53 atrodo I'd like to make ; an operator and make STOP the operation separator
19:53 tadzik and I showed them the one with 10 characters in Perl 6 :)
19:53 tadzik the reaction was quite positive :)
19:53 colomon :)
19:56 colomon atrodo: wait, like a telegram?  say "Hello" STOP for 1.. 10 { .say } STOP
19:56 atrodo colomon: Exactly
19:57 harmil Why am I wrong for expecting this to work:
19:57 colomon atrodo: there's a certain style to that....
19:57 sorear tadzik: If I were an interviewer, I would probalby respond "Now, can you do that WITHOUT the ... operator?"
19:57 harmil r: say "".HOW.methods
19:57 p6eval rakudo d5f39a: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in any methods at src/gen/Metamodel.pm:377␤  in block <anon> at /tmp/f8bVHXMrLL:1␤␤»
19:57 moritz harmil: because that's not how calls to the MOP work
19:57 harmil More to the point, what's the correct way to say, "what methods do you support"?
19:57 moritz r: say ''.^methods
19:57 p6eval rakudo d5f39a: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match match-list ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans indent WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split␤»
19:58 harmil oh right, I think I asked that before. Thanks moritz++
19:58 moritz harmil: thing is, several classes can share the same meta-object
19:58 masak so you have to supply the class to .methods
19:58 moritz harmil: which is why .^methods passes the invocant to the class on the meta object
19:58 harmil yep, I just forgot
19:59 masak .^ hides that.
19:59 masak or folds it in, rather.
19:59 harmil I switch between Perl 5, Perl 6 and Python so often at work and at home, it's hard to remember details sometimes, and meta-model details are the most diverent.
19:59 harmil *divergent
20:00 masak indeed.
20:00 masak it'll get easier with time :)
20:01 harmil rn: say "".elems, "/", "a".elems;
20:01 p6eval rakudo d5f39a, niecza v18-7-ga660099: OUTPUT«1/1␤»
20:02 harmil ur… really?
20:02 huf "" is one empty string, i guess?
20:03 harmil I meant .chars, thanks
20:03 harmil Interesting that .elems works at alll
20:03 harmil r: "".^methods
20:03 p6eval rakudo d5f39a:  ( no output )
20:04 harmil r: say "".^methods
20:04 p6eval rakudo d5f39a: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match match-list ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans indent WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split␤»
20:04 harmil some deep magic going on there, converting my Str to a … something that has a .elems?
20:05 flussence r: say Str.^mro
20:05 p6eval rakudo d5f39a: OUTPUT«Str() Cool() Any() Mu()␤»
20:05 flussence r: say Cool.^methods
20:05 p6eval rakudo d5f39a: OUTPUT«abs conj sqrt sign rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh cis log exp roots log10 unpolar round floor ceiling truncate bytes chars fmt substr uc lc ucfirst l…
20:05 flussence r: say Cool.^methods(:local)
20:05 p6eval rakudo d5f39a: OUTPUT«abs conj sqrt sign rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh cis log exp roots log10 unpolar round floor ceiling truncate bytes chars fmt substr uc lc ucfirst l…
20:05 huf so .^methods only lists the ones it has directly?
20:06 flussence r: say Str.^methods(:all)
20:06 p6eval rakudo d5f39a: OUTPUT«BUILD Int Num chomp chop substr pred succ ll-match match-list ords lines samecase samespace trim-leading trim-trailing trim words encode capitalize trans indent WHICH Bool Str ACCEPTS Numeric gist perl comb match subst split abs conj sqrt sign rand sin asin cos aco…
20:07 moritz huf: it stops at Cool by default
20:07 huf ah.
20:07 huf Cool.
20:07 jnthn Well, that's not quite true.
20:07 huf aha!
20:07 jnthn Any and Mu are excluded by default.
20:08 huf so why isnt Cool in "".^methods' output?
20:08 sorear harmil: perl 6 tries to hide the difference between items and singleton lists
20:09 jnthn huf: Oh, maybe Cool is in the exclude list too...
20:09 huf i see
20:09 huf makes a sortof perlish sense
20:10 jnthn Ah, yeah
20:10 jnthn Metamodel::ClassHOW.exclude_parent(Cool);
20:10 jnthn Yes, it's excluding Cool also.
20:19 harmil sorear: that's probably wise
20:20 harmil Meta-question about IRC: when people say they're "backlogging" does that just mean "reviewing the logs" or is there a more sophistimicated filter that can be used?
20:21 dalek Heuristic branch merge: pushed 221 commits to nqp/toqast by jnthn
20:21 [Coke] harmil: my irc session pauses where last I was, I have to manually scroll forward to catch up. (but I call that backscrolling)
20:22 * [Coke] imagines some people let their session roll forward, but mark the last place they read, so they really have to backscroll.
20:22 dalek nqp/toqast: f19813a | jnthn++ | t/qast/qast.t:
20:22 dalek nqp/toqast: Correct test count and switch over to use QAST; now that QAST is broken out into a separate library post-qbootstrap.
20:22 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/f19813a027
20:22 geekosaur xchat has markers you can place (or it can try to place them automatically based on idle time)
20:22 [Coke] NQP TOAST!
20:23 jnthn ... :)
20:26 dalek nqp/toqast: ea9ceea | jnthn++ | src/HLL/Grammar.pm:
20:26 dalek nqp/toqast: Override FAILGOAL in HLL::Grammar and get it to delegate to panic, so we get a line number.
20:26 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/ea9ceea3ed
20:26 dalek nqp/toqast: d82864d | pmichaud++ | CREDITS:
20:26 dalek nqp/toqast: Fix CREDITS to reflect that usernames are for GitHub.
20:26 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/d82864d09f
20:26 dalek nqp/toqast: b1226fb | jnthn++ | src/6model/serialization.c:
20:26 dalek nqp/toqast: Try to unbust things on big endian platforms. Untested, but should do the trick.
20:26 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/b1226fb1bf
20:26 dalek nqp/toqast: b5930e1 | moritz++ | tools/build/PARROT_REVISION:
20:26 dalek nqp/toqast: bump parrot version to 4.5 release
20:26 dalek nqp/toqast: review: https://github.com/perl6/nqp/commit/b5930e183d
20:27 jnthn OK, toqast is now sync'd up with the post-qbootstrap NQP world. :)
20:27 harmil OK, I suspected there was something else going on where you could request that the server replay "items of interest" or something
20:28 sorear harmil: the server itself doesn't hold on to any items, other than the TCP send buffer stuff
20:28 sorear harmil: there are a large number of clients in use, many of them provide conveniences for dealing with a backlog of messages received while away
20:29 sorear "backlogging" comes from the concept of a person or bureaucracy being backlogged with things it hasn't been able to handle yet
20:29 sorear why do I keep trying to write that word starting with beau-
20:30 jnthn ...'cus it sure ain't beautiful :)
20:47 cog_ joined #perl6
21:00 [Coke] did p5's named capture regexs come from p6?
21:01 sorear [Coke]: I want to say they came from .net
21:02 harmil Really? I was pretty sure P5 originated those...
21:05 dalek nqp: 46cf8f8 | jnthn++ | src/PAST/NQP.pir:
21:05 dalek nqp: Start getting some more of the 6model primitives into the nqp:: namespace.
21:05 dalek nqp: review: https://github.com/perl6/nqp/commit/46cf8f8400
21:05 dalek nqp: bc64ed0 | jnthn++ | src/how/NQP (5 files):
21:05 dalek nqp: Use nqp::setwho and nqp::newtype.
21:05 dalek nqp: review: https://github.com/perl6/nqp/commit/bc64ed0a88
21:14 ggoebel joined #perl6
21:14 ggoebel sub merge_sort ( @a ) {
21:14 ggoebel return @a if @a <= 1;
21:14 ggoebel
21:14 ggoebel my $m = @a.elems div 2;
21:14 ggoebel my @l = merge_sort @a[  0 ..^ $m ];
21:14 ggoebel my @r = merge_sort @a[ $m ..^ @a ];
21:14 ggoebel
21:14 ggoebel return @l, @r if @l[*-1] !after @r[0];
21:14 ggoebel return gather {
21:14 ggoebel take @l[0] before @r[0] ?? @l.shift !! @r.shift
21:14 ggoebel while @l and @r;
21:14 ggoebel take @l, @r;
21:14 ggoebel }
21:14 ggoebel }
21:15 ggoebel my @data = 6, 7, 2, 1, 8, 9, 5, 3, 4;
21:15 ggoebel say 'input  = ' ~ @data;
21:15 ggoebel say 'output = ' ~ @data.&merge_sort;
21:15 ggoebel perl6: sub merge_sort ( @a ) {
21:15 p6eval niecza v18-7-ga660099: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse block at /tmp/cKNLVWxQVq line 1 (EOF):�------> [32msub merge_sort ( @a ) {[33m�[31m<EOL>[0m�Couldn't find final '}'; gave up at /tmp/cKNLVWxQVq line 1 (EOF):�------> [32msub merge_sort ( @a ) {[33m�[31m…
21:15 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting "use", statements or "}"␤    at /tmp/jsOvL6_qBq line 2, column 1␤»
21:15 p6eval ..rakudo d5f39a: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}'␤»
21:15 ggoebel return @a if @a <= 1;
21:15 ggoebel
21:15 ggoebel my $m = @a.elems div 2;
21:15 ggoebel my @l = merge_sort @a[  0 ..^ $m ];
21:15 ggoebel my @r = merge_sort @a[ $m ..^ @a ];
21:15 ggoebel
21:15 ggoebel return @l, @r if @l[*-1] !after @r[0];
21:15 ggoebel return gather {
21:15 ggoebel take @l[0] before @r[0] ?? @l.shift !! @r.shift
21:15 ggoebel while @l and @r;
21:15 ggoebel take @l, @r;
21:15 ggoebel }
21:15 ggoebel }
21:15 ggoebel my @data = 6, 7, 2, 1, 8, 9, 5, 3, 4;
21:15 ggoebel say 'input  = ' ~ @data;
21:15 ggoebel say 'output = ' ~ @data.&merge_sort;
21:15 ggoebel sorry folks
21:16 benabik ggoebel: p6eval accepts URLs to gists
21:19 sorear and I show up too late to kick.  sorry folks.
21:19 masak also, there are IRC clients out there that can intercept and prevent paste mishaps.
21:19 masak sorear: I wouldn't kick if there isn't malicious intent.
21:19 masak well, maybe if the paste went on for minutes.
21:20 sorear 14:14 < ggoebel> sub merge_sort ( @a ) {
21:20 sorear 14:15 < ggoebel> sorry folks
21:20 sergot joined #perl6
21:20 sergot hi o/
21:20 phenny sergot: 20 Jun 14:20Z <moritz> tell sergot < sjn> btw, if you bump into sergot, would you mind reminding him about sending his receipts and tickets and stuff?
21:20 PerlJam that's like 1 minute-ish  :)
21:20 sorear seconds required for a paste to complete = (lines - 10) / 2
21:21 sorear ways to interrupt a paste, completeish list: kick, kill, setting moderation
21:23 * masak .oO( How do I silence thee? let me count the ways... )
21:30 [Coke] sorear: it's annoying, but is it /that/ annoying?
21:30 [Coke] hugme: hug ggoebel,sorear
21:30 * hugme hugs ggoebel,sorear
21:43 erkan joined #perl6
21:43 erkan joined #perl6
21:46 kurahaupo joined #perl6
21:48 noam_ joined #perl6
21:52 pmichaud /lastlog pmichaud 5
21:52 pmichaud oops
21:59 cog__ joined #perl6
22:01 mikemol joined #perl6
22:04 timotimo do you think i can commit the incomplete code for using 0 as protocol argument to the socket constructor for sockets, even though it doesn't yet set the protocol that was actually assigned to the socket?
22:29 adu joined #perl6
22:30 dalek nqp: 01558df | jnthn++ | src/how/NQPClassHOW.pm:
22:30 dalek nqp: Eliminate a pir::isa usage.
22:30 dalek nqp: review: https://github.com/perl6/nqp/commit/01558dfff2
22:30 dalek nqp: 73ebd23 | jnthn++ | src/stage0/ (8 files):
22:30 dalek nqp: Update bootstrap.
22:30 dalek nqp: review: https://github.com/perl6/nqp/commit/73ebd23662
22:32 masak 'night, #perl6
22:34 colomon \o
22:36 sorear o/
22:37 cog__ joined #perl6
22:38 vmspb left #perl6
22:41 adu \o
22:50 jnthn Figure I'll sleep too. o/
23:19 mtk joined #perl6
23:30 noam_ joined #perl6
23:42 leprevost joined #perl6
23:55 tyatpi joined #perl6

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

Perl 6 | Reference Documentation | Rakudo