»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 25 June 2010.
ingy You guys are all my heroes 00:00
00:00 Patterner left, Psyche^ is now known as Patterner
TimToady even if we look at you funny when you're doing micro-optimizations? 00:01
ingy You are the only group I've found who can spend all day, every day fishing for pies in the skies
You make an acmeist feel right at home
araujo thank you
TimToady we all have our little foibles
jnthn $I0 = is_cclass .CCLASS_ALPHABETIC, tgt, pos 00:02
ingy: It checks a unicode prop.
ingy: So it's that against evaluating a character class.
I suspect that the unicode prop check is quicker.
ingy so it might help the poor poor rakudo
jnthn Aye 00:03
jnthn is currently working out how to help the poor poor Rakudo be less poor
ingy jnthn++
jnthn Grammars are mostly method dispatch, which I hope to speed up a decent bit.
Especially given that grammars are method dispatch mostly on the invocant, which we conveniently know the type of quite well. :-) 00:04
ingy the grammars do seem to be a slow spot
jnthn Or at least, better than we know the type of mos things.
*most
dalek ecza: 5b9ccc6 | sorear++ | Kernel.cs:
First step towards list contexts, add a plural value attribute
ecza: 4b3b15a | sorear++ | (2 files):
Implement list infix precedence
ecza: 84f834d | sorear++ | niecza:
Add ./niecza FILE syntax
ecza: 69af9bf | sorear++ | Niecza/Actions.pm:
Properly parse parcels
ecza: ad39387 | sorear++ | (2 files):
Implement parcel splitting properly for foo(1,2)
ecza: be0da90 | sorear++ | (2 files):
Add a --ast option to the driver
TimToady well, a real LTM might help there
ingy TimToady: are you and pmichaud heading to pdx next week?
TimToady yes, we'll all arrive on Monday
jnthn TimToady: It would, but we still gotta dispatch methods, I guess.
ingy jnthn: are you coming over?
jnthn ingy: 'fraid not. :( 00:06
ingy: It's a long and - in the summer - expensive flight.
ingy I'll prolly drive down from seattle
diakopter wait, I thought the sky was made of pies
ingy diakopter++
jnthn diakopter: hush, don't tell the airlines there's whole pies up there! You saw what they did with little fragments of ash! 00:07
Imagine a jet engine cooking a whole pie!
ingy diakopter: That's the future I want to live in
TimToady as long as they're not frozen
00:07 silug left
jnthn Actually, did the Iceland volcano affect many flights in the US? 00:08
TimToady nope
jnthn I know it was quite the disaster in Europe.
Ah. :-)
TimToady other than 2nd-hand delays
jnthn I actually got stranded in Iceland.
They bussed us to another airport, where the runway was in a valley with mountains at one end, and only just long enough to take the type of plane we were in. 00:09
diakopter you shoulda taken the shortcut tunnel under the Atlantic
jnthn They throttled it pretty hard down the runway and then it was by some margin the steepest ascent I've ever experienced. :-)
diakopter: oh if only! 00:10
diakopter: The one between England and France is very useful.
00:10 takadonet left
TimToady it was the atlantic tunnel that set of the volcano in the first place, though 00:10
jnthn :-) 00:11
00:11 meppl left
TimToady most of the great circle routes go right over (or under) Iceland 00:11
I hear they lost a whole trainload of frozen sushi on that route before they cranked up the AC 00:12
*set off
jnthn That ain't cool.
TimToady it was fish soup for a whole week after that 00:13
jnthn It's all the same to me, given I don't eat fish nor seafood. 00:14
TimToady kitty is reading over my shoulder, and claims to be starving
biab &
jnthn Probably wants a cheezburger
o/
allbery_b obviously kitty wants fish 00:15
00:15 f00li5h left, f00li5h joined 00:17 donaldh joined, donaldh left
jnthn allbery_b: huh? I saw loads of kitteh on the internets and they all eated cheezburger! 00:18
TimToady shh, my kitty *thinks* she's eating fish, but it really is more like canned cheezburger... 00:22
00:25 takadonet joined, ruoso joined
sorear writes up 18 tests for niecza, including one that Rakudo won't pass (even if you change it to standard Perl 6) 00:27
diakopter ++ ++
jnthn sorear: Will be curious to see which one :-) 00:29
dalek ecza: d7f3d96 | sorear++ | (3 files):
Add a test suite & prefix:<!>
sorear jnthn: it's the last one; my $x; BEGIN { $x = 1 }; ok $x, "protolexpad changes affect default values" 00:30
jnthn Ah :|
Yes, you win on that one. For now. :-)
sorear++
dalek ecza: 528927c | sorear++ | (2 files):
Use mono's AOT compiler on Setting.dll, saving ~1.5s on each run
00:41
tylercurtis sorear: does p6eval have niecza yet? 00:42
sorear no 00:51
it's only had enough syntax to run nontrivial programs in the last 24 hours, really
00:53 whiteknight left 00:59 plobsing joined
Tene rakudo: my @odd-sums := (4, map(*+*, (@sums Z 5,7...*))); say @odd-sums[0..5].perl; 01:00
p6eval rakudo 6ab741: OUTPUT«===SORRY!===␤Symbol '@sums' not predeclared in <anonymous> (/tmp/7YmzVnO0Us:20)␤»
Tene rakudo: my @odd-sums := (4, map(*+*, (@odd-sums Z 5,7...*))); say @odd-sums[0..5].perl;
p6eval rakudo 6ab741: OUTPUT«(4, 9, 16, 25, 36, 49)␤»
TimToady how...haskellioid... 01:01
Tene It was a translation of someone else's haskell, yes. 01:02
TimToady I wonder how often people will expect it to work with = instead of :=
Tene I did try it with = first, and wasn't entirely sure why it didn't work. 01:03
TimToady list = is eager
Tene Ah.
01:05 ashleydev left 01:18 takadonet left 01:43 PZt joined 01:44 macdaddy joined, macdaddy is now known as Guest72554
Tene rakudo: grammar Foo { token bar { 'x' } }; my $src = "axa"; my $m = $src ~~ /<Foo::bar>/; say $m.perl; 01:54
p6eval rakudo 6ab741: OUTPUT«===SORRY!===␤regex assertion not terminated by angle bracket at line 20, near "::bar>/; s"␤»
Tene Ah, I see that's mentioned as Pm-2. That doesn't seem to be discussed in S05, afaict, though. 01:55
And, apparently, NYI.
sorear How does Perl 6 tell the difference between control exceptions and regular exceptions? 01:56
Tene sorear: when I last worked on it, rakudo still used the type id.
sorear I should start a SO-xx file 01:57
Tene: no type ids where I'm working now.
Tene sorear: where?
sorear: look at src/builtins/control.pir 01:59
e['type'] = .CONTROL_LOOP_NEXT
Rakudo is using the type id.
sorear Not rakudo. Perl 6. 02:00
Tene Ah.
I misunderstood.
pugssvn r31673 | lwall++ | [STD] first whack at detecting declared-but-unused variables
r31673 | (known to still produce some false positives)
tylercurtis std: sub sieve (*$p, *@xs) { $p, sieve($_ if $_ % $p for @xs); } 02:02
p6eval std 31672: OUTPUT«===SORRY!===␤Unable to parse argument list at /tmp/4w7zkZwXKn line 1:␤------> sub sieve (*$p, *@xs) { $p, sieve⏏($_ if $_ % $p for @xs); }␤Couldn't find final ')'; gave up at /tmp/4w7zkZwXKn line 1:␤------> sub sieve (*$p, *@xs) { $p,
..sieve…
TimToady arglists aren't statements 02:03
std: sub sieve (*$p, *@xs) { $p, sieve ($_ if $_ % $p for @xs); }
p6eval std 31672: OUTPUT«ok 00:01 115m␤»
TimToady std: sub sieve (*$p, *@xs) { $p, sieve(($_ if $_ % $p for @xs)); } 02:04
p6eval std 31672: OUTPUT«ok 00:01 115m␤»
TimToady std: sub sieve (*$p, *@xs) { $p, sieve(do if $_ % $p for @xs); }
p6eval std 31672: OUTPUT«===SORRY!===␤Missing block at /tmp/pPbfTpJz6a line 1:␤------> e (*$p, *@xs) { $p, sieve(do if $_ % $p ⏏for @xs); }␤Parse failed␤FAILED 00:01 115m␤»
TimToady std: sub sieve (*$p, *@xs) { $p, sieve(do $_ if $_ % $p for @xs); }
p6eval std 31672: OUTPUT«ok 00:01 115m␤»
tylercurtis TimToady: thanks.
02:05 silug joined
TimToady basically, we can't unambiguously allow anything looser than , in an arglist 02:05
how would you bind foo(1,2,3 X 4,5,6) if there are positionals? 02:06
jnthn -> sleep 02:07
TimToady o/
02:12 masonkramer joined
sorear TimToady: my $x = 2; END { say $x } # this prints Any(), right? 02:12
pugssvn r31674 | lwall++ | [STD] refrain from complaining about unused implicit cast functions 02:18
02:18 agentzh joined
TimToady well, it would print 2 in Perl 5 :) 02:18
sorear How do Perl 5 protolexes work? 02:19
As I'm seeing it, 2 is assigned to the runtime pad, but END is unclonable and only sees the proto 02:20
TimToady that makes END pretty useless for most of what it's used for in Perl 5 (or awk) 02:21
maybe it's more like a LEAVE block
02:21 Sarten-X joined
TimToady (and INIT should be like ENTER, by the same argument) 02:22
sorear Why does Perl 5 not have the same issue?
02:22 gbacon left
TimToady doesn't create a lexpad for mainline code, just reuses the protopad 02:22
or maybe the other way around :) 02:23
well, I guess one could still use our variables, since they really live in a package, and only have a lexical name 02:24
we can make that restriction if we really need to
otoh if there's some way to clone the mainline at compile time and freezedry it, that would be more like what a P5 programmer would expect 02:25
sorear please elaborate on last statement 02:26
TimToady but that might require more of a workspace-saving view ala Smalltalk that some impls might have difficulty supporting
tylercurtis Why isn't there a FINISH? 02:28
TimToady because no one knows when they're about to draw their last breath
lue wello there o/ 02:29
tylercurtis err... never mind... was confusing INIT and START.
sorear TimToady: I'm not very familiar with smalltalk; what does it mean to clone and freezedry a mainline? 02:31
02:33 skids left
TimToady smalltalk doesn't distinguish compile-time from run-time. it's all run time, and you "compile" by saving a memory image, basically. 02:35
wow, there's a lot of declared-but-unused vars in the test suite :) 02:36
bbl & 02:38
sorear When you get back, would you explain what saving memory images has to do with protopaddy behavior? 02:39
02:42 [Coke] left
sorear odd that 'Mu' is parsed as a functionall 02:47
call
seems like it ought to be a term
02:47 [Coke] joined
sorear std: Mu === Any 02:53
p6eval std 31674: OUTPUT«ok 00:01 112m␤»
sorear std: sub foo() { 42 }; foo == 42
p6eval std 31674: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix == instead at /tmp/RU36A0BcFV line 1:␤------> sub foo() { 42 }; foo ⏏== 42␤Parse failed␤FAILED 00:01 111m␤»
sorear std: sub foo() { 42 }; Mu == 42
p6eval std 31674: OUTPUT«ok 00:01 111m␤»
sorear hmm
std: sub foo() { 42 }; (foo) == 42 02:54
p6eval std 31674: OUTPUT«ok 00:01 112m␤»
02:54 HarryS left 03:03 cotto joined 03:08 ashleydev joined 03:13 masonkramer left
sorear std: 2.HOW(3) 03:14
p6eval std 31674: OUTPUT«ok 00:01 111m␤»
sorear rakudo: 2.HOW(3)
p6eval rakudo 6ab741: OUTPUT«too many positional arguments: 2 passed, 1 expected␤ in main program body at line 20:/tmp/K9EqhU1Y22␤»
03:29 nadim left 03:30 hercynium joined 03:31 nadim joined 03:32 ashleydev left
dalek ecza: 8afac05 | sorear++ | (4 files):
Implement multi-outered classes
03:38
ecza: ece8139 | sorear++ | (2 files):
Fix pre-init blocks in non-void context
ecza: f5fe8a4 | sorear++ | (2 files):
Fix calling functions without arguments
ecza: b1fde30 | sorear++ | Niecza/Actions.pm:
Implement code generation for typename references
ecza: a9d43b1 | sorear++ | (3 files):
Implement .HOW interrogative
03:53 HarryS joined 04:25 cjk101010 left
dalek ecza: d87ab4c | sorear++ | Niecza/Actions.pm:
Fix calling methods with arguments
04:26
ecza: 2d8120f | sorear++ | setting:
Start venturing into augment-land with Mu.Str, Mu.Bool, and Mu.defined
ecza: b876c9a | sorear++ | (2 files):
Actually _use_ MROs
04:33 tedv left
dalek ecza: 3603719 | sorear++ | Makefile:
Improve Makefile granularity
05:14
ecza: a2eefa3 | sorear++ | (4 files):
Remove some very out of date draft code
ecza: c5c98e7 | sorear++ | (2 files):
New operators: eq, ne, ===
ecza: e8e0d79 | sorear++ | test.pl:
A few new stringish tests
ecza: 0072cfd | sorear++ | (6 files):
Implement .WHAT
05:15 hercynium left 05:21 constant left 05:24 constant joined 05:28 hellothere joined
hellothere hello 05:29
moritz_ good morning
tylercurtis hello, there. 05:30
tylercurtis couldn't resist.
05:32 tadzik joined
moritz_ :-) 05:33
05:35 cbk joined
sorear Hello, hellothere! Welcome to #perl6. 05:37
cbk hi
sorear Hello, cbk. Welcome to #perl6.
05:38 ashleydev joined
hellothere I've heard different things about perl 6, regarding how close it is to release. Would I be lambasted for inquiring here? 05:39
btw, I'm new to perl, love 5 so far
sorear It's an early adopters release. 05:40
cbk hellothere, here is some info at this link: rakudo.org/node/73
sorear Perl 6 isn't going to become a solid production tool until it sees serious use
cbk rakudo.org/node/73
hellothere Awesome!
sorear so we're trying to court the people who will use it heavily, but won't die if it breaks on them
hellothere I write only small utilities now. The latest reads in xml clobs from an oracle DB, then parses them and prints out some data from each clob. 05:41
cbk is this the right way to do matching: if ($inputStr ~~ m/:i $searchStr /) 05:42
moritz_ cbk: yes, but now parens required
cbk i need case insensitive
where?
tylercurtis hellothere: Never be afraid to ask a question here. I don't know that #perl6's populace is capable of lambasting.
hellothere isn't case insensitive \i
moritz_ my $searchString = 'bc'; if 'aBcdef' ~~ m/:i $searchString / { say $/ } 05:43
cbk if ($inputStr ~~ m/:i ($searchStr) /) ??
tylercurtis cbk: moritz_ meant to say "no parens required", I think.
moritz_ sorry
sorear m:i/ $searchStr /
moritz_ *no* parens required
hellothere or maybe just i after the //s
moritz_ rakudo: my $searchString = 'bc'; if 'aBcdef' ~~ m/:i $searchString / { say $/ }
p6eval rakudo 6ab741: ( no output )
sorear rakudo: /foo/i 05:44
p6eval rakudo 6ab741: OUTPUT«===SORRY!===␤Unsupported use of /i; in Perl 6 please use :i at line 20, near ""␤»
tylercurtis hellothere: Perl 6 regexes have modifiers on the front or lexically scoped within their bodies.
moritz_ wonders why $/ is empty in this case... somethiing's wrong here
tylercurtis rakudo: say 'aBcdef' ~~ m/:i bc /;
p6eval rakudo 6ab741: OUTPUT«Bc␤» 05:45
sorear moritz_: the 'no output' bug?
hellothere so if you wanted to use s, i, and x options like in the learning perl book, it would be 'blah' ~= /:ixs bc/; ?
moritz_ sorear: no, even locally it produces just a newline
hellothere: /x is default in Perl 6, and /s is gone 05:46
but the correct clustering would be :i:s
hellothere I have much to learn!
sorear also, the match operator is spelled ~~ now
and it applies to much more than regexes 05:47
05:47 ashleydev left
tylercurtis rakudo: say 5 ~~ Int; 05:47
p6eval rakudo 6ab741: OUTPUT«1␤»
moritz_ rakudo: say 5 ~~ 1..10 05:48
p6eval rakudo 6ab741: OUTPUT«1␤»
moritz_ rakudo: say -5 ~~ 1..10
p6eval rakudo 6ab741: OUTPUT«0␤»
hellothere rakudo say "test\n" 05:49
rakudo: say "test\n"
p6eval rakudo 6ab741: OUTPUT«test␤␤»
hellothere cool 05:50
cbk rakudo: my $searchStr = "test"; my $inputStr = "TEST"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";}
p6eval rakudo 6ab741: OUTPUT«Not found!␤»
hellothere thanks again for links and answers. you guys rock.
05:50 hellothere left
cbk rakudo: my $searchStr = "TEST"; my $inputStr = "TEST"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";} 05:51
p6eval rakudo 6ab741: OUTPUT«Search term found in string!␤»
moritz_ submits rakudobug
cbk rakudo: my $searchStr = "TEST"; my $inputStr = "Test"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";}
p6eval rakudo 6ab741: OUTPUT«Not found!␤» 05:52
cbk is that right?
moritz_ it's a bug
which I've just submitted to our bug tracker 05:53
05:53 ashleydev joined
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "Test"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!"; say $/;} else {say "Not found!";} 05:53
p6eval rakudo 6ab741: OUTPUT«Not found!␤»
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "Test"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";}
p6eval rakudo 6ab741: OUTPUT«Not found!␤»
cbk Noooooooo . Why? I have been racking my brain for 2 hours thinking I was doing it wrong!
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "TEST"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";} 05:54
p6eval rakudo 6ab741: OUTPUT«Search term found in string!␤»
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "TEST"; if ($inputStr ~~ m/:i $searchStr /) { say "Search term found in string!"; say $/;} else {say "Not found!";}
p6eval rakudo 6ab741: OUTPUT«Search term found in string!␤TEST␤»
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "Test"; if ($inputStr ~~ m:i/ $searchStr /) { say "Search term found in string!";} else {say "Not found!";} 05:55
p6eval rakudo 6ab741: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 20␤»
tylercurtis rakudo: my $searchStr = "TEST"; my $inputStr = "Test"; if ($inputStr ~~ /:i $searchStr /) { say "Search term found in string!";} else {say "Not found!";}
p6eval rakudo 6ab741: OUTPUT«Not found!␤»
cbk moritz_, Thanks for you help. I was really doubting my perl6 Foo.
05:56 justatheory left
dalek ecza: be5905e | sorear++ | (2 files):
Fix ClassHOW to inherit from Any instead of being an orphan
05:57
ecza: d463990 | sorear++ | (3 files):
Implement self; signatures for methods; some class tests
ecza: b97bc5c | sorear++ | setting:
Use self in the setting
sorear it's scary how much niecza has improved in the last two days
tylercurtis sorear: normally, I'd be opposed to such self-complimenting; but I agree. 05:58
sorear it's not self-complimenting. the elegance of Perl 6 semantics are what's making this possible. 06:00
it seems a lot harder than it really is
tylercurtis sorear++ Surely at least part of it must be you being extremely productive. It's impressive. 06:07
sorear me? productive? in the middle of a heat wave?
tylercurtis Scarily so. 06:10
06:11 uniejo joined
tylercurtis -> bed. 06:11
Good night, #perl6.
06:12 tylercurtis left 06:13 ashleydev left 06:16 baest joined 06:21 cjk101010 joined 06:28 am0c joined
dalek ecza: 3b9d4f5 | sorear++ | (5 files):
Add automatic STD submodule logic

