Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-15

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 mr-fooba_ joined #perl6
00:20 LonelyGM joined #perl6
00:49 LonelyGM joined #perl6
00:54 sirdancealot joined #perl6
00:56 bayprogrammer joined #perl6
00:56 LonelyGM moritz: nice blog post thanks for writing about it :)
01:02 xiaomiao joined #perl6
01:19 zacts joined #perl6
01:19 zacts what is feather?
01:21 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:22 Mouq 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 http://hack.p6c.org/ and have moved a lot of projects to that
01:22 zacts ah ok
01:22 zacts that's good, you still have something up
01:23 zacts perl6 isn't shutting down. o_O
01:23 Mouq TimToady: And then a plain :([$, $]) or :({$, :$}) is also unambiguously a subsig
01:23 Mouq So that doesn't change
01:32 adu joined #perl6
01:46 gfldex joined #perl6
01:58 raiph joined #perl6
02:39 ash_gti joined #perl6
02:39 dalek rakudo/nom: 7a9a4ca | usev6++ | src/Perl6/Grammar.nqp:
02:39 dalek rakudo/nom: Allow whitespace between named parameter and closing parenthesis for multi-name argument parsing
02:39 dalek rakudo/nom:
02:39 dalek rakudo/nom: fixes RT #123956
02:39 dalek rakudo/nom:
02:39 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123956
02:39 dalek rakudo/nom: Conflicts:
02:39 dalek rakudo/nom: src/Perl6/Grammar.nqp
02:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a9a4cadeb
02:41 Mouq If that was the first time I'd cherrypicked, does that mean my cherry was popped?
02:42 adu Mouq: lol
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
03:10 raiph joined #perl6
03:18 Patterner joined #perl6
03:20 noganex_ joined #perl6
03:36 laouji joined #perl6
04:02 FROGGS_ joined #perl6
04:11 laouji joined #perl6
04:28 nick1234 joined #perl6
04:42 laouji joined #perl6
05:04 laouji joined #perl6
05:12 laouji joined #perl6
05:22 laouji joined #perl6
05:44 anaeem1 joined #perl6
05:46 moritz \o
05:48 raydiak o/
06:01 bjz joined #perl6
06:34 petercommand joined #perl6
06:44 bjz joined #perl6
06:51 ash_gti joined #perl6
07:00 xfix joined #perl6
07:07 prime joined #perl6
07:28 wicope joined #perl6
07:29 Ugator joined #perl6
07:43 Rounin joined #perl6
07:52 smls joined #perl6
08:03 eli-se joined #perl6
08:04 [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␤»
08:04 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
08:04 TimToady that seems like an important distinction to me
08:05 eli-se hi
08:06 * [Tux] would love to see a Range type as a subclass of Pair where each pair is a $from => $to pair
08:07 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
08:09 [Tux] 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
08:09 [Tux] in my example, 5 6 7 is returned twice!
08:10 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 kaare__ joined #perl6
08:10 [Tux] that is why I said a new type based on Pairs
08:11 [Tux] which is most likely due to my lack of internal knowledge :)
08:11 [Tux] I though a range could be relatively easily implied as Pars
08:11 [Tux] Pairs
08:12 darutoko joined #perl6
08:12 [Tux] I took your note about my previous question in where you used .first under the condition that the list was sorted
08:12 [Tux] Pairs are easy to sort
08:13 [Tux] FWIW, I'm trying to make an implementation of RFC7111
08:18 * TimToady -> Transylvania &
08:41 rurban joined #perl6
08:44 anaeem1 joined #perl6
08:48 Mouq TimToady: Hm… that does seem like an important distinction to make… thanks for taking the time to consider the proposal :)
08:51 dalek roast: 459be82 | usev6++ | S06-signature/named-renaming.t:
08:51 dalek roast: Add test for RT #123956
08:51 dalek roast: review: https://github.com/perl6/roast/commit/459be82454
08:51 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123956
08:58 kjs_ joined #perl6
09:24 coffee` joined #perl6
09:38 rindolf joined #perl6
09:42 zakharyas joined #perl6
09:46 [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␤␤»
09:46 * [Tux] is puzzled
09:49 diana_olhovik joined #perl6
10:12 jnthn [Tux]: 1=>3 constructs a Pair, but your array needs a P
10:12 jnthn P is a Pair, but Pair isn't a P
10:12 [Tux] but P is Pair
10:13 [Tux] how do I construct P as being a superclass of Pair?
10:13 jnthn P is a *subtype* of Pair
10:14 jnthn I...don't really follow. That's not how inheritance works.
10:14 jnthn m: class P is Pair { };my P @p;@p.push(P.new(1, 3))
10:14 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␤␤»
10:14 jnthn ah
10:14 [Tux] I want to have P like Pair but with additional functionality
10:15 jnthn m: class P is Pair { };my P @p;@p.push(P.new(key => 1, value => 3))
10:15 camelia rakudo-moar 7a9a4c: ( no output )
10:15 jnthn [Tux]: Sure, but you need to then have a way to construct a P, not a Pair.
10:15 [Tux] grrrrr, niot intuitive, but I by now know how to do that
10:16 jnthn Well, if you want nice syntax for it, you can always introduce some kind of infix operator.
10:17 jnthn Or I guess you can re-define => :P
10:18 jnthn m: class P is Pair { }; sub infix:<< => >>($key, $value) { P.new(:$key, :$value) };  my P @p;@p.push(1 => 3)
10:18 camelia rakudo-moar 7a9a4c: ( no output )
10:19 molaf joined #perl6
10:19 [Tux] wouldn't that break all other kv pairs that are not of type P inside the same scope?
10:21 jnthn It'll make all of them P instead of Pair
10:21 jnthn If your subclass can't be used in place of its parent, then a subclass is the wrong design.
10:21 [Tux] indedd, not what I have in mind
10:24 pecastro joined #perl6
10:32 [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:35 jnthn @p.foo is a call on Array, not to P
10:35 jnthn m: class P { }; my P @a; say @a.WHAT
10:35 camelia rakudo-moar 7a9a4c: OUTPUT«(Array[P])␤»
10:36 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 :/
10:37 [Tux] a group
10:38 jnthn Then I'd probably write a class that contains pairs and write methods on that which do stuff on the group
10:39 [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:40 [Tux] and a list of (overlapping) ranges then might be like my Range @r = 1 => 1, 4 => 7, 3 => 5, 6 => 14, 19 => Inf;
10:41 [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 ?
10:42 jnthn Ah, no
10:42 [Tux] right. I looked at that
10:42 [Tux] the right and of my ranges should be able to be open-ended
10:44 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:54 jnthn [Tux]: I hacked this up: https://gist.github.com/jnthn/aabc5e604dbb75fd0d69
10:54 [Tux] thank you. I'll play with that
11:03 CurtisOvidPoe joined #perl6
11:04 CurtisOvidPoe m: multi sub postfix:<!> ( Int $x where * >= 0 ) { return [*] 1 .. $x; }; say -3!;
11:04 camelia rakudo-moar 7a9a4c: OUTPUT«-6␤»
11:04 CurtisOvidPoe Why is “* >= 0” ignored?
11:05 jnthn CurtisOvidPoe: Precedence?
11:05 jnthn m: multi sub postfix:<!> ( Int $x where * >= 0 ) { [*] 1 .. $x; }; say (-3)!
11:05 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 #perl6
11:06 CurtisOvidPoe That very much looks like a bug to me.
11:07 CurtisOvidPoe Though I can see how one could argue otherwise.
11:08 CurtisOvidPoe How would I fix the precedence on that?
11:09 jnthn Well, its your bug, not Perl 6's. It can't guess the right prec for you :P
11:09 jnthn m: multi sub postfix:<!> ( Int $x where * >= 0 ) is looser(&prefix:<->)  { [*] 1 .. $x; }; say -3!
11:09 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␤␤»
11:09 jnthn m: multi sub postfix:<!> ( Int $x where * >= 0 ) is looser(&prefix:<->)  { [*] 1 .. $x; }; say 3!
11:09 camelia rakudo-moar 7a9a4c: OUTPUT«6␤»
11:09 CurtisOvidPoe Cheers :)
11:10 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...
11:10 jnthn (for user-defined postfixes)
11:11 jnthn But I think the present one is right for a bunch of cases.
11:11 * vendethiel would agree
11:11 vendethiel I think you're better off with parentheses anyway, not to confuse every single user out there :)
11:12 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
11:12 jnthn FROGGS_: We actually have postfixes of different prec levels in the grammar.
11:12 FROGGS_ so ^42! and ^42.bang are not different
11:13 jnthn *nod*
11:13 jnthn Which is probably why the default is close to that
11:13 vendethiel m: sub foo { gather { take 1; take 2; }  }; say foo.perl
11:13 camelia rakudo-moar 7a9a4c: OUTPUT«(1, 2).list␤»
11:13 jnthn I think the default is to match that of postfix:<++> or so
11:19 eli-se joined #perl6
11:19 eli-se hi
11:20 vendethiel hi
11:21 Alina-malina joined #perl6
11:23 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:24 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:33 smls yikes, the 'famous' Perl 6 quicksort implementation (http://rosettacode.org/wiki/Sort​ing_algorithms/Quicksort#Perl_6 and also featured in jnthn's talks I think) produces a mess of a nested list:
11:33 smls >  say quicksort([0, 9, 3, 5, 1, 3, 5, 4, 9, 9]).perl;
11:33 smls ((), 0, ((((), 1, ()), 3, (((), 3, ((), 4, ())), 5, ((), 5, ()))), 9, ((), 9, ((), 9, ()))))
11:34 Alina-malina joined #perl6
11:34 tadzik ew
11:34 tadzik needs more flattening
11:34 smls yeah
11:35 smls 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?
11:37 jnthn Not at present, no
11:37 vendethiel or at least, not without an additional overload ;-)
11:37 kjs_ joined #perl6
11:37 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...
11:38 jnthn I've been wondering if constraint type check fails should report the constraint text
11:39 CurtisOvidPoe jnthn: Right now, if my constraints are non-obvious, it’s impossible for me to figure out why a constraint fails.
11:41 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:42 jnthn Or is that not the actual problem?
11:42 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:43 Ugator left #perl6
11:43 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:44 eli-se joined #perl6
11:44 jnthn CurtisOvidPoe: Hm, ok
11:45 * jnthn wonders if we actually keep that information at the moment
11:45 jnthn Ah, I think we must.
11:49 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:50 abhi24 joined #perl6
11:50 kjs_ joined #perl6
11:50 CurtisOvidPoe Ulti: 0 is not a positive number, so PositiveInt is out. NaturalNumber, however, should have been obvious to me. Brain cramp :)
11:51 Ulti well I guess its not obvious to everyone
11:52 Ulti just I keep reading it as DoubleNegativeInt
11:52 Ulti guess I'm just a bit too lazy to think nots through
11:53 Ulti but yeah I guess 0 is kind of annoying
11:53 Ulti hmmm does Perl6 have +0 and -0
11:54 abhi34 joined #perl6
11:55 Ulti nope
12:04 rjbs joined #perl6
12:04 rjbs Whose is perlgeek.de?
12:05 rjbs Aha, in the footer.
12:05 rjbs moritz: I think you want s/slags/slangs/ in your post on compilers being hard
12:05 vendethiel rjbs: moritz
12:07 jnthn oh wow, I read it and didn't even spot that
12:07 jnthn *lol*
12:12 CurtisOvidPoe Slags might be unfortunately appropriate there.
12:12 CurtisOvidPoe :)
12:15 dalek perl6-examples: e0e3885 | paultcochrane++ | categories/euler/prob00 (6 files):
12:15 dalek perl6-examples: [euler] document solutions to problems 7-9
12:15 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/e0e3885387
12:16 H2O1 joined #perl6
12:17 H2O1 left #perl6
12:22 lizmat CurtisOvidPoe: re http://irclog.perlgeek.de/p​erl6/2015-03-15#i_10281659 , the "is cached" implementation using .gist predates .gist being limited
12:22 CurtisOvidPoe lizmat: makes sense.
12:24 dalek rakudo/nom: 1a4ddb5 | lizmat++ | src/core/Exception.pm:
12:24 dalek rakudo/nom: Make X::Cannot::Infinite|Empty real exceptions
12:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a4ddb5da8
12:24 khisanth_ joined #perl6
12:24 alini joined #perl6
12:24 dalek roast: c81fd7d | lizmat++ | S03-sequence/basic.t:
12:24 dalek roast: Check for correct exception type
12:24 dalek roast: review: https://github.com/perl6/roast/commit/c81fd7d27d
12:25 moritz rjbs: typo fixed, thanks
12:25 molaf_ joined #perl6
12:27 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␤␤»
12:27 lizmat hmmm...
12:30 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␤␤»
12:30 lizmat as they are being called by Perl 6 under the hood ?
12:31 jnthn You could also quite usefully call them directly
12:32 lizmat true, but that also goes for AT-POS  :-)
12:32 jnthn To a greatly less degree
12:32 CurtisOvidPoe m: say sprintf "%d", 5'
12:32 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…»
12:32 jnthn *.succ is quite reasonable to use in a sequence
12:33 CurtisOvidPoe m: say sprintf “%d”, 5
12:33 camelia rakudo-moar 7a9a4c: OUTPUT«5␤»
12:33 FROGGS_ even with smart quotes :o)
12:34 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 :-)
12:36 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:37 smls 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:40 lizmat hmmm...  it appears that:
12:41 lizmat m: my int @a = ^10; say @a.pick(*)
12:41 camelia rakudo-moar 1a4ddb: OUTPUT«Memory allocation failed; could not allocate 656 bytes␤»
12:41 lizmat is looping inside the Any.pick candidate
12:41 jnthn Yes, .pick is still one of the many things on the native arrays todo list...though I'm curious why it loops.
12:41 lizmat it would work it it didn't loop
12:42 lizmat apparently, a .list on an array will not give you something that is a List ?
12:42 jnthn uhh
12:42 jnthn multi method pick()   { self.list.pick     }
12:42 jnthn A native array returns identity for .list
12:42 lizmat yeah, *that* works
12:43 jnthn Well, decontainerizing if needed.
12:43 lizmat m: my int @a = ^10; say @a.list.WHAT
12:43 camelia rakudo-moar 1a4ddb: OUTPUT«(array[int])␤»
12:43 jnthn Right.
12:43 lizmat which winds up in Any again
12:43 jnthn Correct.
12:43 diana_olhovik_ joined #perl6
12:44 jnthn .list is not .List
12:44 jnthn It means "give me something list-ish"
12:44 jnthn 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.
12:45 lizmat ok, so the reason for failure as 100% clear
12:45 jnthn Aye
12:45 lizmat I guess I missed that while backlogging
12:46 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 jnthn Anyway, I'd rather wait on this until we figure out a bit more where to re-organize stuff.
12:46 lizmat sure...
12:51 zakharyas joined #perl6
12:55 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:56 moritz a branch off of nom, I wanted to say
12:56 lizmat yeah, gotcha
12:56 lizmat moritz++
12:56 moritz richer-positional
12:58 jnthn train &
13:02 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…»
13:02 eli-se :(
13:02 eli-se NQAPL
13:03 lizmat .oO( unicode support does not imply APL support :-)
13:03 Ugator joined #perl6
13:05 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 ?
13:06 moritz lizmat: is that actually faster? I mean, instead is to do a lookup of an outer lexical
13:08 lizmat you're right, seems like a P5ism krept in there
13:08 * moritz benchmarks
13:09 lizmat yeah, difference of  about 7%
13:10 lizmat wonder what the difference in memory usage would be though
13:14 dalek rakudo/nom: 3af91ab | lizmat++ | src/core/Exception.pm:
13:14 dalek rakudo/nom: Make X::Cannot::Infinite more generally usable
13:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3af91ab626
13:14 dalek rakudo/nom: e9a895a | lizmat++ | src/core/ (3 files):
13:14 dalek rakudo/nom: Change more generic fails into typed exceptions
13:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9a895a6fd
13:16 dalek roast: 61f677c | lizmat++ | S02-types/WHICH.t:
13:16 dalek roast: Add X::Cannot::Empty|Infinite
13:16 dalek roast: review: https://github.com/perl6/roast/commit/61f677c5be
13:16 masak couldn't there be a very safe optimization that turned `anyloop { my $var; ... }` into `my $var; anyloop { ... }` ?
13:17 masak 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
13:17 masak yeah. just realized :)
13:17 masak we *can* do this. once we have escape analysis :)
13:18 masak which basically is blocking on jnthn and me sitting down and doing it.
13:18 vendethiel that, plus LICM would be amazing optimizations
13:18 lizmat masak: I guess it would be safer to optimize my $var; loop { $var = ... } to not have to look up each time
13:18 masak vendethiel: "LICM"?
13:18 vendethiel loop invariant code motion
13:18 * masak turns to google
13:18 vendethiel since we have functions tagged "pure", we can already move these out of the loop
13:18 moritz lizmat: fwiw the inner variable doesn't create more allocations
13:19 moritz at least not with a native var
13:19 lizmat ok, good to know
13:19 lizmat shall I optimize that, or will you?
13:19 lizmat *that being unique
13:20 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?
13:20 yoleaux lizmat: What kind of a name is "jnthn:"?!
13:20 masak ooh https://en.wikipedia.org/wik​i/Loop-invariant_code_motion
13:20 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?
13:20 yoleaux lizmat: I'll pass your message to jnthn.
13:21 masak vendethiel: I want to write a book about compilers. https://github.com/masak/compiler-book
13:21 masak vendethiel: partly to better learn about these things myself.
13:21 vendethiel seems like an amazing way to do that indeed :)
13:22 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:23 masak (the same way Knuth's TAoCP has MIX which helps ground things in the concrete; although I wouldn't want to target MIX)
13:24 vendethiel masak: right. you might be interested by this:https://github.com/estools/e​smangle/tree/master/lib/pass
13:25 moritz masak: great idea (re compiler book). I'll be happy to proof-read it for you :-)
13:26 dalek perl6-examples: 4e26dcf | paultcochrane++ | htmlify.pl:
13:26 dalek perl6-examples: Add function to extract author information from example file's POD
13:26 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/4e26dcfbbc
13:26 dalek perl6-examples: e507ee9 | paultcochrane++ | htmlify.pl:
13:26 dalek perl6-examples: Handle case when =TITLE exists but has no content
13:26 masak vendethiel: thank you, that looks intetesting.
13:26 dalek joined #perl6
13:26 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:27 vendethiel masak: the amazing part is: https://github.com/estools/esm​angle/tree/master/test/compare you can directly see what that directive did :)
13:27 masak ooh
13:27 masak clearly something I should copy!
13:28 zakharyas1 joined #perl6
13:29 moritz masak: speaking of distractable; what about the last Perl 6 Coding Contest? :-)
13:30 mustapha joined #perl6
13:31 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 spider-mario joined #perl6
13:31 masak moritz: now you reset the counter and will have to wait longer :P
13:34 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 :)
13:34 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?
13:35 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:36 jnthn (which is how I tend to work)
13:38 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 lizmat and a make t/spec/S09-typed-arrays/native*.t would test all of the native ones for you
13:38 jnthn ah, so you can diff 'em
13:38 lizmat yes
13:39 jnthn But not sure that helps in so far as they differe all over the place anyway :)
13:39 jnthn *differ
13:39 jnthn Hm, I don't know if that expansion works on Windows :P
13:39 masak moritz: as you should :)
13:39 lizmat well, diff in the sense of making sure a set of int tests is also done for num
13:39 lizmat *new int tests
13:39 jnthn If it makes it a lot easier for you, then go ahead.
13:40 lizmat that's why bag/baghash tests are separate as well
13:40 lizmat it would make it easier for me, yes
13:41 jnthn ok, then go for it
13:41 lizmat so I'll go ahead
13:41 eli-se joined #perl6
13:42 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?
13:42 lizmat [Tux]: there is no MAXINT
13:42 jnthn [Tux]: Given Int is bigint, the answer is like "how much memory do you have" :)
13:43 lizmat m: say int.Range
13:43 camelia rakudo-moar e9a895: OUTPUT«-9223372036854775808..9223372036854775807␤»
13:43 lizmat m: say int8.Range
13:43 camelia rakudo-moar e9a895: OUTPUT«-128..127␤»
13:43 lizmat m: say uint8.Range
13:43 camelia rakudo-moar e9a895: OUTPUT«0..255␤»
13:43 [Tux] Ah, inwhich case there should likely also be Inf for type Int ?
13:43 lizmat m: say Int.Range
13:43 camelia rakudo-moar e9a895: OUTPUT«-Inf..Inf␤»
13:43 masak m: say Complex.Range
13:43 camelia rakudo-moar e9a895: OUTPUT«No such method 'Range' for invocant of type 'Complex'␤  in block <unit> at /tmp/dUWC50YTlL:1␤␤»
13:44 masak seems legit.
13:44 jnthn hah :P
13:44 lizmat m: say UInt.Range
13:44 camelia rakudo-moar e9a895: OUTPUT«-Inf..Inf␤»
13:44 lizmat oops
13:44 [Tux] m: my Int $i = Inf;
13:44 camelia rakudo-moar e9a895: OUTPUT«Type check failed in assignment to '$i'; expected 'Int' but got 'Num'␤  in block <unit> at /tmp/QGrtQKlQ63:1␤␤»
13:44 eli-se m: map(*, Parcel(1, 2, Parcel(3, 4))).perl.say
13:44 camelia rakudo-moar e9a895: OUTPUT«(1, 2, (3, 4))␤»
13:44 [Tux] so Int.Range is confusing
13:44 eli-se Why doesn't this flatten?
13:44 eli-se I thought map flattened.
13:44 FROGGS_ [Tux]: yes, Int is meant to be able to store Inf
13:45 [Tux] so I hit a bug?
13:45 jnthn Argh
13:45 eli-se Oh, it flattens when assigning to an array.
13:45 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.
13:45 vendethiel m: for(*, Parcel(1, 2, Parcel(3, 4))).perl.say
13:45 camelia rakudo-moar e9a895: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gbSu0No7Qy␤Undeclared routine:␤    for used at line 1␤␤»
13:46 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
13:46 [Tux] :)
13:47 eli-se m: (1, 2, (3, 4)).map(*.Int).perl.say
13:47 camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
13:47 eli-se Okay, now I'm really confused.
13:47 eli-se (1, 2, (3, 4)).map(*).perl.say
13:47 eli-se m: (1, 2, (3, 4)).map(*).perl.say
13:47 camelia rakudo-moar e9a895: OUTPUT«(1, 2, (3, 4))␤»
13:47 * jnthn wonders what .map(*) actually does
13:47 * vendethiel grins
13:48 jnthn m: (1, 2, (3, 4)).map({ $_ }).perl.say
13:48 camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
13:48 [Tux] m: my Int $i = Int.Range[1]
13:48 camelia rakudo-moar e9a895: OUTPUT«Type check failed in assignment to '$i'; expected 'Int' but got 'Num'␤  in block <unit> at /tmp/ZQiRcM0HUs:1␤␤»
13:48 eli-se m: (3, 4).Int.perl.say
13:48 camelia rakudo-moar e9a895: OUTPUT«2␤»
13:50 eli-se what are parcels used for?
13:50 vendethiel internal things
13:50 eli-se seems like passing them around can horribly break generic code
13:50 eli-se OIC
13:52 eli-se how about arrays vs lists?
13:52 jnthn Parcel is also menat to get unified with List in the not too distant future
13:52 eli-se m: (1, 2, (3, 4).list).list.map(*.WHAT).perl.say
13:52 camelia rakudo-moar e9a895: OUTPUT«(1, 2, 3, 4).list␤»
13:52 dalek rakudo/nom: a8d2509 | lizmat++ | src/core/Int.pm:
13:52 dalek rakudo/nom: Fix UInt.Range
13:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8d2509c23
13:52 jnthn An Array is a bunch of mutable containers that grows on assignment
13:53 vendethiel array vs list? array is itemized
13:53 eli-se m: (1, 2, (3, 4).list).list.map({.WHAT}).perl.say
13:53 camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Int, Int).list␤»
13:53 eli-se This is confusing. Why does map flatten the inner list?
13:54 CurtisOvidPoe joined #perl6
13:54 moritz it won't, in future. .for will continue to flatten.
13:54 eli-se Nice.
13:54 eli-se How about for loops?
13:55 vendethiel flattens
13:55 jnthn Use .for
13:55 vendethiel jnthn: we have .for but not for()? :p
13:56 eli-se This really sounds like a debugging nightmare.
13:56 eli-se What if you want an ordered container that never flattens anywhere?
13:56 vendethiel use an itemized list. an array
13:56 lizmat prefix with $
13:57 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>␤»
13:57 vendethiel m: (1, 2, [3, 4]).for({.WHAT}).perl.say
13:57 camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Array).list␤»
13:57 vendethiel eli-se: ^
13:57 eli-se m: [1, 2, [3, 4]].map({.WHAT}).perl.say
13:57 camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Array).list␤»
13:57 eli-se cool
13:58 vendethiel m: say %(a => 'b').perl; say {a => 'b'}.perl
13:58 camelia rakudo-moar e9a895: OUTPUT«("a" => "b").hash␤{"a" => "b"}␤»
13:58 vendethiel m: (1, 2, (a => 'b').hash).map({.WHAT}).perl.say; (1, 2, {a => 'b'}).map({.WHAT}).perl.say;
13:58 camelia rakudo-moar e9a895: OUTPUT«(Int, Int, Pair).list␤(Int, Int, Hash).list␤»
13:58 vendethiel eli-se:  ^
13:59 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␤»
13:59 lizmat ooh, wow?
13:59 eli-se m: for ({$_}, {.list}) { say [+] $_([1, 2, 3, 4, 5]) }
13:59 camelia rakudo-moar e9a895: OUTPUT«5␤15␤»
13:59 lizmat m: my uint8 @a = (-5 .. 5); say @a
13:59 camelia rakudo-moar e9a895: OUTPUT«251 252 253 254 255 0 1 2 3 4 5␤»
13:59 vendethiel m: my uint $foo = -3;
13:59 camelia rakudo-moar e9a895: ( no output )
13:59 vendethiel m: my uint $foo = -3; say $foo
13:59 camelia rakudo-moar e9a895: OUTPUT«-3␤»
14:00 jnthn lizmat: I think it just doesn't know what to do with unit yet
14:00 lizmat yeah, looks like
14:00 jnthn There's still a bunch of nyi around the unsigned types
14:00 lizmat but the uint8 behaviour is correct?
14:00 lizmat or should it blow on:
14:01 lizmat m: my uint8 $a = -3; say $a'
14:01 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…»
14:01 lizmat m: my uint8 $a = -3; say $a
14:01 camelia rakudo-moar e9a895: OUTPUT«-3␤»
14:01 masak lizmat: feel free to submit a NYI rakudobug
14:01 lizmat m: my uint8 @a = -3; say @a
14:01 camelia rakudo-moar e9a895: OUTPUT«253␤»
14:01 vendethiel m: say [+] [1, 2, 3]  # eli-se
14:01 camelia rakudo-moar e9a895: OUTPUT«3␤»
14:01 eli-se Yes.
14:01 [Sno] how is the dynamic loading (with API ...) named when Perl6 runs in jvm?
14:02 eli-se m: say [+] @([1, 2, 3])
14:02 camelia rakudo-moar e9a895: OUTPUT«6␤»
14:02 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.
14:02 eli-se Is @ like .list?
14:02 vendethiel yes
14:02 [Tux] m: Int.Range[1].say
14:02 camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
14:02 [Tux] -Inf??
14:02 jnthn [Tux]: (-Inf).succ is probably still -Inf.
14:02 [Sno] jnthn: I mean, is it called dynaloader oder nativeloader ...
14:03 lizmat m: say Range.new(-Inf,Inf)[1]   # the problem is with Range
14:03 camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
14:03 [Sno] I intend to do some bikeshedding in Berlin with FROGGS_ ;)
14:03 jnthn [Sno]: The NativeCall library for calling native code has the same API on Moar and JVM
14:03 lizmat m: say Range.new(-Inf,Inf).AT-POS(1)
14:03 camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
14:03 [Sno] "NativeCall" was the answer I search for, thanks ;)
14:03 jnthn [Sno]: On JVM there's additoinally a bunch of JVM interop stuff for calling Java tings.
14:04 jnthn *things
14:04 lizmat m: say Range.new(-Inf,Inf).AT-POS(12345)
14:04 camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
14:04 jnthn lizmat: What would you expect it to do other than what it currently does?
14:05 jnthn m: say -Inf + 1
14:05 camelia rakudo-moar e9a895: OUTPUT«-Inf␤»
14:05 lizmat it should probably blow up on ranges that start at -Inf
14:05 [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 ;)
14:05 lizmat or maybe not
14:05 [Sno] so silently add Perl6 into that Java app
14:05 lizmat hmmm....
14:06 jnthn [Sno]: Sneaky :)
14:06 [Sno] and therefore we need the stuff I talked with FROGGS_ and nine_ on FOSDEM
14:06 [Sno] checks and maps at install time for platform to have correct type mapping
14:07 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/␤»
14:07 smls ^^ how can I use a varible in a regex quantifier like that?
14:07 eli-se My favourite Perl 6 code is still "1 xx * Z+< 0..*" :D
14:08 moritz smls: {$n} iirc
14:08 jnthn m: my $n = 3; say "a bcd ef" ~~ /\w ** {$n}/
14:08 camelia rakudo-moar e9a895: OUTPUT«「bcd」␤»
14:11 smls ok, thanks
14:12 dalek roast: 7495dca | lizmat++ | S09-typed-arrays/native (3 files):
14:12 dalek roast: Split off native int|num specific tests
14:12 dalek roast: review: https://github.com/perl6/roast/commit/7495dca575
14:12 * [Tux] would love to be able to store Inf in Int
14:13 dalek rakudo/nom: c7b9340 | lizmat++ | t/spectest.data:
14:13 dalek rakudo/nom: Split off native int|num specific tests
14:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c7b9340e88
14:14 raiph joined #perl6
14:16 abraxxa joined #perl6
14:17 lizmat m: my constant MAXINT = int.Range.max; say MAXINT   # [Tux]
14:17 camelia rakudo-moar a8d250: OUTPUT«9223372036854775807␤»
14:18 [Tux] I meanwhile found out that having 19..Inf in a list is something very different from having 19..9223372036854775807
14:18 [Tux] the latter not being very lazy
14:21 [Tux] m: my @i = 0 .. Inf;
14:21 camelia rakudo-moar a8d250: ( no output )
14:21 [Tux] m: my @i = 0 .. 9223372036854775807;
14:21 camelia rakudo-moar a8d250: OUTPUT«(timeout)»
14:22 masak yup.
14:22 masak I guess that's the "mostly eager" behavior of array assignment.
14:22 lizmat ok, so bad idea  :-(
14:23 dalek rakudo/nom: 1fdb769 | lizmat++ | src/core/Int.pm:
14:23 dalek rakudo/nom: Unbust Int.Range
14:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1fdb7691bd
14:23 dalek Heuristic branch merge: pushed 24 commits to rakudo/newio by lizmat
14:25 lizmat afk for a few hours&
14:32 darutoko joined #perl6
14:35 [Sno] lizmat: I miss your reply at nrpm ...
14:35 lizmat we'll be there
14:35 [Sno] \o/
14:40 eli-se joined #perl6
14:44 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:45 smls Because I am dabbling with some mockups right now
14:45 smls Nothing to show yet, but would like to avoide duplicate work if anyone else in working/thinking about it too
14:47 smls (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:48 eli-se smls: especially get rid of the typo in the very first sentence of the about page :P
14:48 smls :P
14:49 smls my idea is more along the lines of, replace it with completely new content
14:51 masak smls: yes! \o/
14:51 smls yes you approve, or yes you're also working on ideas for it?
14:52 masak yes, I approve
14:52 eli-se also the webdesign?
14:52 masak I approve of the redesign, yes
14:53 masak judging by https://www.python.org/, http://www.perl.org/, and https://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.
14:53 smls PS: Haskell apparently redesigned theirs not too long ago, and have this insightful write-up: http://chrisdone.com/posts/haskell-lang
14:53 smls so anyone who wants to help should imo start by reading that :)
14:54 masak smls++
14:55 eli-se I like Go's website in terms of non-destractiveness and clarity.
14:56 rmgk_ joined #perl6
14:56 virtualsue joined #perl6
14:57 smls eli-se: Yeah, though I think one can have both clarity and prettiness at the same time.
14:58 * masak .oO( is "destractiveness" where they, like, *both* distract you and destroy you? ) :P
14:59 madmuid joined #perl6
15:08 Ugator joined #perl6
15:11 eli-se joined #perl6
15:15 CurtisOvidPoe joined #perl6
15:20 eli-se I don't really mind Perl's website either, btw.
15:20 eli-se perl.org
15:26 BenGoldberg joined #perl6
15:27 masak agreed.
15:28 masak it's perhaps the most "formal" of the three (pl/py/rb)
15:28 masak but that doesn't necessarily detract from my opinion of it
15:28 masak it's waaaay better than what preceded it :)
15:31 * masak ownders if it's the old perl.org or the new one that gets criticism at http://chrisdone.com/posts/haskell-lang
15:31 masak probably the new one, since the post is from 2014-05-29
15:33 eli-se Java has the very worst website. :P
15:34 masak heh. mostly when you try to download Java.
15:35 eli-se we should ship Ask Toolbar with Perl 6
15:37 vendethiel *g*
15:37 vendethiel *and* a bitcoin miner!
15:37 jnthn Only in the Enterprise Edition :P
15:42 timotimo yeah, only target users that ar elikely to have very beefy machines; and many of them
15:42 timotimo for the bitcoin miner, i mean
15:42 timotimo hm, other than that, i seem to recall bitcoin is easy to mine on a GPU?
15:42 timotimo so maybe we should target gamers, too
15:43 jnthn heh. "Perl 6 for game dev: let us help you exploit your GPU" :P
15:43 eli-se And web hosting companies.
15:44 eli-se 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 :)
15:46 timotimo libraries ... not such a terribly hard thing to get; just a bunch of work
15:47 jnthn Sure. Maybe we'll even have a slang for such things some day too :)
15:47 timotimo that'd be nice
15:48 timotimo write your stuff in almost-perl6 and get a kernel for opencl
15:48 japhb .oO( use Inline::OpenCL; )
15:49 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
15:49 eli-se so Perl 6 must surely be possible :P
15:51 timotimo someone with an alot of interest could have a look at the specification of SPIRV
15:55 geever joined #perl6
16:03 japhb .oO( My fuzzy, fuzzy alot, how I love him ... )
16:07 masak I like the one made of beer.
16:07 masak also, I am sometimes surprised and saddened at how many eagles there are online.
16:08 vendethiel eagles?
16:08 jnthn Hey, the internet isn't just for humans :P
16:10 dalek perl6-roast-data: 74c8344 | coke++ | / (9 files):
16:10 dalek perl6-roast-data: today (automated commit)
16:10 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/74c8344eb2
16:13 masak vendethiel: http://hyperboleandahalf.blogspot.se/2010/04​/alot-is-better-than-you-at-everything.html
16:14 vendethiel masak: i have no problem with people making spelling mistakes ;)
16:15 masak didn't say I had a problem with it ;)
16:15 masak only said that they could be eagles :P
16:15 vendethiel alright!
16:16 * jnthn tries not to make alot of mistakes :P
16:16 jnthn .oO( And I'll try to make alot less mistakes in the future :P )
16:16 masak dang, jnthn beat me to it :P
16:17 * masak tries not to be a prescriptivist, dammit
16:19 eli-se I think .perl should return an AST instead of a string.
16:20 eli-se Or .perl-ast an AST, and .perl calls .perl-ast returning a string
16:25 eli-se Strings don't compose, they compost. ASTs can be trivially nested without worrying about operator precedence rules.
16:26 jnthn The point of .perl isn't really for program manipulation
16:27 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
16:27 jnthn The stuff masak++ is planning for program manipulation is AST based
16:27 eli-se But currently you have to parenthesize everything if you use operators in .perl
16:28 eli-se because of precedence issues
16:29 eli-se like if you want to method perl { $a.perl ~ " + " ~ $b.perl } you have to do method perl { "(" ~ $a.perl ~ " + " ~ $b.perl ~ ")" }
16:29 eli-se if you returned an AST that issue wouldn't be there since the AST-to-string function would take care of that generically
16:29 eli-se there may be other issues with Perl 6's context-sensitive grammar
16:33 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"?!
16:33 moritz erm
16:33 moritz .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.
16:33 yoleaux moritz: I'll pass your message to smls.
16:43 Rounin joined #perl6
16:51 ugexe is p5 needed by rakudo after its installed?
16:52 vendethiel no
16:52 vendethiel at least it hasn't been for me
16:53 moritz ugexe: no
16:53 ugexe ah. how does star work? does it just fat pack Configure.pl?
16:53 ugexe (on windows)
16:55 jnthn Works same on Windows as anywhere else, pretty much
16:55 jnthn But most Windows users probably use the MSI
16:57 FROGGS_ ugexe: we use this to build the msi http://wixtoolset.org/documentatio​n/manual/v3/overview/alltools.html
16:58 FROGGS_ we basically candle + light + heat + nmake install
17:00 eli-se joined #perl6
17:01 ugexe ah. i dont understand what any of this is but its what i was looking for :)
17:01 xinming joined #perl6
17:02 Possum joined #perl6
17:06 diana_olhovik_ joined #perl6
17:08 perl6_newbee joined #perl6
17:14 moritz black magic, smoke and mirrors
17:14 ugexe i like black magic and smoke
17:15 moritz like all build systems, really
17:21 CurtisOvidPoe joined #perl6
17:30 kjs_ joined #perl6
17:32 TimToady arrived in Transylvania
17:33 raiph joined #perl6
17:37 rindolf TimToady: awesome.
17:38 rindolf TimToady: Amalia Aida P-something has been "spamming" the Facebook groups about the Cluj.pm event.
17:40 [Tux] https://travis-ci.org/Tux/CSV :)
17:50 bjz joined #perl6
17:50 diakopter left #perl6
18:03 LonelyGM joined #perl6
18:05 arnsholt masak: My boss is secretly an eagle. The only things he capitalizes when writing is TLAs; even names are lowercased
18:09 skids joined #perl6
18:18 eli-se joined #perl6
18:21 kjs_ joined #perl6
18:22 beastd joined #perl6
18:38 adu joined #perl6
18:41 smls joined #perl6
18:45 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.
18:46 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?
18:48 smls (which is you?)
18:50 KCL_ joined #perl6
18:54 dalek perl6-examples: 616a279 | paultcochrane++ | categories/euler/prob014-felher.pl:
18:54 dalek perl6-examples: [euler] reduce progress output verbosity in problem 14
18:54 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/616a279f38
18:54 dalek perl6-examples: d85c436 | paultcochrane++ | categories/euler/prob01 (10 files):
18:54 dalek perl6-examples: [euler] document solutions to problems 10-19
18:54 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/d85c436618
18:56 hoelzro o/ #perl6
18:56 smls love the 'neon Larry pictogram' in the cluj.pm banner btw ;) http://cluj.pm/events/larrywallbanner.jpg
18:57 smls hi hoelzro
18:57 FROGGS_ *g*
18:57 FROGGS_ cluj++
18:58 eli-se smls: awesome
18:59 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 hoelzro it's here: https://gist.github.com/ho​elzro/bd4608729d7be342ccda
19:00 hoelzro 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:02 FROGGS_ eeeks, there is a precomp bug about 'is DEPRECATED'
19:02 mr-foobar joined #perl6
19:07 TimToady eli-se: re http://irclog.perlgeek.de/p​erl6/2015-03-15#i_10282388 y'know, that can more readably be written 1,2,4...*
19:08 georgi joined #perl6
19:08 eli-se yeah
19:08 eli-se but that's not cryptic enough :P
19:08 eli-se this is Perl after all
19:09 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:13 beastd joined #perl6
19:15 vendethiel eli-se: that's a pretty amazing piece of code
19:19 molaf joined #perl6
19:25 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/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15614  (/home/camelia/…»
19:25 bartolin m: my Str @a = (1, 2); 1
19:25 camelia rakudo-moar 1fdb76: ( no output )
19:26 bartolin why didn't the second command not blow up like the first?
19:27 bartolin s/not//
19:28 yqt joined #perl6
19:29 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-…»
19:29 psch m: my Str $x = "foo"; 1; # similarly
19:29 camelia rakudo-moar 1fdb76: ( no output )
19:29 TimToady m: { my Str @a = (1, 2); 1 }; 1
19:29 camelia rakudo-moar 1fdb76: ( no output )
19:29 psch eh
19:29 psch no
19:29 psch o.o
19:29 TimToady looks like a bug relating to explicit sinking somehow
19:29 psch what was i even thinking
19:30 psch m: my Str @a = 1, 2; 1; @a[0]
19:30 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…»
19:30 TimToady m: sink my Str @a = (1, 2);
19:30 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.…»
19:30 psch that points to laziness, doesn't it?
19:30 lizmat hoelzro: looking at the Channel thing
19:30 TimToady m: lazy my Str @a = (1, 2);
19:30 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/r​untime/CORE.setting.moarvm:throw:4294967295)␤ from src/gen/m-CORE.setting:15614  (/home/camelia/…»
19:30 hoelzro lizmat: thanks, I've golfed it down if you'd prefer that
19:30 psch i.e. the array assignment is lazy, and the 1 in sink context makes it not care?
19:31 TimToady pseudo assignment should be eager on my (though not on constant)
19:31 * psch mentally shoves that on the "GLR-problems" heap
19:32 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␤»
19:32 TimToady well phoo
19:32 * bartolin looks around for masak
19:32 * TimToady thinks our should at least allow identical type assignments
19:33 TimToady /assignments/constraints/
19:33 lizmat hoelzro: that feels like an improper use of a Channel
19:34 hoelzro lizmat: oh, ok; what's the proper way to feed a bunch of jobs to multiple workers?
19:34 lizmat checking  :-)
19:35 grondilu joined #perl6
19:45 lizmat hoelzro: well, I think you hit the nail on the head  :-)
19:46 telex joined #perl6
19:47 smls_ joined #perl6
19:48 Maxwell joined #perl6
19:48 Maxwell is this channel better than #perl5?
19:49 lizmat depends on what you mean by better...   but perhaps friendlier  :-)
19:50 Maxwell I want to talk to like minded people who are not sensistive
19:50 Maxwell sensitive*
19:50 * vendethiel shrugs
19:51 smls joined #perl6
19:51 diana_olhovik_ joined #perl6
19:52 amaliapomian joined #perl6
19:52 raydiak good afternoon, fellow cognizant entities
19:52 TimToady we are very sensitive :)
19:52 TimToady that's supposed to be a good thing :)
19:52 hoelzro lizmat: I did?
19:53 lizmat yeah....   only one will ever see the CHANNEL_CLOSE message
19:53 hoelzro lizmat: so that's a bug?
19:53 lizmat yeah
19:53 hoelzro ok, I'll RT that up!
19:54 Maxwell I mean like emotionally sensitive.
19:54 TimToady we have thick skins except when people are mean on purpose :)
19:55 Maxwell Yeah, that's reasonable.
19:55 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.
19:56 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.␤»
19:57 Maxwell bots?
19:57 hoelzro lizmat: thanks for sanity checking that for me
19:58 lizmat testing a fix now
19:58 TimToady hugme: hug Maxwell
19:58 * hugme hugs Maxwell; TimToady++
19:58 smls moritz: Alright, no "recommended Perl 6 video of the day" section then ;)
20:00 TimToady Maxwell: there are 5 bots on at the moment
20:00 dalek rakudo/nom: f19bea1 | lizmat++ | src/core/Channel.pm:
20:00 dalek rakudo/nom: Handle when not the first to see a closed Channel
20:00 dalek rakudo/nom:
20:00 dalek rakudo/nom: Pointed out by hoelzro++
20:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f19bea15d1
20:01 TimToady there's a third one
20:01 lizmat hoelzro: I'm not sure this will be race condition proof
20:01 Maxwell What is the bots purpose?
20:01 lizmat perhaps the close / fail message should remain in the queue
20:01 TimToady .u ☺
20:01 yoleaux U+263A WHITE SMILING FACE [So] (☺)
20:01 * hoelzro tries against test
20:01 TimToady there's a 4th one
20:01 hoelzro lizmat: I'm not sure either
20:02 hoelzro I'm wondering if this sort of thing may need to be pushed down into the VM level
20:03 TimToady Maxwell: camelia is for evaluating Perl 6 expressions, yoleaux passes messages and looks up unicode
20:03 TimToady hugme just hugs mostly
20:03 lizmat hoelzro: could well be
20:03 TimToady dalek reports github updates
20:03 TimToady and ilogger2 keeps a log of this channel
20:04 TimToady other than that, we're mostly just Real People™
20:05 TimToady (if the last character was a TM you need to set utf-8 mode on your client)
20:05 TimToady *wasn't
20:05 TimToady looks like my n't key is flaking out again...
20:08 Maxwell Where does yoleaux pass messages?
20:08 TimToady back here
20:09 TimToady .tell Maxwell Here's a message.
20:09 yoleaux TimToady: I'll pass your message to Maxwell.
20:09 TimToady now say something
20:09 Maxwell hola
20:09 yoleaux 20:09Z <TimToady> Maxwell: Here's a message.
20:09 lizmat .botsnack
20:09 yoleaux :D
20:10 Maxwell so why does he look up unicode
20:10 TimToady curiosity, I suppose
20:10 Maxwell bots aren't that smart (;
20:11 TimToady we do tend to use an amount of Unicode around here
20:11 dalek rakudo/nom: 2b20dcb | lizmat++ | src/core/Channel.pm:
20:11 dalek rakudo/nom: Close channel when we actually receive the message
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2b20dcb83e
20:11 TimToady m: .say for 1,2,3
20:11 camelia rakudo-moar f19bea: OUTPUT«1␤2␤3␤»
20:11 TimToady there should be NL character after each number there
20:11 TimToady .u 2424
20:11 yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
20:11 moritz there is
20:11 Maxwell I believe most of the world uses unicode
20:12 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
20:13 lizmat jnthn: please check my last 2 commits to Channel.pm  it fixes hoelzro's issue, but feels wrongish
20:14 hoelzro lizmat: excellent!
20:14 TimToady I guess there's synopsebot there too, but it doesn't have a + for some reason
20:15 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:16 lizmat jnthn: it feels to me the last control message should be left in the queue for any reader to see
20:17 lizmat hoelzro: seems my fixes broke some channel tests  :-(
20:18 hoelzro =(
20:18 Maxwell \(^_^)/
20:19 LonelyGM o/
20:19 FROGGS_ O.o
20:20 TimToady LonelyGM: fancy meeting you here
20:22 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:23 LonelyGM already being addicted to #perl6 IRC...
20:23 TimToady we had some very nice sausage and cheese from the market in Budapest for dinner :)
20:24 LonelyGM I'm glad about that :) well something has to be turned to code
20:25 masak bartolin: you were looking around for me earlier?
20:26 bartolin masak: i was half joking. there is a bug to be reported.
20:26 bartolin masak: I'll do it (though it may take some time)
20:26 dalek rakudo/nom: ddea517 | lizmat++ | src/core/Channel.pm:
20:26 dalek rakudo/nom: Better solution to multiple readers issue
20:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ddea517940
20:27 bartolin m: my Str @a = (1, 2); say "alive" # this one -- extracted from RT #122440
20:27 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122440
20:27 camelia rakudo-moar f19bea: OUTPUT«alive␤»
20:27 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
20:28 masak bartolin++ # reporting
20:28 hoelzro lizmat: seems reasonable to me
20:30 jnthn evening, #perl6
20:31 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 rakudo/nom: 8208e5a | lizmat++ | src/core/Channel.pm:
20:31 dalek rakudo/nom: Be more correct in copying CHANNEL_CLOSE
20:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8208e5ae48
20:32 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.
20:33 lizmat well, that would work by having 2 workers put it into the same Supply, no ?
20:34 lizmat we could even make a method for that: Supply.collect-Channels
20:34 lizmat or something like that ?
20:36 lizmat hoelzro: could you add a test for this to t/spec/S17-channel/basic.t ?
20:37 hoelzro lizmat: sure!
20:37 lizmat ++hoelzro
20:37 pyrimidine joined #perl6
20:38 hoelzro lizmat: is it acceptable if a failed test exit()s?  I don't know of another way to signal failure here
20:38 hoelzro (I will fail() as well)
20:38 hoelzro er, whatever Test::fail is in Perl 6
20:38 hoelzro I always forget
20:38 lizmat fine for a start  :-)
20:39 hoelzro ah yes, flunk
20:39 geever joined #perl6
20:39 lizmat hmmm... I guess #124071 can now be marked as closed ?
20:39 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124071
20:40 hoelzro didn't I already close it?
20:40 lizmat could be, I just got the mail for the first time
20:45 lizmat seems resolved now  :-)
20:47 dalek rakudo-star-daily: 37ab0d0 | coke++ | log/ (9 files):
20:47 dalek rakudo-star-daily: today (automated commit)
20:47 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/37ab0d0e64
20:49 timotimo lizmat: don't forget, supplies run their tap's code on the same thread the data is put in
20:49 timotimo lizmat: so you won't actually solve the multiple-subscriber problem
20:54 dalek roast: 7c26cef | hoelzro++ | S17-channel/basic.t:
20:54 dalek roast: Add two workers one channel test
20:54 dalek roast:
20:54 dalek roast: See also RT #124071
20:54 dalek roast: review: https://github.com/perl6/roast/commit/7c26cef8cf
20:54 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124071
20:55 [Coke] did that get a test in roast before it was closed?
20:55 lizmat [Coke]: no
20:56 kjs_ joined #perl6
20:56 hoelzro [Coke]: are you talking about #124071? I just added a test for it
20:56 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=124071
20:56 [Coke] hoelzro++ lizmat++
20:57 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␤␤»
21:01 dalek rakudo/nom: bba8a3a | lizmat++ | / (11 files):
21:01 dalek rakudo/nom: .invoke is now CALL-ME
21:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bba8a3a497
21:01 lizmat raydiak:  ^^^
21:05 danaj joined #perl6
21:06 FROGGS joined #perl6
21:08 kurahaupo1 joined #perl6
21:11 raiph joined #perl6
21:14 dalek roast: 1ec9d7e | lizmat++ | S17-channel/ (2 files):
21:14 dalek roast: Fix some Supply.for deprecation messages
21:14 dalek roast: review: https://github.com/perl6/roast/commit/1ec9d7e59c
21:22 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␤»
21:23 dalek rakudo/nom: 997afa3 | lizmat++ | src/core/Channel.pm:
21:23 dalek rakudo/nom: Do something with e.g. Channel.list(:wait(.5))
21:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/997afa31eb
21:23 FROGGS bugs*
21:23 FROGGS m: say 1.fmt('%#08b')
21:23 camelia rakudo-moar bba8a3: OUTPUT«000000b1␤»
21:23 sjn \o
21:24 FROGGS hi sjn
21:24 * sjn just learned of something called "The Blub Paradox" o_O
21:24 sjn http://c2.com/cgi/wiki?BlubParadox
21:25 * sjn hopes this may be interesting for someone here :)
21:27 masak sjn: it's from an old Paul Graham article.
21:28 masak (though the c2 link probably says that) :)
21:28 spider-mario I like Paul Graham’s articles
21:28 spider-mario apparently, some people think he’s crazy
21:28 spider-mario but isn’t that a great sign of genius? :)
21:29 masak there's probably positive correlation, yes
21:29 sjn masak: yeah, interesting thoughts, though..
21:29 masak sjn: I agree.
21:29 sjn (learned about it here: https://youtu.be/csyL9EC0S0c)
21:30 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 masak sjn: basically any group who see a big, stupid language being the market leader and want to feel better about that.
21:31 masak (about their favorite language not being as popular, I mean)
21:31 sjn well... sure
21:32 sjn 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?
21:32 masak smugness? heaven forbid!
21:33 masak we're, like, the most humble community on the planet!
21:33 spider-mario yes, of course :)
21:33 sjn by far! :)
21:33 masak others don't even come close!
21:34 FROGGS :P
21:34 sjn we're so obviously more humble, it's a mystery why not more people understand our superior humblitude. :)
21:34 spider-mario but I mean seeing certain aspects of other languages as shortcomings because those language lack something we are used to
21:35 * sjn got to think of Damian's description of Perl 6 when gave a talk in Oslo recently
21:35 sjn "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."
21:35 vendethiel did he really say that?
21:35 vendethiel lol
21:35 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.
21:35 vendethiel (I mean -- something along thsoe lines)
21:36 sjn Second paragraph:
21:36 spider-mario yes, I know
21:36 sjn "Unfortunately, for the majority of us, those incredible new features are mostly just mysterious, scary, and off-putting.
21:36 spider-mario but don’t we perl6 users, just like haskell/lisp/etc. users, see some other languages as blubs?
21:36 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."
21:37 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*
21:37 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."
21:37 masak sjn: I think I'll start referring to Perl 6 as a "new (but eerily familiar)" language :)
21:38 masak TheDamian++
21:38 spider-mario I’ll call it a cosmic language, now
21:38 spider-mario thanks for the idea
21:38 masak ya can't be blub if you're cosmic
21:38 spider-mario I suppose it was the logical next step, after listening to cosmic music
21:38 sjn hehe
21:40 sjn masak, jnthn, pmichaud: you guys wanna submit a talk for OSDC.no? :) (same goes for anyone else here, really :)
21:42 sjn arnsholt has already submitted a talk :D
21:47 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:48 spider-mario :)
21:48 spider-mario I like puns
21:48 spider-mario so obviously, I like that line.
21:49 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 spider-mario and P5 really wasn’t as “bad” as I thought even compared to P6
21:50 spider-mario a lot of what I loved about P6 was already there
21:50 masak sjn: when's OSDC.no? url?
21:50 dabockster joined #perl6
21:51 masak spider-mario: agreed -- Perl 5 is a surprisingly solid language.
21:52 jnthn .oO( Say yes to OSDC.no )
21:54 * masak .oO( we made him an offer he couldn't say OSDC.no to )
21:55 CurtisOvidPoe joined #perl6
21:57 [Coke] surprisingly?
22:03 sjn masak: OSDC.no has it's url embedded in it's name :D
22:04 sjn just add some letters and slashes and a colon in front of it
22:07 flussence joined #perl6
22:08 masak :)
22:09 masak my browser does that for me these days
22:09 masak ah. May 8-10
22:11 ash_gti joined #perl6
22:13 masak sjn: I'm tempted. I'll confer a bit with @family, and think a bit on what to submit.
22:14 masak [Coke]: surprisingly, given that the Perl 6 effort was deemed necessary.
22:15 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.
22:15 masak or, differently, even as an avid sixer I can't really make myself dislike Perl 5 ;)
22:16 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 #perl6
22:16 lizmat m: my \t = int8; say t.perl; my @a := array[t].new   # ah, this does  :-)
22:16 camelia rakudo-moar 997afa: OUTPUT«int8␤»
22:17 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()␤»
22:18 masak I wonder why those two are different, though?
22:19 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 lizmat $t containerizes, \t doesn't
22:24 raydiak m: my $t := int8; say my @a := array[$t].new
22:24 camelia rakudo-moar 997afa: OUTPUT«␤»
22:24 raydiak m: my $t := int8; my @a := array[$t].new; say @a
22:24 camelia rakudo-moar 997afa: OUTPUT«␤»
22:24 raydiak m: my $t := int8; my @a := array[$t].new; say @a.perl
22:24 camelia rakudo-moar 997afa: OUTPUT«array[int8].new()␤»
22:24 danaj joined #perl6
22:24 adu joined #perl6
22:25 lizmat raydiak: I was going for something like "for int8, int16, int32, int64 -> \t { ... }
22:26 adu joined #perl6
22:27 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()␤»
22:27 raydiak m: for int8, int16, int32, int64 -> $t { say array[$t].new.perl }
22:27 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␤␤»
22:27 jnthn lizmat: Maybe there's a missing nqp::decont in .^parameterize
22:27 lizmat you mean the $t should have worked?
22:28 lizmat 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 :)
22:28 lizmat sure, will try
22:28 jnthn my $t = int8; array[$t].new # I'd expect this to work out
22:29 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)
22:30 eli-se Hello, world!
22:33 masak sjn: yes, probably. I've been... distracted. :)
22:34 raydiak oh! just saw the backlog... lizmat++ # CALL-ME
22:34 lizmat :-)
22:34 lizmat only 1 day later than I promised  :-)
22:35 masak 'night, #perl6
22:35 lizmat gnight masak
22:35 raydiak night masak
22:36 raydiak lizmat: yeah geez, a day?!  I'm not paying for service like....oh, wait :)
22:36 lizmat :-)
22:37 dalek rakudo/nom: 4898d40 | lizmat++ | src/core/Int.pm:
22:37 dalek rakudo/nom: Introduce $?BITS, number of bits of this arch
22:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4898d40f22
22:37 dalek rakudo/nom: 97215d0 | lizmat++ | src/core/native_array.pm:
22:37 dalek rakudo/nom: Allow my $t = int8; my @a := array[$t].new to work
22:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97215d09aa
22:38 lizmat the $?BITS thing is really a balloon I'm letting up here  :-)
22:43 [Coke] so, nqp installings things into $dest/languages - ... can we relocate this to a more standard location?
22:44 [Coke] *installs
22:45 [Coke] 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 [Coke] ^^ from #macports
22:48 * lizmat has done enough damage for today
22:48 lizmat sleep&
22:48 raydiak hrm...I think this rakudobrew run just hung on './perl6-m --target=mbc --output=lib/NativeCall.pm.moarvm lib/NativeCall.pm'
22:48 eli-se m: say $$
22:48 camelia rakudo-moar 97215d: OUTPUT«(Any)␤»
22:48 raydiak good night, lizmat
22:50 raydiak false alarm, maybe just my laptop trying to crash again
22:52 pmichaud nqp installed into $dest/languages solely because that was parrot's decree
22:52 pmichaud (which I disagreed with)
22:53 pmichaud so yes, nqp can absolutely move to a much more standard layout instead of trying to follow parrot's guidelines
22:54 pmichaud surely $?BITS belongs somewhere other than top-level namespace... shouldn't it be an entry in $*VM or something like that?
22:54 pmichaud lizmat: ^^^^
22:54 flussence joined #perl6
22:54 pmichaud (yes, I see that lizmat has gone to sleep for the night; I'm simply tagging her here for backlogging)
22:55 jnthn +1 from me in making the layout distribution-compliant also.
22:55 raiph joined #perl6
22:55 pmichaud also just left a comment in the commit itself
23:11 jnthn sleep; 'night
23:12 raydiak gnight jnthn
23:15 georgi joined #perl6
23:21 muraiki joined #perl6
23:26 xiaomiao joined #perl6
23:30 iv joined #perl6
23:40 iv joined #perl6
23:48 Diederich joined #perl6
23:55 eli-se is there some phaser like
23:55 eli-se NOT_LAST?
23:56 timotimo will NEXT do?
23:56 eli-se m: for 0..3 { NEXT { .say } }
23:56 camelia rakudo-moar 97215d: OUTPUT«0␤1␤2␤3␤»
23:56 eli-se no :v
23:56 eli-se I want 012 as output for that
23:57 eli-se Guess I can use a flag.
23:57 timotimo ah
23:57 eli-se m: my $last = false; for 0..3 { LAST { $last = true }; say $_ unless $last }
23:57 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␤␤»
23:57 eli-se m: my $last = 0; for 0..3 { LAST { $last = 1 }; say $_ unless $last }
23:57 camelia rakudo-moar 97215d: OUTPUT«0␤1␤2␤3␤»
23:57 eli-se wait what
23:58 eli-se Oh the LAST phaser is executed after the loop body.
23:59 timotimo aye
23:59 timotimo that's when you can know

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo