»ö« | 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.
00:00 Patterner left, Psyche^ is now known as Patterner 00:01 xabbu42 left
dalek ok: a174b35 | duff++ | src/operators.pod:
fix description of 3-way comparators noticed by ineol++
00:12
00:13 timbunce joined
sorear hello timbunce 00:15
00:17 timbunce_ joined
timbunce_ waves at sorear from a hotel somewhere near Newark NJ 00:18
00:19 timbunce left, timbunce_ is now known as timbunce 00:21 skids left 00:24 LionMade0fLions joined 00:26 skids joined
pmichaud sorear: (constant space) depends on how/where it gets evaluated 00:28
certainly 0, *+1 ... 10000 itself is constant space.
00:28 TiMBuS left
sorear pmichaud: how many ways are there to evaluate &reducewith? 00:29
pmichaud sorear: oh, that part
seems to me that reducewith should grab its elements and munch them as needed 00:30
sorear how?
pmichaud looking
sorear I'm not necessarily asking about Rakudo
just general hints for how to make a Perl 6 implementation 00:31
I understand you recently redesigned the lazy list / streaming computation system
pmichaud right
and in that respect, rakudo ought to be fairly typical
&reducewith in Rakudo shifts values off of the list
so that tends to keep it in constant space
(since the earlier values get gc'd)
sorear How does [+] @foo avoid destroying @foo? 00:32
pmichaud because the argument to &reducewith is a slurpy array, and that slurpy array is what gets shifted
not @foo itself.
TimToady tylercurtis: the main difference of $x? and *$y is that $x must be a separate argument, while $y is just the first/next argument from the flattened variadic argument list; foo(@bar) would put @bar into $x but @bar[0] into $y 00:33
oh, I see you got there 00:34
pmichaud TimToady: have plans for Tue? I'm going to hang out somewhere and hack (possibly OCC, but open to other suggestions) 00:35
TimToady I will still be madly writing my talk for Thu 00:36
pmichaud got a theme/topic yet?
TimToady I think so :)
pmichaud excellent. :)
00:36 nbrown joined
TimToady it's about being disruptive... 00:36
pmichaud I very much look forward to seeing it 00:37
tylercurtis TimToady: so *$y will take the next element from even a non-interpolated list?
TimToady and will have a devil on one shoulder and an angel on the other, played by Aron and Glo
sorear rakudo: sub foo(@x) { say @x.WHAT }; foo(1)
p6eval rakudo cd64dd: OUTPUT«Nominal type check failed for parameter '@x'; expected Positional but got Int instead␤ in 'foo' at line 22:/tmp/oQK_7BKAYV␤ in main program body at line 22:/tmp/oQK_7BKAYV␤»
sorear bad rakudo
pmichaud TimToady: oh, that should be *excellent!*
..."bad rakudo"?
TimToady tylercurtis: it puts the rest of the args into interpolation mode, so no, unless you use it inside [] 00:38
sorear pmichaud: I think that should have succeeded; putting 1 into list context ought to have made a one-item list
?
pmichaud sorear: I'm pretty certain that @ doesn't automatically listify its argument. Otherwise anything would bind.
tylercurtis TimToady: I don't think I understand what "foo(@bar) would put @bar into $x but @bar[0] into $y" means, then.
pmichaud sorear: or, another way of saying what you just said is that Any does Positional 00:39
TimToady if the sig was sub foo($x?, *@z), foo(@bar) is in item context, and ends up in $x only
pmichaud notably: my @a := 1; # should fail, not automatically listify the Int 00:40
sorear rakudo: say 1[0]
p6eval rakudo cd64dd: OUTPUT«1␤»
sorear Any *does* do Positional
TimToady with sub foo(*$y, *@z), foo(@bar) distributes the first arg to $y and the rest to @z
pmichaud no, Any has postcircumfix:<[ ]>
just because something has postcircumfix:<[ ]> doesn't mean it has to ~~ Positional
TimToady because in that case the @bar is in the flattened part of the argument list
pmichaud (TimToady is perfectly free to correct me here :-) 00:41
sorear How does postcircumfix:<[ ]> contextualization work?
I imagine it's something like .Positional.[0]
pmichaud ...contextualization? I don't understand the question.
tylercurtis TimToady: ah. 00:42
pmichaud at the moment, Positional implies the ability to be bound to an @-sigiled variable, and the existence of an "at_pos" method. It doesn't imply much more than that.
sorear As I understand it, .[0] on Any means something like .list.[0]
pmichaud that's what ultimately happens, yes. 00:43
sorear also: how my @x = 1 and my @x = 1, 2 both work
the 1 is promoted to a list. somehow.
pmichaud because it's a "list assignment"
sorear this is the part that I'm stuck on
00:43 rgrau__ left
pmichaud (yes, I know, = isn't assignment there. but it works without the 'my') 00:43
@x = 1; # list assignment
@x = 1, 2; # list assignment
list assignment puts it rhs into list context
sorear Yes 00:44
TimToady flat context, even
sorear List context
I'm trying to get you to tell me how list context works
pmichaud right, flat context (TimToady++)
flat context just calls .flat, essentially.
sorear What does .flat return?
pmichaud a list that flattens any parcels and Iterables 00:45
sorear What's a list?
TimToady I think he wants to know more about how the cursors work inside
pmichaud (Iterables that aren't marked as non-flattening, that is)
A list has reified and non-reified elements 00:46
sorear Let's say I'm going to implement list assignment
I call .flat on the RHS
I get a "list"
what properties does a "list" have and what can I do with it?
pmichaud so, that list has reified and non-reified elements
you can shift values from the list
sorear is it a List? a Positional? an Iterable? something else entirely?
pmichaud in Rakudo, it's a List. 00:47
List does Positional
List isa Iterable
TimToady it's a list that has had a flattening iterator substituted for the imaginary part
pmichaud (Iterable could be a role -- we have it as a class for now)
TimToady a slice on the other hand would have a slicing iterator on the imaginary part 00:48
sorear @x = @y
pmichaud List has a private method that says "reify at least the first n elements"
sorear 1. flat(@y)
00:48 azert0x left
sorear 2. flat notices that @y is a flattenable Iterable and calls @y.flat 00:48
00:49 ineol joined
sorear 3. Array.flat constructs a List which will lazily clone the array in its iteration 00:49
4. List assignment receives the list, and iterates over it, assigning to @x
?
pmichaud I'm not sure about @2
er #2
TimToady I think that's just the usual function -> method mapping
pmichaud &flat tends to want to iterate its Parcel argument 00:50
00:50 whiteknight left
tylercurtis rakudo: say $*OUT: 1, 2, 3; 00:50
p6eval rakudo cd64dd: OUTPUT«===SORRY!===␤Confused at line 22, near "say $*OUT:"␤»
TimToady std: say $*OUT: 1, 2, 3;
pmichaud (&flat takes a slurpy, that is)
p6eval std 31756: OUTPUT«ok 00:01 115m␤»
00:51 hsb left
TimToady tylercurtis: rakudo doesn't implement that syntax yet 00:51
pmichaud anyway, &flat constructs a list that knows it's to flatten out any flattening-Iterables it encounters
TimToady anyway, the important step is #3 00:52
tylercurtis TimToady: I didn't think so, but I wanted to check.
00:52 hsb joined
pmichaud in that process, it ends up asking @a for a List that it can iterate over 00:52
and the List that @a returns ends up reifying the elements of @a
it doesn't actually clone the values, because we want the actual elements of @a, not clones.
i.e., @a.list should give me @a[0], @a[1], @a[2] (the containers), and not just cloned instances of the values. 00:53
in particular so that map {...}, @a; can actually manipulate the values of @a
TimToady or for, if bound rw 00:54
pmichaud right
(for and map are soon to be synonymous in Rakudo)
s/synonymous/isomorphic)
TimToady Sink me! -- the Scarlet Pimpernel 00:55
sorear Can I get away with not having an Iterable?
pmichaud Iterable is how Rakudo knows that something flattens in flattening context 00:56
TimToady I don't see how
pmichaud I suppose there are other ways to do it, but that seemed easiest.
TimToady you need something that distinguishes objects that have structure from those that don't
sorear rakudo's check for flattening is, iiuc, isa(Iterable) && !hasprop("scalar")
pmichaud sorear: correct.
TimToady how 1 knows it's a list of one element is because it's *not* Iterable
sorear niecza's check for flattening is currently hasprop("flattens") 00:57
TimToady flattening is not a property of the object
it's a property of the arg in the argument list
flatten*able* is different from flatten*ing*
pmichaud I decided it was easier to mark things that don't flatten than to mark the things that do
for example, Ranges flatten.
Lists flatten. 00:58
Arrays flatten.
etc.
TimToady they *can* flatten
sorear TimToady: hasprop() here refers to the container, not the value
TimToady jnthn++ and I were discussing this the other night; flattening is most naturally a mark on the argument slot in a capture that disappears the moment it is bound along with the capture
sorear you can have flattening and non-flattening refs to values
TimToady the fact that foo(@a) can flatten @a should not carry through if it happens to have bound it to a $x 00:59
pmichaud TimToady: that somewhat requires the construction of an actual Capture on each call, which Rakudo avoids at the moment.
sorear TimToady: you also need to have an explicit flattens bit on procedure returns 01:00
TimToady it only has to be constructed if there's anything that actually requires flattening
sorear TimToady: sub { [1, 2] } and sub { my @x = 1, 2; @x } are not at all the same
pmichaud ..which means you have to know the things that can flatten
TimToady well, that's "decontainerizing" in my mind rather than flattening
sorear pmichaud: basically, what I'm wondering is if "has a .flat override" can serve the role of "does Iterable"
TimToady dinner & 01:01
pmichaud sorear: possibly. That doesn't fit well in my mental model at the moment.
sorear pmichaud: what motivated the change from coroutine iterators to lazy tree iterators? 01:02
pmichaud I don't quite understand "coroutine iterators"
sorear the old, mutable iterators were coroutines? 01:03
pmichaud only gather/take, afaik
(and it's still a coroutine)
the primary motivation for the change were issues with bound versus non-bound lists
also, previous versions of the spec had List as immutable, where it turns out it really doesn't want to be. 01:04
01:04 sorear sets mode: +vvo IRSeekBot p6eval tylercurtis 01:08 meppl left
sorear Should there be a difference in behavior between @x.flat and @x.item.flat? 01:09
pmichaud I would think not.
however, there is a difference between &flat(@x) and &flat(@x.item) 01:10
(at least as rakudo has it)
TimToady: (for when you return) -- I'm not sure that I see that we can easily divorce flattening from types and say it's merely a property of the capture (more) 01:15
if I have a sub abc(*@_) { ... } and it's called as abc(1, @xyz, foo())
while I can definitely know that @xyz should be flattening, it's not easy to know about the return value of foo() 01:16
sorear pmichaud: 20:00 <@sorear> TimToady: you also need to have an explicit flattens bit on procedure returns
pmichaud sorear: right
but that still means we have to inspect the value being returned 01:17
tylercurtis rakudo: say "foo\nbar\nbaz".lines
01:17 felliott joined
p6eval rakudo f55fb0: OUTPUT«Method 'lines' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/YOy_VEAP0j␤» 01:17
sorear niecza would inspect the lvalue being returned, not the object itself 01:18
01:18 felliott left
sorear well. time to implement lists. 01:18
pmichaud what if it's not an lvalue, though?
sub foo() { return 1..5; }
sub foo() { gather for @list { ... } }
sorear I'm using the C99 definition of lvalue
pmichaud I guess I'm not familiar with that definition. 01:19
sorear "locator" value
aka a container reference
01:19 felliott joined
sorear which may or may not be writablew 01:19
pmichaud 1..5 doesn't have a container, though. 01:20
(unless you count the Capture that holds it)
sorear in niecza right now, everything logically has a container
pmichaud that's possible and possibly reasonable :)
technically every value in Rakudo has a container (PMC) also. 01:21
but I'm not sure it's the same meaning :)
01:23 f00li5h left 01:24 f00li5h joined
pmichaud 01:00 <sorear> pmichaud: basically, what I'm wondering is if "has a .flat override" can serve the role of "does Iterable" 01:24
the more I think about it, the more I think this doesn't quite work.
not exactly sure why. 01:25
sorear flat, in rakudo:
for each argument:
01:25 f00li5h left, f00li5h joined
pmichaud But flattening tends to be a property of a List, not of the things in the list. 01:25
sorear if isa(Iterable) && !hasprop("scalar"):
add thing.iterator to the list
else:
add thing to the list
my proposed flat: 01:26
pmichaud there's two different lists there
sorear for each argument:
if hasprop("flattens"):
add thing.flat to the list
else:
add thing to the list
?
two lists?
pmichaud yes
sorear input and output?
pmichaud for rakudo, the iterator gets added to the "@!rest" list, while a non-flattening thing gets added to the "@!items" list. 01:27
sorear In how much detail is the Iterator, Iterable, and List API specced? 01:28
pmichaud I have a grant to write up Rakudo's version of it.
(and let those become S07/S08)
01:28 timbunce left
pmichaud s/grant/grant proposal/ 01:28
what currently exists in S07 and S08 are basically Wrong.
some things need updating in S02 also.
none of that is likely to occur before the 29th, though. 01:29
(for what I hope are obvious reasons :-)
sorear I'll just make up something
I can fix it later
pmichaud sorear: so, you would have Ranges and Lists have a .flattens property? 01:30
(in their "native" not-in-item-context sense)
also, with 01:32
01:26 <sorear> if hasprop("flattens"):
01:26 <sorear> add thing.flat to the list
would thing.flat return something that doesn't have the "flattens" property?
pmichaud wanders off for a bit. 01:36
01:43 aubreyja joined
sorear pmichaud: no. 01:46
Range would not have a flattens property
flattens is a property of the lvalue, not of the object itself
sub infix:<..>($min, $max) { @( Range.new(:$min, :$max) ) } # @() sets the flatten bit in the returned lvalue 01:47
sub infix:<..>($min, $max) { my @r := Range.new(:$min, :$max); @r } # or maybe this, if @() is too cloney
going way, way back to the first example: 01:48
inside the dynamic scope of &reducewith(&:[+], 0, *+1 ... 10000), there exists a $callframe such that $callframe.args.[1] is the list 01:49
does this hold a reference to the beginning of the iterator chain and thereby force the evaluation to take O(n) space?
01:55 ineol left 01:58 Limbic_Region left 02:09 ashleydev left 02:14 agentzh joined 02:17 hercynium joined
pmichaud sorear: parenthesize that for me. 02:20
I think of it as &reducewith(&:[+], (0, *+1 ... 10000))
at any rate, args.[1] is indeed the list returned from the series operator 02:21
and it holds an iterator that is responsible for producing the elements of the list
as we shift items off that list, it remains O(n) space
01:47 <sorear> sub infix:<..>($min, $max) { @( Range.new(:$min, :$max) ) } # @() sets the flatten bit in the returned lvalue 02:24
that feels wrongish. I think that @(...) should generally translate into a .list call, which should return a List or something that can be shifted 02:25
in particular, I suspect that my $x = 3..4; and my $x = @(3..4) should be diferent. 02:26
*different
sorear yeah, which is why I had the second version 02:27
.list.shift never affects the original, right?
pmichaud that seems a bit better, although I'm not keen on binding values prematurely.
sorear "binding values"?
pmichaud it can affect the original if the original returned self in response to .list 02:28
.list doesn't (yet) require a clone
sorear does .flat require a clone? 02:29
pmichaud no
@array.flat is probably the same as @array.list, since an array is already flattened.
sorear does binding to a slurpy parameter require a clone?
pmichaud I don't think we ever bind to a slurpy parameter.
or, if we do, we're binding a capture or parcel, and not the thing in the capture/parcel 02:30
sorear &reducewith(&:[+], (0, *+1 ... 10000)) 02:31
args.[1] is a List object created by infix:<...>
like any List object, it remembers values as they are iterated
pmichaud sure, but shifting eliminates the first value
sorear &reducewith can't shift values off the passed list, because then [+] @foo would screw things up 02:32
pmichaud sure it can.
sorear how?
pmichaud @foo isn't the List
the signature for &reducewith is &reducewith(&how, @*args)
er, *@args
@args is the thing that is shifted, not @foo
(and @args is not @foo) 02:33
in particular, [+] @foo, 1, 2, 3
sorear you just reintroduced the memory leak
pmichaud no
sorear because if @args is shifted, then (0, *+1 ... 10000) now has to retain prior values!
pmichaud in that case, @foo is a *bound array*, so the values have to be remembered.
why does (0, *+1 ... 10000) have to remember prior values? 02:34
you're not being precise enough.
sorear because it's a List and we're not shifting stuff off it
pmichaud we are shifting stuff off of it.
I did say we were shifting @args
sorear 21:32 <@pmichaud> @args is the thing that is shifted, not @foo 02:35
pmichaud right
sorear @args is not "it"
pmichaud that's what I said.
as I said, you're not being precise enough. :-)
with (0, *+1 ... 10000) there is no @foo
so, start again. :-)
sorear infix:<...> returns a List 02:36
pmichaud correct
sorear let's call it @foo
pmichaud no
sorear for the sake of it having a name
pmichaud that would bind it
if you want to give it a name, call it $foo
sorear precision please. what's binding.
pmichaud @foo tends to imply array-ness which isn't what I want here. 02:37
okay, let's do it this way.
my @foo := (0, *+1 ... 10000)
good enough?
@foo is a List.
sorear ok.
pmichaud but it's a temporary, it's not in the outer scope at all
@foo is just the temporary name we're using to describe it here -- it's not an actual entry in the lexpad 02:38
sorear sure
pmichaud okay
so, we then have [+] @foo
&reducewith gets called, and @args ends up with @foo as its only element
okay so far? 02:39
sorear Why doesn't @args end up with 10k elements?
pmichaud because slurpy arguments are lazy
sorry
slurpy parameters are lazy
sorear So, @args ends up with no elements + an iterator that reads from @foo[$i++] ? 02:40
pmichaud in rakudo, @args ends up with an empty @!items and @!rest holds @foo
sorear @!rest is for lazy flattening without the overhead of iterators? 02:41
pmichaud @!rest holds everything that hasn't been reified yet
@!rest is the "lazy" portion of a list
@!items is the "already evaluated" portion of a list
sorear ok. I think I follow. 02:42
pmichaud a List consists of the things that have already been reified, and the things yet to be reified
sorear and the "things yet to be reified" is a low-level-array of Iterable/
?
pmichaud it's a low-level array of elements. they don't have to be Iterables 02:43
in [+] @foo, 1, 2, 3
1, 2, and 3 are in @!rest
sorear are non-iterables treated as 1-item iterables in @!rest?
02:43 colomon joined
pmichaud non-iterables are treated as items 02:43
they automatically go to the @!items portion when needed
sorear ok
I follow
pmichaud (i.e., they don't iterate or flatten)
better is to say that they don't interpolate 02:44
should I continue with the example, or is it clearer now how this remains constant space? 02:45
sorear continue
pmichaud okay
so, @args has @foo as its single-element @!rest
we ask @args for a value via @args.shift
@args in turn knows that it needs to reify one value
(and it has none in @!items)
so it looks at its @!rest and finds @foo
@foo can interpolate (is Iterable), so it asks @foo for an Iterator 02:46
it then asks that Iterator to reify a value
and replaces @foo in @!rest with the value+Iterator
(I skipped a couple of steps there, but that's essentially what happens)
it then moves the value into @!items
and now having 1 item, is able to shift+return that item 02:47
leaving only one element (the iterator) in @!rest
the original @foo is now gone -- all we have left is the iterator.
sorear except that the Capture holds a reference to the original @foo
and the CallFrame holds a reference to the Capture 02:48
pmichaud ...except that Rakudo doesn't build an explicit capture in this instance
but let me think about that a second.
actually, it's okay that there's a reference to the original @foo 02:49
sorear S06:2668
pmichaud it's still just a List
it's not holding a reference to an Iterator
well, that's maybe not quite true either.
sorear Let me try a slightly different example
pmichaud hmmm.
sorear [+] $*IN.lines
$*IN.lines has to save what it's already read in case somebody decides to do callframe(&reducewith).args.[1].[42] ? 02:50
pmichaud I don't read it that way. 02:51
at any point in time, .[42] means "42 lines from the current line position"
it doesn't have to mean "42 from the beginning" 02:52
because .lines is explicitly lazy and explicitly discards lines ones read
*once
my best example would be 02:53
(and it's not a great one)
actually, I don't have a good example.
anyway, I'd argue that .[42] would end up reading and throwing away 42 lines in the middle
sorear so, ultimately, what you're saying is that series Lists and file read Lists only expect to be iterated over once and don't store iterated values.
02:54 Potatohead joined
pmichaud right. it's binding to a symbol or container that starts to cause things to be remembered. 02:54
where "appearing in another list" doesn't count as such a binding
sorear what does binding have to do with this?
how does a List know that it's been bound to something? 02:55
pmichaud sub abc(@a) { ... }; abc (0, *+1 ... 10000)
in this instance, @a is bound to the list
and so referencing @a[42] causes @a[0..41] to be reified and remembered
(as well as @a[42], of course) 02:56
and with 02:57
abc $*IN.lines
referencing @a[42] does cause lines 0 through 41 to be remembered in @a
(dealing with bound versus unbound lists is what made lists/iterators so difficult to begin with) 02:58
03:01 justatheory left
pmichaud afk # walk, then regex backtracking work 03:06
03:13 aubreyja left 03:20 skids left
Potatohead exit 03:22
03:22 Potatohead left 03:23 [synth] left
jnthn sub foo(@x) { say @x.WHAT }; foo(1) # yes, this should fail. If not, you couldn't mulit-dispatch by sigil. 03:31
pmichaud jnthn++ 03:42
03:44 shakesoda left
pmichaud hmm. something broke after 07-14 that is causing a lot of tests to be skipped or ignored by the test_summary.pl script :-( 03:45
pmichaud wonders if it's connected to his settings work.
jnthn settings? 03:46
pmichaud yes, the refactoring of BEGIN/END/INIT/etc.
I'm seeing lots of errors about not being able to find &done_testing
which would be the case if END blocks aren't lexically nested in their proper scope anymore :-| 03:47
jnthn hmm
Yeah, possibly.
Well, I'd get the regex fix worried about first. :-)
pmichaud I'm more likely to suspect the switch to YOU_ARE_HERE in the phasers
jnthn That's got a tighter ship date.
pmichaud yes, I'll do regexes first :)
jnthn Yeah, but you switched that out again, no?
pmichaud I thought I did.
jnthn I thought you did. :-)
'cus I was like...all grr about it. :-) 03:48
pmichaud yeah, it looks like the problems began when the phasers implementation changed 03:49
and whatever I fixed didn't completely fix it back
(my fixes didn't show up until the 16th; the tests on the 17th 00h00 CDT would be the first with my changes) 03:50
anyway, it's pretty clear that END blocks can't use YOU_ARE_HERE as their outer scope. :-)
jnthn Yes, true. 03:51
rakudo: END { say 42 }
p6eval rakudo f55fb0: OUTPUT«42␤»
pmichaud rakudo: sub foo { say 42 }; END { foo; }
p6eval rakudo f55fb0: OUTPUT«42␤»
pmichaud hmmmm.
jnthn rakudo: my $x = 42; END { say $x }
p6eval rakudo f55fb0: OUTPUT«42␤»
pmichaud maybe it has something to do with being in Test.pm
jnthn rakudo: use Test; END { plan 42 } 03:52
p6eval rakudo f55fb0: OUTPUT«1..42␤# Looks like you planned 42 tests, but ran 0␤»
pmichaud weird.
jnthn rakudo: use Test; END { done_testin; }
p6eval rakudo f55fb0: OUTPUT«Could not find sub &done_testin␤current instr.: '_block92' pc 347 (EVAL_8:156) (/tmp/gLye6ASKra:22)␤»
jnthn hm
oh!
rakudo: use Test; END { done_testing; }
p6eval rakudo f55fb0: OUTPUT«1..0␤»
pmichaud rakudo: use Test; ok 1, 'test 1';
jnthn rakudo: use Test; done_testing;
p6eval rakudo f55fb0: OUTPUT«ok 1 - test 1␤»
rakudo f55fb0: OUTPUT«1..0␤»
sorear back 03:53
pmichaud: So, basically, unbound lists cheat and produce iterators that don't remember values, because if you were going to use them more than once you'd bind them. Yes?
ingy sorear: are you going to oscon?
sorear no
pmichaud sorear: more precisely, iterators work like cursors 03:54
we produce iterators but then throw them away after they're consumed
but if one the things was bound, we end up remembering the chain
(because iterators are conceptually immutable)
this is also a case where 0..10000 may end up being more efficient than 0, *+1 ... 10000 03:55
sorear So there isn't actually special handling of binding - it just works out that an unbound list has its head forgotten.
pmichaud the sequence operator may result in remembering all of the reified values (because of the handle to the original List for the series), whereas RangeIter can produce an Iterator and immediately forget it 03:56
er, Range can produce a RangeIter and immediately forget it
sorear and .lines lists are Something Completely Different? 03:57
pmichaud well, in Rakudo we end up implementing that with gather/take anyway
and it just seems to dtrt so far.
sorear conceptually imagines that -all- iterators are made with gather/take 03:58
pmichaud it's very likely that rakudo's implementation needs more tweaking, but I'm fairly certain the underlying design is the right one.
I've looked at that, but I think doing everything with gather/take ends up being a bit inefficient, and may lead to the "remember all values" problem you've observed here.
I could be wrong in that opinion, however.
anyway, rakudo makes heavy use of gather/take, yes. 03:59
sorear gather/take has controlled the design of niecza from day 1 04:00
global CPS :(
pmichaud anyway, having written and re-written lists, arrays, and flattening about five times over in the course of Rakudo and Perl 6, I know there are far more wrong ways to do it than there are right ones. :-) 04:01
(most of the rewrites are due to spec changes prompted by the previous rewrite :-) 04:02
s/most/all/ # actually
04:03 cogno joined
pmichaud jnthn: I think there may have been a server or communications error when running the tests after 07-16, so I'm trying to re-run them now 04:04
(that's a good background task, so I'll see if anything comes up as a result)
anyway, afk for now
jnthn OK.
jnthn is around unless/until he decides he needs a nap. 04:05
tylercurtis rakudo: use MONKEY_TYPING; augment class Mu { method pretty { self.perl } }; (1..5).pretty.print # Ah the joys of augment. 04:09
p6eval rakudo f55fb0: OUTPUT«1..5»
jnthn lol :-) 04:11
ETOOCUTE 04:12
tylercurtis jnthn: a little. :) On the other hand, I think I am going to start using .pretty if I want to provide both a concise stringification for supplying to automated things and a more convenient to read stringification for display to people. 04:18
04:18 TiMBuS joined
jnthn :-) 04:19
04:25 tedv left 04:27 justatheory joined
sorear rakudo: my $x = (0, 1, *+* ... *); say $x.WHAT 04:40
p6eval rakudo f55fb0: OUTPUT«List()␤»
sorear pmichaud: It seems as though List, Parcel, Seq, and Array have a great deal in common, only differing in mutability and whether they flatten insides. Is this correct? 04:41
diakopter throws a dart on the yes board 04:42
sorear Should I give them a common superclass or anything like that? 04:43
04:47 TiMBuS left 04:48 cognomore joined
tylercurtis rakudo: my @a = 4, 5, 6; @a.unshift(1, 2, 3); say @a; 04:49
p6eval rakudo f55fb0: OUTPUT«123456␤»
05:08 TiMBuS joined, justatheory left 05:23 Sarten-X left 05:29 snarkyboojum joined 05:48 snarkyboojum left, au|zzz is now known as au|irc 06:02 Sarten-X joined 06:08 uniejo joined, tylercurtis left
moritz_ std: for 0 { when ARRAY {} } 06:24
p6eval std 31756: OUTPUT«===SORRY!===␤Function 'ARRAY' needs parens to avoid gobbling block at /tmp/0sk3dEL_aB line 1:␤------> for 0 { when ARRAY⏏ {} }␤Missing block (apparently gobbled by 'ARRAY') at /tmp/0sk3dEL_aB line 1:␤------> for 0 { when ARRAY
..{}⏏…
sorear rakudo: say Iterator ~~ Iterable 06:31
p6eval rakudo f55fb0: OUTPUT«1␤»
sorear rakudo: say Iterator.^methods(:local).Str
p6eval rakudo f55fb0: OUTPUT«infinite list␤»
sorear haha.
rakudo: say Iterator.^parents.Str
p6eval rakudo f55fb0: OUTPUT«Iterable() Cool() Any() Mu()␤» 06:32
sorear rakudo: say Iterable.^methods(:local).Str
p6eval rakudo f55fb0: OUTPUT«item Num elems fmt Str Int list␤»
sorear rakudo: say Iterable.^attributes(:local).Str
p6eval rakudo f55fb0: OUTPUT«␤»
sorear rakudo: say Iterator.^attributes(:local).Str
p6eval rakudo f55fb0: OUTPUT«␤»
sorear rakudo: say Seq.^parents.Str 06:33
p6eval rakudo f55fb0: OUTPUT«List() Iterable() Cool() Any() Mu()␤»
sorear rakudo: say Array.^parents.Str
p6eval rakudo f55fb0: OUTPUT«List() Iterable() Cool() Any() Mu()␤»
sorear rakudo: say Parcel.^parents.Str
p6eval rakudo f55fb0: OUTPUT«Iterable() Cool() Any() Mu()␤»
moritz_ that's a whole new interpretation of "use the source, Luke" :-) 06:48
rakudo: say 'abc'.split(/b/).[0].trans('a' => 'b') 06:49
p6eval rakudo f55fb0: ( no output )
moritz_ rakudo: say 'a'.trans('a' => 'b')
p6eval rakudo f55fb0: OUTPUT«b␤»
moritz_ jnthn: rt.perl.org/rt3/Ticket/Display.html?id=76140 produces a clean spectest run, and generally seems to work nicely 06:56
07:06 pmurias joined 07:09 meppl joined 07:13 PZt left
sorear moritz_: well I figure if I do it here pmichaud can leap out of the shadows and go "oh, that's wrong, don't copy that" 07:13
moritz_ :-) 07:14
sorear (because, as we all know, pmichaud never sleeps)
moritz_ a bit like au|irc :-) 07:15
au|irc :) I do keep a very regular sleeping pattern now... 9pm~7am CST 07:16
au|irc is, in many aspects, re-formed
sorear My sleeping pattern would be very regular if I lived in Melbourne 07:17
moritz_ :-)
07:17 tomaw left
au|irc is working on translating the single most difficult-to-translate paragraph in masak++'s post 07:18
07:18 plobsing left
au|irc ("How is mug re-formed?" / They need to do way instain Jon Orwant. / Who harms 5 mugs that cannot frigth back! / My pary are with the cleaner.) 07:18
07:19 pmurias left 07:21 tomaw joined 07:22 eternaleye left
au|irc ...whew, done. the subsequent ones look so much easier by comparison :) 07:23
sorear for the record not all english natives get how is mug re-formed 07:25
07:25 daxim joined, Mowah joined
daxim decided to put #perl6 into autojoin after masak's latest blag 07:26
07:26 baest joined
sorear daxim: Hello! 07:27
daxim 'lo
07:27 pmurias joined
sorear is less than twice as old as Perl 6 D: 07:27
au|irc sorear: *nod* but it wouldn't be as fun if the translation doesn't carry over all the dadais subtext :) 07:28
*dadaist
sorear is in the set :(
mathw waves hello to daxim 07:30
phenny mathw: 18 Jul 21:35Z <masak> tell mathw that ufo is now fixed. thank you for reporting. mathw++
mathw phenny: tell masak Excellent news. Now can you fix my freezer, and nested modules?
phenny mathw: I'll pass that on when masak is around.
mathw waves hello to everyone else, too 07:32
07:40 gfx joined
pmurias uploaded mildew and smop to CPAN 07:49
dalek ecza: c607ffc | autrijus++ | setting:
* setting: Make "&say" return True.
szabgab good localtime 07:50
au|irc greetings szabgab.
szabgab is there any wayin the REPL to run an external perl6 ? something better than run 'perl6 name.p6' ? 07:51
so I won't have to also type perl6 there?
and not setting the sh-bang either
moritz_ rakudo: say $*EXECUTABLE_NAME 07:52
p6eval rakudo f55fb0: OUTPUT«../p/bin/perl6␤»
moritz_ rakudo: say $*PROGRAM_NAME
p6eval rakudo f55fb0: OUTPUT«/tmp/6Mf98f6zMa␤»
moritz_ (will be useless on the REPL)
au|irc eval slurp("name.p6")
moritz_ au|irc: but that's in the context of the current REPL, not separate
au|irc ah. indeed 07:53
pmurias szabgab: why is perl6 name.p6 bad?
szabgab pmurias: just too much typing :) 07:54
but I see it is still the shortest
pmurias szabgab: you could have a p6 shell alias 07:55
so it would be p6 name.p6
sorear woah!
autrijus++ blindingly fast learner 07:56
au|irc thank you, though I have no idea why dalek reports my id as autrijus.
seeing how my github id is audreyt :)
I don't mind either way though, seeing my nickname is now a common prefix of the two...
pmurias why is your irc nick au|irc?
szabgab oh au|irc that's you :)
moritz_ au|irc: dalek uses parrot's CREDITS file to map email addresses to nicks
au|irc ahh. 07:57
au|irc searchs for a parrot commit bit password
moritz_: or maybe just change that to "au" for me, thx, seeing you probably have a commit bit :)
moritz_ au|irc: will do
szabgab au|irc: I was wondering if au|irc is an Australian IRC junction or what 07:58
au|irc I'd be /nick au if not a certain Samuel Paragreen took that name :)
07:58 cogno left
moritz_ au|irc: since parrot has moved to a trac based svn authentication, you probably don't have a commit bit, unless you took care to get one 07:58
au|irc moritz_: ah. I don't, then.
sorear: so, statement_prefix__S_do. is that simply a (prog ...)esque chain in Niecza::Actions? 07:59
sorear: my motivation being I'd like (in the repl) turn any expression into "say do { ... } " 08:00
bringing it on par with rakudo and pugs's repl
08:00 mberends joined
moritz_ rakudo's repl checks tell(STDOUT) before and after a REPL line, and only prints if it stays the same 08:01
au|irc nice!
that's handy as it keeps the lexical environment around
would be cool to add that to niecza too... 08:02
sorear statement_prefix__S_do can probably actually just be a no-op
08:02 pmurias_ joined
sorear the (prog)ish generation is already handled in statementlist 08:02
08:02 pmurias left
sorear keeping the lexical environment around - yes, it would be awesome, but it also seems very hard to do before the bootstrap ;) 08:03
08:03 pmurias_ is now known as pmurias
pmurias is any one brave enough to try cpanm Mildew-Setting-SMOP? 08:03
* anyone
moritz_ it probably takes a few hours before it propagates to my CPAN mirror 08:04
au|irc # cpanm pause.cpan.org/incoming/Mildew-Sett....01.tar.gz 08:05
needs a prereq at # cpanm pause.cpan.org/incoming/Mildew-0.02.tar.gz
08:07 tadzik joined 08:08 mberends left
pmurias au|irc: thanks a typo in dist.ini 08:08
08:08 jferrero joined
au|irc np... wouldn't it be nice if cpanm has -j. 08:09
cannot open unicode maps from ./lib . : No such file or directory
BEGIN failed--compilation aborted at /home/au/perl5/perlbrew/perls/perl-5.13.2/lib/site_perl/5.13.2/CursorBase.pm line 1881.
sorear au|irc: there's a bit of a subtlety you missed. Internally I'm still using a stack machine to evaluate CgOp nodes, and it's currently the user's responsibility to keep track of whether a CgOp pushes 1 or 0 itmes
a Q:CgOp (since it's a term) needs to push 1 item
which is why I sometimes use (prog XXX (null Variable))
au|irc ah ok 08:10
pmurias au|irc: when does that error happen?
au|irc sorear: the (null Variable) was preventing "say say 1" to run.. so iiuc you're saying that line can be removed 08:11
so simply a rawscall following by (box Bool (bool 1)) ?
pmurias: in Build.PL time... tracking
moritz_ pmurias: I get that error when I run 'make' in src/perl6/ 08:12
locally, with a perl 5.10.0
sorear au|irc: yes.
once packages are working it can just be ) }; Bool::True } 08:13
au|irc yup
pmurias if a release is unauthorized will cpanm install it?
08:14 sorear sets mode: +opmris au|irc, ChanServ sets mode: -s
dalek ecza: 009a2f2 | autrijus++ | setting:
* Since we return Bool::True already, there is no need to interleave a (null
08:14
au|irc pmurias: it did install STD-0.01 just fine
it seems it's not finding the sharedir'd uniprops
maybe you're looking for dist_dir('Perl6-STD') 08:15
and the distname is 'STD'?
(that's in CursorBase.pm)
08:15 sorear sets mode: -pmri , pmurias left, FardadJalili joined
BinGOs >:) 08:16
08:16 pmurias joined
pmurias au|irc: thanks 08:16
that's the bug
au|irc pmurias: yup. and then mangle.pl
08:16 sorear sets mode: +o pmurias
au|irc it's in lib, but as a .pl, so it wasn't installed by M::B 08:16
08:16 zulon joined
au|irc maybe inline it somehow? (not sure) 08:17
pmurias changing mangle.pl to Mangle.pm would work
moritz_ or encapsulate into a .pm?
right
au|irc yea
pmurias au|irc: 5.13.2 is installed from the git repo 08:18
?
au|irc from cpan, I think 08:19
via perlbrew
08:19 dalek left, dalek joined
sorear with luck, this will make dalek pick up on au 08:19
08:20 sorear sets mode: +v dalek
au|irc whee 08:20
pmurias works
au|irc cuul. then there's NULL.lex
pmurias sorear: is the current STD working?
the one in src/perl6
sorear yes
pmurias make fails when trying to comple stage1 here 08:21
sorear: still the same error with git clean -f -d 08:23
au|irc pmurias: a simple solution in Build.PL of STD 08:24
'pm_files' => {map { $_ => $_ } <lib/*> },
put it in the m_b_ args and it'll install the .lex and .pl into require() path
moritz_ pmurias: after git clean -xdf the first make failed, the second time I ran make I got much further (and still running)
sorear pmurias: that's easy, it's not even in git
pmurias sorear: it is 08:25
moritz_ seems to have compiled successfully
pmurias i use git-svn
au|irc pmurias: Mildew/Backend/C/So.pm said "Can't locate SMOP.pm" - another missing dep? 08:28
pmurias pastie.org/1050089 the errors from STD i get
au|irc: yes 08:29
au|irc k, will wait till another round of Build.PL pm_files fix and SMOP.pm depfix and retest then :)
08:30 FardadJalili left
pmurias the dependency is already fixed in the repo, but i have to figure out why STD doesn't build before releasing a new set of packages 08:31
sorear Is $!foo and @!foo the same thing in different contexts?
pmurias yes
08:33 dakkar joined
pmurias moritz_: so you don't get any errors when running make in HEAD in src/perl6? 08:34
moritz_ pmurias: I didn't get any errors the second time I ran make
pmurias viv works? 08:35
pmurias checks with a fresh perl
08:39 xabbu42 joined, PZt joined
dalek ecza: 4393c69 | au++ | Niecza/Actions.pm:
* Implement "do" as a no-op.
08:43
ecza: e0fe1c3 | au++ | niecza_eval:
* Make the niecza_eval REPL a calculator by wrapping "say do {...}" around each
cxreg au|irc: "au" pronounced "gold", I presume? :) 08:45
au|irc cxreg: you can say so :) 08:46
sorear: so by "no-op" I assumed something like " $M->{_ast} = $M->{blast}{_ast}{do} ", but that seems to discard the lexenv
sorear oh. right. the lexenv. 08:47
look at circumfix__S_Cur_Ly
bare blocks, do, not too different
au|irc yup
and since {} is optional after do iirc (unlike perl5) I'll drop it from repl for now 08:48
mathw "au" is also the Lojban attitudinal indicator for 'desire'
au|irc that's a good association too... 08:49
sorear would you be offended if I just kept thinking "Audrey"
dalek ecza: 40c53d0 | au++ | niecza_eval:
* Drop the bare-{} form after "do" for repl so we don't create an extra lexenv.
08:50
au|irc sorear: it's considerably difficult for me to be offended :)
"australia" would be fine too
(and audrey is my legal name on passport, fwiw. I just wanted a shorter nickname than _why. *smile*) 08:52
sorear "legal name on passport" != "name which is, under any circumstances, at all acceptable to use" 08:53
well 08:54
au|irc let's just say I typecasted into Whatever :) 08:55
sorear I guess it depends on how old the passport is
au|irc it's new as of, like, a couple months ago.
sorear a lot of trans people I know are very touchy on the subject of old records
au|irc yeah. I worked with monomorphic restriction for a year or so too
dalek ecza: 1070301 | au++ | niecza_eval:
* Do not evaluate comments and blank lines in repl.
08:56
ecza: 0924b28 | sorear++ | setting:
Start sketching out List implementation
ecza: 5ea3202 | sorear++ | (2 files):
Implement $!foo syntax
sorear hey, it worked
au|irc :D
cxreg you guys are going to surpass rakudo at this rate :D 08:57
au|irc just to set expectations, I was taking a short break from day job because my MacBookPro's disk failed :) 08:58
so in all likelyhood I'll be back dayjobbing in a couple days
sorear well, I was the one who added lexicals to the rakudo repl in the first place...
08:59 xinming left
sorear For a long time I thought lurking in #perl6 *was* TimToady's dayjob 08:59
au|irc lol
dalek ecza: c4f132b | au++ | Niecza/Actions.pm:
* Correctly handle lexicals in do {...} syntax.
09:08
09:08 gfx left
au|irc dives back to translation, since an anniversary post missed by a day wouldn't be very anniversary... 09:12
09:12 user_4923 joined, au|irc is now known as au|dive, user_4923 left
szabgab could somone with enough powers update www.rakudo.org/community and add a linkto webchat.freenode.net/?channels=perl6 for those who don'tyet use IRC? 09:14
sorear wait, wait, what 09:26
+ c4f132b...9fe76f1 master -> master (forced update)
I DID NOT USE -f
dalek ecza: 9fe76f1 | sorear++ | (4 files):
Implement macros && || // andthen and orelse or. Special block behavior of
sorear au|dive: ? 09:27
au|dive no idea what happend
09:27 au|dive is now known as au|irc
au|irc probably you had an alias to push -f or something... 09:28
sorear yep, au's latest commit no longer exists
au|irc it's ok, I gcp'ed it back
alias gcp='git cherry-pick -x'
# handy
alias gpu='git pull --rebase && git push' # also hady 09:29
*handy
sorear doesn't seem to be anything force-related in ~/.gitcofnig or .git/config 09:31
dalek ecza: d9a9c18 | au++ | Niecza/Actions.pm:
* Correctly handle lexicals in do {...} syntax.
09:32
09:35 zulon left
pmichaud au|irc: It's very nice to see you here again. :-) 09:35
au|irc pmichaud: heya. *hugs* :) 09:36
pmichaud *hugs* 09:37
dalek ecza: 886a992 | sorear++ | test.pl:
tests for au++ 's do hacking
09:38
p-rx: 7b1280f | pmichaud++ | src/ (3 files):
Add backtrack indicators to Cursor, Regex "pass" nodes.
p-rx: eb16d23 | pmichaud++ | src/ (2 files):
Initial version of backtracking. Adds Cursor.next and helper methods to restart
p-rx: b796e3d | pmichaud++ | src/Regex/Cursor.pir:
Be more robust about backtracking into failed/nonbacktracking cursors.
p-rx: a1c5ce3 | pmichaud++ | src/ (2 files):
Add backtracking into subrule code. Split !cursor_next from Cursor.next .
p-rx: c2c2fbe | pmichaud++ | src/PAST/Compiler-Regex.pir:
Eliminate (unsaved) uniquereg used for markers in greedy/ratchet quantifier.
p-rx: 7b0bf98 | pmichaud++ | src/PAST/Compiler-Regex.pir:
Make sure uniquereg for frugal quantifiers is reset properly if re-entering
p-rx: cf03cdb | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION.
p-rx: 6aedfc2 | pmichaud++ | src/stage0/ (4 files):
Update bootstrap.
kudo: 9005478 | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION to get regex backtracking fixes from nqp-rx. Fixes RT
09:40
pmichaud that's probably enough for one evening.. time for sleep :-) 09:43
moritz_ \o/
pmichaud++
good night
rakudo: use Test; grammar A { token hi { hi } }; ok A.parse( 'hi',
p6eval rakudo f55fb0: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
moritz_ rakudo: use Test; grammar A { token hi { hi } }; ok A.parse( 'hi', :rule<hi>) eq 'hi', "Grammar.parse: :rule<somerule>"
p6eval rakudo f55fb0: OUTPUT«ok 1 - Grammar.parse: :rule<somerule>␤»
au|irc g'♘ pmichaud++ :) 09:44
09:45 envi^home joined
cxreg sorear: if you prefix a refspec with + in git, it means the same as push -f. maybe you did that? 09:49
09:54 zulon joined
sorear cxreg: I did "git push". Perhaps I set up autotargetting wrong. 09:54
push = +refs/heads/*:refs/heads/* 09:58
10:01 xinming joined 10:03 Meldrake joined
dalek ecza: c54ea1e | sorear++ | CodeGen.pm:
More robust handling of types
10:04
ecza: fcee377 | sorear++ | setting:
Flesh out LLArray more
10:10 timbunce joined 10:13 i__ joined, Mowah left 10:15 zulon left, timbunce left
cognominal thx, moritz++ for the feedback on the use of C<ok> in Test. 10:22
moritz_ you're welcome 10:24
10:24 au|irc is now known as au|afk|dinner
moritz_ cognominal: did you add the test to any spectest files yet? 10:24
10:24 Leonidas joined
cognominal nope 10:24
10:25 pmurias left 10:28 synth joined
moritz_ btw I've just fixed the master branch of proto to work with current rakudo 10:30
if you find any new breakages, please let me know
sorear I thought proto was abandoned? 10:33
moritz_ well, it's abandoned as long as nobody works on it
but until pls is declared the successor officially, I'm inclined to keep proto working
daxim is there a factbot here? 10:34
moritz_ don't know, at least not a spammy one :-)
10:37 Sarten-X left 10:41 pmurias joined
sorear what. 10:45
how did this work on the first try.
dalek ecza: 325388d | sorear++ | setting:
Implement List.elems, List.Bool, List.shift
10:46
ecza: 4ad1567 | sorear++ | Kernel.cs:
No need to coerce on list binding after all
sorear lists in niecza just got their first user-facing manifestation
ecza: fe2b2ab | sorear++ | (6 files):
Implement slurpy parameters
sorear can't say my @x *just* yet 10:47
sorear -> sleep 10:48
11:03 Whoop joined
jnthn moritz_: In the Nested * patch, pir::exists($last, 'returns') is my main object to it. Should be more like pir::defined($last.returns) 11:03
moritz_: Other than that, I was fairly happy with the patch before, and just hadn't gotten around to rebasing. 11:04
With the tweak I mentioned above and if it passes the tests and seems to work, +1 to apply. 11:05
also, pmichaud++ # backtracking fixes! :-)
11:06 azert0x joined, agentzh left 11:15 Whoop left 11:17 TimToady joined
colomon jnthn: any fixes to operators in modules over the weekend? 11:23
11:24 cognomore left 11:27 cognomore joined
moritz_ btw masak++'s excellent blog post is still around top 20 on hackernws, and #6 on reddit/programming 11:29
daxim wow
jnthn colomon: 'fraid not 11:30
colomon :(
jnthn colomon: Is there a ticket?
colomon not one made by me....
moritz_ rakudo: say $*VM<config><version> 11:33
p6eval rakudo 900547: OUTPUT«Any()␤»
moritz_ rakudo: say $*VM<config><VERSION>
p6eval rakudo 900547: OUTPUT«2.5.0␤»
11:34 zulon joined 11:36 snarkyboojum joined 11:38 clintongormley joined
dalek kudo: 8d8114f | moritz++ | src/Perl6/Compiler.pir:
print parrot version in --version output, and athe revision only if != 0
11:43
11:48 zulon left 11:49 zulon joined 11:51 krakan joined
moritz_ jnthn: thanks. I've changed the exists to defined, and now I'm spectesting a last time before pushin 11:52
g
jnthn moritz_++ 11:54
mmcleric++
moritz_ mmcleric++
maybe I should add him to CREDITS too
jnthn Yes, pzhlst. :-)
sorear can't sleep. niecza calls. 11:58
tadzik rakudo: my junction $x = 3 | 5; my $a = 3; say 'ok' if $a == $x 11:59
shouldn't that work?
p6eval rakudo 900547: OUTPUT«===SORRY!===␤Malformed my at line 22, near "junction $"␤»
11:59 sorear sets mode: +o TimToady
jnthn tadzik: Junction 11:59
tadzik moritz_: you have a typo in your Perl 5 to 6 then 12:00
jnthn: thank you
moritz_ tadzik: ah, the spec called it 'junction' at some point, I should udpate it
sorear rakudo: class Foo { }; say Foo.new ~~ Foo.new;
p6eval rakudo 900547: OUTPUT«0␤»
jnthn Well, there was a pondering at one point that it should be a lowercase type, but thankfully it never caught on.
tadzik rakudo: say 'ok' if [1, 2, 3] == all(3, 2, 1) # what's wrong here? 12:02
p6eval rakudo 900547: ( no output )
moritz_ tadzik: == does numeric comparison
tadzik eq then?
moritz_ tadzik: and an array in numeric context evalutes to the number of arguments
and 3 == all(1, 2, 3) is False 12:03
tadzik ah. How should it be, then?
moritz_ what do you want to achieve?
tadzik find the use for all
moritz_ grep *>2 & *<10, @list; 12:04
12:04 skids joined
moritz_ grep /president/&/Obama/, @people; 12:04
jnthn tadzik: if all(@test-scores) > 60 { say "Everybody passed!" } # for example
tadzik I see
TiMBuS moritz_, would that not pull two values from @list at a time? 12:06
sorear We have a Type type!? S03:3543
moritz_ TiMBuS: no, it's a single test
sorear: just because it's in S03 doesn't mean it's a good idea :-)
snarkyboojum rakudo: say "yep" if all(1,2,3) == any(1,2,3,4,5) 12:07
p6eval rakudo 900547: OUTPUT«yep␤»
moritz_ sorear: I guess it should be Any:U or Any:U where { .WHAT === $_ }
sorear moritz_: I am very, very conflicted on whether Foo isa Foo or Foo isa Class is better
12:09 Sarten-X joined
jnthn Oh, the infamous Class type. :-) 12:09
sorear based on my current reading of that table, I'd say that 3 ~~ Int is false
jnthn Well, best way to check if what you have is a class is probably what moritz++ wrote and if you want to be really sure then add .HOW ~~ ClassHOW
sorear which is totally awesome
jnthn sorear: er 12:10
sorear: Maybe read it differently. ;-)
12:10 masonkramer joined
moritz_ sorear: I guess that 'Type' in that sense is a bit meta. You can't define smart-matching semantics through smart-matching, after all :-) 12:10
sorear jnthn: if Type is a subset of Any, then it is less specific than a subclass of Any
jnthn: so the Numeric rule takes precedence 12:11
moritz_ (should be Mu probably, not Any, sorry for that)
jnthn sorear: Type is probably being used in a meta-y sense here.
sorear jnthn: how meta-y? 12:12
jnthn std: Type
p6eval std 31766: OUTPUT«===SORRY!===␤Undeclared name:␤ 'Type' used at line 1␤Check failed␤FAILED 00:01 114m␤»
jnthn That meta-y.
sorear rakudo: say "foo" ~~ Str 12:14
p6eval rakudo 900547: OUTPUT«1␤»
sorear rakudo: say Str.ACCEPTS("foo")
p6eval rakudo 900547: OUTPUT«1␤»
sorear How is that implemented? 12:15
I'm looking at Str.pir +28
moritz_ sorear: it's probably implemented in PCT somwhere
sorear: parrot r47873 touches that code, it seems 12:16
jnthn sorear: The type-object in Rakudo ATM is the object + a mix-in that provides an ACCEPTS method that does an isa check.
But it should probably really work by Mu having a proto method ACCEPTS and a ACCEPTS(Mu:U $inv:) candidate, and all other ACCEPTS methods being only :D 12:17
(the :D there is syntax, not smiley)
Of course, they all gotta be multi ACCEPTS then 12:19
*multi method ACCEPTS
moritz_ jnthn: I don't think so, otherwise user-defined ACCEPTS methods are too fragile
jnthn Which raises the slight issue of needing to multi-dispatch to type check, but multi-dispatch needs to go by type, so...
moritz_: Well, thus the "should method invocants default to :D" discussions that occasionally come up.
mathw What does :D mean? 12:20
jnthn The object must be happy
daxim grin
jnthn er, defined
moritz_ Int:D are all the defined integers
sorear I think that I'll just put a .defined check into infix:<~~>
moritz_ so the Int type object doesn't match Int:D
sorear: I think that's a reasonable first approximation
sorear is extremely uncomfortable with type objects. Also loves them. 12:21
jnthn moritz_: But anyway, yes, it's fragile in that sense.
I'm currently quite undecided if when I re-do the Rakudo meta-model I try to drop the "type object = object + mixin" thing or not.
sorear jnthn: for the record, I'm planning to *add* that when I re-do the niecza meta-model 12:22
mathw Oh nifty
Didn't know about that
moritz_ mathw: it's NYI in rakudo, so I regularly forget about it
mathw I think I must've missed that part of the spec 12:23
sorear jnthn: method foo() { $!x } # If the type object is a separate true-type, then it's possible to generate two versions of this method, neither of which has to make a definedness test
mathw which is not surprising, I've missed lots of it
jnthn sorear: Another implementation declaring it a sane approach besides Rakudo would go a long way to making it a viable way forward.
mathw I should print it out and read it at bedtime...
sorear mathw: AIUI, there's a standing contract with O'Reilly and S** is the drafts of what will become Programming Perl (6) 12:25
moritz_ sorear: not quite 12:26
mathw there is a contract for that book, but S** is not the draft form 12:27
as I understand it
moritz_ sorear: the S** numbers are take from the chapter numbers of Programming Perl, but they are under the AL2
mathw S** would make a pretty dull book anyway
they're not really written the right way
moritz_ mathw: the 'Using Perl 6' book will not published by O'Reilly, fwiw 12:28
mathw moritz_: I know that
moritz_ but Onyx Neon Press
mathw I thought there was a 'Programming Perl 6' one with O'Reilly
moritz_ there was talk about it; but I don't think it shares code with S\d\d 12:29
12:30 salv0 joined
cognominal my @a = [1]; my @b ::= @a; @b[0]=4; @a[0] = 'z' ; say @b.perl # jnthn, I would like an operator that bind @b to the container originally bound to @a. := has a different semantic 12:30
rakudo: my @a = [1]; my @b ::= @a; @b[0]=4; @a[0] = 'z' ; say @b.perl
p6eval rakudo 900547: OUTPUT«["z"]␤»
mathw no, I don't think any book does, S** would make a terrible book
But I should still read them anyway
cognominal I would like rakudo to output [4] here 12:31
moritz_ then use =
rakudo: my @a = [1]; my @b ::= @a; @b[0]=4; @a[0] = 'z'
p6eval rakudo 900547: ( no output ) 12:32
moritz_ rakudo: my @a = [1]; my @b = @a; @b[0]=4; @a[0] = 'z'; say @b.perl
p6eval rakudo 900547: OUTPUT«[4]␤»
cognominal by = does a copy
*but 12:33
moritz_ if you want maintain two separate containers, you have to copy
cognominal I just want to bind to the original array
moritz_ that's what you do :-)
salv0 rakudo: my Int @a = 5; say @a[0]
p6eval rakudo 900547: OUTPUT«maximum recursion depth exceeded␤ in 'at_pos' at line 1␤ in 'at_pos' at line 7:CORE.setting␤ in 'Any::postcircumfix:<[ ]>' at line 1624:CORE.setting␤ in 'at_pos' at line 5:CORE.setting␤ in 'at_pos' at line 7:CORE.setting␤ in 'Any::postcircumfix:<[ ]>' at line
..1624:CORE.settin…
moritz_ that's bad.
tadzik that's weird 12:34
salv0 yes, should typed arrays be already working?
tadzik but works for me, in REPL
cognominal rakudo: my (@a, @b); @a = [ 1]; @b = @a; say @b.WHERE, @a.WHERE 12:35
p6eval rakudo 900547: OUTPUT«140127680140128064␤»
tadzik and even not in repl
cognominal rakudo: my (@a, @b); @a = [ 1]; @b = @a; say @b.WHERE, " ", @a.WHERE
p6eval rakudo 900547: OUTPUT«140589488 140589872␤»
sorear didn't I explain this yesterday?
moritz_ salv0: yes, at least the basics
jnthn Huh...I thought that worked... :/
moritz_ @a = [1]; generates a nested array 12:36
jnthn: works here too
sorear std: False ~~ True
p6eval std 31766: OUTPUT«Potential difficulties:␤ Smartmatch against True always matches; if you mean to test the topic for␤ truthiness, please use :so or *.so or ?* instead at /tmp/4qYrtEObcI line 1:␤------> False ~~ True⏏<EOL>␤ok 00:01 116m␤»
sorear std: ok False ~~ True
p6eval std 31766: OUTPUT«===SORRY!===␤Undeclared routine:␤ 'ok' used at line 1␤Potential difficulties:␤ Smartmatch against True always matches; if you mean to test the topic for␤ truthiness, please use :so or *.so or ?* instead at /tmp/QDxoxyyxFa line 1:␤------> ok False ~~
..True…
sorear oh 12:37
cognominal do you understand, the need for the operator I am talking about?
sorear bad error message
moritz_ cognominal: no
sorear cognominal: As I have explained several times, the operator you are talking about is spelled ':=' and NYI in rakudo 12:38
NYCI
You don't need to ask us to add it.
We're already failing spectests for it.
cognominal I think there are two different operators, making two variable name synonymous, which the current behavior of := et what I ask for. I am not sure what the spec says. 12:40
s/et/and/
acking to see the spectests...
12:47 masonkramer left
dalek ecza: 84a4c6b | sorear++ | (2 files):
Fix Sub.HOW. Implement smart matching.
12:48
12:57 bluescreen joined 12:58 bluescreen is now known as Guest21067, kidd joined, kidd is now known as rgrau_ 13:03 jferrero left 13:08 Guest21067 left, Guest21067 joined 13:13 au|afk|dinner is now known as au|zzz 13:14 Guest21067 left
tadzik can someone show me an example of dying with something more sophisticated than a string? $_.WHAT in CATCH is Exception(), but what special features does it have? 13:15
moritz_ rakudo: try { die { a=> 1, b => 2 } }; say $!<a> 13:16
p6eval rakudo 8d8114: ( no output )
moritz_ huh
13:18 slavik joined 13:20 takadonet joined
takadonet morning all 13:20
moritz_ hi takadonet 13:21
takadonet moritz_: how are u?
moritz_ rakudo: try { die { a=> 1, b => 2 } }; say $!.payload.<a> 13:22
p6eval rakudo 8d8114: OUTPUT«Null PMC access in can()␤ in main program body at line 1␤»
moritz_ takadonet: fine, thank you
snarkyboojum rakudo: try { die; CATCH {foo} } # core dump here
mathw smells a NYI
moritz_ what about yourself?
p6eval rakudo 8d8114: ( no output )
takadonet busy as hell but good
13:24 pmurias left 13:28 Trashlord left 13:29 tadzik left 13:31 Guest21067 joined, Trashlord joined 13:36 Guest21067 left 13:43 tadzik joined, zulon left
tadzik so what about this exceptions, NYI? 13:45
moritz_ mostly NYI
13:49 felliott left 13:51 uniejo left 13:52 JimmyZ joined 13:53 macroron joined 13:54 Guest21067 joined 13:56 pmurias joined, snarkyboojum left, tylercurtis joined 13:57 perlygatekeeper joined
pmichaud good morning, #perl6 14:01
moritz_ good morning pmichaud, saviour of the regex engine :-)
now mathw++ doesn't have an excuse for slacking on Form.pm development :-)
pmichaud I'm still curious to know if it really works in general. :-) 14:02
moritz_ an advent calendar test passed
pmichaud not nearly enough tests for backtracking into subrules and subpatterns :-)
mathw Yes I do
nested modules are broken!
pmichaud oh! advent calendar test passing is good for me.
moritz_ mathw: but workaroundable
14:02 plainhao joined
mathw but I can fix the parse tree construction 14:02
tadzik will #31 come before Rakudo Star?
mathw moritz_: yes, because I like restructuring my modules, oh yes. Oh very yes.
pmichaud #31 is Thursday. 14:03
mathw I think I'm going to strip it back a bit and start with something smaller
pmichaud Rakudo Star is a week from Thursday.
(so yes)
tadzik yeah, but it will happen, right? :)
mathw the sheer quantity of errors is quite depressing
moritz_ tadzik: Rakudo Star will use the #31 compiler release
tadzik oh, ok
moritz_ (afaict)
pmichaud (yes)
tadzik so this week will be polishing blizkost, zawolaj, proto and stuff?
pmichaud tadzik: generally, yes.
moritz_ speaking of which... has anybody tested blizkost recently? 14:04
pmichaud ooooh, perl6 screencast! 14:06
szabgab.com/blog/2010/07/1279584453.html
szabgab++
tadzik hah. I love it how now, when I want a calculator, launch `perl6` instead of `python` or `irb` 14:07
the little things that make you happy
jnthn pmichaud: Oh, Thursday's compiler release becomes R*? :S
14:07 alester joined
[Coke] WHAT? 14:07
(EVER)
jnthn pmichaud: As in, the compiler that goes into R*
jnthn had expected we'd have time for last fixes in the week between the two... 14:08
pmichaud jnthn: we might.
I'd prefer that we use a released compiler for R*, but if there's a really important fix we can perhaps change that. 14:09
jnthn Not sure why using a released compiler matters, tbh. In many ways, it's just what was in master on the right date of the month, plus some attempt to make sure we've no failing tests. :-) 14:10
Anyway, we'll see.
pmichaud ...because I expect distributions to generally build from compiler releases (and not necessarily the most recent one)
[Coke] is wishing he did not accidentally volunteer to do both releases this week.
pmichaud [Coke]: we can probably find another release manager for rakudo if you want. 14:11
[Coke] I'll be fine. =-)
pmichaud okay. (and yes, you will. rakudo releases are Easy)
jnthn pmichaud: Well, yes, there is that case of setting precedent.
pmichaud jnthn: like you, I'm more interested in higher quality release than precedent. 14:12
jnthn pmichaud: Aye, this time around I think that's more the focus.
pmichaud but I had been hoping to use the released compiler, and spend the week polishing the other pieces
jnthn pmichaud: *nod*
pmichaud: I just rather suspect that in polishing the other pieces we'll find we need to tweak soemthing in Rakudo.
daxim pugs: class Pony { has @.fur is ro = <soft freckled>; has $name is rw; } my Pony $jifty = Pony.new(:name<Jifty>); say $jifty.fur; say $jifty.perl; 14:13
p6eval pugs: OUTPUT«softfreckled␤\Pony.new(("fur" => ["soft", "freckled"]), ("name" => "Jifty"))␤»
pmichaud jnthn: aye to that.
jnthn pmichaud: I'd be happy to be proved wrong, but I'm not quite optimistic enough ;-)
daxim when is it okay to leave out the twigils in the class definition?
tylercurtis daxim: when it's a private attribute, iirc.
jnthn daxim: has $foo is like has $!foo with $foo just being an alias to $!foo
daxim: In a sense, $!foo serves as nice documentation and lets things line up more neatly when there's other $.foo decls (which also get an accessor method generated) 14:14
daxim define alias in this context
jnthn The compiler says "oh, I see $foo" and re-writes it as $!foo
daxim okay
moritz_ two names for the same thing
jnthn (within the class body)
dalek kudo: 40c6ec7 | (Вячеслав Матюхин)++ | src/Perl6/Actions.pm:
Implement nested Whatever-currying

much (suggested by jnthn++, conducted by moritz).
kudo: cf5f19a | moritz++ | CREDITS:
2f4733e | moritz++ | src/Perl6/Grammar.pm:
14:14 dalek left 14:15 dalek joined
jnthn Self-exterminated! 14:15
mmcleric++ \o/
moritz_ indeed
mmcleric++
jnthn moritz_: There's probably some tickets we can close thanks to that. :-) 14:16
moritz_: And no doubt tests to unfudge. :-)
moritz_ autounfudge finds quite a few things that work now and haven't worked before
we need more mad hackers :-) 14:17
jnthn We should have a Rakudo hackathon at YAPC::Russia next year. :-) 14:18
moritz_ yes, please do :-) 14:19
pmichaud Pm's "challenge of the week" 14:20
github.com/pmichaud/io-prompter
(1) make sure it works with Rakudo master
(2) make it into a real proto/pls module
(neither of these may be a real challenge :-)
14:21 baest left
jnthn omg damian code! 14:22
jnthn drops what he's working on
cognominal rakudo: * = *
pmichaud scary: github.com/pmichaud/io-prompter/blo...mptloop.p6
p6eval rakudo 8d8114: ( no output )
14:22 justatheory joined
moritz_ uhm, all these 'of Bool' declarations look scary 14:22
pmichaud scarier: github.com/pmichaud/io-prompter/blo...straint.p6
moritz_ is there any reason not to use Bool $thing? 14:23
jnthn pmichaud: heh "ould probably replace this with 'does'ing an anonymous role]." ==> they weren't implemented back then. They Are Now.
pmichaud jnthn: yes 14:24
moritz_: I'm guessing Damian preferred the "of Bool" form for some reason.
jnthn heh, you know some code is awesome when you see "gather for &block.signature.params -> $param {" :-) 14:26
pmichaud you know Rakudo is awesome when that Actually Works. :-)
jnthn ;-)
pmichaud forks, pull requests welcomed.
moritz_ indeed. You should all write some Perl 6 modules at some point 14:27
14:27 tadzik left
moritz_ just to get the user's perspective from time to time, first hand 14:27
14:28 justatheory left
jnthn moritz_: I did. 14:29
moritz_: I pushed to it only 2 days ago, even. ;-)
Trouble is, now I've written one, I want to write more. :-) 14:30
"trouble" :-)
moritz_ OH NOEZ
pmichaud suspects he should probably pack for his trip to PDX sometime soon. 14:31
14:34 i__ left
moritz_ rakudo: class A { has $.b = my $foo = 42; method x { say $foo } } A.new.x 14:35
p6eval rakudo 8d8114: OUTPUT«===SORRY!===␤Confused at line 22, near "class A { "␤»
moritz_ rakudo: class A { has $.b = my $foo = 42; method x { say $foo } }; A.new.x
p6eval rakudo 8d8114: OUTPUT«42␤»
moritz_ used to be RT #73368 14:36
14:36 JimmyZ left
jnthn moritz_: oh nice 14:36
moritz_: I fixed a related bug recently
14:36 zulon joined
jnthn I bet the fix dealt with this issue too 14:36
Bonus win.
tylercurtis rakudo: class A { has $.b = my $foo = 42; method x { say $foo } }; A.new.x; A.new.b.say; 14:37
colomon must not allow himself to be distracted by Damian code.
p6eval rakudo 8d8114: OUTPUT«42␤42␤»
tylercurtis rakudo: class A { has $.b = my $foo = 42; method x { say $foo } }; my A $a .=new; $a.x; $a.b.say; $a.b = 5; a.x; $a.b.say
p6eval rakudo 8d8114: OUTPUT«42␤42␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/tNlFIp32vX␤»
moritz_ jnthn: there's a windows-related skip in S16-filehandles/unlink.t (search for WINDOWS in captial letters) - could you please check if that's still required? 14:38
tylercurtis rakudo: class A { has $.b is rw = my $foo = 42; method x { say $foo } }; my A $a .=new; $a.x; $a.b.say; $a.b = 5; a.x; $a.b.say
p6eval rakudo 8d8114: OUTPUT«42␤42␤Could not find sub &a␤ in main program body at line 22:/tmp/6hjSjgzxLS␤»
tylercurtis rakudo: class A { has $.b is rw = my $foo = 42; method x { say $foo } }; my A $a .=new; $a.x; $a.b.say; $a.b = 5; $a.x; $a.b.say
jnthn moritz_: Can do - just need to deal with about 5 other things going on at once here first. :-)
p6eval rakudo 8d8114: OUTPUT«42␤42␤42␤5␤»
moritz_ jnthn: sure, no hurry
jnthn: if the test passes, just remove the skip - it passes on linux too 14:39
pmichaud: some new unfudges in S05-mass/recursive.t... should be enough test coverage to close the backtracking ticket 14:45
pmichaud moritz_: +1! 14:46
moritz_ closed. 14:49
feather3 is down, which is why we don't get any notification from pugs_svn 14:50
(as announced by Juerd++)
pmichaud afk for a bit # packing 14:53
cono rakudo: class AD { method a { say "Hello" }; }; class BD { has AD $.Y is rw; }; my BD $x = .new; $x.Y.a 15:01
p6eval rakudo cf5f19: OUTPUT«Type check failed for assignment␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/vbHiiznDlc␤»
cono rakudo: class AD { method a { say "Hello" }; }; class BD { has AD $.Y is rw; }; my BD $x .= new; $x.Y.a 15:02
p6eval rakudo cf5f19: OUTPUT«Method 'a' not found for invocant of class ''␤ in main program body at line 22:/tmp/Va23iGJD5T␤»
cono rakudo: class AD { method a { say "Hello" }; }; class BD { has AD $.Y is rw; }; my BD $x .= new; $x.Y .= new; $x.Y.a 15:03
moritz_ rakudo: class AD { method a { say "Hello" }; }; class BD { has AD $.Y = AD.new }; BD.new.Y.y
p6eval rakudo cf5f19: OUTPUT«Method 'a' not found for invocant of class 'Any'␤ in main program body at line 22:/tmp/asnu_UXDnp␤»
rakudo cf5f19: OUTPUT«Method 'y' not found for invocant of class 'AD'␤ in main program body at line 22:/tmp/zC_T7IE5fg␤»
cono why Any ?
jnthn rakudo: class A { has Int $.x }; say A.new.x 15:04
15:05 snarkyboojum joined
p6eval rakudo cf5f19: OUTPUT«Any()␤» 15:05
moritz_ typed attributes NYI/broken
jnthn cono: Because I never finished the patch I started writing in Kiev. :-(
cono :/
jnthn I think I did all the refactors leading up this this.
And just never quite finished it. D'oh.
15:06 [particle] left 15:07 [particle] joined
cono ok, try another way :) 15:07
15:09 pmurias left 15:13 masak joined
masak oh hai, #perl6! 15:13
phenny masak: 07:30Z <mathw> tell masak Excellent news. Now can you fix my freezer, and nested modules?
colomon o/
moritz_ oh hai masak
masak hugme: hug mathw :)
hugme hugs mathw
moritz_ masak: backtracking into captures is waiting for you to break it :-)
tylercurtis moritz_: what are you working on today? Want to help me finish updating Squaak? :) 15:14
masak moritz_: oh wow!
tylercurtis Hi, masak.
masak 106 comments on Reddit and 45 comments on HN! \o/
tylercurtis: greetings.
moritz_ tylercurtis: mostly $work stuff, and tonight I have a .pm meeting, so I fear I won't be of much help :(
tylercurtis moritz_: alright. I'll try to drag someone else into it, then. :) 15:15
15:16 [particle] left, justatheory joined 15:18 justatheory left
[Coke] wonders why moritz bothers arguing with trolls. 15:19
(reading a perlmonks thread.)
cono rakudo: class A {method h {say "hai"}}; class B {has $.type is rw; method new { $.type = A.new }}; my B $x .= new
p6eval rakudo cf5f19: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!type␤ in 'B::new' at line 70␤ in main program body at line 22:/tmp/_VCJaDDiIs␤» 15:20
15:20 [particle] joined
szabgab rakudo: my @x = <a b "c d">; say @x.perl 15:20
p6eval rakudo cf5f19: OUTPUT«["a", "b", "\"c", "d\""]␤»
szabgab rakudo: my @x = <a b "c d">; say @x.elems 15:21
cono Why object is abstract?
p6eval rakudo cf5f19: OUTPUT«4␤»
masak [Coke]: url?
szabgab shouldn't that be 3 elements?
[Coke] masak: already closed it.
masak ok. 15:22
[Coke] I have no idea if it was even a new thread. =-)
moritz_ [Coke]: sometimes I'm not wise enough
masak trolls are often very good at prompting replies.
moritz_ right; those that aren't good aren't noticed
[Coke] especially if it's an anonymous troll^Wmonk. Clearly they don't want a /discussion/ 15:23
but, keep fighting the good fight. maybe it'll work. =-)
moritz_ [Coke]: it's not about convincing the troll. But if anybody who reads along is convinced, it's worth the effort
masak wow, this is so cool! pugs.blogs.com/pugs/2010/07/perl-6-...B8%80.html 15:24
au|irc++
moritz_ part 1 of 5. wow.
masak reading traditional characters is tough going...
jnthn masak: oh wow, the mug puns have got translated! \o/ 15:27
[Coke] fed that through google translate back into english. was readable. =-)
[particle] wrestled?
masak jnthn: 「杯比怎麼昇出來的?」 -- "how is mug re-formed?" :P 15:28
pmichaud is it worth reading the comments in reddit/HN?
masak pmichaud: they're like most such threads. a couple of gems among a lot of unnecessary meanness.
moritz_ notreally
masak I don't know why, but I get the feeling that it's mostly Python and Ruby people who write "Perl -- who uses that nowadays?". 15:30
jnthn masak: lol
[Coke] does a search for "perl6" on reddit and finds nothing.
jnthn Python and Ruby. Who'll use those when Perl 6 is released? ;-)
masak [Coke]: www.reddit.com/r/programming/commen..._personal/
moritz_ [Coke]: www.reddit.com/r/programming/commen..._personal/
:-)
I usually spell it 'Perl 6' (with space)
except in domain names :-) 15:31
[Coke] wonders why that doesn't show up here:
www.reddit.com/search?q=perl6&sort=new
ah.
masak jnthn: I thought Python and Ruby users had already stopped using Python and Ruby, just like all Perl 5 users stopped using Perl 5 when Perl 6 was announced, 10 years ago.
jnthn masak: Oh yeah, sill me, I forgot. 15:32
:P
masak thought jnthn didn't like sill
jnthn EWWWW! :O 15:33
*silly
masak :D
"Camelia, the Perl 6 spokesbug, is adorable" -- twitter.com/thatmattbone/status/18877789703 15:34
love it or hate it. no middle ground.
[Coke] masak: sure there is. I'm apathetic.
[particle] you're old, your opinions don't matter. 15:35
[Coke] perl6.org is blocked by the GE corporate firewall, btw.
masak that's not a ground, that's lack of ground. :)
[Coke]: as gambling, right?
[Coke] masak: doesn't tell you.
[particle] no, wait, maybe it's because you're bald.
it's been so long since i've cared, it doesn't matter why they don't matter anymore :P
[Coke] [particle]: it's a lifestyle choice. don't be a hater. 15:36
masak: (and I cannot request an unblock as I iza contractor.)
masak [Coke]: you'll simply have to do your butterfly watching outside of work. :) 15:37
[Coke]: and pray that we don't put anything useful on that site...
moritz_ doesn't plan to 15:38
15:40 zulon left 15:44 Mowah joined 15:50 dolmen__ joined
masak "Marc Andreessen will tell you with a straight face that he expects Mosaic Communications's Mosaic to become the world's standard interface to electronic information." -- wow that is the best quote I've read in a long time. it's from www.wired.com/wired/archive/2.10/mosaic.html 15:50
dolmen__ rakudo: for 1,2,3 -> $x { $x.say }
p6eval rakudo cf5f19: OUTPUT«1␤2␤3␤»
dolmen__ rakudo: for 1,2,3 -> $x { LAST { $x.say } } 15:51
p6eval rakudo cf5f19: OUTPUT«Could not find sub &LAST␤ in main program body at line 22:/tmp/nXF_RJ5Zy4␤»
masak dolmen__: NYI
dolmen__: but it would print "3\n", yes.
dolmen__ masak: just read your blog post
masak :_
:)
dolmen__ rakudo: for 1,2,3 -> $x { LAST { $x.say } $x++; LAST { $x.say } } 15:52
p6eval rakudo cf5f19: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
masak still NYI :)
dolmen__ rakudo: for 1,2,3 -> $x { LAST { $x.say }; $x++; LAST { $x.say } }
p6eval rakudo cf5f19: OUTPUT«Could not find sub &LAST␤ in main program body at line 22:/tmp/T9wWvclljm␤»
masak and you always need ; after } in a one-liner.
moritz_ or phrased differently, you always need ;, only after }\n it's not necesasry 15:53
dolmen__ are multiple LAST phasers allowed?
moritz_ I think so
masak they are.
they execute in order.
may sound silly to allow them, until you start thinking of macros. 15:54
moritz_ if I have my $x = ( 3; LAST { 4 } }.(), what's $x?
pmichaud (Mosaic becomes world's standard interface) I suspect that quote was the equivalent of painting a big red-and-white-striped target on his butt and waving it in Microsoft's face saying "nyeah nyeah nyeah".
masak moritz_: 3, I'd say.
dolmen__ @moritz: LAST is only allowed in a loop, isn't it? 15:55
masak dolmen__: I was thinking the same.
moritz_ dolmen__: modulo that :-)
my $x = do for 1 { 3; LAST { 4 } };
masak dolmen__: but he's actually not making a new block here, so it could be in a loop :)
moritz_: hm.
dolmen__ moritz: s/LAST/LEAVE/ and your code will be valid
colomon rakudo: for 1...5 { FIRST { say "hello"; }; say $_; };
masak I think it's valid as it is. 15:56
p6eval rakudo cf5f19: OUTPUT«Could not find sub &FIRST␤ in main program body at line 22:/tmp/vBhQxUv0mN␤»
masak heh, more people expecting Rakudo to have FIRST/LAST... :P
stay tuned for the next release of Yapsi! \o/
pmichaud +1 to adding "nyi" messages to FIRST/LAST/NEXT in rakudo. :-)
(which I'll do a bit later after I'm done packing and other trip-arranging sorts of things) 15:57
dolmen__ masak: no, more people reading about LAST/FIRST because a guy is advertising about it
colomon masak: I was just hoping it got implemented while I wasn't looking.
[Coke] colomon;you can close your eyes when you type "git push". that'll count.
colomon [Coke]: if I had an idea how to implement it, it would have been done months ago. there are plenty of core methods where FIRST would come in handy... 15:58
pmichaud colomon: oh, why didn't you say so? ;-)
masak has an idea how to implement it 15:59
pmichaud I know how to implement it also. :-)
jnthn If I drink some beer I can maybe work one out too. :-)
dolmen__ LAST is the hard one
15:59 cono left, cono joined
colomon pmichaud: because there are still plenty of Rakudo problems that cannot be worked around with two extra lines of code. :) 15:59
mathw pmichaud++ 16:00
pmichaud anyway, I hope to convert 'for' to 'map' in the next couple of days (i.e., tomorrow), so I can probably do FIRST as part of that.
colomon damn. now that I think about it, maybe I actually have a notion how to implement it too. colomon--
masak moritz_: now I think it's 4. :)
mathw Form now passes all of its 01 test file, which was all failing due to the parse backtracking
masak mathw: \o/
pmichaud++
pmichaud mathw: \o/
I can only say that getting backtracking to work was about exactly as difficult as I had expected it to be. 16:01
mathw now I have to get around RT#74426
pmichaud which is much different from most of the other things I've worked on the past couple of months :-|
moritz_ pmichaud: nopaste.snit.ch/22120 like that?
szabgab rakudo my @x = 1..Inf; say @x.elems
pmichaud moritz_: +1
szabgab rakudo: my @x = 1..Inf; say @x.elems
p6eval rakudo cf5f19: OUTPUT«Inf␤»
szabgab rakudo++
pmichaud :-) 16:02
szabgab rakudo: my @x = 1..^Inf; say @x.elems
p6eval rakudo cf5f19: OUTPUT«Inf␤»
szabgab ;)
masak rakudo: my @x = 1..Inf, 1..Inf; say @x.elems
p6eval rakudo cf5f19: OUTPUT«Inf␤»
masak \o/
moritz_ rakudo++ does correct math with some cardinal numbers :-)
pmichaud szabgab: outstanding job on the screencast, btw 16:03
moritz_ agreed. I liked it.
pmichaud I'm wanting to do some of my own (got the camera and microphone for it a couple of weeks ago, but ENOTUITS)
dolmen__ rakudo: (-Inf..Inf).elems.say
mathw pmichaud: It's always nice to estimate something correctly isn't it. Shame it's so difficult.
p6eval rakudo cf5f19: OUTPUT«Inf␤»
16:03 rlb3 left
pmichaud mathw: in some sense I was a little surprised, because I knew there was a chance that backtracking would involve some major rework 16:04
dolmen__ rakudo: (-Inf..^-Inf).elems.say
p6eval rakudo cf5f19: OUTPUT«0␤»
mathw pmichaud: I'm very glad it didn't
moritz_ pmichaud: bring that microphone to YAPC::EU, maybe we can do some short interviews with all the Rakudo hackers
well, all those that will be present
pmichaud moritz_: it's a little cheapy-lapel style microphone
jnthn ooh, good idea. :-)
pmichaud but yes, I can bring a mic to yapc::eu, or arrange to have one present.
(a good mic)
mathw ooh 16:05
mathw I think I just tried to add something to a Failure
moritz_ ./perl6 -e 'FIRST { say 2 }'
===SORRY!===
FIRST phaser not yet implemented at line 1, near ""
masak the message "Perl 6. 10 years. Rakudo Star. Will it shine or fail?" is being retweeted a lot right now.
moritz_ with appropriate link(s), I hope? 16:06
masak with a link to the anniversary post.
jnthn rakudo: sub shine { fail }; say shine.WHAT
p6eval rakudo cf5f19: OUTPUT«Failure()␤»
jnthn Yes, Rakudo * will fail.
dolmen__ masak++
moritz_ calls it a day
mathw jnthn++ 16:07
masak rakudo: class A { method day { say "OH HAI" } }; class It { method A { A.new } }; It.A.day
p6eval rakudo cf5f19: OUTPUT«OH HAI␤»
mathw \o/ t/03-textformatting.t also now passes 16:08
16:08 eternaleye joined
PerlJam masak: the problem with the succeed/fail dichotomy is everyone has different ideas of "success" 16:08
mathw PerlJam: you're absolutely correct 16:09
masak PerlJam: the problem with people who don't care enough is that they don't give you high enough bandwidth to communicate that.
pmichaud Rakudo Star will have many failures, but I suspect it will succeed at its primary purpose.
16:10 coutume joined
masak ...widening the user base? 16:10
pmichaud and increasing the bug reports
masak ...getting more feedback into the system?
pmichaud getting more feedback, yes.
tylercurtis Rakudo * is definitely going to be shiny. There's even a star in the name. Whether it succeeds is a different question.
pmichaud the only way Rakudo Star fails is if Perl 6 becomes a dead language. 16:11
dolmen__ pmichaud: +1
masak pmichaud: I like those odds. :)
[particle] := 16:12
dolmen__ the world needs Perl 6, it hasn't just realised yet
16:12 ruoso joined
cxreg the buzz is really growing, i think R* will be significant 16:12
mathw rakudo: say Rat ~~um 16:13
rakudo: say Rat ~~ Num
p6eval rakudo cf5f19: OUTPUT«Could not find sub &um␤ in main program body at line 22:/tmp/iytRq27TIK␤»
rakudo cf5f19: OUTPUT«0␤»
mathw what's the parent of Num and Rat then? Why isn't Rat a Num?
PerlJam rakudo: say Num ~~ Rat
tylercurtis rakudo: say Rat ~~ Real
masak mathw: so, Num means "real number", more than numeric.
p6eval rakudo cf5f19: OUTPUT«0␤»
rakudo cf5f19: OUTPUT«1␤»
masak mathw: we, it means "floating-point number", I mean. 16:14
s/we/er/
mathw changes the type constraint from Num to Real
jnthn rakudo: say Int ~~ Num
p6eval rakudo cf5f19: OUTPUT«1␤»
jnthn die die die! 16:15
tylercurtis rakudo: sub Rakudo ($what) { (class { method shine { True; } }).new; }; say Rakudo(*).shine;
mathw Int isn't a Num?
p6eval rakudo cf5f19: OUTPUT«1␤»
jnthn mathw: Not any more
It's a Numeric
mathw oooh
maybe that's what I want here actually
jnthn And we go to quite a length to make Int pretend it's a Num.
Almost certain it shouldn't be these days though.
tylercurtis mathw: If you don't want Complexes, you probably want Real.
daxim news://alt.wesley.die.die.die 16:16
mathw tylercurtis: I'm going to want Complex eventually, but not today...
dolmen__ rakudo: say Num ~~ Numeric 16:17
p6eval rakudo cf5f19: OUTPUT«1␤»
dolmen__ rakudo: say Numeric ~~ Num
p6eval rakudo cf5f19: OUTPUT«0␤»
dolmen__ so what is Numeric? 16:18
jnthn A role done by all numbery-ish types
16:18 envi^home left
tylercurtis dolmen__: perlcabal.org/syn/S32/Numeric.html#Numeric 16:19
dolmen__ tylercurtis: thx
16:19 tadzik joined
masak submits "Int ~~ Num" rakudobug 16:22
dolmen__ rakudo: Rat(1, 0.25).denominator.say 16:23
p6eval rakudo cf5f19: OUTPUT«Could not find sub &Rat␤ in main program body at line 22:/tmp/JauyXSMxcI␤»
dolmen__ rakudo: Rat.new(1, 0.25).denominator.say
p6eval rakudo cf5f19: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/sSJOjHu82l␤»
dolmen__ rakudo: Rat.new(1, 2).denominator.say 16:24
p6eval rakudo cf5f19: OUTPUT«2␤»
dolmen__ rakudo: Rat.new(1, 0.75).denominator.say
p6eval rakudo cf5f19: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/IqUaO2xRTI␤»
dolmen__ rakudo: Rat.new(1, Num.new(0.75)).denominator.say 16:25
p6eval rakudo cf5f19: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/Y2tJnrrHf9␤»
dolmen__ rakudo: Rat.new(1, 2.5).denominator.say
p6eval rakudo cf5f19: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/1qD2SKcZNL␤»
dolmen__ rakudo: Rat.new(1.5, 2).denominator.say
p6eval rakudo cf5f19: OUTPUT«too many positional arguments: 3 passed, 1 expected␤ in main program body at line 22:/tmp/JteXcmg2CY␤»
16:26 Mowah left, sftp left
tylercurtis looks like Rat needs a "multi method new(Mu $n, Mu $d) { die 'You can't create a Rat with non-Int values, you lunatic!'; }". 16:26
mathw pushes some fixes to Form.pm 16:27
needs a module restructure to get the rest working I think
or a Rakudo fix :) 16:28
dolmen__ leaves to go home
dolmen__ is leaving to go home
tylercurtis masak: want something to work on today? 16:29
masak tylercurtis: Squaak tutorial? :)
tylercurtis masak: How'd you guess? :P
masak backlogs
pmichaud
.oO( S26 )
16:30
jnthn masak: How's your work in the Buf going? :-)
masak tylercurtis: I would, but I have deadlines on my own... I can offer my assistance as far as proofing goes, but I think I need actual tuits for things like enums in Rakudo, the GSoC work, and the book.
tylercurtis: you see, people are already reminding me :P
nom &
jnthn
.oO( Maybe I shoulda phrased it better :P )
16:31
16:31 tadzik left
mathw \o/ Buf 16:32
\o/ Enums
16:32 felliott joined
tylercurtis masak: alright. :) I'll eventually either finish it up by myself or find someone who's not too busy to drag into it. 16:33
16:33 ceco joined
mathw masak: I did things on form!! 16:33
16:34 felliott left, dolmen__ left, coutume left
jnthn mathw++ 16:34
16:35 ceco left
mathw it now entirely passes three whole test files! 16:35
I think all the rest are down to the nested module/package/whatever bug
in that it just can't find stuff
important stuff like the actions class :) 16:36
PerlJam mathw: Add Form.pm to wiki.github.com/rakudo/rakudo/whats...nto-rakudo :-) 16:37
16:38 zulon joined, sftp joined
mathw PerlJam: well I suppose it can go into *, it's got a usable subset of functionality 16:41
needs documentation though
mathw makes a note... write documentation
mathw makes another note... make it work properly in current rakudo and damn the purity of the module structure, can always change it back later
16:42 zulon left
PerlJam mathw++ 16:42
mathw ...but not right now 16:43
I want to do it without an aikido class happening in the middle
16:49 tomaw left 16:50 IllvilJa left 16:52 tomaw joined, molaf joined, cdarroch joined, cdarroch left, cdarroch joined 16:57 HarryS left 16:58 HarryS joined, HarryS is now known as Guest5115 16:59 donpdonp joined 17:00 dakkar left 17:01 Guest5115 left 17:06 HarryS joined 17:07 daxim left 17:13 snarkyboojum left 17:14 molaf left 17:19 TiMBuS left 17:24 cono left 17:35 cono joined
masak mathw: kudos! 17:38
mathw: yes, make it work in current Rakudo. add '# RAKUDO' comments with RT numbers attached, to remind you to make things better when it's possible.
jnthn ooh, moritz_ went and put in the ROADMAP a list of our biggest awesomeness lackages with regards to errors. :-) 17:46
masak moritz_++
pmichaud: sorry I've failed to get back to you about S26. attempting to make amends now. 17:47
pmichaud masak: no problem, and no rush. I won't be able to act on it for a couple of days anyway (and perhaps not until friday afternoon)
masak nodnod
pmichaud I just figured that if others were after your tuits I'd get my bid in as well. :-)
you'll note it took me over a week to get IO::Prompter posted somewhere for people to look at :) 17:48
masak then I'll deprioritize it, and look at book/enums for a while before turning back to GSoC/Buf/IO.
pmichaud wfm
jnthn masak: ooh, you're going to enumhack? 17:49
masak best case, yes.
I want them that badly. :)
jnthn :)
masak or rather, I consider having more than we currently have important enough for R* to want to hack on it myself.
colomon rakudo: say (1, 1, * + 2 * * ... 100).perl 17:50
p6eval rakudo 2f4733: OUTPUT«(1, 1, 3, 7, 17, 41, 99)␤»
colomon \o/
jnthn colomon: Does that sequence have a name? :-)
colomon fib-like-series-which-quickly-tests-nested-Whatever-currying? ;)
jnthn Oh yeah, I remember that from my school days now. ;-) 17:51
colomon rakudo: say (1, 1, 1, * + * + * ... 100).perl 17:52
masak jnthn: www.research.att.com/~njas/sequences/A001333
p6eval rakudo 2f4733: OUTPUT«(1, 1, 1, 3, 5, 9, 17, 31, 57)␤»
colomon that's tribonacci according to Wikipedia.
masak "Numerators of continued fraction convergents to sqrt(2)."
17:52 sundar joined
colomon masak: crazy! 17:53
masak I love that search engine.
colomon en.wikipedia.org/wiki/Pell_number
oh, slightly different. 17:54
masak rakudo: class Quill {}; Quill.new; say "alive" 17:55
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Confused at line 22, near "Quill.new;"␤» 17:56
masak cries softly
frettled killing me softly with this code
masak am I to understand that types starting with Q is a post-R* concern?
pmichaud no
masak it seems we got all the rest of the alphabet working :P
pmichaud it's just a bug nobody's fixed yet.
masak what's the procedure for marking it Pretty Darn Important? 17:57
colomon rakudo: say ((0, 1, * + 2 * * ... *) Z/ (1, 2, * + 2 * * ... *)).munch(10).perl
p6eval rakudo 2f4733: OUTPUT«(1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1)␤»
colomon arrrrgh!
masak The Castle Arggghhhhh? 17:58
colomon I was dictating.
pmichaud masak: tbh, I don't know why that doesn't parse. 17:59
masak pmichaud: related to Q:PIR et al, no?
pmichaud: rt.perl.org/rt3/Ticket/Display.html?id=74338
cxreg writes: use MONKEY_TYPING; augment class Array { method lines { self.join("n") } };
pmichaud masak: that's what I would normally think, but I don't see it in the grammar
token quote:sym<Q> { 'Q' >> <![(]> <.ws> <quote_EXPR> }
the >> would seem to prevent it from being treated as Q 18:00
masak cxreg: a bit confusing, since 'lines' already means, 'all the lines from a file/IO' in Perl 6.
pmichaud rakudo: say "Quill" ~~ / 'Q' >> .* /;
p6eval rakudo 2f4733: OUTPUT«␤»
cxreg masak: i know, i was thinking the reverse :/
colomon rakudo: say (1 / 1, 3 / 2, -> $a, $b { ($a.numerator + 2 * $b.numerator) / ($a.denominator + 2 * $b.denominator) } ... *).munch(10).perl
tylercurtis rakudo: say "a\nb\nc".lines;
p6eval rakudo 2f4733: OUTPUT«(1/1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378)␤» 18:01
rakudo 2f4733: OUTPUT«Method 'lines' not found for invocant of class 'Str'␤ in main program body at line 22:/tmp/rCRu0RfXjx␤»
colomon rakudo: say 3363/2378
p6eval rakudo 2f4733: OUTPUT«1.41421362489487␤»
masak tylercurtis: you want .comb(/\N/)
er, .comb(/\N+/)
colomon I thought lines had been re-defined to work on strings?
masak rakudo: say "a\nb\nc".comb(/\N+/).perl 18:02
p6eval rakudo 2f4733: OUTPUT«("a", "b", "c")␤»
colomon rakudo: say sqrt(2)
masak colomon: oh, that sounds familiar. I won't say more then until I've re-checked the spec.
p6eval rakudo 2f4733: OUTPUT«1.4142135623731␤»
18:02 Trashlord left
tylercurtis masak: according to spec, .lines should work. 18:02
masak oh, ok.
colomon rakudo may be lagging.
tylercurtis perlcabal.org/syn/S32/Str.html "our List multi method lines ( Str $input: Int $limit = Inf ) is export" 18:03
pmichaud tylercurtis: that's a recent spec change -- Rakudo hasn't caught up yet.
tylercurtis pmichaud: it looks fairly simple. If I don't forget, I'll submit a patch once I finish with Squaak. 18:05
pmichaud tylercurtis: wfm!
[Coke] rakudo: (1,1, {$^a + $^b} ..100).perl.say 18:12
p6eval rakudo 2f4733: OUTPUT«(1, 1, { ... }..100)␤»
[Coke] rakudo: (1,1, $^a + $^b ..100).perl.say
p6eval rakudo 2f4733: OUTPUT«Lexical '$a' not found␤ in main program body at line 2:/tmp/ssnoDPhh5H␤»
colomon [Coke]: you want ..., not ..
unless you're trying to be eeeeeeevil
[Coke] rakudo: (1,1, $^a + $^b ...100).perl.say
p6eval rakudo 2f4733: OUTPUT«Lexical '$a' not found␤ in main program body at line 2:/tmp/iyDyeWaB2P␤»
[Coke] rakudo: (1,1, {$^a + $^b} ...100).perl.say 18:13
p6eval rakudo 2f4733: OUTPUT«(1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89)␤»
pmichaud masak: (Q bug) that one looks to be a little deep. nqp-rx has the same issue.
masak oh right, it does.
if there's any way I can help...
the poker hand example contains a subtype called Quad. 18:14
I'll see what besides that bug prevents the poker hand example from working properly.
pmichaud after trying (and correctly failing) the term:<quote> subrule, it never tries term:<name> for some reason.
masak ISTR [Coke] got a version of it working on Rakudo.
pmichaud: so, some bug in the grammar-engine part of nqp-rx? 18:15
pmichaud masak: that's how it looks at the moment.
ingy is off to oscon
masak sounds enticing, but I'm not too sure I'd be successful in isolating and fixing the problem. I'm still not too well-versed in nqp-rx development. 18:16
I should be, but I'm not.
[Coke] rakudo: (2, 4, * * * ...1024).perl.say
p6eval rakudo 2f4733: OUTPUT«(2, 4, 8, 32, 256)␤»
masak pmichaud: is there a document somewhere outlining how to re-bootstrap nqp-rx?
pmichaud docs/bootstrapping.pod
masak oh, excellent. 18:17
[Coke] that's a CRAZY PLACE TO PUT THAT DOCUMENT!
masak pmichaud++
[Coke] </alester>
pmichaud [Coke]: I agree -- we should've called it "lib/THIS_IS_NOT_THE_BOOTSTRAPPING_DOCS.pod"
masak builds nqp-rx 18:22
18:23 dakkar joined, pmurias joined
pmurias ruoso, hi 18:24
pmichaud masak: I think I found it. 18:26
masak yay
PerlJam randomly guesses that it was a bizarre interaction with LTM and a token rule.
pmichaud actually, I think the protoregex may be giving up a bit early 18:27
i.e., it's an incorrect goto
masak 不適切なに行く! 18:28
18:28 IllvilJa joined
pmichaud yes, that appears to be it. pmichaud-- 18:28
copy-pasta error
masak pmichaud: I have a ++ for you once it's fixed. :) 18:29
jnthn (putting pasta in the copier)--
Aha! 1 out of 4! 18:30
jnthn starts to strike down the LTA errors moritz_++ flagged up as important
PerlJam Smite them jnthn++! Smite them! :) 18:31
pmichaud pmichaud@plum:~/nqp-rx$ ./nqp 18:32
> class Quill { }; Quill.new; say('alive');
alive
PerlJam is full of problems and no solutions today and so feeling very unproductive :(
pmichaud PerlJam: ...and yet a person like you would be R*'s primary target
:-)
masak pmichaud++ 18:33
pmichaud now to run lots of tests
jnthn ergh, I just wrote one patch I like lots and one I hate 18:34
jnthn ponders
pmurias ruoso: i release mildew and smop on CPAN today
masak jnthn: merge them, and it'll be a patch you'd go "meh" about :P
jnthn masak: :P
PerlJam masak++
[Coke] I was just trying to explain Whatever to a perl5 programmer and failed miserable. sadly the book has no reference to Whatever yet for me to cheat and fall back to. 18:35
tylercurtis pmurias++ ooh... did that involve making STD more convenient to use?
pmurias what do you mean by more convenient 18:36
? 18:37
arnsholt Arglebargle!
blogs.perl.org returning 500 when I save my entry is no fun >.<
pmurias it's installable, but the executables a user might try to use are not in the dist
[particle] whatever is a dwimmy term 18:38
pmurias tylercurtis, but there isn't a reason why they can't if you people specify what they need
18:38 mmcleric joined
masak arnsholt: the term 'argle-bargle' goes all the way back to 1872, according to Merriam-Webster. I didn't learn it until just a moment ago. :) 18:38
arnsholt ORLY? Fun =D
masak arnsholt: did you lose the post?
tylercurtis pmurias: frankly, I don't remember what my inconveniences were last time I tried, other than the hard-coding of the path to perl, but I think au|zzz++ fixed that.
arnsholt No, thankfully Opera saves form data in case you want to go back to the form 18:39
pmurias tylercurtis, what do you want to use STD for?
masak arnsholt: you shouldn't write important stuff in web browser forms. it limits the soul.
arnsholt True, true
masak use a real editor!
:) 18:40
arnsholt Yeah. Anyways, it's up now (blogs.perl.org/users/arne_skjaerhol...ng-1.html)
[particle] like vimperator?
masak [particle]: arglebargle!
arnsholt Now I just need to figure out what I want for dinner. Sushi or crêpes...
pmichaud why not both? ;-P 18:41
masak crushi!
arnsholt [particle]: I want to try vimperator, but I'm an Opera man =)
Crushi sounds... interesting, to say the least ^^
But I had sushi for lunch, so I think it'll be crêpes
tylercurtis pmurias: Bennu. My I'll-eventually-get-around-to-supporting-more-than-"my $a = 5; say 5;" Perl 6 to LLVM compiler. Which currently uses Yapsi's parser but eventually, I'll probably want to switch over to using STD, since the stuff a Perl 6 interpreter in Perl 6 will want to implement early on and the stuff a native-code-ish compiler will want to implement early on doesn't seem like particularly overlapping sets. :) 18:42
arnsholt Crêpes has the advantage of cidre as well...
masak arnsholt: in my YAPC::EU talk about parsers, I want to say that regexes and Prolog live in the same control-flow paradigm. do you agree?
dalek p-rx: 5725781 | pmichaud++ | (2 files):
Fix protoregex bug with classnames beginning with Q.
p-rx: 11cd811 | pmichaud++ | src/stage0/ (4 files):
Update bootstrap.
pmurias tylercurtis, mberends started writting a Perl 6 to LLVM compiler 18:43
[particle] ooh, a local sushi place here has an awesome roll wrapped in a crepe
arnsholt masak: Absolutely. Writing parsers is very intuitive in Prolog, since so many of the concepts that are hairy to get right in imperative languages are built into the language
pmichaud this does not look good: twitter.com/oscon/status/18932923628
arnsholt Unification and backtracking play well with parsing
[Coke] arnsholt: 'twould be helpful to have a link to whatever "parrotlog" is. 18:44
jnthn omnomnom wireless
masak arnsholt: I wonder what unification translates to in the regex world...
[Coke] ah. guessing prolog on parrot.
18:44 lue left
pmurias masak, local? 18:44
pmichaud and, of course, the conference hasn't really started yet.
arnsholt [Coke]: It's my Prolog on Parrot project. See (almost) all the other posts on that blog, and github.com/arnsholt/parrotlog 18:45
pmurias arnsholt, what's a prolog usefull for?
masak pmurias: oy, you'd have to elaborate that point. I'm guessing it's a tentative answer to my question, but I don't see what you're referring to.
arnsholt masak: Good question =)
[particle] don't the oscon attendees know the world cup is over?
tylercurtis phenny: ask mberends pmurias tells me you started work on a Perl 6 to LLVM compiler at some point. How far did you get? Still working on it at all? Is it available somewhere? 18:46
phenny tylercurtis: I'll pass that on when mberends is around.
pmurias vill
18:46 macroron left
arnsholt pmurias: Good question, to some degree. I for one just find the language appealing (the concepts are quite cool) 18:46
masak tries to think of a pun somewhere between "world bup" and "smashed cup"
arnsholt The backtracking and unification are quite useful for certain things as well
[Coke] pmichaud++ #that's been bugging me for some time.
pmurias masak, unification in prolog is a bit like assignment 18:47
pmichaud locally
pmichaud@plum:~/rakudo$ ./perl6
> class Quill { }; Quill.new; say 'alive';
alive
>
masak pmurias: ah, yes. maybe it's like Perl 6's "let"?
pmichaud: \o/
pmurias only it gets reverted on backtracking (that's why it's like perl5 local)
masak, plus it has pattern matching thrown in
masak doubt 'local' would revert on backtracking.
arnsholt Unification isn't really assignment though. Remember that Prolog is declarative
masak it's the whole point of 'let', though.
pmurias arnsholt, in theory 18:48
tylercurtis pmurias++ thanks, I'll have to look at that.
pmichaud pushed as cd2d123
pmurias with cut and taking in account performance it tends to be highly imperative
arnsholt True. I think of it more like a constraint "these two somethings have to have the same structure"
[Coke] pmichaud: anything else planned to squeeze into nqp-rx in parrot before the release? 18:49
arnsholt nom &
dalek kudo: cd2d123 | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION to get fix for Q-named classes. Fixes RT #74276.
masak pmichaud++
pmichaud [Coke]: the only thing I can think of that might want fixing is escapes in enumerated character lists, like <[\x00..\xff]>. But I doubt that's going to happen before tomorrow. 18:50
[Coke]: at any rate, I don't have anything else I plan to squeeze into nqp-rx, unless I find something on the plane tonight. 18:51
[Coke] hokay. ping me if you need me to hold the release.
pmichaud will do.
[Coke] ... because I'll be doing it late anyway, that probably won't matter. =-)
pmichaud any estimate on time-of-day for release?
jnthn nom shop & 18:53
[Coke] pmichaud: probably after 10pm eastern.
masak would anyone like to add github.com/pmichaud/io-prompter to pls's poc-projects.list ?
pmichaud [Coke]: okay, wfm. I should be able to give plenty of notice if I think we need a hold. But a hold is very unlikely at this point. 18:54
[Coke] rogerroger.
pmichaud I'm sure io-prompter needs some love, too.
I'd be fine if someone forked it to work on it and let pls point there. :-) 18:55
or pull requests are welcomed.
[Coke] pmichaud: ... did you just ask for PULL REQUESTS? ;) 18:56
pmurias tylercurtis, what do you need for your perl 6 to llvm compiler? if you were intrested in making it a mildew backend i could help with that
pmichaud [Coke]: yes, that's a small enough project that I think I could figure it out.
masak there are some instances of '*>0' in the demos. that works, but would look nicer with some spacing-out, IMHO.
pmichaud yeah, '*>0' looks like a cyclops that just had a finger poked in its eye. 18:57
masak :P
pmichaud [Coke]: besides, chromatic++ has spoken favorably of github's fork queue (iirc), so I'm thinking it must have some merit after all. 18:58
masak hah, it's alpha code :P
masak feels better now about Druid, November, and a few other projects 18:59
pmichaud yes
didn't I mention that IO::Prompter currently only runs with alpha?
I told Damian that someone would likely bring it up-to-date to master :)
masak oh my God, it's full of comments!
sorear good * #perl6
masak TheDamian++ 19:00
19:00 stkowski joined
sorear pmichaud: Is Rakudo's lack of Parcel ~~ Associative a NYI or specfossil? 19:00
pmurias solarion, hi
sorear, hi
pmichaud I suspect specfossil. I don't think Parcel ~~ Associative
masak yes, someone should adopt IO::Prompter.
pmichaud I'll adopt it on Wednesday if nobody beats me to it :) 19:01
tylercurtis pmurias: I'm not really familiar enough with mildew to know what that would involve or whether the result would be in line with my goals for Bennu(exploring the ability to compile Perl 6 to native code, compact structs/arrays, native types, and also playing around with the object system from the P&W paper).
pmurias P&W?
tylercurtis pmurias: tinyurl.com/23dfwut or piumarta.com/software/cola/objmodel2.pdf for the original pdf. 19:02
ruoso pmichaud, sorear, Parcel !~ Associative... it's the Capture that implements the Associative 19:03
pmichaud ruoso: I agree.
ruoso TimToady said so some day here in IRC
19:04 ashleydev joined
pmichaud I keep thinking I'm forgetting something for my trip.... :-( 19:05
PerlJam pmichaud: as long as it's not something you have to spend significant energy recreating, you'll be fine :) 19:06
sorear ruoso: how does Parcel remember the difference between (1,:a<b>) and (1,(:a<b>))? They make different captures
ruoso (1,(:a<b>)) contains another level of parcels 19:10
pmichaud ruoso: not under current spec.
ruoso in fact, if you turn (1,(:a<b>)) into a capture, it turns it into two positionals
pmichaud, ok... I might be outdated... what changed?
pmichaud infix:<,> creates a parcel 19:11
parens don't create a parcel
ruoso ok... that is not new... it was a brain failure on my part...
but it does make some difference,
otherwise (1,:a<b>) and (1,(:a<b>)) would be different
*wouldn't
and they are
pmichaud ruoso: agreed -- there some spec sloppiness there.
ruoso I think at some point it was accepted that (1,(:a<b>)) was a special construct 19:12
I mean... having extra parens
jnthn We could handle it syntactically.
sorear yes
it's syntactic
ruoso ((((1)))),2) is not the same as (1,2)
jnthn But that relies on us promoting parcels to captures syntactic.
sorear but that's not my point
jnthn Which is fine 19:13
sorear I said "how remembers" not "how parses"
Parcel ~~ List, it doesn'
ruoso jnthn, I think that has been widely accepted
jnthn sorear: Well, you probably needn't construct the parcel
sorear t have bits for "unpackable :<>"
jnthn sorear: Jsut go straight fo the capture.
sorear OK
jnthn gah, typing
That's what Rakudo does
19:13 fglock joined
pmichaud jnthn: can one always go straight for the capture? 19:13
jnthn No point making something you're only going to throw away.
ruoso fglock, howdy fglock... long time no see....
jnthn pmichaud: I don't know any situation where not.
pmichaud (1, (:a<b>)).Capture
fglock ruoso: hi! 19:14
jnthn pmichaud: If you do that, you've constructed a Parcel and coerced it.
pmichaud: That's going to have a named arg
ruoso pmichaud, jnthn, you can go straight for the capture when it's sintatically known that is being used as a Capture
tylercurtis pmurias: really the only thing I'm blocking on is tuits. Once GSoC is over, I expect to be able to get around to designing a more LLVM-suitable intermediate format, cleaning up my codegen, switching over to STD, etc. I'll have to remember to look at the CPAN dist for Mildew when it comes to that last one. At that point I might have some actual concrete questions for you.
jnthn pmichaud: My point was more than if a call, you know you're compiling a call, so you never emit code that builds a Parcel and coerces it. Just emit code that creates the (correct) Capture. 19:15
*more that if you have
pmichaud jnthn: yes, I know that part.
I'm just wondering if it works in general.
sorear jnthn: calls are easy! I'm talking about Parcel objects
jnthn sorear: you mean if you have a Parcel, and later .Capture it?
sorear (1, (:a<b>)).Capture # This should have 2 positionals. How is this implemented?
ruoso Parcels remember how they were built in terms of the syntax
jnthn sorear: It won't.
That's just crazy.
ruoso jnthn, it will have 2 positionals... yes... 19:16
jnthn ruoso: nO.
*No
ruoso it's how you send a pair as the second argument
jnthn That's insane.
ruoso (it has been so in the spec for a long time)
jnthn ruoso: It's a special syntactic construct in the case we have a call.
ruoso: That may be, but I really don't think it holds up.
pmichaud jnthn is saying that arglist and semilist are different from normal expressions
ruoso I see... I see....
jnthn Otherwise our Parcel objects need to carry around a bunch of extra meta-data. 19:17
ruoso but I'm pretty sure that was the intention
fglock rakudo: my @a = []; my %h = {}; say @a.perl, " ", %h.perl
p6eval rakudo 2f4733: OUTPUT«[[]] {}␤»
19:18 mmcleric left, felliott joined
pmurias fglock, hi 19:18
tylercurtis, what's your gsoc project?
pmichaud hmmm
jnthn ruoso: Perhaps so, but it feels...so wrong.
pmichaud I'm thinking my %h = {} should've blown up.
fglock pmurias: hi! I saw the cpan release announce
pmurias hopes the tarballs work on other peoples boxes 19:19
ruoso jnthn, I think the idea is that it should be easily optimizeable depending ont he situation
fglock pmichaud: it seems a little odd that the hash assignment works, but the array assignment does something different
dalek kudo: 21d67d5 | jonathan++ | src/Perl6/BacktracePrinter.pm:
Instead of starting to make a list of 'ignore this frame' for the backtrace

its purposes. Then it's just one thing to check.
kudo: b62db16 | jonathan++ | src/builtins/control.pir:
Mark die and warn as being invisible to the backtrace printer.
kudo: c0df20c | jonathan++ | src/metamodel/Attribute.nqp:
Mark attribute accessors as invisible frames so the errors give the line number
masak pmichaud: I agree that it should probably blow up.
jnthn fglock: It's more like the array assignment is correct, I think.
pmurias ruoso, so the next thing would be packaging the p5 interop as SMOP::P5::Interop 19:20
masak fglock: the array assignment is the co... what pmichaud++ said.
pmurias ?
fglock rakudo: my @a = [123]; my %h = {a => 123}; say @a.perl, " ", %h.perl
tylercurtis pmurias: PAST optimizations for Parrot. Well, now, it works for anything that's a descendant of Parrot captures, but PAST(and to a lesser extent, POST) is the primary focus.
p6eval rakudo 2f4733: OUTPUT«[[123]] {"a" => 123}␤»
jnthn Dinner time, another moritz_ LTA ticket later afterwards. :-)
fglock nice - thanks!
pmurias fglock, you're now working on a python backend for perlito? 19:21
fglock pmurias: I'm curious about the cpan upload, I'll take a look later 19:22
pmurias: it's now released as Perlito 5.0
ruoso pmurias, hmmm... isn't the SMOP cpan release missing?
fglock it is bootstrapped in Python
pmurias checks
19:22 plainhao left
pmurias reboots to type dzil release 19:23
ruoso, strange i have a pause indexer report in my mail inbox 19:25
ruoso ok.. it might be just the cpan mirrors...
your cpan home doesn't have a SMOP releas
fglock hmm - I was happy with @a = [] and %h = {} ...
ruoso fglock, my @a = (); is what you meant 19:26
pmurias ruoso: www.cpan.org/modules/by-authors/id/...0.3.tar.gz
perigrin since I don't feel comfortable speaking for the Perl6 community, if someone who does can give me some feed back on
fglock yes, but miniperl6 doesn't implement lists
perigrin skitch.com/perigrin/dpg6t/fullscreen
I would like to hand them out at OSCON.
fglock I'll need something like @([]) 19:27
ruoso fglock, well... my $a = []; also does what you mean
19:27 pmurias left
pmichaud rakudo: my @a = @([]); say @a.perl; 19:27
p6eval rakudo 2f4733: OUTPUT«[]␤»
fglock yup
ruoso rakudo: my @a = [].list(); #wild guess 19:28
19:28 cono left
p6eval rakudo 2f4733: ( no output ) 19:28
pmichaud perigrin: I'd like some of those cards :)
ruoso rakudo: my @a = [].list(); say @a.perl #wild guess
p6eval rakudo 2f4733: OUTPUT«[]␤»
ruoso perigrin, it's cute... 19:29
fglock my @a = @([123]); say @a.perl
pmichaud I saw earlier versions of the cards at yapc::na
fglock list() is not the same as @()
19:29 pmurias joined
pmichaud so the others I have say something like '2Q 2010' 19:29
ruoso pmurias, ok... the cpan mirror I'm seeing is out-of-sync... but the cpan shell finds it 19:30
perigrin pmichaud: if you're here I can get you some hot off the press
pmichaud perigrin: I'll be there tonight at 23h00 :-)
perigrin as soon as I find a press
pmichaud so can I grab some tomorrow or Wed?
perigrin yep
pmichaud \o/
perigrin they'll be at the TPF booth if you're kosher with them
pmurias ruoso: cpan shell? you don't use cpanm?
pmichaud Very much so.
19:31 hercynium left
perigrin sweet 19:31
ruoso pmurias, I'm slow at changes ;)
perigrin pmichaud: I think the Q2 2010 cards were before y'all set the July 29th date ... if you'd like I can revert back to Q2 but it looks reasonably like you'll hit your deadline :) 19:32
mathw Eveniniggle
pmichaud perigrin: right, I understand about the Q2 2010. Missing that date is entirely my fault :-)
perigrin you can't control health issues
pmichaud I like the July 29, 2010 date very much. And yes, we'll hit it.
I just also like that I have some cards that have the earlier date :) 19:33
perigrin :)
pmurias ruoso: so how's the installation going?
ruoso fine... I got lots of "v-string in use/require non-portable at..."
but that's just warnings 19:34
pmurias that warning was removed in newer perls 19:35
ruoso "cannot open unicode maps from ./lib . : Arquivo ou diretório não encontrado"
pmurias as it's a "you are using modern syntax" warnings
ruoso that breaks at Mildew::Setting::SMOP install
pmurias that's bad
STD-0.01?
ruoso er... "Arquivo ou diretório não encontrado" means "file not found" 19:36
arnsholt Archive or directory not found, I think
pmurias i've seen that warning before
error
ruoso perl -MSTD -E 'say $STD::VERSION' fails as well
fglock rakudo: my $x; say $x 19:37
p6eval rakudo 2f4733: OUTPUT«Any()␤»
ruoso pmurias, STD 0.01, yes...
pmurias STD-0.02 is the right one
fglock hmm - it used to be an empty string 19:38
ruoso oh... ok...
pmurias audreyt (now au) fixed that bug
ruoso it's not indexed yet, it seems...
I'll grab the newest version by hand then
pmichaud well, time to afk and head in the general direction of the airport
19:38 ive joined
ruoso pmurias, hmm... STD-0.02 is an ** UNAUTHORIZED RELEASE ** 19:39
that's why the client got 0.01
pmurias STD-0.01 is one two
* too
** UNAUTHORIZED RELEASE ** is a warning that we are using the STD package name 19:40
and it's used by something else 19:41
search.cpan.org/~azawawi/Syntax-Hig...erl6-0.81/ likely 19:42
ruoso hmm... it's probably a good idea talking to azawawi to fix it...
otherwise the installation fails
jnthn back 19:43
pmurias: Safe flight! :-)
pmurias s/pmurias/pmichaud/
ruoso: STD-0.01 is an UNAUTHORIZED RELEASE too 19:44
jnthn perigrin: Those look nice. :-)
pmurias ruoso: but we surely should have an ugly warning on our module
* shouldn't
ruoso: did STD-0.02 help? 19:45
ruoso yes... 19:46
19:46 mberends joined
ruoso having the entire setting in a single file makes the build faster? 19:46
pmurias there was a bit of tricky inter dependencies that i solve by having it all in a big file 19:47
ruoso: i think it makes the build slower
as something wrong is going on in mildew when compiling the setting 19:48
ruoso alright... it's not very problematic...
ok... I have mildew working now...
from CPAN...
that's awesome
pmurias, now P5 interop...
which whould probably include the p5 module for using smop as well 19:49
mathw Are yo usupposed to be able to have a class called A inside a module called A?
ruoso mathw, yes... but then you have A::A
jnthn mathw: Rakudo is generally not clueful about nested packages. 19:52
sorear pmurias: what did the mail you got from the CPAN Indexer say?
ruoso pmurias, and after p5 interop... "use v6-mildew"
mathw jnthn: I'm well aware of that :)
PerlJam I thought classes and modules and packages all shared the same namespace 19:53
ruoso PerlJam, they do...
he said A inside A
then it's A::A
PerlJam oh, I seemed to have skipped "insize"
er, "inside"
mathw :) 19:54
ruoso pmurias, one question... does the SMOP.pm module depends on the p5 interop features?
pmurias fglock: if we would like to support multiple backends for v6 what would be the best way to do that?
ruoso or can it be one-way at first?
pmurias ruoso: you mean the old SMOP module 19:55
ruoso pmurias, yes... the "use SMOP objects in p5" one
or is that outdated?
pmurias by p5 interop features you mean the p5 module in smop
19:55 cono joined
ruoso pmurias, yes 19:55
pmurias ruoso: i think it's been warped into a helper thing for doing eval_perl5 19:56
fglock pmurias: maybe possible to - use v6-alpha 'backend_name';
19:56 hanekomu_9 joined
fglock or an env setting 19:56
pmurias fglock: what i meant more is to support use v6-mildew 19:57
19:57 sundar left
fglock yes - we need to split v6.pm / Pugs::Compiler::Perl6, and then allow a way to specify the backend 19:58
pmurias v6.pm could delegate the import call to v6::alpha or v6::mildew 19:59
19:59 pyrimidine joined
pmurias or v6-perlito 19:59
* v6::perlito
fglock there is no import call, if I remember
it generates a .pmc and executes that
you need to specify the backend before compilation... 20:00
pmurias Module::CompileV6 has an import sub
ruoso what pmurias meant was to take what's currently in v6.pm and move to v6::alpha
fglock so probably an env variable
ruoso then have v6.pm simply choosing the appropriate backend 20:01
by the v6-something like
fglock yes - I wonder how to do that
pmurias backend meaning the compiler here
ruoso: would it make sense for mildew to use .pmc files?
ruoso pmurias, yes... considering we can build a .so with the code and load it 20:02
we would build a .so and the .pmc to load the .so
pmurias why do we need the .pmc
?
ruoso to avoid having to decide anything in runtime 20:03
fglock pmurias: I think Module::CompileV6 is only used for cpan install 20:04
hmm - can't find v6-alpha in pugs/ 20:05
ruoso pmurias, where is that list of spectests mildew-smop supports? 20:08
fglock pmurias: the code change probably should be in v6::pmc_compile() 20:11
sleep & 20:14
mathw argh 20:15
I don't seem to be able to use a class in another module at the moment
not even a module inside another module
20:15 fglock left
mathw :( 20:15
still a nested package I suppose 20:16
Is that on the list for R*?
tylercurtis rakudo: module A { module B { sub f { say 1; } } }; A::B::f; 20:17
p6eval rakudo 2f4733: OUTPUT«Can not find sub A::B::f␤ in main program body at line 1␤»
tylercurtis rakudo: module A { module B { sub f { say 1; } } }; A::B; 20:18
p6eval rakudo 2f4733: OUTPUT«Can not find sub A::B␤ in main program body at line 1␤»
mathw yup, see, broken
tylercurtis rakudo: module A { our module B { sub f { say 1; } } }; A::B::f;
p6eval rakudo 2f4733: OUTPUT«Can not find sub A::B::f␤ in main program body at line 1␤»
tylercurtis rakudo: module A { our module B { our sub f { say 1; } } }; A::B::f;
p6eval rakudo 2f4733: OUTPUT«Can not find sub A::B::f␤ in main program body at line 1␤»
tylercurtis rakudo: module A { module B { sub f { say 1; } } }; B::f; 20:19
p6eval rakudo 2f4733: OUTPUT«Can not find sub B::f␤ in main program body at line 1␤»
jnthn mathw: Probably not
mathw: I don't want to hack it in
mathw: alpha always had an awkward handling of it that never quite worked.
mathw aaawww
that's going to bite a lot of people unfortunately 20:20
now how could I do Form without that
jnthn You can still declare class A { ... }; class A::B { ... } I think?
tylercurtis jnthn: Yes.
jnthn Just not nesting like class A { class B { ... } ... }
So it's "just" a little code shuffling. 20:21
mathw umm
inside a module??
tylercurtis And pain if you rely on lexicals from module A in B.
jnthn tylercurtis: True
mathw could just smash everything together in one .pm file he supposes
20:21 donpdonp left
mathw woo 20:22
module A; class A::B {} lets me use A::B outside the module
that's all I need
tylercurtis mathw: Why do you have a Form::Actions module at github.com/mattw/form/blob/master/l...Actions.pm that just contains a FormActions class? Why not just have a Form::Actions class? 20:24
mathw eh? 20:25
20:25 justatheory joined
tylercurtis mathw: You have a module Form::Actions declaration at the top of the file, but all the file contains is a FormActions class. Same for Form::Grammar and grammar Format in lib/Form/Grammar.pm 20:26
mathw yes 20:27
moritz_ that was probably from back-in-the-days when :: in class names had several problems 20:28
mathw I don't understand what the problem is
Or what an alternative would be
But I am quite tired at the moment 20:29
so my brain isn't really functioning at full speed
moritz_ just that in a file Foo/Bar.pm, you usually expect class Foo::Bar, not class FooBar 20:30
mathw but Foo/Bar.pm is the module Foo::Bar
tylercurtis mathw: or the class.
mathw ... 20:31
oh
see I told you I'm tired
tylercurtis mathw: Or even nothing related to Foo::Bar except that that "use Foo::Bar" is the way to load it.
But that last one might be a little impolite. 20:32
mathw it would be surprising
I'm already polluting namespaces like crazy to work around the nested modules lack 20:33
makes me feel slightly dirty
although the coat of sweat and mat dust from aikido is helping
20:34 dual left
tylercurtis So, for those files, you can fix the problems with nested modules by just doing "class Form::Actions;" or "class Form::Actions::FormActions;" for Form/Actions.pm and "grammar Form::Grammar;" or "grammar Form::Grammar::Format" for Form/Grammar.pm 20:34
masak rakudo: perl6 -e '(for 1 {}).WHAT'
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Confused at line 22, near "perl6 -e '"␤»
masak arglebargle.
rakudo: for 1 {}).WHAT 20:35
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Confused at line 22, near ").WHAT"␤»
masak :(
rakudo: (for 1 {}).WHAT
p6eval rakudo 2f4733: ( no output )
masak rakudo: say (for 1 {}).WHAT
p6eval rakudo 2f4733: OUTPUT«ParrotIter()␤»
masak someone seems to have cast a "-10 dexterity" spell on me.
moritz_ rakudo: say (for 1 { }) ~~ Nil
p6eval rakudo 2f4733: OUTPUT«1␤»
masak rakudo: say (for 1 {}).perl 20:36
p6eval rakudo 2f4733: OUTPUT«()␤»
masak in my view, we can close rt.perl.org/rt3//Public/Bug/Display...l?id=70888
20:36 dual joined
mathw is really liking ufo right now 20:36
masak I'm surprised that we're seeing something called "ParrotIter" here, but the original bug is gone.
jnthn masak: It should be List in the end 20:37
I guess
tylercurtis mathw: for Form/Field.pm, you could either replace each "our class Field {...}" and such with "class Form::Field::Field {...}" or separate them into Form/Field/Whatever.pm and have Form/Field.pm just "use" the Form::Field::Field and such.
jnthn masak: Should get fixed "for free" when we switch for to map
moritz_ masak: feel free. We have sufficient test coverage for using the return value of empty statements
jnthn: not Parcel?
masak closes bug
jnthn rakudo: (1,2,3).map(1 + *).WHAT.say 20:38
p6eval rakudo 2f4733: OUTPUT«List()␤»
jnthn moritz_: Rakudo says not ;-)
moritz_ jnthn: I believe it (but not you!) :-)
masak rakudo: sub foo { for 1,2,3 {} }; say foo.WHAT 20:39
jnthn moritz_: I has a fix for a second of your LTAs. :-)
p6eval rakudo 2f4733: OUTPUT«ParrotIter()␤»
jnthn moritz_: Might be able to pick off a third one tonight too. 20:40
moritz_ \o
though my main concert wrt error message is this:
rakudo: 1 1
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Confused at line 22, near "1 1"␤»
moritz_ std: 1 1 20:41
p6eval std 31767: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/7ySXdbImNs line 1:␤------> 1 ⏏1␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Parse failed␤FAILED 00:01 115m␤»
moritz_ rakudo: }
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Confused at line 22, near "}"␤»
moritz_ std: }
p6eval std 31767: OUTPUT«===SORRY!===␤Confused at /tmp/7NnHfvRdie line 1:␤------> <BOL>⏏}␤ expecting statement list␤Parse failed␤FAILED 00:01 112m␤»
moritz_ he, also confused :-)
jnthn lol
Well, we can only do so much. :-)
moritz_ anyway, the OPP doesn't really emit awesome error messages
jnthn No
moritz_ like "two terms in a row", or "found infix where prefix or term expected" or so 20:42
masak whoz OPP?
moritz_ operator precedence parser
20:42 jnthn sets mode: +o masak
jnthn masak's OPP! 20:42
masak is OPP o/
moritz_ btw our current level of spam is so low that we don't need to be ops here all around
20:43 moritz_ sets mode: -o moritz_
[Coke] jnthn: that is so not what "OPP" means. :P 20:43
at least, not the OPPs with which I am down.
masak rakudo: sub foo($b) { $b == 42 }; subset FortyTwo of Int where &foo; say 42 ~~ FortyTwo
p6eval rakudo 2f4733: OUTPUT«Could not find sub &foo␤ in <anon> at line 1:/tmp/NRenBwYA6C␤ in 'Block::ACCEPTS' at line 5401:CORE.setting␤ in 'ACCEPTS' at line 988:CORE.setting␤ in 'infix:<~~>' at line 397:CORE.setting␤ in main program body at line 22:/tmp/NRenBwYA6C␤»
masak hm.
rakudo: our sub foo($b) { $b == 42 }; subset FortyTwo of Int where &foo; say 42 ~~ FortyTwo 20:44
p6eval rakudo 2f4733: OUTPUT«1␤»
20:44 Martin___ joined
masak rakudo: our sub foo($a, $b) { $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo 20:44
jnthn [Coke]: You down with this OPP? www.youtube.com/watch?v=qmuFlaFYdgE
p6eval rakudo 2f4733: OUTPUT«0␤»
masak heh. now it doesn't die, but it gives the wrong answer...
masak adds that to rt.perl.org/rt3/Ticket/Display.html?id=70890 20:45
jnthn masak: "progress" :-)
masak jnthn: yes, even sans quotes. jnthn++
jnthn I'm a tad curious why it does nee work.
masak: oh er 20:46
Juerd feather3 is back
Enjoy :)
masak jnthn: insight?
Juerd++
jnthn masak: It...might be putting that assuming call into a block.
or thunk
20:46 timbunce joined
jnthn And doing it each time. 20:46
moritz_ Juerd: uhm, did you log in?
jnthn our sub foo($a, $b) { $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo; say 42 ~~ FortyTwo; 20:47
Juerd moritz_: No
masak Juerd: huh. november-wiki.org/ is still alive. how'd that happen? :)
jnthn rakudo: our sub foo($a, $b) { $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo; say 42 ~~ FortyTwo;
moritz_ ah, the old fun: PTY allocation request failed on channel 0
p6eval rakudo 2f4733: OUTPUT«0␤0␤»
Juerd masak: That's feather1
jnthn Hmm, maybe not or I'd expect an error
Oh
masak ahahah
jnthn unless it's arity 0
Juerd masak: Ooh, nice errors
I'll upgrade udev :)
jnthn rakudo: our sub foo($a, $b) { say "unicorn!!! \o/"; $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo; say 42 ~~ FortyTwo;
p6eval rakudo 2f4733: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\o' at line 22, near "/\"; $b == "␤» 20:48
masak Juerd: guessing you meant moritz_.
jnthn ...fail
rakudo: our sub foo($a, $b) { say 'unicorn!!! \o/'; $b == 42 }; subset FortyTwo of Int where &foo.assuming(0); say 42 ~~ FortyTwo; say 42 ~~ FortyTwo;
Juerd masak: Yes, tabfail.
p6eval rakudo 2f4733: OUTPUT«0␤0␤»
jnthn Nope, it never calls it.
oh well
Oh!!
masak: I bet it's that assuming doesn't return something that isa Block
masak: bugs. lots of bugs. 20:49
mathw hmm
jnthn masak: I also just spied a spectest that fails if you'd made that a my sub too...
mathw slightly wrong, that
oooooh
masak adds all this to the ticket 20:50
mathw the {*} #= key thing doesn't work anymore does it
moritz_ it works, but it's gone from the spec
jnthn needs a little typing break, bbiab
masak mathw: don't use it :)
mathw well it's looking to me like it doesn't
masak: Form already did use it
masak mathw: well, stop using it :P
mathw wasn't looking to rewrite without it today...
but it does look like it's stopped working
masak don't think of it as a rewrite. think of it as a correction. :)
mathw action methods are short one parameter where that parameter happens 20:51
jnthn mathw: Are you sure that the problem isn't just the impicit call at the end of the block also happens?
mathw: That is, you get one more call than you expected?
mathw oh
maybe
jnthn worth checkin'
mathw I don't think I fix that nay differently though
unless I add an overload which doesn't do anything 20:52
Juerd moritz_: Fixed
jnthn Make the parameter optional and check if it's defined
jnthn really afk for typing break
mathw oh good plan
go have your break
moritz_ Juerd++
works
20:54 pugssvn joined
pugssvn r31757 | pmurias++ | [mildew] renamed AST:: to Mildew::AST 20:54
r31758 | pmurias++ | [mildew] [smop] tweaks to get $VERSION correct
r31759 | pmurias++ | [mildew-setting-smop] fix a typo in dist.ini
r31760 | pmurias++ | [STD] fix a bug found by au++
r31761 | pmichaud++ | [t/spec]: fudge a test in try.t due to reverting exception handler in Parrot
r31762 | audreyt++ | * Now that we have STD.pm on CPAN, ensure "make" always works with the inplace STD.pm.
r31763 | audreyt++ | * Remove the the unneeded "-w" in try5_post's #! line.
r31763 | * Make ./tryfile use the inplace STD.pmc too.
r31764 | pmurias++ | [mildew][smop][STD]
r31764 | bump version
r31764 | fix mangle.pl installating (found and fixed by au++)
r31764 | update mildew to use {YOU_ARE_HERE}
r31765 | audreyt++ | * Add the same inplace-STD.pmc guard to the main executables. 20:55
r31766 | audreyt++ | * Note the changed path of std_hilite/STD_syntax_highlight in README.
r31767 | moritz++ | [t/spec] unfudge tests for rakudo: Whatever-currying, backtracking into named subrules, and lexical fixes
20:57 Martin___ left
moritz_ rakudo: {nextsame}() 20:58
p6eval rakudo c0df20: OUTPUT«Null PMC access in clone()␤ in <anon> at line 1␤ in main program body at line 22:/tmp/gO8swde_Tp␤»
21:00 lue joined
mathw okay weird stuff happening 21:01
pugssvn r31768 | moritz++ | [t/spec] fudge wrap.t for rakudo, and simplify a bit
mathw going to have to look at this again tomorrow
goodnight!
masak mathw++ # goodnight! 21:02
21:04 ashleydev left
pugssvn r31769 | moritz++ | [t/spec] fudge mixed_multi_dimensional.t for rakudo 21:05
21:06 ashleydev joined 21:09 xabbu42 left
dalek kudo: 981e44e | moritz++ | t/spectest.data:
run two more test files
21:10
pugssvn r31770 | moritz++ | [t/spec] test for RT #74276, names starting with Q
21:11 xabbu42 joined
masak ok, first thing the poker example is failing at is printing the names of the enums. 21:12
rakudo: enum E <a b c>; say b 21:13
p6eval rakudo c0df20: OUTPUT«1␤»
masak what if I want it to print 'b'?
me consults spec.
er,
moritz_ then you need to conform to the spec :-)
masak consults spec
right, it says that nowadays, doesn't it?
21:14 grew joined
masak b.key seems to be what I want. 21:17
so, the next question seems to be: what's an enum object?
std: enum Day { "Sun", "Mon", "Tue" } 21:18
p6eval std 31768: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Day' (see line 1) at /tmp/YUDK394xHc line 1:␤------> enum Day⏏ { "Sun", "Mon", "Tue" }␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at
../tmp/YUDK39…
masak TimToady: ^
TimToady: could easily be less LTA for people who think {} are OK for enums.
moritz_ std: s :g /1/1/ 21:19
p6eval std 31768: OUTPUT«ok 00:01 115m␤»
moritz_ std: my $g = 1; s :$g /1/1/
p6eval std 31768: OUTPUT«===SORRY!===␤Colons may not be used to delimit quoting constructs at /tmp/dYSAx5qxKS line 1:␤------> my $g = 1; s :⏏$g /1/1/␤ expecting colon pair (restricted)␤Parse failed␤FAILED 00:01 117m␤»
21:21 pmurias left, [particle] left
masak no, that does not appear to be the question. the question seems to be: what is it that 'b' yields, that has all these nice properties? 21:22
tylercurtis std: enum Foo { "Bar", "Baz", "Gimle" } 21:24
p6eval std 31768: OUTPUT«===SORRY!===␤Illegal redeclaration of symbol 'Foo' (see line 1) at /tmp/J9a5aI9caH line 1:␤------> enum Foo⏏ { "Bar", "Baz", "Gimle" }␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at
../tmp/J9a5…
masak it needs to be an instance of an anon class subclassed from Int, and with its own .Str, .key, .value, .kv methods, among others. 21:25
PerlJam masak: b isa E
masak PerlJam: right.
but also b isa Int.
21:26 [particle] joined
moritz_ \o/ it seems that pmichaud++'s last nqp-rx fix also made it possible to parse s:g/// 21:27
but currently I haz teh dumb, and can't figure out the action methods
ah well, tomorrow
colomon \o/ 21:28
masak \o/
colomon haz teh dumb and tired
masak jaffa4 will be so happy!
moritz_ yeah, tired too
oh, it seems nqp-rx doesn't like $0 21:29
nqp: say($0)
p6eval nqp: OUTPUT«Confused at line 1, near "say($0)"␤current instr.: 'parrot;HLL;Grammar;panic' pc 552 (src/cheats/hll-grammar.pir:205)␤»
colomon nqp: say($/[0])
p6eval nqp: OUTPUT«Symbol '$/' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:109)␤»
21:29 hercynium joined
masak rakudo: class E {}; sub b { return (class :: is Int is E { method key { "b" } }).new }; say b() ~~ E; say b() ~~ Int; say b.key.perl 21:29
moritz_ better
p6eval rakudo c0df20: OUTPUT«1␤1␤"b"␤»
masak jnthn: I need to do this in the enum thingy. do you think it's easy? :) 21:30
moritz_ just use the cool meta object API
colomon cons! That's the name of the old perl 5 make replacement I was trying to think of the other day....
masak moritz_: do I need to? all I need to do is create that subclass. 21:31
hm, maybe I can do all this in pure Perl 6.
masak looks at the enums source
tylercurtis masak: don't forget about Str valued enums. :)
masak tylercurtis: oh, this is just an example :) 21:32
tylercurtis: think of Int as a parameter here.
moritz_ masak: you don't need to create that subclass, but you need to emit code that creates the subclas
masak moritz_: right.
jnthn: I need to emit code that creates that subclass. :P
moritz_ is so > < close to a hacky :g implementation 21:35
masak I distrust any kind of measurement 21:37
which depends on my font size. :P
moritz_ ./perl6 -e 'my $x = "foo"; $x ~~ s:g/o/u/; say $x'
===SORRY!===
undefined identifier 'Capture'
ah well, not as close as I thought :-)
masak besides, '> <' looks like Cartman's eyes when he's mad. :)
21:38 Guest21067 left
tylercurtis rakudo: class Quox {has $.nu; } my Quox $q .= new(:nu<5>); $q.nu.say; 21:40
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Confused at line 22, near "class Quox"␤»
masak tylercurtis: }; 21:41
tylercurtis rakudo: class Quox {has $.nu; }; my Quox $q .= new(:nu<5>); $q.nu.say;
p6eval rakudo c0df20: OUTPUT«5␤»
tylercurtis masak: oops. I left out the ; after the class.
moritz_ rakudo: quox
p6eval rakudo c0df20: OUTPUT«Could not find sub &quox␤ in main program body at line 22:/tmp/7KTBT0xLP1␤»
moritz_ note that it's not "confused" anymore
masak \o/ 21:42
PerlJam moritz_: sure it is, watch ... 21:43
rakudo: class Q {}; Q.new # ;-)
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Confused at line 22, near "Q.new # "␤»
masak hm.
bug or not?
std: class Q {}; Q.new 21:44
PerlJam rakudo: class R {}; R.new;
21:44 tadzik joined
p6eval std 31770: OUTPUT«===SORRY!===␤Couldn't find terminator . at /tmp/_3dydyElgX line 1 (EOF):␤------> class Q {}; Q.new⏏<EOL>␤Parse failed␤FAILED 00:01 114m␤» 21:44
rakudo c0df20: ( no output )
PerlJam rakudo: class S {}; S.new;
masak ah. no bug.
p6eval rakudo c0df20: ( no output )
PerlJam rakudo: class Z {}; Z.new;
p6eval rakudo c0df20: ( no output )
21:44 ash_ joined
tylercurtis std: class 'foo' { } 21:45
p6eval std 31770: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/jLLDJP9dOE line 1:␤------> class ⏏'foo' { }␤ expecting any of:␤ name␤ trait␤Parse failed␤FAILED 00:01 113m␤»
tylercurtis std: class "foo" { }
p6eval std 31770: OUTPUT«===SORRY!===␤Unable to parse class definition at /tmp/7ikPWoeIh7 line 1:␤------> class ⏏"foo" { }␤ expecting any of:␤ name␤ trait␤Parse failed␤FAILED 00:01 113m␤»
tylercurtis std: class Q {foo} { } 21:46
p6eval std 31770: OUTPUT«===SORRY!===␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/L5w6rPj7Kx line 1:␤------> class Q {foo} ⏏{ }␤ expecting infix or meta-infix␤Undeclared routine:␤ 'foo' used at line
..1␤Pars…
PerlJam It's a bug in both STD and Rakudo IMHO
moritz_ why?
tylercurtis Why shouldn't Q be valid as a class name? 21:47
masak PerlJam: you start the quote with 'Q.' and never end with a '.'
21:47 stkowski left
masak tylercurtis: it *is* a valid class name. 21:47
tylercurtis std: class Q { }
p6eval std 31770: OUTPUT«ok 00:01 114m␤»
tylercurtis ....
tylercurtis thought he had done that.
Ah. Right.
masak :) 21:48
tylercurtis rakudo: class Q { }
PerlJam masak: Sure ... how do I make a new Q though?
p6eval rakudo c0df20: ( no output )
masak PerlJam: you have to be creative.
tylercurtis rakudo: class Q { }; ::Q.new;
p6eval rakudo c0df20: ( no output )
tylercurtis rakudo: class Q { }; ::Q.new; say 'alive'
p6eval rakudo c0df20: OUTPUT«alive␤»
PerlJam I guess it's more of a LTA error message than a bug per se
masak rakudo: class Q {}; say eval('Q').new
p6eval rakudo c0df20: OUTPUT«Q()<0x8451070>␤»
masak PerlJam: yes. 21:49
tylercurtis PerlJam: do something that will prevent it being parsed as a quote.
rakudo: class Q { }; ::Q.new.perl.say;
p6eval rakudo c0df20: OUTPUT«Q.new()␤»
masak PerlJam: do we need an error message for people who happen to create a class Q? :)
maybe we do...
tylercurtis masak: a warning, perhaps.
PerlJam rakudo: class q {}; class qq {}; # there are others :) 21:50
p6eval rakudo c0df20: ( no output )
tylercurtis class s { }; s.new; 21:51
rakudo: class s { }; s.new;
p6eval rakudo c0df20: ( no output )
tylercurtis rakudo: class s { }; s.new.perl.say;
p6eval rakudo c0df20: OUTPUT«s.new()␤»
PerlJam or we accept that these are minor edge cases that should be rare in practice (except for obfuscation contests) 21:52
tylercurtis rakudo: class q { }; q.new.perl.say;
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Confused at line 22, near "q.new.perl"␤» 21:53
PerlJam std: class q {}; q.new;
p6eval std 31770: OUTPUT«===SORRY!===␤Couldn't find terminator . at /tmp/0jhDoqQBPo line 1 (EOF):␤------> class q {}; q.new;⏏<EOL>␤Parse failed␤FAILED 00:01 114m␤»
jnthn back
PerlJam (just making sure std dies like I thought)
tylercurtis std: class s {}; s.new;
p6eval std 31770: OUTPUT«===SORRY!===␤Regex missing terminator (or semicolon must be quoted?) at /tmp/qsXACV5nDS line 1 (EOF):␤------> class s {}; s.new;⏏<EOL>␤Parse failed␤FAILED 00:01 116m␤»
tylercurtis s.new shouldn't work but does in Rakudo. 21:54
jnthn masak: pong
masak: "How is class formed?" :-)
masak jnthn: yes. :)
jnthn masak: I'd imagined more that you'd form a role and mix it into the enum value.
masak hm, that's probably better. 21:55
jnthn masak: Anyway, for forming class glace over Test::Mock since it does that
For role, see operators.pm
masak sounds great. will do.
jnthn masak: line 155
huf q\ .new; seems to work, why? :)
masak huf:
huf++ 21:56
huf breaks up the q.. construct?
PerlJam unspace is our friend :)
tylercurtis std: class q { }; q\ new;
p6eval std 31770: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/20HrJwQHzL line 1:␤------> class q { }; q\ ne⏏w;␤Undeclared routine:␤ 'w' used at line 1␤Check failed␤FAILED 00:02 116m␤»
tylercurtis std: class q { }; q\ .new;
p6eval std 31770: OUTPUT«ok 00:01 114m␤»
jnthn masak: Mixing a role into the enum values maybe ain't too hard, anyway.s 21:57
masak jnthn: this feels very hopeful right now.
21:57 pyrimidine left
jnthn \o/ 21:58
masak jnthn: mind if I change the $do-it-to-me vars to $doee right away? :P
jnthn :P 21:59
masak: Isn't doee a bad spelling of the Dutch for "goodbye"? :-)
masak no, it's a perfectly good made-up English word. 22:00
jnthn Ah, apparently the orrect spelling is "doei" 22:01
22:01 justatheory left, drbean left
tadzik oh. How does eval() work in Perl 6? After the code is compiled to .pbc, is it compiled by rakudo again? 22:02
22:02 ruoso left
dalek kudo: 0b12127 | masak++ | src/core/operators.pm:
[operators.pm] changed parameter name
22:03
jnthn tadzik: It just compiles the string inside the eval
Tene tadzik: The compiled pbc has a string constant (or code to generate a string), and then at runtime, the generated code calls back into the compiler again, passing it the string as input. 22:04
jnthn Well, the string passed to eval
tadzik So, using eval, it's impossible to use the compiled code without having rakudo around?
22:04 dakkar left
jnthn tadzik: It is anyway really, give you also need all the built-ins etc. 22:05
*given
But yes, technically we could separate out the two and have some eval-less Rakudo that was smaller. 22:06
tadzik oh well, it's impossible to compile the Perl 6 code so it would be usable with bare parrot, w/o rakudo?
22:07 xabbu42 left, payload joined, skids left
jnthn tadzik: To some degree yes because you still need all the built-in types, the signature binder, multi-dispatcher, etc, which are part of Rakudo, not part of Parrot. 22:07
tadzik mhm
masak 'night, #perl6 22:11
22:11 masak left
tadzik I feel like porting something to Perl 6. Even if it would be Acme::Meow 22:15
jnthn Go for it! :-) 22:17
Tene tadzik: Do it!
tadzik I thought about something more sophisticated :)
But well, will Acme::Meow get into proto? :P
jnthn If lolsql did... :P 22:18
tadzik ;)
let's see
22:20 justatheory joined
tadzik erm, is <3 a valid variable name? 22:21
maybe I won't rewrite it line-by-line :)
arnsholt std: my $<3;
p6eval std 31770: OUTPUT«===SORRY!===␤Whitespace required before < operator at /tmp/LCSQYcdM_G line 1:␤------> my $<⏏3;␤ expecting escape␤Parse failed␤FAILED 00:01 115m␤» 22:22
tylercurtis std: class Foo { has $.<3; }
p6eval std 31770: OUTPUT«===SORRY!===␤Malformed has at /tmp/BOoVKoHCuM line 1:␤------> class Foo { has $⏏.<3; }␤ expecting twigil␤Parse failed␤FAILED 00:01 115m␤»
huf std: class Foo { has $.❥ } 22:23
tylercurtis .u heart
phenny U+2766 FLORAL HEART (❦)
p6eval std 31770: OUTPUT«===SORRY!===␤Malformed has at /tmp/qfjYLTnVsi line 1:␤------> class Foo { has $⏏.❥ }␤ expecting twigil␤Parse failed␤FAILED 00:01 115m␤» 22:24
huf wut
tylercurtis rakudo: say ('❥' ~~ /<alpha>/).Bool # huf; 22:27
p6eval rakudo c0df20: OUTPUT«0␤»
huf oh of course
tylercurtis tadzik: you could use $!_❥. :) 22:28
tadzik :P
tylercurtis Although I don't think there's a unicode character for ^_^. 22:31
22:31 justatheory left 22:32 justatheory joined, au|zzz is now known as au|irc
au|irc tylercurtis: 〠 is close :) 22:32
lue ohai o/
.u 〠
phenny U+3020 POSTAL MARK FACE (〠)
tylercurtis tadzik: nevermind, that wouldn't work. 22:34
rakudo: my $_❥;
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Redeclaration of symbol $_ at line 22, near "\u2765;"␤»
tylercurtis std: my $_❥; 22:35
p6eval std 31770: OUTPUT«===SORRY!===␤Confused at /tmp/lFzrTHbq5x line 1:␤------> my $_⏏❥;␤ expecting any of:␤ POST␤ bracketed infix␤ constraint␤ infix or meta-infix␤ postfix␤ postfix_prefix_meta_operator␤ shape definition␤
..statement modifier loop␤ trait␤Other potent…
tadzik hmm
search.cpan.org/~foolish/Acme-Meow-...o_a_kitty.
„if not called directly on a kitty, $_ will be checked for a kitty;” Is there a way to do this in Perl 6?
22:38 clintongormley left 22:39 Alias left
jnthn std: "foo" ~~ /(foo)/; say "$0a" 22:40
p6eval std 31770: OUTPUT«ok 00:01 119m␤»
22:40 justatheory left
au|irc rakudo: say my $ପ = my $ෆ = my $Ꙭ = 1; 22:41
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Malformed my at line 22, near "$\ua66c = 1;"␤»
au|irc rakudo: my $ପ ; my $ෆ ;
p6eval rakudo c0df20: ( no output )
au|irc weird. the $Ꙭ form worked on github checkout. 22:42
22:42 snarkyboojum joined 22:43 justatheory joined
tadzik hmm, does perl6 -c work for you? 22:43
22:44 nbrown left
tylercurtis tadzik: I'm not sure. 22:44
tadzik: although even if it's possible, it's somewhat un-Perl-6-ish. 22:45
tadzik: if you want to give milk to the kitty in $_ you can do ".milk"
tadzik tylercurtis: I was thinking if it's possible to emulate the Perl 5 behaviour, from inside the class 22:46
tylercurtis rakudo: class Meow { method milk { say 'Kitty likes milk'; } }; Meow.new.milk;
p6eval rakudo c0df20: OUTPUT«Kitty likes milk␤»
tadzik hmm 22:47
I must be doing something wrong
tylercurtis rakudo: class Meow { our method method milk ($self = $_:) { say 'Kitty likes milk'; } }; Meow.new.milk; 22:48
p6eval rakudo c0df20: OUTPUT«===SORRY!===␤Malformed method at line 22, near "method mil"␤»
tylercurtis rakudo: class Meow { method milk { say 'Kitty likes milk'; } }; $_ = Meow.new; .milk
p6eval rakudo c0df20: OUTPUT«Kitty likes milk␤»
22:50 tadzik1 joined
tadzik1 I was having so much fun I didn't notice my battery dying :) 22:50
anyway, here's my code: wklej.org/id/366612/ 22:51
22:52 tadzik left
tadzik1 now use Acme::Meow; and my $c = Acme::Meow.new gives me "Can not find sub Acme::Meow". What am I doing wrong? 22:52
au|irc "class Acme::Meow"? 22:53
22:53 ive left
tylercurtis tadzik1: that creates a class Me...what au|irc said. 22:53
tadzik1 oh, probably
yay, it works :) 22:54
tylercurtis Hmm... a friend of mine wrote his first Perl 5 scripts today. He had some problems he said should be fixed in Perl 6. "it was too easy / user friendly took most of the challenge out of doing anything" "i didn't have to hunt for obscure functions or libaries really not cool.." lol 22:55
au|irc is tempted to golf "self.is_sleeping" to "$.is_sleeping" (they are synonyms)... 22:56
...but I guess the explicit method form reads more clearly
jnthn au|irc: Think they're not quite synonyms - iirc the latter enforces item context. 22:57
au|irc which, the if() will do anyway 22:58
but yeah, they're not synonyms always :)
jnthn Ah, OK, I hadn't go to reading the code that supplied the context yet. :-) 22:59
jnthn is on a bug hunt
au|irc rock on :D
tadzik1 just let me finish, then patches will be welcome :
:)
(is there a chance that it would be the first module completely ported from Perl 5 to Perl 6? :P) 23:00
jnthn Anyone got opinions on what "$0a" would do? 23:01
At the moment in Rakudo, it dies with a very unhelpful error. I can make it do better things but should it... 23:02
* Die?
* Not interpolate?
* Be like "{$0}a"
?
23:04 meppl left
Juerd will remove /home/*/.ccache from feather1 23:05
23:06 japhb left
Juerd juerd.nl/i/817cfe0661546f4fd40c7af7a91f1180.png # It doesn't remove old files by itself :) 23:06
tylercurtis tadzik1: should the kitty's status be '=-_-=' when $!love is greater than 5 or when it's less? 23:08
tadzik1 tylercurtis: I find it weird, but the Perl 5 version shows this bored face when $!love is > 5
we can change it though, then we will have happier and loved kitties in Perl 6
23:08 tadzik1 is now known as tadzik
au|irc jnthn: "{$0}a" is least surprise imvho 23:09
tylercurtis tadzik: everyone's happier in Perl 6 :) even kitties.
tadzik yeah, that's the way to go :)
we're breaking compatibility anyway ;)
I'll write some tests and push it to GH :) 23:10
jnthn au|irc: I just found I have some discrepancies with STD.pm, trying to sync up with those to see what happens too. :-)
tadzik how do I run tests? I tried 'prove --exec perl6 -r t' like in Advent Calendar, but it's not aware of lib/ then 23:13
tylercurtis tadzik: add lib/ to your PERL6LIB. 23:14
au|irc jnthn: std parses that as "{$0}a" via LTM...
tadzik yeah, works 23:15
jnthn au|irc: Ah, I was wondering which way STD got it as OK. Thanks. 23:17
au|irc glad to help :)
23:20 japhb joined
tadzik rakudo: /=-_-=/.WHAT.say 23:22
p6eval rakudo 0b1212: OUTPUT«===SORRY!===␤Confused at line 22, near "/=-_-=/.WH"␤»
tadzik what needs to be escaped here?
= and -, ok
jnthn do you want to match those chars literally?
/'=-_-='/ is probably neatest if so 23:23
tadzik well, I need to check if a string contains =-_-=
23:23 whiteknight joined
tadzik and thought about smart mathing 23:23
oh, great
but…
rakudo: say 'ok' if /'=-_-='/ ~~ "=-_-="
p6eval rakudo 0b1212: ( no output )
au|irc rakudo: say 'ok' if "=-_-=" ~~ /'=-_-='/ 23:24
p6eval rakudo 0b1212: OUTPUT«ok␤»
tadzik oh
jnthn Smart-match doesn't commute.
au|irc RHS dominates 23:25
jnthn It prefers to work from home.
au|irc ahh so ~~ stands for the telecommuting wires
jnthn saves that mnemonic for when he's next teaching Perl 6 23:26
tadzik rakudo: class foo { method bar { 'asd' } }; my $a = foo.new; $a.can('bar') 23:30
p6eval rakudo 0b1212: ( no output )
tadzik ===SORRY!===
get_string() not implemented in class 'P6Invocation'
why so?
jnthn P6Invocation ain't meant to leak out 23:32
tadzik bug? 23:33
au|irc rakudo: class foo { method bar { 'asd' } }; my $a = foo.new; sau
p6eval rakudo 0b1212: OUTPUT«Could not find sub &sau␤ in main program body at line 22:/tmp/XyveGSBtUG␤» 23:34
au|irc rakudo: class foo { method bar { 'asd' } }; my $a = foo.new; say 'ok' if $a.can('bar')
p6eval rakudo 0b1212: OUTPUT«ok␤»
tadzik duh
au|irc so boolean context works, just not string
jnthn *nod* 23:35
Ah, I remember now...I didn't fix the "list of methods" return part of it 'cus lists were still in flux at that point.
And didn't get to re-visit it since.
ETOOMUCHTODO 23:36
au|irc it's ok. *writes to [email@hidden.address]
23:37 rgrau_ left
tadzik github.com/tadzik/Acme-Meow-perl6 23:37
:)
au|irc tadzik++ 23:38
tadzik my first module ever
jnthn au|irc: Thanks. :)
au|irc tadzik: many more to come, surely :D
tadzik au|irc: thanks :)
I hope so :)
23:38 bkeeler left
jnthn Tssk. So I've now brought Rakudo's grammar closer to STD in a couple of ways (though now I gotta face the spectests)...but sadly it didn't make the "$0a" case any better. 23:39
rakudo: say $
tadzik I was talking about Perl 6 on today's local Perl workshop, guys were pretty excited. We're planning to celebrate rakudo star on the next friday, maybe we will port something more significant then ;)
p6eval rakudo 0b1212: OUTPUT«===SORRY!===␤Confused at line 22, near "say $"␤»
jnthn At least that's gonna have a decent error now
std: say $
p6eval std 31770: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at /tmp/5FOKEYBFOm line 1:␤------> say ⏏$␤Confused at /tmp/5FOKEYBFOm line 1:␤------> say $⏏<EOL>␤ expecting twigil␤Other potential difficulties:␤ Unsupported use of
..b…
23:51 _mpu left 23:56 Psyche^ joined