»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
00:00 mr-fooba_ joined 00:01 mr-foobar left 00:14 wicope left 00:20 LonelyGM joined 00:24 LonelyGM left 00:27 grondilu left 00:36 coffee` left 00:49 LonelyGM joined 00:50 spider-mario left 00:54 sirdancealot joined 00:56 bayprogrammer joined, sirdancealot is now known as koo6
LonelyGM moritz: nice blog post thanks for writing about it :) 00:56
01:01 xiaomiao left 01:02 xiaomiao joined 01:07 bjz left 01:19 zacts joined
zacts what is feather? 01:19
Mouq TimToady: WRT to shapes, I'm not saying we swap the shapes vs subsig syntax, I'm saying we make the subsig syntax more consistent. So &foo:($,$) has ($,$) as a subsig, @pos:[$,$] or "@pos :($,$)" etc. has [$, $] as a subsig, @pos[4;3] has shape info, @pos[4;3]:[$,$,$,$] has shape info and a subsig, and "@pos [$,$]" is illegal because it's ambiguous 01:21
zacts: I believe feather is the old server that used to host a lot of P6 stuff. Dunno if that's still around, but we recently got hack.p6c.org/ and have moved a lot of projects to that 01:22
zacts ah ok
that's good, you still have something up
perl6 isn't shutting down. o_O 01:23
Mouq TimToady: And then a plain :([$, $]) or :({$, :$}) is also unambiguously a subsig
So that doesn't change
01:24 beastd left 01:32 adu joined 01:42 gfldex left 01:46 gfldex joined 01:54 zacts left 01:58 raiph joined 02:29 raiph left 02:39 ash_gti joined
dalek kudo/nom: 7a9a4ca | usev6++ | src/Perl6/Grammar.nqp:
Allow whitespace between named parameter and closing parenthesis for multi-name argument parsing

fixes RT #123956
Conflicts: src/Perl6/Grammar.nqp
02:39
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123956
Mouq If that was the first time I'd cherrypicked, does that mean my cherry was popped? 02:41
adu Mouq: lol 02:42
02:45 ilbot3 left 02:46 bjz joined 02:47 ilbot3 joined 03:06 ash_gti left 03:10 raiph joined 03:18 Patterner joined 03:20 noganex_ joined 03:23 Psyche^ left, noganex left 03:36 laouji joined 04:01 LonelyGM left 04:02 FROGGS_ joined 04:05 FROGGS left 04:09 laouji left, asdf12z_ left 04:11 laouji joined 04:28 nick1234 joined 04:36 BenGoldberg left 04:41 laouji left 04:42 laouji joined 04:47 adu left 05:02 laouji left 05:04 laouji joined, raiph left 05:07 laouji left 05:09 nick1234 left 05:12 laouji joined 05:17 laouji left 05:22 laouji joined 05:28 bjz left 05:37 laouji left 05:44 anaeem1 joined
moritz \o 05:46
raydiak o/ 05:48
06:01 bjz joined 06:10 bjz left 06:34 petercommand left, petercommand joined 06:44 bjz joined 06:51 ash_gti joined 06:57 ash_gti left 07:00 xfix joined 07:05 prime- left 07:07 prime joined 07:28 wicope joined 07:29 Ugator joined 07:43 Rounin joined 07:52 smls joined 08:03 eli-se joined
[Tux] m: my@r=(1,4..7,5..9,17..Inf);(^12)[@r].say 08:04
camelia rakudo-moar 7a9a4c: OUTPUT«1 4 5 6 7 5 6 7 8 9␤»
TimToady Mouq: the problem with your proposal as I see it is that it does not distinguish subsigs that are used for identity from those that are not; the way it is currently in my head, an attached subsig is part of the long name of a function, usable for multi dispatch, while a detached one is just a different assertion of bindability
that seems like an important distinction to me
eli-se hi 08:05
[Tux] would love to see a Range type as a subclass of Pair where each pair is a $from => $to pair 08:06
TimToady what do pairs have to do with ranges? 08:07
[Tux] «my Range @r = 1 => 1, 4 => 7, 5 => 9, 19 => Inf; (^12)[@r].say» would return 1 4 5 6 7 8 9
as in my example, ranges can overlap. using the current approach (lazy lists), overlapping ranges will result in fields being returned more than once when used as slice 08:09
TimToady but .. already does that, as you just demonstrated
[Tux] in my example, 5 6 7 is returned twice!
TimToady ah, well, in that case you want something that produces a multirange from ranges, and still we should not overload pairs for that 08:10
08:10 kaare__ joined
[Tux] that is why I said a new type based on Pairs 08:10
which is most likely due to my lack of internal knowledge :) 08:11
I though a range could be relatively easily implied as Pars
Pairs
08:12 darutoko joined
[Tux] I took your note about my previous question in where you used .first under the condition that the list was sorted 08:12
Pairs are easy to sort 08:13
FWIW, I'm trying to make an implementation of RFC7111
08:14 kaare_ left
TimToady -> Transylvania & 08:18
08:36 kaare__ is now known as kaare_ 08:41 rurban joined 08:44 anaeem1 left, anaeem1 joined
Mouq TimToady: Hm… that does seem like an important distinction to make… thanks for taking the time to consider the proposal :) 08:48
dalek ast: 459be82 | usev6++ | S06-signature/named-renaming.t:
Add test for RT #123956
08:51
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=123956
08:58 kjs_ joined 09:22 eli-se left 09:24 coffee` joined 09:38 rindolf joined 09:42 zakharyas joined
[Tux] m: class P is Pair { };my P @p;@p.push(1=>3) 09:46
camelia rakudo-moar 7a9a4c: OUTPUT«Type check failed in .push; expected 'P' but got 'Pair'␤ in method push at src/gen/m-CORE.setting:10059␤ in block <unit> at /tmp/HQ0HOpIA30:1␤␤»
[Tux] is puzzled
09:49 diana_olhovik joined 10:11 anaeem1 left
jnthn [Tux]: 1=>3 constructs a Pair, but your array needs a P 10:12
P is a Pair, but Pair isn't a P
[Tux] but P is Pair
how do I construct P as being a superclass of Pair? 10:13
jnthn P is a *subtype* of Pair
I...don't really follow. That's not how inheritance works. 10:14
m: class P is Pair { };my P @p;@p.push(P.new(1, 3))
camelia rakudo-moar 7a9a4c: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤ in method new at src/gen/m-CORE.setting:11439␤ in block <unit> at /tmp/zyfJhIbHP2:1␤␤»
jnthn ah
[Tux] I want to have P like Pair but with additional functionality
jnthn m: class P is Pair { };my P @p;@p.push(P.new(key => 1, value => 3)) 10:15
camelia ( no output )
jnthn [Tux]: Sure, but you need to then have a way to construct a P, not a Pair.
[Tux] grrrrr, niot intuitive, but I by now know how to do that
jnthn Well, if you want nice syntax for it, you can always introduce some kind of infix operator. 10:16
Or I guess you can re-define => :P 10:17
m: class P is Pair { }; sub infix:<< => >>($key, $value) { P.new(:$key, :$value) }; my P @p;@p.push(1 => 3) 10:18
camelia ( no output )
10:19 molaf joined
[Tux] wouldn't that break all other kv pairs that are not of type P inside the same scope? 10:19
jnthn It'll make all of them P instead of Pair 10:21
If your subclass can't be used in place of its parent, then a subclass is the wrong design.
[Tux] indedd, not what I have in mind
10:23 zakharyas left 10:24 pecastro joined
[Tux] in «class P {}» can I have different methods depending on what it operates? my P $p; $p.foo; vs my P @p; @p.foo; ? 10:32
jnthn @p.foo is a call on Array, not to P 10:35
m: class P { }; my P @a; say @a.WHAT
camelia rakudo-moar 7a9a4c: OUTPUT«(Array[P])␤»
jnthn Is it the pairs that should have special behavior, or a whole group of them? 10:36
[Tux] so much wants to show face-to-face what I have in my mind :/
a group 10:37
jnthn Then I'd probably write a class that contains pairs and write methods on that which do stuff on the group 10:38
[Tux] class Range { has Int $.from is rw = 0; has Num $.to is rw is Inf; multi method new (Pair $p) { self.bless { from => +$p.key, value => $p.value.Num; }; } method in (Int $i) { return $i >= $.from && $i <= $to } } 10:39
and a list of (overlapping) ranges then might be like my Range @r = 1 => 1, 4 => 7, 3 => 5, 6 => 14, 19 => Inf; 10:40
10:41 kjs_ left
[Tux] then that @r could be used for checking «@r.in($wanted) and @wanted.push($_);» 10:41
jnthn Is there a reason you can't use a set for this? 10:42
[Tux] do sets supprt .. Inf ?
jnthn Ah, no
[Tux] right. I looked at that
the right and of my ranges should be able to be open-ended 10:43
jnthn But if I understand correctly, you want something that contains a bunch of ranges, lets you check if a value is contained within any of them, and then if used as a lazy list it evaluates to all the things in the range, but each value is returned only once? 10:44
[Tux] yes, correct summary
10:53 Rounin left
jnthn [Tux]: I hacked this up: gist.github.com/jnthn/aabc5e604dbb75fd0d69 10:54
[Tux] thank you. I'll play with that
11:03 CurtisOvidPoe joined 11:04 telex left
CurtisOvidPoe m: multi sub postfix:<!> ( Int $x where * >= 0 ) { return [*] 1 .. $x; }; say -3!; 11:04
camelia rakudo-moar 7a9a4c: OUTPUT«-6␤»
CurtisOvidPoe Why is “* >= 0” ignored?
jnthn CurtisOvidPoe: Precedence? 11:05
m: multi sub postfix:<!> ( Int $x where * >= 0 ) { [*] 1 .. $x; }; say (-3)!
camelia rakudo-moar 7a9a4c: OUTPUT«Cannot call 'postfix:<!>'; none of these signatures match:␤:(Int $x where { ... })␤ in sub postfix:<!> at /tmp/pMguPPY6LM:1␤ in block <unit> at /tmp/pMguPPY6LM:1␤␤»
11:06 telex joined
CurtisOvidPoe That very much looks like a bug to me. 11:06
Though I can see how one could argue otherwise. 11:07
How would I fix the precedence on that? 11:08
jnthn Well, its your bug, not Perl 6's. It can't guess the right prec for you :P 11:09
m: multi sub postfix:<!> ( Int $x where * >= 0 ) is looser(&prefix:<->) { [*] 1 .. $x; }; say -3!
camelia rakudo-moar 7a9a4c: OUTPUT«Cannot call 'postfix:<!>'; none of these signatures match:␤:(Int $x where { ... })␤ in sub postfix:<!> at /tmp/1yu8HFcfhS:1␤ in block <unit> at /tmp/1yu8HFcfhS:1␤␤»
jnthn m: multi sub postfix:<!> ( Int $x where * >= 0 ) is looser(&prefix:<->) { [*] 1 .. $x; }; say 3!
camelia rakudo-moar 7a9a4c: OUTPUT«6␤»
CurtisOvidPoe Cheers :)
FROGGS_ CurtisOvidPoe: if we'd turn it around then this would be very surprising: say -$foo.abs 11:10
jnthn FROGGS_: Well, we could pick a different default...
(for user-defined postfixes)
But I think the present one is right for a bunch of cases. 11:11
vendethiel would agree
I think you're better off with parentheses anyway, not to confuse every single user out there :)
jnthn Well, dropping the prec on the operator doesn't prevent you putting the parens in too :) 11:12
FROGGS_ to me a postfix should have the same precedence as a method call
jnthn FROGGS_: We actually have postfixes of different prec levels in the grammar.
FROGGS_ so ^42! and ^42.bang are not different
jnthn *nod* 11:13
Which is probably why the default is close to that
vendethiel m: sub foo { gather { take 1; take 2; } }; say foo.perl
camelia rakudo-moar 7a9a4c: OUTPUT«(1, 2).list␤»
jnthn I think the default is to match that of postfix:<++> or so
11:18 Alina-malina left 11:19 eli-se joined
eli-se hi 11:19
vendethiel hi 11:20
11:21 Alina-malina joined
CurtisOvidPoe I see that the “is cached” trait is implemented with .gist. Doesn’t that mean that for large data structures, you can have collisions? 11:23
jnthn CurtisOvidPoe: Yes; there's an RT about it saying we need to find a better way. 11:24
CurtisOvidPoe ok 11:25
jnthn (So it's a known problem)
11:30 Alina-malina left
smls yikes, the 'famous' Perl 6 quicksort implementation (rosettacode.org/wiki/Sorting_algori...ort#Perl_6 and also featured in jnthn's talks I think) produces a mess of a nested list: 11:33
> say quicksort([0, 9, 3, 5, 1, 3, 5, 4, 9, 9]).perl;
((), 0, ((((), 1, ()), 3, (((), 3, ((), 4, ())), 5, ((), 5, ()))), 9, ((), 9, ((), 9, ()))))
11:34 Alina-malina joined
tadzik ew 11:34
needs more flattening
11:34 diana_olhovik left
smls yeah 11:34
and to think the GLR will remove even more auto flattening... :P 11:35
CurtisOvidPoe If I have “sub foo (Int $i where * >= 0) { … }, is there any way I can provide a custom error message if I pass in an illegal value?
jnthn Not at present, no 11:37
vendethiel or at least, not without an additional overload ;-)
11:37 kjs_ joined
vendethiel moritz++ implemented hidden_from_USAGE for this reason for my advent calendar post 11:37
jnthn Well, yeah, you can have a fallback candidate for error reporting...
I've been wondering if constraint type check fails should report the constraint text 11:38
CurtisOvidPoe jnthn: Right now, if my constraints are non-obvious, it’s impossible for me to figure out why a constraint fails. 11:39
jnthn CurtisOvidPoe: If your constraints are so complex, I'd at least suggest not writing them as where literals, but introducing a subset type, so you can at least test the constraint in isolation. 11:41
Or is that not the actual problem? 11:42
11:42 eli-se left
jnthn I guess I mean, what is making this harder than if you'd written the same thing out as explicit checking logic somewhere? 11:42
11:43 Ugator left
CurtisOvidPoe jnthn: that’s not the problem. However, if you report the *subset* name in a constraint violation, seeing “‘NonNegativeInt” constraint failed with value -2” would go a long way to making it easier. 11:43
11:44 eli-se joined
jnthn CurtisOvidPoe: Hm, ok 11:44
jnthn wonders if we actually keep that information at the moment 11:45
Ah, I think we must.
11:47 kjs_ left
Ulti CurtisOvidPoe ooc why do you use NonNegativeInt instead of PositiveInt or even NaturalNumber if the worry is accounting for 0 in the name? 11:49
11:50 abhi24 joined, kjs_ joined
CurtisOvidPoe Ulti: 0 is not a positive number, so PositiveInt is out. NaturalNumber, however, should have been obvious to me. Brain cramp :) 11:50
Ulti well I guess its not obvious to everyone 11:51
just I keep reading it as DoubleNegativeInt 11:52
guess I'm just a bit too lazy to think nots through
but yeah I guess 0 is kind of annoying 11:53
hmmm does Perl6 have +0 and -0
11:53 kjs_ left 11:54 abhi34 joined
Ulti nope 11:55
12:04 rjbs joined
rjbs Whose is perlgeek.de? 12:04
Aha, in the footer. 12:05
moritz: I think you want s/slags/slangs/ in your post on compilers being hard
vendethiel rjbs: moritz
jnthn oh wow, I read it and didn't even spot that 12:07
*lol*
CurtisOvidPoe Slags might be unfortunately appropriate there. 12:12
:)
dalek pan style="color: #395be5">perl6-examples: e0e3885 | paultcochrane++ | categories/euler/prob00 (6 files):
[euler] document solutions to problems 7-9
12:15
12:16 H2O1 joined 12:17 H2O1 left
lizmat CurtisOvidPoe: re irclog.perlgeek.de/perl6/2015-03-15#i_10281659 , the "is cached" implementation using .gist predates .gist being limited 12:22
CurtisOvidPoe lizmat: makes sense.
dalek kudo/nom: 1a4ddb5 | lizmat++ | src/core/Exception.pm:
Make X::Cannot::Infinite|Empty real exceptions
12:24
12:24 khisanth_ joined, alini joined
dalek ast: c81fd7d | lizmat++ | S03-sequence/basic.t:
Check for correct exception type
12:24
moritz rjbs: typo fixed, thanks 12:25
12:25 molaf_ joined 12:27 Khisanth left
lizmat m: sub a(UInt $a) { }; a -1 12:27
camelia rakudo-moar 7a9a4c: OUTPUT«Constraint type check failed for parameter '$a'␤ in sub a at /tmp/AypjqEpezg:1␤ in block <unit> at /tmp/AypjqEpezg:1␤␤»
lizmat hmmm...
12:28 molaf left
lizmat m: class A {}; my A $a .= new; $a++ # perhaps succ / pred would need to be called SUCC and PRED ? 12:30
camelia rakudo-moar 7a9a4c: OUTPUT«No such method 'succ' for invocant of type 'A'␤ in sub postfix:<++> at src/gen/m-CORE.setting:2285␤ in block <unit> at /tmp/nXvFhaQtpD:1␤␤»
lizmat as they are being called by Perl 6 under the hood ?
jnthn You could also quite usefully call them directly 12:31
lizmat true, but that also goes for AT-POS :-) 12:32
jnthn To a greatly less degree
CurtisOvidPoe m: say sprintf "%d", 5'
camelia rakudo-moar 7a9a4c: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FpNfocn1Jn␤Two terms in a row␤at /tmp/FpNfocn1Jn:1␤------> 3say sprintf "%d", 57⏏5'␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ postfix␤ statemen…»
jnthn *.succ is quite reasonable to use in a sequence
CurtisOvidPoe m: say sprintf “%d”, 5 12:33
camelia rakudo-moar 7a9a4c: OUTPUT«5␤»
FROGGS_ even with smart quotes :o)
CurtisOvidPoe D’oh! That was failing on my local box, but I forgot I was running it vim’s command mode and % was expanding to the filename :) 12:34
moritz :-)
smls jnthn: However, uppercase names of 'special' methods also help class authors not accidentally name their unrelated methods in ways that causes their class to gain unexpected behavior 12:36
I think .sink is also a candidate for that, since it is vey low-profile, so someone writing a Perl 6 class may have never heard of it and might use the name for something completely unrelated 12:37
lizmat hmmm... it appears that: 12:41
m: my int @a = ^10; say @a.pick(*)
camelia rakudo-moar 1a4ddb: OUTPUT«Memory allocation failed; could not allocate 656 bytes␤»
lizmat is looping inside the Any.pick candidate
jnthn Yes, .pick is still one of the many things on the native arrays todo list...though I'm curious why it loops.
lizmat it would work it it didn't loop
apparently, a .list on an array will not give you something that is a List ? 12:42
jnthn uhh
multi method pick() { self.list.pick }
A native array returns identity for .list
lizmat yeah, *that* works
jnthn Well, decontainerizing if needed. 12:43
lizmat m: my int @a = ^10; say @a.list.WHAT
camelia rakudo-moar 1a4ddb: OUTPUT«(array[int])␤»
jnthn Right.
lizmat which winds up in Any again
jnthn Correct.
12:43 diana_olhovik_ joined
jnthn .list is not .List 12:44
It means "give me something list-ish"
This is why we were discussing yesterday where to implement things like .pick that can be shared over (lazy) List and (non-lazy) native arrays.
lizmat ok, so the reason for failure as 100% clear 12:45
jnthn Aye
lizmat I guess I missed that while backlogging
jnthn Well, I hadn't realized it was such a direct infinite recursion going on, I'd feared something more involved might be going on 12:46
Anyway, I'd rather wait on this until we figure out a bit more where to re-organize stuff.
lizmat sure...
12:51 zakharyas joined
moritz lizmat: fiwiw I've started a nom branch branch where I moved .roll into Positional, and maybe I'll experiment with moving more stuff there 12:55
a branch off of nom, I wanted to say 12:56
lizmat yeah, gotcha
moritz++
moritz richer-positional
jnthn train & 12:58
13:00 bjz left
eli-se m: life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵} 13:02
camelia rakudo-moar 1a4ddb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/MoaMAcWU3N␤Two terms in a row␤at /tmp/MoaMAcWU3N:1␤------> 3life7⏏5←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}␤ expecting any of:␤ infix stopper␤ infix or me…»
eli-se :(
NQAPL
lizmat
.oO( unicode support does not imply APL support :-)
13:03
13:03 Ugator joined
moritz lizmat: I'm looking at List.unique now, and wonder: why is $target declared outside the loop? 13:05
lizmat so it won't need to be allocated inside the loop ?
moritz lizmat: is that actually faster? I mean, instead is to do a lookup of an outer lexical 13:06
13:08 CurtisOvidPoe left
lizmat you're right, seems like a P5ism krept in there 13:08
moritz benchmarks
lizmat yeah, difference of about 7% 13:09
wonder what the difference in memory usage would be though 13:10
dalek kudo/nom: 3af91ab | lizmat++ | src/core/Exception.pm:
Make X::Cannot::Infinite more generally usable
13:14
kudo/nom: e9a895a | lizmat++ | src/core/ (3 files):
Change more generic fails into typed exceptions
ast: 61f677c | lizmat++ | S02-types/WHICH.t:
Add X::Cannot::Empty|Infinite
13:16
masak couldn't there be a very safe optimization that turned `anyloop { my $var; ... }` into `my $var; anyloop { ... }` ?
could even do cool things like flyweight objects behind the scenes if it turns out that the loop allocates an object each time. 13:17
vendethiel masak: that's not safe is $var is captured
masak yeah. just realized :)
we *can* do this. once we have escape analysis :)
which basically is blocking on jnthn and me sitting down and doing it. 13:18
vendethiel that, plus LICM would be amazing optimizations
lizmat masak: I guess it would be safer to optimize my $var; loop { $var = ... } to not have to look up each time
masak vendethiel: "LICM"?
vendethiel loop invariant code motion
masak turns to google
vendethiel since we have functions tagged "pure", we can already move these out of the loop
moritz lizmat: fwiw the inner variable doesn't create more allocations
at least not with a native var 13:19
lizmat ok, good to know
shall I optimize that, or will you?
*that being unique
.tell jnthn: I want to split off the int / num specific parts of t/spec/S09-typed-arrays/native.t into seperate test files, is that ok with you? 13:20
yoleaux lizmat: What kind of a name is "jnthn:"?!
masak ooh en.wikipedia.org/wiki/Loop-invaria...ode_motion
lizmat .tell jnthn I want to split off the int / num specific parts of t/spec/S09-typed-arrays/native.t into seperate test files, is that ok with you?
yoleaux lizmat: I'll pass your message to jnthn.
masak vendethiel: I want to write a book about compilers. github.com/masak/compiler-book 13:21
vendethiel: partly to better learn about these things myself.
vendethiel seems like an amazing way to do that indeed :)
masak vendethiel: I'm thinking my angle could be having a very predictable environment, in which each optimization etc could be measured and shown to have a very concrete improvement on perf, memory, etc. 13:22
(the same way Knuth's TAoCP has MIX which helps ground things in the concrete; although I wouldn't want to target MIX) 13:23
vendethiel masak: right. you might be interested by this:github.com/estools/esmangle/tree/m...r/lib/pass 13:24
moritz masak: great idea (re compiler book). I'll be happy to proof-read it for you :-) 13:25
dalek pan style="color: #395be5">perl6-examples: 4e26dcf | paultcochrane++ | htmlify.pl:
Add function to extract author information from example file's POD
13:26
perl6-examples: e507ee9 | paultcochrane++ | htmlify.pl:
perl6-examples: Handle case when =TITLE exists but has no content
13:26 dalek left, eli-se left
masak vendethiel: thank you, that looks intetesting. 13:26
13:26 dalek joined, ChanServ sets mode: +v dalek
masak moritz: I'm thinking (since I'm too distractable to write a book), I might do it by posting blog posts about things. and then editing the result. 13:26
vendethiel masak: the amazing part is: github.com/estools/esmangle/tree/m...st/compare you can directly see what that directive did :) 13:27
masak ooh
clearly something I should copy!
13:28 zakharyas1 joined
moritz masak: speaking of distractable; what about the last Perl 6 Coding Contest? :-) 13:29
13:30 zakharyas1 left, mustapha joined
masak moritz: I was meaning to lull y'all into a sense of false security, and then spring the last review on you! 13:31
13:31 spider-mario joined
masak moritz: now you reset the counter and will have to wait longer :P 13:31
13:32 zakharyas left
moritz masak: I refuse to take the blame for this :-) 13:34
jnthn lizmat, masak: We already do in osme cases flatten inner scopes into the outer one; we'll likely get better at it :)
yoleaux 13:20Z <lizmat> jnthn: I want to split off the int / num specific parts of t/spec/S09-typed-arrays/native.t into seperate test files, is that ok with you?
jnthn lizmat: Leave them together while we're still developing this stuff; it's easier to run one test file after a change than a few. 13:35
(which is how I tend to work) 13:36
lizmat ok, it's just that I thought that the int/num tests are mostly the same, so would benefit of being able to keep 2 files side to side when adding tests 13:38
and a make t/spec/S09-typed-arrays/native*.t would test all of the native ones for you
jnthn ah, so you can diff 'em
lizmat yes
jnthn But not sure that helps in so far as they differe all over the place anyway :) 13:39
*differ
Hm, I don't know if that expansion works on Windows :P
masak moritz: as you should :)
lizmat well, diff in the sense of making sure a set of int tests is also done for num
*new int tests
jnthn If it makes it a lot easier for you, then go ahead.
lizmat that's why bag/baghash tests are separate as well 13:40
it would make it easier for me, yes
jnthn ok, then go for it 13:41
lizmat so I'll go ahead
13:41 eli-se joined
eli-se I don't understand parcels, lists and flattening. :v 13:42
[Tux] was it a weird idea to expect Inf.Int.say to tell me MAXINT?
lizmat [Tux]: there is no MAXINT
jnthn [Tux]: Given Int is bigint, the answer is like "how much memory do you have" :)
lizmat m: say int.Range 13:43
camelia rakudo-moar e9a895: OUTPUT«-9223372036854775808..9223372036854775807␤»
lizmat m: say int8.Range
camelia rakudo-moar e9a895: OUTPUT«-128..127␤»
lizmat m: say uint8.Range
camelia rakudo-moar e9a895: OUTPUT«0..255␤»
[Tux] Ah, inwhich case there should likely also be Inf for type Int ?
lizmat m: say Int.Range
camelia rakudo-moar e9a895: OUTPUT«-Inf..Inf␤»
masak m: say Complex.Range
camelia rakudo-moar e9a895: OUTPUT«No such method 'Range' for invocant of type 'Complex'␤ in block <unit> at /tmp/dUWC50YTlL:1␤␤»
masak seems legit. 13:44
jnthn hah :P
lizmat m: say UInt.Range
camelia rakudo-moar e9a895: OUTPUT«-Inf..Inf␤»
lizmat oops
[Tux] m: my Int $i = Inf;
camelia rakudo-moar e9a895: OUTPUT«Type check failed in assignment to '$i'; expected 'Int' but got 'Num'␤ in block <unit> at /tmp/QGrtQKlQ63:1␤␤»
eli-se m: map(*, Parcel(1, 2, Parcel(3, 4))).perl.say
camelia rakudo-moar e9a895: OUTPUT«(1, 2, (3, 4))␤»
[Tux] so Int.Range is confusing
eli-se Why doesn't this flatten?
I thought map flattened.
FROGGS_ [Tux]: yes, Int is meant to be able to store Inf
[Tux] so I hit a bug? 13:45
jnthn Argh
eli-se Oh, it flattens when assigning to an array.
jnthn I just love how people say stuff like that and yet nobody ever shows up with any kind of concrete ideas on how that should actually be implemented.
vendethiel m: for(*, Parcel(1, 2, Parcel(3, 4))).perl.say
camelia rakudo-moar e9a895: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gbSu0No7Qy␤Undeclared routine:␤ for used at line 1␤␤»
jnthn If you want to claim Int should store Inf, please write a patch that does it. Otherwise, don't say it. 13:46
vendethiel eli-se: you really ought to never write "Parcel" tho
[Tux] :)
eli-se m: (1, 2, (3, 4)).map(*.Int).perl.say 13:47
camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
eli-se Okay, now I'm really confused.
(1, 2, (3, 4)).map(*).perl.say
m: (1, 2, (3, 4)).map(*).perl.say
camelia rakudo-moar e9a895: OUTPUT«(1, 2, (3, 4))␤»
jnthn wonders what .map(*) actually does
vendethiel grins
jnthn m: (1, 2, (3, 4)).map({ $_ }).perl.say 13:48
camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
[Tux] m: my Int $i = Int.Range[1]
camelia rakudo-moar e9a895: OUTPUT«Type check failed in assignment to '$i'; expected 'Int' but got 'Num'␤ in block <unit> at /tmp/ZQiRcM0HUs:1␤␤»
eli-se m: (3, 4).Int.perl.say
camelia rakudo-moar e9a895: OUTPUT«2␤»
eli-se what are parcels used for? 13:50
vendethiel internal things
eli-se seems like passing them around can horribly break generic code
OIC
how about arrays vs lists? 13:52
jnthn Parcel is also menat to get unified with List in the not too distant future
eli-se m: (1, 2, (3, 4).list).list.map(*.WHAT).perl.say
camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
dalek kudo/nom: a8d2509 | lizmat++ | src/core/Int.pm:
Fix UInt.Range
jnthn An Array is a bunch of mutable containers that grows on assignment
vendethiel array vs list? array is itemized 13:53
eli-se m: (1, 2, (3, 4).list).list.map({.WHAT}).perl.say
camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Int, Int).list␤»
eli-se This is confusing. Why does map flatten the inner list?
13:54 CurtisOvidPoe joined
moritz it won't, in future. .for will continue to flatten. 13:54
eli-se Nice.
How about for loops?
vendethiel flattens 13:55
jnthn Use .for
vendethiel jnthn: we have .for but not for()? :p
eli-se This really sounds like a debugging nightmare. 13:56
What if you want an ordered container that never flattens anywhere?
vendethiel use an itemized list. an array
lizmat prefix with $
vendethiel m: (1, 2, [3, 4]).for({.WHAT}.perl.say 13:57
camelia rakudo-moar e9a895: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PcaGZmIbFY␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/PcaGZmIbFY:1␤------> 3(1, 2, [3, 4]).for({.WHAT}.perl.say7⏏5<EOL>␤»
vendethiel m: (1, 2, [3, 4]).for({.WHAT}).perl.say
camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Array).list␤»
vendethiel eli-se: ^
eli-se m: [1, 2, [3, 4]].map({.WHAT}).perl.say
camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Array).list␤»
eli-se cool
vendethiel m: say %(a => 'b').perl; say {a => 'b'}.perl 13:58
camelia rakudo-moar e9a895: OUTPUT«("a" => "b").hash␤{"a" => "b"}␤»
vendethiel m: (1, 2, (a => 'b').hash).map({.WHAT}).perl.say; (1, 2, {a => 'b'}).map({.WHAT}).perl.say;
camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Pair).list␤(Int, Int, Hash).list␤»
13:58 mustapha left
vendethiel eli-se: ^ 13:58
lizmat m: my uint @a = (-5 .. 5); say @a # is this intended to work like this, or is there overflow/iunderflow detection still NYI ? 13:59
camelia rakudo-moar e9a895: OUTPUT«-5 -4 -3 -2 -1 0 1 2 3 4 5␤»
lizmat ooh, wow?
eli-se m: for ({$_}, {.list}) { say [+] $_([1, 2, 3, 4, 5]) }
lizmat m: my uint8 @a = (-5 .. 5); say @a
camelia rakudo-moar e9a895: OUTPUT«5␤15␤»
rakudo-moar e9a895: OUTPUT«251 252 253 254 255 0 1 2 3 4 5␤»
vendethiel m: my uint $foo = -3;
camelia ( no output )
vendethiel m: my uint $foo = -3; say $foo
camelia rakudo-moar e9a895: OUTPUT«-3␤»
jnthn lizmat: I think it just doesn't know what to do with unit yet 14:00
lizmat yeah, looks like
jnthn There's still a bunch of nyi around the unsigned types
lizmat but the uint8 behaviour is correct?
or should it blow on: 14:01
m: my uint8 $a = -3; say $a'
camelia rakudo-moar e9a895: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Q1wui9QXuW␤Two terms in a row␤at /tmp/Q1wui9QXuW:1␤------> 3my uint8 $a = -3; say $a7⏏5'␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ postfix␤ sta…»
lizmat m: my uint8 $a = -3; say $a
camelia rakudo-moar e9a895: OUTPUT«-3␤»
masak lizmat: feel free to submit a NYI rakudobug
lizmat m: my uint8 @a = -3; say @a
camelia rakudo-moar e9a895: OUTPUT«253␤»
vendethiel m: say [+] [1, 2, 3] # eli-se
camelia rakudo-moar e9a895: OUTPUT«3␤»
eli-se Yes.
[Sno] how is the dynamic loading (with API ...) named when Perl6 runs in jvm?
eli-se m: say [+] @([1, 2, 3]) 14:02
camelia rakudo-moar e9a895: OUTPUT«6␤»
jnthn That's sorta open. TimToady seems to want checks, others of us (myself included) think that if you're opting in to using native types, you should get native semantics, so we don't have to emit checks everywhere.
eli-se Is @ like .list?
vendethiel yes
[Tux] m: Int.Range[1].say
camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
[Tux] -Inf??
jnthn [Tux]: (-Inf).succ is probably still -Inf.
[Sno] jnthn: I mean, is it called dynaloader oder nativeloader ...
lizmat m: say Range.new(-Inf,Inf)[1] # the problem is with Range 14:03
camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
[Sno] I intend to do some bikeshedding in Berlin with FROGGS_ ;)
jnthn [Sno]: The NativeCall library for calling native code has the same API on Moar and JVM
lizmat m: say Range.new(-Inf,Inf).AT-POS(1)
camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
[Sno] "NativeCall" was the answer I search for, thanks ;)
jnthn [Sno]: On JVM there's additoinally a bunch of JVM interop stuff for calling Java tings. 14:04
*things
lizmat m: say Range.new(-Inf,Inf).AT-POS(12345)
camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
jnthn lizmat: What would you expect it to do other than what it currently does?
m: say -Inf + 1 14:05
camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
lizmat it should probably blow up on ranges that start at -Inf
[Sno] jnthn: in company we curently want to prove if we can superseed a c++ service talking with libftdi by a via NativeCall bound Perl6 class in a Java-App ;)
lizmat or maybe not
[Sno] so silently add Perl6 into that Java app
lizmat hmmm....
jnthn [Sno]: Sneaky :) 14:06
[Sno] and therefore we need the stuff I talked with FROGGS_ and nine_ on FOSDEM
checks and maps at install time for platform to have correct type mapping
smls m: my $n = 3; say "a bcd ef" ~~ /\w ** $n/ 14:07
camelia rakudo-moar e9a895: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xXZBjKXSqv␤Quantifier quantifies nothing␤at /tmp/xXZBjKXSqv:1␤------> 3my $n = 3; say "a bcd ef" ~~ /\w **7⏏5 $n/␤»
smls ^^ how can I use a varible in a regex quantifier like that?
eli-se My favourite Perl 6 code is still "1 xx * Z+< 0..*" :D
moritz smls: {$n} iirc 14:08
jnthn m: my $n = 3; say "a bcd ef" ~~ /\w ** {$n}/
camelia rakudo-moar e9a895: OUTPUT«「bcd」␤»
smls ok, thanks 14:11
dalek ast: 7495dca | lizmat++ | S09-typed-arrays/native (3 files):
Split off native int|num specific tests
14:12
[Tux] would love to be able to store Inf in Int
14:13 Ugator left
dalek kudo/nom: c7b9340 | lizmat++ | t/spectest.data:
Split off native int|num specific tests
14:13
14:14 eli-se left, raiph joined 14:16 abraxxa joined, abraxxa left
lizmat m: my constant MAXINT = int.Range.max; say MAXINT # [Tux] 14:17
camelia rakudo-moar a8d250: OUTPUT«9223372036854775807␤»
[Tux] I meanwhile found out that having 19..Inf in a list is something very different from having 19..9223372036854775807 14:18
the latter not being very lazy
m: my @i = 0 .. Inf; 14:21
camelia ( no output )
[Tux] m: my @i = 0 .. 9223372036854775807;
camelia rakudo-moar a8d250: OUTPUT«(timeout)»
masak yup. 14:22
I guess that's the "mostly eager" behavior of array assignment.
lizmat ok, so bad idea :-(
dalek kudo/nom: 1fdb769 | lizmat++ | src/core/Int.pm:
Unbust Int.Range
14:23
Heuristic branch merge: pushed 24 commits to rakudo/newio by lizmat
lizmat afk for a few hours& 14:25
14:27 diana_olhovik_ left 14:32 darutoko left, darutoko joined
[Sno] lizmat: I miss your reply at nrpm ... 14:35
lizmat we'll be there
[Sno] \o/
14:40 eli-se joined
smls Is anyone else already thinking about a redesigned perl6.org (both in content and look) to coincide, at the latest, with the expected Perl 6 beta release this year? 14:44
Because I am dabbling with some mockups right now 14:45
Nothing to show yet, but would like to avoide duplicate work if anyone else in working/thinking about it too
(In case it needs saying: Yes, we do need to design it from scratch... The current website is fine as an "in-progress open-source project" site, but will be inappropriate as an "introduce a new language" site.) 14:47
eli-se smls: especially get rid of the typo in the very first sentence of the about page :P 14:48
smls :P
my idea is more along the lines of, replace it with completely new content 14:49
masak smls: yes! \o/ 14:51
smls yes you approve, or yes you're also working on ideas for it?
masak yes, I approve 14:52
eli-se also the webdesign?
masak I approve of the redesign, yes
judging by www.python.org/, www.perl.org/, and www.ruby-lang.org/en/, we definitely need a navbar at the top :P 14:53
eli-se Python website redesign is an epic failure.
smls PS: Haskell apparently redesigned theirs not too long ago, and have this insightful write-up: chrisdone.com/posts/haskell-lang
so anyone who wants to help should imo start by reading that :)
masak smls++ 14:54
eli-se I like Go's website in terms of non-destractiveness and clarity. 14:55
14:56 rmgk_ joined, rmgk is now known as Guest59721, Guest59721 left, rmgk_ is now known as rmgk, virtualsue joined
smls eli-se: Yeah, though I think one can have both clarity and prettiness at the same time. 14:57
masak .oO( is "destractiveness" where they, like, *both* distract you and destroy you? ) :P 14:58
14:58 eli-se left 14:59 madmuid joined 15:08 Ugator joined 15:11 eli-se joined 15:13 CurtisOvidPoe left 15:15 CurtisOvidPoe joined 15:17 smls left
eli-se I don't really mind Perl's website either, btw. 15:20
perl.org
15:26 BenGoldberg joined
masak agreed. 15:27
it's perhaps the most "formal" of the three (pl/py/rb) 15:28
but that doesn't necessarily detract from my opinion of it
it's waaaay better than what preceded it :)
masak ownders if it's the old perl.org or the new one that gets criticism at chrisdone.com/posts/haskell-lang 15:31
probably the new one, since the post is from 2014-05-29
eli-se Java has the very worst website. :P 15:33
masak heh. mostly when you try to download Java. 15:34
eli-se we should ship Ask Toolbar with Perl 6 15:35
vendethiel *g* 15:37
*and* a bitcoin miner!
jnthn Only in the Enterprise Edition :P
timotimo yeah, only target users that ar elikely to have very beefy machines; and many of them 15:42
for the bitcoin miner, i mean
hm, other than that, i seem to recall bitcoin is easy to mine on a GPU?
so maybe we should target gamers, too
jnthn heh. "Perl 6 for game dev: let us help you exploit your GPU" :P 15:43
eli-se And web hosting companies.
They typically don't even know what servers are, so they won't notice. 15:44
jnthn hopes we will actually have libraries to do GPU programming from Perl 6 at some point :)
timotimo libraries ... not such a terribly hard thing to get; just a bunch of work 15:46
jnthn Sure. Maybe we'll even have a slang for such things some day too :) 15:47
timotimo that'd be nice
write your stuff in almost-perl6 and get a kernel for opencl 15:48
japhb
.oO( use Inline::OpenCL; )
timotimo hmm, opencl doesn't have an API XML format like opengl does 15:49
eli-se There's ScalaCL which translates Scala to OpenCL
so Perl 6 must surely be possible :P
15:50 skids left
timotimo someone with an alot of interest could have a look at the specification of SPIRV 15:51
15:55 geever joined
japhb
.oO( My fuzzy, fuzzy alot, how I love him ... )
16:03
masak I like the one made of beer. 16:07
also, I am sometimes surprised and saddened at how many eagles there are online.
vendethiel eagles? 16:08
jnthn Hey, the internet isn't just for humans :P
dalek rl6-roast-data: 74c8344 | coke++ | / (9 files):
today (automated commit)
16:10
masak vendethiel: hyperboleandahalf.blogspot.se/2010/...thing.html 16:13
vendethiel masak: i have no problem with people making spelling mistakes ;) 16:14
masak didn't say I had a problem with it ;) 16:15
only said that they could be eagles :P
vendethiel alright!
jnthn tries not to make alot of mistakes :P 16:16
.oO( And I'll try to make alot less mistakes in the future :P )
masak dang, jnthn beat me to it :P
masak tries not to be a prescriptivist, dammit 16:17
eli-se I think .perl should return an AST instead of a string. 16:19
Or .perl-ast an AST, and .perl calls .perl-ast returning a string 16:20
16:24 Ugator left
eli-se Strings don't compose, they compost. ASTs can be trivially nested without worrying about operator precedence rules. 16:25
jnthn The point of .perl isn't really for program manipulation 16:26
16:27 Akagi201 left
jnthn It's for getting a Perl-ish view of the data, that stands a chance of .EVAL-ing to the same thing when that's realistic. 16:27
eli-se I know
jnthn The stuff masak++ is planning for program manipulation is AST based
eli-se But currently you have to parenthesize everything if you use operators in .perl
because of precedence issues 16:28
like if you want to method perl { $a.perl ~ " + " ~ $b.perl } you have to do method perl { "(" ~ $a.perl ~ " + " ~ $b.perl ~ ")" } 16:29
if you returned an AST that issue wouldn't be there since the AST-to-string function would take care of that generically
there may be other issues with Perl 6's context-sensitive grammar
moritz .tell perl6.org is mostly links and little content to deal with the problem of stale content. A redesign which includes more textual content must address the issue of staleness. 16:33
yoleaux moritz: What kind of a name is "perl6.org"?!
moritz erm
.tell smls perl6.org is mostly links and little content to deal with the problem of stale content. A redesign which includes more textual content must address the issue of staleness.
yoleaux moritz: I'll pass your message to smls.
16:36 eli-se left 16:43 Rounin joined 16:51 abhi24 left, abhi34 left
ugexe is p5 needed by rakudo after its installed? 16:52
vendethiel no
at least it hasn't been for me
moritz ugexe: no 16:53
ugexe ah. how does star work? does it just fat pack Configure.pl?
(on windows)
jnthn Works same on Windows as anywhere else, pretty much 16:55
But most Windows users probably use the MSI
FROGGS_ ugexe: we use this to build the msi wixtoolset.org/documentation/manual...tools.html 16:57
we basically candle + light + heat + nmake install 16:58
16:59 xinming left 17:00 eli-se joined
ugexe ah. i dont understand what any of this is but its what i was looking for :) 17:01
17:01 xinming joined 17:02 Possum joined 17:06 diana_olhovik_ joined 17:08 perl6_newbee joined
moritz black magic, smoke and mirrors 17:14
17:14 CurtisOvidPoe left
ugexe i like black magic and smoke 17:14
moritz like all build systems, really 17:15
17:20 raiph left 17:21 CurtisOvidPoe joined 17:30 kjs_ joined
TimToady arrived in Transylvania 17:32
17:33 raiph joined 17:35 eli-se left
rindolf TimToady: awesome. 17:37
TimToady: Amalia Aida P-something has been "spamming" the Facebook groups about the Cluj.pm event. 17:38
[Tux] travis-ci.org/Tux/CSV :) 17:40
17:45 perl6_newbee left 17:50 bjz joined, diakopter left 17:59 molaf_ left 18:03 LonelyGM joined
arnsholt masak: My boss is secretly an eagle. The only things he capitalizes when writing is TLAs; even names are lowercased 18:05
18:09 skids joined 18:11 diana_olhovik_ left 18:17 kjs_ left 18:18 eli-se joined 18:21 kjs_ joined 18:22 beastd joined 18:23 beastd left 18:38 adu joined 18:39 geever left 18:41 smls joined
smls Bună seara, TimToady 18:45
yoleaux 16:33Z <moritz> smls: perl6.org is mostly links and little content to deal with the problem of stale content. A redesign which includes more textual content must address the issue of staleness.
dalek Heuristic branch merge: pushed 296 commits to rakudo/union by FROGGS 18:46
smls moritz: You mean that it must not add additional burdens for the person maintaining the website?
(which is you?) 18:48
18:50 KCL_ joined
dalek pan style="color: #395be5">perl6-examples: 616a279 | paultcochrane++ | categories/euler/prob014-felher.pl:
[euler] reduce progress output verbosity in problem 14
18:54
pan style="color: #395be5">perl6-examples: d85c436 | paultcochrane++ | categories/euler/prob01 (10 files):
[euler] document solutions to problems 10-19
hoelzro o/ #perl6 18:56
smls love the 'neon Larry pictogram' in the cluj.pm banner btw ;) cluj.pm/events/larrywallbanner.jpg
hi hoelzro 18:57
FROGGS_ *g*
cluj++
eli-se smls: awesome 18:58
hoelzro on Friday, I asked if multiple workers could safely read from a single Channel; I have an example that seems to demonstrate broken behavior. Would anyone mind sanity checking my code? 18:59
it's here: gist.github.com/hoelzro/bd4608729d7be342ccda
I feel like that code *should* work (printing 'done' 10 times, then exiting), but it seems like only one worker receives the "channel closed" event 19:00
19:00 mr-fooba_ left
FROGGS_ eeeks, there is a precomp bug about 'is DEPRECATED' 19:02
19:02 mr-foobar joined
TimToady eli-se: re irclog.perlgeek.de/perl6/2015-03-15#i_10282388 y'know, that can more readably be written 1,2,4...* 19:07
19:08 georgi joined, kjs_ left
eli-se yeah 19:08
but that's not cryptic enough :P
this is Perl after all
TimToady eli-se: this is the little sister of Perl, who is sneaky enough to want to make her way in the world by making other people feel smarter :) 19:09
19:14 beastd joined
vendethiel eli-se: that's a pretty amazing piece of code 19:15
19:19 molaf joined 19:24 adu left
bartolin m: my Str @a = (1, 2); 19:25
camelia rakudo-moar 1fdb76: OUTPUT«Unhandled exception: Type check failed in assignment to '@a'; expected 'Str' but got 'Int'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15614 (/home/camelia/…»
bartolin m: my Str @a = (1, 2); 1
camelia ( no output )
bartolin why didn't the second command not blow up like the first? 19:26
s/not// 19:27
19:28 yqt joined
TimToady m: { my Str @a = (1, 2) }; 1 19:29
camelia rakudo-moar 1fdb76: OUTPUT«Type check failed in assignment to '@a'; expected 'Str' but got 'Int'␤ in method REIFY at src/gen/m-CORE.setting:10856␤ in method reify at src/gen/m-CORE.setting:9466␤ in method gimme at src/gen/m-CORE.setting:9949␤ in method sink at src/gen/m-…»
psch m: my Str $x = "foo"; 1; # similarly
camelia ( no output )
TimToady m: { my Str @a = (1, 2); 1 }; 1
camelia ( no output )
psch eh
no
o.o
TimToady looks like a bug relating to explicit sinking somehow
psch what was i even thinking 19:30
m: my Str @a = 1, 2; 1; @a[0]
camelia rakudo-moar 1fdb76: OUTPUT«WARNINGS:␤Useless use of constant integer 1 in sink context (line 1)␤Type check failed in assignment to '@a'; expected 'Str' but got 'Int'␤ in method REIFY at src/gen/m-CORE.setting:10856␤ in method reify at src/gen/m-CORE.setting:9466␤ in met…»
TimToady m: sink my Str @a = (1, 2);
camelia rakudo-moar 1fdb76: OUTPUT«Type check failed in assignment to '@a'; expected 'Str' but got 'Int'␤ in method REIFY at src/gen/m-CORE.setting:10856␤ in method reify at src/gen/m-CORE.setting:9466␤ in block at src/gen/m-CORE.setting:9449␤ in method reify at src/gen/m-CORE.…»
psch that points to laziness, doesn't it?
lizmat hoelzro: looking at the Channel thing
TimToady m: lazy my Str @a = (1, 2);
camelia rakudo-moar 1fdb76: OUTPUT«Unhandled exception: Type check failed in assignment to '@a'; expected 'Str' but got 'Int'␤ at <unknown>:1 (/home/camelia/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15614 (/home/camelia/…»
hoelzro lizmat: thanks, I've golfed it down if you'd prefer that
psch i.e. the array assignment is lazy, and the 1 in sink context makes it not care?
TimToady pseudo assignment should be eager on my (though not on constant) 19:31
psch mentally shoves that on the "GLR-problems" heap
TimToady m: our Str @a = (1, 2); 19:32
camelia rakudo-moar 1fdb76: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5lWhIQ3auG␤Cannot put a type constraint on an 'our'-scoped variable␤at /tmp/5lWhIQ3auG:1␤------> 3our Str @a7⏏5 = (1, 2);␤ expecting any of:␤ constraint␤»
TimToady well phoo
bartolin looks around for masak
TimToady thinks our should at least allow identical type assignments
/assignments/constraints/ 19:33
lizmat hoelzro: that feels like an improper use of a Channel
hoelzro lizmat: oh, ok; what's the proper way to feed a bunch of jobs to multiple workers? 19:34
lizmat checking :-)
19:36 grondilu joined 19:39 bayprogrammer left 19:44 telex left
lizmat hoelzro: well, I think you hit the nail on the head :-) 19:45
19:46 telex joined 19:47 smls_ joined, smls left 19:48 Maxwell joined
Maxwell is this channel better than #perl5? 19:48
lizmat depends on what you mean by better... but perhaps friendlier :-) 19:49
Maxwell I want to talk to like minded people who are not sensistive 19:50
sensitive*
vendethiel shrugs
19:51 smls joined, diana_olhovik_ joined 19:52 amaliapomian joined
raydiak good afternoon, fellow cognizant entities 19:52
TimToady we are very sensitive :)
that's supposed to be a good thing :)
hoelzro lizmat: I did?
lizmat yeah.... only one will ever see the CHANNEL_CLOSE message 19:53
hoelzro lizmat: so that's a bug?
lizmat yeah
hoelzro ok, I'll RT that up!
Maxwell I mean like emotionally sensitive. 19:54
TimToady we have thick skins except when people are mean on purpose :)
Maxwell Yeah, that's reasonable. 19:55
19:55 smls_ left
moritz smls: exactly. Unless there are very good reasons to believe that the burden will be small (timeless content, dunno what else) 19:55
Maxwell I never used perl before lol, I was just told this was an active IRC channel.
TimToady m: say "Hi Maxwell, I'm Perl 6. Nice to meet you." 19:56
camelia rakudo-moar 1fdb76: OUTPUT«Hi Maxwell, I'm Perl 6. Nice to meet you.␤»
Maxwell bots? 19:57
hoelzro lizmat: thanks for sanity checking that for me 19:58
lizmat testing a fix now
TimToady hugme: hug Maxwell
hugme hugs Maxwell; TimToady++
smls moritz: Alright, no "recommended Perl 6 video of the day" section then ;)
20:00 molaf left
TimToady Maxwell: there are 5 bots on at the moment 20:00
dalek kudo/nom: f19bea1 | lizmat++ | src/core/Channel.pm:
Handle when not the first to see a closed Channel

Pointed out by hoelzro++
TimToady there's a third one 20:01
lizmat hoelzro: I'm not sure this will be race condition proof
Maxwell What is the bots purpose?
lizmat perhaps the close / fail message should remain in the queue
TimToady .u ☺
yoleaux U+263A WHITE SMILING FACE [So] (☺)
hoelzro tries against test
TimToady there's a 4th one
hoelzro lizmat: I'm not sure either
I'm wondering if this sort of thing may need to be pushed down into the VM level 20:02
20:02 CurtisOvidPoe left
TimToady Maxwell: camelia is for evaluating Perl 6 expressions, yoleaux passes messages and looks up unicode 20:03
hugme just hugs mostly
lizmat hoelzro: could well be
TimToady dalek reports github updates
and ilogger2 keeps a log of this channel
other than that, we're mostly just Real People™ 20:04
(if the last character was a TM you need to set utf-8 mode on your client) 20:05
*wasn't
looks like my n't key is flaking out again...
Maxwell Where does yoleaux pass messages? 20:08
TimToady back here
.tell Maxwell Here's a message. 20:09
yoleaux TimToady: I'll pass your message to Maxwell.
TimToady now say something
Maxwell hola
yoleaux 20:09Z <TimToady> Maxwell: Here's a message.
lizmat .botsnack
yoleaux :D
Maxwell so why does he look up unicode 20:10
TimToady curiosity, I suppose
Maxwell bots aren't that smart (;
TimToady we do tend to use an amount of Unicode around here 20:11
dalek kudo/nom: 2b20dcb | lizmat++ | src/core/Channel.pm:
Close channel when we actually receive the message
TimToady m: .say for 1,2,3
camelia rakudo-moar f19bea: OUTPUT«1␤2␤3␤»
TimToady there should be NL character after each number there
.u 2424
yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
moritz there is
Maxwell I believe most of the world uses unicode
TimToady on input it will also translate that character to an actual newline, since you can't pass multiline commands to camelia otherwise 20:12
lizmat hoelzro: commented with my test code on your gist
jnthn: please check my last 2 commits to Channel.pm it fixes hoelzro's issue, but feels wrongish 20:13
hoelzro lizmat: excellent! 20:14
TimToady I guess there's synopsebot there too, but it doesn't have a + for some reason
lizmat jnthn: specifically with Channel.receive hanging when there's a race between $!closed being set and waiting for a message to arrive in the queue 20:15
jnthn: it feels to me the last control message should be left in the queue for any reader to see 20:16
20:17 rindolf left
lizmat hoelzro: seems my fixes broke some channel tests :-( 20:18
hoelzro =(
Maxwell \(^_^)/
LonelyGM o/ 20:19
FROGGS_ O.o
20:20 bjz left
TimToady LonelyGM: fancy meeting you here 20:20
20:20 Maxwell left 20:21 Rounin left 20:22 raiph left
LonelyGM TimToady: yeah right :) my brain still thought that we are going to have a dinner tonight together as it got used to it :( 20:22
already being addicted to #perl6 IRC... 20:23
TimToady we had some very nice sausage and cheese from the market in Budapest for dinner :)
LonelyGM I'm glad about that :) well something has to be turned to code 20:24
masak bartolin: you were looking around for me earlier? 20:25
bartolin masak: i was half joking. there is a bug to be reported. 20:26
masak: I'll do it (though it may take some time)
dalek kudo/nom: ddea517 | lizmat++ | src/core/Channel.pm:
Better solution to multiple readers issue
bartolin m: my Str @a = (1, 2); say "alive" # this one -- extracted from RT #122440 20:27
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122440
camelia rakudo-moar f19bea: OUTPUT«alive␤»
lizmat hoelzro: I think this is a better solution: race condition can only put multiple CLOSE/FAIL messages on the queue, but that shouldn't be an issue
masak bartolin++ # reporting 20:28
hoelzro lizmat: seems reasonable to me
jnthn evening, #perl6 20:30
smls lizmat: That Channel issue reminds me of Perl 5 queues where you have to push as many undef's as you have subscribers, to terminate them all ;) 20:31
dalek kudo/nom: 8208e5a | lizmat++ | src/core/Channel.pm:
Be more correct in copying CHANNEL_CLOSE
lizmat jnthn o/ 20:32
jnthn lizmat: I should have a deeper look at the Channel stuff; also 'cus there's not currently an efficient way to wait on an alternation of channels.
lizmat well, that would work by having 2 workers put it into the same Supply, no ? 20:33
we could even make a method for that: Supply.collect-Channels 20:34
or something like that ?
20:34 darutoko left, FROGGS_ left 20:36 pyrimidine left
lizmat hoelzro: could you add a test for this to t/spec/S17-channel/basic.t ? 20:36
hoelzro lizmat: sure! 20:37
lizmat ++hoelzro
20:37 pyrimidine joined
hoelzro lizmat: is it acceptable if a failed test exit()s? I don't know of another way to signal failure here 20:38
(I will fail() as well)
er, whatever Test::fail is in Perl 6
I always forget
lizmat fine for a start :-)
hoelzro ah yes, flunk 20:39
20:39 geever joined
lizmat hmmm... I guess #124071 can now be marked as closed ? 20:39
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124071
hoelzro didn't I already close it? 20:40
lizmat could be, I just got the mail for the first time
seems resolved now :-) 20:45
20:46 virtualsue left
dalek kudo-star-daily: 37ab0d0 | coke++ | log/ (9 files):
today (automated commit)
20:47
timotimo lizmat: don't forget, supplies run their tap's code on the same thread the data is put in 20:49
lizmat: so you won't actually solve the multiple-subscriber problem
20:49 danaj left
dalek ast: 7c26cef | hoelzro++ | S17-channel/basic.t:
Add two workers one channel test