a known working version of the STD subsystem.
06:39
sorear moritz_: I've removed the requirement to edit the Makefile for builds; it should be possible to just git clone & make now 06:40
moritz_: I'd like to know if it works on p6eval
once 'make' finishes, ./niecza -e CODE ; you must be in the checkout root dir 06:41
system interfacing beyond &say is NYI, but DOS is a definite possibility
moritz_ does FILE work instead of -e CODE too?
sorear yes
moritz_ great
sorear use statements are nyi though
moritz_ for DOS we have resource limits
/bin/sh: /home/p6eval/niecza/STD_checkout/viv: No such file or directory 06:42
make: *** [Niecza/Grammar.pmc] Error 127
after running 'make'
s/after/during/
sorear uh
oops.
one sec
fixed 06:43
moritz_ looks better
checkous out STD
erm 06:44
you know what I mean :-)
dalek ecza: a1a17b8 | sorear++ | Makefile:
Fix missing dependency
06:45
sorear yes
it's supposed to check out STD
--gen-parrot style
moritz_ All tests successful 06:57
\o/
$ ./niecza -e 'say 42'
IPC::System::Simple required for Fatalised/autodying system() at ./niecza line 8
sorear \o/
moritz_ sorear: you could declare that dependency somwhere, at your convenience 06:58
sorear done 06:59
06:59 timbunce joined
moritz_ anyway, awesome error message, (Paul Fenwick)++ 06:59
pjf++ even :-) 07:01
07:02 plobsing left
dalek ecza: 6516616 | sorear++ | README:
Add another forgotten dep moritz++
07:03
pugssvn r31675 | moritz++ | [evalbot] experimental niecza target
moritz_ sorear: repeated 'make' doesn't converge on doing nothing 07:04
07:04 p6eval left, p6eval joined
moritz_ niecza: say 42 07:04
p6eval niecza: OUTPUT«Perl v5.10.1 required--this is only v5.10.0, stopped at ./niecza line 4.␤BEGIN failed--compilation aborted at ./niecza line 4.␤»
moritz_ huh.
sorear oops.
moritz_ it uses a different perl 07:05
should be a simple fix though
07:06 p6eval left, p6eval joined
moritz_ I know why I say "experimental" :-) 07:06
pugssvn r31676 | moritz++ | use perl-5.12.1 to run niecza
sorear the only reason I have use 5.010_001 there is because 5.10.1 has autodie
moritz_ niecza: say 42
sorear in core
p6eval niecza: OUTPUT«42␤»
moritz_ it's ok, we have a 5.12 anyway
\o/
sorear \o/
moritz_ niecza: say "we can haz stringz?" 07:07
p6eval niecza: OUTPUT«we can haz stringz?␤»
sorear niecza: my $ct = 20000; my $a = 1; my $b = 1; while $ct-- { my $ab = $a + $b; $a = $b; $b = $ab; }; say "20k fibs" 07:08
p6eval niecza: OUTPUT«20k fibs␤»
sorear (it'll get a lot slower once I implement multi dispatch :/)
cxreg with recent parrot and rakudo, it seems like my zavolaj based Pg has broken :/ donno why
moritz_ niecza: say 9999999 * 9999999 * 9999999
p6eval niecza: OUTPUT«9.9999970000003E+20␤»
sorear right now, all arithmetic is forced to Num
moritz_ :(
(that :( was to Pg being broken) 07:09
cxreg: how did it break?
sorear I do, however, have bigint libraries trivially available on the platform
niecza: say 1.WHAT
dalek ecza: 3a064a4 | sorear++ | (2 files):
all, not test, should be the default make target; remove erroneous use 5.010_001
p6eval niecza: OUTPUT«␤Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object␤ at Niecza.Kernel.UnboxAny (IP6 o) [0x00000] in <filename unknown>:0 ␤ at Setting.Str_13C (Niecza.Frame th) [0x00000] in <filename unknown>:0 ␤ at Niecza.Frame.Continue () […
cxreg PQconnectdb is returning Failure, even though i know the connect info is right
and it worked previously
sorear hmm.
rakudo: say 1.WHAT 07:10
p6eval rakudo 6ab741: OUTPUT«Int()␤»
moritz_ cxreg: does the pg error string contain anything useful?
sorear niecza evaluates 1.WHAT to be the undefined type object of Num
then it tries to stringify as if it were a normal Num, but blows up on $!value 07:11
rakudo: say Int
p6eval rakudo 6ab741: OUTPUT«Int()␤»
sorear rakudo: say Int.Str
p6eval rakudo 6ab741: OUTPUT«Int()␤»
sorear rakudo: say Int.Stringy
p6eval rakudo 6ab741: OUTPUT«Method 'Stringy' not found for invocant of class ''␤ in main program body at line 20:/tmp/MkNhxnCNcZ␤»
moritz_ it doesn't do the distinction yet
sorear I would have thought the correct stringing of Int is undef warning + "0" 07:12
more and more I begin the suspect that the view of type objects as "like normal objects of the type, but with no slots" is wrong 07:13
niecza: say 1.WHAT === Num
p6eval niecza: OUTPUT«Bool::True␤»
moritz_ I think .Str is supposed to return 'Int()', and .Stringy '0' + warning
not sure though
sorear: yes, it would make sense to declare methods only on the type object, or only on instances, without going through :U and :D (which act as constraints on the multi dispatch, which seems to be the wrong level) 07:14
but I don't really have a better idea
cxreg moritz_: i'm not sure how to call PQerrorMessage with a null, and not an OpaquePointer 07:16
something seems screwy, i dont think i should be getting Failure back, even if it returned NULL 07:18
07:19 FardadJalili joined
szabgab moritz_: will there be a hackathon before YAPC::EU ? 07:21
cxreg ok, it's not me 07:25
zavolaj's own examples/postgresqlclient.p6 is doing it too
:(
07:25 FardadJalili left
cxreg i could bisect, but this could take a while 07:26
moritz_ szabgab: yes 07:27
szabgab: on Aug 3rd 07:28
(discussed on [email@hidden.address] btw)
I should blog about it :-)
bbl
szabgab so it would be good if I arrive on the 2nd at night , I can then sleep while you ppl are doing interesting stuff :) 07:40
07:44 eternaleye left
szabgab moritz_: conferences.yapceurope.org/ye2010/w...=Hackatons 07:48
07:55 baest left 07:59 qiuhw joined
sorear moritz_: another aspect is .ACCEPTS 08:01
what is .ACCEPTS on a defined object supposed to do?
sorear returns from walk with understanding of how list context /really/ works
qiuhw Hi, I know a little Ruby, and I'd wish to have a commit bit for tufte, my github account is qiuhw. Thanks. 08:08
08:12 qiuhw left 08:14 eternaleye joined 08:15 sftp left 08:16 xinming left 08:17 qiuhw joined, Mowah joined 08:18 lue left 08:19 thebird joined
sorear qiuhw: tufte? do you have the right channel? 08:20
qiuhw I've read one of Moritz's blog, and it said one can get a commit bit from this channel. 08:22
mathw sorear: that would be a project porting from Ruby to Perl 6
08:30 Exodist left
moritz_ hugme: add qiuhw to tufte 08:33
hugme hugs qiuhw. Welcome to tufte!
moritz_ qiuhw: you now have. Have fun hacking!
mathw Morning moritz_
moritz_ mornin'
qiuhw moritz: Thanks. 08:34
08:34 dakkar joined 08:36 meppl joined 08:40 exodist joined 08:46 tinitus joined 08:49 Ross joined, TiMBuS joined 08:50 dju left, dju joined 08:51 tinitus left
moritz_ rakudo: pir::printerr__vs('OH HAI') 08:51
p6eval rakudo 6ab741: OUTPUT«OH HAI»
08:55 dju left, dju joined
sorear Other than signature binding, when are non-flttening list contexts used? 09:00
moritz_: is niecza on an autoupdater?
moritz_ sorear: not yet 09:01
would once per hour be enough?
sorear well, I'm asking because I'm about to make lots of breaking changes and wanted to know whether to branch first
once per hour would be more than enough, when it starts 09:02
moritz_ sorear: just ping when you want the autoupdater installed
so that you can break stuff now, and later branch :-)
sorear excellent. 09:05
rakudo: my $x = 1, ; say $x.WHAT
p6eval rakudo 6ab741: OUTPUT«Int()␤»
sorear rakudo: say (1, ).WHAT 09:06
p6eval rakudo 6ab741: OUTPUT«Parcel()␤»
moritz_ note that $x only ever sees the 1
sorear rakudo: say (1, ).item.WHAT
p6eval rakudo 6ab741: OUTPUT«Seq()␤»
moritz_ due to the precedence of =
sorear oh
moritz_ rakudo: my $x = (1, ); say $x.WHAT
sorear rakudo: my $x = (1, ) ; say $x.WHAT
p6eval rakudo 6ab741: OUTPUT«Seq()␤»
sorear that makes much more sense
std: my $x = 1,; 09:07
p6eval std 31676: OUTPUT«ok 00:01 115m␤»
sorear std: my $x = 1,2;
tadzik hmm. (1, 2, 3) is the parcel, [1, 2, 3] is an array. How to make a list?
moritz_ but note that rakudo illegally allows
p6eval std 31676: OUTPUT«ok 00:01 112m␤»
moritz_ rakudo: say (1, , 4).perl
p6eval rakudo 6ab741: OUTPUT«(1, 4)␤»
moritz_ tadzik: (1, 2, 3).list. But why would you need one?
sorear tadzik: you don't; lists are a secret implementation type
09:07 eternaleye left
tadzik ah, ok 09:08
moritz_ if you want to type-check for something list-like, use Positional instead
that's the role that List, Array, Capture etc. implement
sorear after: my @x := \(1, 2, :a<b>); what does @x look like? 09:10
moritz_ uhm 09:11
sorear is it the original Capture, or (1, 2).list?
or something entirely different?
moritz_ the capture, I'd think
at least something that you can't change easily (if at all)
sorear after my @x := 1, 2; is @x a Parcel or did it turn into a List? 09:12
moritz_ rakudo: my @x := (1, 2); say @x.WHAT
p6eval rakudo 6ab741: OUTPUT«Parcel()␤»
moritz_ kinda what I expected
rakudo: my $x = 1; my @a := ($x, 2); @a[0] =5; say $x 09:13
p6eval rakudo 6ab741: OUTPUT«5␤»
moritz_ \o/
sorear what I hoped for, too
09:14 xinming joined
sorear finds himself implementing four kinds of variable 09:14
moritz_ is curious. Which kinds? 09:15
sorear the well known $foo and @foo, ¢foo (which does *no* coercion on bound stuff and may or may not be a list; needed for the RHS of &infix:<=>, as well as circularity before .item is available)
and then ... self
I'm calling it a weak scalar variable. It's never a list, but it also doesn't call .item 09:16
it can't call item, because if it did .item itself would have trouble being implemented
moritz_ rakudo solves this problem by doing low-level accesses to self, iiuc 09:18
09:18 ruoso left 09:19 dju left 09:21 Guest72554 left 09:30 baest joined 09:31 Mowah left
sorear Should sub foo { my $x; BEGIN { $x = 2 }; $x } return 2 or Any? 09:35
Currently in niecza that returns 2 09:36
But I'm thinking that maybe it should change to Any, because the current approach requires copying behind the scenes
Which would be very suprising if $x was tied
So I'm thinking that in subs and control blocks, the compiler pad and the runtime pads should maybe be entirely distinct 09:37
moritz_ sorear: S06 or S04 has a very heavy section, conjecturing that BEGIN and END phasers might not be closures 09:38
it's a bit (or way) over my head 09:39
as a user, I'd be happy if it returned 2 though
09:39 drbean left 09:40 IllvilJa left, Mowah joined
sorear the fact that BEGIN can't close is orthogonal to this question, mostly 09:40
sub foo { my $x is NoisyScalar; Nil }; foo; # in niecza's current model, this produces the call sequence New (protopad), New (call), Fetch (proto), Store (call) 09:42
does that suprise you as a user?
09:43 tadzik left
moritz_ waitwaitwait 09:43
if I implement NoisyScalar
I don't expect to get any fetch operation from that code
09:43 tadzik joined
moritz_ fetch is something I'd expect on my $ = $x; 09:44
sorear the fetch occurs because stuff written in a hypothetical BEGIN needs to be propagated into the runtime version
(it could be optimized out if there is obviously no BEGIN)
moritz_ (except that for the initialization, I might get a fetch method call on the NoisyScalar type object; that would be fine) 09:45
sorear in order to support the Any/2 example
rakudo: sub foo(@x?) { say @x.WHAT }; foo
p6eval rakudo 6ab741: OUTPUT«Array()␤»
sorear rakudo: sub foo(@x?) { say +@x }; foo
p6eval rakudo 6ab741: OUTPUT«0␤» 09:46
sorear rakudo: sub foo(@x?) { say @x.WHAT }; foo( (1,2,3) )
p6eval rakudo 6ab741: OUTPUT«Parcel()␤»
moritz_ that binds
sorear yes
moritz_ rakudo: sub foo(@x? is copy) { say @x.WHAT }; foo( (1,2,3) )
sorear mostly wondering what happens if it doesn't bind
p6eval rakudo 6ab741: OUTPUT«Array()␤» 09:47
sorear apparently, it acts like my @x
moritz_ right
sorear which is exactly how the most simple niecza implimentation will do it
moritz_ which actually matches my understanding of the spec
09:48 IllvilJa joined
tadzik rakudo: my @even-numbers = 0, 2 ... *; @even-numbers[5].say # shouldn't it work? 09:48
p6eval rakudo 6ab741: ( no output )
sorear tadzik: no 09:49
tadzik it's used in Perl6 advent calendar
moritz_ I think it should
sorear = is a copying operator
moritz_ and it was working in rakudo at one point
mathw should work by my understanding
moritz_ tadzik: I'm pretty sure it works now with := instead of =
sorear rakudo: my @even-numbers := 0, 2 ... *; @even-numbers[5].say # try not copying an infinite amount of stuff
p6eval rakudo 6ab741: ( no output )
moritz_ rakudo: mY @a = 1..*; say @a[3] 09:50
sorear rakudo: my @even-numbers := (0, 2 ... *); @even-numbers[5].say
p6eval rakudo 6ab741: OUTPUT«===SORRY!===␤Symbol '@a' not predeclared in <anonymous> (/tmp/0wHwZ2ACAY:20)␤»
rakudo 6ab741: OUTPUT«10␤»
moritz_ rakudo: my @a = 1..*; say @a[3]
p6eval rakudo 6ab741: OUTPUT«4␤»
moritz_ sorear: if that works, why shouldn't it work with series?
09:51 qiuhw left
sorear 1 .. * is obviously infinite 09:53
0, 2 ... * is not
09:53 pmurias joined
sorear = copies lists eagerly unless they can be proven infinite 09:53
hello pmurias
sorear out. 09:58
colomon in fact, there are examples all over the web of @a = (something infinite). Also turned up some in the test suite as well. 10:03
moritz_ I think it should rather be: copies lists eagerly, if proven finite 10:04
colomon I think the spec should be modified so that with finite lists, you cannot tell whether it is eager or lazy. 10:08
but I reckon I probably don't understand some complication making that hard to do.
10:09 PZt left 10:10 PZt joined
moritz_ right; waiting for endless copying doesn't make happy users 10:17
moritz_ is a user
10:20 skids joined
pmurias is confused why aptitude wants to remove important packages instead of updating them 10:27
moritz_ pmurias: do you have backports in your package sources?
or something else with different versions than the normal mirror? 10:28
pmurias i updated from debian stable
10:28 rv2733 joined, Ross left
moritz_ maybe they are not important in testing anymore? 10:29
like, renamed?
pmurias moritz_: what aptitude does is "new version with important stuff conflicts with ancient binutils lets, lets remove the important stuff" 10:30
moritz_ pmurias: then aptitute purge binutils might help 10:31
or aptitute install binutils # if you want to upgrade instead
but yes, it's weird
though with a bit of luck, you can ask aptitute for alternative conflict resolutions 10:32
pmurias maybe it considers binutils so crucial that avoids upgrading that at all cost 10:34
moritz_ that would surprise me
10:34 Mowah left
moritz_ it has Priority: optional 10:35
10:39 pmurias left 10:42 clintongormley joined 10:56 unixdaemon joined 11:02 PZt left 11:07 wallberg joined 11:09 dju joined 11:11 agentzh left 11:17 wallberg left, wallberg joined 11:34 envi^home joined
bbkr interesting challenge today. this pick for hashes will be useful for Markov chains. 11:35
moritz_ waits for a submission 11:38
bbkr in fact, I implemented P5 probability-based hash-pick in my diploma: bbkr.org/articles/Generation_of_articles.pdf :) 11:40
moritz_ it seems you did much more than that :-) 11:43
rakudo: say 'a' ~~ / <?> / 12:01
p6eval rakudo 6ab741: OUTPUT«␤»
moritz_ rakudo: say ?('a' ~~ / <?> /)
s1n bbkr: you should have referenced SCIgen
p6eval rakudo 6ab741: OUTPUT«0␤»
12:03 bluescreen joined
s1n bbkr: and the most common use of machine generation is actually for machine translation, which is highly useful 12:03
12:03 bluescreen is now known as Guest58577 12:09 Kodi joined
bbkr s1n: you're right. I knew about SCIgen. but it is considered as a mockery of science, and I had many conservative people at my university, so I just skipped mentioning it :) 12:09
Kodi moritz_: So I'm thinking supernovus may've initially been right in having Date and DateTime inherit from a common class or role. Temporal.pod lists a lot of date-calculation accessors on DateTime, like .weekday-of-month and .truncate(to => 'week'), that logically should be methods on Date too. A common ancestor of both Date and DateTime seems like a good place to put such methods, as well as .year, .month, and .day. Does that sound
reasonable?
moritz_ Kodi: reasonable; but please discuss with masak or mberends first, they are our Temporal gurus :-) 12:10
s1n bbkr: it's not a mockery, it does many many good things with machine generation that are valuable to science
Kodi moritz_: Okay. 12:11
s1n bbkr: it was used to expose bogus conferences, which is good
moritz_ Kodi: once I'd like to stay as-is right now is that Date objects should remain immutable
ie no public setters
Kodi Why have Date immutable and DateTime mutable? 12:12
moritz_ Date immutable because it makes sense :-)
and because I stole the API from Date::Simple in Perl 5
and DateTime stole from Perl 5 DateTime 12:13
and masak++ didn't feel like changing it to immutable objects
Kodi It's true that in the case of DateTime, immutability would make time zones even harder than they are now.
moritz_ the simpler an object is, the easier it is to generate the right one from the start
and Date is much simpler than DateTime 12:14
Kodi Right.
moritz_ wonders if DateTime should simply inherit from Date
Kodi I thought about that, too…
jnthn moritz_: That sounds plausible-ish.
moritz_ is there anything that Date can that wouldn't make sense in DateTime?
Kodi Yeah, .succ, .pred, and +, etc. 12:15
jnthn Ah
Kodi Unless we want to make those use seconds in DateTime.
But with leap seconds, and Instant going by atomic seconds, that would get confusing fast. 12:16
moritz_ right 12:17
jnthn Having .succ increment one unit in the parent and a different one in its subclass feels...horrible. :-)
Kodi Agreed.
moritz_ breaks Liskov and all
jnthn It means something that type-checks as Date doens't mean you can safely ++ it 12:18
moritz_: Right.
moritz_ so, common ancestor or role sounds sane
Kodi Well, while the immutability of Date makes sense on its own, as does the mutability of DateTime, I'm afraid people are going to be really confused by the difference. Maybe it's just a matter of taking pains to point it out in the relevant documentation. 12:20
moritz_ I'm not sure it needs special emphasis
just enough usage examples
Kodi By the way, is there a workaround for the can't-use-Setting-functions-in-a-role issue? 12:21
bbkr rakudo: my %h =(a=>1,b=>2); sub my_pick(%h) {my $t = ([+]%h.values).rand.ceiling; for %h { $t-=$_.value; return $_.key if $t <= 0}}; say my_pick(%h); # simplest hash pick :) 12:22
p6eval rakudo 6ab741: OUTPUT«a␤»
dalek kudo: c8b6cf4 | moritz++ | src/core/Match.pm:
Match.Bool should be True for zero-width matches. moritz--
moritz_ bbkr: yes, but you know why it's not what I want, I assume :-)
bbkr moritz_: sure. it's just proof of concept :) 12:23
12:25 ruoso joined
bbkr for 10K of picks: {"a" => 3274, "b" => 6726} 12:30
12:31 JimmyZ joined 12:33 Kodi left
moritz_ right 12:33
doing m picks on n pairs (with :replace) should be doable in O(m + n * log(m)) 12:34
12:37 Guest58577 left, Guest58577 joined 12:38 sftp joined 12:41 silug left 12:46 tadzik left 12:50 rgrau_ joined
bbkr moritz_: in your "{a => 1, b => 2}.pick(*);" example sum of probabilities is not 1. what behavior is expected in remaining 1/3 of cases? 12:50
pugssvn r31677 | moritz++ | [t/spec] test for inherited .perl method in user-defined classes; unfudge another such test 12:51
moritz_ bbkr: it's an urn model... a => 1, b => 2 corresponds to having two a's and one b in an urn 12:52
bbkr: and you randomly select one, and remove one
rgrau_ bbkr: the sum of the probs is the sum of values
moritz_ oh, maybe I did something wrong with the probabilities 12:53
12:53 KMasani joined 12:54 KMasani left
bbkr i understand urn model. but if I get different urns with probabilities 1/3, 1/6 and 1/6 then there's still 1/3 of cases missing somewhere :) 12:54
moritz_ right 12:55
just a sec...
all of them should be 1/3 12:56
updating... 12:57
bbkr ok. just for clarification - the fact that "b" has bigger value than "a" does NOT increase probability of occurence of <bba> list with "b" at the beginning? 12:59
moritz_ it has 13:00
there are two lists that start with b, both with p = 1/3
so the probability of a 'b' in the first place is 2/3
bbkr ah, yes. but it's natural consequence of multiplying b more times. clear now, thanks. 13:01
moritz_ wonders if { a => 5, b => 2.5}.pick(2) should work 13:02
it probably should
hm
or not
I think .pick(1) should always work, unless all values are 0 13:03
since for picking one item, it doesn't matter if you replace or not
bbkr should it give the same result as { a => 10, b => 5}.pick(2)?
13:03 wallberg left
moritz_ no 13:03
arnsholt Why not? 13:04
moritz_ I think it's sane to require integer values for picking more than one element without replacing
arnsholt: absolut numbers are important for picking without replacing 13:05
bbkr what should {a => 0.1, b => 0.2}.pick(*, :replace) produce? 13:06
moritz_ arnsholt: {a => 10, b => 5}.pick(2) is different from {a => 20, b => 10}.pick(2)
arnsholt Oh
arnsholt goes to read the spec again
moritz_ bbkr: the same as {a => 1, b => 2}.pick(*, replace)
arnsholt: because if you draw a b in the first place, 4/14 != 9/29 13:07
arnsholt Oh, right
I just found that bit in Bag.pick 13:08
13:08 gbacon joined
moritz_ the problems without replacing and having fractionals is: after you pick an A from {A => 0.7, B => 0.3}, you have a negative probability. D'oh. 13:08
arnsholt Indeed 13:09
I suppose fractional probs could be allowed, but only with :replace
moritz_ right
with :replace, or if you only pick one 13:10
(when you pick one, it doesn't matter if you :replace or not)
arnsholt Yeah
moritz_ in the QM sense: it's ok to leave a system with negative probability behind, as long as you never look at it again :-)
arnsholt Yeah, I was thinking of that (sort of) as well 13:11
13:11 Ross joined
arnsholt Except I didn't think of QM =) 13:11
moritz_ comes with the profession, I fear
arnsholt Probably =)
13:14 gbacon left
bbkr {a => 0.1, b => 0.2}.pick(*, :replace) should produce <a a a>, <b b b>, <a b b>, <b a b>, <b b a>, <b a a>, <a b a>, <a a b>, all with 1/8 probabilities? 13:15
moritz_ no 13:16
probability for b is twice as high as for a
so <a a a> has (1/3)**3, <b b b> has (2/3)**3
wait 13:17
with *, :replace you get an infinite list
like <a b b b a b b a a b b b a b ...
with twice as many b as a, on average
rakudo: say <a b b>.pick(*, :replace).[^20] 13:18
p6eval rakudo c8b6cf: OUTPUT«bbbbbabbbaabbababaab␤»
13:21 tadzik joined 13:22 drbean joined 13:23 macdaddy joined, macdaddy is now known as Guest79408
bbkr moritz_: thanks 13:25
colomon ooo, when did [^20] start working?
wolverian what's up with the second . there? 13:27
[Coke] rakudo: say <a b b>.pick(*, :replace)[^20]
p6eval rakudo c8b6cf: OUTPUT«bbbbbbbbbbbabaabbabb␤»
[Coke] ... nothing, apparently. =-) 13:28
moritz_ colomon: shorlty after the last release, iirc
wolverian: it just emphasizes that it's a method call
arnsholt [Coke]: Did you have a list of things you wanted to be implemented in NQP? 13:29
moritz_ LTM! 13:30
JimmyZ rakudo: say ('a'...'z', 'A'...'Z', 0...9).pick(*, :replace)[^32]
p6eval rakudo c8b6cf: OUTPUT«No applicable candidates found to dispatch to for 'infix:<...>'. Available candidates are:␤:(@lhs, @rhs)␤:(Code $lhs, Any $rhs)␤:(@lhs, Any $rhs)␤:(Any $lhs, @rhs)␤:(Any $lhs, Any $rhs)␤␤ in main program body at line 20:/tmp/2P3JTp24F_␤»
arnsholt moritz_: You and me both. But that's a bit above my pay grade I think =)
13:30 tylercurtis joined
moritz_ JimmyZ: putting (...) around each series should help 13:30
JimmyZ rakudo: say ('a'..'z', 'A'..'Z', 0..9).pick(*, :replace)[^32] # this one works :) 13:31
p6eval rakudo c8b6cf: OUTPUT«DvPBu4rxKtIDnmbLf9Nd6Pb04a6Q4Wtt␤»
moritz_ right, that too
JimmyZ I was always confused with .. and ... 13:32
putting (...) around each series should help? I couldn't understand it 13:38
:(
moritz_ ... is the series operator
rakudo: say (('a'...'z'), ('A'...'Z'),( 0...9)).pick(*, :replace)[^32] 13:39
p6eval rakudo c8b6cf: OUTPUT«55743159852663193895978413861289␤»
JimmyZ Is it right? 13:40
moritz_ no, the failure mode should be different 13:41
wolverian looks like a C , operator there
tylercurtis Does Rakudo have $?FILE yet? 13:45
rakudo: say $?FILE;
moritz_ no, but this works as a workaround:
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤Symbol '$?FILE' not predeclared in <anonymous> (/tmp/qXP1atJ3rP:20)␤»
moritz_ rakudo: say callframe().file
p6eval rakudo c8b6cf: OUTPUT«/tmp/Kn7FPyiMO0␤»
moritz_ getinterp++ 13:46
tylercurtis thanks.
13:47 Kodi joined 13:48 JimmyZ left
PerlJam rakudo: say callframe().^methods(:local).join(" ") 13:48
p6eval rakudo c8b6cf: OUTPUT«my callframe file line␤»
PerlJam What's callframe.callframe? The current callframe's caller? 13:50
moritz_ PerlJam: you can go up and down the call chain
see S02 iirc
SEO project of the month: make the google search for "Perl 6 modules" find modules.perl6.org as the first hit 13:57
currently a blog post of mine is the first hit; I'll insert a link to modules.perl6.org there
if know of any sites that link to proto.perl6.org, please change them to modules.perl6.org if you can 13:58
phenny: ask masak to please change the homepage link on github.com/masak/proto to modules.perl6.org
phenny moritz_: I'll pass that on when masak is around.
13:59 baest left 14:00 takadonet joined 14:01 masak joined
masak oh hai, #perl6! 14:01
phenny masak: 13:58Z <moritz_> ask masak to please change the homepage link on github.com/masak/proto to modules.perl6.org
masak moritz_: fixing.
moritz_ oh hai masak. Timing :-)
masak step by step, we're converging on a toolchain. :) 14:02
moritz_ wants modules.perl6.org the number 1 google hit for "perl 6 modules"
masak too
pugssvn r31678 | Kodi++ | [S32/Temporal] DateTime.new(Numeric) -> DateTime.new(Int), since time no longer returns fractional seconds.
moritz_ who owns www.mutteringmadman.com/perl6/links ?
Kodi masak: May I chat with you about Temporal? 14:03
masak Kodi: definitely.
Kodi: I haven't looked at the commit, but might one argue that it'd be better to have a .from-something method rather than .new for Int?
constructors benefit from having more precise names than .new :) 14:04
Kodi Well, the bigger-picture issue now is: I'm thinking supernovus may've initially been right in having Date and DateTime inherit from a common class or role. Temporal.pod lists a lot of date-calculation accessors on DateTime, like .weekday-of-month and .truncate(to => 'week'), that logically should be methods on Date too. A common ancestor of both Date and DateTime seems like a good place to put such methods, as well as .year, .month, and
.day. Does that sound reasonable?
[Coke] arnsholt: my list of thing I want in nqp is on the "things people want in nqp" wiki page on github.
moritz_ www.perlfoundation.org/perl6/index....le_project needs a major overhaul
[Coke] wiki.github.com/perl6/nqp-rx/requests //Coke Wants 14:05
Kodi Although, as moritz_ was saying, truncate shouldn't be accessible through Date because Date is immutable.
masak Kodi: feel free to add the common role back, but please do it as a lexical role in a block, so it's hidden from view.
[Coke] Kodi: can always have .truncate() return a new Date.
Kodi [Coke]: Renamed "truncated", perhaps. 14:06
14:06 sftp left, ashleydev joined
Kodi masak: Wouldn't a publicly acknowledged class make sense? 14:06
No reason to hide it from the user that .weekday-of-month is really the same method in both cases, I think. 14:07
masak Kodi: you mentioned having a common class or role. I think it makes sense to hide that, since what the user wants is always the Date or the DateTime.
bbkr rakudo: say (1, 2, 3).pick(8)
p6eval rakudo c8b6cf: OUTPUT«231␤»
[Coke] arnsholt: ... why, what's up? 14:08
rakudo: say (1, 2, 3).pick(8, :replace)
p6eval rakudo c8b6cf: OUTPUT«23211132␤»
Kodi masak: Certainly it shouldn't be instantiable, which I guess is why I ought to use a role rather than a class.
arnsholt [Coke]: If you could share the list, I might be able to pitch in =)
masak Kodi: roles are instantiable. they auto-pun to classes.
Kodi Oh.
[Coke] arnsholt: did you get the url? 14:09
masak Kodi: but I'm questioning whether it need be *visible*, which is one step further.
moritz_ wiki.github.com/perl6/nqp-rx/requests ?
arnsholt [Coke]: Ah, right. I'm multi-tasking a bit at the moment, so I didn't catch that. Thanks!
[Coke] the second of my two requests is more desirable.
PerlJam masak: if common class/role is useful to other authors of Date-like classes/modules, it should be visible.
[Coke] thanks in advance for any tuits. 14:10
Kodi masak: Well, if it isn't visible, then how should Temporal.pod present the common methods? Something like, in the Date section, "There are also methods blah, blah, blah, which work just as for DateTime."?
PerlJam masak: caveat lector, I haven't a clue what's in this common class/role
masak PerlJam: I've been trying to avoid premature generalization with the Temporal modules.
Kodi: the documentation is completely orthogonal to the code.
jnthn [Coke]: "Ability to override vtables from NQP. (most PIR code in partcl-nqp stems from this restriction.)" - I need to fathom a v-table solution into the meta-model re-working I'll be doing, so can try and cover that one. 14:11
Kodi masak: I know; I'm just thinking that a common ancestor makes sense not just from an implementation perspective but from a specification / documentation perspective. Maybe it's just me.
arnsholt jnthn: Speaking of the new meta-model, might that make NQP's ~~ more useful as well? 14:12
bbkr rakudo: say (1, 2, 3).pick(0.1) # curious...
p6eval rakudo c8b6cf: OUTPUT«2␤»
PerlJam Kodi: so you want to make the common thing visible so that it's documented separately and Date and DateTime reference that documentation?
jnthn arnsholt: In what sense?
arnsholt Currently ~~ only works with classes defined in PIR
masak Kodi: sure, the specification can say "DateTime has methods .a, .b, .c and .d in common with Date, and they work the same way."
jnthn arnsholt: Oh? :S 14:13
Kodi PerlJam: Right. Although the separation may go no further than separate sections of Temporal.pod.
masak Kodi: and for what it's worth, that sounds like what a role is for.
arnsholt Smart-matching against parrot types fails, because they don't have an ACCEPTS method
14:13 tadzik left
jnthn Ah, that. 14:13
masak Kodi: I'm just arguing for not making visible a CommonMethodsForDateAndDateTime role.
jnthn Hmm
arnsholt: I'll see what I can do.
arnsholt: Thanks for another useful data point. :)
arnsholt You're welcome 14:14
masak this mst tweet made me think of Rakudo: twitter.com/shadowcat_mst/status/18484718237 :)
14:14 plobsing joined
Kodi masak: Fair 'nuff; at this point the only difference is whether Temporal.pod uses the name "Calendrical" or just points out that the two classes share some methods. 14:14
jnthn masak: Indeed. :-)
arnsholt I was curious because I was thinking of making the smart-match code more intelligent, but given your upcoming work on the meta-model I figured asking a bit would be prudent 14:15
masak Kodi: to me, names like "Temporal" and "Calendrical" are signs that we're not being down-to-earth enough yet with the Temporal spec. no offense.
jnthn
.oO( Calendiabolical )
14:16
masak the user just wants to know what day of the week it is one month from today.
she doesn't want to learn about the Calendrical role in doing so.
jnthn arnsholt: The problem is that PMCs don't really have the equivalent of "type objects" today
masak when in doubt, simplify!
arnsholt jnthn: Yeah, it's a bit fiddly =/ 14:17
Kodi masak: I see. I admit I'm a little too eager to make things, for lack of a better word, cute.
masak Kodi: I appreciate your work on Temporal. it's good to have someone braining on it.
arnsholt A first approximation might be to make sure the invocant knows how to ACCEPT() before invoking the method, and return false if can't do it
Kodi :) 14:18
arnsholt OTOH, that might cause tests that fail when you don't expect them to
jnthn arnsholt: At the moment, I'm at the point of figuring out what I want a meta-model core for Rakudo to look like. One that factors in gradual typing, representation polymorphism, and so on. After that, it'll be working out how to map that onto Parrot (and probably other backends).
Kodi masak: Implementation-wise, then, how can I make a lexical role that different files (Date.pm and DateTime.pm) can both access? And how can I get around the can't-use-setting-functions-in-a-role thing? 14:19
jnthn And part of mapping it onto Parrot will be "so how do we interact with PMCs and Parrot Objects"
masak rakudo: { my role A {}; class B does A {}; class C does A {} }
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤Lexical 'A' not found␤»
masak :(
Kodi: that would be how. if you leave out the 'my', it'll work. 14:20
jnthn: is that known?
jnthn masak: And ticketed.
masak good.
Kodi Oh, wait, I forgot that all the .pms are actually concatenated together in the build process. I should be fine, then. 14:21
masak Kodi: except that the opening and closing curlies would need to be in the same file. :/ 14:22
Kodi masak: So how do I get around that?
masak Kodi: put things in one file? :)
Kodi So be it. 14:23
masak rakudo: our &_say = &say; role R { method foo() { _say "OH HAI" } }; R.new.foo
PerlJam This is almost a glimpse into the future. People will be asking similar questions of R*
p6eval rakudo c8b6cf: ( no output )
masak locally, "OH HAI"
moritz_ www.perlfoundation.org/perl6/index....le_project # a bit improved 14:24
masak haven't backlogged yet -- have people seen this? blogs.perl.org/users/john_mcnamara/...-logo.html 14:25
I want to sound appreciative, but I'd describe it as Camelia with all the fun sucked out of it... :)
PerlJam heh, I like the comments on that page 14:26
arnsholt I agree it's a bit boring right now, but I think it might have some potential as a stylised logo
tylercurtis Looks more like the logo for Perl 8. 14:28
masak I believe TimToady was one of the first to toy with the 'Perl 666' allusion... :)
in some Apocalypse or other.
PerlJam Those aren't 8s, they are 4 sixes rotated and overlaid upon each other. 14:29
If only there were some color differentiation, we could tell that
masak they're standing (or slanted) infinities. 14:30
arnsholt Two rotated numbers 6 don't really make a number 8 though
14:30 payload joined
PerlJam arnsholt: you have to squitn. 14:30
masak "Perl 6 -- infinitely infinite"
PerlJam er, squint 14:31
arnsholt Heh =)
PerlJam the internet is falling! I get "twitter is over capacity" and my gmail says "this webpage has a redirect loop" 14:33
14:33 aindilis left, uniejo left
masak PerlJam: it must be those 8s :P 14:33
mathw PerlJam: I wouldn't think the first is even remotely unusual or cause for concern...
Twitter is often over capacity 14:34
PerlJam mathw: nah, it was just the juxtaposition in time of those two events
pugssvn r31679 | moritz++ | [docs/feather] link to modules.perl6.org 14:35
PerlJam wonders if pmichaud ever got with merlyn about an interview for FLOSS Weekly.
pugssvn r31680 | Kodi++ | [S32/Temporal] Added to Date: "There are also C<week>, C<week-year>, C<week-number>, C<weekday-of-month>, and C<day-of-year> methods, which work just like their DateTime equivalents."
Kodi That oughta do it.
Now to actually implement all of this. 14:36
moritz_ Kodi++
arnsholt Which synopsis deals with macros? 14:38
masak arnsholt: S06
tylercurtis has an urge to implement Path.
arnsholt Thanks!
14:39 sftp joined
moritz_ btw I've changed the underlying local directory of pugscode.org 14:42
the old one didn't update
masak moritz_++
moritz_ so if you see any feather-hosted pages that are now inaccessible, please tell me
14:43 snarkyboojum joined 14:44 cjk101010 left
alester Gave a talk on Perl 5.10 and 5.12 last night to the Chicago Uniforum group. 14:47
Talked about how a lot of the features in 5.10 are from Perl 6.
There was some dismay that you wouldn't be able to run Perl 5 programs under Perl 6.
masak the idea is that you would.
alester Yes, but I don't see that happening. 14:48
moritz_ I see module loading happening
but syntactic mixing is quite hard, almost impossible if you ask me
alester That's basically what I pointed to.
TimToady I have to finish STD::P5 for that to be feasible
alester I pointed at perl101.org/arrays.html for an example.
14:48 rgrau_ left
snarkyboojum I'm devastated to learn that my filesystem on OS X won't let me have a file and folder with the same name but different case, and as such I can't checkout Niecza properly 14:48
14:49 silug joined
moritz_ some part in me understands these sentiments. Antother part of me says "if they want to run Perl 5 code, they should use perl5" :-) 14:49
snarkyboojum boo HFS+
alester snarkyboojum: HFS+ has always had that annoyance for us. My main work project has a .t file that verifies that no files have the same name /i
masak snarkyboojum: that's why the first thing you do with a new Mac is to reformat the hard drive. :/ 14:50
snarkyboojum masak: :(
alester What fs do you have on your Mac then masak?
masak dunno. some case-sensitive one.
alester So you haven't actually done it.
14:50 tadzik joined
masak yes, that's why it's case sensitive. 14:51
snarkyboojum HFSX it seems supports case sensitivity or something
moritz_ the question is: do the programs still run on a case senstive partition?
snarkyboojum typos :|, but you get the drift
masak what catches a 'return' exception? caller or callee? 14:53
moritz_ callee 14:54
routines catch their own "return" exceptions 14:55
whereas blocks only calls their "leave" exceptions
masak thought so.
moritz_ it wouldn't make sense to lay that burden onto the caller
masak no, it wouldn't.
that occurred to me just the other day. just checking. :)
14:56 rgrau` joined
masak so the actual handing-back of control (and the return value) from callee to caller is not done with exceptions at all, then? 14:56
moritz_ no
14:56 plobsing left
masak because intuitively, that feels like the bit that could be transmitted through a control exception. 14:56
moritz_ note that falling-off-the-end-of-a-routine returns don't need to be handled with exceptions 14:57
masak nod.
snarkyboojum I'm just going to have to look at Niecza, somewhat wistfully, from a distance then 14:58
ho hum
masak so, in short, the routine is notified that a return has taken place in one of the two possible ways, and it makes sure execution finds its way back to caller.
moritz_ though of course you can implement both control flow and exceptions with continuations
masak snarkyboojum: there's always Yapsi :) 14:59
snarkyboojum: have you seen my new runtime?
snarkyboojum masak: Yapsi is beautiful ;)
heh
moritz_ snarkyboojum: or just ping sorear, I'm sure he'll try to fix it for you
snarkyboojum masak: not in any detail re new runtime
masak snarkyboojum: gist.github.com/471521
snarkyboojum masak: noticed a flurry of activity recently though
masak snarkyboojum: there's no code there, just the new SIC syntax, and the output from the new runtime. 15:00
IDSTR I ever pushed the new runtime code. it's not done yet.
snarkyboojum masak: ah ok - I did see your gists and discussion on IRC though :)
tylercurtis masak: with the new SIC syntax, can I count on all lexvar declarations to be at the top of the block?
snarkyboojum masak: will have a better look'see
masak tylercurtis: I actually considered letting them be scattered throughout. but I think I'll end up putting all of them at the top. 15:01
it's not much harder to generate it that way, and it's easier to read. 15:02
15:03 timbunce left
moritz_ rakudo: eval 'say $x'; my $x; INIT { $x = 5} 15:03
p6eval rakudo c8b6cf: OUTPUT«Null PMC access in getprop()␤ in '&infix:<=>' at line 1␤ in main program body at line 20:/tmp/zxlvGhIUTT␤»
moritz_ anyway, that should work
notionally Perl 6 only stores lexikals per block
and only at parse time is it check that variables are actually declared before they are used 15:04
masak I think that's reported.
tylercurtis #ruby isn't very helpful. Is anyone here who knows how to speak Ruby enough to confirm that "#@graph.render(;width => 800, :as => 'JPG', :to => outfile('test_graph.jpg'))" is a comment of if it actually does something?
moritz_: Scruffy's test suite is not very impressive. 15:05
masak tylercurtis: seems to be a comment to me.
moritz_ tylercurtis: yes, ruby uses # for comments
tylercurtis: I know. (And btw we won't implement any targets except SVG for now, because we have no rendering library)
arnsholt tylercurtis: I'm almost entirely certain it's a comment
moritz_ unless we shell out to inkscape...
rakudo: sub f() { eval 'say $x' }; my $x =5; f() 15:06
p6eval rakudo c8b6cf: ( no output )
tylercurtis I just wanted to be sure it wasn't something like Perl 5 $#foo
15:06 ashleydev left
moritz_ prints 5 locally 15:06
that was the example I was after, actually
snarkyboojum masak: how does severally nested block indexed lookups work? [-1, 0], [-2, 0], [-3, 0] etc? 15:07
15:07 kbenson joined
masak snarkyboojum: yes. but the 0 depends on the position of the lexical in that block. 15:07
15:07 sftp left
snarkyboojum masak: yep - assuming first lexical in those examples 15:08
15:08 timbunce joined
masak then, yes. 15:08
snarkyboojum masak: cool
masak when I wrote the regex for that SIC syntax, it became clear that ditching the minus sign would make things simpler. I still like the minus sign there, though.
snarkyboojum masak: looks so much better with the environment header etc 15:09
15:09 rgrau` left
tylercurtis snarkyboojum: with or without the environment header? 15:09
snarkyboojum masak: whoops - that was supposed to be *without* 15:10
:)
tylercurtis: yep - without!
masak snarkyboojum: aye. the environment header was there mainly so that we would be able to support BEGIN etc. but I believe we will be able to do that some other way.
15:11 sftp joined
masak is caught up backlogging 15:11
...and my battery is running out. :)
TimToady you backlogged too hard
masak or too slowly, more like :) 15:12
o/
15:12 masak left
moritz_ logs forward 15:12
bll
15:23 patspam joined, shade_ joined
tylercurtis rakudo: role Foo { }; my Str $r .= new() but Foo; 15:24
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
tylercurtis rakudo: role Foo { }; my Str $r .= new("foo") but Foo;
p6eval rakudo c8b6cf: OUTPUT«Null PMC access in get_repr()␤ in main program body at line 20:/tmp/eMMy8i9HHz␤»
tylercurtis rakudo: role Foo { }; my class Bar { }; my Bar $b .= new but Foo;
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
tylercurtis rakudo: role Foo { }; my class Bar { }; my Bar $b .= new() but Foo; 15:25
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
tylercurtis rakudo: role Foo { }; my class Bar { }; my Bar $b .= new(); $b = $b but Foo;
p6eval rakudo c8b6cf: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
tylercurtis rakudo: role Foo { }; my class Bar { }; my Bar $b .= new; say "new"; $b = $b but Foo; say "but"; 15:26
p6eval rakudo c8b6cf: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
tylercurtis rakudo: role Foo { }; class Bar { }; my Bar $b .= new; say "new"; $b = $b but Foo; say "but";
p6eval rakudo c8b6cf: OUTPUT«new␤»
tylercurtis rakudo: role Foo { }; class Bar { }; my Bar $b .= new() but Foo; say "new"; 15:27
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤ResizablePMCArray: Can't shift from an empty array!␤»
15:28 shade_ left 15:31 Kodi left 15:32 mberends left 15:47 takadonet left, isBEKaml joined
TimToady std: multi foo ($a) | ($b) { $a, $b, $c } 15:56
p6eval std 31680: OUTPUT«===SORRY!===␤Variable $c is not predeclared at /tmp/DaVFqPvklv line 1:␤------> multi foo ($a) | ($b) { $a, $b, $c⏏ }␤Check failed␤FAILED 00:01 116m␤»
TimToady std: multi foo ($a) | ($b) { $a } 15:57
p6eval std 31680: OUTPUT«Potential difficulties:␤ $b is declared but not used at /tmp/eWJjm9BvXI line 1:␤------> multi foo ($a) | (⏏$b) { $a }␤ok 00:01 111m␤»
jnthn Cute
TimToady std: multi foo ($a) | ($b) { $a, $b }
p6eval std 31680: OUTPUT«ok 00:01 113m␤»
moritz_ tylercurtis: note that this probably parses as .= (new() but Foo) and spits out nonesense
the first version, that is 15:58
tylercurtis moritz_: Yeah. That's what I expected.
15:58 snarkyboojum left
cxreg your mom is an infinite iterator 15:59
cxreg hopes mberends comes back today
phenny: tell mberends that zavolaj appears broken :( 16:02
phenny cxreg: I'll pass that on when mberends is around.
16:04 justatheory joined 16:24 timbunce left
jnthn cxreg: that's 'cus she's lazy... 16:26
cxreg: HOw is Zavolaj borken?
jnthn knows a little about Zavolaj too
16:27 Sarten-X left 16:30 timbunce joined, cdarroch joined, cdarroch left, cdarroch joined 16:31 tedv joined 16:37 silug left
isBEKaml rakudo: enum Foo<a b c>; my @a = Foo.words; for @a -> $a { .WHAT.perl.say } 16:38
p6eval rakudo c8b6cf: OUTPUT«Any␤Any␤Any␤Any␤Any␤Any␤»
isBEKaml Any?? :O
rakudo: enum Foo<a b c>; my @a = Foo.kv; for @a -> $a { .WHAT.perl.say }
16:38 timbunce left
p6eval rakudo c8b6cf: OUTPUT«Any␤Any␤Any␤Any␤Any␤Any␤» 16:38
isBEKaml rakudo: enum Foo<a b c>; my @a = Foo.kv; for @a -> $a { .say } 16:40
p6eval rakudo c8b6cf: OUTPUT«Any()␤Any()␤Any()␤Any()␤Any()␤Any()␤»
isBEKaml heh... 16:41
rakudo: enum Foo<a b c>; my @a = Foo.kv; for @a { .say } 16:42
p6eval rakudo c8b6cf: OUTPUT«c␤2␤a␤0␤b␤1␤»
isBEKaml rakudo: enum Foo<a b c>; my @a = Foo.kv; for @a { .WHAT.say }
p6eval rakudo c8b6cf: OUTPUT«Str()␤Int()␤Str()␤Int()␤Str()␤Int()␤»
TimToady std: enum Foo<a b c>; my @a = Foo.words; for @a -> $a { .WHAT.perl.say } 16:43
p6eval std 31680: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/W3QeM4ViAT line 1:␤------> oo<a b c>; my @a = Foo.words; for @a -> ⏏$a { .WHAT.perl.say }␤ok 00:01 117m␤»
TimToady :)
isBEKaml :)
Rakudo should point that one out. TimToady, did you just add it ? 16:44
TimToady yes
isBEKaml great! TimToady++
jnthn "Steal this warning."
TimToady mind you, I should have been doing any/all of several other things instead... 16:45
isBEKaml "Warn this Stealer!" 16:47
cxreg jnthn: my Pg.pm6 stopped working, and i confirmed that the postgresqlclient.p6 included in zavolaj breaks the same way 16:50
jnthn: i forgot that it was your project :)
jnthn cxreg: Stopped working as in...errors? Segfaults? Silent failure?
cxreg the nci calls return Failure 16:51
instead of a valid pointer
jnthn :/
moritz_ maybe missing descalarreffing after the container changes?
moritz_ makes wild guesses
jnthn cxreg: Can look into it later tonight - I suspect it may be to do with the closure fixes recently 16:52
Since the code had a work-around for those.
cxreg ok thanks
TimToady std: sub foo ($x) { :$x } # false positive
p6eval std 31680: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/203DdEdibH line 1:␤------> sub foo (⏏$x) { :$x } # false positive␤ok 00:01 110m␤»
colomon rakudo: say (10 xx *).munch(10).perl
p6eval rakudo c8b6cf: OUTPUT«(10, 10, 10, 10, 10, 10, 10, 10, 10, 10)␤»
colomon rakudo: say $lhs := 10 xx *; say $lhs.munch(10).perl 16:53
TimToady std: :$x # the related false negative
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤Symbol '$lhs' not predeclared in <anonymous> (/tmp/1mFPLAqruA:20)␤»
std 31680: OUTPUT«ok 00:01 107m␤»
colomon rakudo: my $lhs := 10 xx *; say $lhs.munch(10).perl
p6eval rakudo c8b6cf: OUTPUT«(10, 10, 10, 10, 10, 10, 10, 10, 10, 10)␤»
16:53 FardadJalili joined
colomon rakudo: my $lhs := (3, 10) xx *; say $lhs.munch(10).perl 16:54
p6eval rakudo c8b6cf: OUTPUT«((3, 10), (3, 10), (3, 10), (3, 10), (3, 10), (3, 10), (3, 10), (3, 10), (3, 10), (3, 10))␤»
colomon rakudo: my $lhs := ((3, 10) xx *).flat; say $lhs.munch(10).perl
p6eval rakudo c8b6cf: OUTPUT«(3, 10, 3, 10, 3, 10, 3, 10, 3, 10)␤»
17:00 dakkar left 17:05 mberends joined 17:09 thebird left
pugssvn r31681 | lwall++ | [CursorBase.pmc] fake out __WARN__ on Deep recursion 17:10
r31682 | lwall++ | [STD] :$x should .check_variable('$x') 17:11
17:13 envi^home left 17:18 rgrau` joined
moritz_ wow, we have a submission for the Hash.pick challenge 17:27
colomon \o/ 17:28
moritz_ it contains a bit of duplicate code, but it seems to work quite nicely otherwise
17:28 rgrau` left
moritz_ found a small buglet involved zero-valued pairs, but it's an easy fix 17:29
isBEKaml hasn't tried any of the weekly challenges yet.. :/ 17:30
moritz_: the small buglet was smaller than a buglet? :P 17:31
isBEKaml wonders if buglets ever reproduce like piglets... 17:32
mberends please re-spec/move Hash.pick out into a module. It's all very nice and so on. It is far from essential core material. In the perl6 executable it will contribute more to bloat and slowness than it will to a useful Perl 6 implementation. 17:33
phenny mberends: 16:02Z <cxreg> tell mberends that zavolaj appears broken :(
mberends cxreg: will check zavolaj soon, must be afk for about 20 mins :) 17:34
tylercurtis isBEKaml: Do piglets reproduce?
cxreg mberends: cool. jnthn is going to look at it later tonight, he thinks closure changes might have broken it 17:35
isBEKaml tylercurtis: pigs do. piglets are just baby pigs. :D
tylercurtis isBEKaml: exactly my point. :) 17:36
TimToady pigs are just big piglets :)
moritz_ mberends: so far Perl 6 has gone the "fat core" route. I can argue but ways, but I don't want to out-spec things that TimToady++ put in 17:37
TimToady I'd rather have a mechanism for loading the actual code on demand
then we can decide which parts of core are loaded eagerly vs lazily 17:38
or even tweak it with knowledge of history
we could have an 'is bloat' trait ;) 17:39
pugssvn r31683 | colomon++ | [t/spec] Overhaul of the trig tests. generate-tests.pl still desperately needs some refactoring, but the generated 17:40
r31683 | tests are now shorter and more thorough than they were previously.
17:40 justatheory left 17:41 Phar joined 17:42 lue joined
lue wello there o/ 17:43
moritz_ git svn-rebase rebase's the spectests 17:44
colomon: one small suggestions: 1.234354.Num to 1.234354e0, which is also a Num, but easier to coerce at compile time 17:45
+ multi method perl() { 17:46
+ "AngleAndResult.new($.angle_in_degrees, $.result)";
+ }
shouldn't be necessary anymore
colomon ooooooo, Mu.perl is now working?
moritz_ I've patched Mu.perl yesterday to include attributes
17:47 felliott joined
moritz_ not descending-into-parent-classes whoo-hoo-attributes, but the ones that $self.^attributes reports are there 17:47
jnthn rakudo: class Beer { has $!name; }; Beer.new(name => 'Starobrno').perl.say # not seen this yet :-)
p6eval rakudo c8b6cf: OUTPUT«Beer.new(name => "Starobrno")␤»
jnthn \o/
moritz_++
moritz_ it was actually quite simple. jnthn++ did all the hard work with .^attributes, and pmichaud++ with pir:: syntax :-) 17:48
jnthn :-) 17:49
17:49 pmurias joined
pmurias ruoso: hi 17:49
colomon moritz_: as for 1.234e0 versus 1.234.Num, I went with the more paranoid approach rather than trusting the Perl 6 grammar being used to get it right. (since historically almost every perl 6 implementation has gotten the current spec for that wrong in some way....)
moritz_ ok, good point 17:50
pmurias ruoso: is it ok if i remove the locking from smop rather then keeping in a cripled ifdef'ed form
17:51 Sarten-X joined
PerlJam sweet! moritz_++ I was annoyed at the old behavior earlier today and now you've fixed it! 17:52
PerlJam builds a new rakudo
17:52 isBEKaml_ joined
moritz_ bows 17:52
17:53 jaldhar left
lue Oh wait, was the problem seeing a bunch of {…}'s with .perl ? 17:53
moritz_ no
that's still the case for code objects
17:54 Phar left
moritz_ the problem was that class A { ... }; A.new.perl would return 'A.new()', even if class A had attributes 17:54
PerlJam and that's Not Very Helpful
17:54 tylercurtis left
moritz_ right :-) 17:54
17:54 supernovus joined
lue ah. moritz_++ 17:55
17:55 ash_ joined
PerlJam I was trying to figure something out earlier today and kept doing $thingy.perl # crap, that doesn't tell me *anything* when $thingy is an object 17:55
moritz_ the type :-) 17:56
ruoso pmurias, yes... you can remove it...
it won't be in the final version anyway
PerlJam okay ... it didn't tell me anything I didn't already know.
17:57 supernovus left
pmurias ruoso: other thing, do you think my reasoning why the exception test is incorrect is correct? 17:58
17:58 PZt joined 17:59 justatheory joined
ruoso pmurias, hmm... you mean the handled? 17:59
pmurias yes 18:00
isBEKaml_ moritz_: wait, Hash.pick isn't already in rakudo?
moritz_: or is it lacking in a proper implementation?
moritz_ isBEKaml_: no, only List.pick
or maybe Any.pick, so it picks up the hash pairs 18:01
but not weighted as it should
isBEKaml_ moritz_: uhh, I'm seeing it with an hash. or Hash tags along with list.pick ?
sorear good * #perl6
moritz_ rakudo: say {a => 1, b => 5, c => 0}.pick(20, :replace) 18:02
lue hello sorear o/
sorear TimToady: What does saving memory images have to do with pad cloning? I'm confused
p6eval rakudo c8b6cf: OUTPUT«b 5c 0c 0a 1b 5a 1c 0b 5a 1a 1c 0c 0c 0c 0a 1a 1c 0a 1a 1b 5␤»
moritz_ isBEKaml_: it currently acts like %hash.pairs.pick
pmurias sorear: hi
moritz_ isBEKaml_: it is supposed to take the hash values as weights, and pick accordingly 18:03
18:03 hercynium joined
isBEKaml_ moritz_: I see. Hash.keys.pick based on the weighted keys' values. 18:03
PerlJam isBEKaml_: I also have a mildly irrational desire to see pick have the ability to use a user-defined function rather than rand 18:05
isBEKaml_ PerlJam: I wasn't thinking rand. pick of picks! :)
moritz_ PerlJam: don't the weights fill in that gap?
ie if you want a different distribution? 18:06
colomon PerlJam: I don't reckon that's irrational at all.
PerlJam moritz_: thus my irrationality :)
moritz_ in the long run I think we'll have a $*PRNG variable or so that stores a random number generator, which callers can override
colomon +1 18:07
isBEKaml_ +1
pmichaud good morning, #perl6
lue good morn, pmichaud o/
pmichaud moritz_: ping
PerlJam good morning Pm. How's the weather where you are? :)
moritz_ it irks me that both in Perl 5 and C you have a built-in PRNG with hidden state that prevents you having two PRNGs
pmichaud: pong
pmichaud PerlJam: sunny. 80 degF
moritz_: did you happen to notice the scheduled for yapc::eu yet? 18:08
*schedule
moritz_ pmichaud: yes. We can't attend each other's talks, and jnthn and masak are in parallel
pmichaud I'm going to contact the organizers to see about moving my nqp talk.
PerlJam and thus the need for video! :)
jnthn It's kinda odd that so much of the Perl 6 material has been put in parallel.
moritz_ I'm a bit constrained because I have to leave on Friday afternoon
pmichaud and masak++ apparently has to be in two places at once. 18:09
18:09 christine left
moritz_ pmichaud: either they want to force people to attend some Perl 6 talks (by providing only Perl 6 talks at that time), or prevent people from only attending Perl 6 talks. Or both :-) 18:09
or it's just coincidence
18:10 literal joined
isBEKaml_ moritz_: "they" ? I tend to think society isn't as helpful as it should be. ;) 18:10
moritz_ it's time to become serious about masak.clone :-)
isBEKaml_ moritz_: masakkit!
lue moritz_: silly, it's git clone masak 18:11
moritz_ isBEKaml_: did you mean: mmaassaakk?
isBEKaml_ moritz_: erm, rt.perl.org?
and, assign it to masak who will assign it to tardis (so it goes... ;) 18:12
lue
.oO([BUG] Rakudo's masak-cloning is NYI)
pmurias jnthn: one odd things is that masak is doing 2 Perl 6 talks in parallel 18:14
* thing
pmichaud I just notified the yapc::eu organizers about moving my talk, and the masak-parallel universe talks. 18:15
isBEKaml_
.oO(today's fortune says: "Avoid any wine with a childproof cap.")
lue
.oO( I expect nothing less from Europeans :) )
jnthn pmurias: oh!
pmurias: I'm sure it wasn't that way yesterday
18:16 masak joined
masak two places at once? 18:16
lue hai masak o/
isBEKaml_ ohhaimasak!
moritz_ masak: yapc::eu schedule
masak that's like, my maximum.
masak checks
moritz_ masak: it's my supremum :-)
jnthn oh heh
masak :)
jnthn schedule fail!
lue masak: lucky for you, you've built a tardis :) 18:17
masak hey, look at that.
pmichaud I think that if they cannot move my nqp talk, I'm likely to cancel it. I think attending the other perl 6 talks is more important (for me and my audience) than having an nqp talk. :-)
isBEKaml_ two things at once leads to my inflection point. :|
masak they moved my talk.
time to email them, I think.
moritz_ masak: pmichaud++ already did
masak oh, good. 18:18
18:18 sftp left
masak did he also rant about jnthn and me being placed in parallel? 18:18
18:18 sftp joined
pmichaud wouldn't hurt to have a separate email inquiry, in case mine went to the wrong place or otherwise gets lost. 18:18
jnthn *nod*
18:18 literal left, christine joined
masak separately inquires 18:18
I almost feel entitled to send them two emails :P 18:19
moritz_ lol
pmichaud I didn't rant about parallel between masak and jnthn, because I was separately asking for resolution on parallel between me, moritz, and mberends :-)
masak oh wow.
it's a conspiracy!
lue It's an evil plot to decimate all that is the sixth of something!
masak either that, or it's a good sign that they are having difficulty straightening out all the p6 talks.
lue
.oO(Next Time, on.... *The Perl Foundation*)
moritz_ it's O($number_of_talks**2) complexity 18:20
jnthn masak: Maybe if the Perl 6 talks were on a Perl 6 track, rather that spread amongst core and languages, it'd help too. :-)
masak jnthn: you know, I'll write that too :P
18:21 literal joined
moritz_ I mean, I find it very laudable that they don't handle Perl 6 separately 18:21
it means they consider it as much Perl as Perl 5
masak moritz_: or they just don't care.
moritz_: or there are internal disagreements about its status.
moritz_: my talks got sorted under "Programming Languages" 18:22
Juerd Programming languages at a yapc?
masak moritz_: pmichaud++'s got sorted under "Core Perl"
it's the traces of either a madman, a genius, or a committee :P
lue .oO[ gcc -Wno_warnings -j3 -O!fun -o p6talksschedule.o p6talksschedule.c ]
pmichaud at some point I think we have to accept that some day Perl 6 won't need a "Perl 6" track. :-) 18:23
moritz_ masak: well, nqp *is* at the core of a Perl 6 implementation :-)
masak moritz_: and Perl 6 *is* a programming language...
pmichaud In this case I think it best not to assume malice where other explanations suffice. :-)
and scheduling is always a pain no matter how one looks at it 18:24
time to head for breakfast :)
bbiaw
moritz_ yeah, O(n**2) plus an arbitrary number of additional constraints
pugssvn r31684 | lwall++ | [STD] add rudimentary capability of suppressing compiler warnings with #OK text 18:27
masak mail's away. 18:30
isBEKaml_ atleast they cared enough to force ppl to mail them! :) 18:31
(looking at the schedule) nice timing. Perl6 appertizers b4 lunch!
masak interesting Ruby-esque chdir code from @uasi++ on Twitter: gist.github.com/475696 18:32
isBEKaml_: :)
18:32 Ross left
masak isBEKaml_: I don't remember if I wrote it or just thought of leaving it as comments to the organizers: "talk will contain some images of food -- perhaps best to schedule it right before lunch" :) 18:33
isBEKaml_ lol 18:34
masak: they seem to be extraordinarily good at visual extrapolation. Multiply that by a committee! :) 18:35
masak: the tags must have set them off. :) "food idioms metaphor nom patterns perl salivate tour yummy" 18:36
pugssvn r31685 | colomon++ | [t/spec] Remove unneeded .perl method, moritz++.
ruoso pmurias, I think it's worth getting a word from TimToady about it... In my head, setting handled to true is suficcient to stop the exception... 18:37
svn.pugscode.org/pugs/v6/Mildew-Set...xception.t 18:39
pugssvn r31686 | moritz++ | [t/spec] remove two wrong tests for %hash.pick
ruoso that's the link to the code in questio
masak isBEKaml_: thanks to mst, I realized that the tags were there to be overused. :) 18:40
pmurias rakudo: my $a = 2;$a := $a; say $a 18:41
p6eval rakudo c8b6cf: ( no output )
pmurias rakudo: my $a = 2;my $b; $b := $a; say $b
p6eval rakudo c8b6cf: OUTPUT«2␤»
pmurias isn't the first one a bug?
masak looks like. 18:42
unless p6eval is acting up again.
pmurias rakudo: my $a = 2;$a := $a; say $a
p6eval rakudo c8b6cf: ( no output )
moritz_ t segfaults locally
masak submits rakudobug
pmurias it segfaults in mildew too
moritz_ \o/ they agree!
masak what a wonderful coincidence.
isBEKaml_ masak: ah, yes. mst. :) Looking at the delegate list, everyone has a last name except abigail. (old perlmonks' joke, I think) :) 18:43
moritz_ isBEKaml_: or just privacy protection
lue (www.bizjournals.com/dallas/stories/...aily9.html Go Lawsuit! Go Lawsuit!)
18:43 silug joined
isBEKaml_ moritz_: Not that I'm curious. I vaguely remember seeing something like "What in the world is abigail's last name?" as part of a signature on perlmonks. :) 18:44
moritz_ lue: it's a sick world we live in
masak yapsi: my $a = 42; $a := $a; say $a 18:45
p6eval yapsi: OUTPUT«42␤»
masak \o/
isBEKaml_ \o/
moritz_ yaspi++ can do something that neither rakudo nor mildew handle correctly
isBEKaml_ so that leaves niecza. :) 18:46
pmurias perlito?
lue rakudo: my $a = 42; $a := $a; say $a 18:47
p6eval rakudo c8b6cf: ( no output )
moritz_ niezca: my $a = 42; $a := $a; say $a
# hours later...
isBEKaml_ niezca? is that right? # I don't know 18:48
jnthn cz
I guess
moritz_ niecza: my $a = 42; $a := $a; say $a
isBEKaml_ niecza: my $a = 42; $a := $a; say $a
PerlJam it's a czech conspiracy!
p6eval niecza: OUTPUT«42␤»
moritz_ \o/
jnthn \o/
isBEKaml_ \o/
jnthn I shoulda realized when I was less caffinated and was like "lol nice name", but in Slovak (modulo a spelling difference) it's the genitive case of "something" 18:49
18:49 xlat joined
jnthn :-) 18:49
dalek kudo: 32be7fb | (Radu Stoica)++ | src/core/Hash.pm:
Implement Hash.pick
kudo: a8deb9a | moritz++ | src/core/Hash.pm:
fix Hash.pick for 0-values and absence of replacement
kudo: 22f2fc2 | moritz++ | src/core/Hash.pm:
simplify some code in Hash.pick
lue goes to fix := in 楽土
isBEKaml_ btw, what does niecza mean? # me takes a stab at wildly guessing, "no czar" :)
pmurias death to the czar 18:50
masak jnthn: so, "something's"?
jnthn masak: No, more like "of something"
isBEKaml_ so I was nearly right?
jnthn "kus nieca" => a pice of something
:-)
*piece
masak isBEKaml_: it's a contraction of "nemáme čas" 18:51
isBEKaml_: Czech for "we don't have time". 18:52
jnthn: ah.
isBEKaml_ masak: ahh, I see. so that explains sorear++'s furious commits. :)
masak isBEKaml_: heh :)
isBEKaml_: we should rename Yapsi to a contraction of "fast and furious". 18:54
diakopter fasnfris
moritz_ too bad the "glacial" thing is already taken
masak "molasses" is still free. 18:55
isBEKaml_ masak: fast and furious? No hollywood influence, I presume? :) 18:56
lue I'm surprised no-one thought to add Safe.pir to .gitignore :)
masak isBEKaml_: I won't say anything until my lawyer arrives.
isBEKaml_ and, molasses?
masak isBEKaml_: "molasses-ware" is a neologism from viklund's and my YAPC::EU 2008 lightning talk, where we unveil November. :) 18:57
isBEKaml_ masak: you aren't in the interrogation room!
masak isBEKaml_: then quit shining that annoying light in my eyes! 18:58
18:58 ashleydev joined
masak :) 18:58
isBEKaml_ :)
masak I'm troubled by sorear and TimToady's musings about the uselessness of END. 19:02
isBEKaml_ there ends awk implementation in p6. # moritz_ ?
ash_ does rakudo not implement heredoc's yet? 19:03
isBEKaml_ I had wanted to ask something about phasers in general. How does P6 differentiate between compile-time and runtime checking w.r.t. phasers?
As I understand it, phasers are generally seen at runtime. But then, most of perl is seen at runtime, right? 19:04
19:04 perlygatekeeper left
masak isBEKaml_: BEGIN and CHECK are run at compile time. 19:04
19:05 cono left
masak isBEKaml_: they can affect lexpads, but they do it through the so-called 'static lexpads'. 19:05
sometimes also known as 'proto-lexpads'.
they're a bit to lexpads as classes are to objects.
19:06 cono joined 19:07 Ross joined, FardadJalili left
isBEKaml_ I see. I don't seem to remember seeing proto-lexpads anywhere. Source that I can look at? 19:07
(apart from the spec)
PerlJam rakudo: my ($a,$b) = 5,7; 0 < 1 ?? $a !! $b = 42; say $a; say $b;
masak not even the spec, I think.
p6eval rakudo c8b6cf: OUTPUT«42␤7␤»
PerlJam rakudo: my ($a,$b) = 5,7; 0 > 1 ?? $a !! $b = 42; say $a; say $b;
masak it's all just implementor's rumour's right now.
p6eval rakudo c8b6cf: OUTPUT«5␤42␤»
isBEKaml_ I'm really interested in seeing how perl distinguishes between compile and runtime operations.
PerlJam moritz_: you could "simplify" the while $middle < $l loop with a ternary! :) 19:08
masak isBEKaml_: BEGIN and CHECK work by the compiler invoking the runtime for a while.
moritz_ PerlJam: I thought about it... no.
pmurias masak: what are valid uses of END? 19:09
moritz_ ternary as lvalue is just evil
masak pmurias: -n and -p
moritz_ END { say "seems like you have failed $n tests" if $n > 0 }
isBEKaml_ finally blocks? 19:10
masak moritz_++ # good example, with a lexical and all
isBEKaml_ (I have only seen END in awk so far)
19:10 REPLeffect left
pmurias moritz_: that should be done in done_testing 19:11
moritz_ pmurias: done_testing is optional if there's a plan
isBEKaml_ END { close $filehandle if defined($filehandle) } #resources freed. 19:12
pmurias masak: LAST takes care of -n and -p
masak pmurias: you're right. never considered that. 19:13
pmurias: maybe LAST is the new END :)
lue what happens in $a := $a ? Does it do nothing, or does binding still happen?
masak lue: yes.
19:13 Ross left
PerlJam heh 19:13
moritz_ lue: noop
masak it might be a no-op, but it might not always be easy to statically show that it's a no-op. 19:14
jnthn rakudo: my $a = 42; pir::copy__vpp($a, $a); say "lived";
p6eval rakudo c8b6cf: OUTPUT«lived␤»
jnthn rakudo: my $a = 42; pir::copy__vpp($a, $a); say $a; 19:15
pmurias isBEKaml_: you could put that into DESTROYALL
p6eval rakudo c8b6cf: OUTPUT«42␤»
jnthn Hmm. Unobvious segfault is unobvious.
isBEKaml_ pmurias: there's a phaser DESTROYALL??
lue rakudo: multi sub infix:<Ω>(Mu \$a, Mu \$b) { $a == $b ?? "same" !! "not" }; my $a = 2; my $b = 3; say $a Ω $b; say $a Ω $a
isBEKaml_ goes looking at spec.
p6eval rakudo c8b6cf: OUTPUT«not␤same␤»
jnthn isBEKaml_: S12 iirc 19:16
masak we'll never have DESTROY and DESTROYALL if Parrot doesn't offer support for it.
lue I'll just not bind when $a := $a occurs.
masak isBEKaml_: they're submethods, not phasers as such.
lue .oO[ EXTERMINATE { $earth } ] 19:17
isBEKaml_ lue: No!
19:17 uniejo joined
PerlJam lue: just make sure you can also handle my $a = 5; my $b := $a; $a := $b; # or similar binding loops 19:17
isBEKaml_ lue: unless you're Neo. :)
moritz_ isBEKaml_: well, you only have to exchange three characters in 'lue' to get to 'neo 19:18
'
masak moritz_: whoa!
lue there should be tests for those [if they aren't there already]
isBEKaml_ moritz_: not like in HAL. :)
lue I can just see the commit message now...
pmurias isBEKaml_: DESTORYALL is the destructor, instead of closing the resource in the END block you could close it in it's destructor 19:19
isBEKaml_: so it would close itself, like filehandles do 19:20
lue [11:49:48] <dalek> rakudo: fffffff | evil++ | src/core/phasers.pm:
[11:49:48] <dalek> rakudo: Implement EXTERMINATE
masak o.O
19:21 ash_ left
masak lue: you actually had me fooled for a while :) 19:21
lue moral of the story: so, for safety reasons, either never come up with EXTERMINATE, or rename dalek.
19:21 ash_ joined
pmurias jnthn: re segfault in smop's case it's an infinite recurssion on lookup 19:21
19:22 Ross joined
masak rakudo: class Bridge {} 19:22
p6eval rakudo c8b6cf: ( no output )
lue rakudo: my $a = 3; my $b := $a; my $c = 3; say $a == $b; say $a == $c
p6eval rakudo c8b6cf: OUTPUT«1␤1␤»
masak rakudo: class Bridge {}; say "alive"
p6eval rakudo c8b6cf: OUTPUT«alive␤»
isBEKaml_ did someone implement EXTERMINATE? #I see masak trying to set up a bridge.. 19:23
o.O(The spec is rather terse on DESTROY and BUILD) 19:24
pmurias: thanks. I was just surprised to see DESTROY as one of the phasers. :)
lue rakudo: my $a = 3; my $b := $a; my $c = 3; say $a === $b; say $a === $c
p6eval rakudo c8b6cf: OUTPUT«1␤1␤»
masak the spec actually doesn't say anything about *when* DESTROY and DESTROYALL are called, despite there being plenty of details to offer. 19:25
lue I thought the output for that would be «1␤0␤»
masak for example: is there a guarantee that DESTROY is called at the point things go out of scope? (my guess is "no".) 19:26
is there a guarantee that DESTROY is called before something is GC'd? (probably "yes")
moritz_ yes
masak is there a guarantee that DESTROY is called before program exit? (tough one)
moritz_ yes
masak what about if the program gets a sufficiently strong termination signal?
moritz_ then probably not 19:27
isBEKaml_ isn't gc done before exit() (most cases) ? So that's an yes
moritz_ surely not if it gets a SIGKILL
but that's not perls fault
ash_ with a SIGKILL you don't get a warning before your program dies though (right?) 19:29
lue rakudo: my $a = 3; my $b := $a; my $c = 3; say $a =:= $b; say $a =:= $c
p6eval rakudo c8b6cf: OUTPUT«0␤0␤»
lue O.o
masak yapsi: my $a = 3; my $b := $a; my $c = 3; say $a; say $b; say $c 19:30
p6eval yapsi: OUTPUT«3␤3␤3␤» 19:31
ash_ yeah, SIGKILL can't be handled or ignored in normal unix, so if you get a SIGKILL you won't have a chance to do any phasers related to exiting
masak lue: same value, different containers.
pmurias masak: if you receive a sufficiently strong termination signal END won't be called
masak lue: $a and $b should be the same, though.
pmurias: right. but maybe it will if it isn't very strong. that might be a use case somehow. a sort of signal CATCH.
lue that's where the O.o comes in. Apparently, =:= is in cheats/ 19:32
pmurias masak: if it's not very strong DESTORY will be called also
masak lue: you can fix it; I know you can!
masak submits rakudobug
lue ! is not a metaop, is it?
masak lue: it is.
isBEKaml_ masak: that's only when the signal is caught, right? so I guess that's left to the sighandlers.
masak isBEKaml_: yeah. but what's the default behavior? 19:33
lue well then, cheats/ is really being weird (defining both =:= and !=:=)
isBEKaml_ masak: pack up and exit.
19:34 masak left
pugssvn r31687 | pmurias++ | [smop] fix binding a var to itself 19:34
r31687 | [mildew] add a test for that
moritz_ www.ericsink.com/entries/veracity_early.html # wow, this sounds really great 19:35
a decentralized, versioned database is something I've been wanting ever since learning about git (and realized that such a thing could be possible :)
isBEKaml_ moritz_: git isn't decentralized, versioned SCM? 19:36
moritz_ isBEKaml_: it is. But it's not a database 19:37
isBEKaml_ moritz_: I thought it was a typo or maybe he's just using VCS and database interchangeably. (I have seen guys at work do that too. ) 19:38
moritz_ reading the blog post, I'm pretty sure he does mean a database 19:39
19:40 sahadev joined
isBEKaml_ wouldn't know. Only one way to know that, right? (Wait for actual announcement at OSCON :) 19:40
19:41 masak joined
moritz_ "Veracity goes beyond versioning of directories and files to provide management of records and fields, with full support for pushing, pulling and merging database changesets, just like source tree changesets." 19:41
PerlJam I'm reserving judgement until I see it. 19:42
masak as opposed to liking it before you have a reason to? :P
moritz_ reserves judgement until he has used it as long as he used git befor getting excited about it
but I kinda look forward to it
lue rakudo: multi sub infix:<Ω>(Mu \$a, Mu \$b) { $a == $b ?? "same" !! "not" }; my $a = 2; my $b := $a; say $a Ω $b; say $a Ω $a
PerlJam yeah, I don't want to get my hopes up and then be disappointed :)
p6eval rakudo c8b6cf: OUTPUT«same␤same␤»
lue rakudo: multi sub infix:<Ω>(Mu \$a, Mu \$b) { $a == $b ?? "same" !! "not" }; my $a = 2; my $c = 2; say $a Ω $c; 19:43
masak lue: == is numeric comparison.
p6eval rakudo c8b6cf: OUTPUT«same␤»
isBEKaml_ reserves judgment until actually using it long enough to replace git.
PerlJam "better than git" is a high bar to reach 19:44
lue reserves judgment because his daily shipment of JudgeMint™ hasn't arrived yet, and is therefore trying to save what he has
moritz_ rakudo: my ($a, $b); say $a =:= $a, $a =:= $b
isBEKaml_ atleast, that's what he claims it to be, right. So I think it's fully justified.
p6eval rakudo c8b6cf: OUTPUT«10␤»
moritz_ rakudo: sub f($x, $y) { $x =:= $y }; my ($a, $b); say f($a, $a), f($a, $b) 19:45
p6eval rakudo c8b6cf: OUTPUT«00␤»
moritz_ bug`
s/`/?/
19:46 ruoso left
lue rakudo: my $a = 3; my $b := $a; say $a =:= $b 19:46
p6eval rakudo c8b6cf: OUTPUT«0␤»
moritz_ also bug
19:47 skids left
masak adds that one to the ticket 19:47
moritz_ masak++
masak looks like the exact same one, though.
moritz_ if signature binding and := binding are implemented through the same mechanism, yes 19:48
sahadev hello #perl6
masak well, the one with f might be worth adding.
sahadev: hi!
sahadev please take a look at pastie.org/1044533 19:49
lue
.oO(time to go hunt for the right pir opcode!)
sahadev bug?
isBEKaml_ sahadev: enclose it in parens.
for (1.. $n) 19:50
masak what? no.
PerlJam no parens are needed
masak sahadev: likely a strings-and-range bug.
colomon 1 .. +$n
masak or even expected behavior.
sahadev: what colomon said.
colomon right now you're doing 1 .. "10"
which confuses matters.
masak let me take this moment to advocate numification of range arguments, as per my latest p6l email :)
sahadev colomon: ah.
masak TimToady: ^^ 19:51
sahadev masak++
colomon++
masak sahadev: also, 'sub MAIN(Int $n = 5) { ... }
'
moritz_ with a special-case for both-string argument and whatever-arguments
colomon we don't have the edge cases sorted out for this sort of thing yet.
masak moritz_: aye. I mentioned the both-string case, forgot about the whatever case. 19:52
isBEKaml_ :(
colomon rakudo: say ("10", * + 2 ... 20).perl
sahadev masak: i always forget that Perl 6 has MAIN :)
p6eval rakudo c8b6cf: OUTPUT«("10", 12, 14, 16, 18, 20)␤»
colomon rakudo: say ("10", *.succ ... 20).perl
p6eval rakudo c8b6cf: OUTPUT«("10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20")␤»
masak sahadev: "Perl 6: more awesome than you remember" :P
19:52 payload left
moritz_ sahadev: it's occasionally very useful :-) 19:53
colomon rakudo: say ("10", *.succ ... 22).perl
p6eval rakudo c8b6cf: OUTPUT«("10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22")␤»
moritz_ like, when you're too lazy to parse command line arguments yourself :-)
which I am, nearly always
colomon rakudo: say ("10", { $_.succ.succ } ... 22).perl
p6eval rakudo c8b6cf: OUTPUT«("10", "12", "14", "16", "18", "20", "22")␤»
moritz_ rakudo: say ("10", { $_.succ.succ } ... 21).perl
masak even aliens use MAIN nowadays :)
p6eval rakudo c8b6cf: OUTPUT«("10", "12", "14", "16", "18", "20")␤» 19:54
lue rakudo: my $a = 3; say $_
p6eval rakudo c8b6cf: OUTPUT«Any()␤»
colomon rakudo: say ("10", { $_.succ.succ } ... 23).perl
p6eval rakudo c8b6cf: OUTPUT«("10", "12", "14", "16", "18", "20", "22")␤»
moritz_ masak: yeah, when they realized that they need such a mechanism they time-travelled back to have it implemented
19:54 justatheory left
colomon masak: it's not random that I've wandered over to series questions ... $a .. $b iterated is supposed to return $a ... $b 19:54
so automatically casting to Numeric (if one of the arguments is Numeric) could have weird issues. 19:55
PerlJam as long as series are magically aware of string args, having ranges numify its args seems reasonable.
19:56 Kodi joined
colomon rakudo: say 1 ... "10" 19:56
p6eval rakudo c8b6cf: OUTPUT«1␤»
sahadev moritz_: question about perlgeek.de/blog-en/perl-6/contribu...-pick.html 19:58
why is "{a => 1, b => 0.5}.pick(*, :replace)" ok, but fatally not ok without :replace?
moritz_ sahadev: yes
sahadev why? 19:59
moritz_ (though notice that we have a submission already, so yours would only be used if it's vastly better than the current one)
sahadev: because you'd have -0.5 'b' bowls left in your urn
and that's a bit weird, don't you think? 20:00
TimToady phone today?
moritz_ also I'd expect it to return 1.5 list items...
sahadev {a => 1, b => 0.5} should be equivalent to {a => 2, b => 1} in terms of weightage, no? 20:01
lue I wasn't aware there was a src/cheats/match-bool.pm. It's not there, I didn't remove it, and now make refuses to work :( 20:02
Tene sahadev: right, but the issue is, without :replace, how *many* results are returned?
rakudo: say (1..5).pick(*); 20:03
p6eval rakudo c8b6cf: OUTPUT«52143␤»
sahadev Tene: depends on how the weights are treated, absolute vs relative to each other.
pmurias TimToady: have you seen the test we and ruoso are unsure is valid?
sahadev in case of list pick, the issue doesn't arise, since all are equally weighted. 20:04
Tene sahadev: Right, and there are multiple options there.
and they all have unintuitive behavior in some situations.
pmurias TimToady: CATCH {$_.handled=1} #is the exception rethrown?
masak lue: perl Configure.pl
Tene pmurias: by my memory, the exception should be resumed there. 20:05
I wouldn't be surprised if my memory is way off, though. :)
sahadev it seems a bit odd to me that non-integer weights are allowed with :replace, but not otherwise.
PerlJam sahadev: So, if you've only got 2 items and one is 5 times more likely to be picked than the other, perhaps you pick some Mu to fill in the gap?
lue should pay attention to what I git pull from now on :)
masak lue: or just make a small shell script that does all steps of the build process for you automatically. 20:06
Tene sahadev: if you do relative, though, what happens if all weights are multiples of two?
do you only get half as many items?
moritz_ note that { a => 10, b => 5 }.pick(2) and { a => 20, b => 10 }.pick(2) have different probabilities 20:08
Tene sahadev: I could imagine that .pick on hashes might support a :relative argument, though, that might do what you're proposing. 20:09
I wouldn't be too surprised to see a spec change like that.
sahadev Tene: that would make sense. 20:10
s/sense/more sense/ 20:11
20:11 literal left
Tene sahadev: I'd be inclined to post it to the mailing list to see if anyone else can think of any other implications for that behavior, or if there are any alternatives we'd be missing, but it sounds pretty reasonable to me. 20:12
moritz_ :relative doesn't make sense for an action that's not scale invariant
PerlJam perhaps the spec should stop calling the values "weights". 20:14
Tene Maybe 'scale', or 'normalize', or something else would be an appropriate name for that. 20:15
20:15 timbunce joined
sahadev moritz_: can you please explain how { a => 10, b => 5 }.pick(2) and { a => 20, b => 10 }.pick(2) have different probabilities? i get the feeling that i am missing something very basic here. 20:15
moritz_ sahadev: assumiing that a 'b' is picked in the first place, and not replaced...
sahadev: then to probabilites for getting another 'b' are 4/14 in one case, and 9/29 in the other 20:16
rakudo: say 4/14, 9/29
p6eval rakudo c8b6cf: OUTPUT«0.2857142857142860.310344827586207␤»
sahadev moritz_: right.
20:16 literal joined 20:17 clintongormley left 20:18 isBEKaml_ left
PerlJam Tene: I was thinking of :normalize earlier, but then I'd expect it to normalize the values to be between 0 and 1 rather than scale them to all be integer (which is where sahadev seems to be leaning) 20:18
Tene PerlJam: how do you get less than 1 of an item?
20:18 literal left
PerlJam Tene: you don't, the interpretation of the values changes to be probabilities rather than a "bag of marbles" 20:19
Tene PerlJam: Then what do you get when you ask for .pick(*) without :Replace ?
PerlJam a mess :)
moritz_ now you get a friendly error message instead of a mess 20:20
(well, NYI, but pretty easy to do)
20:20 literal joined
moritz_ (yes, I did think about it before I said it should be an error :-) 20:20
Tene I'm not sure that I actually see a use case for :normalize or :scale or whatever there. That hasn't been a very consistent indicator of a lack of usefulness, though.
PerlJam indeed. 20:21
YAGNI! :)
Tene Hence, my proposal that we post to the ML to see if anyone can think of reasonable semantics that would actually be useful.
I've found some of the math discussions on the ML to be very enlightening before. :)
masak .oO( someone should make a Perl 6 implementation called "Yagni" )
Tene masak: I started on that, but decided that I didn't actually need another impl. 20:22
masak Tene: awww.
masak refuses to acknowledge the implied self-reference of the situation
Tene masak: Yeah, autopuns like that don't actually need to be acknowledged. 20:23
jnthn masak: ping 20:24
moritz_ Tene: actually I found math discussion on p6l ending quite scary, and way over my head :-) 20:25
masak jnthn: pong
moritz_ and I'm not generally scared by higher math
masak Tene: in that case, I retract my implied acknowledgement through explicit lack of acknowledgement of your autopun. 20:26
jnthn masak: so pls
masak jnthn: so.
jnthn Let's make it workier on Win32 :-)
masak yay
mostly that consists of going through the individual system calls, and replacing many of them with built-in stuff. 20:27
jnthn masak: Are most of those funneled through sub run-logged?
masak yes.
masak checks if all of them are. 20:28
ISTR there were a few that weren't.
jnthn run-logged "mkdir cache", :step('fetch'), :$project;
lue > my $a = 3; my $b := $a; say $a =:= $b
Too many positional parameters passed; got 2 but expected 1
jnthn So I could replace that with mkdir('cache'); for example
?
Or do I need to do some other loggy thing?
masak jnthn: yes.
no, I say we skip logging on mkdir :)
we might do something intelligent if it fails, though. 20:29
jnthn The next line checks we have a directory there anyway in that case
if "cache" !~~ :d {
die "Cannot proceed, cache inexplicably isn't a directory";
}
lol
:-)
masak oh, good :)
you can never be too careful. 20:30
jnthn aww, it relies on the make program being called "make" too
masak jnthn: we should be able to do detection there somehow.
jnthn aye 20:31
masak not OS detection, but binary detection.
jnthn 1
masak has started writing his "appetizers" talk, and is enjoying himself
jnthn omnomnom 20:32
masak I'm reading through old code in the process. realizing I used the pattern "lexical subs" long before subs were lexical by default. :) 20:33
pugssvn r31688 | moritz++ | [t/spec] some Rakudo unfudges 20:35
masak the YAPC::EU schedule is already fixed. I no longer collide neither with jnthn++ nor with myself. 20:38
moritz_ EONETOOMANYNEGATION 20:39
masak I no longer collide either with jnthn++ or with myself.
jnthn understood it :-)
masak please wrap your excess negations in a bag and leave it at the front desk. thank you.
20:40 Guest58577 left
lue gist.github.com/476031 hrmm 20:40
dalek kudo: 4b3d76b | moritz++ | t/spectest.data:
regress on DateTime.t.

