»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by diakopter on 25 January 2010.
dalek kudo/master: 6884da0 | jonathan++ | src/core/ (2 files):
Bring loads of methods for EnumMap (previously Mapping) and Hash back. Rewrite those that used to be in PIR into Perl 6. Some that don't do mutations but were only in Hash are now in both; I see no good reason for them not to also be in EnumMap.
00:01
kudo/master: 7452234 | jonathan++ | t/spectest.data:
We pass S03-smartmatch/scalar-hash.t again.
kudo/master: 3b44842 | jonathan++ | (3 files):
Move Regex.ACCEPTS to core.
00:03 nihiliad left 00:09 lue joined
lue hello! (hello... hello....) 00:11
phenny lue: 23 Feb 12:17Z <colomon> tell lue Looks like you did a nice job on minmax.t. lue++
bkeeler heya 00:12
lue aw, thank you phenny ---- I MEAN colomon 00:13
bkeeler % ./perl6 -e 'grammar Foo { token TOP { 'bar'+ }; }; Foo.parse("barbar") && say("Yay, grammars work!");' 00:18
quester is trying to grok how sort is deciding on the arity of the by parameter...
rakudo: { $^a.Str }.arity.say; <25 3>.sort( { $^a.Str } ).perl.say; 00:19
p6eval rakudo 9b33a8: OUTPUT«1␤Too many positional parameters passed; got 2 but expected 1␤current instr.: '_block65' pc -1 ((unknown file):-1)␤»
bkeeler Yay, grammars work!
Now lets see how many grammar tests I can make it pass...
00:20 meppl left
lue Is grok supposed to be a word like hoopy or frood? 00:20
jnthn quester: I thought it was calling .arity. :-/
bkeeler it means 'understand compmletely'
jnthn pmichaud: When around, see ^^ sort fail
bkeeler From Heinlein, Stranger in a strange land
lue Froody. 00:21
quester jnthn: Yes. Well, actually (&by.?arity // 2). There was some discussion of that eariler today. It looks like it should work, but it doesn't. Or my perl6-fu is deficient.... 00:22
lue: What bkeeler said. In context, "I'm trying to wrap my mind around..." 00:23
lue That's what it seemed like, just making sure. (use words like "frood" and "hoopy" too!) 00:24
bkeeler knows where his towel is 00:26
lue I know as well. It's around my neck :)
bkeeler Is it permissible to define a named regex/rule/token outside of a class or grammar? 00:27
00:28 colomon joined
lue thank you colomon! 00:28
colomon you're welcome. 00:29
I think you might be right about the isnt tests, too, though I didn't check them all.
lue yeah, the isnt's for min were basically the is's for max (and vice versa) 00:30
colomon That seems very unnecessary. 00:31
lue maybe in a time far away, someone messed up, and a thoughtful coder put that in in case it ever happens again. The End.
jnthn Programmers mess up? nah, never happens. :-) 00:33
lue Just "extra features", right? :) 00:34
colomon It does kind of make me wonder how they messed up, that it made since to test that a == 3 and a != 10 in back-to-back tests... :) 00:35
lue Let's go remove it! (I'm assuming isnt's aren't part of the planned test count) 00:36
colomon They are, but we can make up the count by actually testing that the "3 min 5" form works.
hmmm.... 00:37
rakudo: say 3 min "a"
p6eval rakudo 9b33a8: OUTPUT«3␤»
colomon rakudo: say 3 min 20
p6eval rakudo 9b33a8: OUTPUT«3␤»
colomon Ah, the numeric comparison only fires if both sides are numbers. 00:38
lue How would you compare a number and a string? String -> Unicode, compare to number? 00:39
colomon There are two "sensible" choices in Perl: treated the number as a string, or the string as a number. 00:40
rakudo: say ~3
p6eval rakudo 3b4484: OUTPUT«3␤»
colomon rakudo: say +"a"
p6eval rakudo 3b4484: OUTPUT«0␤»
colomon rakudo: say 3 < "a"
p6eval rakudo 3b4484: OUTPUT«0␤» 00:41
lue rakudo: say 3 > "a"
p6eval rakudo 3b4484: OUTPUT«1␤»
colomon because that's +3 < +"a" == 0;
on the other hand
rakudo: say 3 gt "a"
p6eval rakudo 3b4484: OUTPUT«0␤»
colomon that's ~3 gt ~"a" (where gt is the string version of >) 00:42
cmp tries to automatically choose the right comparison method, but if there's one number and one string it has to decide which to use.
apparently it chooses string. 00:43
arlinius rakudo: say 3 cmp "a" 00:44
p6eval rakudo 3b4484: OUTPUT«-1␤»
arlinius rakudo: say 3 cmp +"a"
p6eval rakudo 3b4484: OUTPUT«1␤»
diakopter I guess it chooses the left one 00:45
arlinius rakudo: say "a" cmp 3
p6eval rakudo 3b4484: OUTPUT«1␤»
arlinius rakudo: say +"a" cmp 3
p6eval rakudo 3b4484: OUTPUT«-1␤»
TimToady out-of-type cmp is not yet specced
bkeeler TimToady: Is it permissible to define a named regex/rule/token outside of a class or grammar? 00:46
TimToady well, if it doesn't find a metaobject to register it with, it's likely to be unhappy
bkeeler It is, indeed, unhappy
TimToady but a my or our method should probably just poke it into the symbol table and then forget about it 00:47
bkeeler 't/spec/S05-grammar/example.t is very unhappy
jnthn bkeeler: What kind of sad does it has?
jnthn guesses a "oh noes not in a class" sad :-)
dalek kudo/master: 90b5153 | jonathan++ | src/ (3 files):
Minor optimization to BUILDALL and .can. Takes 10s or so off the spectest run for me.
00:48
kudo/master: a7874a7 | jonathan++ | src/builtins/ (2 files):
Rip out the .fixup_cloned_sub macro - we don't need it any more. Should make .clone a tiny, tiny bit cheaper by saving a (useless) check.
bkeeler The metamodel for module refuses to real with adding methods to it
jnthn Ah, yes.
bkeeler and named regexes/tokens/etc are methods
jnthn :-|
Yeah...hm.
Well, you could make it just shut up whining and throw the thing away
bkeeler I have a more-or-less working implementation of grammars here, just trying to make tests pass 00:49
jnthn But then we'd not catch methods outside of classes either.
Which would sorta suck.
TimToady: Only if it's our or my? 00:50
TimToady: Do regex/rule/token default to "has" scope?
TimToady yes 00:51
they're just methods
00:51 constant joined, constant left, constant joined
lue is searching for mac keyboard layout pictures *grumble* (third-level specifically) 00:52
jnthn TimToady: Hm
TimToady: So we require "our" or "my" to not get a complaint? 00:53
(or anonymous)
00:53 cdarroch left
TimToady well, it's sort of a useless declaration if we don't put it somewhere, so probably warrants a warning 00:53
00:54 lestrrat is now known as lest_away
bkeeler We don't seem to support our- or my-scoped methods yet anyhow 00:54
jnthn TimToady: Well, right now we explode rather than warn.
bkeeler: Aye, we don't.
bkeeler I don't even know what they would mean anyway 00:55
jnthn bkeeler: We (also) install them in the package and/or lexpad.
Rather than just letting the metaobject know about them.
bkeeler Don't they end up in the package anyway? 00:56
jnthn No
Not my default 00:57
(alpha got that wrong)
00:57 Chillance left
jnthn er, by default 00:57
bkeeler Well, I'm just gonna say that example.t needs fixin 01:00
lue Quick, Exegesis man! to the Apocolypse Mobile! 01:01
jnthn bkeeler: Sounds like it.
bkeeler OK, now I guess need that pugs commit bit ;) Who's giving them out today? 01:02
jnthn bkeeler: mozem
bkeeler: pm me your email address 01:03
lue I would think you could only hand out two commit bits, then you'd have to start a new project :D
jnthn bkeeler: And your desired username
01:03 yinyin joined
jnthn bkeeler: Done. :-) 01:04
bkeeler: You should has a mail shortly.
bkeeler jnthn: Yep, thanks! 01:06
jnthn \o/
ooh, huh, 2am...ok, sleep time :-)
catch you all tomorrow
er, today :-)
o/ 01:07
bkeeler \o
Sleep well
Quick break for me too I think
01:08 athenot left
lue o/ 01:08
01:10 mssm joined 01:18 f00li5h[HireMe] left, f00li5h[HireMe] joined, snarkyboojum joined 01:22 snarkyboojum left 01:25 ggoebel joined 01:29 lest_away is now known as lestrrat
lichtkind good night 01:45
01:45 lichtkind left 01:59 mssm left
lue Anyone know of a keyboard layout viewer in linux? (bleh...) 02:02
02:03 rgrau left
pugssvn r29812 | lichtkind++ | added myself, inserted 3,4 link before, not only november 02:04
02:04 lichtkind joined 02:07 lichtkind left
arlinius lue: yeah, cat 02:07
02:10 alester left
lue cat, the console text reader? 02:11
TimToady it's the console text writer--you're the reader 02:12
arlinius it only writes what it reads
unless you use -n 02:13
or -v or similar
lue something graphical. I can't find a picture of the Apple Keyboard when you press Option (the third-level)
02:18 wknight8111 left 02:21 QtPlatypus left
arlinius you mean ⌥? 02:23
TimToady well, there's always ⌨ 02:24
lue yes. I just need the picture of what keys you get when you press that on a mac layout
02:25 ihrd joined 02:26 ihrd left
lue Ah well. I wanted to create a raised-eyebrow smiley like: ô.ō , only with something more curved than a circumflex 02:27
02:27 ShaneC left
eternaleye lue: www.bohemianalps.com/blog/2009/03/s...-in-linux/ 02:27
It has a diagram of levels 1-4 02:28
On an apple keyboard
lue thank you.
but I wanted level 17 :)
02:30 arlinius joined
lue will go and rewrite minmax.t some more (remove useless isnt's, and so on) 02:33
02:34 nbrown left, nbrown joined
colomon lue++ 02:35
lue should C<$1 min $2> be in S32, or in S03? 02:36
colomon that's a darned good question. 02:37
02:37 Exodist joined
colomon It's a list op... it's actually $1 min $2 min $3 min $4... 02:37
TimToady it's already in S03 02:38
lue so (for 2+ elements) it's a more cubersome form of min/max ?
colomon TimToady: lue meant where in the spec tests.
TimToady 3, I'd think 02:39
colomon I'm inclined to think S03.
lue me as well, just thought to make sure. So a separate minmax.t file, if it's not already tested?
colomon Sounds reasonable. 02:40
I didn't find any tests for min / max in S03, except a couple of max= / min= tests. 02:41
TimToady: one thing I've been wondering about min / max.
As I understand it, the [op] @a metaoperator acts as if you said @a[0] op @a[1] op @a[2]... right? 02:42
TimToady correct
but the latter form is still processed as a list internally, presumably 02:43
colomon Does that imply that [min] @a should only be calling min once, instead of doing pairwise min?
TimToady since it's list associative
might call .min once
the method is generally the more basic form 02:44
02:44 athenot joined
pugssvn r29813 | lue++ | [t/spec] removed 4 redundant isnts, bumped no. of tests from 42 to 38 02:44
colomon Right now in master, infix:<min> just calls .min.
And I was wondering if [min] should also just be calling .min the once, or if it should be calling it once for each pair in the reduce. 02:45
TimToady there is nothing that forces a list associative operator to be done pairwise
so just call .min once, I'd think
colomon Okay. 02:46
Seems like an extra case for [op] implementation, but a very sensible one. :)
lue TimToady: I'm scared of how well the TIMTOWTDI maxim applies in real life (more...)
just today we were using graphing calculators in math. The teacher did stuff one way, I did it another, and thought of TIMTOWTDI. 02:47
I think I'm obsessed with P6 now :)
TimToady colomon: all of the metaops are supposed to be derivative, in theory 02:48
and all done internally with higher-order functions
(or methods)
there's no way we can pregenerate all the possible nested metaoperators 02:49
colomon oh, right, sure! that's supposed to be part of the "ng" / STD magic. :)
TimToady there's not just [min], but [min=] and [min]<< and ...
02:49 yinyin left
TimToady well, maybe [min=] doesn't make a lot of sense 02:50
generally, assignment doesn't mix well with reduce
but [Xmin] is perfectly valid
colomon I really want to see this stuff working in Rakudo, but I don't have the grammar-fu to get that part of things working. 02:51
I went ahead and implemented .reduce last week just to get a jump on things. :) 02:52
lue when I _add_ a file to svn, should I run util/add-text-file.sh like the HOWTO says? 02:54
colomon lue: I've never heard of that. I think I may not have read the HOWTO. 02:55
(in my defense, it doesn't appear in the Rakudo version of the pugs tests.)
TimToady yes, that wants to be run 02:56
colomon yeah, it looks like it sets the SVN meta flags properly for a text file. 02:57
02:58 athenot_ joined
lue hey! S03 tells us how to deal with Inf in min/max operators. Basically, +Inf is biggest, -Inf is smallest. Now if it would tell us about NaN... 02:59
TimToady should return NaN, obviously :)
03:00 athenot left, athenot_ is now known as athenot
lue That's the problem (I have, at least). Inf is NaN. So...? (philosophical questions FTW) 03:01
colomon lue: NaN essentially means your math has gone wrong, and everything afterward needs to be tainted with NaN.
lue rakudo: say 1/0 03:02
p6eval rakudo a7874a: ( no output )
lue rakudo: say (1/0).perl
p6eval rakudo a7874a: OUTPUT«1/0␤»
lue whoops (not familiar with .perl)
rakudo: say (1/0).WHAT
p6eval rakudo a7874a: OUTPUT«Rat()␤» 03:03
lue methinks that should return NaN :)
or an error. But not ( no output )
eternaleye rakudo: say (1/0).Num
p6eval rakudo a7874a: OUTPUT«Divide by zero␤current instr.: 'infix:</>' pc 219201 (src/gen/core.pir:1074)␤»
TimToady parrot is still a bit exception happy 03:04
lue rakudo: say (1/0) ~~ undef
p6eval rakudo a7874a: OUTPUT«Unsupported use of undef as a value; in Perl 6 please use something more specific:␤ Mu (the "most undefined" type object),␤ an undefined type object such as Int,␤ Nil as an empty list,␤ *.notdef as a matcher or method,␤ Any:U as a type constraint␤ or
..fail() as a failure return␤ …
eternaleye lue: Rat just stores numerator and denominator, it's only when you convert it to a lossy type (Num) that it has anything wrong
lue It should equal undef at least (or the equivalent of) 03:05
rakudo: say (1/0) ~~ Mu
p6eval rakudo a7874a: OUTPUT«1␤»
eternaleye rakudo: say (1/0).notdef
p6eval rakudo a7874a: OUTPUT«0␤»
eternaleye Rat isa Mu, but 1/0 is defined
lue rakudo: say (1/0) ~~ Inf
p6eval rakudo a7874a: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Num'␤current instr.: 'infix:<~~>' pc 212590 (src/gen/perl6-actions.pir:15692)␤»
TimToady rakudo: say Inf.defined
p6eval rakudo a7874a: OUTPUT«1␤»
lue rakudo: say (1/0) == Inf
p6eval rakudo a7874a: OUTPUT«Divide by zero␤current instr.: 'infix:</>' pc 219201 (src/gen/core.pir:1074)␤» 03:06
TimToady rakudo: say NaN.defined
p6eval rakudo a7874a: OUTPUT«1␤»
eternaleye rakudo: say (1/0).Num.WHAT
p6eval rakudo a7874a: OUTPUT«Divide by zero␤current instr.: 'infix:</>' pc 219201 (src/gen/core.pir:1074)␤»
lue seems min/max is tested (somewhat) in S03-operators/misc.t
eternaleye TimToady: Should that return Failure, instead of dying immediately? 03:07
Or NaN?
TimToady or, arguably, Inf
colomon Or Inf?
The only problem with Inf as an answer is
rakudo; say (-1/0).perl
eternaleye But it shouldn't die immediately, right?
colomon rakudo: say (-1/0).perl
TimToady correct
p6eval rakudo a7874a: OUTPUT«-1/0␤» 03:08
colomon oh, hey, it does keep the sign!
TimToady we always try to minimize control flow damage, within reason
eternaleye The usual answer my math teacher gave was that x/0 isn't inf or -inf, its not defined because it's nonsensical, which places it as NaN
TimToady because exceptions are death to parallel algorithms
lue I have half-a-mind to email a math professor at (the UK) Cambridge to settle these questions regarding Inf/NaN/etc.
03:08 lestrrat is now known as lest_away
eternaleye colomon: Because / is a constructor, rather than performing a mathematical operation 03:08
It desugars to Rat.new(-1, 0) 03:09
colomon eternaleye: yes, but Rat.new does a good bit of work internally.
rakudo: say Inf * sign(-1) 03:10
p6eval rakudo a7874a: OUTPUT«-Inf␤»
lue I think (x/0)=±Inf and (x/±Inf)=0 , simply because of 1/0.01, 1/0.001, 1/0.0001, etc.
eternaleye colomon: It still boils down to storing them individually, and -1/0 should skip any simplification code
lue rakudo: loop (my $i=1; $i=0.000001; $i=$i/10) { say 1/$i; } 03:11
p6eval rakudo a7874a:
..OUTPUT«1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤1000000␤10…
eternaleye By the way, should there be a 'thinko-catcher' prefix:<...> to catch people who do 1, 2, ... 7 instead of 1, 2 ... 7
? 03:12
lue that didn't work...
colomon should be $i==0.0000001
lue d'oh!
arlinius rakudo: say 1, 2, ... 7
p6eval rakudo a7874a: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 16495 (src/builtins/Junction.pir:364)␤»
lue rakudo: loop (my $i=1; $i==0.000001; $i=$i/10) { say 1/$i; }
arlinius rakudo: say 1, 2 ... 7
p6eval rakudo a7874a: ( no output )
rakudo a7874a: OUTPUT«Method 'succ' not found for invocant of class 'Seq'␤current instr.: '&prefix:<++>' pc 352474 (src/gen/core.pir:49723)␤»
arlinius rakudo: my ($a, $b); $a = 44, $b = 102; say "$a : $b"; 03:13
p6eval rakudo a7874a: OUTPUT«Undefined value shifted from empty array␤current instr.: 'perl6;Perl6Exception;throw' pc 14117 (src/builtins/Seq.pir:52)␤»
arlinius that should be "44 : 102"?
lue alpha: loop (my $i=1; $i==0.000001; $i=$i/10) { say 1/$i; }
colomon arlinius: that's just a case that's not handled yet.
p6eval alpha 30e0ed: ( no output )
eternaleye rakudo: for 1, .1, .01 ... .000001 -> $i { say 1/$i }
p6eval rakudo a7874a: OUTPUT«Method 'pred' not found for invocant of class 'Seq'␤current instr.: '&prefix:<-->' pc 352536 (src/gen/core.pir:49734)␤»
arlinius figured
eternaleye Hm, that's an odd bug
arlinius pugs: my ($a, $b); $a = 44, $b = 102; say "$a : $b";
p6eval pugs: OUTPUT«44 : 102␤» 03:14
colomon it's just a ... thing.
TimToady alpha: for 1, .1, .01 ... .000001 -> $i { say 1/$i }
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤»
colomon there are a lot of cases, and we don't handle that one yet.
eternaleye pugs: for 1, .1, .01 ... .000001 -> $i { say 1/$i }
p6eval pugs: OUTPUT«*** ␤ Unexpected "."␤ expecting operator or block construct␤ at /tmp/wjjHms28Mc line 1, column 20␤»
lue rakudo: loop (my $i=1; $i==0.000001; $i=$i/10;) { say 1/$i; }
p6eval rakudo a7874a: OUTPUT«Missing block at line 11, near "(my $i=1; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
TimToady alpha: for 1/1, .1, .01 ... .000001 -> $i { say 1/$i }
colomon I'm trying to work on a better version, but it's not ready for prime time yet.
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤»
colomon on the other hand.
arlinius colomon: oh you meant ...
lue bah! Who knew that was going to be so hard to code :/ 03:15
arlinius what about the "$a = 44, $b = 102"?
that should work as two assignments, yes?
colomon rakudo: (1, .1, .01 ... *).batch(6).perl.say
p6eval rakudo a7874a: OUTPUT«(1, 1/10, 1/100, 1/1000, 1/10000, 1/100000)␤»
TimToady yes, but rakudo doesn't parse it right, I don't think...
so use parens
03:15 daemon left
eternaleye rakudo: for ( 1, .1, .01 ... .000001 ) -> $i { say 1/$i } 03:16
p6eval rakudo a7874a: OUTPUT«Method 'pred' not found for invocant of class 'Seq'␤current instr.: '&prefix:<-->' pc 352536 (src/gen/core.pir:49734)␤»
lue rakudo: (1, .1, .01 ... *).batch(6).Num.say 03:17
p6eval rakudo a7874a: OUTPUT«6␤»
lue |:(
colomon rakudo: (1, .1, .01 ... *).batch(6)>>.Num.say
p6eval rakudo a7874a: OUTPUT«10.10.010.0010.00011e-05␤»
colomon rakudo: (1, .1, .01 ... *).batch(6).>>Num.perl.say
p6eval rakudo a7874a: OUTPUT«Confused at line 11, near "(1, .1, .0"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
colomon rakudo: ((1, .1, .01 ... *).batch(6).>>Num).perl.say 03:18
p6eval rakudo a7874a: OUTPUT«Confused at line 11, near "((1, .1, ."␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
eternaleye colomon: missing . before Num
colomon rakudo: (1, .1, .01 ... *).batch(6)>>.Num.perl.say
p6eval rakudo a7874a: OUTPUT«(1, 0.1, 0.01, 0.001, 0.0001, 1e-05)␤»
lue rakudo: (1, .1, .01 ... *).batch(12).perl.say; say "take the reciprocal of these fractions"
p6eval rakudo a7874a: OUTPUT«(1, 1/10, 1/100, 1/1000, 1/10000, 1/100000, 1/1000000, 1/10000000, 1/100000000, 1/1000000000, 1e-10, 1e-11)␤take the reciprocal of these fractions␤»
colomon ack, I need a perl 6 blog name already... 03:20
lue should I move the min/max related tests from S03-operators/misc.t to a S03-operators/minmax.t file? Or is that unecessary?
colomon I'd say yes
lue alright. I'll get to that after I'm done with some work 03:21
lue & 03:22
03:24 nbrown left
colomon ponders "Rakudo Death Star" 03:24
bkeeler ...and I'm back 03:28
TimToady hids
hides, even
bkeeler hehe
TimToady oops
pmichaud sees TimToady crouching behind a missing 'e'
dalek kudo/master: 4f74e3b | (Solomon Foster)++ | src/core/Rat.pm:
Make Rat.Num return +/- Inf if the denominator is 0.
03:30
colomon So I want to make blog posts about work on series, but I don't have a name for my hypothetical Perl 6 blog yet. 03:32
pmichaud ("Rakudo Death Star") I keep pondering "Rakudo Super Nova", which would tend to imply that it blows up a lot :)
or that it blows everything else away
pugssvn r29814 | colomon++ | [t/spec] Add tests that Rat.Num properly creates Inf when called for. 03:33
colomon "Rakudo Nova" has a nice ring to it... 03:34
pmichaud keep in mind that in some languages "Nova" means "doesn't go" :-)
(more literally, "no va" :-) 03:35
colomon Rakudo Star Blazers 03:36
bkeeler snopes has an interesting writeup on that whole Chevy Nova thing
arlinius so it should have been an earlier version?
eternaleye RakuDo It. 03:39
colomon Just Rakudo It
quester phenny: tell pmichaud The oddness with sort not working right for an arity-1 "by" function that I mentioned at 1419Z appears to be caused by the underlying Parrot sort being called, rather than the sort in rakudo/src/core/Seq.pm. 03:40
phenny quester: I'll pass that on when pmichaud is around.
TimToady um, pmichaud is right here
03:41 quietfanatic joined
colomon need to sleep, unless someone can suggest something better "overnight" will probably go with "Just Rakudo It" in the morning. :) 03:41
TimToady Smooth Operator
Whirled Series 03:42
eternaleye Smooth Operator Hypers Forward
TimToady Never Metaop I Didn't Like
quester pmichaud: Oops, sorry. I wasn't watching the channel for a few minutes.
pmichaud and yes, you are correct about the cause (Parrot's sort interfering)
phenny pmichaud: 03:40Z <quester> tell pmichaud The oddness with sort not working right for an arity-1 "by" function that I mentioned at 1419Z appears to be caused by the underlying Parrot sort being called, rather than the sort in rakudo/src/core/Seq.pm.
pmichaud I can't fix that immediately -- trying to add it to Parcel.sort will end up in an infinite loop. 03:43
I'll fix it first thing tomorrow, or later tonight if I have time/energy
03:50 xinming left
quester pmichaud: Thank you. I don't really need it fixed, I was just trying to explore some of the structure of Rakudo using sort as a starting point. OTOH, it would be nice if the first example program in the Perl 6 book worked again. 03:53
pmichaud agreed -- almost anything dealing with lists, arrays, etc still needs some cleaning up 03:56
03:57 ggoebel left 04:01 agentzh joined 04:04 cognominal left 04:09 cognominal joined
bkeeler Zounds, the parrot svn seems slow tonight 04:10
svn: Can't find a temporary directory: Internal error 04:14
04:14 athenot left
bkeeler Google sez that's a server disk full condition 04:15
[particle] i've notified the parrot hosting admins 04:18
thanks for reporting!
bkeeler Sure thing, good to know it's not on my end
lue (reading backlog) I want to drive a Toyota Nova :D 04:39
04:40 agentzh left
lue are lives_ok {} blocks part of the planned tests count ? 04:50
04:53 TiMBuS joined
TimToady should be 04:54
lue alright. So anything that churns out a result (is, isnt, lives_ok, dies, etc.) are counted as tests then.
04:55 stephenlb left 04:56 cognominal left 04:57 dalek joined
lue alpha: say 2 min Mu 04:57
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤»
lue alpha: say (2 min Mu)
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤» 04:58
lue pugs: say (2 min Mu)
p6eval pugs: OUTPUT«*** ␤ Unexpected "min"␤ expecting operator or ")"␤ at /tmp/zJSmkU2Vf4 line 1, column 8␤»
05:05 cognominal joined 05:10 stephenlb joined
lue rakudo: say "foo" min +Inf 05:15
p6eval rakudo 4f74e3: OUTPUT«Inf␤»
lue alpha: say "foo" min +Inf 05:16
p6eval alpha 30e0ed: OUTPUT«sh: ../rakudo-alpha/perl6: No such file or directory␤»
05:16 stephenlb left 05:23 xinming joined
lue alpha: my @a = 1,2,3,4; my @b = 9,8,7,1; say @a minmax @b 05:34
p6eval alpha 30e0ed: OUTPUT«18␤»
lue alpha: my @a = 1,2,3,4; my @b = 9,8,7,1; say @(@a minmax @b)
p6eval alpha 30e0ed: OUTPUT«18␤»
lue pugs: say 1,2 minmax 9,8 05:35
p6eval pugs: OUTPUT«*** No such subroutine: "&infix:minmax"␤ at /tmp/jSiHUA77mL line 1, column 1 - line 2, column 1␤»
lue alpha: say 1,2 minmax 9,8
p6eval alpha 30e0ed: OUTPUT«18␤»
05:35 yinyin joined 05:37 lest_away is now known as lestrrat 05:38 Trashlord joined
lue rakudo: say (1,2,3) min 4 05:39
p6eval rakudo 4f74e3: OUTPUT«1␤»
TimToady that doesn't make sense to me 05:40
lue It's supposed to work. I see it as "the minimum value of all provided values is 1) 05:42
s/)/"/
It's probably interpreted as 1 min 2 min 3 min 4 05:43
rakudo: say (1,2,3) max 4 05:44
p6eval rakudo 4f74e3: OUTPUT«4␤»
lue It can be used as a quick way to see if there is any value in the array which is too high/low. 05:45
Say you have a list of scores out of 5. C<@a max 5> and C<@a min 0> can tell you if an illegal score is reached. (quicker than looping thru elements, anyway) 05:46
TimToady that should be @a >>max>> 5 or some such 05:48
scalar operators shouldn't be in the business of hypering themselves 05:49
lue If the spec says that's not what should happen, should I tell the test that's not OK? (with isnt or something) 05:52
TimToady looks rather isnt to me 05:53
that's a cross-type min
which, like cross-type cmp, isn't specced yet
but chances are if that one worked it would do it with Numeric coercions 05:54
and +(1,2,3) min 4 is 3
as is +(4,5,6) min 4
lue is there a more blanketing statement than isnt? isnt compares certain values it should not be, and I want it to fail in general.
TimToady well, but what if it *should* be 3? 05:57
mind, this is unspecced...
lue so, for now, it isnt 4. Can live with that :) 05:58
alpha: say (1,2,3,4) min (5,6,7,8) 06:04
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤»
lue alpha: my @a=(1,2,3,4); my @b=(5,6,7,8); say @a min @b; #I bet this is NYS
p6eval alpha 30e0ed: OUTPUT«Multiple Dispatch: No suitable candidate found for 'cmp', with signature 'PP->I'␤in Main (file <unknown>, line <unknown>)␤»
lue alpha: say 1 min 2 max 3; # heh heh, let's give you a workout, alpha 06:07
p6eval alpha 30e0ed: OUTPUT«3␤»
lue not sure when you'd actually do this, but still...
(maybe I know how it works...)
alpha: say 1 min 4 max 3; #i'm guessing 4 06:08
p6eval alpha 30e0ed: OUTPUT«3␤»
lue alpha: say 5 min 4 max 3; #i'm guessing 4
p6eval alpha 30e0ed: OUTPUT«4␤»
lue \o/ again, not sure if you'd ever need this...
TimToady it looks left associative, when it should be right 06:10
lue oh! so those would be isnt's...
TimToady according to S03:85 06:11
though there's something to be said for list associative with different operators at the same precedence acting like non-associative and forcing parens 06:12
lue for C<5 min 4 max 3> starting from the right still gets you 4...
C<1 min 4 max 3> (from right) gets you 1 06:13
06:14 athenot joined
TimToady yeah, but I may outlaw those entirely 06:15
I'll probably try making different list-assoc ops non-assoc in STD and see what breaks in t 06:16
lue cause a WTHDYNTF error? (What The Hell Do You Need This For) :)
TimToady and see if there's a use case that's worth the confusion of allowing it
I suspect not
lue so C<isnt>'s it is! 06:17
TimToady well, it would be compile error, so isnt is too late 06:23
lue It compiles though :)
TimToady std: 1 but 2 but 3 06:24
p6eval std 29814: OUTPUT«===SORRY!===␤"but" is not associative at /tmp/r9MozdwY8i line 1:␤------> 1 but 2 but ⏏3␤FAILED 00:01 107m␤»
lue good to have the isnt in there anyway. Can't be too sure.
TimToady it would fail like that
if it doesn't compile, it'll blow up the .t
so it needs to be in an eval_dies_ok or some such
assuming I change it
lue so, put it the offending code in dies_ok() brackets? or eval_dies_ok? 06:26
TimToady eval_dies_ok with a string that should parsefail 06:30
dies_ok isn't good enough to prevent parsefailing the whole *.t
lue so the usage would be eval_dies_ok{code here}, 'optional string'; 06:31
.oO(if I knew where TAP was defined, I'd look it up myself...)
06:33
TimToady no, more like eval_dies_ok q{code here}, 'string'
lue dankon. 06:34
TimToady look at other instances in t/ for examples
06:51 kaare joined 06:52 kaare is now known as Guest7107
pugssvn r29815 | lue++ | [t/spec] moved min/max related to S03-operators/minmax.t 06:55
r29816 | lue++ | [t/spec] min, max, and minmax operator tests added. 06:56
lue froody. I'm done for the night. Bye!
06:56 lue left 07:05 cotto left 07:06 cotto joined 07:26 justatheory left 07:34 ihrd joined 07:39 Su-Shee joined
Su-Shee good morning 07:40
07:48 yves joined
spinclad good morning Su-Shee 07:52
07:53 Sarten-X2 joined 07:54 xabbu42 joined 08:03 cotto left, iblechbot joined
ewilhelm_ rakudo: say [+] (1..999).grep( { $_ % 3 == 0 || $_ % 5 == 0 } ); 08:06
p6eval rakudo 4f74e3: OUTPUT«Confused at line 11, near "say [+] (1"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
ewilhelm_ what happened?
pugssvn r29817 | lwall++ | [S03] list associative treats non-matching ops as non-associative 08:08
ewilhelm_ rakudo: [+] 1..2 08:10
p6eval rakudo 4f74e3: OUTPUT«Confused at line 11, near "[+] 1..2"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
spinclad ewilhelm_: [+] is NYI in master branch, i believe
ewilhelm_ NYI? 08:11
spinclad alpha: say [+] 1..2
p6eval alpha 30e0ed: OUTPUT«3␤»
pugssvn r29818 | lwall++ | [STD] make non-matching list assoc into non-assoc
r29818 | (and treat invocant colon as really-a-comma for that)
r29818 | [CORE] add TrigBase enum
spinclad not yet implemented(/invented)
ewilhelm_ hmm, it's the first example in the advent calendar
TimToady well, it's not advent anymore :) 08:12
ewilhelm_ and that says to checkout master perl6advent.wordpress.com/2009/12/0...ng-rakudo/
so you take back all the presents on boxing day?
spinclad master then is now alpha; ng then has become master
TimToady so everything in the calendar should work with alpha: 08:13
the new master had some temporary regressions in order to make progress elsewhere
ewilhelm ah, so working off of alpha would be good for getting feet wet? 08:14
spinclad many improvements in ng; much effort now going into recovering all that was implemented before or never implemented yet 08:15
TimToady depends on which foot you want to get wet :)
spinclad yes, running alpha is good for stability
ewilhelm feet of other people in this case 08:16
TimToady but alpha doesn't have laziness
ewilhelm going to give a talk to a roomful of polyglots tomorrow about why they want to start learning perl 6.
spinclad there's a lot that's specced that works better in new master though
ewilhelm is master planned to turn into star? 08:18
spinclad yes
pugssvn r29819 | lwall++ | [minmax] add some missing semis
ewilhelm ok, thanks
spinclad my pleasure 08:20
pugssvn r29820 | lwall++ | [precedence.t] can no longer have | and ^ at same paren level 08:22
TimToady std: 1 min 2 max 3 08:24
p6eval std 29816: OUTPUT«ok 00:01 107m␤»
08:28 athenot left 08:30 ihrd left 08:34 jonasbn joined
moritz_ good morning 08:35
sjohnson hi 08:36
TimToady std: 1 min 2 max 3 08:37
p6eval std 29820: OUTPUT«===SORRY!===␤"min" and "max" are non-associative and require parens at /tmp/lFFJ6i5J7d line 1:␤------> 1 min 2 max ⏏3␤FAILED 00:01 107m␤» 08:38
TimToady std: 1 | 2 ^ 3
p6eval std 29820: OUTPUT«===SORRY!===␤"|" and "^" are non-associative and require parens at /tmp/ypuzWGpoRv line 1:␤------> 1 | 2 ^ ⏏3␤FAILED 00:01 105m␤»
TimToady std: 1 min 2 min 3 08:39
p6eval std 29820: OUTPUT«ok 00:01 105m␤»
TimToady std: 1 but 2 but 3
p6eval std 29820: OUTPUT«===SORRY!===␤"but" and "but" are non-associative and require parens at /tmp/A5bbxrpIEi line 1:␤------> 1 but 2 but ⏏3␤FAILED 00:01 105m␤»
TimToady std: 1 ..^ 2 ^.. 3 08:42
p6eval std 29820: OUTPUT«===SORRY!===␤"..^" and "^.." are non-associative and require parens at /tmp/yMN57nSGGM line 1:␤------> 1 ..^ 2 ^.. ⏏3␤FAILED 00:01 105m␤»
TimToady that's enough damage for one night 08:43
zzz &
08:44 lestrrat is now known as lest_away
ewilhelm pugs: say -42.fmt('n%+5d') 08:57
p6eval pugs: OUTPUT«-0␤»
ewilhelm pugs: say (-42).fmt('n%+5d')
p6eval pugs: OUTPUT«n -42␤»
ewilhelm is the method supposed to bind more tightly than the negative? 08:59
vorner ewilhelm: it doesn't look like it binds tighter, it would output - 42 if it would, not -0 09:01
moritz_ ewilhelm: method calls are parsed as belonging to the term, and thus have the tightest precedence
vorner doesn't make sense, ignore him, 42.fmt is string… 09:02
moritz_ now the only question is if -42 is parsed as <prefix> <number>, or if there's a rule for parsing -42 as a number of its own
rakudo: say -42.fmt('n%+5d') 09:03
p6eval rakudo 4f74e3: OUTPUT«Could not find non-existent sub &sprintf␤current instr.: 'perl6;Any;fmt' pc 278993 (src/gen/core.pir:23578)␤»
moritz_ alpha: say -42.fmt('n%+5d')
p6eval alpha 30e0ed: OUTPUT«-0␤»
09:04 eternaleye left
ewilhelm alpha: say '-42.3'.fmt('n%+5d') 09:04
p6eval alpha 30e0ed: OUTPUT«n -42␤»
ewilhelm where should an Nth-time newbie start reading documentation these days? 09:05
moritz_ ewilhelm: maybe at github.com/perl6/book/ 09:07
09:08 dakkar joined
moritz_ it's not yet very complete, but it's rather up-to-date 09:08
ewilhelm ah, thanks 09:09
09:11 jferrero joined
ewilhelm this link to the pugscode svn is broken (needs s/spec/Spec/) perlcabal.org/syn/S01.html 09:15
09:19 rv2733 joined
moritz_ ewilhelm: I'll try to find out where that link is generated or set 09:51
09:52 yinyin left
pugssvn r29821 | moritz++ | [Text::SmartLinks] fix case in link to svn as reported by ewilhelm++ 09:54
ewilhelm thanks 09:55
moritz_ it's been updated at the full hour, and now the link works 10:09
10:25 pmurias joined 10:26 orafu left, orafu joined 10:36 lest_away is now known as lestrrat
mathw Morning 10:44
pmurias mathw: hi
mathw pmurias! 10:46
10:52 payload joined 11:03 TiMBuS left 11:15 jonasbn left
jnthn morning :-) 11:24
...sort of... :-)
11:25 payload left
colomon o/ 11:26
11:26 mikehh left 11:27 mikehh joined 11:29 uniejo joined
bbkr will user be able to extend 'from' sources in this "use libc:from<C>;" syntax? IMO something like "use HTML::Entities:from<git github.com/masak/web/blob/master/lib>" would be awesome. 11:52
jnthn :from is more aimed at language names... 11:53
The adverb form is intended to be pretty extensible though.
So :source<...> maybe could be made to do something like that.
Not quite sure on the mechanism yet. 11:54
11:54 arthur-_ joined
bbkr soo nice! that would make problems with installation and updates obsolete, if user will be able to include current version of library directly from web. 11:55
jnthn Well, presents possibly a performance/security/other issue too of course. :-) 11:57
11:58 wanradt__ joined 11:59 wanradt left
bbkr performance won't be big problem. GIT/SVN revisions can be saved and then checked for updates instead of slurping whole file every time. and security problems can also be solved, a lot can be taken from Java playground and their security model of online services like RMI. not to mention, this online library loading would be useful for "one time jobs" and testing new library versions before installing them on production servers. 12:07
12:07 payload joined
colomon justrakudoit.wordpress.com/2010/02/...ntation-i/ 12:07
jnthn blog name win! 12:08
colomon Inspired by eternaleye++, tagline by TimToady++ 12:09
12:11 payload1 joined, payload left
colomon Interestingly, editing the wordpress blog really really did not agree with the current OS X version of Google Chrome. One of the few things I've had difficulty with in Chrome. 12:13
12:17 iblechbot left
uniejo colomon: Nice series operator. I had the idea that the match for next number could be passed down to another multi sub based on arity and colditionals on parameters. That would make it easy to extend with new functions to recognize number sequences. 12:23
colditionals => conditionals 12:24
moritz_ that would need some aditional speccing, but I think the idea isn't too bad
it would be awesome if the multi infix:<...> could do that by multi dispatch directly 12:25
colomon uniejo: I was originally working on that theory (see the current series implementation in master) but it seems like it would be a lot more complicated with the way series is spec'd now.
I guess it could be done with very complicated where clauses...
moritz_ which would slow down dispatch 12:26
=> bad
moritz_ just commented on the blog 12:27
colomon \o/
moritz_ one idea is to have a multi with Code for the RHS
and the "magic" series operator could build a closure and re-dispatch to the Code multi
that would make it a bit more elegant, and smaller functions
colomon I'm not sure what you mean by "a multi with Code for the RHS"? 12:31
I can imagine a helper sub that took the seed, the limit, and a Code block...
(comment read) Oh, I like the idea of making it a Perl 6 project. Or should it just be a branch of Rakudo? That might be the easiest way to take advantage of an existing testing framework... 12:33
12:34 araujo joined
moritz_ multi infix:<...>(@lhs, Code $rhs) 12:37
(re project) whatever works best for you
colomon moritz_: I don't think Code on the rhs is a legal form for ... anymore. 12:38
moritz_ oh. I haven't followed all the spec changes closely enough
colomon (If you take a peak in master's operators.pm, that's exactly how the old code works.)
12:39 cosimo joined
colomon Code blocks are supposed to be the last item on the lhs now. 12:39
which makes loads more sense, but is trickier for multi dispatch.
afk # got to get ready to go try to get a loan pre-approval... 12:41
jnthn @lhs where { @lhs[*-1] ~~ Code } # maybe 12:42
12:42 colomon left 12:43 cosimo left, cosimo joined
moritz_ can't you do something like a (@lhs, *$last, $rhs) or so? 12:44
oh I suppose that slurpies need to go last
jnthn yeah 12:46
moritz_ ([*@most, *$one], $RHS) # signature unpacking? 12:47
takadonet morning all 12:48
jnthn Still need the *@foo to come last. 12:49
So don't think you can handle it with the unpacking either.
pmurias how should the optimalising to C backend for mildew be called? i need a short name that can be used like "./mildew -Chere_the_name_will_be_used foo.p6" 12:51
moritz_ copt? 12:52
jnthn wick
'cus it's -Cwick :-) 12:53
moritz_ or you could steal the -O command line switch from gcc and just call it -CO
mathw or -CoptC
moritz_ throws beer mugs at jnthn
mathw case-sensitive, of course
jnthn catches them and starts slurping away happily
mathw -Coptic
jnthn
.oO( optimize like an Egyptian... )
12:54
12:58 ignacio_ joined 13:09 rvr777 joined 13:11 colomon joined
dalek kudo/master: 59c65be | moritz++ | t/spectest.data:
re-enable S03-junctions/associative.t
13:12
jnthn likes it when tests Just Start Working again due to other changes. :-) 13:13
13:15 quester left 13:21 synth joined 13:23 SmokeMachine joined
mathw jnthn: optimise like a NES programmer 13:27
13:29 SmokeMachine left 13:32 BinGOs left 13:33 BinGOs joined 13:37 BinGOs left 13:39 BinGOs joined 13:42 cjk101010 joined 13:44 cjk101010 left
pmurias mathw: :) 13:44
pugssvn r29822 | pmurias++ | [mildew] playing around with displaying the AST with gtk (using the yet 13:45
r29822 | unpublished Forest::Gtk2
r29823 | pmurias++ | [mildew] start of implementing -CoptC 13:46
13:48 crazed left
mathw blinks 13:48
you're going with one of my suggestions? Wow. 13:49
13:51 crazed joined, colomon left 13:59 SmokeMachine joined 14:02 xabbu42 left 14:07 ruoso joined
pmurias ruoso: hi 14:19
ruoso hi pmichaud 14:20
hi pmurias
14:21 rgrau joined
pmurias ruoso: i started working on generating yeast C code directly (not going through m0ld) 14:21
ruoso cool 14:23
that's awesome
how is it going?
pmurias emitting calls is left 14:24
ruoso: under what conditions do you think we could inline {...} instead of emitting a Code.new(...).postcircumfix:()(...)
?
14:25 ggoebel joined
pmurias ruoso: but it will definitily be done till 26th (deadline on a university project i'm going it as a part of) 14:25
14:34 profjuan joined 14:35 profjuan left 14:36 bluescreen joined, ruoso left 14:41 rv2733 left 14:43 rv2733 joined 14:44 macae joined, rv2733 left 14:50 rv2733 joined 14:51 rgrau left 14:52 macae left 14:54 ruoso joined
ruoso with a faulty connection 14:55
pmurias, I'm not sure... because that affects CALLER::
and OUTER::
you would need to detect too many things
(using open source development as university project)++
15:02 xalbo joined
xalbo The more I think about it, the less comfortable I am with * meaning both Whatever and autocurrying. They both seem really useful ideas, but it seems like using the same thing for them will probably lead to confusion. 15:03
PerlJam xalbo: or just stop thinking of Whatever and autocurrying as different things :) 15:04
15:05 slavik joined, slavik left
xalbo In particular, looking at the "False ~~ True" thread, i realized that seeing "when some_function(*) {", we can't know whether that's "autocurry &some_function and invoke it on the topic" or "call &some_function with Whatever as an argument and smartmatch the result against the topic" without looking at the implementation of &some_function. 15:06
15:08 crazed left, crazed joined
xalbo Unless there's some deeper similarity that i'm missing (* by itself is some form of identity function, or something). 15:08
PerlJam Hmm 15:09
That seems similar to the problem with Junctions. 15:13
We can't know to autothread a Junction vs. pass the Junction through without looking at the implementation.
really all we need to see is the list of candidates with their signatures. 15:14
xalbo Yes, now that you mention it, it does seem very similar. 15:15
ruoso xalbo, autocurry only happens on operators
xalbo Really? Somehow I totally missed that. 15:16
15:16 rv2733 left
PerlJam so the determination for "when * { ... }" must be purely syntactic? 15:17
jnthn some smartmatch uses are syntactic. 15:18
It'd not surprise me if that one was to be too.
PerlJam yes, it just hadn't occured to me until just now :)
ruoso xalbo, "For any unary or binary operator ... if the operator has not specifically requested to handle "*" itself , the compiler is required to translate directly to an appropriately curried closure ... " 15:19
PerlJam The only "probem" in xalbo's universe is the bare * as Whatever vs. autocurry
ruoso bare * is never autocurry, because it's not on an operator
imnsho, "when * { }" is definitely syntactic 15:20
PerlJam okay, so foo(*) is always "pass a Whatever to &foo" ? 15:21
ruoso yes
15:21 Trashlord left
ruoso (unless I missed something) 15:21
PerlJam &infix:<+>(*) <-- no curry? 15:22
ruoso and actually a fail, since infix:<+> expects two arguments
PerlJam er, &infix:<+>(*,1) then
PerlJam is having trouble typing *And* thinking :) 15:23
xalbo So "* + 2" curries, but "* + 1 + 1" would break? Interesting.
ruoso but I'd expect most math operators to actually provide the :(Whatever, Numeric) and :(Numeric, Whatever) multi candidates
PerlJam xalbo: um ... how do you figure? 15:24
ruoso and also the :(Code, Numeric) and :(Numeric, Code) as to prevent the failure xalbo is trying to indicate
PerlJam oh
Hmm
ruoso "* + 1" returns a Code 15:25
xalbo If the operators have to provide all those multis, it feels like something is a little off. Isn't the point of automatically currying them so that they don't have to do that?
ruoso yes... specially for user-defined operators 15:26
15:27 synth left, iblechbot joined
ruoso but built-in operators could be completely defined 15:27
15:28 Guest7107 left
pmurias ruoso: re CALLER variables that don't have is dynamic are hidden 15:28
ruoso pmurias, but that doesn't solve the OUTER:: problem
it is certainly a viable optimization
but It sure is an optimization, so I'd suggest doing it afterwards 15:29
15:32 cosimo left
pmurias if we kept the lexical scope and only removed the create an new frame it would work 15:33
m-locks rakudo: subset Even of Int where { $_ % 2 == 0 } 15:37
p6eval rakudo 59c65b: OUTPUT«Confused at line 11, near "subset Eve"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
15:38 ruoso left 15:41 pmurias left
pmichaud good morning, #perl6 15:44
15:46 synth joined 15:47 Psyche^ joined
jnthn morning, pmichaud 15:49
m-locks good evening :)
15:49 rvr777 left
pmichaud jnthn: got seriously sidetracked last night -- will be roadmapping shortly 15:50
15:50 Patterner left, Psyche^ is now known as Patterner 15:51 pmurias joined
jnthn pmichaud: No worries, I didn't get around to much last night either. 15:52
15:52 ruoso joined, colomon joined
colomon jnthn++ # checking in on the git commits this morning... 15:53
15:54 nihiliad joined
colomon errr.... wait, perhaps was checking something from last year... lost in github.... 15:54
Oh, only tests turned on so far today. :( 15:55
jnthn colomon: yes, just some patches from last night 15:56
colomon Somehow I was looking at commits from nearly a year ago, when you checked in a bunch of stuff one morning.
jnthn huh...I was awake on a morning? 15:57
15:57 justatheory joined
colomon errr... probably not actually morning, even. 15:57
jnthn ;-)
colomon I just processed it as such because I thought it was "new today". ;)
I could kind of desperately use another eight hours of sleep.
jnthn Today for me is more like, client asks "Why does X take so long?", I look, and answer something like "Oh, becasue to produce this report it does approximately 300,000 SQL queries." 16:01
(I'm happy to report that the guy who wrote this attrocity has now pursued a non-programming career path...)
pmurias jnthn: you mean he got promoted to management? ;) 16:03
jnthn pmurias: Oh noes...scary thought! :-)
16:03 justatheory left 16:07 mkyser joined
PerlJam colomon++ I just saw your post about the series op 16:07
pmichaud url ? 16:08
PerlJam and jnthn++ too because I just tried some signature stuff that I didn't think would work, but it did :)
pm: justrakudoit.wordpress.com/2010/02/...ntation-i/
I like the name too :-)
Just Rakudo it
pmichaud Hope Nike's lawyers don't notice :)
PerlJam although the vowel sounds are a little off, it's still nice
jnthn PerlJam: What did you try, out of curiosity? 16:09
jnthn likes to see what people do with sigs :-)
PerlJam jnthn: multi sub foo ([$a,$b]) { ... }; multi sub foo([$a,$b,$c]) { ... } 16:10
jnthn oh yes
you can multi-dispatch on unpackability.
PerlJam jnthn: and I tried using sub foo (*[$a,$b,$c]) { ... } and that worked too
jnthn omg 16:11
I'd never thought of trying that :-)
colomon PerlJam: thanks!
jnthn PerlJam: Any chance you could site S06-multi/unpackability.t ? ;-)
s/site/write/
PerlJam jnthn: maybe later today, sure.
jnthn \o/ 16:12
delegation++, PerlJam++
16:12 wanradt_ joined
PerlJam colomon: btw, the RHS of ... can be a list too 16:12
colomon PerlJam: yes, I know, but I wanted to start with the "simplest" case first. :) 16:13
PerlJam okay, just checking
colomon It's actually worse that that, because you can chain series operators into one op call...
I don't even know how to declare the signature for that! 16:14
16:15 wanradt__ left
colomon I'm still torn on whether to branch Rakudo to work on series, or create a separate project. Seems like a branch would be easier, but a separate project would be easier to work with and test. 16:17
pmichaud I think branch (more)
we can do it as a separate project, and I'm happy to do so, but we also need to watch contributors if the code is going to eventually make it into the rakudo repo
i.e., we'd need to make sure the contributors have cla's
colomon ah, that's a good argument, indeed. 16:18
pmichaud to make that a bit clearer, we could do it as a separate project from the rakudo account instead of from the perl6 account :) 16:19
but it seems to me that within the existing rakudo repository is overall simpler
16:20 ash_ joined
pugssvn r29824 | duff++ | [S03] closure clarification for the LHS of &infix:<...> 16:21
colomon okay, sounds like a branch it is.
but I think I might nap first. :) 16:22
16:22 alester joined
PerlJam hopes that his clarification is what was actually meant 16:22
colomon is now contemplating a series made of closures... 16:23
TimToady I thought about that, but didn't commit one way or another in the spec. Requiring a closure to be last is conservative, which is ok for now. 16:27
PerlJam yeah, the other thing was potentially awesome and thorny :) 16:28
(and I'd prefer my programming language not prick my fingers if possible) 16:29
16:36 tylerni7 joined, tylerni7 left, tylerni7 joined 16:39 kaare_ joined 16:40 ash_ left 16:47 mssm joined
TimToady xalbo: * + 1 + 1 is intended to autocurry transitively as WhateverCode used to, though perhaps the spec is less than clear on the subject 16:51
xalbo How does it do that? Does infix:<+>(Code($), Numeric) get automatically defined, or manually, or is there something else that makes it work? 16:52
Tene what about: sub foo($n) { ... }; my $x = &foo + 5; ? 16:53
16:57 athenot joined, justatheory joined
pmichaud ....did the spec change wrt WhateverCode? oh dear. 16:57
16:58 locsmif joined
pmichaud +Alternately, for those unary and binary operators that don't care to handle 17:00
+C<*> themselves, it is automatically curried at compile time into a closure
+that takes one or two arguments. (See below.)
Ouch.
jnthn How do we know at compile time that the operators don't handle it themselves? 17:02
Or rather, how to those operators declare they will do so?
17:02 ash_ joined
pmichaud We know all of the signatures for operators in scope. 17:02
jnthn ...
*sigh*
pmichaud You're correct that this is a level of capability that Rakudo doesn't have at present. 17:03
jnthn Well, guess we ain't gonna be doing those in a hurry then.
pmichaud well, we have to have something in place to be able to handle @a[*-1]
jnthn Was the way it used to be really so bad. 17:04
HOw many times do things have to be re-designed?
*sigh*
pmichaud sure, I see the problems with the old way. The old way required a ton of function proliferation
PerlJam jnthn: until their design is "right" :)
jnthn I'll wait for one I'd prefer to implement then. :-)
pmichaud for every operator, we ended up with (Any, Whatever) (Whatever, Any) (Any, WhateverCode) (WhateverCode, Any) etc. variants 17:05
PerlJam Perhaps if there were some indication of "feature volatility" within the spec, you could use that to prioritize implementation
pmichaud PerlJam: except that's not really the driving force
PerlJam: implementation gets prioritized based on feature need, not volatility 17:06
jnthn pmichaud: Yeah, but you could handle that as a dispatch failure fallback-ish thing, like we do with junction auto-threading.
17:06 ash__ joined
pmichaud as Tene++ points out above, I am a little concerned about having to now have infix:<+>(Any, Code) variants 17:06
17:06 cotto joined 17:07 ggoebel left
PerlJam and user-defined ops would need to do the same or suffer breakage. 17:08
17:08 ash_ left, ash__ is now known as ash_
pmichaud well, "Code" just seems too unrestrictive -- it grabs a lot of things that don't have anything to do with Whatever currying 17:08
jnthn *nod*
pmichaud seems like we should still have a WhateverCode type
it's a little difficult to interpret this from the diff -- I should go read the original syn 17:09
TimToady fixing 17:12
pugssvn r29825 | lwall++ | [S02] clarify transitive nature of autocurrying 17:13
r29825 | reintroduce WhateverCode for that purpose
TimToady that should help some 17:15
PerlJam Arrays still don't interpolate in double quoted strings, right? 17:18
pmichaud in rakudo, not yet
use { }
PerlJam bummer
pmichaud "{@array} interpolates."
that might be more fixable with the new grammar, though.
colomon Seems like we could define infix:<->(Whatever, $a) to return a closure as a quick fix for @a[*-1] ?
ruoso jnthn, as a matter of implementation, you can cheat atm by having all the variants declared 17:19
pmichaud ruoso: yes, and we probably will go with that cheat (as we've done in the past)
but it means that user-defined operators won't work according to spec there
ruoso (unless you cheat by automatically declaring the variants when the operator is declared)
jnthn I still don't see the problem with auto-generation on multi-dispatch failure. 17:20
17:20 ggoebel joined
ruoso that would work too 17:20
pmichaud jnthn: it wouldn't fail
ruoso it's a cheat, tho
pmichaud Whatever ~~ Any
jnthn Ah.
:-/
ruoso ah...
right
jnthn wonders how much changing that would break, and guesses "far too much" 17:21
pmichaud even if that works, WhateverCode ~~ Code and Code ~~ Any
ruoso but automatically declaring the variants woudl work
jnthn hmm
TimToady jnthn: the problem with lazy generation is that it is probably post-optimizer, for any kind of classical optimizer 17:32
it would also tend to do the wrong thing with hypers and such 17:33
pmichaud I guess the only real reason this "hurts" is that it implies a level of scope detail that we don't have in Rakudo at present, but will ultimately have to have anyway
jnthn We'll need it for doing optimization stuff.
TimToady scope detail?
pmichaud right
jnthn I just didn't foresee us needing it "soon" as it were.
TimToady there is specifically not a lexical scope on these
pmichaud at present we don't have a way of seeing all operator variants from within the compiler
TimToady ah
jnthn TimToady: We need to know what variants are in scope.
TimToady yes, that is assumed
which is why multis are defined lexically 17:34
jnthn Right
pmichaud thus "scope detail" :-)
TimToady given that most of our multis end up deferring to underlying methods, I've tried to make it really easy to factor out the multis and inline the primitives where reasonable 17:35
pmichaud agreed there -- this is the first instance I know of where it becomes mandatory :)
TimToady if everything is lazy, we end up running slower, in the long run 17:36
pmichaud agreed
TimToady (in the absense of aggressive run-time optimization)
jnthn Right, that's what bothers me - I'd considered we could put this off until we write an optimizer.
Whereas now we kinda can't, plus it's for a feature we really want for R*, I guess.
TimToady and that's why I keep stressing that lexical multis are fundamental
pmichaud I'm not (yet?) arguing against the change, just noting that its mandating something we weren't prioritizing at the moment. 17:37
jnthn I never disagreed they weren't.
pmichaud I suspect our answer will be to cheat on operators/whatever for now (by explicitly declaring the variants, or auto-generating somehow)
jnthn That isn't the same as making sure the compiler has all such info to hand to make decisions on.
TimToady well, we can require the trait, and ignore whether any sigs match Whatever
pmichaud oh, that could work also 17:38
TimToady assuming any op that is *-aware has a proto to hang the trait on
seems like a way forward, and possibly cleaner anyway
pmichaud I think all of our ops ended up with protos anyway, for some other reason.
jnthn does wonder just how much effort it would take to make said info available...
pmichaud jnthn: definitely worth pondering :-)
jnthn Well, I guess I was pondering what to do for my next grant. :-P 17:39
pmichaud oooh, that's a good point :)
TimToady whateverness might just be a role
17:39 colomon left, ggoebel left
jnthn Well, I guess I gave us compile-time access (or at least easy potential for having it) for signatures. 17:40
pmichaud and Parrot's conversion of contexts into PMCs makes it easier to follow scopes 17:41
jnthn That sorta helps in that direction.
ruoso .oO( it would be kinda important for every parrot structure to be a PMC )
ruoso .oO( in terms of how far any introspection could go ) 17:42
pmichaud oh, one can introspect non-PMCs via opcodes and the like... but yes, having it as a PMC is much more direct and simpler
TimToady could sure use compact arrays of ints for string/buffer processing though... 17:43
ruoso pmichaud, my point is precisely on how far you can expose the introspection
pmichaud oh, I suspect we already have a form of "compact array of int" in Parrot. 17:44
whether it's sufficient to solve our other needs... I don't know yet.
jnthn The general case for compact arrays and structs is kinda trickier. :-)
We may be able to get away with such for Buf though. 17:45
TimToady well, the PDL folks'll want num arrays
and complex... 17:46
ruoso compact arrays can only be used for native types
17:46 ggoebel joined
ruoso otherwise they're regular arrays 17:46
pmichaud Parrot already has FixedFloatArray (for native nums)
and ResizableFloatArray
jnthn pmichaud: We may well want a more general approach though.
pmichaud: Though they could do for a first cut. 17:47
pmichaud jnthn: right.
ruoso more general as in "void*" ? ;) ;)
TimToady strings/buffers under NFG want int8, uint8, int16, uint16, int32 and uint32 arrays
jnthn ruoso: Or generic type style, etc.
TimToady the unsigned ones optimized for all precomposed chars (NFC) 17:48
jnthn The Big Thing I'd like to work on post-R* is getting us the native types, compact arrays, compact structs, cheaper attribute access rather than hash lookups all the time, etc. But it's a sizeable chunk of work. :-) 17:49
TimToady the signed optimized for non-precomposed NFG ints represented as negative chars
but yes, not necessary for R* 17:50
presuming we can prevent people from over-using misfeatures as we go forward
17:52 pyrimidine joined 17:55 eternaleye joined
pmichaud jnthn: in the (2009-08) ROADMAP, which of the "large-scale tasks" do you think are still blockers for us? (more) 17:55
jnthn: I'm thinking only D, G, H, and Z at present are "large-scale tasks". Most of the others we seem to have addressed. 17:56
jnthn Well taken in reverse, I think these ones are dealt with: A, B, C, maybe F
heh, our done and to-do lists mostly are opposites. That's good. :-) 17:57
pmichaud yes
okay, I can work from that
jnthn oh, I is not really an issue now I guess
J matters for R*, IMO.
pmichaud right, I'm thinking I is "done enough"
good point on J
jnthn (I done enough) +1
pmichaud for E, I'm thinking that while we need more work on lexical symbol handling, we now have the correct underlying model 17:58
jnthn E - we need to sort out some more bits of that.
jnthn re-reads it
Ah, we've dealt with some aspects of that, eys.
*yes
WE need lexical classes/lexical roles and lexical symbol importation 17:59
pmichaud I guess there's enough left to do that we should leave it in
jnthn Yeah, I think so.
pmichaud okay, I think that covers it well enough
short break for lunch here, then will update ROADMAP 18:01
18:01 meppl joined 18:02 bluescreen left 18:10 cami joined
pugssvn r29826 | lwall++ | [S02] add semilists as Slicel to go with Parcel 18:11
r29827 | lwall++ | [S29] restrict Matcher from taking Bool 18:12
18:17 ShaneC joined, bluescreen joined 18:21 stephenlb joined, dakkar left 18:27 ruoso left
pugssvn r29828 | lwall++ | [S03] when and ~~ to warn on direct use of "True" or "False" 18:27
18:28 jferrero left, spray left
m-locks jesus was a perl 6 programmer 18:29
TimToady what, the perl of great price?
m-locks ;P 18:30
18:43 ruoso joined 18:52 hicx174 joined 19:03 Chillance joined 19:13 justatheory left 19:14 cami left 19:17 rv2733 joined 19:19 justatheory joined 19:20 ruoso left 19:22 ggoebel left, pyrimidine left, pyrimidine joined 19:24 cotto left 19:28 zpmorgan joined 19:36 ruoso joined 19:50 xabbu42 joined
pmichaud TimToady: for today's conference call... 19:51
my $a; $a{'foo'} = 3; # autovivifies array to be a hash ?
(more coming, just a sec) 19:52
jnthn Where was the array?
PerlJam jnthn: it's an associative array :)
pmichaud sorry
let me start over....
my $a; $a{'foo'} = 3; # autovivifies $a to be a hash ? 19:53
my $a = Dog; my $b = $a{ :name<Fido> }; # treats $a as a Dog protoobject?
my $a; my $b = $a{'foo'}; # treats $a as a hash? 19:54
on another interesting topic... feather.perl6.nl doesn't seem to be ntp synchronized :) 19:56
TimToady yes, no, fail
WHENCE is special syntax with a name, I think 19:57
pmichaud okay, I'm lost. Dog{ :name<Fido> } is syntactic?
okay.
TimToady yes
jnthn Is there a non-syntactic-only form too? 19:58
s/-only//
pmichaud but WHENCE ...
jnthn That is, does the syntactic form desugar to something?
Hmm... 19:59
TimToady something mentioning WHENCE explicilty
jnthn :-)
pmichaud $x but WHENCE( { :name<Fideo> } ) # according to S12
jnthn Ah, ok
wfm, I think. :-)
pmichaud *Fideo
grrr
*Fido
20:00 athenot left
pmichaud phone 20:00
20:02 s1n joined 20:04 ignacio_ left, ignacio_ joined 20:14 daemon joined 20:18 uniejo left
pugssvn r29829 | pmurias++ | [mildew] method calls are emitted in -CoptC 20:23
20:31 ggoebel joined
pmichaud TimToady: oh, I just remembered a question... 20:34
your notes say that variables default to "Any" type -- do you mean this as "my $a" is the same as "my Any $a"? 20:35
TimToady too late :)
yes
pmichaud earlier when we were discussing this, I had been thinking that variables would still be type-constrained as Mu but would be initialized to Any
(which is what rakudo alpha effectively does)
and "type constrained as Mu" means effectively "unconstrained" 20:36
so, my $a; is similar to my Mu $a = Any
TimToady any reasoning other than performance?
pmichaud well, then the following remains valid: 20:37
my $a = 2|3;
if we constrain $a to Any, then one cannot assign Junctions to variables w/o explicitly declaring they're allowed. (Perhaps that's a desirable feature, though.)
TimToady I was thinking of it as potentially a feature. 20:38
pmichaud it does mean that a function can't return a junction to you unless you're explicitly willing to accept it :-)
I'm guessing the same holds for arrays; i.e., my @array; is actually my @array of Any; ? 20:39
TimToady yes, well, that is arguably a feature to everyone but Damian :)
20:39 mberends joined
pmichaud okay, we'll try it with the constraint then. 20:39
TimToady can always relax it later 20:40
pmichaud yes, it does impose some extra performance overhead
don't know if it'll be significant
jnthn I guess we'd better set "Any is the default type" in signatures like my ($x, $y) := foo(); too for consistency.
(They default to Mu now.)
pmichaud yes, there also.
jnthn pmichaud: If you're doing it, it's a one-line add. :-) 20:41
pmichaud not doing it yet -- working on roadmap and hackathon planning first
jnthn OK, sure. :-)
pmichaud I just had the question arise during the call and meant to ask but forgot :)
20:44 rhuxton joined
TimToady I suspect my next spec issue is to figure out how cmp/min/max/etc. can consistently deal with type mismatches and unorderable types 20:44
pmichaud +1
TimToady consistency may be antithetical to dwimminess, however 20:45
people expect all the numbers to sort like Reals
then there's the little matter of strings that look like numbers 20:46
the expectations themselves are likely insane 20:47
m-locks btw what compiler supports subsets? 20:49
now referring to gist.github.com/244255
jnthn Rakudo's alpha branch does.
They ain't back in master yet.
m-locks umm ok
pyrimidine ran into this myself just yesterday (lack of subsets in master) 20:50
m-locks i was playing around with it and thought i broke something cos rakudo got confused, but its all good
hmm i better get that alpha too just to be sure 20:51
20:53 ruoso left
m-locks hmm the .git file apparently points to master amirite? 20:55
20:55 hercynium joined
m-locks how do i get that alpha 20:55
PerlJam m-locks: git checkout -b alpha -t origin/alpha 20:56
jnthn git checkout origin/alpha
m-locks thx
PerlJam m-locks: Mine's just a more verbose version of what jnthn said.
rhuxton Newbie Q: The recent (v. interesting) capture/signature discussion here: use.perl.org/~JonathanWorthington/journal/40196 says "For any other object, we coerce to a capture by looking at all of the public attributes (things declared has $.foo) up the class hierarchy and making those available as named parameters."
Does this not violate encapsulation?
PerlJam (though mine will work on more versions of git :)
rhuxton: no 20:57
jnthn rhuxton: It's only using information that's available through introspection anyway.
PerlJam: Yours will also set up a local branch with tracking which is important if you want to commit, iiuc. Mine is only OK if you simply want to use it.
rhuxton: You'd have to have declared such attributes like "has $.x". A "has $!x" attribute won't be included. 20:58
rhuxton Realised I'm not clear there. If I remove attribute "foo", but replace it with a method to preserve the interface then it's not going to be available any more. Even though I thought I preserved the public interface.
PerlJam jnthn: yeah, I think I do tracking branches reflexivly these days :)
rhuxton: if you've kept the public interface the same, then nothing has changed. 21:00
jnthn rhuxton: Only if your definition of "preserving the public interface" doesn't include removing public attributes, that is.
rhuxton: It's not unique to Perl 6 to make attribute accessors and methods have different meanings. 21:01
'tis that way in C# too.
I can't just change a property into a method and consider it as not an interface change.
PerlJam rhuxton: though if you've replaced the "foo" attribute with "bar" by saying "has $.bar", you've just added to the public interface. 21:03
rhuxton I've been reading "public attributes" as "attributes with public accessors". Hmm - if the public interface of a class is more than just the methods that means sooner or later you'll end up with a "fake attribute" feature. 21:04
jnthn rhuxton: One thing that may make things less of a concern, mind, is that you can still write a "has $.x" and a method x that overrides the default accessor semantics.
That is, an accessor won't get generated for you if you wrote one of your own. 21:05
21:06 snarkyboojum joined
PerlJam rhuxton: "fake attribute"? 21:06
rhuxton jnthn: so I'm not gaining access to "$.x" but to the method "x" that (usually) maps to it? Hmm...
PerlJam: a "fake attribute" as an empty container that "handles" $.x because we don't actually have one. 21:07
jnthn rhuxton: Of course, if you're worried, there's nothing to stop you imeplemented method Capture() { ... } to define how you want your class to coerce. :-)
*implementing
PerlJam rhuxton: using "has $.foo" is the same thing as saying "has $!foo" and implmenting your own .foo accessors method only with more writing on your part :) 21:08
m-locks hardcore archiving action 21:09
rhuxton PerlJam: so are the accessors labelled "accessor" with whatever the property-labelling-thingummy is called? And if so, should that not be what we're looking at for the Capture() coercion (ta jnthn)? 21:11
21:11 hercynium left
TimToady I would be inclined to think that anything outside a class shouldn't care whether $.foo is an attribute or a method pretending to be an attribute 21:11
PerlJam rhuxton: er ... that's what's happening. 21:12
rhuxton: or are you worried about partitioning the accessors from the other non-accessor methods?
21:12 astrojp joined
jnthn TimToady: The issue is that when we're unpacking an object in a signature, it has to make a capture from that object for the binder. 21:13
TimToady: And at the moment it does that by doing .^attributes and looking for those that have an accessor.
TimToady oh, for a submethod then
so you're really looking at the $!foo list 21:14
jnthn TimToady: Yes, but you can tell if something was declared $.foo or $!foo
TimToady: We ignore anything that wasn't declared $.foo
rhuxton PerlJam: I'm not here worried about partitioning the accessors. I'm probably wondering whether I can define a method, label it an accessor and have the rest of the system treat it as such.
jnthn TimToady: So you can't get at anything you woudln't otherwise be able to get at.
TimToady but then what if we refactor so $.foo is a synthetic attribute, we lose our refactorability 21:15
this seems like a design issue with WHENCE objects
jnthn TimToady: Well, that's the concern rhuxton has.
rhuxton TimToday: Aha! What I was trying to say, but coherently.
PerlJam heh
jnthn TimToady: I'm not sure how big a deal it is or not though.
has $.language-designer handles 'problem' # :-) 21:16
TimToady as long as we have a way of saying named attrs outside of a WHENCE that just attach where appropriate
rhuxton jnthn: It happens often enough that I thought of it reading the (your?) article. And I'm not that bright.
jnthn TimToady: Sorry, I'm completely missing how WHENCE fits into this. 21:17
PerlJam isn't more like that anti-WHENCE because you're turning an object into a capture rather than the other way? 21:19
s/more/it more/
jnthn Heh, that's a curious way of looking at it. :-)
Not sure it gets an answer though...
Also, you can set privates from WHENCE.
Well, they provide things to BUILD anyway. 21:20
TimToady S12:780 is what I'm talking about
jnthn TimToady: OK, I'm aware of that bit of the synopsis, but not how it helps. 21:22
21:22 hercynium joined
jnthn TimToady: Given an arbitrary object, how do I produce a capture that can be used to bind against a signature? 21:22
(If it doesn't have a .Capture that says how to do it already, that is)
TimToady well, going that way, as long as some subobject or other supplies it, I guess a refactor ends up with the same named arg 21:23
though delegation could still mess you up
PerlJam jnthn: you just need to use the .to_JSON and .from_JSON methods that all objects have ;> 21:24
jnthn TimToady: Yes, but the named args we put into the capture are based on .^attributes, then checking if .has_accessor is true. 21:25
Or whatever the trait to check is called, I forget exactly...
TimToady: I'm struggling to see what you're suggesting the list of named params we should stick in the capture is made from. 21:26
TimToady well, it's probably okay for now; we can extend to other methods incl delegated ones later
rhuxton I think what I'm arguing is that (if there isn't one already) there should be an "accessor" label (trait?) that can be applied to any method. That's what my public attribute are then, because I've declared them as such.
jnthn OK.
TimToady it's more like the set of methods that have no args
which could include delegated no-arg methods 21:27
otoh, we might not have that info handy when we need it 21:28
jnthn yeah
The "is accessor" trait approach could work...
Though may be code-smell-ish.
PerlJam should there be an .^accessors to hide this behind in any case?
21:29 ignacio_ left
TimToady traits are usually code-smelly 21:29
21:30 pmurias left
TimToady afk & 21:31
21:31 pmurias joined 21:39 bluescreen left
rhuxton thx all - not sure I understood most of that, but I feel better that at least the question made sense :-) 21:40
21:40 kaare_ left
spinclad example: Real does Complex { method im #`[is accessor?] { 0 } } and exxp(Complex :(:$re, :$im)) { ... } # a function with no :(Real) multi candidate, this is the one that matches 21:43
*class Real ...
21:45 mssm left, rhuxton left 21:50 SmokeMachine left 21:54 justatheory left, lestrrat is now known as lest_away 21:55 justatheory joined 21:58 mssm joined 22:06 alester left 22:11 desertm4x joined 22:14 lest_away is now known as lestrrat 22:23 am0c joined 22:31 hercynium left 22:32 lue joined 22:33 Su-Shee left
lue hello! 22:34
(hello... hello... hello...) 22:41
22:43 iblechbot left
Tene Hi! 22:43
lue 'ello! 22:45
22:46 wknight8111 joined
lue I'm literally walking in Linus' footsteps, it seems. He uses KDE (which I do), and Fedora (which I do). He used Fedora originally for its support of PPC (me too!) 22:49
22:49 ash_ left 22:51 zpmorgan left 22:52 masak joined
masak does a flip in the air and lands on the floor of #perl6 22:52
phenny masak: 23 Feb 18:41Z <TimToady> tell masak re anon class is, see irclog.perlgeek.de/perl6/2010-02-23#i_2024709
masak TimToady: gotcha. thanks. 22:53
22:53 cdarroch joined, zpmorgan joined, cdarroch left, cdarroch joined
masak lue: hello! :) 22:53
lue oi! 22:54
Do you has a temporal update up yet? (Haven't bothered looking)
22:54 locsmif left
masak no, tonight I've been trying to make GGE put together a grammar. I got quite far but not all the way. 22:55
22:55 fda314925 joined
masak now I have a bunch of semi-confused questions for pmichaud, or whoever would like to provide a faithful simulation of pmichaud. 22:55
jnthn lolitsmasak 22:56
masak yayitsjnthn
...who is soon, by the way, moving in with the rest of us Swedes :)
where did I put that old "WELCOME" mat? 22:57
jnthn :-)
22:57 IllvilJa left
jnthn Yes, < 1 week left in Slovakia. 22:57
Still doesn't feel quite real.
masak changing country starting with an S always has an unreal feel to it.
m-locks whatcha doin there in slovakia 22:58
lue Who here can't wait for Rakudo die(*) ?
masak m-locks: turning beer into Rakudo code! :)
jnthn what masak said
:-)
m-locks ok :D
masak lue: come again?
lue: die-Star? 22:59
jnthn deathstar!
masak oh.
jnthn ...maybe. :-)
masak that's not a moon, it's a space station. :/
jnthn Oh well, at least it's got a big viewing window now.
lue Wait, that's telling it to kill * ... How about Rakudo die*() ( or die*(Rakudo) ) 23:00
jnthn m-locks: For last couple of years, I've not needed to live anywhere in particular (working entirely from home).
m-locks thats nice
jnthn m-locks: And somehow ended up in Slovakia. :-)
m-locks hows that place been
masak jnthn: do EnumMap objects accept any types of objects as keys?
jnthn m-locks: It's a small, but interesting and beautiful country, and it's been fun to try and learn some of the language too. 23:01
Also nice people, nice beer and nice food.
m-locks overall verdict: nice :)
jnthn masak: Yeah, though they coerce to Str, I believe, by default. 23:02
23:02 ggoebel left
masak jnthn: :/ 23:02
so, "no".
jnthn m-locks: Yes, I've enjoyed it.
I'm sure Sweden will also be enjoyable too. :-) 23:03
Though different. :-)
23:03 ggoebel joined
m-locks it will 23:03
jnthn masak: Right
23:03 lestrrat is now known as lest_away
masak jnthn: sometimes I fear that Rakudo Star will set some ugly precedents. 23:03
jnthn masak: I think you gotta say you want other key types.
masak jnthn: hash keys as Str-only being one of them.
jnthn: I want other key types. 23:04
:)
jnthn masak: Oh, the coerce to Str as default is spec, afaik.
masak even for EnumMap?
what about Int enum keys?
lue
.oO(A string-lock... what kind of locksmith _is_ EnumMap? :) )
jnthn masak: Good question. 23:05
masak TimToady++ # r29828
jnthn masak: For now also coerce to string but, well, hmm.
masak this is all part of what I fear might become too entrenched. 23:06
if that's the word. ingrained.
jnthn masak: It would perhaps be englightening to see what it'd take to make non-string hashes work. 23:07
Maybe we take a moment to play with that at $hackathon. 23:08
masak looks around for hugme
oh, well.
masak hugs jnthn :)
jnthn :-)
23:08 ggoebel left
masak hackathon it is. 23:08
jnthn Cool.
jnthn is glad that there'll be a few days totally set aside for Perl 6 things. :-) 23:09
masak jnthn: I almost created a GGE grammar today! :)
jnthn Wow!
masak yeah.
I hope to succeed in that before Copenhagen. it'd be really cool.
then I can try to make GGE parse Perl 6 code.
jnthn wonders how long before GGE can run on master. :-)
lue wants to feel excitement, but is unawares of GGE and such
jnthn masak: I figure you're still using alpha for now? 23:10
masak lue: GGE is a parser engine I'm writing.
jnthn: I'm so using alpha.
jnthn Makes sense.
masak jnthn: and GGE will, in a way, forever target alpha codebases.
lue: I'm kinda ripping off the code of some other guy (forgot his name), but I'm writing it in Perl 6 instead of Parrot Intermediate Code. 23:11
lue So, anyone can start a Grammar Engine if they wanted to? (No easy feat, I see)
masak oh, right. it's pmichaud++ who wrote the original. :P
the original's called PGE. it used to drive Rakudo. 23:12
23:12 IllvilJa joined
masak lue: well, it's tricky in places, but not near as magical as I suspected. 23:12
lue: then again, I'm aware that my brain has been warped by this task, more than any prior project, actually. I'm now forever a parserhead.
lue IIPMGE (Incredibly Intelligent Psychic Medium Grammar Engine)
masak lue: my sekkrit plan is to be able to parse Perl 6 code from within a Perl 6 program. 23:13
neither PGE or STD.pm allowed me to do that easily six months ago when I started. 23:14
lue \o/ (thinking of funny grammer engine names/acronyms for the heck of it)
23:14 ggoebel joined 23:15 payload1 left
snarkyboojum I love the idea of a time-travelling debugger (!) Sounds v. cool :) 23:15
masak snarkyboojum: let's go ahead and create it! :) 23:16
pmichaud 22:55 <masak> now I have a bunch of semi-confused questions for pmichaud, or whoever would like to provide a faithful simulation of pmichaud.
<- simulator available
masak \o/
snarkyboojum indeedy! :)
lue DYEGE (Doesn't Yet Exist Grammer Engine)
masak snarkyboojum: actually, there's no need to wait for the parser engine to finish. we can work off ASTs in the meantime.
pmichaud: ok, so. hai.
pmichaud: GGE::$!MATCH holds the metaclass object for GGE::Match, yes? 23:17
pmichaud as a horribly crufty workaround for other issues, yes :)
masak pmichaud: the generated regex code uses it to create new objects. why?
why not just call GGE::Match.new directly from that code? 23:18
pmichaud ummmmm
lue (GE Name) GENERAL (Grammar Engine Needing Extra Robitussin, At Least)
pmichaud I don't know about the generated regex code using it to create new objects
masak also, am I reading correctly that it's the GGE::Match.new code that decides the eventual type of the created object? and that it does this through a named parameter 'grammar'? 23:19
pmichaud I always thought the regex code used whatever match object was passed in
masak pmichaud: yes, but it starts by calling .new on it.
23:19 bkeeler_ joined
masak $!MATCH.new, to be exact. 23:19
hm, I guess that's the match object it'll eventually return. 23:20
pmichaud it always uses PGE::!$MATCH, iirc
not GGE::$!MATCH
masak right. PGE :)
sorry. :)
pmichaud okay, that was confusing me a bit :)
lue (GE Name) GREP (GRammer Engine Paradigm) :D
masak it's also the match object holding the other methods in the grammar. 23:21
pmichaud the whole $!MATCH business was a hacky workaround so that Rakudo could do matching using Rakudo Match objects instead of PGE PGE::Match objects
masak oooh.
then I don't need that right now. good.
pmichaud so, Rakudo would temporarily set PGE::$!MATCH to the protoobject for Rakudo's Match, call the function, then set it back. 23:22
or something like that.
looking.
masak ewww :)
jnthn Eww! :-D
jnthn tries to put back deferal, just for fun.
pmichaud yes, that's what it was doing.
23:23 lichtkind joined
pmichaud part of the problem was that pge didn't have a good cursor model underneath, and when one was finally created in STD.pm, it was too difficult to clean up PGE 23:23
23:23 pyrimidine left
lichtkind so 5 edits further away 23:23
masak pmichaud: understood. 23:24
pmichaud so as a workaround to resolve some masakbugs, I added the PGE::$!MATCH bit to allow the caller to say "I prefer this type of match object by default, please".
masak pmichaud: I suspect GGE is in the same pinch, but I don't see the depth of it all yet. :)
jnthn What goes around comes around. :-)
masak pmichaud: though it feels increasingly incestuous that basically all the types in the hierarchy descend from Match... 23:25
pmichaud PGE::Match.new(obj) always uses the type of obj if it happens to be isa PGE::Match. If it's not an instance of PGE::Match (or a subclass), then it creates an instance of the invocant
masak: we have similar issues in STD.pm, only everything derives from Cursor instead :)
masak oh noes :)
lue How would run the Perl6-coded GE? Using the Perl6-coded GE?
pmichaud nqp-rx at least separates Match objects to be entirely separate from cursor's :-) 23:26
*cursors
masak pmichaud: ok, [use type of old Match obj] good to know. thanks.
lue: try GGE and see for yourself. it's on github. 23:27
pmichaud in the new world of things, Grammar is Cursor
lue ((I can see why noone's written tests of S08))
masak lue: it's probably more complete than most people suspect.
lue masak: can I runs it on doctor?
pmichaud (in the old world of things, Grammar is Match)
23:27 hercynium joined
lichtkind masak: please check www.perlfoundation.org/perl6/index....m%C3%A4sak 23:27
masak pmichaud: I find it about as strange that Grammar should be Cursor, as that it should be Match. but oh well.
pmichaud masak: yes, everyone finds it strange at first 23:28
lichtkind masak: and you cant silence me on the november bug :)
pmichaud the question that resolves the issue -- if regexes are methods, what are they methods on?
masak lichtkind: you missed a few projects. :P
jnthn lichtkind: you missed a few hundred bug reports
masak pmichaud: point.
lichtkind masak: so please add it
lue rakudo: $a=1,2,"pi"; say $a.WHAT
masak lichtkind: in my copious spare time. :) 23:29
p6eval rakudo 59c65b: OUTPUT«Symbol '$a' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
lue rakudo: my $a=1,2,"pi"; say $a.WHAT
masak lichtkind: thanks for creating an article about me! lichtkind++
p6eval rakudo 59c65b: OUTPUT«Seq()␤»
pmichaud so, if regexes are methods in a grammar, and we want them to be invoked on a match-in-progress, then grammar needs to be a subclass of match-in-progress
lichtkind masak: if you tell me i can edit is also
lue rakudo: say Parcel(1,2,"pi",:a<b>)
p6eval rakudo 59c65b: OUTPUT«Could not find non-existent sub &Parcel␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
pmichaud rakudo: say (1,2,"pi").WHAT; # just checking.
p6eval rakudo 59c65b: OUTPUT«Parcel()␤»
lichtkind masak: im currently serious about bringing some serious content into wiki
currently we have articles about nealry all major heads and implementations 23:30
masak pmichaud: I had another question about the tests, but it resolved itself as I researched it further. :)
pmichaud excellent. The zen approach to bug fixing. :)
"Through inaction all bugs are eventually resolved."
lue I'm thinking of writing S08 tests... trying to figure out how to test it. 23:31
masak lichtkind: I'm appalled that you haven't even mentioned proto, my greatest unintentional success to date, as well as the biggest collaboration project in all of Perl 6 lang.
s/lang/land/
funny typo.
lichtkind masak: proto has a chapter in a page its not linked yet
pmichaud lue: keep in mind that some portions of S08 are likely out of date 23:32
masak lichtkind: 'module' should not have a capital 'm'. and the funny thing is that Web.pm isn't a module so much as a project of loosely connected modules.
lue rakudo: say (1,2,'pi')['pi']
p6eval rakudo 59c65b: OUTPUT«1␤»
masak lichtkind: you're very welcome to write that I blog occasionally. 23:33
lichtkind: did you catch my comments at irclog.perlgeek.de/perl6/2010-02-22#i_2019666 ?
lue rakudo: say (1,2,'pi')[2] 23:34
p6eval rakudo 59c65b: OUTPUT«pi␤»
masak std: &foo
p6eval std 29829: OUTPUT«ok 00:01 109m␤»
masak rakudo: &foo
p6eval rakudo 59c65b: OUTPUT«Symbol '&foo' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
masak alpha: &foo
p6eval alpha 30e0ed: ( no output )
masak submits rakudobug
pmichaud std: $x 23:35
p6eval std 29829: OUTPUT«Potential difficulties:␤ Variable $x is not predeclared at /tmp/2JjN6iaBDt line 1:␤------> $x⏏<EOL>␤ok 00:01 105m␤»
masak proof of a regression in three simple steps :)
pmichaud interesting.
masak pmichaud: &foo is not so much a variable as a bareword with a & in front.
pmichaud ...and it means...? 23:36
23:36 hsb left
jnthn meh. It's just a lookup of a thingy somewhere. :-) 23:36
masak pmichaud: 'the Code thingy you find when looking for "foo" in this scope'
lichtkind masak: yes yes leto helped me with that
pmichaud yes, I'm wondering where that "somewhere" is, though.
jnthn masak: We don't store subs in the lexpad and/or namespace as barewords anymore.
They are stored with the & 23:37
23:37 Aniya joined
masak but the spec is still the same. 23:37
jnthn pmichaud: Yes, maybe &foo always calls back to the namespace?
masak and STD.pm.
jnthn pmichaud: Note also
pmichaud jnthn: oh, certaily not.
jnthn rakudo: &infix:<+>
p6eval rakudo 59c65b: OUTPUT«Symbol '&infix:<+>' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
jnthn rakudo: &infix:<+>(1,2)
masak o.O
p6eval rakudo 59c65b: OUTPUT«Symbol '&infix:<+>' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 137 (compilers/pct/src/PCT/HLLCompiler.pir:101)␤»
jnthn gah :-|
pmichaud &foo(); my sub foo() { ... }
jnthn Well that is fail too
23:38 lest_away is now known as lestrrat
jnthn pmichaud: oops, I meant falls back 23:38
masak submits rakudobug
lichtkind masak: better www.perlfoundation.org/perl6/index....m%C3%A4sak ?
jnthn pmichaud: If there's nothing in the lexpad.
pmichaud jnthn: yes, the &infix:<+> bug showed up when you added the adverbs to names.
jnthn: but how can you know that in advance?
(nothing in the lexpad)
masak lichtkind: indeed better. thanks.
23:38 tboyd joined
jnthn You look in the lexpad first, and if nothing found, look to the ns? 23:38
pmichaud when subs defaulted to 'our' scope, &foo made a bit more sense to me.
jnthn *nod* 23:39
pmichaud jnthn: so, if I have:
jnthn OK, I guess the best answer I have is: what would STD do? :-)
pmichaud &foo(); my sub foo() { ??? }; &foo();
are the two &foo's identical?
masak lichtkind: if you're wondering, 'wrote with others' sounds a bit contrived. 'co-wrote' is more colloquial, methinks.
pmichaud or do we always generate code that says "look up lexical first, if not found then package" ?
lichtkind masak: true
jnthn pmichaud: I was thinking the latter. 23:40
lichtkind masak: changed that too
jnthn pmichaud: But may be wrong
pmichaud jnthn: so, perhaps &foo just forces a find_name opcode
masak lichtkind++
jnthn pmichaud: Yes, that was what I was pondering.
pmichaud that seems workable. 23:41
23:41 tboyd left
lichtkind to all: anything missing there www.perlfoundation.org/perl6/index....mentations ? 23:41
masak lichtkind: looks good to me. 23:44
lichtkind: s/feature rich/feature-rich/
lichtkind ah
masak: and each entry has an article :)
masak impressive :) 23:45
lichtkind masak: we need a bit wikified infos
masak feature-rich.. in german we would write featurerich 23:46
jnthn masaks's blog :-)
masak lichtkind: what jnthn++ said. that's a typo.
kind of a double genitive :)
jnthn But a cute one.
masak well, kill your darlings... 23:47
lichtkind jnthn: yes :)
but already gone
lue I like when
bkeeler_ What the heck is the point of S02-whitespace_and_comments/one-pass-parsing.t?
masak faster-than-lichtkind.
jnthn awwww...why ain't ma candidate list getting stuck in ma lexpad...
lue we respond with
Aniya i can't believe this!!!! who the f*ck are you to do this, DIEGOPOP??? www.youtube.com/watch?v=cAMMiiAcSjk
lue less than three
words in a 23:48
line. :)
masak Aniya: that doesn't feel extraordinarily on-topic.
lue *cough* ... wrong channel? (please say yes)
snarkyboojum lichtkind: still a typo at www.perlfoundation.org/perl6/index....orthington - 'developement' 23:49
snarkyboojum is a natural nitpicker :)
masak snarkyboojum: seriously. let's set aside some time for drafting up a time-travelling debugger, and then we'll win eternal fame and glory. when are you available? 23:50
lichtkind snarkyboojum: thanks an fixed too
lue masak: I'm available 30 minutes ago (hey, you said time travel)
snarkyboojum masak: I'd love to help out - but probably lacking knowledge/confidence :) 23:51
masak lue: I like your attitude. you can be on the project if you hand us results from the future so we don't have to write them.
Aniya i can't believe this!!!! who the f*ck are you to do this, DIEGOPOP??? www.youtube.com/watch?v=cAMMiiAcSjk
lue I had them. But not now. 23:52
masak would someone kick Aniya?
23:52 Aniya was kicked by jnthn (I can't belive this! who the f*ck are you to spam our channel?))
masak thanks. 23:52
23:52 Aniya joined
lue
.oO(maybe Aniya's a spambot)
23:52
aw hell
masak kickban, perhaps.
just a suggestion.
lue masak: I had the results. But not now. I will have them in the future, when I go into the past :)
23:53 Aniya left
pmichaud lue: okay, you can be on the project now. But you won't get any credit until sometime in the future, about the same time as you head into the past. :) 23:53
masak snarkyboojum: if it helps, I don't care very much about people's knowledge. the confidence has to be at some minimum level. but mostly it's about learning-as-you-go, so tuits and drive matter more than background.
23:53 jnthn sets mode: +bi #perl6!*@*
jnthn oh wtf 23:54
BinGOs heh
lue I has to be invited now? :(
snarkyboojum masak; sounds constructive to me :)
23:54 jnthn sets mode: -bni #perl6!*@*
masak snarkyboojum: the debugger sorta requires a runtime. but I guess one can fake even that part early in the process. 23:54
snarkyboojum masak: yeah, interesting to think about 23:55
23:55 athenot joined
lue 'Hey! who's that hoopy frood with the towel and time machine? Why that's lue of course, with masak and snarkyboojum!' 23:55
23:55 jnthn sets mode: +b Aniya!*@*
jnthn That's the one I wanted. 23:55
masak lue: :)
snarkyboojum: the smallest possible use case seems to be stepping back and forth over a couple of variable declarations and print statements.
BinGOs You might want your +n 23:56
masak snarkyboojum: after that, one could bring subroutines and calls into the mix.
lue (I just wanted to use the words hoopy and frood. Maybe I can sneak them into Esperanto somehow :D )
snarkyboojum masak: yep - piecemeal is good
masak lue: I have never seen those two words translated into Eo.
23:57 ComWT joined
BinGOs it just that without +n on the channel you don't have to be joined to the channel to send msgs to it. 23:57
masak snarkyboojum: and TDD is very good. if you want, you can borrow my sekkrit vapourware TDD technology. :)
snarkyboojum: just don't release it as a CPAN module without asking. :P
snarkyboojum tote?
masak yeah, at least an early ancestor of it. 23:58
snarkyboojum masak: coolio :) remember reading about it a while ago
jnthn BinGOs: Curiously, I didn't touch the n mode anywhere on purpose. :-/
masak snarkyboojum: I've been using it for half a year. need to bootstrap it up to a releaseable Perl 6 project Real Soon Now. 23:59
snarkyboojum masak: sounds sweet
lue masak: good thing I have a place to practice esperanto in (relatively) real life. :)
masak snarkyboojum: so, when do we start? with the Tardis debugger, I mean.
snarkyboojum hey, is proto supposed to work on the latest Rakudo?