See also RT #124071
20:54
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124071
[Coke] did that get a test in roast before it was closed? 20:55
lizmat [Coke]: no
20:56 kjs_ joined
hoelzro [Coke]: are you talking about #124071? I just added a test for it 20:56
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=124071
[Coke] hoelzro++ lizmat++
lizmat m: my $a = sub { say "hello world" }; $a.invoke # should this work ? 20:57
camelia rakudo-moar 8208e5: OUTPUT«No such method 'invoke' for invocant of type 'Sub'␤ in block <unit> at /tmp/2dvE4ZjcMF:1␤␤»
20:59 skids left
dalek kudo/nom: bba8a3a | lizmat++ | / (11 files):
.invoke is now CALL-ME
21:01
lizmat raydiak: ^^^
21:05 danaj joined 21:06 FROGGS joined 21:08 kurahaupo1 joined 21:11 raiph joined 21:13 kjs_ left
dalek ast: 1ec9d7e | lizmat++ | S17-channel/ (2 files):
Fix some Supply.for deprecation messages
21:14
FROGGS m: say (1 +< 30 +| 1 +< 14 +| 1 +< 6).polymod(256 xx *)».fmt('%#08b') # besides the fmt bug there polymod is quite nice 21:22
camelia rakudo-moar bba8a3: OUTPUT«0b1000000 0b1000000 00000000 0b1000000␤»
dalek kudo/nom: 997afa3 | lizmat++ | src/core/Channel.pm:
Do something with e.g. Channel.list(:wait(.5))
21:23
FROGGS bugs*
m: say 1.fmt('%#08b')
camelia rakudo-moar bba8a3: OUTPUT«000000b1␤»
sjn \o
FROGGS hi sjn 21:24
sjn just learned of something called "The Blub Paradox" o_O
c2.com/cgi/wiki?BlubParadox
21:25 beastd left, smls left
sjn hopes this may be interesting for someone here :) 21:25
masak sjn: it's from an old Paul Graham article. 21:27
(though the c2 link probably says that) :) 21:28
spider-mario I like Paul Graham’s articles
apparently, some people think he’s crazy
but isn’t that a great sign of genius? :)
masak there's probably positive correlation, yes 21:29
sjn masak: yeah, interesting thoughts, though..
masak sjn: I agree.
sjn (learned about it here: youtu.be/csyL9EC0S0c)
masak sjn: though (without first refreshing on the details of the post) I think it's a point that especially appeals to Lisp people, Smalltalk people, Haskell people, etc. 21:30
sjn: basically any group who see a big, stupid language being the market leader and want to feel better about that.
(about their favorite language not being as popular, I mean) 21:31
sjn well... sure
maybe there's an element of therapy in thinking like that 21:32
spider-mario aren’t we perl6ers subject to this as well, to some extent?
masak smugness? heaven forbid!
we're, like, the most humble community on the planet! 21:33
spider-mario yes, of course :)
sjn by far! :)
masak others don't even come close!
FROGGS :P 21:34
sjn we're so obviously more humble, it's a mystery why not more people understand our superior humblitude. :)
spider-mario but I mean seeing certain aspects of other languages as shortcomings because those language lack something we are used to
sjn got to think of Damian's description of Perl 6 when gave a talk in Oslo recently 21:35
"Perl 6 is a computer scientist’s dream come true. Its many advanced features (junctions, multiple dispatch, generics, delegation, grammars, lazy evaluation, infinite lists, hyperoperators, first class functions, coroutines, partial function application, macros, metadata, etc., etc.) offer the elite überhacker entirely new levels of awesome cosmic power."
vendethiel did he really say that?
lol
masak spider-mario: "blub language" is used as a term to descripbe a language whose adherents don't even notice that they're thinking inside a box.
vendethiel (I mean -- something along thsoe lines) 21:36
sjn Second paragraph:
spider-mario yes, I know
sjn "Unfortunately, for the majority of us, those incredible new features are mostly just mysterious, scary, and off-putting.
spider-mario but don’t we perl6 users, just like haskell/lisp/etc. users, see some other languages as blubs?
sjn But all of those new features are also entirely optional. You don’t have to start out in Perl 6 writing autoparallelized infinite superpositions of multimorphic higher-order functions. You don’t even have to statically type your variables or encapsulate your objects."
vendethiel spider-mario: I'm fairly sure anyone (who doesn't use java) see the other languages as blub :P 21:37
masak sjn: *phew*
sjn "For most Perl developers, the real and immediate benefit of using Perl 6 is this new (but eerily familiar) programming language just plain eliminates most of the minor annoyances and frustrations that plague our everyday coding."
masak sjn: I think I'll start referring to Perl 6 as a "new (but eerily familiar)" language :)
TheDamian++ 21:38
spider-mario I’ll call it a cosmic language, now
thanks for the idea
masak ya can't be blub if you're cosmic
spider-mario I suppose it was the logical next step, after listening to cosmic music
sjn hehe
masak, jnthn, pmichaud: you guys wanna submit a talk for OSDC.no? :) (same goes for anyone else here, really :) 21:40
arnsholt has already submitted a talk :D 21:42
21:45 raiph left
lizmat another TheDamian quote: Perl 6 - More of what made Perl 5 great, Less of what made Perl 5 grate (may be paraphrasing here) 21:47
spider-mario :) 21:48
I like puns
so obviously, I like that line.
21:48 xfix left
spider-mario although I have to say, I started learning Perl 5 because I liked Perl 6 a lot and I wanted to know at least one “practical” language, 21:49
and P5 really wasn’t as “bad” as I thought even compared to P6
a lot of what I loved about P6 was already there 21:50
masak sjn: when's OSDC.no? url?
21:50 dabockster joined
masak spider-mario: agreed -- Perl 5 is a surprisingly solid language. 21:51
21:51 Diederich left, diana_olhovik_ left
jnthn
.oO( Say yes to OSDC.no )
21:52
masak .oO( we made him an offer he couldn't say OSDC.no to ) 21:54
21:55 KCL_ left, grondilu left, CurtisOvidPoe joined
[Coke] surprisingly? 21:57
22:01 amaliapomian left 22:03 flussence left
sjn masak: OSDC.no has it's url embedded in it's name :D 22:03
just add some letters and slashes and a colon in front of it 22:04
22:07 flussence joined
masak :) 22:08
my browser does that for me these days 22:09
ah. May 8-10
22:11 ash_gti joined 22:12 danaj left
masak sjn: I'm tempted. I'll confer a bit with @family, and think a bit on what to submit. 22:13
[Coke]: surprisingly, given that the Perl 6 effort was deemed necessary. 22:14
22:14 dabockster left
FROGGS well, Perl 5 might be too stable :o) 22:15
masak [Coke]: I'm in something of a superposition of thinking the Perl 6 effort was "worth it" in that it produced a better/more lasting language, and thinking that Perl 5 has several good survival characteristics on its own.
or, differently, even as an avid sixer I can't really make myself dislike Perl 5 ;)
lizmat m: my $t = int8; say $t.perl; my @a := array[$t].new # jnthn, shouldn't this work ? 22:16
camelia rakudo-moar 997afa: OUTPUT«int8␤Can only parameterize array with a native type, not int8␤ in method parameterize at src/gen/m-CORE.setting:11365␤ in block <unit> at /tmp/WtIrYePnQs:1␤␤»
22:16 virtualsue joined
lizmat m: my \t = int8; say t.perl; my @a := array[t].new # ah, this does :-) 22:16
camelia rakudo-moar 997afa: OUTPUT«int8␤»
lizmat m: my \t = int8; say t.perl; my @a := array[t].new ; say @a.perl 22:17
camelia rakudo-moar 997afa: OUTPUT«int8␤array[int8].new()␤»
masak I wonder why those two are different, though? 22:18
lizmat m: my $t = int8; say $t.perl; my @a := array[nqp::decont($t)].new; say @a.perl # containerization 22:19
camelia rakudo-moar 997afa: OUTPUT«int8␤array[int8].new()␤»
22:19 ash_gti left
lizmat $t containerizes, \t doesn't 22:19
22:21 FROGGS left
raydiak m: my $t := int8; say my @a := array[$t].new 22:24
camelia rakudo-moar 997afa: OUTPUT«␤»
raydiak m: my $t := int8; my @a := array[$t].new; say @a
camelia rakudo-moar 997afa: OUTPUT«␤»
raydiak m: my $t := int8; my @a := array[$t].new; say @a.perl
camelia rakudo-moar 997afa: OUTPUT«array[int8].new()␤»
22:24 danaj joined, adu joined
lizmat raydiak: I was going for something like "for int8, int16, int32, int64 -> \t { ... } 22:25
22:26 adu left, adu joined 22:27 adu left
raydiak m: for int8, int16, int32, int64 { say array[$_].new.perl } 22:27
camelia rakudo-moar 997afa: OUTPUT«array[int8].new()␤array[int16].new()␤array[int32].new()␤array[int64].new()␤»
raydiak m: for int8, int16, int32, int64 -> $t { say array[$t].new.perl }
camelia rakudo-moar 997afa: OUTPUT«Can only parameterize array with a native type, not int8␤ in method parameterize at src/gen/m-CORE.setting:11365␤ in block <unit> at /tmp/xqlrQ3Jes8:1␤␤»
jnthn lizmat: Maybe there's a missing nqp::decont in .^parameterize
lizmat you mean the $t should have worked?
then I'll put a decont in there :) 22:28
jnthn lizmat: I think so, but I'm fixing deoptimizer bugs at the moment so I'm a tad distracted :)
lizmat sure, will try
jnthn my $t = int8; array[$t].new # I'd expect this to work out
lizmat I will make that work 22:29
sjn masak: hope you can come (and I do think I've already mentioned this to you, but it's a while ago)
eli-se Hello, world! 22:30
22:31 wicope left 22:33 rurban left
masak sjn: yes, probably. I've been... distracted. :) 22:33
raydiak oh! just saw the backlog... lizmat++ # CALL-ME 22:34
lizmat :-)
only 1 day later than I promised :-)
masak 'night, #perl6 22:35
lizmat gnight masak
raydiak night masak
lizmat: yeah geez, a day?! I'm not paying for service like....oh, wait :) 22:36
lizmat :-)
dalek kudo/nom: 4898d40 | lizmat++ | src/core/Int.pm:
Introduce $?BITS, number of bits of this arch
22:37
kudo/nom: 97215d0 | lizmat++ | src/core/native_array.pm:
Allow my $t = int8; my @a := array[$t].new to work
lizmat the $?BITS thing is really a balloon I'm letting up here :-) 22:38
22:38 flussence left 22:41 coffee` left
[Coke] so, nqp installings things into $dest/languages - ... can we relocate this to a more standard location? 22:43
*installs 22:44
18:44 < neverpanic> yeah, it shouldn't put stuff into $prefix/languages. That sounds like data that should be in $prefix/share/$name/languages 22:45
^^ from #macports
lizmat has done enough damage for today 22:48
sleep&
raydiak hrm...I think this rakudobrew run just hung on './perl6-m --target=mbc --output=lib/NativeCall.pm.moarvm lib/NativeCall.pm'
eli-se m: say $$
camelia rakudo-moar 97215d: OUTPUT«(Any)␤»
raydiak good night, lizmat
false alarm, maybe just my laptop trying to crash again 22:50
pmichaud nqp installed into $dest/languages solely because that was parrot's decree 22:52
(which I disagreed with)
so yes, nqp can absolutely move to a much more standard layout instead of trying to follow parrot's guidelines 22:53
surely $?BITS belongs somewhere other than top-level namespace... shouldn't it be an entry in $*VM or something like that? 22:54
lizmat: ^^^^
(yes, I see that lizmat has gone to sleep for the night; I'm simply tagging her here for backlogging)
22:54 flussence joined
jnthn +1 from me in making the layout distribution-compliant also. 22:55
22:55 raiph joined
pmichaud also just left a comment in the commit itself 22:55
22:56 virtualsue left, yqt left 22:58 spider-mario left 23:03 CurtisOvidPoe left 23:09 georgi left
jnthn sleep; 'night 23:11
raydiak gnight jnthn 23:12
23:15 georgi joined 23:21 muraiki joined 23:22 xiaomiao left 23:26 xiaomiao joined 23:29 iv left 23:30 iv joined 23:38 madmuid left 23:39 iv left 23:40 iv joined 23:48 Diederich joined 23:50 kurahaupo1 is now known as kurahaupo
eli-se is there some phaser like 23:55
NOT_LAST?
timotimo will NEXT do? 23:56
eli-se m: for 0..3 { NEXT { .say } }
camelia rakudo-moar 97215d: OUTPUT«0␤1␤2␤3␤»
eli-se no :v
I want 012 as output for that
Guess I can use a flag. 23:57
timotimo ah
eli-se m: my $last = false; for 0..3 { LAST { $last = true }; say $_ unless $last }
camelia rakudo-moar 97215d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mdmkEL55sp␤Undeclared routines:␤ false used at line 1␤ true used at line 1␤␤»
eli-se m: my $last = 0; for 0..3 { LAST { $last = 1 }; say $_ unless $last }
camelia rakudo-moar 97215d: OUTPUT«0␤1␤2␤3␤»
eli-se wait what
Oh the LAST phaser is executed after the loop body. 23:58
timotimo aye 23:59
that's when you can know