»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 25 June 2010.
TimToady sorear: almost according to spec, except they don't limit the upward search to the purview of the proto 00:00
that is, it assumes no nested protos currently
sorear er 00:01
by now I mean, how should they work, now that non-regex protos contain a dispatcher
{ <...> } is almost certainly wrong
TimToady turns out {*} is available :)
and even if it weren't, {{*}} is 00:02
which was another reason for wanting *
though I suppose, strictly speaking {{*}} would cause the proto not to participate in an outer alternative 00:03
since {} terminates LTM
stef__ What is the current state of := in rakudo? 00:04
00:05 stef__ left, lest_away is now known as lestrrat
TimToady I suppose [*] could be special too 00:07
cognominal sorry, stef__, that was me on my iPhone, Getting back home t charge it. 00:09
ingy rakudo: module TestML::Standard { our sub Point { say 42 } }; my $pkg = "TestML::Standard"; my $name = "Point"; my $fun = eval "&$pkg" ~ "::$name"; $fun.() 00:10
p6eval rakudo c80319: OUTPUT«42␤»
00:10 fozo left
ingy what does 'our sub ...' mean? 00:11
cognominal ingy, by default, the scope of subs and methods is lexical 00:12
...if my memory serves me well
jnthn Right
diakopter what's this about Rust
jnthn ingy: the default would be my sub ...
ingy: our means it goes in the package too 00:13
pugssvn r31584 | lwall++ | [S05] also define how * does multi dispatch inside regexes
r31584 | delete <...> et al. since they're redundant with {...}
00:15 solarion left, solarion joined
TimToady bbl &/e 00:15
lue rakudo: say Num.^methods(:local) 00:18
p6eval rakudo c80319: OUTPUT«to-radiansabsacotanacosechlnceilingcotanhunpolarRealatanacosRattanhatanhcosecNumWHICHperlrootslog10from-radianstancospredacosecsinhasinhNumericcosechrealsStrasecacotanhfloorACCEPTSsechasechtruncateroundsqrtasinBoolexpcoshsuccacoshsigncotanatan2ComplexseccislogsinIntBridge␤»
lue rakudo: say Num.^methods(:local).perl
p6eval rakudo c80319: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
..}, { …
lue rakudo: say @(Num.^methods(:local))
p6eval rakudo c80319: OUTPUT«realsStrasecacotanhfloorACCEPTSsechasechtruncateroundsqrtasinBoolexpcoshacoshsuccsigncotanatan2ComplexseccislogsinIntBridgeto-radiansabsacosechacotanlnceilingcotanhunpolaratanRealacosRattanhatanhcosecNumperlWHICHrootstanfrom-radianslog10cospredacosecsinhNumericasinhcosech␤»
ingy jnthn, cognominal: thx 00:19
wouldn't this expect 2 args: our sub Point ($this, $name) { 00:20
?
I get: too many positional arguments: 2 passed, 1 expected 00:21
hmm
lue rakudo: say floor(3.5); 00:22
p6eval rakudo c80319: OUTPUT«3␤»
jnthn rakudo: our sub Point ($this, $name) { }; Point(1,2)
p6eval rakudo c80319: ( no output )
jnthn rakudo: our sub Point ($this, $name) { }; Point(1)
p6eval rakudo c80319: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in 'Point' at line 11:/tmp/lNaC11bvoq␤ in main program body at line 11:/tmp/lNaC11bvoq␤»
jnthn ingy: Suspect there's more to the story :-)
ingy nm, my bad 00:23
sorry
jnthn np
ingy it was another call within that call.
I better take a break
ingy heads to the beach
ingy is your beach
jnthn enjoy the beach, you beach! 00:24
EMYBEACHNOTWALKINGDISTANCE
lue EBEACHHOURSAWAYBYCAR
lue is somewhat shocked there's no integer division. I guess that's what floor() is for :) 00:25
rakudo: say (0x3FFE - 8*(floor(0x3FFE/8)-0x400)).fmt('%x') 00:31
p6eval rakudo c80319: OUTPUT«2006␤»
lue I kinda wish implicit multiplication existed.... 00:33
rakudo: multi sub postcircumfix:<( )>($a, $b) { $a * $b }; say 3(5); 00:35
p6eval rakudo c80319: OUTPUT«invoke() not implemented in class 'Integer'␤ in main program body at line 11:/tmp/co3SNwFyKN␤»
lue rakudo: multi sub postcircumfix:<~ ~>($a, $b) { $a * $b }; say 3~5~; 00:36
p6eval rakudo c80319: OUTPUT«error:imcc:syntax error, unexpected '\n'␤ in file 'EVAL_1' line 58␤===SORRY!===␤syntax error ... somewhere␤»
00:38 meppl left
lue How would you remove a binding? in $b := $a, how would you turn $b into its own variable again? 00:40
*chirp chrip* 00:51
sorear At what point does /kick become acceptable in responce to that? 00:52
00:53 quietfanatic left
lue stops 00:54
00:54 am0c left
[Coke] sorear: you appear awfully grumpy. 00:59
sorear tired. 01:00
jnthn knows the tiredness/grumpiness correlation 01:02
lue afk
01:12 s1n joined 01:19 kid51 left
sorear TimToady: what is the <>-canonical form of circumfix:[' ', ' ']? 01:20
jnthn lol...< > :-) 01:22
(logically...)
sorear jnthn: but it's ambiguous
jnthn Yeah 01:23
sorear: I'm curious - what would declaring such a circumfix do to the parse?
sorear jnthn: nothing
jnthn Would it actually somehow actually fall out and work?
gah
s:2nd/actually//
sorear it would never match, because <ws> prevents the cursor from ever pointing at a space when term comes up 01:24
jnthn Right, I imagined so.
Somebody will try it of course. :-)
sorear one problem with using unmodified STD is that I'm limited to a postorder traversal 01:25
in class Foo { is; method; has } I have to consider the insides before ever seeing that I'm in a class 01:26
I'm not quite sure how I'll make this work with BEGIN 01:27
jnthn eww
In Rakudo we're able to run some action before the {
Well, same action method but with a "tag"
"open" or some such
That's how it's dealt with there.
If STD wants to borrow from Rakudo. ;-)
I think the answer is "you need to find a way to do something earlier than the end of the class decl" though 01:28
01:30 [Coke] left
pugssvn r31585 | pmichaud++ | Adjust some tests for binding operator. 01:30
pmichaud we no longer use "#= open"
and eventually it won't even be possible 01:31
jnthn What do we use?
pmichaud (we may still use "#= open", but it'll be phased out)
for example, to detect the start of a compilation unit we now have <.unitstart>
jnthn We *will* need an alternative.
Ah
That will do. :-)
pmichaud to detect the start of a new lexpad we have <.newlex>
(these are all from STD.pm)
jnthn *nod*
OK
dalek kudo: b30f2a6 | (Matthew (lue))++ | src/ (2 files):
Begin implementation of ::= binding.
kudo: c59e59a | (Matthew (lue))++ | src/core/operators.pm:
Removal of Q:PIR block in := implementation.
kudo: 669c9cc | (Matthew (lue))++ | src/core/operators.pm:
Implementation of := binding.
kudo: a3d4b9e | pmichaud++ | src/core/operators.pm:
Add WHENCE code (originally from lue++, but patch didn't apply for some reason).
jnthn That works...it's messier, but it works.
kudo: c70469a | pmichaud++ | src/core/operators.pm:
A bound variable needs to adopt the 'rw' state of the thing it's bound to.
pmichaud actually, it's far cleaner
it's *much much* cleaner 01:32
because we no longer need $key
jnthn Well...in that sense yes
Depends how you look at it.
lue++
pmichaud I know that I found <.unitstart> to be much easier to understand and process than trying to deal with the {*} #= key
jnthn *nod*
OK, good to know
I can maybe refactor the package_def in that direction.
Well, I *can* 01:33
But I maybe can do it soonish. :-)
pmichaud look to see what STD does 01:34
(and we can always modify STD to do what we need it to do) 01:35
jnthn I don't think it cares
Since you can get awya with the syntactic case just by knowing you have a new type name. 01:36
pmichaud well, it cared enough for TimToady to have created <.newlex> and <.unitstart> and the like :-)
01:36 skids joined
jnthn Yeah, true 01:36
pmichaud STD has to manage a symbol table as well, which means it has to know about the symbols *before* the action methods are applied.
jnthn If STD gives a name there, I'll happily use the one it suggests.
pmichaud right. :-) 01:37
jnthn If not, I'll propose one and TimToady++ will dislike it and choose a better one. :-)
pmichaud another possibility to keep in mind is that at some point we really want to divorce ourselves from Parrot NameSpace PMCs altgoether.
*altogether.
so that our package symbols are just another pad 01:38
jnthn heh
That's a cert for objects.
sorear pmichaud: the trick is though that method newlex is defined in STD...
jnthn Guess we could go the whole hog.
01:42 plobsing joined 01:46 colomon joined
colomon o/ from the great white north! 01:46
jnthn o/ 01:48
colomon how goes it?
jnthn colomon: Having fun?
colomon: Goes well here. 01:49
colomon amazing amounts of fun here
jnthn I passed some cert at $dayjob today then went out for nice Thai nom. :-)
colomon eight hours fishing a day, beautiful lake
\o/
jnthn Nice
Sounds wonderfully relaxing
OTOH, most things that involve being outdoors rather than in front of a computer somehow sound relaxing to me. :-) 01:50
colomon it is amazingly relaxing.
my most relaxing vacation in years.
jnthn \o/
rakudo: my $a = 10; my $b = '$a'; $b.eval
p6eval rakudo c80319: ( no output )
jnthn rakudo: my $a = 10; my $b = '$a'; say $b.eval
p6eval rakudo c80319: ( no output ) 01:51
01:51 tylercurtis joined
jnthn tssk, locally 01:51
> my $a = 10; my $b = '$a'; say $b.eval
Symbol '$a' not predeclared in <anonymous>
colomon can't spend much time on the internet up here, which is why I had premade messages ready to send. ;)
jnthn but
> my $a = 10; my $b = '$a'; say eval($b)
10
That way works (e.g. sub rathe than method call) 01:52
It's rakudobug
colomon: Well, I can answer that with a quick workaround at least. ;-)
colomon oh, hey, that's great!
jnthn And yes, closure bug is fixed.
colomon is the closur.... \o/ 01:53
jnthn pmichaud++
colomon been driving me nuts up here.
pmichaud++
trig test overhaul is almost done.
jnthn \o.
er, \o/
colomon just working on atan2 01:54
actually have found two bugs in it!
(that is, atan2 is the last thing to work on) 01:55
jnthn :-)
Bugs known are bugs that can be fixed.
colomon well, the one is kind of extra tricky.
hope to have the other one soon.
rakudo: say 10.atan2 01:56
p6eval rakudo c80319: OUTPUT«1.47112767430373␤»
colomon rakudo: say 10.atan2(Radians) # should be the same answer, as Radians are the default base
p6eval rakudo c80319: OUTPUT«1.5707963267949␤»
colomon problem is that our hack for TrigBase turns the bases into integers.
so that actually looks like
rakudo: say 10.atan2(0)
p6eval rakudo c80319: OUTPUT«1.5707963267949␤» 01:57
jnthn Oh!
Er, yes, ouch. 01:58
colomon Okay, I've downloaded the latest in Rakudo, and sent my e-mails. My wife isn't online to chat, so it is time to go. 01:59
I should be back for real on Monday.
have a great weekend!
jnthn You too!
01:59 colomon left
pmichaud mmmmm, Thai nom == yummy 02:02
jnthn It was.
Lund isn't a great restaurant town overall.
But there is at least a good Thai restaurant here.
pmichaud yes, I've been spoiled by some great restaurant towns 02:04
02:04 ashleydev left, tedv left
jnthn I miss Bratislava somewhat. The pub nom was awesome. 02:05
And it had a decent Indian.
Cambridge had some *really* nice places. 02:06
02:08 kid51 joined 02:11 jimk joined 02:13 jimk left 02:14 kid51 left 02:19 pragma_ left
jnthn Sleep, night o/ 02:24
02:25 takadonet left 02:29 pragma_ joined, pragma_ is now known as Guest62179 02:31 pnate left
lue hello! 02:33
sorear Hello 02:35
02:37 sftp left 02:38 pnate joined 02:41 [Coke] joined 02:51 TiMBuS joined
pmichaud rakudo: my $x = 5; my $y := $x; $y = 4; say $x; # lue++ 03:03
p6eval rakudo c70469: OUTPUT«4␤»
lue the one thing about := still on my mind is list binding, but that's for a busier time, when more Important People™ are around :) 03:05
pmichaud at some point it's just easier to use signature binding
..but I guess you're wanting to bind elements of arrays or something like that 03:06
lue yes. Although using $_ and a for loop works quite well. 03:07
rakudo: my @a = 1,2,3; @a[$_+3] := @a[$_] for ^3; say @a.perl
p6eval rakudo c70469: OUTPUT«[1, 2, 3, 1, 2, 3]␤»
lue rakudo: my @a; @a[0..2] = 3; say @a.perl 03:08
p6eval rakudo c70469: OUTPUT«[3, Any, Any]␤»
lue the main problem (in terms of unclear spec), is what to do in that situation, because you obviously can't start writing Any()'s like that in binding. 03:09
s/the main/a/
03:17 Guest865 left
sorear sure you caqn 03:17
03:17 masonkramer left
lue in @a[0..2] := 3, what do you do with elements [1] and [2] ? (hrm, I oughta post my thoughts on p6l) 03:22
sorear nothing 03:27
@a[0..2] is not a bvalue
the := operator should die
pmichaud not only that, but unless @a already has some elements, @a[0..2] is a null list.
(rakudo doesn't implement this yet, but that's what the spec says) 03:28
pmichaud goes ahead and implements this. 03:30
ash_ greaterthaninfinity.dyndns.info/
i think the basics are working now
thats the interactive shell for rakudo 03:31
lue ash_++ good job. Looks great! 03:33
03:34 PZt left
ash_ i am still messing with styles 03:35
but its starting to work a little, it doesn't remember anything, its completely stateless for now 03:36
cygx is working on the other parts that will make it remember things between lines
lue afk ~1.5 hrs 03:38
pmichaud TimToady: ping
TimToady pon
g
pmichaud (the "ng" key is having trouble too, I see :-) 03:39
I think we need a method on lists that can answer the question "do you have at least this many elements?"
same for strings
(do you have this many chars/codepoints/whatever?)
something that we can use without having to calculate .elems
TimToady is .reify taken? 03:40
pmichaud might be a collison with iterator.reify
03:40 PZt joined
pmichaud (Iterator.reify can certainly change names, if needed) 03:40
TimToady .atleast 03:41
pmichaud wfm
TimToady .is-there
umm
pmichaud in particular, I'm looking at the case of .[$range]
and we need to see if $range.min is beyond the end of the list/array/whatever 03:42
TimToady .guarantee except I envisioned that it would just give you back the real answer if it ran into the end
.tryfor 03:43
pmichaud internally I've used !fill
i.e. !fill(5) # make sure 5 elements are filled, if possible.
TimToady .budget
.want
pmichaud but !fill's return value wouldn't work
.want isn't too bad
TimToady implies that it could give you something less than that 03:44
(1..4).want(10) would return 4, presumably
pmichaud right
.gimme
TimToady that would be fine by me :) 03:45
pmichaud I can do .want for now, and it's easily changed at some point if we need.
and of course, .want(Inf) returns the same as .elems :-)
TimToady that could even be the generic definition of .elems 03:46
pmichaud oh! yes!
.elems(4)
where the default is .elems(Inf)
TimToady hmm
pmichaud well, which do you prefer (or .want? :-)
TimToady well...elems saves a name, but doesn't read as well 03:47
pmichaud .want has the advantage of potentially working for (lazy) string thingies, too. 03:48
TimToady it's not clear that the arg to elemsn is a max
pmichaud although there we could have .chars(5), .glyphs(10), etc.
could make it a named argument to make it clear
.elems(:max(5))
.elems(:upto(5)) 03:49
TimToady I suppose want() is making the "length" mistake
.elems(^5)
pmichaud .elems(:to(5)) 03:50
TimToady I kinda like .elems(Range) vs .elems(Int) 03:51
pmichaud that feels weirder, though.
would we use Range.max, or Range.elems? ;-) 03:52
and if Range.max, then why not just an Int?
TimToady because there's also a min
whereas Int fails if it can't get that many
pmichaud ohhhh
TimToady .elems($lastpos+1)
pmichaud so, .elems($min..$max) would return failure if it couldn't get at least $min? 03:53
TimToady .elems(++$pos)
right
pmichaud it feels less weird now, but still a little weird.
still, in the case of .[$range], that ends up translating into .elems($range) which is kind of nice 03:54
although it kinda fails in that .[1..5] would want .elems to return 6 03:56
03:56 ashleydev joined
pmichaud I guess that's okay. 03:56
but it does mean that .elems(0..5) would return 6 if it got them all, and not 5.
which is different from .elems(6)
also with ranges we'd have to think about exclusive ranges (ugh) 03:57
I guess that's just a smartmatch, though.
TimToady maybe .elems isn't quite right 03:58
.wantelem maybe, and it's 0 based instead of 1
pmichaud I guess my thinking about ranges is that if we wanted to do something like .elems(^5), one could write .elems(5) ~~ ^5 04:00
or in general, .elems($max) ~~ $range
which perhaps argues that .elems($range) is really talking about a range of element sizes and not a range of indices
and .[$range] has to be aware of the off-by-one-ism (which is likely okay)
okay, well, I think I'll let this sit for the night, then. 04:01
maybe I'll try .elems($range) and see how it works. We can always remove it if it doesn't work out.
TimToady if feels like there's probably something better we're not seeing yet
*it
pmichaud yeah.
I'll go with .elems($range) for now, under the expectation that it'll be removed. :) 04:02
(won't be hard to change to something else later.)
TimToady .elems($base,$howmanymore) maybe 04:03
pmichaud or maybe I'll just do .elems(Int) for now, under the same expecation :-)
*expectation
TimToady expectorates
pmichaud anyway, I'll wait on this for morning at least, and perhaps for tomorrow's plane rides 04:05
if you come up with anything, leave me a note in the backlog or with phenny. thanks
TimToady 'course, there's still a conjecture in there that (1..2) + 1 produces 2..3 04:07
pmichaud grabs the conjecture by its scrawny little neck, shakes it around, slams it against the wall, and bounces it off the ceiling until there's nothing left in its lifeless body. 04:08
Hey, that's not a bad idea.
:-)
TimToady grins
diakopter is := dead yet 04:17
TimToady seems to be still twitching a bit 04:19
but we're hoping it stabilizes soon
04:23 mantovani left 04:24 mantovani joined 04:29 nimiezko left 04:31 simcop2387 joined
diakopter rakudo: say (1..2) * (2..4) 04:49
p6eval rakudo c70469: OUTPUT«6␤»
sorear is struggling to add class declarations to the IR
04:55 skids left 04:58 ashleydev left 05:00 hercynium joined
lue ohai again 05:10
05:13 tylercurtis left
lue [backlogging] I like the sound of .want, if only for the reason that its name is different from what you'd expect. 05:14
(somewhere along with slurpy, stringy, etc.) 05:15
05:17 vapace joined
PerlJam .hal(5) # has at least :-) 05:19
lue I don't know how I feel about a hal function... ;) 05:22
05:38 Su-Shee joined
szabgab rakudo: max(2,3); 05:45
p6eval rakudo c70469: OUTPUT«Unable to handle non-closure Ordering yet␤ in 'Any::max' at line 1404:CORE.setting␤ in 'max' at line 1665:CORE.setting␤ in main program body at line 11:/tmp/eh3XKQ5XE9␤»
szabgab rakudo: vuvuzela(2,3);
p6eval rakudo c70469: OUTPUT«Could not find sub &vuvuzela␤ in main program body at line 11:/tmp/za2d4ksK4f␤»
szabgab rakudo: Any::max(2,3); 05:46
p6eval rakudo c70469: OUTPUT«Can not find sub Any::max␤ in main program body at line 1␤»
05:56 ashleydev joined 06:10 gtyhm joined 06:11 uniejo joined 06:14 gtyhm left 06:16 iota__ joined
iota__ rakudo: 06:17
06:17 iota__ left, cjk101010 joined 06:19 uniejo left 06:21 uniejo joined 06:27 justatheory left 06:34 eternaleye joined
moritz_ rakudo: say 2 max 3 06:51
p6eval rakudo c70469: OUTPUT«3␤»
moritz_ szabgab: the sub form of max() needs an ordering closure as first argument
rakudo: my $x := 3; say $x; $x = 5; say $x
p6eval rakudo c70469: OUTPUT«3␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/6vFidOJhM0␤»
szabgab rakudo: say 2.max 3; 06:52
p6eval rakudo c70469: OUTPUT«===SORRY!===␤Confused at line 11, near "say 2.max "␤»
moritz_ two terms in a row
szabgab rakudo: say max 2,3;
p6eval rakudo c70469: OUTPUT«Unable to handle non-closure Ordering yet␤ in 'Any::max' at line 1404:CORE.setting␤ in 'max' at line 1665:CORE.setting␤ in main program body at line 11:/tmp/xFL3ZYD6Eq␤»
moritz_ rakuo: say [max] 5, 2, 3
rakudo: say [max] 5, 2, 3 06:53
szabgab specifically I was hoping to show $x = $x.max(42); and then $x .= max(42)
p6eval rakudo c70469: OUTPUT«5␤»
moritz_ $x max= 42
sorear rakudo: say 2.max: 3 06:54
p6eval rakudo c70469: OUTPUT«Unable to handle non-closure Ordering yet␤ in 'Any::max' at line 1404:CORE.setting␤ in main program body at line 11:/tmp/5beGyYTRui␤»
szabgab rakudo: my $x = 2; $x max=3; say $x
p6eval rakudo c70469: OUTPUT«3␤»
szabgab rakudo: my $x = 2; $x max=1; say $x
p6eval rakudo c70469: OUTPUT«2␤»
sorear max= is one of p6's most awesome features imo 06:55
moritz_ sorear: (backlog, circumfix:[' ', ' ']) - whitespace in operators are officially forbidden
sorear how about Foo:from['foo bar', 'baz'] then 06:58
moritz_ noidea 07:00
07:07 Ross joined, Ross left 07:08 Ross joined
dalek ecza: 9d143f0 | sorear++ | (5 files):
Refactor preinit / enter to be controlled by a common object set
07:12
07:17 vapace left 07:18 ashleydev left
pugssvn r31586 | moritz++ | [t/spec] some rakudo unfudges 07:24
pmichaud I like unfudges :-) 07:33
I like fudge too, which is an interesting paradox of sorts. 07:34
moritz_ humans are paradox by nature
we like stress (within limits) and relaxing 07:35
sleeping and doing sports
etc.
did any of the binding commits add a test file?
pmichaud not that I saw 07:36
moritz_ neither
pmichaud but there are lots of binds in the tests already
try ack ':=' :-)
moritz_ I guess I need to run autounfudge again
[SPA] ( 4/8 ) t/spec/S03-operators/binding-closure.t
[SPA] ( 33/37 ) t/spec/S03-operators/binding-hashes.t
[SP ] ( 17/28 ) t/spec/S03-operators/binding-scalars.t
from tools/update_passing_test_data.pl
07:36 lue left
moritz_ that looks promising 07:37
S09-subscript_slice/slice.t
passes too
07:43 snarkyboojum joined
pugssvn r31587 | moritz++ | [t/spec] rakudo re-fudges (mostly unfudges) and a corrected plan() 07:44
snarkyboojum some modules have dropped off the proto website since things have moved to the pls fork? 07:48
dalek kudo: 1086ff8 | moritz++ | t/spectest.data:
we pass 6 more test files
moritz_ snarkyboojum: I think one or two projects were removed where the project location was a 404 07:49
snarkyboojum: but apart from that, I'm not aware of any
snarkyboojum: though I don't know how well masak++ keeps the project lists of proto and pls in sync
snarkyboojum moritz_: my little MIME::Base64 port isn't there anymore, but there could be a good reason :D
moritz_ I doubt there's a good reason for it. 07:50
snarkyboojum: github URL?
snarkyboojum moritz_: github.com/snarkyboojum/Perl6-MIME-Base64
07:51 xinming left, exodist_ joined
mathw Morning 07:52
moritz_ snarkyboojum: I guess the fault is mine for using an experimental, WIP fork as the base for the module list 07:53
snarkyboojum: anyway, I've added it to pls' project list, so the next regular update should get it
snarkyboojum moritz_: lovely - thanks
moritz_ ash_: I can give you access to the try.rakudo.org server, just ping me when you're online 07:54
07:57 xinming joined
moritz_ pmichaud: you're right, autounfudge finds quite some occurences of fudged binding tests all over the test suite 07:59
08:01 tadzik joined
snarkyboojum moritz_: FWIW, I think these are missing also, github.com/supernovus/SCGI and github.com/uasi/file-spec 08:04
moritz_ snarkyboojum: I think I should bother masak++ with finding a good way to keep them up-to-date automatically :-) 08:05
sorear I'm pretty sure I told you that would happen
rakudo needing major unfudgage after :=
snarkyboojum moritz_: sure :) just pointing the missing ones out ;)
moritz_ sorear: yes. It's not a bad thing :-) 08:06
08:12 clintongormley joined 08:29 plobsing left 08:34 exodist_ left, dakkar joined 08:38 exodist joined 08:40 thebird joined
moritz_ wc -l autounfudge.patch 08:52
200 autounfudge.patch
moritz_ impressed
there are two false-positives in there
but all in all it should be OK
running a spectest now before I commit them... 08:54
rakudo: class A { has $.x; method foo { $!x := 42 } }; my $a = A.new; $a.foo; say A.x 08:55
p6eval rakudo 1086ff: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!x␤ in main program body at line 67␤»
moritz_ rakudo: class A { has $.x; method foo { $!x := 42 } }; my $a = A.new; $a.foo; say $a.x
p6eval rakudo 1086ff: OUTPUT«42␤»
08:59 envi^home joined, arthur-_ joined, arthur-_ left 09:04 ldd joined 09:05 Su-Shee left
dolmen__ rakudo: say (1..5).max 09:08
p6eval rakudo 1086ff: OUTPUT«5␤»
dolmen__ rakudo: say [max] 1..5
p6eval rakudo 1086ff: OUTPUT«5␤»
dolmen__ rakudo: say 1..5.elems
p6eval rakudo 1086ff: OUTPUT«1␤» 09:09
dolmen__ rakudo: say (1..5).elems
p6eval rakudo 1086ff: OUTPUT«5␤»
dolmen__ rakudo: say (1..5).elems(3)
p6eval rakudo 1086ff: OUTPUT«No candidates found to invoke␤ in main program body at line 11:/tmp/ogQKFUud4E␤»
09:13 cinch left
sorear rakudo: state class Foo { } 09:15
p6eval rakudo 1086ff: OUTPUT«Could not find sub &state␤ in main program body at line 11:/tmp/xhJrD3SHae␤» 09:16
moritz_ std: state class A { }
p6eval std 31587: OUTPUT«ok 00:01 110m␤»
pmichaud sleep time here -- bbiaw 09:17
09:17 cono joined
dolmen__ rakudo: say ((1..5) | (6..8) ).elems(3) 09:28
p6eval rakudo 1086ff: OUTPUT«No applicable candidates found to dispatch to for 'elems'. Available candidates are:␤:(Mu ;; *%_)␤␤ in main program body at line 1␤»
dolmen__ rakudo: say ((1..5) | (6..8) ).elems
p6eval rakudo 1086ff: OUTPUT«any(1)␤»
moritz_ the junction flattens 09:29
into any(1..8)
and each of them has 1 elem
dolmen__ rakudo: say any(1..8).elems 09:30
p6eval rakudo 1086ff: OUTPUT«any(1)␤»
dolmen__ the output of .elems should'nt be an Int 09:31
?
pugssvn r31588 | moritz++ | [t/spec] binding unfudges for rakudo
moritz_ rakudo: say 3.elems
p6eval rakudo 1086ff: OUTPUT«1␤»
moritz_ dolmen__: .elems autothreads, returning an each for item. The result is a junction of 1s 09:32
which collapses to a single 1
not actually collapses, but there's no use to store duplicates in an any()-junction
dolmen__ but any(1) is not 1
moritz_ right
but 1 and any(1) behave the same in almost all ways 09:33
the general rule is that out of junctions you only get Bool or other junctions
dolmen__ rakudo: say (1 | 2 | 3).elems 09:34
p6eval rakudo 1086ff: OUTPUT«any(1)␤»
moritz_ if that's not what you want, you should use a Set instead of a Junction
dolmen__ which are the operators to build a Set ?
rakudo: say (1 & 2 & 3).elems 09:35
p6eval rakudo 1086ff: OUTPUT«all(1)␤»
dolmen__ rakudo: say (1..6 & 2 & 3).elems
p6eval rakudo 1086ff: OUTPUT«all(1)␤»
moritz_ dolmen__: I don't know... Rakudo has a basic implementation in src/core/Set.pm, maybe that's helpful
dolmen__ rakudo: my Set $s; $s.add(1..5); 09:36
p6eval rakudo 1086ff: OUTPUT«Method 'add' not found for invocant of class ''␤ in main program body at line 11:/tmp/sN607pu9fC␤»
dolmen__ rakudo: my Set $s; $s += (1..5);
p6eval rakudo 1086ff: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 11:/tmp/n9JW9m9R3B␤»
moritz_ rakudo: say Set.new(1..5) 09:37
p6eval rakudo 1086ff: OUTPUT«Set()<0x7684990>␤»
moritz_ uhm
less than awesome stringification
cono rakudo: my Set $s .= new(1,2,3,5); $s.perl.say 09:38
p6eval rakudo 1086ff: OUTPUT«Set.new(1, 2, 3, 5)␤»
09:38 masak joined
masak oh hai, #perl6 09:39
frettled yayitsmasak
moritz_ he lo ma sak
dolmen__ rakudo: my Set $s .= new(1..5); say $s.elems
p6eval rakudo 1086ff: OUTPUT«5␤»
dolmen__ rakudo: my Set $s .= new(1..5, 72..82); say $s.elems
p6eval rakudo 1086ff: OUTPUT«16␤» 09:40
frettled rakudo: Set.new(1..5).say
moritz_ rakudo: say Set.new(1..5).intersect(4..8).elems
p6eval rakudo 1086ff: OUTPUT«Set()<0x75fc7b0>␤»
rakudo 1086ff: OUTPUT«Method 'intersect' not found for invocant of class 'Set'␤ in main program body at line 11:/tmp/iVIrlAIkjy␤»
moritz_ rakudo: say Set.new(1..5).intersection(4..8).elems
p6eval rakudo 1086ff: OUTPUT«2␤»
moritz_ rakudo: say ~Set.new.^methods(:local) 09:41
p6eval rakudo 1086ff: OUTPUT«of elems subset intersection equal superset keys at_key exists union new difference Bool subsetorequal values Num perl supersetorequal␤»
dolmen__ rakudo: my Set $s .= new(1..5, 3..9); say $s.elems
p6eval rakudo 1086ff: OUTPUT«9␤»
dolmen__ ???
masak dolmen__: ¿¿¿
dolmen__ oh, mixed answers
frettled rakudo: Set.new(1..4, 2..6).perl.say 09:42
p6eval rakudo 1086ff: OUTPUT«Set.new(1, 2, 3, 4, 5, 6)␤»
masak pretty neat, eh? 09:45
I almost got the unicode operators in there, too. 09:46
dolmen__ rakudo: ~Set.WHAT.say
p6eval rakudo 1086ff: OUTPUT«Set()␤»
dolmen__ rakudo: Set.WHAT.say 09:47
p6eval rakudo 1086ff: OUTPUT«Set()␤»
frettled Hmm!
rakudo: Set.new(1..4, 2..6).keys.say
dolmen__ say (1..5)
p6eval rakudo 1086ff: OUTPUT«123456␤»
dolmen__ rakudo: say (1..5)
p6eval rakudo 1086ff: OUTPUT«12345␤» 09:48
dolmen__ rakudo: say ~(1..5)
p6eval rakudo 1086ff: OUTPUT«1 2 3 4 5␤»
dolmen__ rakudo: say 'x' ~(1..5) 09:49
p6eval rakudo 1086ff: OUTPUT«x1 2 3 4 5␤»
dolmen__ Is ~ an infix or prefix op? 09:50
moritz_ both
when a term is epxected, a prefix
when an infix is expected, an infix
just like + 09:51
dolmen__ rakudo: say [~] (1..5) 09:52
p6eval rakudo 1086ff: OUTPUT«12345␤»
dolmen__ rakudo: say ([~] (1..5)).elems
p6eval rakudo 1086ff: OUTPUT«1␤»
dolmen__ rakudo: say (~ (1..5)).elems
p6eval rakudo 1086ff: OUTPUT«1␤»
moritz_ dolmen__: do you have an obsession for .elems? :-)
rakudo: say ([~] 1..5).perl 09:53
p6eval rakudo 1086ff: OUTPUT«"12345"␤»
dolmen__ I had a look at the discussion between pmichaud and TimToady about .elems in the backlog 09:54
moritz_ ah, didn't read it yet 09:55
dolmen__ 5 hours ago
or 6 09:56
masak [backlog] I think I like 'firstsame' better than '*' :) 09:58
'firstsame' has that Perl oddness about it.
moritz_ thinks * is already overused 09:59
masak aye.
moritz_ adding another meaning to it isn't going to help
masak let's start a Facebook group "we want 'firstsame' instead of '*'" :) 10:00
hm. 'firstsame' sounds like it's parallel to 'nextsame' though -- which implies it's a tailcall. 10:01
and there's no obvious parallel to 'callsame'.
10:05 meppl joined
jnthn oh hai 10:14
Typing protos is going to get tiring enough 10:15
Typing you-think-that's-cute-now firstsame will get even more so. :-)
masak heh. 10:21
bbkr rakudo: Set.new(1, 1).perl.say 10:27
p6eval rakudo 1086ff: OUTPUT«Set.new(1)␤»
bbkr rakudo: Set.new(1 .. 2).perl.say 10:28
p6eval rakudo 1086ff: OUTPUT«Set.new(1, 2)␤»
bbkr rakudo: Set.new(1 .. *).perl.say
p6eval rakudo 1086ff: ( no output ) 10:29
bbkr rakudo: Set.new(1, **-1 ... *).perl.say # expecting miracle :) 10:32
p6eval rakudo 1086ff: ( no output )
10:33 lestrrat is now known as lest_away
bbkr std: 555 ~~!~~ 666 10:43
p6eval std 31588: OUTPUT«===SORRY!===␤Expecting a term, but found either infix ~~ or redundant prefix ~␤ (to suppress this message, please use space between ~ ~) at /tmp/EZ59HXaH3Q line 1:␤------> 555 ~~!~~⏏ 666␤Parse failed␤FAILED 00:01 112m␤»
bbkr rakudo: 555 ~~!~~ 666
p6eval rakudo 1086ff: ( no output )
bbkr bug :)
jnthn heh 10:44
bet it parsed as
555 ~~ !(~(~(666)))
std: 555 ~~!~ 666 10:45
p6eval std 31588: OUTPUT«ok 00:01 109m␤»
jnthn std: 555 ~~!! 666
p6eval std 31588: OUTPUT«ok 00:01 109m␤»
jnthn Curios. 10:46
bbkr i'll work on my mutation tests during weekend journey so there will be more interesting cases :)
10:46 Mowah joined
masak bbkr: is that a new bug? 10:54
10:55 rv2733 joined
bbkr i think so, i found some similiar forced-context operator parsing bug 72828, but this one looks like different case 10:59
masak feel free to submit. 11:00
bbkr++
11:05 TiMBuS|Away joined 11:06 thebird left, thebird joined
masak a POST phaser block gets the return value as the current topic upon normal block exit. what does it get as the current topic when the surrounding block exits un-normally? more importantly, how will code within the POST phaser know whether the surrounding block exited normally? 11:07
11:07 TiMBuS left
frettled masak: is the phaser set to stun or kill? :) 11:08
masak wow, a *phaser* joke! how original. :P 11:10
frettled Yes, I bet you've never heard one before!
masak hold on, let me just stop laughing. 11:11
there. :)
now, about my question... 11:12
jnthn Maybe Nil 11:13
But of course it's possible Nil coulda been returned.
masak returning Nil counts as an 'unsuccessful block exit' though, right?
so it kinda makes sense.
jnthn Yes 11:14
Troo
frettled masak: If I read the spec correctly, POST phasers handle what happens after LEAVE, and if the block doesn't exit normally through LEAVE, then …?
jnthn I think os anyway
If current spec says that
*so
frettled re-reads that part of the spec. I remember I was confused the last time, too. 11:15
masak frettled: any of the LEAVE blocks in the LEAVE queue can throw an exception, or change the topic to Nil, I guess.
frettled masak: and it appears that you need to check $! in POST 11:19
masak yes, probably.
frettled well, OUTER::<$!>
masak should be the same, no?
is $! set by &fail?
jnthn not afaik 11:20
frettled Perhaps this is relevant: «If there is no stack-unwinding exception when these phasers are run, $! will be Nil. The last exception caught in the outer block is available as OUTER::<$!>, as usual.»
jnthn fail is just return Failure.new($thingy) iirc
frettled Context: exception in exit phasers
jnthn so it's a normal return in that sense.
(though not sure if it's "successful") 11:21
masak ok. 11:22
S04:1580: "In the absence of error exception propagation, a successful exit is one that returns a defined value in item context, or any number of values in list context as long as the length is defined. [...] A list is of undefined length only if it contains an undefined generator, which, happily, is what is returned by the C<fail> function when used in list context." 11:25
so &fail counts as an unsuccessful exit.
jnthn aha
So it's not successful to die or fail, but I'd not expect fail to set $!. 11:27
masak me either.
frettled sensible. 11:29
11:39 sftp joined 11:42 ruoso left
moritz_ masak: a POST block won't get executed if the surrunding block fails 11:54
POST is basically an assertion "if this thing returned a value, make sure it's a good one"
masak moritz_: "If a C<POST> fails while an exception is in flight the C<POST> failure doesn't replace C<$!> but goes straight into C<$!.pending>." 11:55
in which light am I supposed to read the above phrase if they don't run after an exception has been thrown? 11:56
moritz_ hm
that goes contrary to my understandings of DBC
masak not to mine.
it's still important to make sure the object is in a consistent state.
moritz_ object being in a consistent state should be checked by invariants, not by POST conditions 11:57
masak ok.
how does one encode invariants in Perl 6?
moritz_ though I don't know if we have support for invariants
masak I thought POST blocks were the closest we had.
moritz_ an invariant is a check that runs after the end of each method 11:58
masak that's a class-level POST block.
moritz_ so that if child classes add methods that endanger the internal state of an object, the parent invariant fires
masak class A { POST { "check invariant here" }; ... } 11:59
moritz_ that doesn't do what we want by current spec
unless it's special-cased, and I forgot about it
jnthn That'll only run once ever
moritz_ right
masak moritz_: it's special-cased.
and I think I like it.
jnthn masak: Spec reference?
masak hold on. 12:00
moritz_ should read S04 and S06 again
it's just very expensive
masak S04:1345
moritz_ in Eiffel, the mother of all OO DBC languages, you can enable and disable pre- and postconditions, invariants and loop invariants at compile time 12:01
jnthn Hmm, ok
masak moritz_: like, put comments before them? :P
moritz_ masak: no, in a control file
but PRE/POST in a class block are evaluated around every method in the class
right, that's the interesting part
so you can build debug and optimized libraries 12:02
12:02 silug left
masak right, because assertions never fail in production systems anyway :P 12:03
moritz_ gotcha
frettled understood the spec as saying that POST would be run anyway. That is, LEAVE etc. aren't guaranteed to run, but POST seems to be. Mind you, it's already three quarters of an hour since I read S04's section on phasers, and memory is such a flighty little slut. 12:04
masak moritz_: in Perl 6, I guess someone could write a 'turn off all PRE/POST things for greater speed' pragma.
moritz_ masak: I guess so too
jnthn I'm a little unconvinced about PRE and POST in the class body btw
They won't be very useful 12:05
If we can't make them see self
masak jnthn: good point.
jnthn And they won't do so unless we declare more magic.
And I'm not sure how that magic would look at this point.
moritz_ hopes they can see self
masak jnthn: magic it is, then. :)
jnthn OK, but "magic" doesn't cut it.
You need something implementable.
For PRE and POST inside a method it's easy - self is in the lexical scope. 12:06
moritz_ I understand them as wrappers around the method
around each method, that is
masak frettled: I read your eponym for memory and though "oh my, slipperly slope... :/"
frettled masak: heh
moritz_ has other gripes with class invariants though 12:07
masak I won't be the one to point out that this is supposed to be a family channel :)
jnthn The magic could be "the compiler clones them and sticks them as if they were PRE or POST into each method"
moritz_ suppose you have a constructor that ensures a sensible state of the object it returns
jnthn But don't expect that way to work for dynamically added methods. ;-)
moritz_ and then you add a second multi
frettled masak: good ;) 12:08
moritz_ and you find that you want to share some of the code for setting things up
and you put it into a method
and you call that from both constructors
and then it goes boom, becaues the helper method might only partially set up the object 12:09
but since it's the end of a method, the invariant is checked
masak moritz_: maybe make it a private method?
moritz_ masak: and private methods don't get invariant checks?
masak moritz_: right. 12:10
12:12 exodist is now known as Exodist
dalek kudo: 92a210d | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 513 files, 34010 (84.7% of 40163) pass, 12 fail
12:19
pmichaud good morning, #perl6 12:20
frettled good morning, pmichaud!
moritz_ good morning pmichaud, you seem to have rather tight sleep cycles these days :-)
masak good morning pmichaud! 12:22
jnthn morning, pmichaud 12:24
Wow, we cleared 34,000! :D
pugssvn r31589 | moritz++ | [t/spec] qx, qqx
moritz_ jnthn: I'm curious if my last spectest commit works on windows... could you please try it? (no hurry though) 12:25
pmichaud yes, my sleep cycles are all off at the moment. 12:27
jnthn moritz_: Will do so later on today :-) 12:29
moritz_ thanks
12:31 pmurias joined
moritz_ rakudo: 'abc' ~~ /(.)/; .say for $/ 12:37
p6eval rakudo 1086ff: OUTPUT«a␤»
moritz_ rakudo: 'abc' ~~ /(.)/; say $/
p6eval rakudo 1086ff: OUTPUT«a␤»
moritz_ rakudo: 'abc' ~~ /(.)(.)(.)/; say $/ 12:38
p6eval rakudo 1086ff: OUTPUT«abc␤»
moritz_ rakudo: 'abc' ~~ /(.)(.)(.)/; .say for $/
p6eval rakudo 1086ff: OUTPUT«abc␤»
masak what I expect so far.
moritz_ right
rakudo: 'abc' ~~ /(.)(.)(.)/; .say for $/.flat 12:39
p6eval rakudo 1086ff: OUTPUT«a␤b␤c␤»
moritz_ \o/
12:39 timbunce joined
moritz_ seems like RT #63606 can be resolved 12:39
masak aye. 12:43
12:53 rv2733 left 12:55 ruoso joined
masak is there a projected date for when Rakudo will run out of tests? 12:58
moritz_ Inf
masak run out of spectests to pass, I mean. 12:59
moritz_ Inf
masak good. then I'll keep calling Yapsi "official".
moritz_ when the number of not-yet-passing tests gets very small, it gets asymptotically harder to pass them all 13:00
which gives us enough time to write more failing tests :-)
frettled heh
masak is that effect perceptible yet?
moritz_ well
there's a core of todo'ed/skip'ped tests that have been that way for ages 13:01
mathw Probably not, while there are large chunks of the spec still unimplemented
I bet I could write you some macro tests that fail...
moritz_ mathw: there are macro tests already :-)
more are welcome, of course
masak I have a feeling we need more phaser tests :)
moritz_ or for example quasi-quoting isn't limited to macros 13:02
masak: that too
jnthn There's LOTS of areas we need more tests. 13:04
I bet we'll want more integration tests too
As we discover more interesting feature interactions.
moritz_ things like phasers need a quadratic number for interactions between them
jnthn: most of the tests I wrote are integration tests of some kind... lexicals + recursing, typing + attributes, multi dispatch + subset types, .... 13:05
masak I think I might actually enjoy writing phaser tests. did I just say that out loud? 13:06
don't know where I'd get the tuits, though.
and it'd be more fun with an implementation that implemented things in parallel.
mathw well then, you should implement parallelism in Yapsi
masak some phasers are already feasible to implement in Yapsi, but perhaps not so interesting yet without subroutines. 13:09
dolmen__ rakudo: (1, 'Z', 3).flat.perl.say 13:10
p6eval rakudo 92a210: OUTPUT«(1, "Z", 3)␤»
frettled masak: details, schmetails, who needs subroutines, anyway? :D 13:12
moritz_ masak: FIRST and LAST should be possible right now, I think 13:13
masak frettled: I do. :) working my way up to fibonacci in Yapsi :)
moritz_: hm, but those aren't the easiest ones, I think.
ENTER is easy, though. 13:14
moritz_ masak: if you want something easy, go shopping :-)
masak moritz_: what I really meant was "I don't see the mechanism with which FIRST and LAST might currently be made to work". 13:15
frettled moritz_: that's not yet a set of keywords in Perl 6, though? («go shopping»)
moritz_ frettled: no, just a meme :-)
frettled moritz_: thank goodness :D
dolmen__ rakudo: (1, (1, 9), 3).flat.perl.say
p6eval rakudo 92a210: OUTPUT«(1, 1, 9, 3)␤»
moritz_ masak: don't you have loops yet?
masak moritz_: specifically, I thought I might start by cheating and make the phasers static. FIRST and LAST don't seem very static.
moritz_: Yapsi does while loops now. 13:16
moritz_ well, then :-)
alpha: for 1..4 { FIRST { say "OH HAI" }; .say } 13:17
p6eval alpha 30e0ed: OUTPUT«Could not find non-existent sub FIRST␤in Main (file src/gen_setting.pm, line 324)␤» 13:18
masak moritz_: I'm successively adding things to my (and Yapsi's) model. I'm not sure how FIRST and LAST would work with what's currently there.
FIRST has to check for... something. probably a hidden variable.
that's not a problem in itself, but where to put it? 13:19
moritz_ in first approximation, ENTER could be made to work by just adding another block to the statementlist in the block, no?
masak can't put it in the lexpad of the block that's executing, because a new such is born with each iteration.
will probably have to put it in the lexpad outside that.
moritz_ in the same location where you put state variables :-) 13:20
masak :)
moritz_ oh wait, that doesn't work
masak moritz_: re, ENTER; yes. that's my plan.
moritz_ with nested loops, that is
masak it doesn't?
moritz_ for 1..3 { for 1..2 { FIRST {.say }; ... } }
masak seems to work great.
moritz_ I'd expect that to say 1 three timees
masak aye.
and it would, too.
moritz_ I meant with a state variable 13:21
masak ah; no.
moritz_ sorry for being confusing
masak but the hidden-in-outer-block idea works.
moritz_ speaking of confusion...
masak (it doesn't work for 'state' vars, as I and sorear discussed the other day)
moritz_ you were right about nextsame() never leading to ambiguous dispatch in the current model
(which we've discussed a few months ago) 13:22
masak moritz_: I remember that discussion, yes.
we're all trying to fit Perl 6 into our brains here. :)
13:23 bphillips joined
moritz_ and when we let it out again, it's squeezed in some places 13:23
masak :)
"handle with care"
13:24 skids joined, patspam joined
moritz_ Perl 6 - a product of initite mental rumination :-) 13:25
13:27 tadzik left
masak man, now I felt like implementing ENTER. :) 13:27
moritz_ and did you do it? :-)
masak must... not... lose... focus...
no, I'm being a good GSoC student right now :)
moritz_ masak++
well, you have to make something up for missing the last status meeting :-) 13:28
masak will probably do ENTER right after the gist.github.com/464349 SIC refactor.
moritz_: yeah. :/ I'll likely not make the next one, either.
jnthn masak: Can always pre-paste a rapport in the channel. :-) 13:29
masak jnthn: that's provided I remember the #phasers meeting. :/ 13:30
13:31 uniejo left
[particle] if only there were technology that existed to help you with that. 13:32
13:33 tylercurtis joined
jnthn That'd be stunning. 13:33
masak [particle]: :P 13:35
what do Bufs stringify to? 13:38
mathw strings :P
masak thank you.
what strings?
rakudo: say ~Buf.new
p6eval rakudo 92a210: OUTPUT«Buf()<0x79b30c0>␤»
masak is that right? 13:39
mathw I assume the spec doesn't say, or you wouldn't be asking
[particle] Bugs stringify with what encoding/charset?
arnsholt If the binary contents are valid as a string in the current encoding, as a literal string might make sense
masak arnsholt: that sounds slightly dangerous for some reason. 13:40
arnsholt I s'pose
[Coke] blogs.perl.org/users/brian_d_foy/20...it-is.html - would this trip up perl6?
masak arnsholt: what if it's a .jpg blob which just happens to have only kosher characters?
[Coke]: heard of Rat?
arnsholt Then it'll be stringified as gibberish =)
13:40 tadzik joined
moritz_ IMHO there are two ways Bufs can stringify: 13:41
1) like they do now
2) with a huge explosion
arnsholt Something like "Buffer, 128 bytes" might make sense as well
masak rakudo: say (200 * 1.15) % 5
p6eval rakudo 92a210: OUTPUT«0␤»
masak \o/
moritz_ any implicit decoding operation would do us no good
mathw Arguably they should only convert to string representations of their internal data under explicit guidance
I think we're all agreeing on that :)
moritz_ ... which is what .decode does
masak I'll go with "big explosion", then. 13:42
mathw sounds good
moritz_ it will be less surprising in the case of if $buf eq 'Foo' { ... } 13:43
masak aye.
moritz_++ # you'd make a good language designer! :)
13:44 tadzik left
[Coke] masak: that was more of a softball question intended to get someone motivated to post a response on bdf's blog. =-) 13:45
moritz_ URL?
[Coke] blogs.perl.org/users/brian_d_foy/20...it-is.html - would this trip up perl6?
(resend)
pmichaud looking 13:46
mathw pah, floating point
moritz_ rakudo: say (200 * 1.15).perl 13:47
moritz_ replies
p6eval rakudo 92a210: OUTPUT«230/1␤»
pmichaud moritz++
I'd simply say that Perl 6 knows how to represent 1.15 exactly. :-)
mathw (Perl 6)++ 13:48
(floating point)-- 13:49
pmichaud rakudo: say (1.15).WHAT
p6eval rakudo 92a210: OUTPUT«Rat()␤»
pmichaud masak: (buf stringification) I worked on implementing Stringy the other day, and it's not a trivial change 13:54
(it's not a hard change, it's just not trivial :)
frettled Hmm, converting the cheatsheet to HTML + CSS is a nice challenge, progress is slow inbetween $ork_stuff, but it's slooowly improving.
pmichaud masak: I don't know if that impacts at all the work you're doing on Buf 13:55
masak pmichaud: might do, might not.
pmichaud: right now I'm in file I/O, trying to round-trip.
that basically involves making Parrot do the right thing through PIR.
pmichaud really, in pir? I would've thought that'd be abstracted away by now. 13:56
masak possibly. 13:57
I've not decided exactly how to do it yet.
pmichaud does his final "git pulls" before heading off for travels
masak pmichaud: have a pleasant, relaxing vacation!
pmichaud I will 13:58
[particle] pmichaud: aloha
moritz_ have -Ofun vacations :-)
pmichaud I shall 14:03
see you all online :)
moritz_ wants to see you call offline in Pisa :-) 14:04
frettled heh 14:05
pmichaud: enjoy!
14:06 bphillips left 14:07 patspam left 14:18 timbunce left 14:19 patspam joined 14:22 gbacon joined 14:23 timbunce joined
frettled Now it's just a small matter of arranging the elements properly, some minor formatting, and a choice of colors: jani.at.ifi.uio.no/prog/P6/cheatsheet.shtml 14:26
(tested only in the latest official versions of Chrome, Firefox, Opera and Safari) 14:27
masak frettled: nice start!
jnthn Aye! 14:28
frettled++
jnthn looks forward to seeing the final thing
frettled ♥ CSS3 14:29
IllvilJa frettled: unicode ftw! 14:30
frettled That, too!
14:32 Ross left
masak "It's 2010, and some things are nice, at least." 14:34
IllvilJa masak: progress creeps upon us from everywhere... new versions of software is installed, and suddenly stuff like mobile broadband etc becomes RELIABLE! 14:36
masak :)
14:41 jaldhar left
ash_ frettled++ looks nice 14:43
dolmen__ frettled: could you add the Unicode symbols too?
pugssvn r31590 | moritz++ | [t/spec] fudge advent 10 for rakudo 14:44
r31591 | moritz++ | [t/spec] fudge autoviv tests for rakudo
14:45 xinming left
dolmen__ frettled: also, use italics for 'op' 14:46
dalek kudo: 1ef278d | moritz++ | t/spectest.data:
run two more test files
14:48
dolmen__ frettled: put it on github ; I would like to contribute
moritz_ or in the pugs repo, where the .txt version is 14:50
in docs/Perl6/ 14:51
moritz_ decommutes
masak wee, segfault! 14:54
I'll take that as meaning "no, that's not the way this should be coded".
diakopter "this" ambiguous ;) 15:05
(or intentionally broad)
15:08 diakopter sets mode: +v masak
tylercurtis frettled: looks nice, but I'm getting lots of wasted whitespace(on Chrome 5.0.375.99 on OS X, if that's relevant). 15:10
15:11 chitragupt joined 15:12 eternaleye left 15:13 TiMBuS|Away left, TiMBuS joined
ash_ ping moritz_? 15:17
frettled dolmen__: I'll put it in the pugs repo when I find where I put my commit bit (I know it's around here somewhere!) 15:20
tylercurtis: I'm also getting lots of wasted whitespace, it's a bit of work to fix that, but we'll get there. 15:21
dolmen__, tylercurtis: thanks for the feedback!
Hrm, long time no checkout. :) 15:23
Would it be sensible to create a Cheatsheet subdirectory, move cheatsheet.txt there, and place HTML+CSS there? 15:27
frettled considers the forgiveness option. :) 15:28
15:28 pmurias left, wallberg joined 15:33 masak left 15:36 dolmen__ left
pugssvn r31592 | jani++ | Moved text cheatsheet, added HTML+CSS version 15:37
frettled needs to commit a few svn commands to memory ;) 15:39
moritz_ ash_: pong... just a sec 15:44
15:55 macdaddy joined 15:56 macdaddy is now known as Guest48289 15:58 sail0r joined
frettled Yay, perl6.org is updated with the new link, too, so that people can still use the text-based cheatsheet until the HTML+CSS one is, ehrm, okay. 15:58
sail0r perl6: say 3;
p6eval elf 31592, pugs, rakudo 92a210: OUTPUT«3␤»
ash_ rakudo: say 3;
p6eval rakudo 92a210: OUTPUT«3␤»
moritz_ wow, they agree :-)
15:59 snarkyboojum left
frettled heh 15:59
ash_ nqp: say(4); 16:00
frettled perl6: 3.say;
p6eval nqp: OUTPUT«4␤»
elf 31592, pugs, rakudo 92a210: OUTPUT«3␤»
ash_ o.0 i wrote 4
nqp: say(3); # facepalm
p6eval nqp: OUTPUT«3␤»
ash_ even nqp agree's (almost)
frettled nqp: 3.say;
p6eval nqp: OUTPUT«Method 'say' not found for invocant of class 'Integer'␤current instr.: '_block11' pc 33 (EVAL_1:12)␤»
16:04 ashleydev joined 16:09 baest_ joined 16:11 baest left 16:16 zachy left 16:19 dual left 16:22 lue joined, chitragupt left
lue good $celestialposition, #perl6 ! 16:22
tylercurtis moritz_: Even Yapsi and Bennu agree on that one. :) 16:23
16:23 zachy joined, chitragupt joined 16:24 cdarroch joined, cdarroch left, cdarroch joined 16:25 ashleydev left
lue gr. I can't git pull because of the newly added changes to operators.pm (specifically, merge conflict) 16:27
moritz_ tylercurtis: it seems to be the smallest common denominator 16:28
:-)
tylercurtis perl6: my $a = 3; say 3; 16:29
p6eval elf 31592, pugs, rakudo 92a210: OUTPUT«3␤»
tylercurtis moritz_: and that's the greatest common denominator. :)
lue
.oO(the greatest common denominator is 42)
16:34
16:35 wallberg left
moritz_ perl6: say 43 # SCNR 16:35
p6eval elf 31592, pugs, rakudo 92a210: OUTPUT«43␤»
16:38 thebird left, Ross joined
pugssvn r31593 | lwall++ | [S05,S06] more refinements to {*} 16:41
moritz_ phenny: ask masak any objections against migrating ufo to use MAIN sub? 16:46
phenny moritz_: I'll pass that on when masak is around.
16:47 ashleydev_ joined 16:51 p6eval left
pugssvn r31594 | moritz++ | [evalbot] less horrible safe mode for Rakudo 16:51
moritz_ rakudo: say "alive"
16:51 p6eval joined
moritz_ rakudo: say "alive" 16:51
p6eval rakudo 1ef278: OUTPUT«alive␤» 16:52
moritz_ rakudo: say @*INC.perl
p6eval rakudo 1ef278: OUTPUT«["lib", "/home/p6eval/.perl6/lib", "/home/p6eval//p1/lib/parrot/2.5.0-devel/languages/perl6/lib", ".", "lib"]␤»
moritz_ rakudo: run('echo pwnd')
16:52 ashleydev_ left
p6eval rakudo 1ef278: ( no output ) 16:52
moritz_ rakudo: run('echo pwnd') 16:53
p6eval rakudo 1ef278: ( no output )
lue rakudo: $a = run('echo pwnd'); say $a; 16:54
p6eval rakudo 1ef278: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/wJwdhPQbfu:13)␤»
moritz_ now it's just so slow that each possibly unsafe operation times out :-) 16:55
16:55 ashleydev joined
tylercurtis rakudo: my $a = run('echo pwnd'); say $a; 16:56
p6eval rakudo 1ef278: ( no output )
moritz_ I guess I need to precompile Safe.pm
16:56 TiMBuS left 17:00 dakkar left
diakopter hm 17:03
17:03 kensanata joined
moritz_ rakudo: * * 17:03
frettled moritz_: yes, I don't think you can rely on computers to be too slow to execute Rakudo runtimes forever.
p6eval rakudo 1ef278: OUTPUT«===SORRY!===␤Confused at line 13, near "* *"␤»
lue rakudo: *; say "hi" 17:05
p6eval rakudo 1ef278: OUTPUT«hi␤»
lue my $a = 2; my $b = $a * *; say $b;
rakudo: my $a = 2; my $b = $a * *; say $b; 17:06
p6eval rakudo 1ef278: OUTPUT«_block114␤»
lue
.oO(apathetic math is weird)
pugssvn r31595 | lwall++ | [S06] = should be := 17:08
ash_ rakudo: my $a = 2 * *; say $a(3);
p6eval rakudo 1ef278: OUTPUT«6␤»
17:08 proller left
TimToady jnthn or pmichaud: how does the callsame "macro" get the capture of the current routine? this is something we should probably standardize 17:09
lue (I'm surprised it dwimmed, actually.)
17:11 p6eval left, p6eval joined
pugssvn r31596 | moritz++ | [evalbot] experimental yapsi target 17:11
17:11 p6eval left, p6eval joined
moritz_ yapsi: say 3 17:12
p6eval yapsi: OUTPUT«Can't find ./Yapsi in @*INC␤in Main (file <unknown>, line <unknown>)␤»
dalek kudo: 8978801 | moritz++ | build/Makefile.in:
compile Safe.pm, and install the .pir version too
17:13 p6eval left
pugssvn r31597 | moritz++ | [evalbot] yapsi needs PERL6LIB 17:13
17:13 p6eval joined
moritz_ yapsi: say 3 17:13
p6eval yapsi: OUTPUT«3␤»
diakopter ooo 17:14
moritz_ this is the moment we've all been waiting for!
erm, at least masak did :-)
diakopter it slow-ish
frettled moritz_: is yapsi included in the perl6-thingy?
moritz_ frettled: no
diakopter: it is. it's another layer on top of rakudo :-) 17:15
frettled jolly joy :)
lue ponders an English <–> Perl 6 translator
diakopter moritz_: ohhh. oh yeah. I knew that, someday ago
frettled lue: that's _almost_ ←→ 17:16
moritz_ but it means that any rakudo optimizations directly speed up yapsi too (once it runs on current Rakudo and not alpha)
17:23 pmurias joined
pmurias TimToady: ping 17:23
TimToady: could we change the keys in ALL to some sort of unique identifiers as the files names are causing heaps of problems? 17:26
* $ALL 17:27
[Coke] wonders what's stopping yapsi from running on rakudo-mater.
*master
17:30 dual joined 17:36 xinming_ joined 17:38 xinming_ is now known as xinming 17:40 dju_ joined, dju left 17:41 Kodi joined
pugssvn r31598 | Kodi++ | [S32/Temporal] Clarified the distinction between &time and &now, specified what formatters and time zones should actually do, and dropped some formatting methods. 17:43
Kodi Comments welcome.
17:48 cls_bsd left 17:50 rv2733 joined
ingy rakudo: my $n = "Ongy"; $n ~~ s/O/I/; say $n 17:59
p6eval rakudo 897880: OUTPUT«Ingy␤»
18:04 eiro left 18:07 kensanata left
ingy rakudo: my $v = "a\nb\nc\n\n"; $v ~~ s/\n+$/\n/; say $v; 18:07
p6eval rakudo 897880: OUTPUT«a␤b␤c␤␤»
[particle] Kodi: "...except that it *also* includes a fractional part." -- limits ambiguity
ingy rakudo: my $v = "a\nb\nc\n\n\n\n"; $v ~~ s/\n+$/\n/; say $v; 18:08
p6eval rakudo 897880: OUTPUT«a␤b␤c␤␤»
Kodi [particle]: Agreed. 18:09
ingy anyone seen: Null PMC access in find_method('new')
on a subst like $v ~~ s/\n+$/\n/
18:17 eiro joined
ingy rakudo: say Nil 18:17
p6eval rakudo 897880: OUTPUT«␤»
diakopter my poor p6eval vps.
ingy rakudo: say Nil.perl
p6eval rakudo 897880: OUTPUT«()␤» 18:18
diakopter rakudo: say 'hi' ~~ s/\n+$/\n/
p6eval rakudo 897880: ( no output )
diakopter (timeout)
ingy rakudo: my $v = 'hi'; $v ~~ s/\n+$/\n/; say $v 18:20
p6eval rakudo 897880: OUTPUT«hi␤»
ingy rakudo: my $v = {}; $v ~~ s/\n+$/\n/; say $v
p6eval rakudo 897880: OUTPUT«␤» 18:21
ingy rakudo: my $v = Str.new; $v ~~ s/\n+$/\n/; say $v
p6eval rakudo 897880: OUTPUT«␤»
ingy rakudo: Str.new('huh') 18:22
p6eval rakudo 897880: OUTPUT«flattened parameters must be a hash or array␤ in main program body at line 13:/tmp/U6kZapiCy9␤»
18:35 snarkyboojum joined
tylercurtis Macros are supposed to return either strings or ASTs, right? 18:36
Tene tylercurtis: that's right. 18:38
lue rakudo: my $1number = 3; say $1number # testing vars beginning w/ digit 18:39
p6eval rakudo 897880: OUTPUT«===SORRY!===␤Redeclaration of symbol $ at line 13, near "number = 3"␤»
18:39 justatheory joined
lue O.o 18:39
tylercurtis Is there any way to get an AST in the spec other than quasiquoting? 18:41
Tene The AST isn't actually specced. 18:42
Quasiquoting will give you an implementation-dependant AST.
You could also just instantiate AST object directly.
tylercurtis But, since the AST isn't described in a spec, that doesn't seem like a very portable option. 18:43
s/a spec/the spec/
pmurias the intent of the spec is that quasiquoting should be used 18:44
Tene tylercurtis: that's right.
tylercurtis: You could always try something like quasiquoting something else, examining the result, and building something that looked like the result, but quasiquoting is likely a lot simpler than that. 18:45
tylercurtis This is really just idle curiosity. I was wondering how implementing the "use COBOL;" that S02 jokes about would work. 18:47
lue wonders if macros work yet in rakudo. 18:48
tylercurtis I don't think so.
[particle] rakudo: macro works { } # doesn't
p6eval rakudo 897880: OUTPUT«Could not find sub &works␤ in main program body at line 13:/tmp/njapY_Bctt␤»
Kodi lue: If most Perl 6 features will be implemented by Christmas, macros will be implemented by Boxing Day. 18:49
lue :) 18:50
pmurias hates when STD hangs up 18:51
moritz_ hates it when any software hangs 18:54
diakopter what's Boxing Day 18:55
moritz_ Dec 26th
lue Day after christmas, if I remember right.
diakopter oh 18:56
moritz_ that very much depends on your definition of "christmas" :-)
for me, christmas is usually the 24th 18:57
ingy rakudo: class Foo { my $.x is rw }; my $o = Foo.new; $v = "O HAI"; $o.x = $v; say ">>" ~ $o.x; 18:58
p6eval rakudo 897880: OUTPUT«===SORRY!===␤Symbol '$v' not predeclared in <anonymous> (/tmp/ZjUDGoQ7AN:13)␤»
ingy rakudo: class Foo { my $.x is rw }; my $o = Foo.new; my $v = "O HAI"; $o.x = $v; say ">>" ~ $o.x;
p6eval rakudo 897880: ( no output ) 18:59
ingy rakudo: class Foo { my $.x is rw }; my $o = Foo.new; my $v = "O HAI"; $o.x = $v; say ">>" ~ $o.x;
p6eval rakudo 897880: ( no output )
ingy :'(
moritz_ seems p6eval is a bit broken 19:00
diakopter did you remove the Safe.pm inlining?
ingy everything feels broken
moritz_ rakudo: class Foo { }; say 3
diakopter: I now have inlining and Safe.pm loading 19:01
p6eval rakudo 897880: ( no output )
diakopter ?
in evalbot.pl it's still inlined as I left it
the contents of Safe.pm, I mean
moritz_ diakopter: r31594
the old approach stopped working since most built-ins are lexicals now 19:02
diakopter ok 19:03
moritz_ but it seems the new approach has to be fully inlined too
:(
using Safe + another module leads to infinite loops 19:04
diakopter hrm
istr that was why I inlined it previously
19:04 cono left
moritz_ right, which I forgot :( 19:05
diakopter :) me too
I guess I shoulda noted it in a comment or two
19:06 cono joined
moritz_ I'll do that now 19:06
Kodi rakudo: class C { my $n = 5; has $.x = $n; }; my $i = C.new; say $i.x; 19:09
diakopter (timeout)
p6eval rakudo 897880: ( no output )
Kodi Ah.
diakopter (b/c of what we were saying above)
pugssvn r31599 | moritz++ | [evalbot] "use Safe" makes rakudo loop when declaring a class. So inline it instead. diakopter++
19:09 p6eval left
Kodi Yeah. 19:09
19:09 p6eval joined, diakopter sets mode: +v p6eval
diakopter rakudo: class C { my $n = 5; has $.x = $n; }; my $i = C.new; say $i.x; 19:10
19:10 colomon joined
p6eval rakudo 897880: ( no output ) 19:10
moritz_ rakudo: say 'alive'
p6eval rakudo 897880: OUTPUT«alive␤»
moritz_ 10541 CPU time limit exceeded | PERL6LIB=lib ../p/bin/perl6 /tmp/Ng0yDI8zMr >> /tmp/Y3hdJXQ_M4 2>&1
rakudo: class A { }; say "alive"
p6eval rakudo 897880: OUTPUT«alive␤»
lue rakudo: my @a = 1,2,3; @a[$_+3] := @a[$_] for ^3; say @a.perl 19:11
p6eval rakudo 897880: OUTPUT«[1, 2, 3, 1, 2, 3]␤»
Kodi rakudo: class A { }; my $x = A.new; say "alive"
p6eval rakudo 897880: OUTPUT«alive␤»
Kodi rakudo: class C { has $.x = 5; }; my $i = C.new; say $i.x; 19:12
p6eval rakudo 897880: OUTPUT«5␤»
Kodi rakudo: class C { my $n = 5; has $.x = $n; }; my $i = C.new; say $i.x;
p6eval rakudo 897880: ( no output ) 19:13
dalek kudo: e58b166 | (Solomon Foster)++ | src/core/ (2 files):
Tweak Real.atan2 and Num.atan2 so they can handle $x's which are not of the
19:14
19:22 eiro left 19:23 timbunce left 19:28 eiro joined 19:29 colomon left
Kodi rakudo: say 0.fmt('%02d'); say abs(0).fmt('%02d'); 19:29
p6eval rakudo 897880: OUTPUT«00␤0␤»
Kodi Am I doing something wrong there?
[particle] rakudo: say (abs(0)).fmt('%02d'); # ooc 19:33
p6eval rakudo 897880: OUTPUT«00␤»
[particle] rakudo: say fmt('%02d'), abs(0) 19:34
p6eval rakudo 897880: OUTPUT«Could not find sub &fmt␤ in main program body at line 20:/tmp/fTFailGxTV␤»
[particle] ok, so it's not a sub, just a method, but abs(0).fmt is taking the abs of (0).fmt(...) it seems
Kodi [particle]: Looks like it. Pretty counterintuitive. 19:35
[particle] well, i would have written 0.abs.fmt to start
method chaining looks correcterrer there
Kodi Indeed, I forgot abs was a method. 19:36
[particle] but, i'll agree, i didn't expect that result
19:39 baest_ left
cognominal tries to grok the llsig_element. sig hell? sieg heil? 19:41
it's hot, my pun engine got in overdrive. 19:42
jnthn cognominal: It describes one parameter in the sig.
cognominal I got that right :)
jnthn Other than that it's just a bunch of stuff. :-) 19:43
It's what bind.c does with it that's interesting. :-)
cognominal indeed, that's what I trie to undeerstand.
*try 19:44
19:45 daemon joined
cognominal jnthn, when a parameter is a signature, does it affact the candidate selection or only the binding? 19:45
*affect 19:46
19:46 masak joined
masak ahojte! 19:46
phenny masak: 16:46Z <moritz_> ask masak any objections against migrating ufo to use MAIN sub?
jnthn "is a signature"
?
cognominal: As in when it has a sub-signature?
masak moritz_: no objections. patch welcome.
jnthn cognominal: In that case both
tylercurtis yapsi: say 'Look what moritz_ did, masak!';
p6eval yapsi: OUTPUT«Could not parse␤»
jnthn cognominal: look in perl6multisub.pmc
masak \o/
cognominal yes
masak moritz_++
tylercurtis didn't think that would work.
jnthn cognominal: look for bindability check or something like that. 19:47
yapsi: !d9_++!!!
masak yapsi: my $a = 3; while --$a { my $b; say $b; $b = 42 }
19:47 justatheory left
p6eval yapsi: OUTPUT«Could not parse␤» 19:47
yapsi: OUTPUT«Any()␤42␤»
jnthn fuzzing fel
pugssvn r31600 | Kodi++ | [S32/Temporal] Prose edit; "C<Seq>" -> "list"
cognominal jnthn, but the answer is yes or no?
jnthn cognominal: yes but :-) 19:48
masak I think I've figured out how to do FIRST and LAST blocks.
jnthn cognominal: It affects the candidate selection
lue hai masak o/
jnthn cognominal: But the candidate selection uses "can this bind" as its criteria, iirc.
masak my favorite lue! hi! \o
jnthn
.oO( this is where I don't ask masak how many lues he knows ;-) )
masak jnthn: 1.
jnthn <grin> 19:49
lue masak: you've got yourself someone who can test Buf! [might actually be cool to use Buf for a memory map, instead of ye olde Array]
masak lue: I'm working on Buf and file I/O as we speak.
lue (and other Binary (including I/O) type things) :) 19:50
cognominal that's what I fear, I feel that perl6 is strayed to far away for haskell pattern matching. I know we are in a dynamic object environment so this is way more complex. But if we don't get haskell pattern matching as a subset of feature, I would not find MMD very compelling. But I may not be representative of the average user.
masak I have a question for #parrot about a segfault that's blocking me. preparing for that now.
cognominal *has strayed
19:50 cdarroch left
cognominal *has strayed too far away from 19:51
19:51 Kodi left
lue imagines #parrot as being a very unforgiving board of members sitting behind a desk kilometers above the ground, with you behind a dinky lectern 19:52
19:56 baest joined, eternaleye joined
jnthn cognominal: I'm not convinced it can't be used for that, your examples just had too much ambiguity for the dispatcher to resolve without you giving it a few more hints. 19:57
19:57 envi^home left, shade\ left 19:58 tadzik joined
cognominal I certainly don't know enough already to emit anything but gut feelings. 19:59
ash_ are return types included in signatures? (eg. :(Int $a --> Bool) 20:00
cognominal probably some blog entry from jonathan giving exemple how to walk some structures (arrays, hashes) will help. hint! hint!.
ash_ )
20:00 timbunce joined
ash_ std: :(Int $a) 20:00
p6eval std 31599: OUTPUT«ok 00:01 113m␤»
jnthn cognominal: :-)
ash_ std: :(Int $a --> Bool)
p6eval std 31599: OUTPUT«ok 00:01 110m␤»
jnthn cognominal: I'll try and come up with something on that. 20:01
20:01 cdarroch joined, cdarroch left, cdarroch joined
cognominal ash_, I think the spec has some speculation about that (and marked as such) 20:01
jnthn, I believe it will interest many people besieds me.
jnthn lol spec-ulation
cognominal MMD is a difficult subject.
ash_ rakudo: my $a = :(Int $a --> Bool); 20:03
p6eval rakudo 897880: ( no output )
ash_ rakudo: my $a = :(Int $a --> Bool); say $a.WHAT;
p6eval rakudo 897880: OUTPUT«Signature()␤»
cognominal ORIGIN late 16th cent.: from Latin speculat- ‘observed from a vantage point,’ from the verb speculari, from specula ‘watchtower,’ from specere ‘to look.’ 20:08
20:12 buubot left, buubot joined
[Coke] lue; ah, so it's like #perl6 for parrot folks! 20:13
masak [Coke]: I've found neither #parrot nor #perl6 people to be 'unforgiving' :) 20:14
[Coke] masak: merely trying to counter parrot fud. :P
masak by all means. 20:15
lue the way masak worded his message made me think of that.
masak I did not mean to imply any such thing.
preparing questions is a nice habit, is all. 20:16
though whether it helped in this case remains to be seen :)
lue it's a far-fetched conclusion. [So of course it's my first thought :)]
maybe it's looking through piles of info on the NES. [Maybe next time I should a project that doesn't require so much planning and foresight :)] 20:18
arnsholt masak: I try to be prepared as well
lue s/should a/should pick a/
arnsholt Always nice to be reasonably sure you're right about what's wrong
frettled lue: I'm still stuck in the world where NES means Nintendo Entertainment System. Help! 20:19
masak frettled: er. that's what he means.
arnsholt I think it still means Nintendo Entertainment System, in this case =)
20:20 shade_ joined
frettled masak: phew 20:20
lue (I'm stuck on how to implement the clock cycles right now) And what _*fun*_ those mappers will be. 20:22
It's quite a complex little world, it deserves an essay or two :)
moritz_ masak: I have a patch for ufo to use MAIN sub, but I'm not sure you'll like it :-) 20:25
masak moritz_: thanks for being so honest about it :)
moritz_ it puts everything into MAIN
even subroutines 20:26
masak that's OK.
moritz_ because many of them are closures
masak aye.
moritz_ apart from that, it's all trivial
masak I've recently come around to that kind of development.
moritz_ so, should I push? 20:27
masak go ahead.
moritz_ pushed
all tests pass :-)
masak jnthn: ping
moritz_++
moritz_ rakudo: say ?all()
p6eval rakudo 897880: OUTPUT«1␤»
masak love the commit message :)
rakudo: say ?all 20:28
jnthn masak: gnip
p6eval rakudo 897880: OUTPUT«1␤»
masak jnthn: lol segfault: gist.github.com/469980
jnthn OMG PARTY!
masak jnthn: line 25.
jnthn: on #parrot, we determined that even pio.'print'('OMG HAI') segfaults.
moritz_ it's that damn lolspeak 20:29
masak jnthn: so there's something I'm not supposed to do with pio, $pio or $!PIO that I'm doing.
jnthn: any idea what?
moritz_ that insults the intelligence of our nifty parrot
jnthn masak: Yes, I knwo why
masak oh phew
jnthn masak: This is why every other method call in IO.pm on $!PIO is written in Perl 6.
[Coke] wozzit?
jnthn masak: Anyway, the answer is...let me check because it got changed very recently by pmichaud++ 20:30
masak :)
jnthn [Coke]: We put PMCs in transparent containers. 20:31
[Coke]: If we don't de-containerize invocants, then PCCMETHODs get very very upset.
20:31 gbacon left
jnthn masak: deref_unless_object 20:32
pio = find_lex '$pio'
pio = deref_unless_object pio
pio.'print'(s) # hopefully we don't segfault
[Coke] jnthn: ok. segfaulting is probably a little harsh, though.
masak jnthn: thank you thank you! you're a good mentor! \o/
jnthn [Coke]: Unfortunately, there's not a lot we can easily do to resolve it.
[Coke] but that makes it a much lower priority. =-) 20:33
masak jnthn: ah, does pir::descalarref__PP($!PIO) do about the same thing?
jnthn [Coke]: It segfaults because it goes for the data pointer of the PMC wrapper
masak: Yes and would work just the same here
[Coke] I hate that pointer. =-)
jnthn masak: You can use that too
20:33 ash_ left
[Coke] jnthn++ 20:34
jnthn masak: The variant I gave you only does it if needed
descalarrer does it always, unconditionally
In your case, you know you need to so you can do that
lue afk
jnthn masak: Whenever you do a method call, we do this deref anyways.
masak hokay. 20:35
jnthn As in, from Perl 6
20:35 clintongormley left
jnthn We emit the deref_unless_object op 20:35
masak I had fun figuring out today while swimming how FIRST and LAST might work in Yapsi. 20:36
they're slightly more complex than I thought, especially LAST. 20:37
jnthn gets a sinking feeling
masak but at least I know *a* way to do either now.
moritz_ I guess LAST has to do funny things to preserve the value of lexicals
masak moritz_: closure.
moritz_ heh
masak moritz_: I don't want to do anything more 'funny' at this point.
this is what closures are made for.
so `while $cond { LAST { say "OH HAI" } }` translates to `while $cond { $sekrit-var = { say "OH HAI" } }; if $loop-ran-at-all { $sekrit-var() }` 20:39
frettled I think you just stunned the world. 20:42
moritz_ you notice that $loop-ran-at-all can be the same as $sekrit-var ?
masak and probably should :) 20:43
it cannot, however, be the same as $first-block-has-run, since there might be a 'last' in a FIRST block.
oh! and that reminds me.
PRE { ...; POST { ... } } has a special meaning. 20:44
jnthn omg
...
It means "the person who wrote this is nuts"? :-)
masak do any of the other FIRST/LAST, ENTER/LEAVE blocks have special meaning in a corresponding way?
jnthn: this is what I do when I have fun! :) 20:45
frettled jnthn: masak is scaring me!
jnthn masak: huh, I just drink beer and design meta-models.
Completely typical fun activities. 20:46
;-)
masak jnthn: I wrote the above completely sober. I don't need the beer. :P
frettled Evidently not.
jnthn I need the beer after reading it. :P
masak I'm my own Ballmer peak.
jnthn masak: What's the special meaning, ooc?
frettled No other substances that are illegal in most civilized nations?
masak jnthn: it's that the POST block still acts like it wasn't nested in the PRE block, except for the lexical nesting. 20:47
jnthn: pretty neat.
frettled oh!
masak TimToady++
jnthn masak: I didn't find that in S04.
masak: But...OK. :-)
frettled masak: that even makes a twisted kind of sense
masak jnthn: it's in there somewhere.
cognominal jnthn, beware of meta stasis, it soon proliferate beyon control.
20:47 eternaleye left
masak cognominal: well, you might argue that being a strange loop, all meta-models are already 'out of control' :) 20:48
masak writes his first binary file locally 20:49
\o/
now for reading it.
jnthn Yay!
20:50 ash_ joined, crazycaw joined
moritz_ masak: I've moved about half of the functions in ufo out of MAIN, and feel much better now :-) 20:50
masak :)
20:51 crazycaw left
masak moritz_: looks good. 20:51
moritz_ masak: thanks, good to hear
masak moritz_: mind if I change the 'note ... if' on line 61 to an 'if ... { note }'? I like to reserve statement_mod_cond for control flow. 20:52
moritz_ masak: go right ahead 20:53
masak also, is the double blank line on 108, 109 intentional?
jnthn afk for a little
moritz_ probably not
masak ok, fixing.
ah, 'topo-sort' is a new name, too. I like it. 20:56
moritz_ and with s/modules/things/ in it it's quite generic 20:57
masak indeed. not that ufo stands to gain from that, but still :)
by the way, would anyone like to design a ufo logo?
frettled masak: the theme would be very obvious, I think 20:58
masak I'm thinking this, only clearer: www.babble.com/CS/blogs/strollerderby/ufo05.jpg
20:58 sail0r left
masak actually, the more stylistic, the better, I suspect. 20:58
frettled masak: mm 20:59
Too bad I don't know how to use e.g. Adobe Illustrator, because I think I know what it might look like. 21:03
moritz_ frettled: then use inkscape :-) 21:04
masak +1
21:06 justatheory joined
moritz_ or draw it with a pencil, and scan it 21:09
pugssvn r31601 | lwall++ | [S04] simplify definition of successful return to be context agnostic 21:10
r31601 | define class-level PRE/POST to be submethods that are called like BUILD/DESTROY
masak has anyone else noticed a correlation between things we bitch about here on the channel, and some spec changes? :P 21:11
TimToady you're imagining things 21:12
frettled moritz_: There's another problem, and that is that I'm not a graphical designer. :)
Tene I haven't noticed a correlation with spec changes and the things that *I* bitch about in here.
frettled I have noticed a correlation with spec changes and the things that TimToady commits.
masak Tene: then clearly, you're bitching up the wrong tree. :P
TimToady has settled in at our new offices in Santa Clara, in my spiffy new cubicle 21:13
frettled TimToady: I hope there's nothing fishy about it. 21:14
TimToady we just outgrew our old tank because someone fed us too much 21:15
moritz_ so the feds were involved? :-)
cognominal outgrown our think tank?
[Coke] wonders where timtoady works these days.
Tene TimToady: have you figured out where the "default parsing rule" for each grammatical category, as described in the macros section of S06, comes from yet, or considered my proposal that it come from the proto regex body? 21:16
[Coke] . o O (obviously santa clara. thank you, pedants. =-)
Tene Santa Clara is very close to where I live.
moritz_ would be surprised if tehre were just one Santa Clara in the US 21:17
TimToady Tene: all this {*} work in the proto is, in part, to make that possible
Tene :)
21:18 skids left, cdarroch left
masak TimToady: I like the new definition of success better. 21:19
TimToady especially since the old one was nonsensical
masak yeah :)
TimToady insofar as we don't know context at that point
21:21 timbunce left
Tene TimToady: I keep forgetting that you live in the area. Let me know if you ever want to food and/or hacking sometime. 21:21
Well, I guess that I live in the area now. You were here before I was. 21:22
TimToady since '91 21:24
21:25 dolmen joined 21:26 timbunce joined
TimToady [Coke]: www.netlogicmicro.com 21:27
masak TimToady: do you write any Perl at work? :) 21:29
TimToady well, I don't write all Perl at work. :P 21:31
masak C? Visual Basic? LOLCODE? 21:32
moritz_ English?
21:36 ruoso left 21:40 lue left
TimToady jnthn: I expect fail to set $!, or you can't say: do-something() // warn "Couldn't do something: $!"; 21:43
jnthn TimToady: That's $! in the caller though? 21:45
pugssvn r31602 | pmurias++ | [mildew] load SMOP only when it's needed to avoid cicular dependency
jnthn TimToady: I was talking about in the callee.
pugssvn r31603 | pmurias++ | [mildew] new Cso backend, new YOU_ARE_HERE using setting 21:46
r31604 | pmurias++ | [mildew] add AST::Branch::simplified
r31605 | pmurias++ | [mildew] fix dist.ini
r31606 | pmurias++ | [smop] fix the building
r31607 | pmurias++ | say 1 works in mildew with all components installed
21:47 masak left, masak joined
pmurias diakopter, moriz_: who is responsible for the evalbot? 21:47
* mortiz_
masak yapsi: say 42
p6eval yapsi: OUTPUT«42␤»
masak \o/
moritz_++ 21:48
pmurias mildew: say 42
p6eval mildew: OUTPUT«Can't open perl script "mildew": No such file or directory␤»
pmurias should fix that soon
masak yapsi: while 42 { say 42 }
p6eval yapsi: OUTPUT«42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤42􏿽xE2
pmurias TimToady: i'll be now turning ~/p6/src/STD-dist into an acceptable STD, how do you want the files to be organized 21:49
?
21:50 lue joined
masak seems p6eval cut Yapsi off mid-byte. 21:50
lue ohai!
masak: good job on Buf & Co. so far. 21:52
masak lue: still working on it. hoping to be able to push and blog something before turning in for the night.
lue (I seem to have an interest spike in strings, esp. StrPos and StrLen) 21:54
21:55 patspam left
pmurias masak: the midterm evaluation evaluates the progress till the evaluation or till some other date? 21:55
masak pmurias: I'd guess the former, but I'm not sure. 21:56
I've only done that evaluation as a mentor, last year.
jnthn masak: I suggest just write something early next week about where you're at, and I'll do similar, and we'll submit 'em. 21:57
21:57 patspam joined
masak jnthn: aye. as I remember it, it's a bit more formulaic than that. they have a system called "Melange" in which you fill in some text fields. 21:57
jnthn masak: ah, your bit is too? 21:58
pmurias last year the student didn't have to fill in anything?
s/?// 21:59
jnthn I noticed I have some questions to fill in.
masak: Anyways, next week is The Big Week. :-) 22:00
masak aye. :)
right now, progress feels good.
I'm learning a bit more about PIR, too :)
for example, one cannot do find_lex '$!pio'
lue The Big Week? *jarring chord*
masak probably because it's not a lex :P
jnthn masak: :P
lue: Yeah it's like 8 days instead of 7. 22:01
masak a leap week.
jnthn We've probably had support for those spec'd in Temporal at some point in its history 22:02
22:02 cjk101010 left
masak well, it's important to be general enough. 22:02
lue but then other parts of the spec'd Temporal erased those from history :) 22:03
Tene masak: getattribute self, 'pio'
probably
masak ooh.
dolmen what is "yapsi"?
Tene or maybe '$pio'
I don't quite recall.
masak so far I assigned the attr to a lex, and then found_lex. but Tene's way looks promising.
Tene but you can check with --target=pir
masak dolmen: it's Perl 6 written in Perl 6. 22:04
Tene Let me know if you want help with it.
dolmen oh
masak Tene: I'll experiment a bit. thanks.
dolmen: you should see your expression right now! :) 22:05
dolmen masak: what is the state of this implementation? Early? Very Early?
tylercurtis masak: It might be '$!pio'. I know that's what NQP does if you do has $!foo.
jnthn $P0 = find_lex 'self'
masak dolmen: Very Early. but also fairly hackable.
jnthn $P1 = getatribute $P0, '$!lol'
masak dolmen: see github.com/masak/yapsi
jnthn: ah, yes.
jnthn masak: But nicest is to not write these in PIR :-) 22:06
tylercurtis yapsi: my $i = 6; while --$i { say $i; }
jnthn If you can avoid it.
lue [:)]
p6eval yapsi: OUTPUT«5␤4␤3␤2␤1␤»
masak jnthn: it hinges on ByteBuffer, which is a Parrot PMC.
jnthn masak: aye, but there's often ways to do PMCs without dropping to Q:PIR, e.g. the pir::foo forms. 22:07
masak: But make it work first.
masak nod.
dolmen watches github.com/masak/yapsi 22:08
22:09 shade_ is now known as shade\
jnthn masak: (twitter) :P :P 22:10
dolmen what are "phasers"?
masak dolmen: things like BEGIN {}
I should clarify that in the README, perhaps.
jnthn They're blocks that get fired at special times. They're one of the most stunning features of Perl 6.
dolmen oh, a new word for an old thing?
masak dolmen: yes, a Perl 6 term. 22:11
dolmen which synopsis? S04?
jnthn All puns aside though, it's quite a sensible name - BEGIN/CHECK/INIT etc are all phases in a program's lifetime.
22:13 lest_away is now known as lestrrat 22:15 sahadev left 22:17 patspam left
masak ok. apart from a small encoding issue somewhere in the read, I've got it roundtripping now. 22:17
lue \o/ 22:21
sorear good * #perl6 22:22
masak sorear! \o/ 22:23
22:23 patspam joined 22:24 patspam left
pmurias sorear: hi 22:24
masak ok, I'm thinking I should just push this. there's some improper extra encoding somewhere, but I don't see exactly where.
sorear hah. given how much time he spends here I always figured TimToady was being payed by TPF to lurk in #perl6
masak maybe Parrot's IO.read and IO.print aren't symmetrical.
sorear: yeah, me too. 22:25
sorear: I guess he just has a great fascination with Perl 6, like the rest of us. :)
pmurias sorear: doesn't he use screen through ssh?
22:26 tedv joined
pmurias g'night 22:26
22:26 pmurias left
sorear I hate it when people do that 22:26
ask question, immediately quit
masak cowards! 22:27
sorear: why do you hate that?
22:27 masak left, masak joined
masak sorear: I couldn't get your 'hidden var in outer block' idea to work for 'state' variables, but it works great for FIRST and LAST phasers :) 22:28
lue masak: I'd like to look at the code, maybe new eyes will help [then again, it also couldn't :)] 22:29
masak lue: right. preparing a merge now.
lue [it fully depends on how well versed I am in whatever PIR you use :)] 22:30
masak it's not that complex, actually. 22:31
22:33 tadzik left
masak I think I know what's wrong. I tell it to encode the string as ISO-8859-1, but I don't think it can yet. 22:33
so the string gets written as UTF-8, and then things start going wrong from there. 22:34
lue (Last time I remember ISO-8859-1 isn't the complete Unicode spec. Could be wrong though)
sorear ISO-8859-1 is only incidentally related to Unicode 22:35
ingy anyone seen: Null PMC access in find_method('new') 22:36
on a subst like $v ~~ s/\n+$/\n/
I'm pretty sure $v is a string...
sorear std: s/\n+$/\n/ 22:37
p6eval std 31607: OUTPUT«ok 00:01 112m␤»
sorear huh. I thought that syntax was no longer supported.
masak it is.
sorear rakudo: my $v = ''; $v ~~ s/\n+$/\n/
p6eval rakudo e58b16: ( no output )
sorear rakudo: my $v; $v ~~ s/\n+$/\n/
p6eval rakudo e58b16: ( no output ) 22:38
masak ok. commits in the chute.
Tene rakudo: my $v = "foo\n\n\n"; $v ~~ s/\n+$/\n/; say $v; 22:39
p6eval rakudo e58b16: OUTPUT«foo␤␤»
Tene rakudo: my $v = "foo\n\n\n"; $v ~~ s/\n+$/\n/; print $v;
p6eval rakudo e58b16: OUTPUT«foo␤»
pugssvn r31608 | masak++ | [t/spec] re-fudged S16-filehandles/io.t for Rakudo
Tene Looks like it works fine for me.
lue masak: sure that's t/spec? :)
masak lue: what do you mean? 22:40
lue oops 22:41
ingy does ~~ coerce $v to be a string?
masak not in itself, no. 22:42
`4 ~~ Int` is totally fine.
lue
.oO(sure I'm not insane?) somewhere the connection between [t/spec] and .t failed in my brain. :)
(I interpreted [t/spec] as spec, completely ignoring the t/)
dalek kudo: 692aa15 | masak++ | src/core/IO.pm:
[IO] implemented IO.read and IO.write

t/spec/S16-filehandles/io.t.
22:43
kudo: 2d0a573 | masak++ | src/core/IO.pm:
[IO] added :$bin parameter to &open and .open

  'binary' to the .encoding method on the filehandle could actually have
been any non-'utf-8' string, since Parrot only has two modes right now.
ingy what is !whatever_dispatch_helper 22:44
?
jnthn ingy: Leaking guts but usually a result of a method call on a Whatever 22:45
But it may want to be ripped out now that we do *.foo syntactically
I didn't get a straight answer on whether it could be ripped out yet though. 22:46
Or if I did, I forgot it. :-)
masak: yay patches!
lue CONFLICT (content): Merge conflict in src/core/operators.pm
Automatic merge failed; fix conflicts and then commit the result.
masak ingy: see github.com/rakudo/rakudo/blob/maste...ch.pir#L19
lue I suppose I could just checkout operators.pm, but I want to know if there's a better way.
masak lue: see www.kernel.org/pub/software/scm/git...merge.html 22:47
lue: or perhaps www.kernel.org/pub/software/scm/git...etool.html
lue funny thing is, it's my := code that's causing the conflict :) 22:49
masak lue: the real answer to 'a better way' is 'do development in a branch, don't pull in the branch you do development in'. 22:51
sorear rebase! 22:52
22:52 timbunce left
masak I found the buf branch no longer even built with newer Parrots. a rebase solved it. 22:52
22:53 breinbaas left
lue I think I'll just git checkout right now. The mergetool is just confusing me. 22:54
masak lue: I think after being appropriately confused, you'll really like 'git rebase' :) right up your time-traveling alley. 22:55
pugssvn r31609 | lwall++ | [S04,6] more refinement of how scoping works under DBC
r31609 | note that all phasers in methods to have access to self via closure
lue I'd need a lot more gitfu before I can think about a separate branch :) [hello, gitready website] 22:56
arnsholt Branches are actually pretty straightforward 22:58
lue actually, I might as well try rebase now.
...nvm 22:59
pugssvn r31610 | lwall++ | [S04] emphasize that LEAVE blocks *always* run even under stack unwinding
lue I can't win right now :) 23:00
23:00 dolmen left
lue lue@twigil:~/rakudo$ git checkout src/core/operators.pm 23:00
error: path 'src/core/operators.pm' is unmerged
23:00 Ross left
masak lue: see previous links. also see git tutorials in general. :) 23:01
lue: also, #git.
lue: I do feel your pain, though. it's a bit tricky at the start. 23:02
lue oh! I didn't bother commiting the last couple of edits I made, instead changing the already generated patches.
the Warning! on the help page for merge describes my problem :)
arnsholt lue: Yeah, that's generally a bad approach =) 23:03
(Editing patches, that is)
sorear You can't edit git patches unless you have mad sha1 skillz
23:04 skids joined
arnsholt Oh, right. That probably explains why pmichaud had trouble applying one of the patches 23:04
lue now that also explains why pmichaud couldn't apply the one patch :)
sorear ...
lue I only changed one 'v' to an '0', but I know what that can do to a checksum
(note to self: pay attention to large streams of hex digits in headers) 23:06
sorear the worst is when software decides to apply newline conversion to git patches
TimToady re stringifying buffers, perhaps in the absence of encoding type information (such as the utf8 type provides), it should just print out as a list of numbers 23:09
jnthn sorear: Yes, that is decidedly annoying. 23:10
lue is the \x escape sequence dependant on what encoding system you use? 23:11
sorear no 23:12
lue [git commit -a seemed to commit the merge or something — next time, branches are good :)]
TimToady \x should always indicate the integer of a Unicode codepoint
sorear \x can take up to 6 digits
rakudo: say "\x10FFFE".chars
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Malformed string␤» 23:13
sorear rakudo: say "\x[10FFFE]".chars
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Malformed string␤»
23:13 rv2733 left
masak TimToady: I can do that. 23:13
sorear std: say "\x10FFFE".chars
p6eval std 31610: OUTPUT«ok 00:01 111m␤»
TimToady rakudo: say "\x10fffe".chars 23:14
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Malformed string␤»
TimToady rakudo: say "\xfffe".chars
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Malformed string␤»
TimToady rakudo: say "\x[fffe]".chars
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Malformed string␤»
TimToady huh
lue rakudo: say "\x[cb]" 23:15
p6eval rakudo e58b16: OUTPUT«Ë␤»
TimToady rakudo: say "\x[4e00]".chars
p6eval rakudo e58b16: OUTPUT«1␤»
TimToady I guess it doesn't like undefined chars
lue .u 4E00
phenny U+4E00 CJK UNIFIED IDEOGRAPH-4E00 (一)
lue .u 004E 23:16
phenny U+004E LATIN CAPITAL LETTER N (N)
lue oh, didn't notice the .chars
TimToady rakudo: say "􏿽xF0􏿽xAF􏿽xA8􏿽x9C".chars
p6eval rakudo e58b16: OUTPUT«1␤»
TimToady .u 2fa1c 23:17
phenny TimToady: Sorry, no results for '2fa1c'.
TimToady .u 2FA1C
phenny TimToady: Sorry, no results for '2FA1C'.
lue .u 10FFEE
phenny lue: Sorry, no results for '10FFEE'.
sorear .u fffe
phenny U+FFFE (No name found)
sorear .u fffd 23:18
phenny U+FFFD REPLACEMENT CHARACTER (�)
sorear .u 10fffd
phenny sorear: Sorry, no results for '10fffd'.
sorear it's clearly not even parsing stuff that high as a number
.u linear b
phenny sorear: Sorry, no results for 'linear b'.
sorear .u phoenician
phenny sorear: Sorry, no results for 'phoenician'.
23:18 ashleydev left
TimToady .u 􏿽xF0􏿽xAF􏿽xA8􏿽x9C 23:18
phenny U+2FA1C CJK COMPATIBILITY IDEOGRAPH-2FA1C (􏿽xF0􏿽xAF􏿽xA8􏿽x9C)
sorear .u phoenician
phenny sorear: Sorry, no results for 'phoenician'.
sorear what just happened 23:19
from my POV, I run ".u phoenician" twice and got three replies
TimToady .u acrophonic
phenny TimToady: Sorry, no results for 'acrophonic'.
TimToady .u ACROPHONIC 23:20
phenny TimToady: Sorry, no results for 'ACROPHONIC'.
sorear ilogger2 concursw
TimToady phenny running with older Unicode spec, mebbe
lue phenny doesn't like any code points beyond the zeroth astral plane given to it, it seems.
sorear lue: it has a name
ingy jnthn: could you look at gist.github.com/470234 and tell me what you think?
TimToady though it looked up my U+2FA1C in one direction 23:21
ingy greetings TimToady, sorear
TimToady Life's a beach, and then you dry.
ingy Life's a bleach, then you whiiiii... 23:22
TimToady whiiiii not?
lue Life's an analogy, and then you metaphor. 23:24
ingy I never actually met a phor...
TimToady
.oO(I never metaphor I didn't life...)
ingy bows down
seen jnthn 23:25
TimToady: gist.github.com/470234 ring any bells?
masak loliblogged: use.perl.org/~masak/journal/40440
lue
.oO(I knight thee Sir Real)
masak ingy: if that's all there is to it, you've got yourself a bug report. but it can't be. 23:27
jnthn ingy: I think "wtf"
TimToady missing some context
jnthn ingy: What's $context.value?
lue adds a new word to his dictionary. smop.
jnthn TimToady: gah, I was just thinking that :P 23:28
masak rakudo: class Context { has $.value is rw }; my $context = Context.new; $value = "x y z"; $context.value = $value; say ">>> " ~ $context.value;
p6eval rakudo e58b16: OUTPUT«===SORRY!===␤Symbol '$value' not predeclared in <anonymous> (/tmp/RSOkgsikNo:20)␤»
masak argh.
rakudo: class Context { has $.value is rw }; my $context = Context.new; my $value = "x y z"; $context.value = $value; say ">>> " ~ $context.value;
p6eval rakudo e58b16: OUTPUT«>>> x y z␤»
masak ingy: worksforme.
masak heads bedwards 23:31
'night, #perl6 23:32
ingy masak: brb (after the bubble shack)
23:32 masak left 23:33 Guest62179 left, jibal joined 23:36 jibal left
ingy masak's case works here too. 23:37
will try to get a replication
rakudo: class Context { has $.value is rw }; my $context = Context.new(value => *); my $value = "x y z"; $context.value = $value; say ">>> " ~ $context.value; 23:39
p6eval rakudo e58b16: OUTPUT«>>> !whatever_dispatch_helper␤»
ingy jnthn: ^^
jnthn bug 23:40
TimToady: Can we toss the non-syntactic whatever currying?
TimToady rakudo: class Context { has $.value is rw }; my $context = Context.new(:value(*)); my $value = "x y z"; $context.value = $value; say ">>> " ~ $context.value;
p6eval rakudo e58b16: OUTPUT«>>> !whatever_dispatch_helper␤»
jnthn TimToady: I bet some internals-y method is getting curried.
We already have to have an exceptions list. 23:41
TimToady we can toss it for now, sure
jnthn OK, I'll try it tomorrow and see what it does to the test suite.
TimToady how does callsame get the current capture?
jnthn ^^ 23:43
23:43 pragma_ joined, pragma_ is now known as Guest38858
ingy rakudo: class Context { has $.value is rw }; my $context = Context.new(value => 'fail'); my $value = "x y z"; $context.value = $value; say ">>> " ~ $context.value; 23:45
p6eval rakudo e58b16: OUTPUT«>>> x y z␤»
jnthn TimToady: It stashes it away in a sekrit lexical.
TimToady: Which tends to do sane things with closures too.
TimToady I wish it was not so secret as to not be specced :)
jnthn Well, you can spec it if you want 23:46
All I'll do is give it the name you've spec'd. :-)
TimToady maybe a "same" keyword like "self"
callwith(|same) == callsame
jnthn hm
Could work.
Don't immediately see why not
Oh
TimToady perhaps a bit to conflicty with uservars
*too
selfsame :) 23:47
jnthn One reason is that we currently keep it as a low-level capture.
Which is cheaper.
ingy Cannot resume dead coroutine.
jnthn (Actually, as a Parrot CallContext object)
ingy cries
jnthn ingy: gather/take?
ingy ? 23:48
TimToady how were you making a co-routine? 23:49
ingy not sure yet
:\
TimToady what did you do?!?!?
sorear TimToady: Rakudo implements lazy lists using Parrot coroutines 23:50
so a perl6 program will tend to make lots of coroutines
jnthn Really?! 23:51
pm...didn't tell me that bit.
lue (O.o)
sorear jnthn: Maybe I'm just uncreative, but I haven't thought of any other way to make garther/take work
using Parrot primitives
TimToady I guess it's Friday, except where prohibited by law... 23:52
sorear I haven't actually looked at the code
jnthn sorear: Oh
You're half right.
It's used for implementing GatherIter
But not anywhere else in the lazy lists impl.
OK, that worries me less. It used to be done as continuations.
TimToady it should really say, "cannot resume dead parrot coroutine" :) 23:53
jnthn "cannot resurrect dead norweigan blue parrot coroutine"
lue Norweigan blue, lovely plumage
jnthn TimToady: I'd context that it really shoudln't crash. ;-) 23:54
rakudo: (1 ... 10).grep({ $_ %% 2 }).grep({ $_ %% 3 })
lue
.oO(Gah! what was the replacement pet again?)
p6eval rakudo e58b16: ( no output )
jnthn rakudo: say (1 ... 10).grep({ $_ %% 2 }).grep({ $_ %% 3 })
p6eval rakudo e58b16: ( no output )
TimToady hmm
rakudo: say 6 %% 2
p6eval rakudo e58b16: OUTPUT«1␤» 23:55
TimToady rakudo: say 6 %% 3
p6eval rakudo e58b16: OUTPUT«1␤»
23:55 Psyche^ joined
TimToady rakudo: say (1 ... 10).grep({ $_ %% 2 | 3}) 23:55
p6eval rakudo e58b16: OUTPUT«12345678910␤»
TimToady er 23:56
jnthn TimToady: I think it's something that goes horribly wrong when two gather iterators get chained back to back
TimToady rakudo: say 7 %% 2
p6eval rakudo e58b16: OUTPUT«0␤»
TimToady still?
jnthn rakudo: say 7 %% 3
p6eval rakudo e58b16: OUTPUT«0␤»
jnthn rakudo: say 7 %% 2 | 3
p6eval rakudo e58b16: OUTPUT«any(Bool::False, 3)␤»
jnthn precedence what have you done to us
:-)
TimToady oh, oops
jnthn TimToady: It's my best guess so far.
TimToady rakudo: say (1 ... 10).grep({ $_ %% (2 | 3)}) 23:57
p6eval rakudo e58b16: OUTPUT«23468910␤»
TimToady that's more like
doesn't explane your double grep though
sorear Speaking of which
jnthn No
It needs some digging.
sorear I need a very efficient implementation of lazy lists
Especially for the 0-or-1-item case
TimToady perhaps you should use Erlang 23:58
23:58 lestrrat is now known as lest_away 23:59 Patterner left, Psyche^ is now known as Patterner
TimToady so I guess the grep method isn't cloning something right 23:59