Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-01-03

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:24 [Coke] left #perl6
00:29 masonkramer left #perl6
00:29 masonkramer_ joined #perl6
00:30 dukeleto left #perl6
00:30 dukeleto joined #perl6
00:33 lukas___ left #perl6
00:43 sorear niecza: class Foo { has $.x; sub bar { :$.x } }; my $y = Foo.new; $y.x = 5; say $y.bar.dump
00:43 p6eval niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Not an ARRAY reference at /home/p6eval/niecza/src/Niecza/Actions.pm line 1548.␤Check failed␤»
00:46 rgrau left #perl6
00:48 [Coke] joined #perl6
01:07 [Coke] left #perl6
01:13 MayDaniel left #perl6
01:24 [Coke] joined #perl6
01:30 yarp left #perl6
01:33 yarrack_logging joined #perl6
01:34 [Coke] left #perl6
01:46 dalek niecza: e147750 | sorear++ | v6n/RxOp.pm6:
01:46 dalek niecza: [v6] Translate RxOp
01:46 dalek niecza: review: https://github.com/sorear/niecza/commit/e147750695
01:47 icwiener left #perl6
02:13 lopaway is now known as lopnor
02:24 am0c left #perl6
02:26 lopnor is now known as lopaway
02:45 takadonet left #perl6
02:48 florz left #perl6
02:49 roen_ joined #perl6
02:50 bacek joined #perl6
02:57 shi left #perl6
02:59 florz joined #perl6
03:07 mtve left #perl6
03:08 mtve joined #perl6
03:08 bacek_ joined #perl6
03:11 bacek left #perl6
03:13 alester joined #perl6
03:17 gbacon left #perl6
03:17 yarp joined #perl6
03:22 lopaway is now known as lopnor
03:30 starcoder left #perl6
03:33 starcoder joined #perl6
03:38 _twitch joined #perl6
03:40 sorear STD's requirement to predeclare classes is getting very irritating
03:41 sorear esp. since the declarations have to be in the same file...
03:47 jasonmay can you dynamically predeclare a class?
03:47 jasonmay like if you have $class
03:51 sorear if you have $class you can just use it
03:52 sorear I can't see how to use Foo::Bar without there being a predeclaration already
03:53 sorear $Foo::Bar can be postdeclared, but Foo::Bar can't ...?
03:53 sorear until TimToady comes back with a better idea, I'll be using our $Foo = class Foo { ... }
03:53 sorear then I can access it as $GLOBAL::Foo anywhere
03:54 sorear (yes, I know I could say eval("Foo::Bar")
03:54 sorear )
03:54 sorear also ::("Foo::Bar")
03:55 sorear oh hmm, ::Foo::Bar works.
03:56 starcoder left #perl6
03:59 starcoder joined #perl6
04:04 shortcircuit If I understand the premise behind Rakudo's architecture, as little as possible is written in PIR, then as little as possible is written in NQP, and the rest is written in Perl 6.
04:05 shortcircuit I'll admit I've been pondering dastardly things like seeing how difficult it would be to write the parts written in PIR in C++ and in JavaScript.
04:06 kanishka joined #perl6
04:14 sorear shortcircuit: join my evil :>
04:33 lopnor is now known as lopaway
04:48 roen joined #perl6
04:51 roen_ left #perl6
04:52 lopaway is now known as lopnor
04:56 roen_ joined #perl6
04:59 roen left #perl6
05:00 skangas left #perl6
05:01 yarp left #perl6
05:15 bacek__ joined #perl6
05:18 bacek_ left #perl6
05:21 yarrack_logging left #perl6
05:25 alester left #perl6
05:33 yarp joined #perl6
05:37 bacek_ joined #perl6
05:41 bacek__ left #perl6
05:49 yarrack_logging joined #perl6
05:49 bacek__ joined #perl6
05:53 bacek_ left #perl6
05:55 am0c joined #perl6
06:01 roen_ is now known as roen
06:01 bacek__ left #perl6
06:07 dalek niecza: 8004fc4 | sorear++ | lib/CLRBackend.cs:
06:07 dalek niecza: Fix require
06:07 dalek niecza: review: https://github.com/sorear/niecza/commit/8004fc4f4b
06:07 dalek niecza: 37ba8bc | sorear++ | v6/STD.pm6:
06:07 dalek niecza: [v6] New heredoc model for immutable-cursor compatibility
06:07 dalek niecza: review: https://github.com/sorear/niecza/commit/37ba8bcdc1
06:07 dalek niecza: e571278 | sorear++ | / (3 files):
06:07 dalek niecza: [v6] Misc fixes to get STD building again
06:07 dalek niecza: review: https://github.com/sorear/niecza/commit/e5712784b5
06:12 am0c_ joined #perl6
06:13 cognominal left #perl6
06:16 am0c left #perl6
06:17 am0c_ is now known as am0c
06:21 stepnem left #perl6
06:25 dalek niecza: dc7e939 | sorear++ | v6n/Op.pm6:
06:25 dalek niecza: [v6] First 1/3 of Op translated
06:25 dalek niecza: review: https://github.com/sorear/niecza/commit/dc7e939f66
06:27 kaare joined #perl6
06:28 kaare is now known as Guest6982
06:28 lukas_ joined #perl6
06:29 Guest6982 is now known as kaare_
06:40 yarp left #perl6
06:41 am0c left #perl6
06:41 cognominal joined #perl6
06:43 am0c joined #perl6
06:54 zby_home_ joined #perl6
07:02 risou joined #perl6
07:02 risou left #perl6
07:02 wtw joined #perl6
07:02 bacek joined #perl6
07:03 risou joined #perl6
07:09 am0c left #perl6
07:17 moritz_ niecza: say 1..3
07:17 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤Unhandled Exception: System.Exception: Unable to find lexical &infix:<..> in mainline␤  at Niecza.CLRBackend.NamProcessor.ResolveLex (System.String name, System.Int32& uplevel, Boolean core) [0x00000] in <filename unknown>:0 ␤  at
07:17 p6eval ..Niecza.CLRBackend.NamProcessor.RawAccessLex (Syste…
07:20 dalek niecza: 9dc85db | sorear++ | v6 (25 files):
07:20 dalek niecza: [v6] Merge v6 and v6n
07:20 dalek niecza: review: https://github.com/sorear/niecza/commit/9dc85dbb3c
07:20 dalek niecza: 3b08fb0 | sorear++ | v6/ (2 files):
07:20 dalek niecza: [v6] Second 1/3 of Op translated
07:20 dalek niecza: review: https://github.com/sorear/niecza/commit/3b08fb0fc1
07:20 Gahrian joined #perl6
07:22 moritz_ fwiw, niecza passes man-or-boy test
07:24 moritz_ niecza: sub f(&x) { &x() }; f -> { say 3 }
07:24 p6eval niecza v1-35-gc9d17a7: OUTPUT«3␤»
07:25 moritz_ niecza: sub f(&x) { g(&x) }; sub g(&x) { x() };  f -> { say 3 }
07:25 p6eval niecza v1-35-gc9d17a7: OUTPUT«3␤»
07:27 moritz_ the man-or-boy.t warns about &x1..&x3 not being used, although it is in fact being used (passed on to other subs)
07:27 sorear yes
07:28 sorear i noticed that earlier with STD's &termstate and &infixstate
07:28 sorear I think it's a STD bug but haven't gotten to investigate
07:35 sorear I wonder how much stuff will break if I have a class with a method named "list" that isn't related to Any.list
07:35 sorear several classes from niecza have such methods
07:38 lopnor is now known as lopaway
07:38 Tene is now known as TeneIsTi`ocpi
07:39 TeneIsTi`ocpi is now known as Tene
07:41 dalek niecza: 4e74fd6 | sorear++ | v6/Op.pm6:
07:41 dalek niecza: [v6] More Op translation
07:41 dalek niecza: review: https://github.com/sorear/niecza/commit/4e74fd6718
07:41 yarrack_logging left #perl6
07:43 yves_ joined #perl6
07:49 * diakopter dares to wonder how fast niecza does man-or-boy up to the 25th iteration
07:49 diakopter well, at least how it compares to rakudo/parrot
07:50 tadzik is niecza becoming self-hosting?
07:50 * diakopter also curious how fast nqp-clr does it
07:52 diakopter tadzik: seems it groweth towards that
07:53 jhuni joined #perl6
07:54 jhuni left #perl6
07:59 lukas_ left #perl6
08:04 tadzik that's super-awesome
08:07 TimToady diakopter: I would not use a sub declaration to declare a type
08:07 phenny TimToady: 02 Jan 21:55Z <diakopter> ask TimToady in the following primitive-typed edition of man-or-boy http://perl6.pastebin.com/raw.php?i=AXhUA23d I postulated a shorthand to write type annotations for "generic" Callables (that are strongly-typed)... could you please [in-]validate that such a construct could work?
08:07 phenny TimToady: 02 Jan 21:57Z <diakopter> ask TimToady but ignore the '&' "sigil" before 'B' - I'm removing that curiosity from this perlesque dialect
08:07 TimToady std: &:(Int $foo --> Str)
08:07 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/kcw6W79HTX line 1:␤------> [32m<BOL>[33m⏏[31m&:(Int $foo --> Str)[0m␤Preceding context expects a term, but found infix & instead at /tmp/kcw6W79HTX line 1:␤------> [32m<BOL>[33m⏏[31m&:(Int
08:08 p6eval ..$foo …
08:08 molaf joined #perl6
08:08 TimToady std: sub foo ( &:(Int $foo --> Str) ) {}
08:08 p6eval std 625303c: OUTPUT«ok 00:01 120m␤»
08:08 TimToady there's a generic & type with a sig
08:09 TimToady std: subset MyRout of &:(Int $foo --> Str);
08:09 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/0rXm9EeTqI line 1:␤------> [32msubset MyRout of [33m⏏[31m&:(Int $foo --> Str);[0m␤    expecting typename␤Parse failed␤FAILED 00:01 119m␤»
08:09 TimToady hmm
08:10 diakopter I just would really like *some* shorthand way of aliasing long type signatures
08:10 TimToady well, inside-out sub declarations is the way of C, and hence evil
08:10 diakopter what's an inside-out sub declaration
08:11 TimToady subset MyRout of Callable[:sig(:(Int $foo --> Str))];
08:11 TimToady std: subset MyRout of Callable[:sig(:(Int $foo --> Str))];
08:11 p6eval std 625303c: OUTPUT«ok 00:01 121m␤»
08:12 diakopter std: subset MyRout of Callable[:sig(:(Int --> Str))];
08:12 p6eval std 625303c: OUTPUT«ok 00:01 121m␤»
08:12 diakopter ok. last I knew, the :sig() wasn't necessary (I hadn't heard of needing that at all)
08:12 TimToady an inside-out declaration is where you put the name of the thing you're declaring in place of the name that would ordinarily be used as an rvalue
08:12 diakopter I mean, the portion inside the :sig() was necessary
08:13 TimToady well, if the sig is the first argument and is positional, then you can pass it positionally
08:14 * diakopter confused
08:14 diakopter I don't need to pass around sigs
08:14 diakopter I need a decent way to alias them for compile time
08:14 TimToady Callable[:(Int $foo -> Str)] is okay if $sig is the first arg to Callable
08:14 TimToady subset is compile time
08:15 diakopter I don't know how a sig could be an arg to a Callable
08:15 TimToady constant MyRout = &:(...); would probably also work
08:16 diakopter std: constant RoutMe = &:(-->int)
08:16 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/3ewtYDvYAl line 1:␤------> [32mconstant RoutMe = [33m⏏[31m&:(-->int)[0m␤Bogus term at /tmp/3ewtYDvYAl line 1:␤------> [32mconstant RoutMe = &[33m⏏[31m:(-->int)[0m␤    expecting any of:␤
08:16 p6eval ..infix n…
08:16 bacek_ joined #perl6
08:17 TimToady or could be made to work, I mean...
08:18 diakopter do the primitive types have type objects?
08:18 TimToady or we could maybe use &[...], @[...], %[...] as shorthand for the roles in question
08:18 pmurias joined #perl6
08:18 TimToady std: @[...]
08:18 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/jJffuREZdP line 1:␤------> [32m<BOL>[33m⏏[31m@[...][0m␤Bogus statement at /tmp/jJffuREZdP line 1:␤------> [32m@[33m⏏[31m[...][0m␤    expecting twigil␤Parse failed␤FAILED 00:01 120m␤»
08:18 TimToady especially since it's currently illegal
08:19 diakopter hee
08:20 bacek left #perl6
08:20 diakopter "liberalizing the Perl 6 grammar for deca.."
08:20 diakopter ..des [to come]
08:21 TimToady std: :::(Int @)
08:21 p6eval std 625303c: OUTPUT«ok 00:01 122m␤»
08:21 TimToady or there's that
08:21 diakopter everyone wants the triple colon
08:22 diakopter niecza: say :::(Int @)
08:22 p6eval niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Attribute (name) does not pass the type constraint because: Validation failed for 'Str' with value undef at /home/p6eval/niecza/src/Niecza/Actions.pm line 1607␤   Niecza::Actions::term__S_name('Niecza::Actions',
08:22 p6eval ..'Niecza::Grammar::P6=HASH(0x69466e0)') ca…
08:22 diakopter niecza: say :::(Int)
08:22 Demonen left #perl6
08:22 p6eval niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Attribute (name) does not pass the type constraint because: Validation failed for 'Str' with value undef at /home/p6eval/niecza/src/Niecza/Actions.pm line 1607␤   Niecza::Actions::term__S_name('Niecza::Actions',
08:22 p6eval ..'Niecza::Grammar::P6=HASH(0x65b9608)') ca…
08:23 TimToady :: is anonymous
08:23 TimToady niecza: say ::.WHAT
08:23 p6eval niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Attribute (name) does not pass the type constraint because: Validation failed for 'Str' with value undef at /home/p6eval/niecza/src/Niecza/Actions.pm line 1607␤   Niecza::Actions::term__S_name('Niecza::Actions',
08:23 p6eval ..'Niecza::Grammar::P6=HASH(0x7548170)') ca…
08:24 TimToady perl6: say ::
08:24 p6eval rakudo fc2db1: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't pop from an empty array!␤»
08:24 p6eval ..pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting "(", twigil or word character␤    at /tmp/G8sEaSFRzY line 1, column 7␤»
08:24 p6eval ..niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Attribute (name) does not pass the type constraint because: Validation failed for 'Str' with value undef at /home/p6eval/niecza/src/Niecza/Actions.pm line 1607␤   Niecza::Actions::term__S_name('Niecza::Actions',
08:24 p6eval ..'Niecza::Grammar::P6=HASH(0x58b9980)') ca…
08:24 diakopter eek
08:24 TimToady massive damage :)
08:25 TimToady std: say ::
08:25 p6eval std 625303c: OUTPUT«ok 00:01 118m␤»
08:25 * diakopter hits a stick against the empty array, and pop flows forth
08:26 TimToady you were supposed to say to it
08:26 diakopter yeah
08:27 diakopter like yoda hitting r2d2 with a stick instead of speaking to him
08:27 diakopter oh, I guess he did speak to him first.
08:28 diakopter rakudo: say ::rock
08:28 p6eval rakudo fc2db1:  ( no output )
08:28 TimToady rakudo: say ::rock.WHAT
08:28 diakopter rakudo: say ::rock ~ "\n"
08:28 p6eval rakudo fc2db1: OUTPUT«Failure()␤»
08:28 p6eval rakudo fc2db1: OUTPUT«Can not find sub ::rock␤  in 'infix:<~>' at line 1␤  in main program body at line 22:/tmp/MJ64TnCvXc␤»
08:29 TimToady rakudo: say ::rock.WHAT; class rock { }
08:29 p6eval rakudo fc2db1: OUTPUT«rock()␤»
08:30 bacek_ left #perl6
08:31 pmurias sorear: what stops the output from the aot phase from getting to the screen?
08:31 diakopter TimToady: I hit the empty array because 40 years earlier, hitting worked.
08:31 pmurias sorear: ah i noticed it's stopped before it gets there
08:36 cjk101010 joined #perl6
08:44 justatheory left #perl6
08:47 felipe joined #perl6
08:52 diakopter TimToady: which syntax should be co-opted, then?
08:55 TimToady well, Callable should work today
08:55 TimToady so &[] is the most like that
08:56 TimToady but &:() is going to be shorter if you always have to write &[:()]
08:58 stepnem joined #perl6
08:58 TimToady I can argue it both ways, which probably means there's something we're not seeing yet
08:58 TimToady or it could just be that it's 1am
09:01 TimToady so I'd just go with Callable[:()] for now
09:02 TimToady zzz &
09:05 diakopter but, that doesn't help me shorten/alias anything
09:05 diakopter iiuc what you're saying
09:07 HarryS is now known as K-Lined
09:08 K-Lined is now known as HarryS
09:08 redicaps joined #perl6
09:18 yarp joined #perl6
09:19 sukria left #perl6
09:30 roen left #perl6
09:42 mberends left #perl6
09:52 noganex_ is now known as noganex
10:06 snearch joined #perl6
10:07 bacek joined #perl6
10:21 kanishka left #perl6
10:23 bacek_ joined #perl6
10:27 bacek left #perl6
10:30 satyavvd joined #perl6
10:41 masak joined #perl6
10:42 masak oh hai from a train! \o/
10:42 phenny masak: 02 Jan 19:03Z <sorear> tell masak What do you mean that substr cannot use non-p6 primitives?  How else is it supposed to inspect an opaque Str?
10:43 masak sorear: I'm saying it's obviously thorny/problematic, and that S32 doesn't begin to acknowledge that.
10:49 gbacon joined #perl6
10:49 pmurias masak: why is implementing substr using p6 primitives a problem?
10:50 moritz_ pmurias: which primitive would you use to access characters of a string?
10:50 moritz_ besides substr, that is
10:51 masak pmurias: maybe it isn't. maybe it's just a question of making a Proxy object with a nice STORE method.
10:51 masak pmurias: I'm saying it's way underspecified.
10:51 kanishka joined #perl6
10:51 pmurias masak: are string mutable?
10:51 masak first approximation: no.
10:52 moritz_ Perl 6 level strings are immutable
10:52 pmurias so .substr can't return an lvalue
10:52 pmurias substr() can
10:52 pmurias s/can/could
10:52 * moritz_ doesn't see the distinction
10:53 moritz_ I guess a method can get a reference to the container of the invocant with the same signature tweaks as a sub
10:53 * masak neither
10:54 pmurias moritz_: a sub can take a container
10:54 moritz_ pmurias: I know. Do you say a method can't?
10:54 pmurias it seems wrong for methods to take the container
10:55 * moritz_ doesn't see the wrongness
10:56 cjk101010 left #perl6
10:57 pmurias the method is called on the object, but it then discovers how the call was done and does something to the container
10:58 pmurias it feels wrong like in "$foo.bar.baz" the baz method accesing $foo
10:58 moritz_ well, it doesn't
10:59 moritz_ unless .bar returns the invocant container
10:59 moritz_ which usually isn't the case
10:59 moritz_ just like in foo(bar($baz)), &foo could get a handle to the $baz container, but usually doesn't
11:00 pmurias re method getting the container i doesn't seem right that a method called on the same object using different containers should do something different
11:01 moritz_ in both cases the dispatcher determines which routine to call, and then activates the binder
11:01 daxim joined #perl6
11:01 moritz_ pmurias: and is that different for subs?
11:02 pmurias the sub would take the container with a string as the argument
11:02 pmurias a method on a string taking a container with a string seems wrong
11:02 pmurias s/taking/taking as the invocant/
11:02 moritz_ ah, I'm starting to see your point
11:04 moritz_ you could argue that the backslash in   method substr(\$self:, ...) { }  really places the method into Container[Str] or so
11:07 masak I'd really like user-definable FETCH and STORE methods. it would open up a lot of possibilities.
11:08 pmurias masak: what do you mean by user-definable FETCH and STORE?
11:09 pmurias masak: you have Proxy
11:11 pmurias masak: or do you want to have that implemented in rakudo?
11:12 moritz_ assuming I want to have a variable that behaves just as a normal scalar, but that says LOL whenever I assign a new value - how would that look like?
11:13 moritz_ I'd hope it's something like   class MyScalar is Scalar { method STORE($what) { say "LOL"; nextsame } }; my $x is MyScalar; $x = 3
11:14 pmurias moritz_: that seems sensible
11:15 pmurias my $x := Myscalar.new() should work too
11:15 tzhs joined #perl6
11:15 masak pmurias: I want to have that implemented in Rakudo. or Niecza :)
11:16 moritz_ or both!
11:16 bacek_ left #perl6
11:17 masak moritz_: S06/Lvalue subroutines has an example with actual syntax.
11:18 pmurias masak,mortiz_: it's avalible in Perl 5 (tie)
11:18 masak sure, sure.
11:18 moritz_ pmurias: tie is cheating. tie()ing doesn't survive returning through subroutines, for example
11:19 moritz_ ie you can't write a function that returns a tied variable
11:19 pmurias are you sure
11:19 pmurias ?
11:19 moritz_ at least I couldn't find a way
11:19 moritz_ subs always return lists
11:20 pmurias you tried sub foo : lvalue {}
11:20 moritz_ nope
11:20 pmurias i implemented Proxy in p5 once
11:21 moritz_ ah, I remember why I didn't
11:21 moritz_ I wanted to return an array
11:21 moritz_ and lvalue subs are always in scalar context
11:23 kraai_ left #perl6
11:24 pmurias moritz_: tie'd variable survive being returned from an : lvalue sub
11:25 moritz_ pmurias: interesting
11:26 moritz_ I think it was really the attempt to pass around tied array containers that didn't work
11:26 kraai_ joined #perl6
11:28 risou left #perl6
11:29 pmurias moritz_: did you pass an reference to tied arrays?
11:29 pmurias return @foo gets @foo flattened
11:42 cjk101010 joined #perl6
11:54 satyavvd left #perl6
11:55 barney joined #perl6
12:10 barney left #perl6
12:19 noganex_ joined #perl6
12:23 noganex left #perl6
12:23 bluescreen joined #perl6
12:23 bluescreen is now known as Guest57809
12:25 Chillance left #perl6
12:27 masak what is a Proxy object, really? feels like an object pretending to be a container.
12:28 risou joined #perl6
12:29 arnsholt http://axisofeval.blogspot.com/2011/01/w​hy-lisp-is-big-hack-and-haskell-is.html <- Anyone read this yet?
12:29 arnsholt Especially the "adjustably-safe" part sounded kinda familiar
12:29 masonkramer_ left #perl6
12:29 masonkramer joined #perl6
12:31 masak /win 3
12:32 masak hmm.
12:34 moritz_ arnsholt: that's what we call "gradual typing"
12:34 mj41_ joined #perl6
12:34 arnsholt moritz_: Exactly! =)
12:37 Guest57809 left #perl6
12:37 cjk101010 left #perl6
12:37 shachaf left #perl6
12:37 c1sung left #perl6
12:37 fhelmberger left #perl6
12:37 lamstyle left #perl6
12:37 shortcircuit left #perl6
12:37 pmichaud left #perl6
12:37 hatseflats left #perl6
12:37 mj41 left #perl6
12:37 arnsholt left #perl6
12:37 zb left #perl6
12:37 sECuRE left #perl6
12:37 cotto_work left #perl6
12:37 Bucciarati left #perl6
12:37 mj41_ is now known as mj41
12:38 masak seems he's talking about more than just gradual typing, though -- he mentions 'invariants', which makes me think of some kind of non-type annotations.
12:40 lopaway is now known as lopnor
12:41 masak then again, maybe not.
12:41 cogno joined #perl6
12:41 masak lopnor++ # blog software
12:41 moritz_ masak: our subset types are turing complete
12:42 lopnor masak: thank you!
12:45 Bucciarati joined #perl6
12:47 masak moritz_: right, but when I think of "invariants", I think about properties on blocks, not variables.
12:51 moritz_ I'm sure you can find some clever way to map the two, if you're a twisted FP programmer :-)
12:53 Guest57809 joined #perl6
12:53 cjk101010 joined #perl6
12:53 shachaf joined #perl6
12:53 c1sung joined #perl6
12:53 fhelmberger joined #perl6
12:53 lamstyle joined #perl6
12:53 shortcircuit joined #perl6
12:53 pmichaud joined #perl6
12:53 hatseflats joined #perl6
12:53 arnsholt joined #perl6
12:53 zb joined #perl6
12:53 sECuRE joined #perl6
12:53 cotto_work joined #perl6
12:54 mtk joined #perl6
12:57 arnsholt masak: The C backend idea from the Yapsi vision statement sounds interesting, BTW
12:57 muixirt joined #perl6
12:59 noganex_ is now known as noganex
13:02 lopnor is now known as lopaway
13:02 pmurias ashleydev: where is the Yapsi vision statement?
13:03 masak arnsholt: yes, I think so. could bring a bit of speed into the picture. the big disadvantage as I see it is that it'll be more to maintain and keep in sync.
13:03 dalek niecza: 124d795 | pmurias++ | / (8 files):
13:03 dalek niecza: refactored niecza passes test.pl
13:03 dalek niecza: review: https://github.com/sorear/niecza/commit/124d7953fb
13:03 arnsholt pmurias: http://github.com/masak/yap​si/blob/master/doc/ROADMAP
13:04 arnsholt Yeah, the parallel thing is potentially an issue
13:04 moritz_ that's the problem with all multiple backends in a compilers
13:05 moritz_ and the reason why currently no compiler except lorito has more than one non-bitrotten backend
13:05 moritz_ and lorito only manages it by pretty much freezing the feature set
13:05 pmurias where does lorito live?
13:06 moritz_ s/lorito/perlito/
13:06 moritz_ sorry, too much #parrot
13:06 masak moritz_: I'd still expect the C runtime to use the SIC backend, though.
13:08 gbacon left #perl6
13:08 arnsholt Yeah. The C backend would essentially use a binary packed SIC
13:09 arnsholt So with a bit of luck it should be possible to generate a fair chunk of C headers
13:14 muixirt moritz_: (from #parrot) but even version 2010.10 something like 'perl6 build/rakudo/t/spec/S03-sequence/basic.t' spits out: Could not find sub &done
13:16 moritz_ muixirt: that's because done_testing was renamed to done
13:17 moritz_ muixirt: but I suspect that the problem with 'main' is a parrot (or nqp-rx) level problem
13:18 muixirt rakudo: eval((1 ... 5).perl).join(",")
13:18 p6eval rakudo fc2db1:  ( no output )
13:18 moritz_ rakudo: say eval((1 ... 5).perl).join(",")
13:18 p6eval rakudo fc2db1: OUTPUT«1,2,3,4,5␤»
13:19 muixirt moritz_: a test that fails currently
13:19 muixirt (from a test)
13:19 cogno left #perl6
13:20 muixirt ===SORRY!===
13:20 muixirt Unable to open filehandle from path 'eval((1 ... 5).perl).join(",")'
13:20 moritz_ wtf?
13:20 moritz_ which test is that from?
13:20 moritz_ perl6 '...' without -e ?
13:21 muixirt build/rakudo/t/spec/S03-sequence/basic.t
13:21 muixirt I'm a idiot
13:22 muixirt of course moritz_ is right
13:22 masak arnsholt: I've read about some ways to make instruction fetching fast, and I'd like to try them out.
13:22 moritz_ ok 88 - Can take .perl of sequence
13:22 moritz_ No main sub found in 'Any::join' at line 1 in 'Any::join' at line 1462:CORE.setting in main program body at line 151:t/spec/S03-sequence/basic.t
13:22 muixirt it produces the 'No main sub found' error msg
13:23 arnsholt masak: Cool
13:23 arnsholt Anyways, I need to read up a bit on SIC first, I think
13:23 moritz_ it seems that parrot had a serious API change or break
13:24 moritz_ ah, DEPRECATED.pod talks about this
13:29 masak arnsholt: right now with SIC, the source code is the specification.
13:32 cogno joined #perl6
13:32 pmurias left #perl6
13:35 arnsholt masak: Yeah, I noticed. Which is partly why I haven't grokked much of it yet =)
13:35 masak :)
13:35 masak let me know if I can help.
13:36 masak some people have been expressing surprise by the use of the syntax 'reg[$n]' (no sigil)
13:36 arnsholt I'll keep that in mind
13:37 masak it's a call to &reg, but maybe folks are used to having it be 'reg()[$n]'
13:38 nightwatcher joined #perl6
13:38 risou left #perl6
13:47 sol1tude joined #perl6
13:48 masak sol1tude: hi! I read today that you're the number one habit of creative people. :)
13:49 sol1tude hello masak :)
13:51 cogno left #perl6
14:05 am0c joined #perl6
14:10 felliott left #perl6
14:11 tzhs left #perl6
14:12 molaf left #perl6
14:13 kjeldahl left #perl6
14:15 wamba joined #perl6
14:16 moritz_ http://journal.stuffwithstuff.com/2010/1​2/31/rethinking-user-defined-operators/
14:17 nightwatcher hello, can regexes that work under perl5.8.8 work under perl6 since perl6 provides a superset of Perl 5 features with respect to regexes (As I was told..)
14:17 cogno joined #perl6
14:17 moritz_ nightwatcher: mostly, yes
14:17 nightwatcher mostly?
14:18 moritz_ mostly
14:18 moritz_ I don't think it'll be bug-for-bug compatible wrt embedded closures
14:19 risou joined #perl6
14:19 moritz_ also perl 5 uses some weird heuristics to distinguish array subscripts and char classes
14:20 moritz_ rakudo had the rx:P5 modifier implemented at some point, but regressed on it while switching to another grammar engine
14:21 masak nightwatcher: also, we're not talking a syntactic superset here...
14:21 moritz_ unless you say { use v5; # perl 5 code here }
14:21 moritz_ but I think that's going to be kinda hard to implement
14:22 moritz_ and only of limited usefulness
14:22 nightwatcher mortiz_: regarding grammer.. one more question, what exactly can I do with perl6 rules? can I redefine how a regex is parsed? I am kinda new to v6..
14:23 moritz_ nightwatcher: first of all you can give regexes names, group them in classes/grammar, and properly reuse them
14:23 moritz_ then you can use them parse almost anything. Like a programming language
14:23 masak moritz_: nice article. parts of it are similar to Perl 6. I think the choice of identifiers in Perl 6 is a long-term big win, though.
14:24 moritz_ masak: I think the existence of proper precedence levels is also a big win :-)
14:25 sftp left #perl6
14:25 nightwatcher mortiz_: will we have varialbe length lookbehind in production ready v6?
14:26 masak moritz_: oh, definitely.
14:26 moritz_ nightwatcher: yes
14:26 masak afk &
14:26 masak left #perl6
14:26 wagnerf joined #perl6
14:27 nightwatcher mortiz_: is it available now? can I test it here?
14:27 moritz_ nightwatcher: I don't know
14:27 kraai_ left #perl6
14:27 moritz_ I know that rakudo and nqp-rx don't implement it
14:27 moritz_ maybe the old rakudo, and maybe niecza
14:28 moritz_ niecza: say 'abc' ~~ /<?before a .*> c/
14:28 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤»
14:28 moritz_ niecza: say 'abc' ~~ /c/
14:28 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤»
14:28 moritz_ hm :(
14:29 nightwatcher :S
14:29 moritz_ alpha: say 'abc' ~~ /<?before a .*> c/
14:29 p6eval alpha : OUTPUT«␤»
14:29 moritz_ alpha: say 'abc' ~~ / c/
14:29 p6eval alpha : OUTPUT«c␤»
14:29 moritz_ alpha: say 'abc' ~~ /<?before b> c/
14:29 p6eval alpha : OUTPUT«␤»
14:29 * moritz_ stupid
14:29 moritz_ alpha: say 'abc' ~~ /<?after b> c/
14:29 yarp left #perl6
14:29 p6eval alpha : OUTPUT«c␤»
14:29 moritz_ alpha: say 'abc' ~~ /<?after a.* > c/
14:29 p6eval alpha : OUTPUT«c␤»
14:29 nightwatcher :D
14:29 moritz_ alpha: say 'Abc' ~~ /<?after a.* > c/
14:30 p6eval alpha : OUTPUT«␤»
14:30 moritz_ nightwatcher: you see, worked in an old version of rakudo
14:31 nightwatcher mmm.. will it be added in coming rakudo new versions?
14:31 moritz_ niecza: say ('abc' ~~ /c/).WHAT
14:31 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤»
14:31 moritz_ niecza: say ('abc' ~~ /c/).typename
14:31 p6eval niecza v1-35-gc9d17a7: OUTPUT«Match␤»
14:31 moritz_ niecza: say ('abc' ~~ /c/).Bool
14:32 p6eval niecza v1-35-gc9d17a7: OUTPUT«Bool::True␤»
14:32 MayDaniel_ joined #perl6
14:32 moritz_ niecza: say ('abc' ~~ /<?after a.*> c/).Bool
14:32 colomon moritz_: fascinating how that blogger goes through contortions to end up with something less powerful than Perl 6.  :)
14:32 p6eval niecza v1-35-gc9d17a7: OUTPUT«[31m===[0mSORRY![31m===[0m␤Can't locate object method "tocclist" via package "RxOp::Quantifier" at /home/p6eval/niecza/src/RxOp.pm line 301.␤Can't call method "isa" on an undefined value at /home/p6eval/niecza/src/Niecza/Actions.pm line 786.␤Can't call method
14:32 p6eval .."oplift" on an und…
14:32 * moritz_ submits two niecza bugs
14:33 nightwatcher mortiz_: this feature will save me a lot of coding (so I can watch more TV! B-))
14:33 moritz_ nightwatcher: that's great. BTW if you press the tab key after typing the first three characters of my nick, your chances of misspelling it are lower :-)
14:35 nightwatcher moritz_: hihihi... oh sorry.. nothing personal! :)
14:35 moritz_ :-) no offense taken
14:35 moritz_ I just see that many people don't know about nick tab completion, and often I find out by them misspelling nicks often :-)
14:36 dalek 6model: b40fd73 | jonathan++ | common/NQP/NQPSetting.pm:
14:36 dalek 6model: [common] Setting should be in UTF8, not latin-1.
14:36 dalek 6model: review: https://github.com/jnthn/6model/commit/b40fd738c5
14:36 dalek 6model: 3cdb62c | jonathan++ | dotnet/compiler/compile.pir:
14:36 dalek 6model: [dotnet] Be explicit about reading in UTF-8.
14:36 dalek 6model: review: https://github.com/jnthn/6model/commit/3cdb62c05d
14:36 dalek 6model: aa353ae | jonathan++ | dotnet/runtime/ (2 files):
14:36 dalek 6model: [dotnet] Add some very basic method cache support to the runtime; a slot for it in the s-table and an op to install it.
14:36 dalek 6model: review: https://github.com/jnthn/6model/commit/aa353ae1a1
14:36 dalek 6model: 51b9891 | jonathan++ | common/NQP/NQPSetting.pm:
14:36 dalek 6model: [common] Get NQPClassHOW to publish a method cache. Also fix a thinko - should build caches last, after attribute composition.
14:36 dalek 6model: review: https://github.com/jnthn/6model/commit/51b98913d0
14:37 nightwatcher moritz_: on perl5.8.8 my perl report generator takes 3.5 seconds.. I will run it on perl6 tonight and see the difference..
14:37 tadzik :)
14:37 tadzik Trust me, you will be suprised
14:37 nightwatcher tadzik: much faster? ;)
14:37 moritz_ probably takes 5min  or so, +- a factor of 10
14:37 tadzik oh, I have no heart to tell you the truth :)
14:38 nightwatcher moritz_: oh god that might hang my production servers :D
14:38 nightwatcher moritz_: will be much fun!
14:38 tadzik but well, on niecza maybe
14:38 MayDaniel_ left #perl6
14:38 tadzik if it turnes out to be underperformant for your needs, try it on niecza
14:39 nightwatcher I will remove the rakudo packages I guess.. I will install niecza instead.. I thought rakudo is the most ready for production realease...
14:39 moritz_ rakudo is the most feature complete
14:39 kaare_ left #perl6
14:39 moritz_ but not the fastest
14:40 moritz_ niecza: say ('abc' ~~ /c/).Str
14:40 p6eval niecza v1-35-gc9d17a7: OUTPUT«c␤»
14:40 moritz_ niecza: say ('abc' ~~ /c/).from
14:40 p6eval niecza v1-35-gc9d17a7: OUTPUT«2␤»
14:40 moritz_ niecza: say ('abc' ~~ /c/)
14:40 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤»
14:40 nightwatcher mmm.. (time to make a choice.. speed or features...) speed!  :D
14:41 Tedd1 joined #perl6
14:41 tadzik maybe you don't need the speed, and maybe you don't need the features
14:42 nightwatcher tadzik: and maybe I need both?
14:42 am0c left #perl6
14:44 nightwatcher too bad niecza is not prepackaged for fedora.. I enjoyed yum!
14:45 moritz_ was it... yummy?
14:45 nightwatcher moritz_: very yummy!!!
14:45 kanishka left #perl6
14:47 cogno left #perl6
14:47 roen joined #perl6
14:49 redicaps left #perl6
14:53 nightwatcher left #perl6
14:56 molaf joined #perl6
15:02 hcchien left #perl6
15:14 sorear good * #perl6
15:15 alester joined #perl6
15:16 moritz_ good morning sorear
15:16 araujo left #perl6
15:16 sorear TimToady: What does bare :: mean as a term?
15:17 jaldhar left #perl6
15:17 araujo joined #perl6
15:17 moritz_ std: :: * ::
15:17 p6eval std 625303c: OUTPUT«ok 00:01 120m␤»
15:18 moritz_ std: $
15:18 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/wCjQTX5PZO line 1:␤------> [32m<BOL>[33m⏏[31m$[0m␤Bogus statement at /tmp/wCjQTX5PZO line 1:␤------> [32m$[33m⏏[31m<EOL>[0m␤    expecting twigil␤Parse failed␤FAILED 00:01 120m␤»
15:21 hcchien joined #perl6
15:28 muixirt left #perl6
15:29 hcchien left #perl6
15:30 plobsing left #perl6
15:32 snearch left #perl6
15:34 Guest57809 left #perl6
15:35 wtw left #perl6
15:37 risou left #perl6
15:40 sorear moritz_: does $.foo imply item context?
15:42 moritz_ sorear: yes
15:42 moritz_ (though rakudo doesn't implement that part)
15:43 cogno joined #perl6
15:45 sol1tude left #perl6
15:45 sorear moritz_: what about $.method(1,2,3) ?
15:49 moritz_ same
15:49 moritz_ if you don't want to extort context, use self.method(1, 2, 3)
15:53 sorear I see
15:53 sorear Given has @.foo;  is self.foo equivalent to @.foo ?
15:54 envi left #perl6
15:54 moritz_ I think so
15:56 jnthn Only if .list is identify on the thing in there.
15:56 sorear JNTHN IS BACK!
15:56 jnthn Which it usually is for Positional things.
15:56 jnthn o/ sorear  :)
15:57 jnthn sorear: Only sort of back this week. Really really back next week.
16:01 hcchien joined #perl6
16:05 Patterner left #perl6
16:06 cogno left #perl6
16:06 amkrankruleuen joined #perl6
16:07 Psyche^ joined #perl6
16:07 Psyche^ is now known as Patterner
16:08 ROlds left #perl6
16:09 doddo joined #perl6
16:10 cogno joined #perl6
16:11 cogno left #perl6
16:11 cogno joined #perl6
16:13 felliott joined #perl6
16:16 cjk101010 left #perl6
16:19 wamba left #perl6
16:22 gbacon joined #perl6
16:23 colomon rakudo: sub f(Int $a) { $a * $a }; say &f.signature.params.constraints.perl
16:23 p6eval rakudo fc2db1: OUTPUT«Method 'constraints' not found for invocant of class 'Parcel'␤  in main program body at line 22:/tmp/qs0Oc1C600␤»
16:23 kaare_ joined #perl6
16:23 colomon rakudo: sub f(Int $a) { $a * $a }; say &f.signature.params[0].constraints.perl
16:24 p6eval rakudo fc2db1: OUTPUT«Bool::True␤»
16:24 colomon ?
16:24 moritz_ there is no constraint
16:24 moritz_ so rakudo stores True
16:24 colomon Int doesn't count?
16:24 moritz_ so that $anything ~~ $constraint returns True
16:24 moritz_ that's the type
16:24 moritz_ not the constraint
16:25 moritz_ rakudo: sub f(Int $a) { $a * $a }; say &f.signature.params[0].type.perl
16:25 p6eval rakudo fc2db1: OUTPUT«Int␤»
16:25 colomon rakudo: subset Positive of Int where * > 0; sub f(Positive $a) { $a * $a }; say &f.signature.params[0].constraints.perl
16:25 p6eval rakudo fc2db1: OUTPUT«(Int)␤»
16:25 colomon rakudo: sub f(Int $a where * > 0) { $a * $a }; say &f.signature.params[0].constraints.perl
16:25 p6eval rakudo fc2db1: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
16:25 jnthn fwiw, what moritz_++ said is consistent with how I understand it/implemented it too :)
16:26 colomon rakudo: sub f(Int $a where { $a > 0 }) { $a * $a }; say &f.signature.params[0].constraints.perl
16:26 p6eval rakudo fc2db1: OUTPUT«({ ... })␤»
16:26 cogno left #perl6
16:26 moritz_ rakudo doesn't .perlify closures very well :/
16:26 colomon jnthn: you expect me to listen to you just because you implemented it?   ;)
16:26 jnthn :P
16:27 colomon btw, I'm doing this looking at one of the  IO::Prompter examples.  It's crazy stuff.  And it also slightly doesn't work.
16:27 jnthn It turns out that in a program that just makes calls to single-dispatch subs that do pretty much nothing, we spend almost half of the runtime doing the type checks.
16:27 colomon prompt -> Num $amount, Coefficient $rate, Int $term, Str $desc where /\S/ {
16:27 molaf left #perl6
16:27 jnthn Good job that's getting a bunch cheaper in 6model... :)
16:27 colomon \o/
16:28 jnthn Though tempting to try a hack now... :)
16:28 moritz_ jnthn: if it does mostly nothing in the subs, no wonder it spends much time in the sub overhead
16:28 colomon go jnthn++ go!
16:28 jnthn moritz_: Yeah, but the overhead is...crazy.
16:28 jnthn moritz_: It means type checks hugely dominate signature binding runtime.
16:29 * jnthn has been poking around a bit. :)
16:29 rhebus joined #perl6
16:45 colomon rakudo: my $a = (Num); say $a.WHAT;
16:45 p6eval rakudo fc2db1: OUTPUT«Num()␤»
16:45 colomon rakudo: my $a = (Num).list; say $a.WHAT;
16:45 p6eval rakudo fc2db1: OUTPUT«List()␤»
16:46 colomon rakudo: my $a = (Num).list; say $a.perl
16:46 p6eval rakudo fc2db1: OUTPUT«(Num)␤»
16:46 colomon rakudo: my $a = (Num).list; say $a.perl; say 5.Num ~~ $a;
16:46 p6eval rakudo fc2db1: OUTPUT«(Num)␤Bool::False␤»
16:46 colomon rakudo: my $a = (Num).list; say $a.perl; say 5.Num ~~ all $a;
16:46 p6eval rakudo fc2db1: OUTPUT«(Num)␤Bool::False␤»
16:47 colomon and that's why Damian's code isn't working.
16:47 colomon hmmm.
16:47 colomon need to start with a good test, I think.  :)
16:50 jnthn Whee. A simple cache makes a fairly notable difference to my benchmark.
16:56 tadzik nice :)
16:56 cibs joined #perl6
16:56 cibs__ joined #perl6
16:56 cibs left #perl6
16:56 cibs__ left #perl6
16:57 Maksim2011 joined #perl6
16:57 cibs joined #perl6
17:00 muixirt joined #perl6
17:01 * jnthn does a before and after spectest run to make sure he hasn't busted anything :)
17:03 muixirt jnthn: 2 spectest runs, now that's an incentive to make rakudo faster ;-)
17:03 Maksim2011 left #perl6
17:04 Maksim2011 joined #perl6
17:05 jnthn I'm curious if the second one (with the patch) will be faster... :P
17:05 jnthn Hmm...I get a bunch of "Missing test file: " warnings at the start of the spectests.
17:05 roen left #perl6
17:06 Maksim2011 left #perl6
17:07 masak joined #perl6
17:07 masak \o/
17:07 jnthn o/ masak
17:07 masak I'm now officially a Southerner.
17:07 tadzik happy masak makes people happy :)
17:08 * jnthn hands masak a trithong
17:08 masak iouuuu
17:08 jnthn :D
17:08 jnthn A southerner with internets too :)
17:08 masak jnthn: that why your nick is all consonants, because you hand away your vowels in triplets? :P
17:09 jnthn noaa
17:09 masak yes, Windows 7 and I made a temporary truce to get the tubes flowing.
17:09 masak now we're back to mutual respectful distaste.
17:10 jnthn :)
17:10 jnthn It's better than Vista. :)
17:10 Maksim2011 joined #perl6
17:11 masak from what I hear, that's not saying much..
17:11 jnthn :P
17:12 moritz_ colomon: you'll need s/Num/Real/
17:12 moritz_ colomon: 5 hasn't be a Num for ages
17:12 muixirt masak: so you're in charge of making those rakudo* msi binaries?!
17:12 Maksim joined #perl6
17:12 * masak weeps
17:12 jnthn lol
17:13 jnthn wtf, I'm getting a very noisy test run even with a fresh checkout.
17:13 Trashlord weep weeep
17:15 masak I'm a bit emotional today, it seems. this morning I bid farewell to the Mac of $work.prev -- a long and sincere friendship.
17:15 moritz_ jnthn: parrot master has changed to only run :main subs, not the first sub in a file
17:15 moritz_ which breaks rakudo quite severely
17:16 jnthn Typical.
17:16 muixirt moritz_: but that's not hard to fix, is it?
17:16 masak so why did we bump PARROT_VERSION?
17:16 moritz_ we didn't
17:16 jnthn masak: I have locally got master built, not the suggested PARROT_REVISION.
17:16 moritz_ muixirt: if you think so, go right ahead :-)
17:16 tadzik oh btw, I fixed RT #80982 loally
17:16 jnthn As it fixes a Win32 build issue...
17:16 tadzik * locally
17:17 jnthn *sigh*
17:17 Maksim2011_ joined #perl6
17:19 Maksim2011 left #perl6
17:19 Maksim left #perl6
17:19 Maksim2011_ left #perl6
17:19 noganex left #perl6
17:20 muixirt moritz_: It's only adding ':main' to the 1st sub if no other sub is main, or is there more to it?
17:20 moritz_ muixirt: that might work
17:21 moritz_ muixirt: but I don't even know which compilation stage needs fixing
17:21 muixirt might?
17:21 jnthn Actions maybe.
17:21 moritz_ maybe POST -> PIR
17:21 Maksim joined #perl6
17:21 jnthn There's already a .pirflags thingy
17:22 jnthn .pirflags(':main') set on the appropriate PAST::Block would do it. If you can work out what the appropriate block is. and if this doesn't have other side-effects.
17:22 muixirt only 77 files to look at :-)
17:23 muixirt plus those generated
17:23 moritz_ well, I don't quite understand rakudo's startup
17:23 moritz_ which doesn't make things easier
17:23 moritz_ and I do suspect that some of the fixes need to go to nqp-rx
17:23 jnthn That may be the case.
17:23 jnthn Hm
17:23 justatheory joined #perl6
17:24 * jnthn wonders why that got changed.
17:24 dukeleto jnthn: welcome back
17:24 jnthn dukeleto: o/
17:24 kanishka joined #perl6
17:25 dukeleto if y'all need help with getting rakudo to work after the encapsulate-main merge, let me know
17:26 jnthn It'd help if Parrot did stuff that helped HLL devs rather than made them chase after endless changes with little benefit. :|
17:27 noganex joined #perl6
17:27 dukeleto jnthn: i feel your pain, but this branch is necessary to fix our packfiles
17:28 dukeleto jnthn: it was bad design and being fixed, which means changing some stuff. But certain algorithms in packfiles will become O(1) instead of O(N) and I think that will make Rakudo people happy
17:28 jnthn That'll be preferable. :)
17:29 dukeleto jnthn: i think there is a branch or patch to nqp-rx somewhere that makes it grok stuff after the encapsulate-main merge
17:29 dukeleto jnthn: or at least 80% of the time. I heard about it, but didn't see the bits.
17:29 dukeleto jnthn: we should have a wiki deprecation page for the encapsulate-main merge, and if we don't, someone is in trouble
17:31 masak dukeleto: I'll magnanimously pretend the Parrot people didn't steal that idea from SIC. :P
17:32 dukeleto masak: EDIDNTPARSE
17:32 moritz_ dukeleto: no branch in the repo itself
17:32 masak dukeleto: probably just as well... :)
17:32 Miguelanxo joined #perl6
17:32 Miguelanxo Hi there!
17:32 masak Miguelanxo: hi!
17:32 moritz_ dukeleto: and the "Network" view on github doesn'T show one either
17:32 Miguelanxo is there some common reason to be banned on #perl?
17:32 masak Miguelanxo: many.
17:33 moritz_ Miguelanxo: usually spamming or trolling
17:33 Miguelanxo �?
17:33 Miguelanxo well, figure me stunned
17:33 moritz_ or something having the bad luck of living in the same subnet as spammer
17:33 MayDaniel_ joined #perl6
17:33 Maksim left #perl6
17:33 Miguelanxo who is cannel ops on perl?
17:33 moritz_ many
17:34 moritz_ is there a concrete case you want to talk about?
17:34 dukeleto moritz_: plobsing is the person to ask about encapsulate-main, it was mostly his baby
17:34 Miguelanxo well, I for sure want to be unbanned
17:34 moritz_ Miguelanxo: you're in the channel, how can you be banned?
17:34 Miguelanxo noo
17:34 Miguelanxo I'm on perl6
17:34 Miguelanxo not on perl
17:34 moritz_ sorry
17:34 moritz_ I parsed that wrongly
17:35 moritz_ The main reason for banning is, iirc, using it as a help channel wehn it's not intended to be one
17:35 cdarroch joined #perl6
17:35 cdarroch left #perl6
17:35 cdarroch joined #perl6
17:36 Miguelanxo wel,, that makes a lot more sense
17:37 rhebus left #perl6
17:38 Miguelanxo "Freenode #Perl is Freenode's primary Perl help channel"
17:38 Miguelanxo now I don't understand a bit
17:40 moritz_ what did the topic of the channel say?
17:41 fhelmberger_ joined #perl6
17:42 MayDaniel_ left #perl6
17:44 fhelmberger left #perl6
17:45 colomon moritz_: err, obviously 5 isn't a Num, which is why I was saying 5.Num.  Damian's code may be slightly broken on this front, I'm not sure...
17:45 moritz_ probably just outdated
17:46 colomon hmmm, though my test is parsing "10", "20.2", and "40e20" all as Nums.
17:46 moritz_ probaly prefix:<+> errornously returning Nums
17:48 Maksim joined #perl6
17:48 moritz_ fun fact: simple nqp-rx programs run without error; declaring a class is enough to trigger the error.
17:48 tadzik http://wklej.org/id/449504/
17:48 Maksim left #perl6
17:49 colomon rakudo: sub f(Str $i where where /\D/) { say $i }; say f("ten");
17:49 p6eval rakudo fc2db1: OUTPUT«Could not find sub &where␤  in <anon> at line 22:/tmp/6FuZV_dsFI␤  in 'Block::ACCEPTS' at line 6067:CORE.setting␤  in 'f' at line 1:/tmp/6FuZV_dsFI␤  in 'f' at line 1:/tmp/6FuZV_dsFI␤  in main program body at line 22:/tmp/6FuZV_dsFI␤»
17:49 takadonet joined #perl6
17:49 takadonet yo yo
17:49 moritz_ double where
17:49 tadzik o/
17:49 colomon moritz_: yes, trying to figure out why double where made it through my test without a syntax error.
17:50 colomon constraints on types are not making it through the block version of prompt correctly.
17:51 rgrau joined #perl6
17:52 masak takadonet: \o
17:52 jnthn Pushed the cache thing. I *think* it's OK. Revert it if not and I'm not about to discuss. Here's benchmark.pl before and after - not very scientific but... http://nopaste.snit.ch/27543
17:53 moritz_ looks great :-)
17:53 colomon rakudo: sub f(Str $i where /\D/) { say $i }; say &f.signature.params[0].constraints.perl
17:53 p6eval rakudo fc2db1: OUTPUT«({ ... })␤»
17:53 colomon jnthn++
17:54 colomon rakudo: sub f(Str $i where /\D/) { say $i }; say &f.signature.params[0].constraints.WHAT
17:54 p6eval rakudo fc2db1: OUTPUT«List()␤»
17:54 takadonet wow
17:54 colomon jnthn: is constraints supposed to be a list of constraints?
17:54 jnthn colomon: erm. :)
17:54 * jnthn checks quickly
17:54 moritz_ or a junction?
17:55 tadzik jnthn: rakudo or nqprx?
17:55 jnthn colomon: bind.h has an array ther
17:55 jnthn *there
17:55 jnthn Not a junction.
17:55 Maksim joined #perl6
17:56 jnthn colomon: And yes, it returns that in the introspection too.
17:56 jnthn So, list.
17:56 colomon Damian is testing it like $retval !~~ $constraints
17:56 jnthn tadzik: Those numbers were from Rakudo.
17:56 colomon and it's not working.
17:56 jnthn colomon: oh.
17:56 tadzik jnthn: wow
17:56 colomon I don't think List has the right semantics to do that, does it?
17:56 moritz_ should be ~~ all @($constraints) or so
17:56 jnthn colomon: No
17:56 jnthn What moritz_++ said.
17:57 jnthn I think in an older version of the spec it woulda worked.
17:57 jnthn Though much older, iirc.
17:57 colomon Ah, I tried !~~ all $constraints but it didn't work.
17:57 moritz_ a *very* old version
17:57 tadzik jnthn: mind showing the patch?
17:57 jnthn tadzik: It's pushed - see github.
17:57 colomon It's worth noting that he didn't have a test for this case in his current stuff.  :)
17:57 jnthn colomon: :)
17:58 jnthn Wow, I got first Rakudo patch of 2011.
17:58 takadonet !!!!!
17:58 colomon is "all @(Mu)" sane?
17:58 takadonet i love subset!
17:58 moritz_ colomon: yes
17:58 jnthn colomon: Ah, yeah...you could try $constraints.all
17:58 moritz_ or you could also provide True
17:58 jnthn OK, I gotta leave for the day. Got guest to entertain this evening. :)
17:59 jnthn o/
17:59 colomon jnthn++
17:59 colomon \o/
17:59 colomon this works: $retval !~~ all @(%build_opt<constraints>//Mu)
18:00 colomon or at least, it passes my tests.
18:00 dalek rakudo: fc3035a | jnthn++ | unknown:
18:00 dalek rakudo: This implements a very simple saturating cache for nominal types of parameters. Halved the runtime of a simple benchmark that focused on sub calls with typed parameters.
18:00 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/fc3035abb4
18:03 takadonet hmm
18:05 Maksim is now known as blaboara
18:05 TimToady why not use .all there?
18:06 TimToady then you probably don't need the @()
18:06 TimToady well, the @ anyway, might still need ()
18:06 colomon (%build_opt<constraints>//Mu).all    ?
18:06 * colomon is still somewhat junctophobic
18:07 TimToady rakudo: say ().all
18:07 p6eval rakudo fc2db1: OUTPUT«all()␤»
18:08 colomon hmmm, my fix there broke all my other test files.
18:08 shi joined #perl6
18:08 TimToady ().all should be true too, so you might find a way to ditch the Mu test
18:08 colomon and that line is the culprit
18:08 blaboara is now known as maksim
18:09 maksim is now known as release
18:09 release is now known as maksim
18:10 TimToady is constraints not always there?  seems like it should be, but be an empty list if there are no constraints
18:10 TimToady rakudo: say "true" if ().all
18:10 p6eval rakudo fc2db1: OUTPUT«true␤»
18:10 TimToady so you shouldn't really need the Mu test
18:10 impious joined #perl6
18:10 hercynium joined #perl6
18:10 colomon trying %build_opt<constraints>.all now
18:10 maksim left #perl6
18:11 TimToady if constaints isn't always there, then you'd at least need //()
18:11 colomon and it passes both the tricky test file and one of the basic ones now.
18:11 WonTu joined #perl6
18:11 WonTu left #perl6
18:11 TimToady but I'd argue constraints should always be there, just empty sometimes
18:11 maksim joined #perl6
18:12 colomon all tests pass now.
18:12 TimToady \o/
18:12 TimToady probably faster this way too, without extra flattening
18:13 hercynium flattening is fattening
18:13 colomon TimToady: Do you remember the prompt -> Num $amount, Coefficient $rate, Int $term, Str $desc where /\S/ { blah } demo?  It's working again now in current Rakudo.  :)
18:13 maksim is now known as maksim_
18:14 TimToady hmm
18:16 maksim_ left #perl6
18:17 colomon https://gist.github.com/763743
18:17 colomon The genius is all Damian's, but I fixed a couple of minor issues that were stopping it from working with current Rakudo.  :)
18:18 maksim_ joined #perl6
18:19 colomon though I'm having trouble pushing my latest to github for some reason.  :\
18:19 maksim_ left #perl6
18:19 colomon ah, there it goes.
18:20 maksim_ joined #perl6
18:21 mtk left #perl6
18:22 muixirt t/spec/S14-roles/parameter-subtyping.rakudo seems to hang, any commants?
18:22 maksim_ left #perl6
18:23 TimToady I was getting some hangs in spectest the other day, so it might not be related to jnthn++'s cache fix
18:23 TimToady but the title is suspicious
18:23 mtk joined #perl6
18:26 muixirt the revision just before jnthn cache thingy
18:28 takadonet maybe I will wait on git pull and make...
18:30 wamba joined #perl6
18:30 colomon huh, still having github issues.
18:34 wamba left #perl6
18:34 wamba joined #perl6
18:36 dukeleto colomon: me too
18:37 dukeleto colomon: still intermittent issues pulling and pushing
18:39 TimToady colomon: my problem with Damian's approach is that introspection has become a design smell to me
18:40 colomon TimToady: I might well be convinced of that in time too.  But if nothing else, this example is a very neat demo for the moment.  :)
18:41 colomon afk # nap
18:42 masak left #perl6
18:49 dsp_ left #perl6
18:55 colbseton joined #perl6
19:03 Patterner left #perl6
19:04 colbseton left #perl6
19:04 takadonet left #perl6
19:04 colbseton joined #perl6
19:05 Psyche^ joined #perl6
19:05 Psyche^ is now known as Patterner
19:09 Miguelanxo_ joined #perl6
19:12 dsp_ joined #perl6
19:12 Miguelanxo__ joined #perl6
19:13 Miguelanxo left #perl6
19:15 Miguelanxo joined #perl6
19:16 Miguelanxo_ left #perl6
19:16 Miguelanxo_ joined #perl6
19:17 Miguelanxo__ left #perl6
19:18 Miguelanxo__ joined #perl6
19:19 Miguelanxo left #perl6
19:21 Miguelanxo joined #perl6
19:21 kanishka left #perl6
19:21 colbseton left #perl6
19:21 Miguelanxo_ left #perl6
19:21 shi left #perl6
19:22 moritz_ http://www.perlmonks.org/?node_id=880228 with a golfed Perl 6 FP solution
19:23 Miguelanxo_ joined #perl6
19:23 Miguelanxo__ left #perl6
19:23 kjeldahl joined #perl6
19:25 MayDaniel joined #perl6
19:26 Miguelanxo__ joined #perl6
19:27 Miguelanxo left #perl6
19:28 Miguelanxo joined #perl6
19:29 Miguelanxo_ left #perl6
19:30 Miguelanxo_ joined #perl6
19:32 Miguelanxo__ left #perl6
19:33 Miguelanxo__ joined #perl6
19:33 Miguelanxo left #perl6
19:33 fhelmberger_ left #perl6
19:34 daxim left #perl6
19:35 Miguelanxo joined #perl6
19:35 Miguelanxo_ left #perl6
19:36 Miguelanxo_ joined #perl6
19:37 masak joined #perl6
19:37 Miguelanxo__ left #perl6
19:38 Miguelanxo__ joined #perl6
19:38 colomon back
19:39 Miguelanxo left #perl6
19:40 masak hm, introspection a design smell. I instinctively agreed, but then I got to thinking why I agree. why is it that introspection *is* a design smell, really?
19:40 colomon rakudo: sub compress(*@a) { flat @a Zxx 1, (@a Zne @a[1..*-1]) }; say compress(<a a a a b c c a a d e e e e>).perl;
19:40 p6eval rakudo fc2db1: OUTPUT«("a", "b", "c", "a", "d", "e")␤»
19:40 colomon moritz_++
19:40 tadzik colomon is masak!
19:40 masak I wouldn't be surprised if a proper answer showed that some introspection is harmless.
19:40 Su-Shee joined #perl6
19:41 Su-Shee good evening.
19:41 masak Su-Shee! \o/
19:41 tadzik colomon goes nap, masak leaves irc. colomon gets back, masak starts posting
19:41 * colomon is not masak.
19:41 tadzik hi Su-Shee
19:41 * masak is not colomon
19:41 colomon Su-Shee!
19:41 Su-Shee apples are not pears?
19:41 masak bits are not qubits.
19:41 Miguelanxo_ left #perl6
19:41 colomon He's red.  I'm blue.
19:41 Su-Shee I'm not your father.
19:42 masak I'm not a potato.
19:42 Su-Shee and yet tomatoes are fruit.
19:43 masak I once heard a mother in the grocery store correcting her daughter who had picked out tomatoes "instead" of fruit.
19:43 Miguelanxo__ left #perl6
19:43 masak had I been Sheldon Cooper, I would have intervened and corrected the mother.
19:43 masak but I'm not Sheldon Cooper.
19:43 Eevee there's surely a lesson here about duck typing
19:43 colomon masak: I think I can kind of feel where the design smell idea comes from.  Elegant code shouldn't depend on that sort of thing.
19:43 masak Eevee: or subtypes.
19:44 moritz_ in German, the definition of "fruit" is usually used in the context of how stuff is used, not in a strict biological sense
19:44 Su-Shee masak: your operator precedence question.. I thought that much about it that I realized that I had _never_ once have to look it up and rarely make a mistake with them. does it mean they're simple or does it mean they follow some logic intuitively done right?
19:44 Eevee I fear tomato is involved in some hairy diamond inheritance
19:44 masak colomon: that's just restating the prejudice.
19:44 tadzik moritz_: that's wise
19:44 masak colomon: *why*?
19:44 tadzik knowlegde is knowing that tomato is a fruit. Wisdom is not putting the tomato in a fruit salad
19:44 masak Su-Shee: yes, I think so.
19:45 masak Su-Shee: Java has one decidedly wrong: instanceof
19:45 masak Su-Shee: I never bothered to find out where it should be, though. that might be fun.
19:46 moritz_ masak: re introspection, the common line of reasoning is "it's better to have code work universally instead of context dependent. Introspection is context dependent, hence inferior"
19:46 Su-Shee masak: I somehow just accepted in blind faith the rule "when in doubt, () like in math" and never thought about it. ;)
19:46 masak Eevee: nature does not believe in the simple category model one gets from class inheritance :)
19:46 Su-Shee tadzik: genius is making a sweetened jam/marmelade out of tomatoes or put carrots in cake. ;)
19:47 masak moritz_: hm. my guess until now was "we got a nice built-in type system, dispatch logic and all. don't reinvent it." do you find that reason similar to yours?
19:47 tadzik :)
19:47 moritz_ masak: I don't see how yours goes against introspection
19:48 masak Su-Shee: I don't like unnecessary parentheses obviously put there due to such doubt. I find them as annoying as over-obvious comments about the workings of a program.
19:48 masak # increase $i by one
19:49 Su-Shee masak: I rarely need them, but that was about the only rule I've consciously read and had in mind about operators. somehow, a list which _exists_ was always good enough.
19:49 Trashlord left #perl6
19:50 masak moritz_: ok, new attempt at grokking your reason. is it related to the thing with the Durations, where some math ops were randomly outlawed?
19:50 moritz_ masak: no
19:50 moritz_ let me find a discussion...
19:51 masak Su-Shee: there seems to be a loose consensus heuristic of "parenthesize most combinations of ops except those from basic algebra" among programmers
19:51 masak at least among those who gave it any thought.
19:52 masak there is the usual question looming, how much to program for the less-than-100%-informed reader.
19:52 Trashlord joined #perl6
19:52 Su-Shee masak: somehow, they must have done it well because it was no problem at all for people like me (who stopped caring about math and logic and the like in 3rd grade ;)
19:53 masak Su-Shee: when you see $a + $b * $c, how do you group it?
19:53 moritz_ masak: http://www.perlmonks.org/?node_id=695773
19:54 Su-Shee masak: by children's math rule in german which translates to "point before stroke" aka * before + so I multiply and then add.
19:55 masak Su-Shee: then you care enough :)
19:56 masak when you learn Smalltalk, you have to unlearn that part.
19:56 Su-Shee I was just going to mention that...
19:56 Su-Shee (I've recently started Smalltalk..)
19:59 plobsing joined #perl6
19:59 meraxes joined #perl6
20:01 masak moritz_: interesting discussion.
20:01 mtk left #perl6
20:01 masak I come away from it more confused than I entered it, though :)
20:02 masak I see introspection as a feature usually reserved for the language internals, but graciously provided to the programmer.
20:03 moritz_ masak: remeber the "log all method calls on $obj that come from $Role" example in DBI?
20:03 muixirt left #perl6
20:03 moritz_ DBDI, in fact
20:03 masak yes.
20:03 moritz_ IMHO that's a very good application of "user" level introspection
20:03 masak also, jnthn++'s mocking module.
20:04 moritz_ it's debugging, but still...
20:04 TimToady introspection is another last-resort escape hatch
20:04 masak yes, but why?
20:04 masak why isn't it just another feature, like iteration?
20:04 tadzik http://twitter.com/xquery/​statuses/21283518768218112
20:04 tadzik all the cpan packages?
20:05 TimToady because one is tempted continually to write less generic code than desirable
20:05 moritz_ tadzik: I don't think so
20:05 masak tadzik: I saw that one too. he seems very happy about something that isn't there yet.
20:05 TimToady a small example is $x.WHAT eq 'Int()'
20:05 masak ewww!
20:05 TimToady but that shows the problem, because .WHAT is introspection
20:06 tadzik masak: exactly
20:06 moritz_ so pharsed differently, there's nothing wrong with not-restricting, properly used introspection?
20:06 masak tadzik: nevertheless, I replied to him and asked him to contact #perl6 if he had any questions.
20:06 TimToady you can say the same about BEGIN and eval
20:06 colomon masak: I admit I'm not coming up with good reasons why something like the "special" version prompt shouldn't introspect.
20:07 masak BEGIN may be a last resort, but it evaluates as early as possible. :P
20:07 * masak hones is really bad puns
20:07 TimToady because it's a single point solution, when a general solution will cover MAIN and <1 2.3 4+2i>
20:07 TimToady and maybe prompt
20:08 masak TimToady: but you could say that about a lot of cool things. "it's not general enough, we should do this thing once and for all..."
20:08 MayDaniel left #perl6
20:08 moritz_ or generally turning strings into the literals they represent
20:08 TimToady yes, we need some kind of "untext" primitive that is useful all over
20:08 masak moritz_: a bit like a JSON parser without the injection attacks :)
20:09 TimToady I've been scratching my head all morning for a good name for it, so I can spec the other things in terms of it
20:09 masak &pure-eval
20:09 mtk joined #perl6
20:09 sorear hello masak
20:09 moritz_ literal
20:09 TimToady it can be viewed as a form of eval, yes
20:09 masak sorear! \o/
20:11 TimToady one thing about taking the evalish view is that it tends to make you want to translate enums as well
20:11 moritz_ you mean "True" -> True ?
20:11 TimToady that's an example, yes
20:12 PerlJam joined #perl6
20:12 sorear parse
20:12 TimToady too generic
20:12 TimToady likewise lex
20:12 PerlJam happy new year every one!
20:12 orafu left #perl6
20:12 TimToady lex with a default lexer could be a way to look at it though
20:12 orafu joined #perl6
20:13 TimToady on the other hand "numify" is too specific
20:13 TimToady dwim is too general
20:13 TimToady guess is too general
20:13 tadzik hello PerlJam, same to you :)
20:13 TimToady another problem you run into is words that are too overloaded already, like "id"
20:13 TimToady or "type"
20:13 lilly_90 joined #perl6
20:14 TimToady "typify" is kinda long
20:14 TimToady lex is probably the closest miss, so far
20:14 diakopter pharsed indeed
20:15 TimToady weighed and found wanting
20:15 PerlJam what are we talking about exactly?  What needs a (new?) name?
20:15 TimToady I love making jokes that only diakopter will get  :)
20:16 TimToady perljam: a generalizition of what <1 2.3 4i> is already specced to so
20:16 dalek sprixel: 869cd2b | diakopter++ | / (16 files):
20:16 dalek sprixel: classes, slightly-wrong syntax attributes, methods, recursive &
20:16 dalek sprixel: post-declared methods still a WIP. Prepending another pass for that.
20:16 dalek sprixel: review: https://github.com/diakopte​r/sprixel/commit/869cd2b0d0
20:16 TimToady *to do
20:16 moritz_ PerlJam: a function that turns a string into the literal it reprsents
20:16 TimToady or a list of strings
20:16 PerlJam hmm
20:16 Psyche^ joined #perl6
20:16 lilly_90 helo, I downloaded the "using perl" pdf and faced a problem executing first program on my fedora14.. can someone help please?
20:17 alester Which "using perl" pdf is this?
20:17 * diakopter won't dare to step a toe into any kind of [re-]naming, since apparently I'm bad at it.
20:17 moritz_ lilly_90: if you tell us what the prlbem is, yes
20:17 lilly_90 when I execute tennis.pl I get this: Method 'split' not found for invocant of class ''
20:17 PerlJam TimToady: I take it "ident" is just as bad as "id"?
20:18 masak I'd like to propose that this &lex thing be able to parse things under different slangs, perhaps defaulting to the current one.
20:18 lilly_90 moritz_: I think I saw your name on authors..
20:18 alester lilly_90: This channel is for Perl 6, but I think you're looking for help on Perl 5.  If so, then take a look at #perl-help.
20:18 Patterner left #perl6
20:18 Psyche^ is now known as Patterner
20:18 sorear alester: that's a rakudo error
20:18 bacek_ joined #perl6
20:18 moritz_ alester: no no, lilly_90 means "Using Perl 6"
20:18 diakopter lilly_90: you're in the right place :)
20:18 alester look at that. Huh.
20:18 moritz_ lilly_90: what data file did you provide? did you make sure to have no leading whitespace in it?
20:19 alester lilly_90: Ignore me. :-)
20:19 TimToady masak: so what you're saying really is that the current slang needs a way of isolating the pure bits; we started down that road once before with <number>...
20:19 lilly_90 moritz_: I used file named scores like the example in book exactly..
20:19 diakopter on another note, it seems google hasn't indexed *the text in* that PDF; it might be nice if it had
20:20 moritz_ lilly_90: are there trailing or leading spaces in the data file?
20:20 alester lilly_90:Can you show us the source code, please?  Go to http://pastebin.com/ and paste the code into that box, and click Submit.  Then give us the URL that it gives you.
20:20 alester that way we can see your source code.
20:20 moritz_ lilly_90: copying from PDf and then pasting to a text file is known to be fragile
20:20 zby_home_ left #perl6
20:21 lilly_90 I did not copy and paste.. I written it manually..
20:21 masak TimToady: haven't thought of it like that... yes, maybe.
20:21 PerlJam alester: Don't be so helpful after telling someone to ignore you  ;)
20:21 alester :-P
20:22 lilly_90 I just re-ran it.. got these three messages:
20:22 diakopter lilly_90: even a line break after the last line might cause the error
20:22 zby_home_ joined #perl6
20:22 lilly_90 Method 'split' not found for invocant of class ''
20:22 lilly_90 in <anon> at line 13:tennis2.pl
20:22 lilly_90 in main program body at line 1
20:23 lilly_90 the datafile has no leading or trailing white spaces..
20:23 alester lilly_90: Please do the pastebin.com thing that I said above.
20:23 wamba left #perl6
20:23 TimToady please show us your copy of tennis2.pl as alester++ suggested
20:23 moritz_ lilly_90: then please show your code. The latest example has only a blank line on line 13
20:23 alester (If you dont' have me on ignore. :-))
20:23 moritz_ s/example/pdf/
20:23 impious left #perl6
20:24 * moritz_ should upload a new .pdf
20:25 lilly_90 alester: Just a moment
20:25 sorear when I was trying to estimate "how much will self-hosting slow down Niecza builds" earlier, there was one factor I was not counting on
20:25 sorear 1285  3876 32913 src/Op.pm
20:25 sorear 774  2731 22495 v6/Op.pm6
20:26 lilly_90 alester: here you go: http://pastebin.com/jWe35jYY
20:26 PerlJam lilly_90: can you paste you data file too?
20:26 lilly_90 PerlJam: sure.. moment
20:27 shi joined #perl6
20:27 Patterner left #perl6
20:29 Psyche^ joined #perl6
20:29 Psyche^ is now known as Patterner
20:30 PerlJam lilly_90: while I'm waiting I would guess that you have a blank line in your data file somewhere.
20:30 lilly_90 PerlJam: here you go: http://pastebin.com/2yfhBcuu
20:30 lilly_90 PerlJam: where?
20:31 PerlJam dunno.  I was guessing. :)
20:31 TimToady there seems to be a missing }
20:31 TimToady on the for loop at line 10
20:31 diakopter no..
20:32 PerlJam just crazy indentation
20:32 diakopter just funy indenting
20:32 TimToady okay, I see it
20:33 diakopter lilly_90: what kind(s) of line endings does the datafile have?  \r\n ?  \n  ?  \r  ?  \f  ??
20:33 PerlJam lilly_90: what version of rakudo are you using?
20:33 moritz_ lilly_90: when I run your code with your data, I get a quite different output
20:33 lilly_90 moritz_: by the way now I get this : http://pastebin.com/y0iEjjvd
20:33 PerlJam Hmm.
20:33 moritz_ lilly_90: that's what I get too
20:34 moritz_ lilly_90: and that is explained by typos in your data file
20:34 moritz_ Dava vs. Dave
20:34 diakopter oh, yeah
20:34 moritz_ and Charlie vs. Charli
20:34 lilly_90 moritz_: ohhh!!!
20:34 lilly_90 moritz_: :D
20:35 PerlJam lilly_90: so what changed between the time you had the errors and when it worked?
20:36 lilly_90 PerlJam: I rewritten it again.. I guess you mean there was a hidden space somewhere? ;)
20:37 lilly_90 Thanks to all! you are great! :) bye! ^_^
20:38 PerlJam Though this error is LTA: Method 'split' not found for invocant of class ''
20:38 PerlJam I wonder if the name of the var is available at that point to give a better error?
20:39 PerlJam (I would assume so, but I dunno for sure)
20:40 masak PerlJam: that usually happens when .WHAT is called on a type object.
20:41 masak rakudo: say Str.WHAT.perl
20:41 p6eval rakudo fc3035: OUTPUT«Str␤»
20:41 masak hm.
20:41 masak rakudo: say Str.WHAT
20:41 p6eval rakudo fc3035: OUTPUT«Str()␤»
20:41 masak apparently that's not how the bug is triggered... :)
20:41 PerlJam rakudo: my $not-str;  $not-str.split(' ');
20:41 p6eval rakudo fc3035: OUTPUT«Method 'split' not found for invocant of class ''␤  in main program body at line 22:/tmp/lhz4p5x1yI␤»
20:42 TimToady rakudo: say $*IN.get.split(' ')
20:42 p6eval rakudo fc3035: OUTPUT«LandderBerge,LandamStrome,␤»
20:42 TimToady though split(' ') is probably not doing what a P5 programmer would expect
20:42 lilly_90 left #perl6
20:42 PerlJam TimToady: maybe depends on how long they've been a perl 5 programmer :)
20:43 TimToady you can't trick me, I already hedged it with "probably" :P
20:43 PerlJam I forgot you can see around corners.
20:44 TimToady yeah, well, the big problem is still what I know that ain't so
20:49 PerlJam That would be a hard one to warn against though.  Would you have: use warnings 'Perl5';  or something?  Because a Perl 6 programmer would expect $string.split(' ') to do what it actually does.
20:51 TimToady we could force them to disambiguate that one to .split(/' '/)
20:52 TimToady it's not like the situation where you really want to split on space comes up all that much, so I wouldn't consider it an arduous workaround to suppress the warning
20:53 TimToady especially if the warning says as much
20:53 TimToady ...please use .comb or .split(/' '/) instead
20:54 TimToady er, .words rather
20:55 PerlJam right now I think I'd find that annoying.   But then again ... I can't think of when I've actually wanted to split on just a single space either.
20:55 PerlJam (in any language)
20:57 masak space-separated record?
21:00 Util left #perl6
21:00 PerlJam usually that comes across as "spaces-separated"  or "arbitrary whitespace separated"
21:00 pmichaud left #perl6
21:01 flussence you're underestimating the evilness of people who generate "CSV" :)
21:02 masak I agree it's probably not very common at all.
21:02 tadzik left #perl6
21:03 Juerd left #perl6
21:03 diakopter feather away
21:03 Su-Shee flussence: you wouldn't really apply split in that case but use either a module or in perl6's case probably the superfancy CSV grammar.. :)
21:06 zby_home_ left #perl6
21:06 dalek niecza: 437db86 | sorear++ | v6/ (2 files):
21:06 dalek niecza: [v6] Finish translation of Op
21:06 dalek niecza: review: https://github.com/sorear/niecza/commit/437db86dc5
21:08 bacek__ joined #perl6
21:09 flussence sorear: wow. I see what you mean with the wc stats, that's a lot of boilerplate
21:12 bacek_ left #perl6
21:15 pmurias joined #perl6
21:17 masak TimToady: a possible problem with having a pure subset of every slang is that it might be too much to ask of someone extending Perl 6 to specify such a pure subset.
21:17 Psyche^ joined #perl6
21:17 pmurias sorear: hi
21:17 pmurias sorear: what's your estimation of the slowdown?
21:18 Patterner left #perl6
21:18 Psyche^ is now known as Patterner
21:21 bacek_ joined #perl6
21:21 moritz_ fwiw I uploaded new snapshots of the book
21:21 PerlJam moritz++
21:23 sorear pmurias: insufficient data
21:24 bacek__ left #perl6
21:25 pmurias so what's left for the bootstrap? the grammar and the actions?
21:25 sorear no, the grammar was first.
21:26 MayDaniel joined #perl6
21:26 rindolf joined #perl6
21:26 rindolf Hi all.
21:26 sorear actions, NAMBackend, driver, optimization passes, begin
21:26 sorear hello rindolf
21:27 rindolf sorear: what's up?
21:27 sorear niecza: my $match = "foo" ~~ /^./; say ~$match
21:27 p6eval niecza v1-35-gc9d17a7: OUTPUT«f␤»
21:27 sorear # moritz_
21:27 moritz_ niecza: my $match = "foo" ~~ /^./; say $match
21:27 p6eval niecza v1-35-gc9d17a7: OUTPUT«f␤»
21:28 moritz_ niecza: say "foo" ~~ /^./
21:28 p6eval niecza v1-35-gc9d17a7: OUTPUT«␤»
21:28 sorear moritz_: say has a slurpy argument
21:28 Patterner left #perl6
21:29 diakopter sigh. enabling perlesque not to require predeclaration of classes & method signatures (by prepending another pass) is requiring some non-trivial refactors.
21:29 diakopter oh well. it'll be worth it in the end.
21:30 diakopter (enables recursive & cross-referring methods and cross-referring classes, all resolved at compile-time)
21:30 moritz_ sorear: I consider $/ a scalar
21:30 moritz_ so just like say [1, 2, 3] doesn't flatten the scalar [...], I don't think say() should flatten $/
21:30 pmurias sorear: it doesn't make much sense to refactor stuff before migrating everything to Perl 6?
21:31 Psyche^ joined #perl6
21:31 Psyche^ is now known as Patterner
21:31 moritz_ niecza: say 'foo' ~~ /(.).(.)/
21:31 p6eval niecza v1-35-gc9d17a7: OUTPUT«fo␤»
21:31 moritz_ niecza: say 'abc' ~~ /(.).(.)/
21:31 p6eval niecza v1-35-gc9d17a7: OUTPUT«ac␤»
21:31 diakopter niecza: say 'abc' ~~ /(.).($)/
21:31 p6eval niecza v1-35-gc9d17a7: OUTPUT«b␤»
21:32 moritz_ niecza: 'abc' ~~ /(.).(.)/; say $/
21:32 p6eval niecza v1-35-gc9d17a7: OUTPUT«abc␤»
21:33 diakopter rakudo: say 'abc' ~~ /(.).($|.).?/
21:33 p6eval rakudo fc3035: OUTPUT«abc␤»
21:33 diakopter niecza: say 'abc' ~~ /(.).($|.).?/
21:33 p6eval niecza v1-35-gc9d17a7: OUTPUT«ac␤»
21:34 masak sorear: so, how's the translation work going?
21:34 Trashlord left #perl6
21:36 Patterner left #perl6
21:36 sorear niecza: "foo" ~~ /^./; say $/
21:36 p6eval niecza v1-35-gc9d17a7: OUTPUT«f␤»
21:36 sorear moritz_: $/ is a scalar
21:37 moritz_ and a match doesn't return $/ ?
21:38 * sorear points at STD.pm6 line 5791
21:38 simon__ joined #perl6
21:38 Psyche^ joined #perl6
21:38 Psyche^ is now known as Patterner
21:39 sorear if the match returned $/, then $/ would be assigned to $sigil and $twigil and $first would get undef
21:40 sorear so instead niecza returns a value which acts like $/ in item context and @() in list context
21:40 * moritz_ is not entirely convinced
21:41 moritz_ STD also used @a[-1] until I changed it *-1
21:41 Tene http://perlcabal.org/syn/ is down?
21:42 dalek niecza: 10dda8e | pmurias++ | / (3 files):
21:42 dalek niecza: added the clisp backend
21:42 dalek niecza: niecza support -Bclisp and -Bmono
21:42 dalek niecza: review: https://github.com/sorear/niecza/commit/10dda8ec9e
21:42 colomon \o/
21:43 sorear pmurias: I plan to migrate the driver after you finish refactoring
21:44 sorear masak: unexpectedly well.
21:44 BinGOs Tene: http://www.downornot.com/perlcabal.org
21:44 masak sorear: glad to hear it.
21:44 masak std: my @seasons[4:map(*%4)]; say @seasons[-1]
21:44 p6eval std 625303c: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of [-1] subscript to access from end of array; in Perl 6 please use [*-1] at /tmp/3OdGXgTJ4E line 1:␤------> [32my @seasons[4:map(*%4)]; say @seasons[-1][33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 122m␤»
21:44 masak TimToady: ^^
21:44 TimToady diakopter: two-pass parsing will never be in Perl 6
21:49 Psyche^ joined #perl6
21:49 masak left #perl6
21:50 Patterner left #perl6
21:50 Psyche^ is now known as Patterner
21:50 dalek niecza: af8c692 | pmurias++ | niecza:
21:50 dalek niecza: -B is the default
21:50 dalek niecza: review: https://github.com/sorear/niecza/commit/af8c69274c
21:50 dalek niecza: 08bc46f | pmurias++ | niecza:
21:50 dalek niecza: fix argument handling
21:50 dalek niecza: review: https://github.com/sorear/niecza/commit/08bc46fa38
21:52 diakopter diakopter: right, but this is on the backend
21:52 diakopter erm
21:52 diakopter TimToady: right, but this is on the backend
21:52 diakopter assuming "perlesque" will be the language to which sprixel "desugars" (used very generally) Perl 6
21:53 dalek niecza: ecab5bd | pmurias++ | niecza:
21:53 dalek niecza: fix hashbang line in niecza
21:53 dalek niecza: review: https://github.com/sorear/niecza/commit/ecab5bd4ee
21:53 hugme joined #perl6
21:54 diakopter TimToady: I keep having to remind lots of people that perlesque is never intended to be a Perl 6 implementation; it's just an intermediate language in the sprixel implementation
21:54 TimToady I don't think emitters should necessarily be that lazy, and two-pass parsing is fragile and inextensible
21:54 Juerd joined #perl6
21:54 TimToady I think it's asking for trouble down the line
21:55 diakopter it's fine for this tiny/extremely-restricted subset.  it's not two-pass parsing anyway; it's two-pass tree traversing
21:55 pmurias diakopter: perlesque looks like a language
21:55 diakopter pmurias: it's a language
21:55 pmurias diakopter: so it's natural people don't treat it like an intermediate thing
21:56 TimToady well, multiple tree traversals is less evil, but I'm assuming you're not using "is it a class" to parse differently like Perl 6 is
21:56 tadzik joined #perl6
21:57 TimToady if classiness doesn't change your grammar, then I'll shut up
21:57 TimToady it's retroactive grammar changes that are evil
21:58 diakopter well, after biobreak cogitation, I realized it doesn't require *any* refactors :)   Advice appreciated; no, the grammar is unambiguous
21:58 diakopter pmurias: the same argument could be made for NQP
21:59 TimToady one can, of course, get into similar troubles with multi-pass trees where the types don't track the semantic changes
21:59 pmurias i thought rakudo was compiling directly to PAST?
21:59 pmurias sorear: prove -e './niecza' test.pl passes
22:00 diakopter in perlesque symbols never change type except covariantly and back
22:00 diakopter (same as CLR)
22:01 TimToady I mean if you do a tree transform and represent it with the same type, it can get into similar cyclic problems
22:01 bacek_ left #perl6
22:02 TimToady you can view tree transformations from either an FP view or an imperative view, in other words
22:02 diakopter nothing transforms trees yet; it just traverses them.
22:02 TimToady sounds imperative :)
22:03 diakopter here are some details:
22:03 slavik1 left #perl6
22:04 diakopter one way to build classes on the CLR is to use the built-in System.Reflection.Emit class, which uses TypeBuilder objects to represent in-progress-types.
22:04 diakopter the runsharp library (which I brazenly imported into perlesque/sprixel) wraps SRE with TypeGen objects that abstract the TypeBuilder objects even further
22:05 shi left #perl6
22:05 diakopter er, System.Reflection.Emit namespace
22:07 diakopter anyway, one pass through the tree can create all the TypeGens and FrameGens (another abstraction perlesque adds to TypeGens, to represent not-yet-ready-to-compile-to-CIL subroutine instances (continuations))
22:07 _twitch left #perl6
22:07 simon__ left #perl6
22:07 diakopter they leave in droves (bacek_, slavik1, shi, _twitch, simon__ :(
22:09 diakopter then the next pass can fill in the CodeGens (another class in runsharp that represents the bodies of CLR methods before they are emitted to CIL) with the appropriate code.
22:12 diakopter any optimization passes would occur in the second pass, recursively (with depth limits) if necessary, but that type/method-signature building pass wouldn't need changed for those.
22:12 aindilis joined #perl6
22:12 * diakopter goes back to it
22:14 bacek_ joined #perl6
22:14 diakopter pmurias: I see your point about compiling directly to PAST.
22:14 diakopter sprixel's strategy will be (interrupted by finishing nqpclr's regex port from pmichaud's nqp-rx):
22:15 Juerd left #perl6
22:15 shi joined #perl6
22:17 tadzik left #perl6
22:18 diakopter 1. use a particular viv emitter (or niecza emitter if it's caught up to viv by then) to emit a strongly/primitive-typed (as much as possible) perlesque edition of STD/Cursor. 2. write an emitter for that CLR STD/Cursor that desugars Perl 6 to perlesque, optimizing for primitive types (non-annotated scalars are Any/Cool/etc or whatever). 3. run that perlesque
22:18 hugme left #perl6
22:18 diakopter feather seems flaky today
22:19 dju_ joined #perl6
22:19 Kovensky left #perl6
22:19 Kovensky joined #perl6
22:20 cxreg left #perl6
22:20 cxreg joined #perl6
22:20 Helios left #perl6
22:20 bacek_ left #perl6
22:20 diakopter I suppose step 1 subsumes step 2 if it's niecza.  wow, /me shuts up now
22:20 rbuels left #perl6
22:21 rbuels joined #perl6
22:23 Tene argh, I just spent like 20 minutes working on a reddit comment that should have been like 2 minutes. ><
22:23 dju left #perl6
22:23 Helios joined #perl6
22:24 diakopter oh, and, the emitted perlesque would appear very "interpreter"-like
22:29 sorear pmurias: cool
22:29 TimToady pardon me if I appear distracted; still recovering from the disk crash; am at the "cpanm Moose" stage...
22:30 sorear pmurias: how long until it can build the setting?
22:30 tadzik joined #perl6
22:31 Juerd joined #perl6
22:34 jjore_ joined #perl6
22:35 ggoebel good to see jonathan++ back at 6model
22:35 rjbs- joined #perl6
22:35 pumphaus1 joined #perl6
22:35 diakopter TimToady: disk crash was catastrophic?
22:35 diakopter like, lack of backup and such?
22:35 pmurias sorear: dunno a few small fixes propably
22:35 kst`` joined #perl6
22:36 c9s_ joined #perl6
22:36 rjbs- left #perl6
22:36 rjbs- joined #perl6
22:36 Helios left #perl6
22:36 stepnem left #perl6
22:36 jmmills left #perl6
22:36 c9s left #perl6
22:36 estrabd left #perl6
22:36 kst` left #perl6
22:36 [particle] left #perl6
22:37 shabble left #perl6
22:37 rjbs left #perl6
22:37 pumphaus left #perl6
22:37 jjore left #perl6
22:37 ruoso left #perl6
22:37 moritz_ left #perl6
22:37 takesako left #perl6
22:37 patch left #perl6
22:37 rjbs- is now known as rjbs
22:37 hercynium left #perl6
22:38 sol1tude joined #perl6
22:38 [particle] joined #perl6
22:40 pmurias sorear: the common lisp backend will take a lot longer to build the setting
22:40 sorear naturally
22:40 sorear there's quite a lot of logic in the C# parts :/
22:41 pmurias not sure if it's worth to spend time on that right now
22:41 stepnem joined #perl6
22:41 takesako joined #perl6
22:42 Helios joined #perl6
22:42 jmmills joined #perl6
22:42 estrabd joined #perl6
22:42 shabble joined #perl6
22:42 ruoso joined #perl6
22:42 patch joined #perl6
22:42 colomon Hmmm, I definitely get new failures in S14-roles/parameterized-type.t using the latest Rakudo.   Will try to roll back jnthn++'s patch now.
22:43 moritz_ joined #perl6
22:45 pmurias sorear: where should i put the stuff to create a Niecza::Compiler for a given backend/options?
22:45 sorear pmurias: should I plan to start v6/niecza with the old driver or the new one?
22:46 sorear pmurias: Niecza::Compiler should have a new_simple method that handles the finer points of setup
22:46 sorear then that can be used in the niecza script and in Niecza.proj
22:47 bacek joined #perl6
22:47 pmurias i would rather have that seperate from Niecza::Compiler
22:48 sorear Niecza::Simple then maybe
22:49 colomon yeah, jnthn's patch is definitely what is breaking S14-roles/parameterized-type.t.
22:49 pmurias sorear: i think it would be better to port over the new driver
22:50 pmurias as that avoids changing it later and it's split into smaller pieces
22:52 ashleydev left #perl6
22:53 sorear ok.
22:57 bacek_ joined #perl6
22:57 kst`` is now known as kst
23:00 bacek left #perl6
23:00 pmurias sorear: how can i compile the new niecza?
23:01 Fuad joined #perl6
23:03 Fuad hi
23:03 sorear pmurias: it's missing several components, so it can't be compiled as a whole
23:03 sorear pmurias: if you just want to compile one module, it's cd v6; ../niecza_eval -c Op
23:03 bacek_ left #perl6
23:03 sorear (I like -v too but it's not needed)
23:03 dalek rakudo: de98d15 | colomon++ | src/binder/bind. (2 files):
23:03 dalek rakudo: Revert "This implements a very simple saturating cache for nominal types of parameters. Halved the runtime of a simple benchmark that focused on sub calls with typed parameters." Keen patch, but introduced bugs I don't know how to fix.  See S14-roles/parameterized-type.t for example.
23:04 dalek rakudo:
23:04 dalek rakudo: This reverts commit fc3035abb487aa86e35f01632e7ddcfe5ceb38f5.
23:04 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/de98d15140
23:04 sorear Fuad: hi!
23:04 Fuad How are you, sorear ?
23:05 dalek niecza: cc6cc43 | pmurias++ | / (2 files):
23:05 dalek niecza: separate compiler creation into Niecza::Simple
23:05 dalek niecza: review: https://github.com/sorear/niecza/commit/cc6cc43bcc
23:06 sorear Fuad: I never know how to answer that
23:06 kaare_ left #perl6
23:06 sorear pmurias: to compile the setting manually with the old driver, I use ./niecza_eval -v -L NULL -c --setting SAFE
23:14 Fuad left #perl6
23:14 MayDaniel left #perl6
23:14 pmurias it should be a matter of adding the options to niecza (i'll do that after tommorow)
23:15 pmurias g'night
23:15 sorear sleep well
23:15 pmurias thanks
23:15 pmurias left #perl6
23:23 simon__ joined #perl6
23:23 simon__ left #perl6
23:32 ruoso left #perl6
23:33 rindolf left #perl6
23:35 sorear niecza: "foo"\   .say
23:35 p6eval niecza v1-35-gc9d17a7: OUTPUT«foo␤»
23:35 ruoso joined #perl6
23:35 frooh_ left #perl6
23:36 frooh joined #perl6
23:41 MayDaniel joined #perl6
23:41 alester left #perl6
23:42 cdarroch left #perl6
23:48 MayDaniel left #perl6
23:52 bacek joined #perl6

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

Perl 6 | Reference Documentation | Rakudo