and only clutters up the test summary. Now we should have a PASSing spectest again, at least on sane platforms.
lue masak: in a Bag? Is that not NYI ?
jnthn ooh yay, I collide with no other Perl 6 talks now. :-)
masak lue: nono, 'bag'. it's the native type :P 20:41
Tene But if you two aren't competing anymore, how will we know whose talk wins?
lue rakudo: my bag $ofnegations;
moritz_ jnthn: I don#t think any Perl 6 talks collide now
p6eval rakudo c8b6cf: OUTPUT«===SORRY!===␤Malformed my at line 20, near "bag $ofneg"␤»
jnthn moritz_: Yes, just looked thorugh and concluded the same :-) 20:42
lue Can anyone point out glaring errors here? gist.github.com/476031
Tene my Bag of Negation $bag;
moritz_ there are still hard choices to make, though :-)
Tene or was that: my Bag $bag of Negation; ? I don't recall.
jnthn my Bag of Negation $i-think. 20:43
lue rakudo: my Array of Int @a; @a = 1.2,3.5;
p6eval rakudo c8b6cf: OUTPUT«Method '!select' not found for invocant of class ''␤ in main program body at line 20:/tmp/HHMyPGcZe1␤»
20:43 tadzik left
moritz_ lue: do you get the same error if you leave out the 'say'? 20:43
Tene Yeah, Container of Containee
lue > my $a = 3; my $b := $a; $a =:= $b 20:44
0
no, just a different one :)
moritz_ what about say($a =:= $b) # with parenthesis? 20:45
I'd expect 0\n again
lue you expected correctly
> my $a = 3; my $b := $a; pir::issame_IPP($a, $b) 20:48
error:imcc:syntax error, unexpected PREG, expecting '(' ('$P95')
in file 'EVAL_3' line 72
syntax error ... somewhere
masak "moritz_: a very reliable Perl 6 implementation"
20:49 Mowah joined
lue maybe it's a problem with pir::issame? 20:50
masak lue: comment it out and see if that changes things.
lue comment what out?
20:51 grussell joined
masak lue: pir::issame_IPP($a, $b) 20:51
lue > my $a = 3; my $b := $a; #pir::issame_IPP($a, $b)
Any()
masak there you go, then.
20:51 ejs joined 20:52 Guest58577 joined, grussell left
lue I'm amazed it doesn't err like that inside the =:= sub 20:52
lue --nom &
jnthn What is pir::issame being used for? 20:53
masak checking for =:= equivalence, I'd guess.
jnthn That sounds wrong.
=:= means "references the same thingy" right? 20:54
masak aye.
I see it as meaning "someone did := on these things"
either that, or it was the same from the start :)
jnthn pretty sure the issame op is not what is wanted then 20:55
masak adds that to the ticket 20:56
20:56 uniejo left, whiteknight joined
jnthn masak: woo, I eliminated teh readed find 20:56
*dreaded
masak jnthn: yay! how?
jnthn masak: By writing a find-files sub using dir :-) 20:57
(the Perl 6 built-in dir)
masak nice.
jnthn: closure parameter?
jnthn No
masak hm, maybe no need.
jnthn my @module-files = find-files("$target-dir/lib", /\.pm6?$/);
masak it just needs to find and list the files. 20:58
moritz_ rakudo: say dir('/').Str
jnthn masak: It just takes a second argument and smart-matches the file name against it :-)
p6eval rakudo 22f2fc: OUTPUT«. .. emul var usr bin boot dev etc home lib mnt proc root sbin tmp sys lib64 selinux srv opt media lib32␤»
masak jnthn: nice. I like.
moritz_ jnthn: but it doesn't recurse like find, does it?
jnthn moritz_: dir doesn't. find-files does.
Otherwise we'll not find stuffs. 20:59
moritz_ maybe add :recursive to dir()
jnthn moritz_: moze byt :-)
masak: Was the find returning stuff without the stuff before lib/, if you remember?
masak jnthn: yes, I think it was. 21:00
jnthn: but I also remember considering whether it shouldn't.
jnthn: go with whatever works.
jnthn masak: Yes, working is my main goal :-) 21:01
masak :P 21:02
jnthn whee, we generate a Makefile now. 21:03
blech
Two problems.
1) the make vs nmake thing 21:04
masak aye.
jnthn 2) The makefile is busted for nmake anyway
makefile(7) : fatal error U1000: syntax error : ')' missing in macro invocation
Stop.
masak sucks, but no showstopper. 21:05
jnthn masak: pushed the two changes so far 21:06
Hope they don't break it elsewhere.
21:07 sahadev left
jnthn My poor hands need a liten paus now. bbiab. :-) 21:07
masak jnthn: I'll try it right now.
jnthn PIRS=$(patsubst %.pm6,%.pir,$(SOURCES:.pm=.pir)) # that line is NO WEI going to work in nmake 21:08
jnthn really afk
21:09 Mowah left 21:13 rgrau` joined 21:17 Guest58577 left
pugssvn r31689 | Kodi++ | [S32/Temporal] Permit days-in-month and is-leap-year on DateTimes, too. 21:18
sjohnson rakudo: say "hi there!".rot13 21:32
p6eval rakudo 22f2fc: OUTPUT«Method 'rot13' not found for invocant of class 'Str'␤ in main program body at line 20:/tmp/Tat_Z5RlMp␤»
21:33 justatheory joined
masak rakudo: my $rot13 = method { self.trans( "a..zA..Z" => "n..za..mN..ZA..M" ) }; say "hi there!".$rot13 21:34
p6eval rakudo 22f2fc: OUTPUT«uv gurer!␤»
jnthn masak: back 21:35
21:35 timbunce left 21:36 tylercurtis joined
Kodi masak: Do you think .day-of-month (a synonym of .day) should stay? It seems kind of pointless. 21:37
masak Kodi: yes, I like the long form. it constrasts well with .day-of-week. 21:38
Kodi That is true.
21:38 snarkyboojum joined
Tene I'm very skeptical of having synonyms. 21:39
That just seems like asking for trouble to me.
sjohnson masak.. u so silly
Tene I haven't heard any reasonable justification of it at all.
sjohnson your perl 6 knowledge is impressive !
starting to think there isn't much that p6 cannot do 21:40
21:40 am0c left
masak sjohnson: thanks. been doing this for six years now... getting familiar-ish with the system. :P 21:40
21:41 timbunce joined
sjohnson masak: are you interested in cryptography at all? 21:41
sorear masak: what I'm planning to do is to not keep separate lexpads for mainline-y stuff 21:42
masak sjohnson: as in "do rot13 twice, that should be secure enough?" :)
sorear END will work intuitively as long as you use it in the mainline or a module/class body
subs and control structures? no
masak sorear: the idea being that the mainline never gets cloned? yeah, could work.
sjohnson masak: :) 21:43
cryptography is my new obsession. though i dont know much about it
masak sjohnson: www.simonsingh.net/The_Code_Book.html 21:44
sjohnson good read?
masak sjohnson: aye. do try to get it. 21:45
sjohnson will do
jnthn read that many years ago
masak: OK, so now I can detect nmake and use it 21:47
masak: So at this point, we're looking good up to the generated Makefile.
sjohnson jnthn: did you like it too? :)
jnthn masak: Sadly, the generated Makefile is a huge pile of portability fail.
sjohnson: I seem to recall I did. It was a while back. :-) 21:48
masak jnthn: you're on your own trying to make the Makefile work. after that, I'm open to generating a different Makefile for Windows.
jnthn masak: I'm hardly a Makefile guru. :-( 21:49
Wish we just ran commands rather than wrote a Makefile.
masak: What's the -p in mkdir -p?
masak jnthn: it's "don't ask, don't tell" :) 21:50
PerlJam jnthn: makes all the components of a path if they don't already exist
jnthn masak: On windows it makes a directory called -p :P
As well as the one that follows it.
rakudo: say %*VM<config> 21:51
p6eval rakudo 22f2fc: OUTPUT«Any()␤» 21:52
jnthn rakudo: say $*VM<config>
p6eval rakudo 22f2fc: OUTPUT«ptrcast long␤HASATTRIBUTE_UNUSED 1␤libparrot_shared libparrot.so.2.5.0␤inst_libparrot_linkflags -L/home/p6eval//p1/lib -lparrot␤parrot_is_shared 1␤ar_out ␤sbindir /home/p6eval//p1/sbin␤HASATTRIBUTE_PURE 1␤cc_debug -g␤opcode_t
..long␤revision 48074␤link_dynamic -Wl,-E␤HAS_EXTRA_NCI_TH…
jnthn aha
rakudo: say $*VM<config><mkdir>
p6eval rakudo 22f2fc: OUTPUT«Any()␤»
jnthn rakudo: say $*VM<config><mkpath> 21:53
p6eval rakudo 22f2fc: OUTPUT«$(PERL) -MExtUtils::Command -e mkpath␤»
jnthn hmmhmm
rakudo: say $*VM<config><rm_f>
p6eval rakudo 22f2fc: OUTPUT«$(PERL) -MExtUtils::Command -e rm_f␤»
jnthn
.oO( how to make pls Rakudo-dependent and Perl 5 dependent all in one go! :/ )
21:54
masak: I'll take the Makefile challenge on another day, or maybe somebody beats me to it. 21:56
masak jnthn: nod.
jnthn masak: It's like, an enormous yak.
21:56 meppl left
jnthn masak: I am *seriously* tempted to toss this makefile generation code. 21:57
masak: And if there's no makefile, just run a bunch of commands with "run" 21:58
That'd do what this Makefile tries to do.
sorear sjohnson: here, catch: www.muppetlabs.com/~breadbox/txt/rsa.html
masak jnthn: that might be a good idea not just for Windows.
jnthn masak: Aye.
masak: Are you opposed to doing that?
masak: Portable makefile generation is a nuisance. We do it for Rakudo by relying on a bunch of analysis Parrot has done in order to generate its one. 21:59
Then there are certainly rules to play by (e.g. "don't use X construct, it won't work portably")
masak jnthn: no, not opposed. it's all about tradeoffs, and only you can gauge this one.
jnthn masak: Makefiles are great when you're regularly building stuff that has dependencies. 22:00
masak: But in this case we're building the thing once.
Then testing, then installing.
iiuc.
masak jnthn: yeah, but the modules have dependencies.
jnthn: that's the original feature of ufo.
jnthn masak: Oh, it looks at the use statements? 22:01
masak jnthn: yes!
jnthn @order contains the reuslt of that though?
masak looks at use statements, does a topological sort, builds the Makefile correspondingly.
jnthn :-)
Nice!
masak :) 22:02
jnthn masak: I won't go one way or another now, will think on it a bit, and @other who backlog can feed in their thoughts too.
I'm not a good toolchain hacker, I'm just doing this because Windows support matters. :-)
masak moritz_ might have a comment or two. he has been involved in ufo hacking.
jnthn *nod* 22:03
masak: Anyway, it's further along than it ways. :_)
*:-)
*was
masak aye. jnthn++
sjohnson thanks sorear 22:09
22:09 xlat left
sjohnson catches RSA explanation documents 22:10
22:11 Ross left
sorear perl6: sub foo(@x) { @x.push(1); }; my @y; foo(@y); say @y; 22:13
p6eval pugs, rakudo 22f2fc: OUTPUT«1␤»
sorear note that @x is bound to a ro container 22:14
dalek kudo: c3f5599 | jonathan++ | src/builtins/Routine.pir:
Start to unbreak .wrap and .unwrap. Certainly doesn't run all the tests yet, but
22:15 sorear sets mode: +ooov tylercurtis whiteknight pmurias p6eval, sorear sets mode: +o masak
masak sorear: I don't recall offhand whether the ro goes one level down or not, but I have a feeling it does, and the .push shouldn't fly. 22:16
rakudo: say "hi there!".$_ given method { self.trans( "a..zA..Z" => "n..za..mN..ZA..M" ) } 22:17
p6eval rakudo 22f2fc: OUTPUT«uv gurer!␤»
sorear as I am currently understanding this, you can easily strip any list of its ro bit
my $x = @x; my @y := $x
masak rakudo: say "hi there!".$_ given method($_) { .trans: "a..zA..Z" => "n..za..mN..ZA..M" } 22:18
p6eval rakudo 22f2fc: OUTPUT«===SORRY!===␤Confused at line 20, near "say \"hi th"␤»
sorear perhaps binding a @-variable to a $-term should always produce a ro variable
masak was it something I said? :)
sorear: no, I hardly think so.
sorear on the other hand, after my $x = @x; $x.push
normally ro-bits are extrinsic to the containers 22:19
but in my $x = @x, only a simple value moves
like how in sub foo ($x) { $x.push(1) } my @y foo @y 22:20
masak rakudo: say "hi there!".$_ given method($_) { .trans("a..zA..Z" => "n..za..mN..ZA..M") }
p6eval rakudo 22f2fc: OUTPUT«===SORRY!===␤Confused at line 20, near "say \"hi th"␤»
sorear @y is just an object
ro object references do not mean ro objects
masak rakudo: say "hi there!".$_ given method ($_) { .trans("a..zA..Z" => "n..za..mN..ZA..M") }
p6eval rakudo 22f2fc: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in <anon> at line 20:/tmp/LzZeD0Up_t␤ in main program body at line 20:/tmp/LzZeD0Up_t␤»
masak rakudo: say "hi there!".$_ given method ($_:) { .trans("a..zA..Z" => "n..za..mN..ZA..M") }
p6eval rakudo 22f2fc: OUTPUT«uv gurer!␤»
masak nice.
22:20 Kodi left
masak rakudo: say "hi there!".$_ given method ($_:) { .trans: "a..zA..Z" => "n..za..mN..ZA..M" } 22:21
p6eval rakudo 22f2fc: OUTPUT«uv gurer!␤»
arnsholt Is there anyone besides pmichaud that reviews patches for nqp-rx? 22:24
[Coke] yes. 22:37
he's the main guy.
but a bunch of people have commit on nqp-rx and could get stuff applied.
22:38 timbunce left
arnsholt Right. Could you take a look at my stuff for example? 22:39
masak phenny: tell jnthn &mkdir seems to create the cache/ dir without any permissions whatsoever here. so the fetch fails in proof-of-concept because git doesn't have enough permission.
phenny masak: I'll pass that on when jnthn is around.
masak 'night
22:39 masak left
arnsholt I figured it might be good to get someone to take a look at my code before I do more NQP hacking 22:39
[Coke] arnsholt: wherzit? 22:40
arnsholt github.com/perl6/nqp-rx/tree/given-when
22:41 ejs left
sorear pm is in charge of all designy stuff though. 22:41
arnsholt Right. I'll hold off until he's back from holidays then 22:42
sorear decides that my $x := $y doesn't need to call .item, ditto my @x := @y and .list 22:45
cognominal std: my $a=1..10; say @$a
p6eval std 31689: OUTPUT«ok 00:01 114m␤»
cognominal rakudo: my $a=1..10; say @$a
p6eval rakudo 22f2fc: OUTPUT«===SORRY!===␤Confused at line 20, near "say @$a"␤» 22:46
tylercurtis rakudo: my $a =1..10; say @($a));
p6eval rakudo 22f2fc: OUTPUT«===SORRY!===␤Confused at line 20, near ");"␤»
cognominal rakudo: my $a=1..10; say @($a)
p6eval rakudo 22f2fc: OUTPUT«12345678910␤»
[Coke] arnsholt: that certainly looks spiffy to me. 22:48
22:48 patspam left
tylercurtis arnsholt: NQP has &plan/&ok. 22:50
arnsholt: although looking at the test in more depth, some of that does look a little harder to do with &ok. 22:52
cognominal rakudo: sub a(Range $r? where {$r.min >= 0} ) {}; a() 22:53
p6eval rakudo c3f559: ( no output ) 22:54
[Coke] can someone explain why at github.com/partcl/partcl-nqp/blob/m...in.pm#L429 , it's pushing onto $block[0] ? what's the significance of the first element there? 22:55
22:55 zachy left, zachy joined
tylercurtis arnsholt: github.com/perl6/nqp-rx/blob/given-...when.t#L46 you set $_ to Foo.new way back on line 14. That should work properly, but it would be easier to read the tests if you set $_ = Foo.new again before that test. 22:55
rakudo: given 4 -> $x { say '$_ is ' ~ $_; say '$x is ' ~ $x; } 22:57
p6eval rakudo c3f559: OUTPUT«$_ is Any()␤$x is 4␤»
arnsholt tylercurtis: Good point about the $_ 23:00
And thanks for telling me about plan and ok. I pretty much copied the tests from how it was done in another test file (if.t I think)
tylercurtis arnsholt: welcome. I think the reason the first 11 tests don't use them is that subs aren't tested until t/11-sub.t 23:03
23:03 rv2733 left
arnsholt Heh. That makes sense =) 23:04
But if you guys think it looks good I think I'll start looking into sub modifiers 23:05
Making them hardcoded traits should make it pretty simple to implement and give full access to PIR's various flags 23:06
(:vtable probably being the most wanted one)
tylercurtis arnsholt++
arnsholt Three of them, in fact. I'm flattered =) 23:07
tylercurtis arnsholt: vtable overrides in NQP without the ugliness of doing things like this? github.com/ekiru/tree-optimization/...ch.nqp#L56 Yes, please. 23:08
23:08 hercynium left
arnsholt Yeah, it's an itch that needs scratching I think 23:14
23:14 Sanitoeter left
arnsholt At least for me 23:14
cognominal I see I am not the only one have problems pattern matching tree :) 23:28
23:28 pmurias left
cognominal even if mine are at the rakudo MMD level. 23:28
pugssvn r31690 | lwall++ | [S04] revise catcher semantics semantics to allow $!.handled = 1 to work as well as case match 23:32
cognominal rakudo: sub a(Range $r? where {$r.min >= 0} ) {}; CATCH { a() }; say $!.handled 23:38
p6eval rakudo c3f559: ( no output ) 23:39
cognominal how come it does not behave like the perl6 shell?
tylercurtis rakudo: die "foo"; 23:47
p6eval rakudo c3f559: OUTPUT«foo␤ in main program body at line 20:/tmp/sqAld0EMeO␤»
sorear TimToady: In sub foo() is rw { state @x }; foo() = (1, 2) # Is this an item assignment or a list assignment? Does it assign one value or two, if list? 23:52
pugssvn r31691 | lwall++ | [S04] more bombastic utterances about not dropping pending exceptions 23:53
TimToady syntactically, it's parsed as a list assignment for anything that isn't explicitly a $ at the level of the assignment, so you can always just say foo() = 1,2 23:54
it's up to @x to decide what to do with the list
I'd think it should end up [1,2] 23:55
I mean, @x should end up with two elems
23:56 Psyche^ joined, justatheory left
sorear What happened to sigil:sym<¢>? 23:57
TimToady went away a long time ago in favor of |$c and/or \$c 23:58
23:59 Patterner left, Psyche^ is now known as Patterner