»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:24 replore_ left 00:29 Exodist left 00:31 Exodist joined 00:35 shabble joined 00:36 kst joined 00:44 shabble left
japhb perl6: (42 but role { method gist { 69 } }).WHAT.say 00:47
p6eval niecza v10-40-ga57ed3d: OUTPUT«Int but ANON()␤»
..rakudo f6eb61: OUTPUT«69␤»
..pugs: OUTPUT«*** No such subroutine: "&role"␤ at /tmp/OHgLijeQrI line 1, column 2-36␤»
japhb Ah, looks like rakudobug then
sorear japhb: I doubt that 00:51
japhb perl6: (42 but role { method gist { 69 }; method Str { '28' } }).perl.say
p6eval rakudo f6eb61: OUTPUT«28␤» 00:52
..pugs: OUTPUT«*** No such subroutine: "&role"␤ at /tmp/_f8NPJ5ABQ line 1, column 2-57␤»
..niecza v10-40-ga57ed3d: OUTPUT«Int but ANON␤»
japhb sorear, why would WHAT defer to .gist?
And .perl defer to .Str?
sorear japhb: WHAT doesn't defer to anything
WHAT doesn't return a string
japhb Look at rakudo's output above ...
sorear *say* defers to gist
$foo.say means $foo.gist.say, I think 00:53
but it looks like I didn't finish implementing that in niecza
also, having gist return a non-string like that is a bad idea imo
perl6: say (42 but role { method gist { 69 } }).WHAT 00:54
japhb But why are .WHAT and .perl returning odd things in Rakudo?
p6eval pugs: OUTPUT«*** No such subroutine: "&role"␤ at /tmp/DTaJx9OYeu line 1, column 6-40␤»
..rakudo f6eb61, niecza v10-40-ga57ed3d: OUTPUT«69␤»
sorear japhb: you seem fundamentally confused about what WHAT does
japhb Quite possible.
sorear .WHAT returns a type 00:55
not a string
japhb sorear, yes, fine. So how is 69 in any way the correct type?
sorear japhb: 69 is not the type 00:56
japhb: say calls .gist to convert the type into a string
japhb: the type is not a string, so it cannot be directly printed
japhb: all non-string objects must be converted into strings before they can be printed
japhb OK, let me try again, a tad more precisely: Why is the *type* carrying the .gist of the *object*? 00:57
sorear because Perl 6 unifies class and instance methods
MyGrammar.parse(...) works *because* MyGrammar is an object of type MyGrammar
it is, specifically, the unique undefined object of that type 00:58
in particular, $anything.WHAT.WHAT is the same as $anything.WHAT
japhb Hmmm. 00:59
perl6: (42 but role { method gist($self :D:) { 69 } }).WHAT.say
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Colonpair traits NYI at /tmp/RThQBCoRI3 line 1:␤------> (42 but role { method gist($self :D⏏:) { 69 } }).WHAT.say␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.settin…
..rakudo f6eb61: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Capture'␤»
..pugs: OUTPUT«*** ␤ Unexpected "D"␤ expecting space or ")"␤ at /tmp/dxlmaDEKs5 line 1, column 35␤»
japhb perl6: (42 but role { method gist(Mu:D $self:) { 69 } }).WHAT.say 01:01
p6eval rakudo f6eb61: OUTPUT«Parameter '$self' requires an instance, but a type object was passed␤ in method gist at /tmp/vt6FGjn3aK:1␤ in sub say at src/gen/CORE.setting:4957␤ in method say at src/gen/CORE.setting:620␤ in block <anon> at /tmp/vt6FGjn3aK:1␤ in <anon> at /tmp/vt6FGjn3aK:1␤…
..pugs: OUTPUT«*** No such subroutine: "&role"␤ at /tmp/Lh4KrJLJzb line 1, column 2-49␤»
..niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤In parameter declaration, typename 'Mu:D' must be predeclared (or marked as declarative with :: prefix) at /tmp/6c2ZACTzcJ line 1:␤------> (42 but role { method gist(Mu:D⏏ $self:) { 69 } }).WHAT.say␤␤Parse…
japhb I seem to be digging the hole rather deeper 01:02
perl6: (42 but role { method gist(Mu:D:) { 69 } }).WHAT.say 01:03
p6eval rakudo f6eb61: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤ in method gist at /tmp/0CXhRVBcTi:1␤ in sub say at src/gen/CORE.setting:4957␤ in method say at src/gen/CORE.setting:620␤ in block <anon> at /tmp/0CXhRVBcTi:1␤ in <anon> at /tmp/0CXhRVBcTi:1…
..niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤In parameter declaration, typename 'Mu:D' must be predeclared (or marked as declarative with :: prefix) at /tmp/85PkHYV6w0 line 1:␤------> (42 but role { method gist(Mu:D⏏:) { 69 } }).WHAT.say␤␤Parse faile…
..pugs: OUTPUT«*** ␤ Unexpected "Mu"␤ expecting word character, "|", ":", "*", parameter name or ")"␤ at /tmp/y3uU6WgFBw line 1, column 28␤»
sorear it'd be less spammy if you just used rakudo:. pugs doesn't implement gist and niecza doesn't implement :D
japhb fairy nuff
01:04 kst left
japhb sorear, any ideas how to say "I want to override the .gist for object instances, but not for the type"? 01:05
01:06 ZapZ left
japhb Because without that separation, debugging my val() implementation is a pain in the keister. 01:07
01:08 colomon joined
sorear japhb: in rakudo I think you can do "multi method gist(Class:D :) { ... }" 01:13
niecza's current idiom is self // nextsamel
japhb rakudo: (42 but role { multi method gist(Mu:D:) { 69 } }).WHAT.say 01:15
p6eval rakudo f6eb61: OUTPUT«Int+{<anon>}()␤»
japhb \o/
So in all of that I think the thing I had not internalized was the unification of instance and class methods, and how that can be a pain when you are overriding a method that makes sense for both. 01:17
Anyway, thank you sorear++ for finding the eventual solution
And on that note, 01:18
dinner &
01:20 shabble joined
sorear o/ colomon 01:28
colomon \o
back home. :( 01:29
sorear oh?
what happened?
colomon son with upset stomach, wife has 10am doctor's appointment for tomorrow morning.
I'll survive, but I was hoping for one more morning wandering the woods.
colors are fantastic at the moment. 01:30
so, I just happened to be working on the GTK stuff again
sorear nom: say (method () { }).signature.perl
p6eval nom f6eb61: OUTPUT«:(Mu, Mu %_)␤»
sorear nom: class Pie { say (method () { }).signature.perl } 01:31
p6eval nom f6eb61: OUTPUT«:(Mu, Mu %_)␤»
sorear nom: class Pie { method pizza() { } }; say Pie.^find_method('pizza').signature.perl
p6eval nom f6eb61: OUTPUT«:(Pie, Mu %_)␤»
colomon I just figured out my TreeIter issue, I think, but ListStore.new is giving me trouble.
sorear RFC 01:32
sorear checks how nom is implementing this
colomon: care to share the trouble?
colomon my $store = ListStore.new(3, $G_TYPE_STRING, $G_TYPE_STRING, $G_TYPE_STRING);
No candidates for dispatch to CLR::Gtk::ListStore.new; candidates are: params GLib.GType[] & params System.Type[] 01:33
sorear what's the 3?
colomon number of columns
errr.... though I may be completely wrong about that
www.pygtk.org/docs/pygtk/class-gtkl...kliststore 01:34
sorear the error appears to say that there is no possibility for a System.Int32 argument
colomon huh
does that mean the value__ (from last night) is probably unneeded? 01:35
sorear probably
colomon hmmm, that doesn't seem to help
sorear there's no parameter to match the 3 though 01:36
3 cannot be coerced to GType nor Type
colomon right, I've already dumped it
my $store = ListStore.new($G_TYPE_STRING, $G_TYPE_STRING, $G_TYPE_STRING);
sorear how is $G_TYPE_STRING set?
colomon constant $G_TYPE_STRING = CLR::("GLib.TypeFundamentals,$GLIB").TypeString;
sorear oh 01:38
GLib.TypeFundamentals.TypeString is of type TypeFundamentals
for the signature, you need an object of type GType
such as GType.String
sorear monop -r:/usr/local/lib/mono/gtk-sharp-2.0/glib-sharp.dll GLib.GType 01:39
01:41 kst joined
colomon constant $G_TYPE_STRING = CLR::("GLib.GType.String,$GLIB"); makes things blow up spectacularly. 01:43
sorear CLR::("GLib.GType,$GLIB").String; 01:44
colomon yay! different error now! :)
involving ListStore.Set 01:45
01:45 packetkn_ joined 01:49 packetknife left
colomon oooo, looks like it works if I use SetValue instead. 01:52
or at least, it runs and doesn't give an error. now to figure out how to use the ListStore I create.
01:59 shabble left
sorear colomon: any errors you want help with? 02:14
colomon sorear: nope, taking a little break before I try to figure out how to convert the view creation code.
sorear apparently, I've managed to make a SubInfo class with *34* attributes 02:18
colomon *blink* 34?!
sorear yes, writing serialization code has made me aware of just how bloated this class is... 02:19
colomon sorear: goodnight. Thanks for your help again, I'll probably have more questions in the morning. :) 02:42
03:04 daniel-s joined
tadzik good day, internets 03:23
japhb o/ 03:29
rakudo: (True but role {}).say
p6eval rakudo f6eb61: OUTPUT«(signal SEGV)»
japhb Boo-yah.
Known?
03:35 skangas joined 03:36 jaldhar_ left
japhb bug filed then 03:36
03:38 envi_ joined
sorear o/ tadzik 03:49
tadzik hello sorear
03:52 skangas left, replore_ joined 03:56 jaldhar_ joined
moritz good morning 04:06
sorear good morning moritz!
tadzik good morning 04:07
04:17 satyavvd joined, molaf_ left 04:18 pnu left 04:20 pnu joined 04:45 packetkn_ left 04:49 gp66 joined
gp66 hello 04:49
04:52 skangas_ joined
gp66 use Net::SSH::Perl; 04:52
my $ssh = Net::SSH::Perl->new($host,debug=>1,use_pty=>1);
Name "main::pass" used only once: possible typo at Untitled2 line 17. 04:53
Can't locate object method "new" via package "Net::SSH::Perl" (perhaps you forgot to load "Net::SSH::Perl"?) at Untitled2 line 15.
error here
anybody help
????
how to run....................
04:55 gp66 left 04:56 gpk joined
gpk hello 04:56
Can't locate object method "new" via package "Net::SSH::Perl" (perhaps you forgot to load "Net::SSH::Perl"?) at Untitled2 line 15.
Can't locate object method "new" via package "Net::SSH::Perl" (perhaps you forgot to load "Net::SSH::Perl"?) at Untitled2 line 15. 04:57
my $ssh = Net::SSH::Perl->new($host);
antbody help 04:58
????????
moritz gpk: this is the wrong channel for Perl 5 help. We discuss Perl 6 here 04:59
gpk i want to login to unix server using perl 05:05
perl 6
how to do this 05:06
05:13 kaleem joined 05:14 gpk left 05:17 pnu left 05:19 pnu joined 05:20 beekor joined 05:21 koban joined 05:25 pochi left 05:26 pochi joined 05:30 kmwallio joined 05:31 kmwallio left 05:35 Sarten-X joined 05:54 dual joined 06:09 wtw joined 06:10 envi_ left 06:12 pnu left 06:14 pnu joined 06:15 pnu left 06:19 pnu joined 06:29 dual left 06:37 yves_ left
masak morning, #perl6 06:41
phenny masak: 07 Oct 05:19Z <sorear> tell masak After a careful rereading of 192.220.96.201/dylan/linearization-oopsla96.html , I beleive niecza is doing it right and Rakudo is only C2. I would like to discuss how you think Niecza is getting it wrong, and add tests.
masak: 09 Oct 16:10Z <[Coke]> ask masak to look at RT#77184
masak ooh, interesting.
seems I need to backlog a bit. :)
06:41 jkeats left
mberends o/ masak 06:41
masak has been srsly recharging batteries in the weekend and is... a bit behind
moritz \o 06:44
06:45 jkeats joined 06:52 sirmacik left 06:53 sirmacik joined
sorear MASAK! 06:53
o/
06:57 pnu left 06:59 pnu joined 07:03 pnu left 07:04 pnu joined
masak sorear: I'll read 192.220.96.201/dylan/linearization-oopsla96.html carefully too and get back to you during the day. 07:06
it would be just as wonderful to get to submit a rakudobug on C3 ;) 07:07
I see that [Coke]++ has attacked my part of the RT queue :) 07:10
07:10 sirmacik left 07:16 baest joined 07:19 SHODAN joined 07:20 mberends left 07:26 wamba joined 07:28 sirmacik joined, sirmacik left, sirmacik joined
moritz is C3 linearization any different than visiting the inheritance graph in breath-first search? 07:39
masak would breadth-first be monotonic? 07:40
seems it would stumble on adding an aunt class.
tadzik hi masak 07:41
masak cz tadzik
hm, maybe I'm imagining a case that doesn't happen.
moritz what is an "aunt class"? 07:42
masak the daughter class of a granny class ;) 07:43
but I think I'm worrying too much -- a granny class isn't an ancestor. 07:45
er, an *aunt* class isn't an ancestor, rather. 07:46
moritz I just tried the grids example from the OOPSLA paper 07:47
rakudo allows it serialize 07:48
niecza says "C3-MRO wedged!"
masak error message win! \o/
07:51 ab5tract joined
moritz all the examples of valid C3 linearizations that I've seen coincide with breadth-first search 07:52
(I've gone through www.python.org/getit/releases/2.3/mro/ right now)
masak moritz: what about the nieczabug I submitted that sorear says Niecza is right on? 07:53
moritz masak: got a link?
sorear class A {}; class B is A {}; class C is B {}; class D is C is A {}; # D C B A (ok, contrived)
sorear sleep
masak moritz: yes, hold on
github.com/sorear/niecza/issues/65 07:54
moritz rakudo: class A {}; class B is A {}; class C is B {}; class D is C is A {}; say D.^mro 07:56
p6eval rakudo f6eb61: OUTPUT«D() C() B() A() Any() Mu()␤»
masak that's breadth-first. 07:57
moritz nope
masak hm.
moritz in breadth-first, A comes directly after C
masak oh, right!
yeah, it turns out that my intuition doesn't just say breadth-first. 07:58
moritz sorear++ # nice example
masak my intuition also says something like "ancestors after all their descendents". don't know if that's actually true, but it says that. 07:59
moritz mine did, but I expect that to give D C A B for a while
masak: I hope it does :-)
masak oh, was that trivial? maybe it was. 08:00
anyway, that's why A can't come directly after C.
I guess it does in Perl 5, though.
but Perl 5 does depth-first IIRC.
08:04 pnu left 08:06 pnu joined
moritz unless you use mro 'c3'; 08:08
masak nod. 08:09
no, I meant the language, vanilla.
moritz hm, rakudo is closer to breadth first 08:12
masak I've read the C3 article once now. I'm more confused than before I started reading it. :/ 08:16
moritz same here 08:17
masak the C3 algorithm at the end looks promising for understanding things.
but I think in order to grok this, I'd need to sit down and TDD my way through the whole thing.
this is a new concept to me: en.wikipedia.org/wiki/Precedence_graph 08:19
interesting to see it used in the context of inheritance.
08:38 dakkar joined
masak rakudo: say so 'aa' ~~ /(.)$1/ 08:47
p6eval rakudo f6eb61: OUTPUT«Bool::False␤»
masak \o/
mls_ morning perl6!
masak mls_! \o/
mls_ C3 problems? 08:48
masak catching the above thinko at compile time sounds worthy and interesting.
and probably not that difficult. I might give it a try at some point.
mls_: yeah, mostly in understanding C3 ;)
who's right here, Rakudo or Niecza? github.com/sorear/niecza/issues/65 08:49
mls_ AFAIK rakudo's c3 implementation is pretty much the one given in the paper
masak then you have something to discuss with sorear++ 08:50
mls_ uh, confusing. Does niecza have a mro method?
(to rule out that nextsame is broken)
08:51 yves_ joined
masak niecza: class A {}; say A.^mro 08:52
p6eval niecza v10-40-ga57ed3d: OUTPUT«␤Unhandled Exception: Unable to resolve method mro in class ClassHOW␤ at /tmp/G9j8G08Ydi line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2134 (CORE modul…
mls_ mro in rakudo also says F, D, E, B, C, A 08:54
Oh wait, I don't know rakudo uses the algorithm from the paper. I compared it to the python implementation 08:58
www.python.org/download/releases/2.3/mro/
masak still, if the paper describes C3 and Python claims to use C3...
that's a pretty authoritative claim that they're the same. 08:59
mls_ true ;)
Oooh, python agrees with Niecza! 09:03
debugging...
masak mls_++ 09:08
I think there might be a blog post in here somewhere.
rakudo: say 1 ^^ 1 09:09
p6eval rakudo f6eb61: OUTPUT«Nil␤»
masak should be Bool::False, right?
09:11 F joined
masak rakudo: role A { my $!foo; }; role B { my $!foo; }; class C does A does B {}; say 'alive' 09:11
p6eval rakudo f6eb61: OUTPUT«alive␤»
09:13 daniel-s left
mls_ regarding 1 ^^ 1: pmichaud++ added a xor_nqp PAST node to nqp to fix a parrot problem 09:17
xor_nqp lets you specify the return value if all args are true (as in your case)
so Nil is returned on purpose 09:18
see commit cefbda4b 09:19
moritz masak: the spec previously had the "False in item context, empty list in list context" fossil
09:23 Trashlord left
moritz wants a precdence cutoff operator 09:23
1, 2 Z+ 5, 6 $ .join.say 09:24
where the $ basically puts parens out the previous construct
of course $ is probably a bad idea
masak moritz++ # "fossil" spelling 09:25
09:25 Trashlord joined
masak moritz: you can do precedence cutoff with statement_mod given 09:25
perl6: .join.say given 1, 2 Z+ 5, 6
p6eval rakudo f6eb61, niecza v10-40-ga57ed3d: OUTPUT«68␤»
..pugs: OUTPUT«1 52 6␤»
moritz troo 09:26
not sure it is as awesome as it could be though 09:27
09:31 orafu left, pnu left
masak I haven't felt a strong need for it in Perl 6 so far. 09:32
I'm used to the idea of $ working *forwards* as in Haskell, eliminating the need for parentheses.
but we already have that with listops in Perl.
09:32 pnu joined 09:33 orafu joined
masak the big mistake I tend to make with the Z and X metaops is forgetting that &map et al bind tighter than they do :) 09:33
wouldn't mind a parse-time warning for that one.
09:37 pnu left 09:38 pnu joined 09:40 ab5tract left 09:41 envi_ joined
mls_ regarding C3: rakudo's answer is not really wrong, it just doesn't use the first merge candidate 10:00
the fix is pretty simple, I'm currently testing it 10:02
Argh, spoke too soon... 10:05
moritz nom: say (1, 2, 3).flattens 10:07
10:07 wamba left
p6eval nom f6eb61: OUTPUT«Method 'flattens' not found for invocant of class 'Parcel'␤ in block <anon> at /tmp/iLg3wYL_NS:1␤ in <anon> at /tmp/iLg3wYL_NS:1␤» 10:07
moritz nom: say (1, 2, 3).list.flattens 10:08
p6eval nom f6eb61: OUTPUT«Mu()␤»
moritz nom: say [1, 2, 3].flattens
p6eval nom f6eb61: OUTPUT«1␤»
moritz huh?
shouldn't that be just the other way round?
10:11 lateau__ joined
mls_ fix for the C3 issue: gist.github.com/1275002 10:20
10:24 sftp left
mls_ spectesting 10:26
10:33 kaleem left
TiMBuS hrm. 10:34
mls_ moritz: can you also do a spectest? I've git an old version of rakudo here with some uncommitted changes. Thanks!
TiMBuS nom: 1, 2 Z+ 5, 6 ==> join ==> say #???
p6eval nom f6eb61: OUTPUT«␤»
moritz mls_: already running
TiMBuS well, its not an error
nom: 1, 2 Z+ 5, 6 ==> .join ==> say #???
p6eval nom f6eb61: OUTPUT«===SORRY!===␤Sorry, do not know how to handle this case of a feed operator yet. at line 1, near " say #???"␤»
masak moritz: also, why are the "truth" values returned Mu() and 1, not Bool::False and Bool::True? 10:40
10:44 molaf joined 10:45 wamba joined
masak today's proposed topic: direct attribute access vs. accessors (where either is possible) -- pros and cons. :) 10:49
moritz masak: I have no idea. Ask pmichaud
masak: topic rejected
mls_: spectests PASS
10:49 skangas_ is now known as skangas
masak phenny: ask pmichaud why are the return values of .flattens not Bool::True and Bool::False? 10:50
phenny masak: I'll pass that on when pmichaud is around.
masak moritz: uhm? I didn't mean /topic, I meant that I'm genuinely curious what forces lie behind that choice and would like to discuss it.
mls_ moritz: \o/ 10:51
moritz masak: ah
mls_ afk -> lunch
masak moritz: if you don't, that's fine, but rejecting the topic outright seems a bit harsh :P
moritz masak: I just thought we had that discussion a few times
masak we probably have. 10:52
moritz use accessors when you want the virtual meaning, and the attributes for writing or for direct storage access
masak the general consensus seems to be something like "accessors in methods, direct attr access in submethods".
flussence I prefer "do the simplest thing that could possibly work" :) 10:53
masak combined with what you said, I guess that means that methods are more "virtual" per default, and submethods decidedly aren't (because they don't inherit).
flussence: well, doing it with accessors when you can do it with private attributes goes against YAGNI in some sense.
dalek kudo/nom: abc6874 | moritz++ | src/Perl6/Metamodel/C3MRO.pm:
fix c3 MRO, patch by mls++
10:53 F left
moritz when reading an attribute, the question you have to ask is "if somebody subclasses and overwrites this, do I want the overwritten meaning?" 10:53
masak flussence: but *not* preparing for being overridden seems silly as well, if you know it's going to happen.
moritz: right. 10:54
moritz if the answer is "yes", then you $.foo. Otherwise use $!foo
masak it's a pretty deep decision to make. I often don't feel "ready" to make it as I write the code the first time.
traditionally I've had $!foo as the default for flussence's reason. it's conceptually simple.
but I'm coming around to $.foo in methods. 10:55
10:57 pnu left
masak moritz: when would be a case of the answer being "no"? 10:58
10:59 pnu joined, kaleem joined
moritz masak: when your algorithms rely on the result of the access being the same as you put into the attribute 11:02
masak hm. 11:06
moritz and for performance reasons 11:07
masak right. virtuality costs performance.
but if *that's* an issue, maybe Perl 6 isn't an ideal choice of language for one's problem.
moritz Complex and Rat use direct attribute access a lot 11:08
dunno if it would make sense to use the virtual accessors there
what would be a use case for overriding Rat.numerator? 11:09
masak I consider both those immuatable objects, so for me the answer is "there isn't any".
moritz you wouldn't sub Rat or Complex at all? 11:11
masak think not.
moritz *subclass
masak would probably use composition or something if I wanted (parts of) their semantics. 11:12
say, for an Amplitude class for making a quantum computer simulator :)
not that I would be secretly doing something like that.
flussence
.oO( /me wonders if someone'll one day come to complain that Rat is named too similarly to perl5's Mouse )
11:14
moritz masak: denial won't help :-) 11:15
masak moritz: dang. :P
masak .oO( good thing I didn't let slip about my wormhole simulator too ) 11:16
dalek ast: ba6e5a0 | moritz++ | S (2 files):
get rid of those passing TODO tests (rakudo)
11:17
ast: 24927b5 | moritz++ | S12-class/mro.t:
MRO tests
11:19
moritz I guess you've all seen www.dartlang.org/ by now.. 11:25
masak ooh
moritz (google's JS replacement project) 11:26
looks like a java/javascript hybrid with gradual typing
masak how exactly does it manage to have a lot of browser support already? 11:28
moritz it doesn't
but you can (or will can) compile it to JS
erm, I guess "will can" isn't allowed in English, is it? 11:29
"will be able to"
masak :)
"can" totally should have an infinitive form in English...
moritz maybe it will... :-) 11:30
masak ok, so Dart sits in the same categorical slot as CoffeeScript.
moritz then we shall can use it
masak moritz: let's start to can right away :)
masak .oO( canned response ) 11:31
moritz masak: with the slight difference that google will push a Dart VM to chrome
jnthn
.oO( It's for sure that a brewery will can beer... )
moritz just waited for something like that
masak moritz: I've seen talk about running CoffeeScript directly too. 11:32
thought the Chrome bit is nice, of course.
hm, String and RegExp are both a kind of Pattern... 11:33
I must say that that interface hierarchy looks really neat.
moritz masak: I still don't see them in the same category, because I think that the gradual typing will allow kick-ass performance
moritz wondered why Date isn't Hashable
masak maybe it's mutable. 11:34
moritz maybe
masak moritz: time will tell. with enough distinctions, everything is in its own category. ;) 11:35
moritz masak: aye :-)
11:36 Gothmog_ left
moritz it could be a nice target to compile Perl 6 to 11:36
11:38 Patterner left
jnthn More interesting than JavaScript. 11:38
(From a performance perspective)
(Due to the gradual typing.)
11:39 y3llow left, y3llow joined
moritz that's what I meant :-) 11:39
11:42 Psyche^ joined, Psyche^ is now known as Patterner
dalek p: fbe7f0b | mls++ | src/how/NQPClassHOW.pm:
backport C3 fix from rakudo
11:52
mls_ (back from lunch) 11:53
masak mls_++ 11:58
12:05 pnu left 12:07 pnu joined 12:15 satyavvd left
masak mls_: do you know if any spectests cover the fix you made to rakudo? 12:19
mls_ you mean the C3 fix? motitz++ added a test 12:20
moritz++
masak moritz++
12:21 pnu left, pnu joined
moritz nom: say 'a' ~~ /b/ 12:28
p6eval nom abc687: OUTPUT«=> <>␤␤»
masak nom: say '' 12:30
p6eval nom abc687: OUTPUT«␤»
masak why two newlines when the match fails? 12:31
nom: print 'a' ~~ /b/
p6eval nom abc687: ( no output )
moritz masak: because the way Match.gist works. I'm changing that...
will be #<failed match>
masak ok, nice. 12:32
that looks like Niecza's .perl syntax.
maybe Rakudo should converge on that?
moritz you should looka at the .gist of a succeeding match with a larger tree
masak: no, that's wrong as .perl
it doesn't eval back to the same object
masak right.
moritz nom: say ('a' ~~ /<alpha>/).perl 12:33
p6eval nom abc687: OUTPUT«Match.perl(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new("alpha", Match.perl(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new()), ))␤»
masak sorear countered that Match object can't be .new'd in userspace anyway. I don't know if that's right or not.
moritz why ever not?
masak moritz: is that output right? it says 'Match.perl(' 12:34
moritz oh, should be Match.new
masak++
masak \o/
I don't need to submit that as a rakudobug, do I?
moritz no
12:34 jaldhar_ left
masak then I'll skip it. 12:34
moritz nom: say eval q[Match.new(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new("alpha", Match.perl(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new()), )) 12:37
p6eval nom abc687: OUTPUT«===SORRY!===␤Confused at line 1, near "say eval q"␤»
moritz nom: say eval q[Match.new(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new("alpha", Match.perl(orig => "a", from => 0, to => 1, ast => Mu, list => ().list, hash => EnumMap.new()), ))]
p6eval nom abc687: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:513␤ in block <anon> at /tmp/VOZu8ESKAB:1␤ in <anon> at /tmp/VOZu8ESKAB:1␤ in sub eval at src/gen/CORE.setting:428␤ in block <anon> at /tmp/VOZu8ESKAB:1␤ in <anon> at /tmp/VOZu…
moritz nom: say EnumMap.new('a', 1).perl
p6eval nom abc687: OUTPUT«Default constructor only takes named arguments␤ in method new at src/gen/CORE.setting:513␤ in block <anon> at /tmp/v9w17h6bLQ:1␤ in <anon> at /tmp/v9w17h6bLQ:1␤»
moritz oh
that's why it doesn't work
nom: say EnumMap.new(a => 1).perl
p6eval nom abc687: OUTPUT«EnumMap.new()␤»
moritz nom: say EnumMap.new(a => 1).keys 12:38
p6eval nom abc687: OUTPUT«␤»
moritz how does one build an EnumMap?
masak what's an EnumMap? :)
moritz an immutable hash 12:41
masak rakudo: say Hash.new(a => 1).perl 12:43
p6eval rakudo abc687: OUTPUT«().hash␤»
masak well, that doesn't seem to work either.
moritz for hashes you can simply use {} 12:44
nom: say {}.EnumMap 12:45
p6eval nom abc687: OUTPUT«Method 'EnumMap' not found for invocant of class 'Hash'␤ in block <anon> at /tmp/G2YCryeN6u:1␤ in <anon> at /tmp/G2YCryeN6u:1␤»
masak if an EnumMap is an ImmutableHash, that really should work :) 12:46
by the way, EnumMap is kind of a silly name for ImmutableHash, isn't it?
moritz it's the thing used in an enum 12:47
masak well. that's like deciding to call Array LoopyThing
I use enums a lot. I've never used an EnumMap in code. 12:48
12:48 donri joined
masak ImmutableHash would carry more recognition and suggestiveness than EnumMap does. 12:48
also, it's kinda confusing that it's called 'Hash' (or 'Stash') in all other parts of the language, and suddenly 'Map' shows up. 12:49
PerlJam Seems fairly normal to me. A generic term to describe what it is (Hash) and a more specific term to describe how it's use (EnumMap) 12:50
masak so, you're suggesting EnumMap is a kind of Hash? 12:51
dalek kudo/nom: 38907e7 | moritz++ | src/core/Match.pm:
improve Match.gist for failed matches. Also correct Match.perl, masak++
12:52
PerlJam Well ... is-ness isn't so important as does-ness these days so ... I don't know. 12:53
12:53 donri left, donri joined
PerlJam It's a hash by reverse duck typing in a sense :) 12:54
masak PerlJam: turns out a Hash ISA EnumMap.
rakudo: say Hash ~~ EnumMap
p6eval rakudo abc687: OUTPUT«Bool::True␤»
12:55 jjore joined 12:56 SHODAN left, donri left, donri joined 12:59 GlitchMr joined 13:19 pnu left 13:20 wooden left 13:21 pnu joined 13:26 pnu left 13:27 pnu joined 13:28 Gothmog_ joined 13:32 Shozan joined 13:33 am0c joined 13:37 jaldhar_ joined 13:45 PacoLinux joined 13:52 satyavvd joined 13:55 satyavvd_ joined, skangas left, sftp joined
jlaire < masak> ok, so Dart sits in the same categorical slot as CoffeeScript. 13:56
dart seems fundamentally different from js in many ways, while CoffeeScript is just syntactic sugar (and not even good sugar, imo)
but if your slot are big enough, they can be in the same one :P
13:57 satyavvd left, satyavvd_ is now known as satyavvd
moritz "programming language" is a nice slot, no? :-) 13:58
13:58 skangas joined
masak I meant "languages which compile down to JavaScript but provide better abstractions than JavaScript" 14:01
jlaire ok. never thought about coffeescript that way 14:03
Shozan is anyone at gotocon? 14:04
masak jlaire: that seems to be the impetus for it. some things that should be easy and straightforward in JavaScript aren't.
Shozan am i able to watch the keynote online somehow?
14:05 wtw left
moritz masak: example? 14:05
14:05 grondilu joined
jlaire well, it does provide 'class' and other similar things 14:05
grondilu perl6: sub erat(Int $n) { grep none( map { $_+$_,$_+$_+$_ ...^ *>$n }, 2 .. $n ), 2 .. $n }; erat 100 14:06
masak moritz: most of the examples at jashkenas.github.com/coffee-script/ I guess.
p6eval pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
..rakudo 38907e, niecza v10-40-ga57ed3d: ( no output )
grondilu perl6: sub erat(Int $n) { grep none( map { $_+$_,$_+$_+$_ ...^ *>$n }, 2 .. $n ), 2 .. $n }; say erat 100
jlaire but most of it is just syntax and some comparisions are a bit unfair
p6eval pugs: OUTPUT«pugs: out of memory (requested 1048576 bytes)␤»
..rakudo 38907e, niecza v10-40-ga57ed3d: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97␤»
jlaire this js: (typeof elvis !== "undefined" && elvis !== null) should be written as (elvis != null) 14:07
that long form sure does make the 'elvis?' syntax nicer
masak :)
jlaire s/nicer/look nice/
masak sometimes "just syntax" does matter. there's a point at which quantitative improvements become qualitative, so to speak. 14:08
grondilu How do I relax raduko?
s/raduko/rakudo/
masak grondilu: do you mean 'no strict'?
grondilu no strict doesn't work, does it? 14:09
masak no, not yet.
there doesn't seem to be a screaming demand, either. :)
grondilu well, I'd like to have it.
perl6: sub prefix:<°>(Int $n) { return ^($n+1) }; °10 14:10
jlaire I also think CoffeeScript's implicit 'var' is a definite step backwards
p6eval pugs: OUTPUT«decodeUTF8': bad data: '\176'␤decodeUTF8': bad data: '\176'␤»
..rakudo 38907e: OUTPUT«===SORRY!===␤Confused at line 1, near "\x{b0}10"␤»
..niecza v10-40-ga57ed3d: ( no output )
grondilu niecza: sub prefix:<°>(Int $n) { return ^($n+1) }; say °10 14:11
p6eval niecza v10-40-ga57ed3d: OUTPUT«0..^11␤»
masak grondilu: out of curiosity, why would you like to have it?
grondilu masak: because often when I want to try something I run a 'perl -e' oneliner. I would spare some typing if I oculd skip the 'my' declarations. 14:12
jlaire
.oO( CoffeePerl6 )
or Coffee6 14:13
grondilu niecza: sub prefix:<°>(Int $n) { return ^($n+1) }; say ' '«~«°10
p6eval niecza v10-40-ga57ed3d: OUTPUT«␤Unhandled Exception: System.IndexOutOfRangeException: Array index is out of range.␤ at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0 ␤ at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename un…
grondilu niecza: sub prefix:<°>(Int $n) { return ^($n+1) }; say ' ' «~« °10
p6eval niecza v10-40-ga57ed3d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 21 (CORE Mu.Str @ 12) ␤ at line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/ST…
grondilu gives u
(p) 14:14
masak grondilu: ok. that seems a legitimate reason.
grondilu basically a '-r' options would be nice
(-r === --relax) 14:15
I find quite little documentation about junctions in the synopsises. Should I keep reading or is there a better place to look at? 14:16
m6locks how much documentation you want? short intro or in-depth? 14:19
grondilu in-depth. It's quite an interesting concept and I like to understand it fully.
I did read that junctions might allow parallelism in control flows. I'd like to learn more about that too. 14:20
14:21 pmurias joined
m6locks have you read this? www.perl.com/pub/2003/07/29/exegesis6.html 14:21
tadzik *yawn*, good morning 14:22
m6locks good * 14:23
grondilu m6locks: no. Of course I should read the exegesis more. Silly of me. I'll read that.
jlaire how much of that is still relevant? 14:24
grondilu oh indeed 2003 is quite old
Check out my erathosthene implementation: sub erat($n) { grep none( map { $_+$_,$_+$_+$_ ...^ *>$n }, 2 .. $n ), 2 .. $n }; How would you shorten that? :) 14:26
pmurias grondilu: re -r isn't "no strict" the default in one liners? 14:27
[Coke] pmurias: no strict doesn't work anywhere in rakudo. 14:28
even if that is the spec.
grondilu pmurias: 'no such option -r'
jlaire niecza: sub erat($n) { grep none(map { $_+$_,$_+$_+$_ ...^ *>$n }, 2 .. $n), 2 .. $n }; .say for erat(100) 14:29
p6eval niecza v10-40-ga57ed3d: OUTPUT«2␤3␤5␤7␤11␤13␤17␤19␤23␤29␤31␤37␤41␤43␤47␤53␤59␤61␤67␤71␤73␤79␤83␤89␤97␤»
jlaire grondilu: cute
grondilu :)
pmurias [Coke]: the spec is conflicted about that
[Coke]: it mentions that S01:148 14:30
jlaire looks more like trial division, though
pmurias s/that/in
[Coke]: that -e relaxes 14:31
jlaire (most haskell implementations of erathosthene's sieve are actually a different algorithm)
grondilu jlaire: it's the very naive implementation of erath. I'm sure there has to be a very elegant Perl6 implementation
pmurias [Coke]: while it gives an example of a starting 6 literal turing off the strict mode in -e '6;...'
14:32 lateau__ left, koban left, baest left 14:35 am0c left
GlitchMr niecza: (1 ≠ 0).perl 14:36
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Confused at /tmp/9BUV3eJv0p line 1:␤------> (1 ⏏≠ 0).perl␤␤Parse failed␤␤»
GlitchMr :(
grondilu perl6: sub erat(Int $n) { grep none(2..sqrt($n).Int X* 2..$n), 2..$n }; say erat 50 14:40
p6eval rakudo 38907e, niecza v10-40-ga57ed3d: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47␤» 14:41
..pugs: OUTPUT«*** ␤ Unexpected "X"␤ expecting operator, ":" or ")"␤ at /tmp/sIFyufY41W line 1, column 46␤»
colomon grondilu: I believe you can use the sqrt on both sides of the X* 14:42
grondilu colomon: no, it wouldn't work
it didn't work when I tried anyway. I need some brain power to figure out why 14:44
moritz if you check 8, 8 = 2 * 4, and 4 > 8.sqrt
or formulated differently, if you search for two divisors of $n, and $n is not a square, then one is always larger than $n.sqrt, and the other is always smaller
colomon ah, fair enough 14:45
I've spent all my life reasoning on more efficient (and much less elegant) versions of the sieve, and this one hurts my brain. :)
grondilu moritz: indeed, so why doesn't this work: sub erat(Int $n) { my $r = sqrt($n).Int; grep none(2..$r X* 2..$r), 2..$n }; say erat 20 14:46
?
rakudo: sub erat(Int $n) { my $r = sqrt($n).Int; grep none(2..$r X* 2..$r), 2..$n }; say erat 20
p6eval rakudo 38907e: OUTPUT«2 3 5 7 10 11 13 14 15 17 18 19 20␤»
colomon grondilu: it's like moritz++ says with needing one divisor less than sqrt($n) and one greater 14:47
grondilu oh ok I get it now
14:47 am0c joined
colomon rakudo: sub erat(Int $n) { my $r = sqrt($n).Int; grep none(2..$r X* $r..$n), 2..$n }; say erat 20 14:48
p6eval rakudo 38907e: OUTPUT«2 3 4 5 6 7 9 11 13 17 19␤»
grondilu so indeed the sqrt can be on only one side
colomon heh, that one almost works. :)
grondilu I wrote it already at 16:41
colomon ah
grondilu such a function could be fast if 'none' parallelizes and evaluates lazily. I guess. 14:50
colomon I don't think it reasonably can evaluate lazily
grondilu I meant the 'grep', not the none. But I'm no expert. 14:51
colomon I mean, we know that * won't return results smaller than its arguments in this case, but it's asking a lot for none to know that.
moritz the grep is layz, yes. But as soon as you use the list, the laziness is over 14:52
grondilu true
colomon all the effort goes to calculating the none expression anyway
moritz which you could at least memorize 14:53
my Mu $matcher = none(2..$r X* $r..$n)
grep $matcher, 2..$n
colomon you don't need to memorize it in the grep expression, do you? 14:54
it's not an eval, it's a single object
grondilu +colomon
grondilu agrees to colomon
s/to/with/
moritz ah right, it's not a closure 14:55
grondilu the recursive version would be interesting too, anyway.
colomon: I did not notice you use $r as a start for the second list. Nice idea :) 14:56
colomon grondilu: but it doesn't actually work, so it's not that nice an idea. 14:57
though it will be correct for all primes greater than $n.sqrt / 2, I think, so it's *mostly* right. :)
grondilu I confess I don't understand exactly why 14:58
15:00 grondilu left
moritz nom: say 20.sqrt 15:01
p6eval nom 38907e: OUTPUT«4.47213595499958␤»
moritz how do you filter out 4?
4 = 2 * 2
but the right list starts at 4
2..$x X* 2..$n 15:02
jlaire it wasn't filtered out?
moritz 16:48 <+p6eval> rakudo 38907e: OUTPUT«2 3 4 5 6 7 9 11 13 17 19␤» 15:03
jlaire yeah. 15:05
15:09 mtk joined, kaleem left 15:10 Chillance joined 15:14 im2ee joined
TimToady nom: 1, 2 Z+ 5, 6 ==> join '' ==> say() 15:16
p6eval nom 38907e: OUTPUT«68␤»
TimToady TiMBuS: ^^ 15:20
15:22 am0c left 15:23 risou_awy is now known as risou
TimToady masak: note that the main beneficiary of S12:2132 is to allow $.foo to be optimized to $!foo, so there is such an optimization, you should usually write $.foo where there's any possibility of derivation, and you mean the abstract attribute 15:27
15:28 bluescreen10 joined, bluescreen100 joined
TimToady i.e. writing $!foo for performance should probably be considered a premature optimization 15:30
(eventually)
15:31 Shozan left 15:32 BudiantoWang joined 15:33 kaare_ joined
BudiantoWang helo everyone 15:33
TimToady howdy 15:34
BudiantoWang :) this is my first time visit 15:35
TimToady how did you get here? :)
15:35 kfo_ joined
BudiantoWang coincidence :D 15:35
TimToady ooh, I like simple Venn diagrams 15:36
BudiantoWang looking for any perl scripts to work with lpadmin in unix
TimToady you're likelier to find them with Perl 5; Perl 6 is still a bit of a research project, and thin on useful code 15:37
so maybe try #perl or #perlhelp
BudiantoWang ah okay 15:38
thanks Tim :)
TimToady that's Toady... :)
Tim is the other name :)
15:39 kfo left
BudiantoWang ah :) okay , thanks Toady 15:39
:)
15:39 Aridai joined
TimToady sorear: why wasn't irclog.perlgeek.de/perl6/2011-10-10#i_4547875 a parsefail? 15:45
std: sub prefix:<°>(Int $n) { return ^($n+1) }; say ' '«~«°10
p6eval std 580b69a: OUTPUT«===SORRY!===␤Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/uqCKiT73rN line 1 (EOF):␤------> nt $n) { return ^($n+1) }; say ' '«~«°10⏏<EOL>␤Parse failed␤FAILED 00:01 130m␤»
15:45 donri left
TimToady niecza: sub prefix:<°>(Int $n) { return ^($n+1) }; say ' ' «~« °10; 15:49
p6eval niecza v10-40-ga57ed3d: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 613 (CORE warn @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 21 (CORE Mu.Str @ 12) ␤ at line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/src/ST…
TimToady that appears to a nieczabug
niecza: sub prefix:<°>(Int $n) { return ^($n+1) }; say ' ' X~ °10; 15:50
p6eval niecza v10-40-ga57ed3d: OUTPUT« 0 1 2 3 4 5 6 7 8 9 10␤»
TimToady speaking of hypers, TimToady is still thinking about unary hyper policy
15:51 tyatpi joined
TimToady wonders whether $x».foo should adopt a policy of attempting to dispatch .foo before trying to recurse, and only recurse if the dispatch to .foo fails 15:52
then things like ».[0] would work as expect, but the dispatch to a tree would be a bit more duck-typed 15:53
15:53 Aridai left
TimToady so that in $pond».quack only the ducks would quack 15:53
15:54 donri joined
TimToady note that, for compact arrays of numbers, we can still optimize the heck out of it, since we'll know that all or none of the values can quack 15:55
do sorear++ or jnthn++ see any problem with this?
or anyone else, for that matter?
15:57 envi_ left
moritz perl6: say Any.[0] 15:59
p6eval pugs: OUTPUT«Any␤» 16:00
..rakudo 38907e: OUTPUT«Nil␤»
..niecza v10-40-ga57ed3d: OUTPUT«Any()␤»
PerlJam TimToady: what happens if the .foo() calls fail at the leaves?
im2ee Hello! :) 16:01
moritz TimToady: I think it's not robust under addition of methods to container classes
if Array of Duck learns to .quack, $tree>>.quack stop quacking as it did before 16:03
16:03 skangas left
moritz and in general for tree traversal we should designate some mechanism to mark and recognize objects as containers that are traversible 16:04
(or ist that ~~ Positional|Associative ?)
colomon Iterable? 16:07
moritz nom: sayh Hash ~~ Iterable 16:08
p6eval nom 38907e: OUTPUT«Could not find sub &sayh␤ in block <anon> at /tmp/sRmxrjXMsw:1␤ in <anon> at /tmp/sRmxrjXMsw:1␤»
moritz nom: say Hash ~~ Iterable
p6eval nom 38907e: OUTPUT«Bool::True␤»
TimToady well, ».[0] is not robust under addition of structure :) 16:13
PerlJam I just worry a little bit about heterogeneity.
TimToady and I think the chances that your structure is going to get more complicated is much, much greater than the chances you're going to add a .quack to array objects 16:14
16:14 pnu left
TimToady PerlJam: with regard to your question, we could have those leaves return Nil or some such, and leave interpretation of that till later 16:15
er, no pun intended
also, the user is much more likely to be cognizant of the nature of shallow objects than deep objects 16:16
16:16 pnu joined
TimToady so it seems likelier to be what they're thinking to stop on first success, depthwise 16:16
the method called may well wish to go deeper on its own 16:17
PerlJam true
TimToady the more I think about this, the righter it feels, which is a good sign...usually... 16:18
PerlJam so, when you say "recurse", you're only talking about one level? 16:19
and is there still a »» op for "all the way down" ?
16:19 BudiantoWang left
TimToady each level makes the decision whether to quack or to look for more ducks lower down 16:19
I suspect a .leafwalk would be more appropriate than »» 16:20
or whatever it's called
.oO(operators will happen)
.leafmap, more likely 16:21
PerlJam so ... the only place where this fails is when you have an aggregate with a same named method as the components and they mean different things, right? 16:22
TimToady maybe a .leafgrep, that prunes away branches without matching leaves
yes, though of course there are common methods like .[] 16:23
but my experience meshes with want .[] at the shallow level mostly 16:24
*wanting
and, in fact, it's impossible to use .[] at all in the current setup 16:25
but I used ».<foo> heavily in my scorekeeping program, and had to rewrite all those as .map: *.<foo> to get them to work under current rules 16:27
mls_ perl6: my $i; { $i++; next; $i--; } 16:30
p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/qvRUPFPVvi line 1, column 16-20␤»
..niecza v10-40-ga57ed3d: OUTPUT«␤Unhandled Exception: Illegal control operator: next␤ at /tmp/flbntEVTb3 line 1 (MAIN mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2134 (CORE module-CORE @ 58) ␤ …
..rakudo 38907e: OUTPUT«Warning␤»
mls_ perl6: my $i; { $i++; next; $i--; CATCH { default {} }} 16:32
p6eval niecza v10-40-ga57ed3d: OUTPUT«␤Unhandled Exception: Illegal control operator: next␤ at /tmp/4MRista9Xh line 1 (MAIN C1_ANON @ 2) ␤ at /tmp/4MRista9Xh line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CO…
..rakudo 38907e: OUTPUT«Warning␤»
..pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/Uj8txqEMlP line 1, column 16-20␤»
tadzik Warning 16:33
mls_ (that warning is from the control exception being caught)
perl6: my $i; { $i++; next; $i--; CONTROL { default {} }}
p6eval rakudo 38907e, niecza v10-40-ga57ed3d: ( no output )
..pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/BdvtchLB2n line 1, column 16-20␤»
mls_ perl6: my $i; try { $i++; next; $i--; } 16:34
p6eval niecza v10-40-ga57ed3d: OUTPUT«␤Unhandled Exception: Illegal control operator: next␤ at /tmp/WKTSHtjGbl line 1 (MAIN C1_ANON @ 1) ␤ at /tmp/WKTSHtjGbl line 1 (MAIN mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2133 (CORE C1024_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CO…
..pugs, rakudo 38907e: ( no output )
mls_ (I made try {} behave like CATCH in my branch, so it doesn't catch control exceptions anymore) 16:35
moritz \o/ 16:37
pmurias TimToady: is 'no strict' the default under -e? 16:38
mls_ moritz: btw your try {} return value problem seems to be already solved with the pct changes, right? 16:39
TimToady pmurias: supposed to be
but nobody implements no strict yet
moritz mls_: yes
TimToady I have discovered one potential problem with duck-typed unary hypers 16:40
moritz everybody, what do you think of returning a Failure (just like fail() does) from a failed try { } block?
pmurias TimToady: ok, the spec represents too different opinios so i should fix that
s/too/2
moritz that has the advantage of the return value not being .defined and not True either
TimToady which is that composite structures respond to things like prefix:<-> 16:41
moritz but that $!, the actual exception, can be both
so you can both say
if not defined( try { ... }) { ... }
and
try { ... }; if ! $! { ... }
*and* have all the information in the return value of try
TimToady actually returning the failure means it's likely to blow up in sink context 16:42
unless we make people say try {...} // nop;
moritz hm, I hadn't thought of that
or maybe the failure is marked as handled already 16:43
TimToady what about returning Nil, and leaving the info in $!
we're not really trying to be bulletproof with the $! mechanism in any case 16:44
moritz nom: sub f(*@a) { say @a.elems }; f 1, Nil, 2
TimToady bulletproof is the bailiwick of CATCH
p6eval nom 38907e: OUTPUT«2␤»
sorear masak: a part of the question is how much should Match.perl print. For instance what about .orig? 16:47
TimToady it would be simpler if we can always treat Failure as unhandled, and $! as non-dangerous info
moritz TimToady: yes, I agree
moritz retracts his proposal
sorear moritz: Niecza's EnumMap is a relation with two indexes because I wanted both Int->Enum->Str and Str->Enum->Int coercion sequences to be fast 16:48
TimToady such that "handling" a Failure means throwing it in the proper recepticle :)
it's also a bit like Haskell's Map 16:49
16:50 kaleem joined 16:51 mberends joined
sorear TimToady: I don't see why it should be a parsefail. It's no different from $x + -$y, ne? 16:51
TimToady it's a subscript with no trailing »
looking at the non-WS case 16:52
perl6: say (-«[[1,2,3],4,5]).perl 16:53
p6eval rakudo 38907e: OUTPUT«([-1, -2, -3], -4, -5)␤»
..pugs: OUTPUT«decodeUTF8': bad data: '\171'␤((-1, -2, -3), -4, -5)␤»
..niecza v10-40-ga57ed3d: OUTPUT«[[-1, -2, -3], -4, -5].list␤»
TimToady this would break with a naïve implementation of duck hypers
I wonder if there's any easy way to dispatch without Any/Cool dwimmery 16:54
dalek ecs: cbb7273 | moritz++ | S12-objects.pod:
[S12] be explicit that Perl 6 uses C3 mro
sorear TimToady: your 1h-ago statement about ».foo's main "problem" is that it requires ».foo to be a special case - currently it compiles to something like hyperunary({ $^a.foo }, $LHS) - but this doesn't allow hyperunary to "see" the dispatch so a new ABI is needed - I don't know if this is a real problem
TimToady I'm kinda turning that argument around and saying that, if the desugar is easy, the user can do it instead with .leafmap or some such 16:55
and » ought to do the harder thing
esp since type info lets us optimize it anyway
16:56 satyavvd left
TimToady one not-very-palatable way to solve the -« problem would be to say that prefixes always do .leafmap, and only postfixes do the duck mapping 16:57
sorear TimToady: fwiw, "returning Nil, and leaving the info in $!" is niecza's current behavior
TimToady I'd rather keep them symmetrical though
which implies some way of forcing -« not to use - on an Array
moritz nom: my @a = 1, 2, 3; say @a.uc 16:58
p6eval nom 38907e: OUTPUT«1 2 3␤»
moritz nom: say Array ~~ Cool 16:59
p6eval nom 38907e: OUTPUT«Bool::True␤»
TimToady possibly prefix/postfix symmetry breaking is the most practical answer 17:00
otoh, +«[[1,2,3], 4,5] probably doesn't do what the user expects, if they're hoping for ».elems
if we go deep on the prefixes 17:01
17:03 dakkar left 17:13 GlitchMr left 17:16 gbacon joined
sorear reads the last few spec patches 17:19
So it's no longer possible to prime a function with Whatever?
TimToady you can prime it with Whatever, but not with * 17:20
:D vs :U 17:21
moritz nom: say * === *
p6eval nom 38907e: OUTPUT«_block1010␤»
TimToady or other way around
sorear niecza: say * === *
p6eval niecza v10-40-ga57ed3d: OUTPUT«{ ... }␤»
sorear niecza: say (*) === (*)
p6eval niecza v10-40-ga57ed3d: OUTPUT«Bool::False␤»
moritz nom: say (*).WHAT
p6eval nom 38907e: OUTPUT«Whatever()␤»
moritz niecza: say (*).WHAT 17:22
p6eval niecza v10-40-ga57ed3d: OUTPUT«Whatever()␤»
moritz nom: say (*) === (*)
p6eval nom 38907e: OUTPUT«_block1010␤»
sorear niecza allows using extra parens to subvert (most) syntactic rewrites
moritz nom: say (my $ = *) === (my $ = *)
p6eval nom 38907e: OUTPUT«Bool::True␤»
sorear (*) appears as a Paren node so syntactic rewrites don't apply
moritz sorear: I think * should be a singleton
sorear: so it should be True like in rakudo 17:23
sorear exception: if the interior of () is a WhateverCode, () does not create a Paren node
TimToady that's kinda what I meant with :D vs :U
sorear moritz: should be, yeah, but where to stash the value?
something like Whatever::<$INSTANCE>? 17:24
moritz well, however you implement a singleton 17:26
sorear fiar
TimToady constant '*' of Whatever .= new; :)
moritz class Whatever { method new() { state $ = self.bless(self.CREATE) }} }
or something
sorear what happens if you pass an existing object to bless? 17:27
moritz dunno 17:28
I just didn't want to write self.bless(*) :-)
[Coke] -> (13:24) From Sue D. Nymme [-.-], to perl: 17:29
- Is it petty that I want a 'sayf' command (formatted 'say'), to auto-newline
- printf?
TimToady well, given it saves only 1 character... 17:30
moritz .fmt.say
TimToady anyway, * feels more like a constant to me 17:31
TimToady has been tempted to allow the constant '@#$#' syntax 17:32
moritz TimToady: thank you for resisting 17:33
TimToady but it's not clear to me that * is anything other than constant '*' = Whatever.new; 17:34
.oO(the simplest thing that could possibly work)
17:35
17:35 risou is now known as risou_awy
sorear * is syntactically special in a couple places though :) 17:35
TimToady good reason for it to be a BEGIN-time entity, then :) 17:37
dalek Heuristic branch merge: pushed 22 commits to rakudo/optimizer by moritz 17:40
TimToady seriously, though, in thinking ahead to wanting to define unicode symbols, there are many mathematical symbols that are not alphanumeric, so I wonder whether there's a rule in definitions that can deal with parsing space-delimited terms at their point of definition
in which case it would just be constant * = Whatever.new;
perl6: constant term:<*> = Whatever.new; # but we do have this, I guess 17:41
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Colonpair traits NYI at /tmp/NRXrMWn3xD line 1:␤------> constant term:<*> ⏏= Whatever.new; # but we do have this, ␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line …
..rakudo 38907e: OUTPUT«===SORRY!===␤Cannot handle constant term with non-literal value yet at line 1, near "= Whatever"␤»
..pugs: OUTPUT«*** ␤ Unexpected "<*>"␤ expecting word character, ":" or "("␤ at /tmp/AlbBNpLZwR line 1, column 15␤»
TimToady but for constants, the term:<> is redundant 17:42
17:44 GlitchMr joined
TimToady std: sub ∰ ($x) {...} 17:45
p6eval std 580b69a: OUTPUT«===SORRY!===␤Malformed block at /tmp/xXsR1Iu3hJ line 1:␤------> sub ⏏∰ ($x) {...}␤ expecting any of:␤ name␤ routine_def␤ trait␤Parse failed␤FAILED 00:01 118m␤»
TimToady many folks would like such declarations to Just Work 17:46
.u ∰
phenny U+2230 VOLUME INTEGRAL (∰)
TimToady the most elegant prime generator we have currently is probably the one at rosettacode.org/wiki/Count_in_factors#Perl_6 17:53
though maybe we can use nested ... now 17:54
also, it arguably depends on a b bug
should be defined not as my @primes := but as constant @primes =
in order to avoid blowing away @primes ref we're using recursively 17:55
[Coke] wonders if there is a rosetta code test target that makes sure all these timtoady snippets work.
mikemol [Coke]: No. Not easy right now, because RC is not very programmatically readable.
[Coke] TimToady: splice() not implemented in class 'Mu' 17:56
(from your URL)
mikemol However, I can vouch for the Count_in_factors example working back when he revised my initial go at it.
mikemol really likes that prime generator
TimToady and, of course 'my @primes =' doesn't work because that's eager, though I guess ...* would force it lazy in nom
unfortunately, as sorear++ pointed out once, the := should change the referent of @primes, which would break it 17:57
so it needs the more definitional = supplied by constant 17:58
or the forced laziness of ... *
mikemol However, the code on RC should be reasonably-well-formed(tm) XHTML, and you should be able to pick out any Perl6 snippets by taking the inner content of any div with a 'perl6' class and stripping out the syntax highlighting code. So, two passes against DOM manipulations. 17:59
TimToady nom: my @x = 1 ... *; say @x[10]
p6eval nom 38907e: OUTPUT«11␤»
TimToady which works there
mikemol By "code on RC", I mean "HTML-ish stuff generated by MediaWiki"
TimToady so nom could do it with 'my @primes =' if the other bug weren't there
18:01 benabik joined
sorear mikemol: why would it not be easier to attack the database dump directly? 18:02
it's not like this is wikia :D 18:03
mikemol sorear: Well, for starters, I'd have to make the db dump available. :)
Beyond that, you'd have to parse wikicode, rather than HTML.
er. Rather than XHTML.
And XHTML is much, much prettier.
Writing a parser for wikicode would give me nightmares.
Though if you're comfortable parsing wikicode, you could grap URIs like this: rosettacode.org/mw/index.php?title=...action=raw 18:06
(Because that's what I expect you'll find in the database) 18:07
As I understand it, MW keeps the latest version in wikicode, and keeps diffs between versions so you can go and view page history.
Now, I recall there were committments I made in making it easier to grab code from RC. That's dependent on me getting this server migration finished, and that can't happen until I get this stupid SSL+squid+apache thing working right. :-| 18:09
Anyway, I'm focusing on work again
mls_ afk -> home 18:13
18:23 replore_ left
ashleydev Any interest in upcoming talk: "Writing a compiler in Haskell and LLVM"? 18:27
18:27 kmwallio joined
ashleydev in Mt. View wednesday evening: accu.org/index.php/accu_branches/accu_usa/next 18:28
who's coming?
benabik ashleydev: I'm interested but the commute's a little painful. :-D 18:29
[Coke] Mt. View... CA? 18:31
18:38 tyatpi left
TimToady I could walk there in about 20 minutes, but have a prior commitment, alas 18:40
18:40 PacoLinux_ joined
moritz masak: I'm surprised by your reply to RT #76466 18:41
rakudo: sub foo { my $y; our sub bar { say $y } }; bar
p6eval rakudo 38907e: OUTPUT«Could not find sub &bar␤ in block <anon> at /tmp/bc6n2itWko:1␤ in <anon> at /tmp/bc6n2itWko:1␤»
moritz "For what it's worth, I don't think it's incorrect behavior. Perl 6 18:42
semantics *used* to find &bar in the above case, but no longer does.
(This is part of a general trend of Perl 6 leaning more and more heavily
on lexical scoping as a guiding principle.)"
... that's why I said 'our'
18:47 Holy_Cow joined 18:48 Holy_Cow left
GlitchMr niecza: (1 ≠ 0).perl 18:48
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Confused at /tmp/fymEi0VEK2 line 1:␤------> (1 ⏏≠ 0).perl␤␤Parse failed␤␤»
GlitchMr niecza: (1 ≠ 0).perl; "€ Unicode ł force €" 18:49
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Confused at /tmp/Lmg11PaHcM line 1:␤------> (1 ⏏≠ 0).perl; "€ Unicode ł force €"␤␤Parse failed␤␤»
GlitchMr Just testing if my client uses Unicode and not Windows-1252...
benabik .u ≠
phenny U+2260 NOT EQUAL TO (≠)
benabik Seems to.
GlitchMr OK, is it possible to implement ≠ as alternative to !=...? 18:51
Silly proposal, but whatever 18:52
benabik By spec, you can implement your own infix:<≠> operator, but I don't know if any implementation supports that yet.
GlitchMr OK :)
moritz nom: sub infix:<≠>($a, $b) { $a != $b }; say 5 ≠ 8 18:54
p6eval nom 38907e: OUTPUT«===SORRY!===␤Confused at line 1, near "say 5 \u2260 8"␤»
moritz b: sub infix:<≠>($a, $b) { $a != $b }; say 5 ≠ 8
p6eval b 1b7dd1: OUTPUT«Bool::True␤»
GlitchMr :)
benabik niecza: sub infix:<≠> { $^a != $^b }
GlitchMr More Unicode is always awesome.
p6eval niecza v10-40-ga57ed3d: OUTPUT«Potential difficulties:␤ &infix:<≠> is declared but not used at /tmp/wyUnHLFR96 line 1:␤------> sub infix:<≠> ⏏{ $^a != $^b }␤␤»
benabik niecza: sub infix:<≠> { $^a != $^b }; say 5 ≠ 8
p6eval niecza v10-40-ga57ed3d: OUTPUT«Bool::True␤» 18:55
GlitchMr rakudo: sub infix:<≠>($a, $b) { $a != $b }; say 5 ≠ 8
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Confused at line 1, near "say 5 \u2260 8"␤»
GlitchMr .u 2AEC
phenny U+2AEC DOUBLE STROKE NOT SIGN (⫬)
GlitchMr .u FF62
phenny U+FF62 HALFWIDTH LEFT CORNER BRACKET (「) 18:56
GlitchMr .u FF63
phenny U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」)
18:56 bluescreen100 left, bluescreen10 left
GlitchMr STD.pm is weird... 18:56
benabik nom regression, but unsurprising. nom has some parsing work to go.
18:56 bluescreen10 joined
benabik GlitchMr: Howso? 18:56
GlitchMr constant %open2close = (
There is a lot of pairs
What is point of this
18:57 dual joined
benabik So the parser knows what will close the current bracket. 18:58
18:58 alester joined
GlitchMr > <> 19:03
Unsupported use of <>; in Perl 6 please use lines() to read input, ('') to represent a null string or () to represent an empty list at line 1, near "<>\n"
:(
I liked <> abuse
benabik Since we <use angle brackets for lists>, the syntax was ambiguous. 19:07
19:08 cognominal left, kaleem left 19:10 cognominal joined 19:14 mberends left
GlitchMr < > is valid, huh? 19:15
benabik nom: say < >.perl 19:20
p6eval nom 38907e: OUTPUT«()␤»
benabik Empty list
moritz empty Parcel 19:21
benabik nom: <foo bar baz>.WHAT.say
p6eval nom 38907e: OUTPUT«Parcel()␤»
benabik Huh, so it is.
GlitchMr nom: my @words = <Forking is very fun thing in Perl 6>; @words».say 19:33
p6eval nom 38907e: OUTPUT«6␤very␤thing␤is␤Forking␤Perl␤fun␤in␤»
19:37 pnu left
moritz pmichaud++ 19:38
dalek ast: a238bb3 | moritz++ | / (24 files):
remove bogus test
19:42
19:44 pnu joined 19:45 tyatpi joined
[Coke] ooh, green threads nearly ready to hit in parrot. 19:52
PerlJam didn't even know people were working on green threads for parrot 19:53
benabik PerlJam: nine decided to update the GSoC code after whiteknight pulled out all the broken threading stuff. 19:54
[Coke] basis for upcoming more awesomer thread stuff. dev says parrot & rakudo spec tests pass on his branch.
im2ee Good night! :) 19:56
o/
19:56 im2ee left 19:57 geekosaur left
[Coke] nom: [+]274,448,7,-65 19:57
p6eval nom 38907e: ( no output )
19:57 allbery_b joined
[Coke] nom: say[+]274,448,7,-65 19:57
p6eval nom 38907e: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 1␤»
[Coke] nom: say [+]274,448,7,-65
p6eval nom 38907e: OUTPUT«664␤»
[Coke] #blah.
19:58 allbery_b is now known as geekosaur 20:01 GlitchMr left
masak evening, #perl6. 20:12
[Coke] ho, masak. 20:13
masak I'm glad about the fallout of the C3 stuff. 20:14
20:16 tyatpi left
[Coke] www.modernperlbooks.com/mt/2011/10/...ption.html (ties into p6 at the end.) 20:21
benabik Does JFDI stand for something?
masak there's this nice website called acronymfinder.com 20:22
benabik Which I usually find gives too much information, as I can't provide context.
masak too much information, as in the answer to your question? :P 20:23
hate when that happens...
20:24 f00li5h left
[Coke] "just **** do it" 20:25
20:35 skangas joined, Exodist_ joined, Exodist left
moritz here in #perl6 we use the adaption "JDFI", Just Duckin' Foo It! 20:37
masak it originated from TimToady making fun of a typo I made in a blog post. 20:41
moritz TDP, Typo-driven punning 20:42
moritz typoes himself to sleep
TimToady duck typoing...
masak good nicht, moritz. dream of fortuitous typos. 20:43
TimToady "Ducktor, it hurts when I do this!" "Then don't call me a quack!" 20:44
[Coke] Ugh. I'd hate to see the bill for that pun. 20:45
nom: say [+]274,448,7,-66 20:46
p6eval nom 38907e: OUTPUT«663␤»
TimToady
.oO(or for the world wide webbed feet...)
that's wrong
std: say [+]274,448,7,-66
p6eval std 580b69a: OUTPUT«===SORRY!===␤Two terms in a row (listop with args requires whitespace or parens) at /tmp/NaxtJfFwrg line 1:␤------> say [+]⏏274,448,7,-66␤ expecting any of:␤ POST␤ bracketed infix␤ infix or meta-infix␤ postfix␤
..postfix_prefix_m…
masak I never really understood what makes it wrong. 20:47
kinda feels wrong to me that it's wrong.
unless I'm wrong about that.
TimToady it's an LTM thing; by including the whitespace or paren in the token, we allow user-defined functions to compete with built-ins, which typically require whitespace. 20:52
it's perhaps a stronger policy than it needs to be
masak feels so to me. 20:55
TimToady and it arguably lets the DFA run more efficiently when we aren't in the position of failing matches because we didn't happen to find a word boundary
masak I think of [+] as a \W+ listop, and as such it shouldn't need a word boundary. 20:56
TimToady mostly because it feels vaguely like not require whitespace will adversely impact future extensibility.
but also stylistically, if a list is going to have whitespace inside it, as it typically does, it's probably a good idea not to glue the listop to the first element of the list 20:57
so on that level it's more of a Take Your Medicine It's Good For You
20:57 kaare_ left
masak bah, restrictions :/ 20:57
lots of people seem to have the expectation that [+]1,2,3 will work. 20:58
[Coke] my @a = (1,2,3,4); @a>>.say
rakudo: my @a = (1,2,3,4); @a>>.say
p6eval rakudo 38907e: OUTPUT«1␤3␤2␤4␤»
masak I sometimes expect just [+] to work ;)
[Coke] my @a = (1,2,3,4); @a.>>.say
rakudo: my @a = (1,2,3,4); @a.>>.say #ARGH
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Confused at line 1, near "@a.>>.say "␤»
[Coke] Should that work, btw? 20:59
if so, I'll just mark the ticket unchanged in the past 18 months. 21:00
rakudo: say $*a; my $*a = 42;
p6eval rakudo 38907e: OUTPUT«Any()␤»
[Coke] will just mark the ticket unchanged (RT#74890) 21:01
rakudo: role R { method bar { say "bar" } }; my $foo = class { method foo { say "foo" } }; $foo does R; $foo.foo; $foo.bar 21:02
p6eval rakudo 38907e: OUTPUT«(signal SEGV)»
[Coke] BOOYHA
masak /o\ 21:03
[Coke] rakudo: class A {has @.s}; my %h='n'=><a1 a2 a3>; say %h<n>.perl;my A $x.=new(:s(%h<n>));say $x.s.perl 21:04
p6eval rakudo 38907e: OUTPUT«("a1", "a2", "a3")␤Array.new("a1", "a2", "a3")␤»
masak \o/
[Coke] per the ticket, that's wrong. 21:05
RT#74636 if you disagree.
masak oh!
masak looks
two things. 21:07
in the original bug description, I don't see an array wrapped in another array. I see a List wrapped in an Array.
that's probably wrong, but it doesn't feel very wrong, as Lists tend to evaporate in various circumstances. 21:08
secondly, above I don't see any double wrapping at all.
it's quite natural that what ends up in the @-typed attribute is an Array.
because @-typed attributes are never Lists. 21:09
[Coke] please comment on ticket and mark it as testneeded, then ;)
I am mostly just a ticket robot.
decommuting
masak [Coke]++
I'm a ticket robot too, but probably not in the same way.
21:21 [Coke] left 21:22 carlin left 21:23 [Coke] joined 21:36 wamba left 21:45 pnu left 21:47 pnu joined 21:50 pnu left 21:52 pnu joined
sorear good * #perl6 21:56
diakopter o/ 21:57
masak \o 21:59
21:59 sunnavy left 22:01 sunnavy joined, alester left, alester joined, benabik left 22:03 carlin joined
sorear masak: fwiw, I support your drive to make whitespace rules simple. 22:03
colomon sorear: do you know of any sort of a reference for Gtk in C#? I find I'm googling Python examples and then trying to guess the translation to C# and then hack it into niecza. 22:04
masak sorear: oh wow, I had my nose much closer to the ground than that :) 22:05
but by all means, let's make whitespace rules simple.
sorear colomon: I'm mostly looking at gtk-sharp.dll (via monop) while helping
masak 'night, lambda butterflies. 22:08
sorear colomon: I'm tempted to try and write something ... better than monop 22:09
22:10 sftp left 22:11 sftp joined
colomon monop is some sort of library examining tool? 22:11
sorear yes
colomon wow, google searches for it are really sucking for me. 22:12
ah, there it is 22:13
no, that's someone's monopoly game. :(
sorear it's part of the mono suite
do you have a /usr/{local/,}bin/monop?
colomon yes
yeah, just man monop gets it for me locally
sorear monop has very few useful options 22:14
colomon so how would you look up Gtk.TreeView (for instance?)
ah, as simple as monop Gtk.TreeView ? 22:17
So, Gtk.TreeViewColumn's constructor can take an "Array attrs" argument. How would I create that in niecza? 22:19
though hmmm, might be unnecessary....
Unhandled Exception: No candidates for dispatch to CLR::Gtk::TreeViewColumn.new; candidates are: 22:21
System.String, Gtk.CellRenderer, params System.Object[]
monop claims it has both 22:22
public TreeViewColumn (string title, CellRenderer cell, Array attrs);
public TreeViewColumn (string title, CellRenderer cell, params object [] attrs);
though I guess I'm trying to get away with passing nothing as the third argument.
diakopter hunh; I don't know what that Array could be
sorear you ought to be able to. what are you passing to new?
diakopter: any array
diakopter: System.Array
diakopter I didn't know you could do that :/ 22:23
or maybe I did a while ago but forgot.
colomon TreeViewColumn.new($title, $renderer)
sorear: does a p6 Array translate to a System.Array automatically for these purposes?
though the CellRenderer I'm passing is actually a CellRendererText, now that I look at it. 22:24
sorear colomon: no. 22:25
22:27 soh_cah_toa joined, replore joined
sorear o/ soh_cah_toa 22:29
soh_cah_toa sorear: hey 22:32
sorear colomon: Array->CLR array marshalling is problematic due to mutability, so I decided not to do it until I see what people are using it *for*
colomon: try monop 'System.Int32[]' - this will give you the methods that are available on a typical 1-D array object 22:33
22:33 pmurias left, dual left
sorear colomon: array classes are procedurally generated so you can't find documentation, but monop can see them since it's using reflection 22:33
colomon sorear: so how does params object [] attrs translate 22:34
?
sorear colomon: 'params' is handled (optionally) like a slurpy. 22:35
colomon ah. 22:36
22:37 plobsing_ left 22:39 tyatpi joined 22:40 kmwallio left 22:45 Trashlord left 22:47 Trashlord joined, replore left 22:51 alester left 22:53 tyatpi left
colomon sorear: why does the "no candidates for dispatch" error message sometimes not list all the candidates (according to monop)? are the others unavailable? 22:57
sorear colomon: can you give an example? I guess it might be prefiltering on arity 23:00
[Coke] anyone remember how to fix "/Search/Results.html not found" on rt? 23:05
rakudo: eval 'waddle()'; say "pending: " ~ $!.pending.perl; 23:06
p6eval rakudo 38907e: OUTPUT«Could not find sub &waddle␤ in block <anon> at /tmp/mjgdVtfK8o:1␤ in <anon> at /tmp/mjgdVtfK8o:1␤ in sub eval at src/gen/CORE.setting:428␤ in block <anon> at /tmp/mjgdVtfK8o:1␤ in <anon> at /tmp/mjgdVtfK8o:1␤»
[Coke] rakudo: try eval 'waddle()'; say "pending: " ~ $!.pending.perl; 23:07
p6eval rakudo 38907e: OUTPUT«Method 'pending' not found for invocant of class 'Exception'␤ in block <anon> at /tmp/bQT6MmUmQC:1␤ in <anon> at /tmp/bQT6MmUmQC:1␤»
[Coke] rakudo: if 1 <-> $x {} 23:08
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Missing block at line 1, near ""␤»
[Coke] notes that [BUG] is not appropriate when you mean [TODO]. 23:09
rakudo: say %("foo" ~~ /foo/).exists("foo") 23:10
p6eval rakudo 38907e: OUTPUT«Bool::False␤»
23:12 whiteknight joined
ingy masak: you ever get pugs working? 23:12
masak: I cabal installed a working copy on my laptop. needed a couple tweaks from au++, but smooth now 23:13
dalek ast: 890bc5f | Coke++ | S05-match/capturing-contexts.t:
rakudo fudging

  :syntax isn't relevant to this test, so rewrite test to avoid it.
23:14
ingy masak: au++ thinks that on modern ghc, it can compile in < 1 min 23:15
[Coke] rakudo: sub f($t?) { say defined($t).Int }; f("a" => 3) 23:16
p6eval rakudo 38907e: OUTPUT«Method 'Int' not found for invocant of class 'Pair'␤ in sub f at /tmp/Szt0vkNBsZ:1␤ in block <anon> at /tmp/Szt0vkNBsZ:1␤ in <anon> at /tmp/Szt0vkNBsZ:1␤»
23:19 molaf left
[Coke] rakudo: my $b; $b!SomeClass::xyz 23:19
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol SomeClass␤»
[Coke] rakudo: say 9 !% 3 23:21
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Cannot negate % because it is not iffy enough at line 1, near " 3"␤»
[Coke] perl6: my $b = &time; say &$b(); 23:23
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Symbol '&time' not predeclared in <anonymous> (/tmp/dn2TAIIfgZ:1)␤»
..niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'time' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤…
..pugs: OUTPUT«371604200.399291␤»
[Coke] std: my $b = &time; say &$b();
tadzik [Coke]: time is a term, not a sub
p6eval std 580b69a: OUTPUT«ok 00:01 126m␤»
[Coke] tadzik: RT #74654 23:24
rakudo: my @a = 1, 2, 3; @a X*= 5; say @a.perl; @a = @a X* 5;say @a.perl; 23:25
p6eval rakudo 38907e: OUTPUT«Array.new(1, 2, 3)␤splice() not implemented in class 'Mu'␤ in method reify at src/gen/CORE.setting:3657␤ in method gimme at src/gen/CORE.setting:4015␤ in method eager at src/gen/CORE.setting:3991␤ in method STORE at src/gen/CORE.setting:4409␤ in block <anon> a…
23:25 soh_cah_toa left
[Coke] rakudo: my $d; class A {method x { $d }}; for () { sub } 23:26
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Missing block at line 1, near "}"␤»
tadzik hrm
[Coke] that one is righter. ;) 23:27
rakudo: sub s { try { return 1; CATCH { return 2 } } }; say s
p6eval rakudo 38907e: OUTPUT«1␤»
dalek ast: a1e114c | Coke++ | S04-exception-handlers/catch.t:
rakudo fudging

