Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-12-29

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:07 sorear japhb: ping.  What do I need to be aware of for stealing Rakudo's MAIN_HELPER?
00:07 colomon sorear++
00:07 colomon ;)
00:08 sorear colomon: don't hold your breath, it seems to depend on roles
00:09 colomon ...which you're also going to do this month, right?  ;) ...
00:09 colomon sorear++
00:18 Util Problem with Niecza;
00:18 Util perl6: my @a = 12, 13, 14, 15; for @a[^4].pairs -> $p { say $p.perl }; say "---"; for @a[^4].kv -> $k, $v { say $k.perl; say $v.perl; }
00:18 p6eval rakudo a9bead: OUTPUT«0 => 12␤1 => 13␤2 => 14␤3 => 15␤---␤0␤12␤1␤13␤2␤14␤3␤15␤»
00:18 p6eval ..niecza v13-5-g52411f8: OUTPUT«0 => 12␤1 => 13␤2 => 14␤3 => 15␤---␤0␤GatherIterator.new(...)␤»
00:19 p6eval ..pugs b927740: OUTPUT«(0 => 12)␤(1 => 13)␤(2 => 14)␤(3 => 15)␤---␤\0␤\12␤\1␤\13␤\2␤\14␤\3␤\15␤»
00:32 sorear wow, impressive!
00:50 alvis joined #perl6
01:15 cognominal joined #perl6
01:23 Timbus padre would be excellent if copy and paste worked properly :[
01:26 silug joined #perl6
01:31 alc joined #perl6
01:34 tokuhirom joined #perl6
01:51 F_n joined #perl6
01:55 F_n am i reading p3 for p6cc2001 right? test is looking for commandline args, but description says to accept multiple lines from stdin
02:06 wolfman2000 joined #perl6
02:09 shinobicl_ joined #perl6
02:13 shinobicl_ hi!
02:13 shinobicl_ rakudo: for ( {1}, {2} ) -> $func { say $func.WHAT() }
02:13 p6eval rakudo a9bead: OUTPUT«Block()␤Block()␤»
02:13 shinobicl_ rakudo: for ( {1}, {2} ) -> $func { say $func }
02:13 p6eval rakudo a9bead: OUTPUT«Block.new()␤Block.new()␤»
02:14 shinobicl_ how can i do it so this prints "1" and "2" ?
02:17 sorear say $func()
02:18 shinobicl_ rakudo: for ( {1}, {2} ) -> $func { say $func() }
02:18 p6eval rakudo a9bead: OUTPUT«1␤2␤»
02:18 shinobicl_ :D
02:30 hypolin joined #perl6
02:33 _jaldhar joined #perl6
02:40 wooden joined #perl6
02:40 wooden joined #perl6
02:43 agentzh joined #perl6
02:48 abercrombie joined #perl6
03:05 [Coke] rakudo MAIN bug: "sub MAIN($a, :$b=4) { say "$a, $b" } - generates 2 warnings.
03:14 cognominal_ joined #perl6
03:15 sorear seen diakopter
03:15 aloha diakopter was last seen in #perl6 9 days 1 hours ago saying "oh, you typoed x for c then :P".
03:19 * sorear wonders why git log FILENAME -p is rejected.  GNU feature hatred?
03:20 sorear F_n: masak will be getting in in a couple more hours... I can't speak to the intentions of the tests
03:23 icwiener joined #perl6
03:24 daemon joined #perl6
03:33 sorear aha
03:34 japhb sorear: pong -- I have not backlogged for a couple days, but I noticed the highlight.  What's up?
03:37 japhb Hmmm, guess I just missed him
03:37 Psyche^ joined #perl6
03:38 sorear who?
03:38 japhb you
03:39 sorear japhb: I want to learn about MAIN
03:39 japhb Ah, sure.  What did you want to know?
03:40 sorear anything that might be a problem when I steal Rakudo's implementation
03:40 sorear anything that's tied to Rakudo that I should change
03:40 japhb sorear, OK.  Well, here are a few notes:
03:41 daemon joined #perl6
03:42 japhb 1. The version that's in Rakudo is not finished by any stretch of the imagination.  In fact, I had the extended yak shaving path MAIN -> val() -> Str.Numeric() -> Failure -> sigh, ran into holiday family visit lack of tuits.
03:42 japhb 2. Thus, hack-val(), which is one *tiny* piece of what val() should be.
03:43 japhb 3. TimToady is (was?) of the opinion that val() should not only be able to handle base types, but also Enums and constants.  I'm not sure that we actually want to go there, for reasons of information leakage.
03:44 japhb 4. $*USAGE should be calculated per COMP_UNIT that has a MAIN(), before mainline runtime.  This is not the case yet in Rakudo; there's nothing to stop it, but it is just not done yet.
03:44 daemon joined #perl6
03:46 japhb 5. My plan was to drop much of hack-val() in favor of trying conversions to various types in some fixed order, trapping Failure, returning successful conversions, and going on to the next attempted conversion on Failure trap.
03:47 japhb 6. There is still a pending question about how these implicitly val()-converted things should dispatch, since they need to act as *both* Str *and* the converted type if any.
03:48 japhb (TimToady wanted the Str-ness to be "slightly looser" than the (converted type)-ness, but had not decided how to do that in a general way.)
03:48 japhb 7. I think there were a couple cases in gen-usage() that I wanted to make a little more dwimmish, but I don't remember what they were off the top of my head.
03:49 japhb Um ... I think that's most of what I had in mind (except for of course any TODO notes you see), but I'm not looking at the code at the moment.
03:49 japhb (Actually, I'm supposed to be socializing, but dangit, the pull of the IRC highlight is JUST TOO STRONG.  ;-) )
03:49 japhb over
03:50 japhb Oh, one more thing:
03:52 japhb 8. jnthn had the idea of adding a Routine.usage() method that does the gen-usage() calculation on an arbitrary routine, and calling that on &MAIN just before runtime, instead of some additional specially named setting magic function (e.g. USAGE_HELPER() ).
03:53 japhb ok, now "over".  :-)
03:53 sorear 1. until someone figures out the details of Failure, I will short-circuit this yak by die()ing in Str.Numeric
03:53 sorear have you seen this?
03:53 sorear nom: say +"abc"
03:53 p6eval nom a9bead: OUTPUT«0␤»
03:53 sorear nom: say +"123abc"
03:53 p6eval nom a9bead: OUTPUT«Failure.new(exception => Exception.new())␤»
03:54 japhb Yeah, that's because my str-numeric branch has not been merged, because of the aforementioned Failure() issues.
03:54 japhb The strictness that str-numeric() adds causes a number of roast failures.
03:54 sorear 3. that leads to the question of which lexical scope.  CORE::?  I can't imagine my-app --number=pi will be that useful.
03:54 japhb (And some strangeness in other parts of the Setting that don't expect that strictness.)
03:55 sorear 4. Not $?USAGE?  Also, I thought only the main compilation unit could have a MAIN.
03:55 sorear 5. that was my idea too.
03:55 sorear 6. sounds like MI to me.
03:55 japhb 4. $?USAGE might be correct.  I'm not looking at the spec.  :-)
03:56 sorear 8. that actually sounds vaguely *more* ick to me. :/
03:56 japhb 4a. Any comp unit can have a MAIN (for reasons of self-testing modules, for instance, Python-style), but only the "mainline" MAIN will actually get dispatched to.
03:57 japhb 6. I watched an exchange between jnthn and TimToady in which they went off on this one for a while, so I assume they had some deep understanding that I as yet lack on this.
03:58 packetknife joined #perl6
03:58 japhb 8.  I have warring feelings.  Slightly stronger for me is that it doesn't feel right for all Routines to have a special method that only lets them describe themselves as MAIN would, but perhaps there is a missing unification here.
03:58 benabik .
03:58 sorear
03:59 benabik u.u
03:59 japhb sorear, OK, I have to run to an appointment, but I will try to backlog later if you have more questions or thoughts on this.
03:59 japhb Sorry I can't be of more help right now!
04:00 sorear thanks.  bye.
04:00 japhb np
04:00 japhb afk &
04:04 newbie joined #perl6
04:36 sivoais joined #perl6
05:08 thou joined #perl6
05:20 dalek niecza: fd3c735 | sorear++ | src/niecza:
05:20 dalek niecza: Fix multifor/lazy list failure (Util++)
05:20 dalek niecza: review: https://github.com/sorear/niecza/commit/fd3c7352a4
05:22 dalek roast: 18f9e04 | sorear++ | S04-statements/for.t:
05:22 dalek roast: Test for sorear/niecza@fd3c735
05:22 dalek roast: review: https://github.com/perl6/roast/commit/18f9e04a66
05:23 japhb sorear, I'm bak if you have any remaining things to talk about
05:24 * sorear sort of wonders about the mechanics of "I'm supposed to be socializing but the pull of the highlight"
05:24 sorear karma (Util
05:24 aloha (Util has karma of 0.
05:24 sorear karma Util
05:24 aloha Util has karma of 119.
05:25 sorear I wonder if this actually works (Util++)
05:25 sorear karma Util
05:25 aloha Util has karma of 119.
05:25 sorear aw
05:25 sorear japhb, ACTION was at you
05:26 japhb (re: socializing v. highlight) "Oh, I'll just go and check to see if anything critical happened.  You know, at work, or something ....  Oooh, I've been highlighted!  Uh, I'll just be a minute here ... or three ... or fifteen ...."  :-)
05:27 daemon joined #perl6
05:27 sorear haha.
05:27 japhb sorear, ACTION?
05:28 tokuhirom joined #perl6
05:28 sorear That.
05:29 sorear no good names for 'em
05:29 japhb "emotes"?
05:29 sorear that works too
05:29 japhb (Util)++
05:29 japhb karma Util
05:30 aloha Util has karma of 120.
05:30 sorear karma (Util)
05:30 aloha (Util) has karma of 0.
05:30 sorear huh!
05:30 sorear thanks!
05:30 japhb np
05:30 japhb :-)
05:30 * sorear hasn't had many chances to socialize lately :|
05:32 sorear as I mentioned to colomon earlier, don't hold your breath for MAIN in niecza; it depends on slightly improved roles and lots of reflecttion additions
05:33 japhb Well, then maybe by the time you get on that, I'll have tuits to throw at Rakudo's implementation ....
05:37 rsimoes1 where I can read about this behavior?
05:37 rsimoes1 perl6: my $scalar = ("a", "b", "c"); say $scalar;
05:37 p6eval pugs b927740, rakudo a9bead, niecza v13-5-g52411f8: OUTPUT«a b c␤»
05:37 rsimoes1 seems like it did an implicit join?
05:40 japhb nom: my $scalar = ("a", "b", "c"); .say for $scalar.WHAT, $scalar.Str, $scalar.gist;
05:40 p6eval nom a9bead: OUTPUT«Parcel()␤a b c␤a b c␤»
05:40 japhb rsimoes1: you're looking at the gist-ification of Parcel()
05:52 kaleem joined #perl6
06:14 packetknife joined #perl6
06:27 thou niecza: my @a = <one two three>; say ("x two x" ~~ / @a /).perl;
06:27 p6eval niecza v13-6-gfd3c735: OUTPUT«#<match from(2) to(5) text(two) pos([].list) named({}.hash)>␤»
06:27 thou nom: my @a = <one two three>; say ("x two x" ~~ / @a /).perl;
06:28 p6eval nom a9bead: OUTPUT«Match.new(orig => "x two x", from => 7, to => -3, ast => Any, list => ().list, hash => EnumMap.new())␤»
06:29 thou does anyone know of a workaround for interpolating an array into a regex in nom? instead of hard-coding the list of alternations?
06:33 TimToady nom: my @a = <one two three>; say ("x two x" ~~ / <{ join '|', @a}> /).perl;
06:33 p6eval nom a9bead: OUTPUT«Match.new(orig => "x two x", from => 2, to => 5, ast => Any, list => ().list, hash => EnumMap.new())␤»
06:33 thou nice
06:41 koban joined #perl6
06:56 cognominal joined #perl6
07:20 daemon joined #perl6
07:24 cognominal_ joined #perl6
07:36 donri left #perl6
07:45 Mowah joined #perl6
07:47 cognominal___ joined #perl6
07:56 baest joined #perl6
08:03 cognominal___ joined #perl6
08:12 kaare_ joined #perl6
08:17 Tene joined #perl6
08:18 Tene joined #perl6
08:25 thou joined #perl6
08:27 moritz \o
08:30 Tene o/
08:48 masak \o
08:49 snarkyboojum joined #perl6
08:49 DarthGandalf joined #perl6
08:49 pomysl joined #perl6
08:49 Timbus joined #perl6
08:49 cotto joined #perl6
08:49 jnthn joined #perl6
08:49 kranius joined #perl6
08:49 Helios joined #perl6
08:49 chra joined #perl6
08:49 jasonmay joined #perl6
08:53 datums_nb joined #perl6
08:55 masak we're up to 20 contestants now.
08:55 datums_nb joined #perl6
08:55 masak and https://rt.perl.org/rt3/Ticket/Display.html?id=107244 looks like a bug report generated by p6cc solution writing ;)
08:58 djanatyn hey, masak. quick question! :D
08:58 djanatyn i'm trying to write a test for https://rt.perl.org/rt3/Public/Bug/Display.html?id=74300
08:58 drbean joined #perl6
08:59 djanatyn the problem was that the presence of a new($) multi method breaks attribute intialization.
09:00 djanatyn class A { has $.a; multi method new($) { say "hi"; }}; # so, is the problem that when you create a new instance of this class, $.a is not initialized?
09:00 djanatyn I guess I'm just having some trouble understanding basic vocabulary.
09:00 * masak looks at the ticket
09:01 masak F_n: oh wow, that's a bit of a contradiction. :/ I'd say the tests take precedence, but we won't hold it against you if you follow the description there.
09:01 masak F_n: this probably merits an addition to NOTES, too. will fix.
09:02 djanatyn ...sorry, but what is F_n? are you reading from irc logs?
09:03 moritz djanatyn: F_n is a nick name
09:03 djanatyn Ah, okay.
09:03 masak djanatyn: yes, I was responding to a question from the logs.
09:03 djanatyn Oh. ^_^
09:04 djanatyn Sorry, got confused.
09:04 masak djanatyn: yes, you've correctly identified the problem above.
09:04 djanatyn Okay, thanks
09:04 masak djanatyn: sorry, sometimes our bug descriptions are a bit terse because we're so familiar with the domain.
09:04 masak :)
09:05 djanatyn Nah, it's pretty descriptive. I'm just a bit unfamiliar with the domain :)
09:05 datums_nb joined #perl6
09:06 moritz nom: class A { has $.x }; say A.new(x => 10).x
09:06 p6eval nom a9bead: OUTPUT«10␤»
09:06 moritz nom: class A { has $.x; multi method new($) { } }; say A.new(x => 10).x
09:06 p6eval nom a9bead: OUTPUT«10␤»
09:07 djanatyn ah, cool. thanks!
09:07 moritz the two produce the same output in current rakudo, because the bug has been fixed
09:07 djanatyn I was talking to Tene about it earlier, and got a little confused with the code examples that were used in the irclogs.
09:07 djanatyn but, I learned about pairs and things, which was fun.
09:07 moritz fun++
09:09 djanatyn nom: class A { has $.foo; multi method new($) { } }; say A.new(:foo<10>).foo
09:09 p6eval nom a9bead: OUTPUT«10␤»
09:09 djanatyn that's the syntax that they used in the examples that had me confused.
09:14 djanatyn nom: class A { has $.foo; multi method new($) { } }; say A.new(:foo<foobar>).foo
09:14 p6eval nom a9bead: OUTPUT«foobar␤»
09:17 masak F_n: http://strangelyconsistent.org/p6cc2011/NOTES updated -- thanks!
09:20 Trashlord joined #perl6
09:23 F_n masak: great, thanks
09:27 snearch joined #perl6
09:31 kaare_ joined #perl6
09:31 datums_nb joined #perl6
09:38 rindolf joined #perl6
09:39 rindolf Hi all.
09:39 rindolf rakudo: qq{Hello "Sophie"!}
09:39 p6eval rakudo a9bead:  ( no output )
09:39 rindolf rakudo: say qq{Hello "Sophie"!}
09:39 p6eval rakudo a9bead: OUTPUT«Hello "Sophie"!␤»
09:39 rindolf :-)
09:39 rindolf http://try.rakudo.org/ - this timed out.
09:42 kaare_ joined #perl6
09:46 djanatyn woo, all tests successful.
09:50 masak time to write more tests! :)
10:00 japhb joined #perl6
10:03 dalek roast: 363a3db | Jonathan++ | S12-construction/new.t:
10:03 dalek roast: RT #74300
10:03 dalek roast: review: https://github.com/perl6/roast/commit/363a3dba51
10:03 dalek roast: cbde750 | moritz++ | S12-construction/new.t:
10:03 dalek roast: Merge pull request #12 from djanatyn/master
10:03 dalek roast:
10:03 dalek roast: GCI - Test for RT #74300
10:03 dalek roast: review: https://github.com/perl6/roast/commit/cbde75007d
10:06 cognominal joined #perl6
10:10 masak sorear: 'niecza -v' gives rather odd output. all I wanted was something like 'This is Niecza, v13.', but it goes on about git hashes and how long MAIN took.
10:10 bkolera joined #perl6
10:14 cognominal_ joined #perl6
10:18 am0c joined #perl6
10:21 moritz djanatyn: GCI task completed, thanks a lot!
10:23 moritz masak: that output doesn't seem to be a git sha1
10:23 moritz fatal: Not a valid object name 9e5f9648088c084066a3483af3342310e7ffb61496f790c8a71b23975154d833
10:24 daxim joined #perl6
10:27 djanatyn moritz: nope, thank you! :D
10:27 masak moritz: then I can't even put words on what it is rather than being just a simple version number :)
10:27 djanatyn I'm on a challenge to use haskell exclusively during winter break.
10:28 djanatyn But, I made sure that perl6 was the only exception :)
10:28 moritz djanatyn: or you can hack on pugs, which is perl 6 implemented in haskell :-)
10:29 masak ooh, interesting. my Niecza codebase has bitrotted. time to go hunting for bugs.
10:29 sayu joined #perl6
10:38 xabbu66 joined #perl6
10:41 xabbu66 left #perl6
10:49 mj41 joined #perl6
10:51 Mowah joined #perl6
10:58 Mowah joined #perl6
10:59 tadzik morning!
11:03 tadzik djanatyn: fyi, Bailador has post now, and various other things :)
11:04 tadzik masak: are you planning to move Ratel somewhere, or shall I do it?
11:06 packetknife joined #perl6
11:07 masak tadzik: I can do it tonight.
11:07 tadzik great, thanks
11:07 masak tadzik: best would be if Tene++ did it; he wrote it :)
11:07 tadzik sure
11:15 molaf joined #perl6
11:17 dreamweaver joined #perl6
11:20 fsergot joined #perl6
11:20 fsergot o/
11:21 LlamaRider rakudo: my Int $num = 5/5;
11:21 p6eval rakudo a9bead: OUTPUT«Type check failed in assignment to '$num'; expected 'Int' but got 'Rat'␤  in block <anon> at /tmp/cxNz8oT0qi:1␤  in <anon> at /tmp/cxNz8oT0qi:1␤»
11:21 LlamaRider is this intended?
11:21 moritz yes
11:21 moritz LlamaRider: if you want an Int as the result of a division, use  div  instead of  7
11:21 moritz nom: say (5 div 5).WHAT
11:21 p6eval nom a9bead: OUTPUT«Int()␤»
11:22 LlamaRider not sure I am allowed to, the P6 contest wants me to use '/'   :)
11:22 LlamaRider but I was always a fan of coercive subtyping, strange there is no obvious way to cast Rat into Int
11:22 moritz LlamaRider: it wants the math semantics of /, it doesn't mean you have to use / in your code
11:23 moritz LlamaRider: (5/5).Rat
11:23 moritz erm, .Int
11:23 LlamaRider sweet :)
11:23 LlamaRider 10x!
11:23 fsergot nom: my Int $s = (5/5).Int
11:23 p6eval nom a9bead:  ( no output )
11:24 moritz LlamaRider: in general, you can coerce to a type calling .Type on the value
11:24 moritz nom: say 3.Str
11:24 p6eval nom a9bead: OUTPUT«3␤»
11:24 moritz nom: say 3.Str.WHAT
11:24 p6eval nom a9bead: OUTPUT«Str()␤»
11:25 Tene masak: you can do whatever you like with Ratel; it was a quick hack that I'm not invested in whatsoever.
11:26 masak Tene: ok; just thought I'd give you first dibs on creating a repo for it :)
11:26 masak niecza: grammar G { token TOP { <foo> }; token foo { '<A>' <bar>* [$<b>=[ '<B>' <bbar=.bar>* ]]? '<C>' }; token bar { [<!before '<'> .]+ } }; my $q = '<A> X <B> X <C>'; G.parse($q); say $<foo><bar>.WHAT; say $<foo><bbar>.WHAT
11:26 p6eval niecza v13-6-gfd3c735: OUTPUT«List()␤Match()␤»
11:26 Tene maybe in the morning; I'm going to sleep now.
11:26 Tene 'night
11:26 masak 'night, Tene
11:26 masak sorear: the above should yield OUTPUT«List()␤List()␤» if you ask me.
11:27 masak sorear: and if I'm not mistaken, it did in earlier releases of Niecza and has since regressed, which breaks my tests.
11:27 masak lunch &
11:32 fsergot Hmm, maybe i'll start in P6 contest too :)
11:34 moritz fsergot: just sign up, it doesn't cost anything :-)
11:34 sayu joined #perl6
11:36 fsergot moritz: Im not sure if Im good enough. will try :)
11:36 moritz trying is the only way to find out :-)
11:36 fsergot right :)
11:37 moritz wow, all that talk about hash collision complexity attacks on the web, and perl 5.8.1 had protection against that 8 years ago
11:37 tadzik yeah
11:38 moritz it kinda makes you think about the majurity of all the new "cool" web solutions
11:38 moritz s/j/t/
11:54 masak fsergot: definitely sign up. we can never get better if we don't challenge ourselves.
11:54 fsergot Ok, thanks. :)
12:08 tokuhirom joined #perl6
12:10 masak 'sides, even *being* on this channel has a high correlation with success in the contest ;)
12:11 tadzik :)
12:27 cognominal___ joined #perl6
12:45 dudulz joined #perl6
12:46 masak I think https://rt.perl.org/rt3/Ticket/Display.html?id=63760 can be closed -- any objections?
12:49 tadzik I have no idea how loop { say "OH HAI"; last } while 1 should behave
12:49 tadzik nom: loop { say "OH HAI"; last } while 1
12:49 p6eval nom a9bead: OUTPUT«===SORRY!===␤Missing block at line 1, near ""␤»
12:49 tadzik nom: loop { say "OH HAI"; last }; while 1
12:49 p6eval nom a9bead: OUTPUT«===SORRY!===␤Missing block at line 1, near ""␤»
12:50 tadzik oh, it used to work
12:50 tadzik no objections here :)
12:51 masak ``If I were to design a language from scratch, I would follow the Algol68 path and make every statement and declaration an expression that yields a value'' -- Bjarne Stroustrup, "The Design and Evolution of C++"
12:51 masak nom: loop { say "OH HAI"; last } say "OH HAI again"
12:51 p6eval nom a9bead: OUTPUT«===SORRY!===␤Confused at line 1, near "loop { say"␤»
12:51 masak just checking :)
13:09 masak thing's I learned from reading Peter Norvig: Python has no method call syntax.
13:10 tadzik it doesn't?
13:11 masak x.f(y) *looks* like a separate method call syntax.
13:11 tadzik but it's a mere hash lookup?
13:11 masak but it's just x.f which is an attribute lookup which returns a bound method.
13:11 masak followed by a normal function invocation.
13:11 tadzik right
13:12 masak both Ruby and Python have the concept of bound methods in the language. in Perl 6 we can emulate it, but we don't have it as a language concept.
13:12 masak neither does Perl 5.
13:22 fglock joined #perl6
13:29 yunga joined #perl6
13:31 eiro back!
13:31 eiro my god damn cat ruined my keyboard
13:31 huf how?
13:32 eiro is there a irc log ? I would like to know if someone replied to me.
13:32 tadzik irclog.perlgeek.de
13:33 eiro he lied on my keyboard, asking for affection. i tried to take it out but he grapped the keyboard, the laptop falled down.
13:33 eiro thanks
13:34 eiro nice web interface ! is the software oss ?
13:35 eiro yes!
13:35 eiro cool
13:35 eiro perl stuff!
13:35 eiro arg ... perl requirement :(
13:35 eiro s/perl/mysql/
13:37 eiro noone did actually :) it could be an awesome perl6 project
13:38 masak it's moritz++' IRC log software.
13:39 baest eiro: as I read the code it should be very easy to convert to another database. Just change the ilbot.sql to something more SQL standardish and change database.conf
13:39 tadzik and convert it to Bailador :>
13:40 eiro got to go ... bbl
13:40 baest tadzik: :)
13:52 bluescreen10 joined #perl6
13:54 fsergot joined #perl6
14:06 perl joined #perl6
14:09 masak perl: welcome!
14:10 masak it's about time we got some perl on this channel! :D
14:13 perl :)
14:18 perl trying to figure out an efficient server socket design tonight, i backended libevent for the eventloop, i started parent to only listen for SIGCHLD and listen to children over socketpairs, and children handling accept(), now i am worried since children are performing alot of blocking operations that its possible for a single child to do many accepts before it goes off doing the work effectively
14:18 perl and possibly leaving clients to timeout
14:19 perl so now i thinking, damnit, why not just have parent doing the accepts and toss work to children over socketpairs as i can't see something as high performance as epoll() kqueue() needing more than 1 process for the TCP socket
14:20 perl course bitch is have to do a completely rewrite for the latter
14:20 masak which implementation did you say you were using?
14:20 masak Rakudo? Niecza?
14:20 perl neither just have libevent linked in as C library atm
14:21 masak ah.
14:21 masak then this is probably the wrong forum, at least if you're expecting sensible feedback :)
14:21 masak this is #perl6.
14:22 masak there's always #perl-help on irc.perl.org, if you want help with something involving Perl 5.
14:22 perl can;t find anyone intelligent enough to talk on this topic, so thought i might try here :)
14:23 masak no doubt we're suitably flattered by that. :)
14:24 masak nevertheless, if we allowed this to descend into a general tech support shop, we'd soon descend into chaos. CHAOS, I tell ye! ;)
14:24 masak also, it wouldn't be as much fun as discussing Perl 6 all day.
14:24 perl i think perl6 should backend libevent to make use of kqueue and epoll in my opinion
14:24 perl get rid of select completely
14:24 masak sounds interesting.
14:25 masak prototypes in that direction are very welcome.
14:25 flussence I thought someone was already writing an event module that did that...
14:25 perl select() ineffecient when to many fd's to process
14:25 flussence select() is the least of our performance issues :)
14:26 masak hah!
14:33 perl well may kings bow down and angels sing when perl6 is ready
14:35 packetknife joined #perl6
14:35 dudulz left #perl6
14:36 flussence I wonder if this still causes horrible crashes...
14:36 flussence nom: 1 XXZXZXZXZZZZZZXZXXXZ 2
14:36 p6eval nom a9bead: OUTPUT«(timeout)»
14:36 flussence yep
14:36 masak perl: I'd be happy if I could just do my everyday tasks in Perl 6, in a fast, stable, and memory-efficient way.
14:40 perl masak: what are the memory issues?
14:42 masak perl: just that Rakudo is quite memory-hungry.
14:42 perl well everytime someone submits code that is more than X syscalls they should be beaten on a stake
14:42 masak I actually don't know about Niecza's memory consumption. haven't paid attention to it.
14:43 masak perl: beating on a stake is not a common practice in here. we tend to waft people with the turbulence of butterfly wings instead.
14:44 flussence niecza's repl actually starts off 20MB more than rakudo's...
14:46 masak I wouldn't be surprised if Niecza's builds using less memory, though.
14:46 flussence oh, yeah, that part is much lower.
14:46 masak though that comparison is not entirely fair -- Rakudo is more featureful :)
14:48 * [Coke] is reminded to double check the latest spec test counts.
14:48 masak :)
14:48 flussence I get the impression sometimes that rakudo's Gigantic Compile Of Doom contributes to the slow uptake
14:55 masak No Killer App contributes to the slow uptake.
14:55 masak or, more exactly, there has to be a more coherent reason for people to get Perl 6 than "look! grammars and metaops and junctions!"
14:56 masak they'd stand a Gigantic Compile Of Doom if they knew there was a reward on the other side besides getting to experiment a little.
14:56 flussence hm, true
14:57 masak nom: package Color { our ($red, $green, $blue) = 1..* }; say Color.blue
14:57 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$green'␤␤  in file '(file unknown)' line 955␤»
14:57 masak o.O
14:57 * masak submits rakudobug
14:57 masak nom: package Color { our ($red, $green, $blue) = 1..* }; say Color::blue
14:57 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$green'␤␤  in file '(file unknown)' line 39790752␤»
14:57 benabik wouldn't that be Color::blue ?
14:58 benabik Oh.
14:58 masak aye.
14:58 masak but the problems occur already in the declaration part.
14:58 masak nom: package Color { our $red }; say "alive"
14:58 p6eval nom a9bead: OUTPUT«alive␤»
14:58 masak nom: package Color { our ($red, $green) }; say "alive"
14:58 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$red'␤␤    in file '(file unknown)' line 58687820␤»
14:58 masak nom: package C { our ($r, $g) }
14:58 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$r'␤␤      in file '(file unknown)' line 26048650␤»
14:58 masak golf'd :)
14:59 masak nom: package { our ($r, $g) }
14:59 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$r'␤␤      in file '(file unknown)' line 33399641␤»
14:59 masak :)
14:59 masak nom: our ($r, $g)
14:59 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$r'␤␤      in file '(file unknown)' line 382␤»
15:00 masak oh my. :/
15:00 masak nom: my ($r, $g)
15:00 p6eval nom a9bead:  ( no output )
15:00 flussence nom: our ($, $g)
15:00 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$g'␤␤      in file '(file unknown)' line 15915070␤»
15:00 flussence :D
15:01 koban left #perl6
15:02 masak nom: my ($, $)
15:02 p6eval nom a9bead:  ( no output )
15:02 masak nom: our ($, $)
15:02 p6eval nom a9bead:  ( no output )
15:02 masak nom: our ($, $, $g)
15:02 p6eval nom a9bead: OUTPUT«use of uninitialized value of type Mu in string context␤use of uninitialized value of type Mu in string context␤===SORRY!===␤error:imcc:Multiple declarations of lexical '$g'␤␤      in file '(file unknown)' line 166␤»
15:09 masak does Niecza have anything corresponding to Rakudo's <?DEBUG(1)> in grammars?
15:10 masak I feel I need it now, since a Niecza regression introduced an unknown hangup in my previously working code, and I'm only able to track it some ways into the grammar using print statements...
15:12 daxim joined #perl6
15:14 MayDaniel joined #perl6
15:14 mj41 joined #perl6
15:24 thou joined #perl6
15:27 sayu joined #perl6
15:29 raiph joined #perl6
15:34 Trashlord joined #perl6
15:37 tadzik hrm
15:38 tadzik nom: package Foo { our $blue; }; $Foo::blue = 5; say $Foo::blue
15:38 p6eval nom a9bead: OUTPUT«5␤»
15:38 tadzik masak: ^
15:38 masak right, it works with any 'our' declaration that doesn't try to declare several variables in one go.
15:38 tadzik oh
15:39 masak and it has nothing to do with packages.
15:41 colomon http://www.keithschwarz.com/darts-dice-coins/ -- seems like it might be handy for full .pick implementation.
15:44 masak nice illustrations.
15:44 masak it's posts like these that I like best about the web.
15:45 tadzik it's so full of JS
15:47 masak it is? I didn't notice.
15:48 tadzik it made my CPU choke a bit :)
15:50 moritz if you disable JS, you see the TeX source code instead
15:50 moritz so quite readable :-)
15:50 TimToady o_O
15:51 tadzik :P
15:51 moritz (things like \frac{1}{6} instead of 1/6)
15:51 TimToady
15:52 masak oh yeah, my brain parses \frac without a hitch since several years back.
15:52 masak also, \infty
15:54 * TimToady wonders if val('⅙') should be made to work, or if we should use something else to extract Unicode values
15:55 * masak votes for 'something else'
15:55 TimToady hmm, baseless numbers, so :0<⅙>  :)
15:55 masak also, I'm not really convinced val() should be mucking with constants and enums either.
15:56 masak Google Go calls 'proceed' 'fallthrough' -- did we ever consider that? :)
15:56 masak (though I like the symmetry between 'proceed' and 'succeed')
15:56 TimToady yes, but it doesn't rhyme
15:56 masak right.
15:56 moritz TimToady: if ew make val('⅙') DWIM, we should also make ⅙ in perl 6 code DWIM
15:57 TimToady well, don't think I haven't considered it :)
15:57 * masak .oO( brought to you from the Department of Diminishing Returns )
15:58 TimToady otoh, why the heck does Unicode record the actual numeric values if we're s'posed to ignore 'em?
15:58 masak feels a bit like W3C specifying alphabetized lists for *all the alphabets in the world* :/
15:58 TimToady people have little trouble understanding ⅙
15:59 TimToady it gets a little hairier if we decide to support 2⅔ and such
15:59 TimToady one place where juxtaposition means addition, not multiplication, I note
16:00 masak here it is: http://www.w3.org/TR/2011/WD-css3-lists-20110524/#predefined-alphabetic
16:00 masak CSS jumping the shark :(
16:02 flussence I think I've read one of the newer unicode standards actually specifies *arbitrary* superscript+subscript fractions should be rendered as a ligature... bet that's fun for font rendering people
16:02 daxim you culturally insensitive clod, I count house number variants 甲乙丙丁 all the time!
16:02 _kr0 joined #perl6
16:03 TimToady gradea hook firehorse nail?
16:03 masak looks like zodiacal numbers to me.
16:03 TimToady firehorse is definitely zodiacal, but the others are in common use
16:03 masak hm.
16:04 TimToady at least as radicals/subparts
16:05 masak yep, they're "heavenly stems".
16:05 * moritz would like to eat some "heavenly stew" right now :-)
16:06 masak :)
16:06 TimToady but yes, also just 1st, 2nd, 3rd
16:06 * masak decommutes
16:06 kranius hello
16:06 TimToady howdy
16:20 TimToady cool, ༳ looks like the most complicated thing to support
16:20 TimToady .u ༳
16:20 phenny U+0F33 TIBETAN DIGIT HALF ZERO (༳)
16:20 TimToady == -1/2
16:20 benabik 0/2 = 0
16:21 benabik No?  ;-)
16:21 TimToady it's using "half" in front the way roman numerals do subtraction
16:21 TimToady so 0 - ½
16:23 TimToady so ༲ means 8½
16:23 benabik .u ༲
16:23 phenny U+0F32 TIBETAN DIGIT HALF NINE (༲)
16:23 tadzik 0_o
16:23 tadzik crazy stuff
16:23 benabik Tibet has some odd digits.
16:23 huf that's just like time in lots of languages
16:23 TimToady expresses as 17/2 in the database, so just a Rat
16:24 TimToady halfway to...
16:24 huf half-nine is 8:30
16:24 huf in german i think?
16:24 TimToady correct
16:24 TimToady unless it's Deutsch :P
16:24 huf same thing in hungarian, but that's probably just german influence
16:28 TimToady thing is, it's really easy for a parser to recognize that it has a Unicode character that it doesn't know how to parse, and go out to secondary storage to fetch a translation for it, or the name of something to autoload (thinking about set operators here)
16:28 TimToady it doesn't have to be something carried around in memory unless you use it
16:32 TimToady one could go as far as to allow ½ as a postfix:<½>, which makes 5½ work, but also weirdly allows $x½
16:33 TimToady :)
16:33 TimToady make that :) * ½
16:35 TimToady hey, if a splattered brane isn't good for thinking sideways, I don't know what is...
16:35 kaleem joined #perl6
16:36 djanatyn tadzik: :O
16:36 djanatyn cool!
16:36 tadzik I just made it support templates, but that triggers those nasty GC bugs again
16:42 colomon it seems like any bigger piece of code run in nom triggers GC bugs... at least, that's been my experience
16:43 tadzik well, I have a code which triggers it deterministically :)
16:43 sayu joined #perl6
16:43 colomon ooo, that's a plus
16:47 TimToady perl6: 1 XXZXZXZXZZZZZZXZXXXZ 2
16:47 MayDaniel joined #perl6
16:47 p6eval rakudo a9bead: OUTPUT«(timeout)»
16:47 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected "XXZXZXZXZZZZZZXZXXXZ"␤    expecting operator␤    at /tmp/IJUVl9YM_K line 1, column 3␤»
16:47 p6eval ..niecza v13-6-gfd3c735:  ( no output )
16:48 benabik niecza: say 1 XXZXZXZXZZZZZZXZXXXZ 2
16:48 p6eval niecza v13-6-gfd3c735: OUTPUT«1 2␤»
16:48 TimToady niecza++
16:52 TimToady otoh, making val handle vulgar fractions allows them to be used from the command line and such; a postfix solution doesn't work for that
16:53 arlinius joined #perl6
17:02 mj41 joined #perl6
17:17 masak it could be just my limited imagination, but I don't see us needing unicode fractions, either in the language or on the command line.
17:17 masak now, a way to serialize compact structs, *that* would be useful.
17:32 TimToady this is more about forming a coherent, useful policy on obvious Unicode characters like set operators than it is about vulgar fractions, appearances to contrary notwithstanding
17:36 thou joined #perl6
17:38 TimToady the semantics of characters matching <:No> are a small part of the more general issue of whether Perl should require predeclaration of the obvious, a commmon failing in other languages...
17:40 TimToady as for serializing compact structs, that's okay too--I'm not an exclusivist :P
17:41 mj41 joined #perl6
17:45 TimToady sorear: re http://irclog.perlgeek.de/perl6/2011-12-18#i_4845837 I think it's clear from the spec that only .. is recognized as meta syntax, and you'd use /\d/ => 'x' if you really want a character class to be recognized
17:46 Chillance joined #perl6
17:46 kshannon masak: In your 1st Dec blog post about macros you say "ASTs have to start carrying around their own lexical environment".  Have you done anything more about that?
17:46 kshannon I think that would be really useful for my attempt at operator precedence.
17:59 TimToady .oO(If Python is "batteries included", Perl 6 is "wind, solar, geothermal, and 4th-gen nuke plants included".)
17:59 kshannon :)
18:01 sorear masak: try 'sha256sum lib/CORE.setting
18:03 masak kshannon: haven't yet, but I mean to take a deep look this weekend.
18:04 masak sorear: would you agree that my expected printed-out message would make sense for the -v flag?
18:05 kshannon OK,  I guess I'll go fix some more simple bugs in the meantime...
18:05 masak sorear: also, would you like me to submit the issue I found with named captures as a nieczabug?
18:05 masak kshannon: I don't really see the connection between macro lexical cheating and operator precedence.
18:06 masak kshannon: but if you want a clue, roles do some similar kind of cheating.
18:09 TimToady phenny: tell raiph re: http://irclog.perlgeek.de/perl6/2011-12-18#i_4848275 I'd say 6model is not so much related to moose as it is to the Responder Interface stuff that nothingmuch++ was working on in the same timeframe, but representation polymorphism has been the p6 plan for ages
18:09 phenny TimToady: I'll pass that on when raiph is around.
18:11 TimToady you can see where I'm up to in my backlogging... :/
18:12 colomon TimToady++
18:15 sorear masak: there's NIECZA_RX_TRACE=1, which might help
18:15 cognominal TimToady, does representation polymorphism comes form "The art of the metaobjecr protocol" too?
18:15 sorear masak: _LTM_ can also help
18:16 TimToady cognominal: I don't know; all I know is that the concept was obviously needed for Perl 6 to handle foreign objects gracefully
18:16 dalek niecza: 68f80b8 | sorear++ | / (2 files):
18:16 dalek niecza: Fix for $<a>=[ <b>+ ] (masak)++
18:16 dalek niecza: review: https://github.com/sorear/niecza/commit/68f80b85a7
18:16 cognominal when I google, I got only Perl 6 releated links.
18:18 zipf joined #perl6
18:18 TimToady when I'm designing, I only think about what's right, not about where an idea might (or might not) have come from
18:18 masak sorear: thanks xx 2
18:18 cognominal that's good, but the history of ideas is an intesting thing too.
18:19 masak aye
18:19 TimToady having filtered most of these ideas through my subconscious, information about provenance is normally stripped
18:20 TimToady so I can't tell you offhand which of my ideas were original, and which merely someone else's idea popping up in a different form
18:21 TimToady so I have to officially not care about that  :)
18:21 cognominal this is not part of your internal meta-ideas protocol :)
18:21 Vlavv joined #perl6
18:21 sorear masak: no, but it would make sense for the -V flag.  I still think -v means --verbose
18:22 sorear wooh, I'm back in the present
18:22 TimToady cognominal: it is probably a social failing of an aspergery nature :)
18:23 sorear TimToady: I have the same problem, fwiw
18:24 jevin_ joined #perl6
18:24 TimToady there are, of course, some things I'm pretty sure I thought up myself, and some things I'm pretty sure I stole, but mostly I'm not sure.
18:26 TimToady and I strongly suspect that if I tracked that info I'd be a worse designer, according to the waterbed theory of Pooh brains...
18:27 TimToady but I can't even claim sole ownership of the synthesis, since y'all are my adjunct brains...
18:27 TimToady but that's okay too :)
18:30 slavik1 TimToady: hive mind?
18:31 thou joined #perl6
18:33 cognominal slavik1: we are not insects :)
18:34 TimToady in some ways; otoh I remember wanting representation polymorphism as far back as when I first added an XML parser to P5, and realized how much of the overhead was translating C data to Perl data...
18:34 cognominal and TimToady is not our queen. :)
18:34 slavik1 cognominal: the borg are not insects either :)
18:34 * TimToady is more like a drone :)
18:35 sorear do insects even havehive minds?
18:35 TimToady you'd have to ask the hive
18:35 masak sorear: both Perl 5 and S19 disagree with you on -v == --verbose
18:35 * cognominal will use the gps attack to make that drone land in Paris for the next Perl conference.
18:41 sorear masak: oh.  Well then.
18:41 Timbus joined #perl6
18:43 masak I've always thought of -v (in Perl) as "tell me the version", and -V as "give me all possible information about this build"
18:44 dreamweaver joined #perl6
18:56 LlamaRider ok, super basic question if anyone has a minute
18:56 LlamaRider rakudo: my @arry = [ [1,2],[3,4]]; say @arry[0;1]; say @arry[0][1];
18:57 p6eval rakudo a9bead: OUTPUT«Any()␤3 4␤»
18:57 LlamaRider new array indexing and where do I read about it.
18:57 LlamaRider kind of confusing
19:00 tadzik okay. Your @arry is an array with one element, are you aware of that?
19:01 tadzik rakudo: my @a = [1,2],[3,4]; say @a[0;1]; say @a[0][1]
19:01 p6eval rakudo a9bead: OUTPUT«3 4␤2␤»
19:01 tadzik I'm not quite familiar with this first syntax, to be honest
19:01 masak LlamaRider: you read about it in S09. but it's not implemted yet.
19:02 masak LlamaRider: and even if it were -- as I understand it, you can't use the multidim indexing syntax if you havn't explicitly declared the array as being multidim-indexable.
19:02 LlamaRider what bugs me is that the semicolon syntax and the bracket syntax do different things. Which I didn't expect. Hence I am reading more about it.
19:02 tadzik that's because it's not yet implemented, as masak said
19:02 masak LlamaRider: consider that part of the spec appropriately slushy, since it's yet to meet up with reality.
19:02 tadzik perl6: my @a = [1,2],[3,4]; say @a[0;1];
19:03 p6eval niecza v13-6-gfd3c735: OUTPUT«Unhandled exception: Excess arguments to postcircumfix:<[ ]>, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (postcircumfix:<[ ]> @ 0) ␤  at /tmp/UXHSlxHNXL line 1 (mainline @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2573…
19:03 p6eval ..pugs b927740: OUTPUT«*** ␤    Unexpected ";"␤    expecting "x", octal digit, "o", "b", fraction, exponent, term postfix, operator or "]"␤    at /tmp/o9uKhVUeUi line 1, column 30␤»
19:03 p6eval ..rakudo a9bead: OUTPUT«3 4␤»
19:03 benabik I'm guessing rakudo evaluates 0;1 to 1, then evaluates @a[1] to [3,4]
19:03 masak LlamaRider: the semicolon and bracket syntax do the same thing, unless things are missing along the path.
19:04 LlamaRider ok, seems torny at the moment
19:04 masak LlamaRider: what you're seeing currently from the implementations is garbage.
19:04 benabik nom: my @a = [1,2],[3,4]; say @a[say 'hi';1]
19:04 p6eval nom a9bead: OUTPUT«hi␤3 4␤»
19:04 masak LlamaRider: no, just not implemented yet.
19:04 LlamaRider lol
19:04 LlamaRider I see ^^
19:04 LlamaRider thanks a lot
19:04 LlamaRider saved me another 30 minutes of head scratching :)
19:04 masak ir parses the semicolon readily, since that's part of the syntax of the language.
19:07 LlamaRider so, is there a "safe" way to do say a hash of hashes with the current implementations (I'm using Rakudo)
19:07 sivoais joined #perl6
19:08 Psyche^ joined #perl6
19:08 drbean joined #perl6
19:08 tadzik sure thing
19:08 tadzik rakudo: my %a = foo => { bar => { asd => 1 } }; say %a<foo><bar><asd>
19:08 p6eval rakudo a9bead: OUTPUT«1␤»
19:08 tadzik what do you mean: a "safe way"?
19:09 LlamaRider = trying to stay away from the semicolon syntax
19:09 tadzik look above
19:09 LlamaRider thanks, that's what I had in mind
19:09 tadzik the old syntax works fine
19:12 LlamaRider what's the closest I get to Data::Dumper? Doing "say %a.perl;" ?
19:12 tadzik I think so
19:12 tadzik I don't know of any better way
19:13 masak yes. .perl isn't immune to pretzels, though.
19:13 masak any circularity and it hangs.
19:13 tadzik heh
19:16 felipe joined #perl6
19:20 LlamaRider rakudo: my %h ; %h<x><y> = 1;
19:20 p6eval rakudo a9bead: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1155␤  in block <anon> at /tmp/UabHS3pk0G:1␤  in <anon> at /tmp/UabHS3pk0G:1␤»
19:20 LlamaRider any idea why it doesn't autovivify ?
19:21 LlamaRider works if it's only one level
19:21 LlamaRider rakudo: my %h ; %h<x> = 1; say %h<x>;
19:21 p6eval rakudo a9bead: OUTPUT«1␤»
19:21 colomon that's not autovivifying (on one level) -- you told it it was a hash with %
19:21 snearch joined #perl6
19:22 colomon probably not autovivifying (one second level) is a bug
19:22 colomon niecza: my %h ; %h<x><y> = 1;
19:22 tadzik known one, too
19:22 p6eval niecza v13-7-g68f80b8:  ( no output )
19:22 kshannon Anyone here understand how you catch exceptions at the PIR level?
19:22 colomon niecza: my %h ; %h<x><y> = 1; say %h.perl
19:22 p6eval niecza v13-7-g68f80b8: OUTPUT«{"x" => {"y" => 1}}.hash␤»
19:23 tadzik push_eh rings a bell, but not sure
19:23 tadzik kshannon: seen http://docs.parrot.org/parrot/latest/html/docs/book/pir/ch09_exceptions.pod.html ?
19:24 kshannon sweet,  thanks.
19:25 LlamaRider ok, so I need some extra work to make it do what I want. You're sure the bug is known? Then I don't need to report.
19:28 tadzik not sure if it's reported, but I think all the devs know about it :)
19:30 LlamaRider_ joined #perl6
19:31 masak no harm in reporting it, too. feel free.
19:36 drbean joined #perl6
19:37 cognominal [20:13]  <masak> yes. .perl isn't immune to pretzels, though.
19:38 cognominal stop beating about the Bush. :)
19:39 masak Mission Accomplished!
19:41 fglock joined #perl6
19:46 wolfman2000 joined #perl6
19:47 tokuhirom joined #perl6
19:53 sayu joined #perl6
19:58 sorear o/ fglock
19:58 sorear also, hello and welcome, LlamaRider_
19:58 fglock sorear: hi!
19:59 LlamaRider_ hi sorear, nice to be here
20:01 fglock profiling perlito... thinking about modularization - I'm thinking of adding 'require' to load less-used compiler parts maybe
20:04 fglock perlito executes 50M statements during bootstrap; memory doesn't seem too high, about 100Mb
20:06 LlamaRider_ rakudo: say 5 % 0 ;
20:06 p6eval rakudo a9bead: OUTPUT«5␤»
20:06 LlamaRider_ there's a "Division by zero" error missing here.
20:07 LlamaRider_ what is the best way of me throwing these crumbs to the devs? just look at the tracker and not spam here?
20:08 fglock food &
20:09 colomon rakudo
20:09 TimToady it is not considered spam, so you can spam us and the masakbot will submit the bug
20:09 colomon ; s
20:09 colomon rakudo: say 5 div 0
20:09 p6eval rakudo a9bead: OUTPUT«Divide by zero␤  in block <anon> at /tmp/HKfmDdAFko:1␤  in <anon> at /tmp/HKfmDdAFko:1␤»
20:09 TimToady alternately, you can submit it yourself
20:10 colomon Is 5 % 0 a division by zero error?
20:10 colomon rakudo: say 5 %% 0
20:10 LlamaRider_ it has to be. has no meaning in math
20:10 p6eval rakudo a9bead: OUTPUT«Bool::True␤»
20:10 TimToady perl6: say 5 % 0
20:10 LlamaRider_ if you can't divide by 0, you can't get a remainder by 0
20:10 p6eval niecza v13-7-g68f80b8: OUTPUT«Unhandled exception: System.DivideByZeroException: Division by zero␤  at Builtins.mod (Niecza.Variable a1, Niecza.Variable a2) [0x00000] in <filename unknown>:0 ␤  at Anon.1.Run.MAIN.C0mainline (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤  at Niecza.…
20:10 p6eval ..rakudo a9bead: OUTPUT«5␤»
20:10 p6eval ..pugs b927740: OUTPUT«*** Illegal modulus zero␤    at /tmp/FVGkTT7jjt line 1, column 5 - line 2, column 1␤»
20:11 LlamaRider_ Hm, I am starting to think I should switch away from Rakudo ^^
20:12 TimToady each implementation has its plusses and minuses
20:12 TimToady pugs is very...stable...
20:14 colomon I never really thought about this before: why is 5 div 0 a "Divide by zero exception" (or whatever) rather than NaN?
20:16 LlamaRider_ typically a convention. It's NaN in Matlab
20:17 TimToady well 5 div 0 should produce an integer, and I don't believe we've specced NaN for the Int type, though we have Inf specced
20:18 TimToady maybe we want NaN there too...
20:19 TimToady perl6: say (1/0).perl
20:19 p6eval rakudo a9bead: OUTPUT«1/0␤»
20:19 p6eval ..pugs b927740: OUTPUT«*** Illegal division by zero␤    at /tmp/uTK1bFgjTo line 1, column 6-9␤»
20:19 p6eval ..niecza v13-7-g68f80b8: OUTPUT«Inf␤»
20:19 LlamaRider_ omg
20:19 LlamaRider_ scary discrepancies
20:20 TimToady rakudo is just being lazy about converting a Rat :)
20:21 moritz nom: say 1/0 ~~ Inf
20:21 p6eval nom a9bead: OUTPUT«Bool::True␤»
20:21 moritz you see, it's some sort of Inf
20:21 moritz it's just a Rat-ish Inf :-)
20:22 LlamaRider_ if you took the lim of something tending to 1/0, sure.... but like this...
20:22 TimToady nom: say 1/0 + 1
20:22 p6eval nom a9bead: OUTPUT«Inf␤»
20:22 TimToady nom: say (-1) / 0
20:22 p6eval nom a9bead: OUTPUT«-Inf␤»
20:22 moritz LlamaRider_: what would you want instead?
20:23 LlamaRider_ in the rationals, error or NaN are at least mathematically correct
20:23 LlamaRider_ division by zero is simply not defined there
20:23 LlamaRider_ all the Infs come in Real number calculus
20:23 TimToady and the problem with defining it as the limit is that we don't know which direction the 0 came from
20:24 LlamaRider_ besides not having Real numbers, that's also a problem ;)
20:24 TimToady so the sign is relatively meaningless
20:24 moritz nom: say 1 ~~ Real
20:24 p6eval nom a9bead: OUTPUT«Bool::True␤»
20:24 moritz hey, we have real numbers :-)
20:24 TimToady er, some of 'em...
20:25 TimToady nom: say i ~~ Real
20:25 moritz sure; you can't represent all of 'em in finite memory
20:25 p6eval nom a9bead: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&i' called (line 1)␤»
20:25 LlamaRider_ yeah well, my example was with "div", so no reals there ;)
20:25 moritz nom: say 1i ~~ Real
20:25 p6eval nom a9bead: OUTPUT«Bool::False␤»
20:25 TimToady niecza: say i ~~ Real
20:25 p6eval niecza v13-7-g68f80b8: OUTPUT«Bool::False␤»
20:25 LlamaRider_ say i ** 4 ~~ Real
20:25 TimToady perl6: say e ~~ Real
20:26 p6eval rakudo a9bead, niecza v13-7-g68f80b8: OUTPUT«Bool::True␤»
20:26 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/S_6U5zpYHI line 1, column 5 - line 2, column 1␤»
20:26 LlamaRider_ niecza: say i ** 4 ~~ Real
20:26 p6eval niecza v13-7-g68f80b8: OUTPUT«Bool::False␤»
20:26 TimToady complexity is sticky, and Real doesn't know to look for 0i
20:26 colomon TimToady: I'm still leaning toward your old suggestion that NaN, Inf, and -Inf ought to be (a?) type(s?) of their own.
20:27 TimToady they're forms of near-bottom type
20:28 TimToady one could consider casting them out of Any, and propagating them the same as Failure
20:28 TimToady then those ops that want to handle them specially can just define multis that recognize them
20:29 TimToady in some sense, they are concepts rather than values, so belong outside of Any
20:29 colomon +1
20:30 LlamaRider_ I'm sure Cantor would consider that comment rude. :) But I don't think Perl needs to model math perfectly. So no comment from me :)
20:30 * TimToady has wondered whether the failure of a Match should also return such a concept, rather than a Match object
20:31 moritz LlamaRider_: problem is, the math world fits rather badly into computer-representable data types
20:31 PacoAir joined #perl6
20:32 moritz math thinks in terms of subsets
20:32 moritz but implementing math in terms of subsets inside the computer is *very* expensive
20:32 TimToady especially when you start with infinite sets :)
20:32 moritz aye
20:33 LlamaRider_ fair enough
20:33 TimToady anyway, having types outside of Any is our escape valve for concepts that need meta-help from time to time
20:34 TimToady junctions being the first of those concepts to apply for a job
20:34 colomon TimToady: on the other hand, NaN & Inf have historically propagated through math operations, having to specifically code that in every case seems a bit rough...
20:35 colomon maybe they should always be Nums?
20:35 TimToady might just be able to fudge it for Num types
20:35 masak just to give a data point: in Java, division by 0 is an error when performed on integers, and NaN on floaty types.
20:35 masak of course, Perl doesn't make as much of a distinction...
20:37 TimToady if Num is really RealNum|FakeNum then FakeNums could be outside of Any, with no one the wiser
20:37 LlamaRider_ Lots of CS algorithms have initial values at +/- Infinity. Take Dijkstra, etc.
20:37 TimToady sure
20:37 LlamaRider_ would be nice if you don't need to think of types in such applications
20:37 TimToady perl6: say [min]()
20:37 p6eval niecza v13-7-g68f80b8: OUTPUT«Unhandled exception: No value for parameter $a in infix:<min>␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<min> @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1566 (reduceop @ 8) ␤  at /tmp/L6C4dTJXTz line 1 (mainline @ 1) ␤  at /home/p6ev…
20:37 p6eval ..pugs b927740: OUTPUT«*** Cannot cast from VList [VUndef] to VCode (VCode)␤    at /tmp/JC8UoWAWzG line 1, column 5 - line 2, column 1␤»
20:37 p6eval ..rakudo a9bead: OUTPUT«Inf␤»
20:38 colomon [min] doesn't work at all in niecza. :(
20:38 LlamaRider_ go rakudo on this one :)
20:38 TimToady nom: say [max]()
20:38 p6eval nom a9bead: OUTPUT«-Inf␤»
20:38 TimToady perl6: say [&&]()
20:38 p6eval rakudo a9bead: OUTPUT«Bool::True␤»
20:38 p6eval ..pugs b927740: OUTPUT«1␤»
20:38 p6eval ..niecza v13-7-g68f80b8: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤This macro cannot be used as a function at /tmp/H63y_b8aaZ line 1 (EOF):â�¤------> [32msay [&&]()[33mâ��[31m<EOL>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) â�¤  at …
20:39 LlamaRider_ all I wanted to say is that Infs being Num is very convenient. Nice examples above.
20:40 TimToady sure, don't wanna break that
20:41 TimToady but perhaps it's one of the chief features of those concept types is that sometimes they pretend to be an Any, and sometimes they don't
20:41 TimToady it might be possible for Inf to pretend to be Num part-time
20:41 TimToady that's all I'm sayin'
20:41 TimToady lunch &
20:42 fglock joined #perl6
20:46 drbean joined #perl6
20:48 sorear niecza: say [min](3,2,4)
20:49 p6eval niecza v13-7-g68f80b8: OUTPUT«Unhandled exception: Excess arguments to infix:<min>, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<min> @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1566 (reduceop @ 8) ␤  at /tmp/HceaZl2noZ line 1 (mainline @ 1) …
20:49 sorear niecza: say [min] 3, 2, 4
20:49 p6eval niecza v13-7-g68f80b8: OUTPUT«Unhandled exception: Excess arguments to infix:<min>, used 2 of 3 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (infix:<min> @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1566 (reduceop @ 8) ␤  at /tmp/KXCtMdUden line 1 (mainline @ 1) …
20:49 sorear oh
20:49 sorear :|
20:49 sorear apparently min, like ~, is defined by STD to have assoc<list>
20:55 [Coke] https://gist.github.com/1476841 - slight gain by niecza past 2 days, up to 84% of rakudo.
20:57 PacoAir joined #perl6
21:02 drbean joined #perl6
21:04 colomon sorear: what does that mean in practice?
21:05 sorear colomon: it means infix:<min> needs to be defined with a ** arg list
21:05 sorear but ** arg lists aren't implemented yet
21:05 sorear look at the definition of infix:<~>
21:05 sorear I need proper LoL semantics stuff for this to work
21:06 * sorear wonders if sending pm an email asking for help would be useful
21:06 Mowah joined #perl6
21:07 moritz sorear: I'd try that if I were you
21:14 masak +1
21:15 * [Coke] shares a work horror story. I'm on a week-plus vacation (but everyone knows I'm at home this week.). Get a call about a minor issue with the dev continuous build, all set. an hour later, a call that involves svn and the phrase, "so then I deleted trunk and copied the branch to trunk"
21:17 masak o.O
21:19 zipf joined #perl6
21:20 dalek roast: 8b49f58 | coke++ | S05-match/make.t:
21:20 dalek roast: niecza fudge
21:20 dalek roast: review: https://github.com/perl6/roast/commit/8b49f588ca
21:21 [Coke] masak: yah, that's the face I made on the phone. ;)
21:22 [Coke] thankfully I can just clean it up when I return next week. ;)
21:22 tadzik I don't get it, maybe I should be grateful for my childhood that I didn't work much with svn :)
21:23 sorear tadzik: it's the equivalent of git checkout branch; git push -f origin master
21:23 tadzik eww
21:23 masak :D
21:24 masak there's humor in the fact that svn atrocities need to be explained in terms of git atrocities to today's young generation...
21:24 masak "it's as if you would dip your iPad in boiling butter"
21:25 LlamaRider_ I  thought that's how they made those tablets in the first place ^^
21:25 masak that's why the screen is so smooth.
21:26 tadzik :P
21:27 masak did today: wrote a 2500-line C program that didn't do what I wanted. :/
21:27 masak time to solve the problem in my sleep, I think.
21:27 masak 'night, #perl6
21:27 colomon \o
21:28 tadzik o/
21:29 sorear (and I'm probably younger than tadzik anyway :P)
21:30 tadzik I doubt it :) I'm from 7th of Dec, 1990
21:30 sorear oh, you're three weeks younger than me
21:30 espadrine joined #perl6
21:33 LlamaRider_ sweet, I finished my little piece of code :) thanks for all the help guys!
21:43 drbean joined #perl6
21:44 LlamaRider_ Interesting. In current Rakudo it is faster to do hash lookup for undefined values than to add "when" clauses in a for loop (I know the range where the values are undefined).
21:45 zipf joined #perl6
21:45 LlamaRider_ Not sure if that's important, but I found it curious
21:46 tadzik Rakudo has various performance problems
21:49 espadrine joined #perl6
21:57 mj41 joined #perl6
22:09 DarthGandalf joined #perl6
22:11 Trashlord joined #perl6
22:12 espadrine left #perl6
22:17 kaare_ joined #perl6
22:19 LlamaRider joined #perl6
22:19 drbean joined #perl6
22:19 colomon niecza:
22:20 colomon niecza: my $x = [0, 100, 280, 33, 400, 5665]; say @($x)[1]
22:20 p6eval niecza v13-7-g68f80b8: OUTPUT«100␤»
22:21 colomon niecza: say %() ~~ Hash
22:22 p6eval niecza v13-7-g68f80b8: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Any.hash @ 0) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/u6FAQgAplk line 0 (mainline @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2573 (A…
22:22 packetknife joined #perl6
22:25 LlamaRider_ joined #perl6
22:27 alvis joined #perl6
22:32 dalek roast: 9ec0398 | (Solomon Foster)++ | S03-operators/context-forcers.t:
22:32 dalek roast: Clean up a bit, and fudge for niecza.
22:32 dalek roast: review: https://github.com/perl6/roast/commit/9ec0398030
22:34 thou joined #perl6
22:35 dalek niecza: c17e94b | (Solomon Foster)++ | t/spectest.data:
22:35 dalek niecza: Turn on S03-operators/context-forcers.t.
22:35 dalek niecza: review: https://github.com/sorear/niecza/commit/c17e94b198
22:43 shinobicl_ joined #perl6
22:43 fsergot joined #perl6
22:45 dalek rakudo/nom: e6fee1b | util++ | docs/announce/2011.12:
22:45 dalek rakudo/nom: [docs] Fix typo
22:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e6fee1b664
22:51 shinobicl_ left #perl6
22:52 shinobicl_ joined #perl6
22:54 shinobicl_ left #perl6
22:56 zipf joined #perl6
23:49 bkolera joined #perl6
23:57 thou niecza: https://gist.github.com/1530283
23:57 thou nom: https://gist.github.com/1530283
23:57 p6eval niecza v13-8-gc17e94b: OUTPUT««take», «garbage»␤»
23:57 p6eval nom e6fee1: OUTPUT««take », «garbage»␤»
23:59 thou is sigspace handling in a rule meant to be deterministic? (notice the space after 'take ' in the nom result) i've noticed other sigspace weirdness as well
23:59 thou i think [ patA | patB ] should behave like [patA|patB] sigspace-wise?
23:59 thou but that doesn't seem to be the case

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

Perl 6 | Reference Documentation | Rakudo