Remove unneeded skip.
23:30
[Coke] rakudo: say (1..10).reduce({$^a + $^b + $^c}) 23:32
p6eval rakudo 38907e: OUTPUT«can only reduce with arity 2 for now␤ in method reduce at src/gen/CORE.setting:4233␤ in method reduce at src/gen/CORE.setting:1020␤ in block <anon> at /tmp/YiVJzRSHTb:1␤ in <anon> at /tmp/YiVJzRSHTb:1␤»
23:34 molaf joined
[Coke] masak: ping. 23:34
rakudo: class A { enum B <c d e>; ::c = B::c }; say A::c 23:35
p6eval rakudo 38907e: OUTPUT«Cannot assign to a non-container␤ in <anon> at /tmp/Hw7cFnRkA1:1␤ in block <anon> at /tmp/Hw7cFnRkA1:1␤ in <anon> at /tmp/Hw7cFnRkA1:1␤»
[Coke] masak: unping, just check ticket-mails.
rakudo: enum A::B <c d e>; constant B = A::B; say B::c
p6eval rakudo 38907e: OUTPUT«A::B::c␤»
[Coke] niecz: enum A::B <c d e>; constant B = A::B; say B::c 23:36
niecza: enum A::B <c d e>; constant B = A::B; say B::c
p6eval niecza v10-40-ga57ed3d: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'B::c' used at line 1␤␤␤Unhandled Exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 766 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤ a…
sorear *possibly* a nieczabug 23:37
[Coke] rakudo: class A { method pack($_) { s/c// }}; A.new.pack("ccc")
p6eval rakudo 38907e: OUTPUT«Cannot assign to a readonly variable or a value␤ in sub infix:<=> at src/gen/CORE.setting:7361␤ in method pack at /tmp/5h1grLXx6g:1␤ in block <anon> at /tmp/5h1grLXx6g:1␤ in <anon> at /tmp/5h1grLXx6g:1␤»
[Coke] rakudo: "foo$(my $x = 42)bar"; say $x 23:38
p6eval rakudo 38907e: OUTPUT«===SORRY!===␤Redeclaration of symbol $x at line 1, near " = 42)bar\""␤» 23:39
[Coke] rakudo: my $a = 2;$a := $a; say $a 23:40
p6eval rakudo 38907e: OUTPUT«2␤»
[Coke] std: my $a = 2;$a := $a; say $a
p6eval std 580b69a: OUTPUT«ok 00:01 122m␤»
[Coke] rakudo: my Array of Int @box 23:41
p6eval rakudo 38907e: ( no output )
[Coke] rakudo: my Array of Int @box; @box[0] = 3; say @box.perl;
p6eval rakudo 38907e: OUTPUT«Array.new(3)␤»
23:55 icwiener joined 23:56 pnu left, pnu joined
[Coke] rakudo: ([ [ 5], [3] ].sort: *[0] ).perl 23:59
p6eval rakudo 38907e: ( no output )
[Coke] rakudo: ([ [ 5], [3] ].sort: *[0] ).perl.say
p6eval rakudo 38907e: OUTPUT«([3], [5])␤»
[Coke] rakudo: ([ { :pos<5>}, { :pos<4> } ].sort: *.<pos> ).perl
p6eval rakudo 38907e: ( no output )
[Coke] rakudo: ([ { :pos<5>}, { :pos<4> } ].sort: *.<pos> ).perl.say
p6eval rakudo 38907e: OUTPUT«({"pos" => "4"}, {"pos" => "5"})␤»
23:59 replore joined