»ö« 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:02 gfldex left 00:05 colomon left 00:06 jantore left 00:07 colomon joined, jantore joined 00:08 lizmat left, lizmat joined
dalek kudo/newio: d7c8a39 | lizmat++ | src/core/IO/Dup.pm:
Making $*IN special is not such a good idea
00:10
00:11 raiph left, mohij left 00:17 madmuid left 00:22 laouji joined 00:29 asdf12z_ joined
dalek kudo/newio: 8a5309b | lizmat++ | src/core/IO/Pathy.pm:
Add :strip parameter to IO::Pathy.basename
00:31
00:32 cognominal joined 00:39 laouji left, espadrine_ left 00:44 adu left 00:45 Akagi201 left
japhb avuserow: THANK YOU! 00:45
00:46 laouji joined
japhb When FROGGS pushes the nqp bump, it ought to be relatively easy to get readlink working in r-j, and then I can vastly simplify the setup work I'm putting on my users. :-) 00:47
01:01 vendethiel left 01:09 yeahnoob joined 01:18 cognominal left 01:20 aborazmeh joined, aborazmeh left, aborazmeh joined 01:21 aborazmeh left
Mouq m: sub intify (Int(Numeric()) $a) { $a }; say intify "abcd" but role { method Numeric { 42e0 } } 01:21
camelia rakudo-moar 418c1f: OUTPUT«Type check failed in binding $a; expected 'Numeric(Any)' but got 'Str+{<anon>}'␤ in sub intify at /tmp/3uCk1G83CB:1␤ in block <unit> at /tmp/3uCk1G83CB:1␤␤»
Mouq m: sub intify (Int() $a) { $a }; say intify "abcd" but role { method Numeric { 42e0 } }
camelia rakudo-moar 418c1f: OUTPUT«42␤»
Mouq m: sub intify (Int() $a) { $a }; say intify my class :: { method Numeric { 42e0 } } 01:23
camelia rakudo-moar 418c1f: OUTPUT«No such method 'Int' for invocant of type '<anon>'␤ in sub intify at /tmp/WfAJtGbSna:1␤ in block <unit> at /tmp/WfAJtGbSna:1␤␤»
grondilu TimToady: I struggled a bit with the '+ 1' in [email@hidden.address] + 1)'. There should be a more elegant way to do it (without the magic '+ 1'). Maybe add a comment?
Mouq doesn't know if nested coercers are supposed to work or not
01:24 dayangkun joined, coffee` left 01:31 |Tux| left 01:34 Akagi201 joined 01:38 adu joined 01:39 tinyblak joined 01:40 tinyblak_ joined, adu left 01:43 AnxiousGarlic joined, AnxiousGarlic left 01:44 tinyblak left 01:45 Akagi201 left 01:46 Akagi201 joined
grondilu TimToady: also, it may be required to deal with negative values. 01:52
if self < 0 { return "-$_[0]", .[1] given (-self).base-repeating($base) } # or something like that. 01:53
m: say (-1/6).base-repeating.perl 01:56
camelia rakudo-moar 418c1f: OUTPUT«("-1.8", "3")␤»
grondilu m: say (1/6).base-repeating.perl 01:57
camelia rakudo-moar 418c1f: OUTPUT«("0.1", "6")␤»
01:57 cognominal joined
J-L Anyone know what the Perl6 equivalent to Perl5's Storable module is? 01:57
grondilu doubts there is any. 01:58
I don't think there is a serialization standard in P6 02:00
02:00 silug left, yeahnoob_ joined, yeahnoob left
grondilu there are .perl and EVAL, though. 02:01
colomon there is a PerlStore module, but I don’t know that it really does anything you cannot do with .perl and EVAL 02:02
timotimo is going to place a cache into spesh that'll get data allocated in spesh mem blocks way down 02:03
well, perhaps not "way down"
i'll have to measure either way. 02:04
J-L Well, on the comp.lang.perl.misc newsgroup, there has been a lot of talk about how important it is to store data to disk using Storable (instead of Data::Dumper, which then is read in and eval()ed). It's considered dangerous to eval() code that is read from disk, for reasons given in the discussion. 02:06
Mouq J-L: Definitely… 02:08
I wonder if we can't do something with NativeCall… 02:09
Or if that's just a dumb idea :P
02:10 Akagi201_ joined 02:11 Akagi201 left 02:12 J-L left 02:15 silug joined, cognominal left
grondilu well, yeah. Using .perl and EVAL is not the best. I believe usually data could be stored as JSON, BSON, YAML or whatever. Storable makes it possible to store a perl variable 'as is' but that's probably overkill in most cases. 02:15
timotimo should put "HOORAY!" at the end of debug output lines more often 02:17
02:22 Akagi201_ left
timotimo hmm 02:22
that awkward moment when you notice the memory usage of perl6 -e 'say 1' isn't impacted by your awesome optimization ... 02:23
02:23 raiph joined
timotimo oh, haha 02:24
timotimo turns optimization back on
aaw. doesn't seem much better :( 02:27
02:31 chenryn joined 02:38 adu joined 02:42 yeahnoob_ left 02:45 raiph left, ilbot3 left, raiph joined 02:46 ilbot3 joined 02:53 yeahnoob_ joined 02:55 yeahnoob_ is now known as yeahnoob 02:57 kaleem joined
avuserow looks like there are 66 split paths between moar and jvm in rakudo's code base. wonder how many of those are NYI versus long term solutions. 02:59
03:01 yeahnoob left, yeahnoob_ joined
avuserow J-L: I've been wanting a port of something like Sereal for Perl 6, or something is that somewhat language independent 03:01
J-L: github.com/Sereal/Sereal in case you haven't seen it 03:02
03:04 dayangkun left, aborazmeh joined, aborazmeh left, aborazmeh joined 03:05 kaleem left
timotimo yeah, sereal would be neat 03:08
avuserow in fact, that's why I started playing with Snappy a year ago, though didn't get past that point 03:11
japhb: from what I can tell, nqp::readlink is only used in rakudo's IO.resolve. It's guarded by an 'if moar', and after I tried to remove that, it gave me an error mentioning AT-KEY 03:14
so I don't know what to make of that. hopefully someone else does.
03:17 vendethiel joined 03:18 Patterner joined 03:22 Psyche^ left 03:24 yqt left, noganex_ joined 03:26 rurban joined 03:27 noganex left 03:34 colomon left 03:35 colomon joined 03:41 tinyblak_ left, vendethiel left, rurban left
timotimo oh, yeah, why not run a perl6 script over a log file with 2 million lines 03:42
that'll surely work out super well
avuserow what went wrong? 03:44
timotimo it didn't finish before i ran out of patience
03:45 chenryn left
timotimo it grew to 2.6 gig until that point 03:45
avuserow are you doing regexes in a loop? I noticed that having huge memory issues on moar but not so much on jvm
03:46 laouji left
timotimo and iall i was able to tell was i didn't reach the 88% point yet 03:47
avuserow j: say "alive?" 03:48
camelia rakudo-jvm 418c1f: OUTPUT«Can't open perl script "/home/camelia/jvm-rakudo/eval-client.pl": No such file or directory␤»
avuserow :(
03:50 chenryn joined, tinyblak joined
timotimo but now i added a cancel mechanism in there; hit ctrl-c at any point and it'll abort, but still output the stats 03:52
(and it gives somewhat of a progress indication) 03:54
04:00 kaleem joined 04:02 FROGGS_ joined
timotimo whoops. something i did broke the profiler it seems 04:03
04:05 chenryn left, FROGGS left 04:10 chenryn joined
raiph m: class c1 { has $.a1 }; class c2 { has $.a2; c1.new: a => { $!a2 } } # nice error msg 04:12
camelia rakudo-moar 418c1f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sMsSOX4r50␤Variable $!a2 used where no 'self' is available␤at /tmp/sMsSOX4r50:1␤------> 3class c2 { has $.a2; c1.new: a => { $!a27⏏5 } } # nice error msg␤»
raiph m: class c1 { has $.a1 }; class c2 { has $.a2; c1.new: a => method { $!a3 } } # shouldn't be looking in c2 04:13
camelia rakudo-moar 418c1f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Njm8v_x6IY␤Attribute $!a3 not declared in class c2␤at /tmp/Njm8v_x6IY:1␤------> 3 { $!a3 } } # shouldn't be looking in c27⏏5<EOL>␤»
raiph m: class c1 { has $.a1 }; class c2 { has $.a2; c1.new: a => method { $!a2 } } # shouldn't be looking in c2 either
camelia ( no output )
04:14 chenryn left
raiph ^^^ Am I right? (I'll file a bug tomorrow if so.) 04:17
04:23 Woodi left 04:31 BenGoldberg left
Mouq WTF 04:46
*sorry, had an issue with screen 04:47
04:47 laouji joined
Mouq As I was saying… WTF is the point of the Iterator role, if we don't have an iteration API? 04:48
04:48 laouji left
Mouq ListIter has .nextiter 04:48
04:48 laouji joined
Mouq No, wait, Iterator is a class… 04:48
Gah, call me when the GLR's done :P 04:49
Anyway, XY and all, I'm making &hyper (used for, e.g., (1,(2,3)) »+« (4,(5,6))) more correct 04:51
It would be really convenient to just be able to say "my \result = eager for ^elems { my \l = left.nextiter; my \r = right.nextiter }" 04:52
But I suppose I've played with Rust too much :P
04:54 diana_olhovik_ left
Mouq Something a little different that always messes me up: 04:56
m: my @a = 1,2,3; say @a.Parcel.perl # WTF
camelia rakudo-moar 418c1f: OUTPUT«(ListIter.new(),)␤»
Mouq I understand it being ListIter.new(), that's fine… Why is it (ListIter.new(),)? 04:57
m: my @a = 1,2,3; say @a.Parcel.elems 04:58
camelia rakudo-moar 418c1f: OUTPUT«1␤»
Mouq m: my @a = 1,2,3; say @a.Parcel[0].elems
camelia rakudo-moar 418c1f: OUTPUT«3␤»
04:58 Ugator joined 05:00 chenryn joined, raiph left 05:04 estrabd left, estrabd joined 05:09 mr-foobar left 05:10 mr-foobar joined 05:15 larion left 05:20 aborazmeh left 05:21 acc__ joined 05:26 acc__ left 05:28 adu left 05:31 diana_olhovik_ joined 05:35 diana_olhovik_ left
dalek kudo-star-daily: 6155353 | coke++ | log/ (9 files):
today (automated commit)
05:39
[Coke] Testing modules/Grammar-Profiler-Simple with /home/coke/sandbox/rakudo-star-daily/star-jvm/rakudo-star-daily/install/bin/perl6-j... 05:49
java.lang.StringIndexOutOfBoundsException: String index out of range: -3
few more failures in github.com/coke/rakudo-star-daily/...odules.log
05:52 wicope joined 05:58 larion joined
avuserow we have a grammar profiler? that's potentially useful. 05:59
dalek pan style="color: #395be5">perl6-examples: c93ef3d | (Yichun Zhang (agentzh))++ | categories/interpreters/calc.p6:
added a simple infix arithmetic calculator.
06:08
pan style="color: #395be5">perl6-examples: 8d0fa38 | 唐鳳++ | categories/interpreters/calc.p6:
Merge pull request #18 from agentzh/calc

added a simple infix arithmetic calculator.
06:11 yeahnoob_ left, yeahnoob_ joined 06:12 yeahnoob_ left, yeahnoob_ joined, yeahnoob_ is now known as yeahnoob 06:26 bayprogrammer joined 06:28 kaleem left 06:29 kaare__ joined, kaare_ left 06:31 kaleem joined 06:33 diana_olhovik_ joined
masak 'morning, #perl6 06:33
arnsholt G'day! 06:47
06:47 tinyblak left 06:51 telex left, kaleem left 06:52 telex joined 06:57 djanatyn left 06:58 gfldex joined 07:01 djanatyn joined 07:03 raiph joined 07:04 prime left 07:10 krakan joined 07:12 prime joined 07:14 kaare__ left, kaare__ joined 07:21 espadrine_ joined 07:29 laouji left 07:34 laouji joined 07:35 mr-foobar left
dalek kudo/nom: ee72bd3 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp rev for readlink on jvm, avuserow++
07:38
07:42 rindolf joined 07:43 Rounin joined
psch \o 07:46
FROGGS_ o/ 07:47
masak \o
moritz \o/ 07:48
07:48 laouji left
masak yay 07:49
psch apparently the failure in S02-types/native.t on jvm happen because .args on the capture passed into the sub is null
07:49 laouji joined
psch to expand on that: «sub f(int $x is rw) { }; my int $x = 1; f $x» NPEs in add_to_cache, where capture.args[0] is null 07:50
which points somewhere inside find_best_dispatchee, which is a bit of a beast 07:51
(also hard to put debug-says into, because it's called a few hundred or so times during any script...) 07:53
FROGGS_ psch: about the uri failure: gist.github.com/FROGGS/5646d051dca96e3f879f 07:54
now I just need guidance from jnthn++ to out that patch into the right place... 07:56
s/out/put/
07:57 gfldex left
psch only heard scary things about priorInvocation 07:57
FROGGS_: i don't think i'm qualified for an opinion whether that's workable :) 07:58
FROGGS_ psch: well, it fixes it :o) 07:59
so we need an additional "fixup_outers" step, like moarvm has (though, moar is kinda different in that area)
psch FROGGS_: right, in general "it works" is obviously good. i meant to say that i also don't know if that's the right spot 08:00
FROGGS_: the patch i had fixed it when looking for the outer. i assume SerializationReader builds the chain, which makes it probably at least a better spot than i had 08:01
lizmat good *, #perl6! 08:03
moritz \o lizmat 08:04
masak top of the * to you, lizmat! \o
psch o/ lizmat
lizmat will be mostly offline today 08:05
lizmat notices bare startup gone up from .205 to .26, a 25% move for the worse :-( 08:08
I suspect Moar/nqp is to blame for this
FROGGS_ huh
08:10 smls joined, larion left
lizmat I don't see any rakudo changes that could explain this 08:11
Mouq lizmat: On the bright side, tonight I optimized &hyper (e.g., foo »op« bar), and what I've benched has shown a cut of up to 50% in extreme cases
(for something like ((1, [2, 3]) «+» (4,5,[6,7],[8,9])) for ^1000)
08:12 rurban joined
lizmat Mouq++ 08:12
smls masak, are you still thinking about Perl 6 macros? 08:13
moritz he typically is :-) 08:14
lizmat FROGGS_: if I go back to e.g. b497d416b349b, it still has the same startup time
Mouq .o( When is masak not thinking about Perl 6 macros is the real question… :)
masak smls: oh yes.
smls How feasible would it be to turn the Test module's ok() subroutine into a macro, that introspects the expressions it got and prints a useful report if it evaluated to False?
masak smls: just been having a (predictable) bloggin slump lately :) 08:15
smls ok(42 == 43, "foo"); #-> Failed test "foo"␤ expected: '43'␤ got: '42'
masak smls: it's been discussed before. it should be attempted, I think.
smls: but *not* with Test.pm itself.
smls ...making the is() function redundant
masak right.
I'm already 100% sure that when I'm done with macros, that particular feature will be well withing the capabilities of macros. 08:16
in fact, I'll go ahead and add it to my growing list of use cases.
smls++
FROGGS_ lizmat: I have no idea by skimming the commits :/
smls ok :)
masak .oO( ok() :) )
FROGGS_ lizmat: is it possible that you've got a running process somewhere that eats performance? 08:17
masak oh, it's already on that list. pmurias++
smls I really don't like the is() function, because the fact that it does `eq` comparison is not really obvious (nor ideal) imo
with ok() macro, the type of comparison would be crystal clear
masak the `eq` semantics is kind of an accident of history. 08:18
moritz just like the `eq` semantics of `eq`
smls Perl 5 history
lizmat FROGGS_: that would be possible, but there isn't
psch .oO( sub is-according-to($have, $want, $msg, &cmp) {...} )
masak smls: what's also been discussed is equipping comparators with an adverb, like :test or sump'n.
lizmat 90%+ idle
masak smls: I never liked that idea -- in modern parlance, it hangs something off the wrong hook, IMO. 08:19
smls: what we could also consider, though, is making a slang that simply assumes all comparisons are assertions. so, ordinary Perl 6 grammar, slightly different semantics.
smls: then you could do `TEST { foo($in) == $out; bar($in2) eq $out2; }` 08:20
lizmat smls moritz : there is cmp_ok, no?
giving you the option of specifying the comparator
masak smls: hm, maybe for the sake of sanity only trigger on statement-level comparisons...
masak wonders if he can somehow convince FROGGS++ to make such a slang in 5 minutes :) 08:21
we need more FROGGS and more slangs.
FROGGS_ hehe
smls masak: I don't think requiring the 3 characters "ok " in front of such statements is an undue burden 08:22
in relation to the extra clarity it offers
08:22 darutoko joined
moritz lizmat: yes, but cmp_ok $thing, &[==], $other, 'reason' is still a bit of a mouth full 08:22
FROGGS_ gets some &[#] 08:23
lizmat cmp_ok $thing, '==', $other # also works
cmp_ok |<<$thing == $other> # another way 08:24
*>>
moritz lizmat: though with &[==] it's better much better than with &infix:<==>
dalek ast: 25f2964 | usev6++ | S04-declarations/my.t:
Add test for RT #120397
08:27
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120397
08:30 vendethiel joined
masak smls: you have a point. 08:30
FROGGS_ hmmm, doing a slang that introduces a statement_prefix:sym<ok> is tempting... 08:32
masak :>
08:32 coffee` joined
masak when I find the tuits for it, maybe this Friday, I want to build a custom Test.pm in module space with excellent diag messages. 08:33
08:33 |Tux| joined
masak especially for is_deeply 08:33
there's so much more we can do there.
FROGGS_ <sym> <statement> <infixish> <statement> [',' <EXPR>]? or some such
masak "Three more elements than expected at position 5: [...}"
"Property '.foo' at path .[5].bar.<blog> expected but missing." 08:34
(or maybe express those things with a more `diff`-like notation)
FROGGS_ looking at other languages might be inspiring here 08:35
smls masak: also look at Test::Differences (Perl 5)
masak smls: ooh, good idea.
lizmat suspecting c3e1024aae026882 now for the increase in startup time 08:36
08:36 virtualsue joined
lizmat breakfast& 08:37
08:41 Vlavv left
sergot morning #perl6 08:41
psch o/ sergot 08:44
08:44 pecastro left
masak sergocie! \o/ 08:44
FROGGS_ morning sergot
08:50 rindolf left 08:52 kaleem joined 08:55 Vlavv joined 08:57 laouji left 08:58 laouji joined 09:01 espadrine_ left
Mouq m: Array[Int](1,2,3) 09:03
camelia rakudo-moar ee72bd: OUTPUT«Cannot find method 'Array[Int]'␤ in block <unit> at /tmp/NZUDhN6j0w:1␤␤»
Mouq m: my Int @a = 1,2,3; my $type = @a.WHAT; $type(1,2,3)
camelia rakudo-moar ee72bd: OUTPUT«Cannot find method 'Array[Int]'␤ in block <unit> at /tmp/SQoHjWJDCR:1␤␤»
Mouq I really really want this to work :P 09:04
smls m: say Array[Int].new(1,2,3)
camelia rakudo-moar ee72bd: OUTPUT«1 2 3␤»
masak m: Array(1, 2, 3) 09:05
camelia ( no output )
masak m: say Array(1, 2, 3)
camelia rakudo-moar ee72bd: OUTPUT«1 2 3␤»
masak huh.
well, if Array(1, 2, 3) works, then I'd expect Array[Int](1, 2, 3) to work also.
smls it's the whole coercer vs composer thing
masak Mouq: submit rakudobug? 09:06
09:06 cschwenz joined
Mouq Relevance: Doing work on &hyper, and the return type is the same as one of the input types. So Bag(1,2,3,2) »-» 1 is supposed to be Bag(2) 09:07
smls jnthn: ^^ another thing to consider re potential redisign of how coercers work
masak Mouq: wait, what happened to the 3? :/
hm, a hyper minus. 09:08
m: say [1, 2, 3, 2] »-» 1
camelia rakudo-moar ee72bd: OUTPUT«0 1 2 1␤»
masak m: say Bag.new([1, 2, 3, 2] »-» 1)
camelia rakudo-moar ee72bd: OUTPUT«bag(0, 1(2), 2)␤»
masak m: say Bag.new([1, 2, 3, 2]) »-» 1
camelia rakudo-moar ee72bd: OUTPUT«1 2 3 2 => 0␤»
masak m: say Bag.new(1, 2, 3, 2) »-» 1
camelia rakudo-moar ee72bd: OUTPUT«1 => 0, 2 => 1, 3 => 0␤»
Mouq m: say Bag(Bag.new(1, 2, 3, 2) »-» 1) 09:09
camelia rakudo-moar ee72bd: OUTPUT«bag(2)␤»
Mouq m: say Bag.new(Bag.new(1, 2, 3, 2) »-» 1)
camelia rakudo-moar ee72bd: OUTPUT«bag(1 => 0, 2 => 1, 3 => 0)␤»
masak Mouq: I don't doubt it's correct, but what's happening there? why `bag(2)` in the end?
09:10 brrt joined
Mouq masak: Because all the other elements went to 0 09:10
masak oh!
Mouq lol :)
masak right, you're decrementing the *frequencies* of the numbers, not the numbers themselves!
got it.
FROGGS_ ahh
smls made the same thinko as masak
FROGGS_ now I understand Bags too :o)
Mouq That was a confusing example :P 09:11
masak I'm looking forward to having an intuition about all this.
09:11 zakharyas joined
Mouq S03 uses "Bag(3,8,[2,(9,3)],8) >>->> 1" but that's even more broken :P 09:11
masak m: say Bag(Bag.new(|<A B A A A C D B>) »-» 1) 09:13
camelia rakudo-moar ee72bd: OUTPUT«bag(A(3), B)␤»
masak right.
vendethiel o/, #perl6
masak if it's letters, it's easier to see.
vendethiel! \o/
psch o/ vendethiel
masak vendethiel: how's the PHP and Java going?
smls The behavior does make sense as an extension of $baghash<A>++ etc
vendethiel masak: project's done, that's why I'm at home so late..:). Will present later today
masak smls: right. Perl 6's data structures tend to favor the values rather than the keys. and in a Bag, the frequencies are the values. 09:15
smls yeah, although hash'y things in list context usually become a list of pairs 09:16
m: say { A => 1, B => 2 } »-» 1 09:17
camelia rakudo-moar ee72bd: OUTPUT«A => 0, B => 1␤»
smls well, at least the hyperop behavior is consistent between bags and hashes... :) 09:18
masak m: my $pair = A => 1; $pair--; say $pair 09:19
camelia rakudo-moar ee72bd: OUTPUT«No such method 'pred' for invocant of type 'Pair'␤ in sub postfix:<--> at src/gen/m-CORE.setting:2271␤ in block <unit> at /tmp/_v9WwPyvyC:1␤␤»
masak m: my $pair = A => 1; $pair = $pair - 1; say $pair
camelia rakudo-moar ee72bd: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: *%_)␤ in sub infix:<-> at src/gen/m-CORE.setting:5256␤ in block <unit> at /tmp/2TEv0ubnPm:1␤␤»
09:19 lizmat left
masak fair enough. 09:19
09:21 abraxxa joined
vendethiel "Safe Typescript achieves soundness by enforcing stricter static checks and embedding residual runtime checks in compiled JavaScript code" noo :( 09:22
masak what 09:23
url?
tadzik OBJECTION :)
vendethiel research.microsoft.com/apps/video/d...?id=226836
tadzik huh, news to me 09:24
brrt wat
vendethiel developers.google.com/v8/experiments google announcing a "strong mode" that's "like soundscript"
what's going on these days
brrt rotation of the earth around it's axis and the sun 09:25
rotation of the sun around the galactic core
among other things :-)
vendethiel but that's like before :)
masak vendethiel: people are realizing that they can take JavaScript and make custom extensions. this is a good thing. it's like Perl 5 and CPAN.
brrt right
masak not all extensions will be useful in the long run, or even beneficial. 09:26
but there will be learnings, and some good things will trickle into JS core.
vendethiel masak: well, sure, but google has sanescript, soundscript, gwt, dart, "the new typescript that should've been atscript", etc etc etc etc
brrt but every one of them will be splashed and dipped in Hype Hype Hype
masak vendethiel: are you feeling the churn? so am I.
brrt masak: but was 'let' and whatever-the-new-lambda-syntax-is really part of that? 09:27
vendethiel masak: no idea what "churn" is supposed to mean here
masak vendethiel: that's the force of tens of thousands of eyes now turning to this little cute DHTML language as the savior of tomorrow.
brrt lol
masak vendethiel: it means constant change and newness.
vendethiel no, they've been doing that snce at least 2011 or 2012
masak vendethiel: it's not even a matter of whether the churn is good or bad at this point. it's crazy, and if you're a contientious/curious web developer wanting to stay on top, it will consume you. 09:28
vendethiel masak: I've been consumed already, thank you very much :P 09:29
brrt but.. what could be the benefit of staying on top?
vendethiel new toys to play with! New experiments to be done
masak being able to deliver code on time to customers that does what they need
vendethiel "• Function types are contravariant (soundness!)" I feel scared somehow
masak don't be so contravariant 09:30
09:30 virtualsue left
masak .oO( value types, jump to the left! function types, jump to the right! ) 09:30
brrt but with the current churn rate the benefit very questionable (delivering code on time)
as in
09:31 kaleem left
vendethiel
.oO( argument types, jump on the contra. Return types, just on the co ! )
09:31
masak .oO( heeeeere comes the functor! )
brrt there are limits to the improvement space
masak .oO( now the same steps, but *dual*! )
brrt: psssh, that's crazy talk. 09:32
brrt i'm entitled to talking crazy (entitled generation after all)
09:32 larion joined
vendethiel
.oO( "today, we invented cocojavascript.js" )
09:32
masak brrt: research shows that the ordinary JavaScript web developer is working at something like 0.00001% of their full potential.
brrt: so, you're *technically* right, but... :P
brrt or something that totally-not-entitled-but-driving-a-cabriolet-writers are calling people my age
:-D
vendethiel masak: research shows that the co-ordinary masak developer is punning at something like 120% of their full potential...:P 09:33
masak haha
brrt that's only possible by using the higher heating value of masak's potential :-P
masak vendethiel: did you know that according to CT, coconuts are just ordinary nuts?
vendethiel masak: I've seen that tweet, yes :)
masak dang :) 09:34
vendethiel: jnthn and I always crack up when we're in some airports, and they have a bus company with a big label COBUS.
vendethiel: obviously the cobus is what takes you back from the plane to the airport.
vendethiel
.oO( but is it better than COBOL )
masak ah, the old BOL language 09:35
vendethiel
.oO( If you had many buses, they'd be CO-BI )
brrt i thought coconuts were really the core of a cocos fruit
vendethiel latin jokes mean I should get going instead of grinning around 09:36
masak get thee to the co-bi, vendethiel! 09:38
grondilu m: say so ~0
camelia rakudo-moar ee72bd: OUTPUT«False␤»
09:38 dakkar joined
grondilu was expecting True here :/ 09:38
masak grondilu: that would be more consistent. 09:39
brrt m: say (~0).WHAT
camelia rakudo-moar ee72bd: OUTPUT«(Str)␤»
masak grondilu: but Perl 6 has that one inconsistency for "0" -- it's False
m: say ?"0"
camelia rakudo-moar ee72bd: OUTPUT«False␤»
masak m: say ?"00"
camelia rakudo-moar ee72bd: OUTPUT«True␤»
masak m: say ?"0.0"
camelia rakudo-moar ee72bd: OUTPUT«True␤»
masak m: say ?"0e1"
camelia rakudo-moar ee72bd: OUTPUT«True␤»
brrt m: say so (~0)
camelia rakudo-moar ee72bd: OUTPUT«False␤»
masak m: say ?"0+0i"
camelia rakudo-moar ee72bd: OUTPUT«True␤»
brrt ....
do 'we' really want this behaviour? 09:40
i suppose we do, since it's probably been specced
masak I personally don't. but I also don't have a hyena in that race, so... meh.
brrt fair enough :-)
masak is conserving his hyenas for more important races :)
grondilu FYI, I bumped into that while looking at rosettacode.org/wiki/Temperature_co...ion#Perl_6
seemed to me that 'while '' ne my $ans = prompt "..." {...}' was a bit dull 09:41
moritz brrt: fwiw it seems to work fine in p5
brrt m: say ~''
camelia rakudo-moar ee72bd: OUTPUT«␤»
brrt m: say ?''
camelia rakudo-moar ee72bd: OUTPUT«False␤»
09:41 fhelmberger joined
grondilu yeah but the problem is that it would stop if I enter '0' 09:42
masak if you want my stated theoretical stance (and you probably don't), then Str and Bool and the real types are all monoids. they have *one* unit ("", False, 0) and anything else should be truthy.
grondilu: please submit a rakuodobug. you have my support.
grondilu ok I'll do it. 09:43
moritz no, please open an perl6/specs issue
masak even better.
moritz rakudo follows the specs *and* the test suite here
masak what moritz++ said.
those are the same thing nowadays, silly :P
moritz you'd have to crawl very far out of the window to construct it as a rakudobug
masak yeah, *mumble* *mumble* meant perl6/specs issue 09:44
no wonder this felt deja-vu-ish: irclog.perlgeek.de/perl6/2014-12-16#i_9813500
seems this is a recurring discussion. all the more reason to leave a perl6/specs issue record of it.
grondilu opens an issue in perl6/specs 09:45
brrt what's a monoidal type
for somebody who doesn't understand category theory notation and confuses it with linear algebra notation 09:46
masak brrt: something with an identity operation, closure under composition, and the associative law. 09:47
09:47 larion left
brrt ah. ok 09:47
:-)
masak monoids are everywhere. they're like groups, but they're not fussy about inverse operations.
09:48 larion joined
grondilu github.com/perl6/specs/issues/87 09:48
masak the associative law essentially guarantees a Perl-like flattening. so operations (A (B C) ((D E) F)) can just be written as (A B C D E F). 09:49
brrt i see
ok, so i can see how a string or a number would be of like that, yes
moritz masak: though the types you listed are only monoidic under certain operations, right?
09:50 espadrine_ joined
masak moritz: sure -- that's part of the deal. you say "(M, ∗) is a monoid", and you've chosen the set M and the operation ∗ 09:51
09:51 rindolf joined, kaleem joined
masak actually, monoids belong more to abstract algebra than to CT from what I udnerstand. but CT uses them heavily, too. 09:52
moritz masak: and you've chosen (Str, ~), (Numeric, +) and (Bool, or) ?
masak correct.
moritz why 'or' for Bool? 09:53
masak the unit of the respective monoid ("", 0, False) is unchanged under the operation (~, +, ||)
I think that answers it.
but Bool is kinda symmetric. you could do a monoid with (Bool, &&) and True as the unit, too :) 09:54
moritz right
masak it's just that we don't usually think of it that way.
unless you're doing an .isEmpty query or something
moritz which makes it non-obvious that the identity element should be the False element
masak not really.
it's by heavy convention.
moritz it's not for (Numeric, *) either 09:55
masak not sure I get your point. that's yet another monoid.
*my* original point is that per monoid, there's *one* unit. 09:56
so "0" is an aberration.
09:56 donaldh joined
moritz my point is that Str isn't a monoid 09:56
masak respectfully, sir. it is.
moritz (Str, $some_operation) is
masak *sigh* :)
well, yeah.
(Str, ~)
moritz it makes a difference
masak with "" as the unit.
moritz because only with a certain operation you can identify an identity element 09:57
and if several operations have different identity elements
masak you seem to think you have made a vital point to un-anchor my argument. I don't see that you have. :/
moritz it's not clear anymore which one should be False one
masak look, when you transform from the (Str, ~) monoid to the (Book, ||) monoid, *one* element of Str is allowed to map to False. 09:58
in Perl 6 currently, two do.
that's wrong.
moritz I agree, from that perspective
but
masak since "" ne "0", and the latter is not the unit
moritz we also have (Cool, ~) and (Cool, +)
and (Cool, +) has different neutral elements depending on the implementation type 09:59
masak finds that he is arguing quite vehemently for a race in which he has no hyena :)
moritz it's 0 for Int and 0e0 for Num and '0' for Str
:-) 10:00
but by that argument, ?'0e0' would need to be False. I see. 10:01
masak the natural end point of your argument is that Str.Bool should have Str.Numeric.Bool semantics, I guess. in the cases where things look like numbers, I mean.
moritz ... when argued from the Cool perspective 10:02
masak and I do see your argument. arguing from the Cool perspective is saying "Perl 6 has enough Perl 5 in it to fudge the Str/Numeric difference"
moritz which is basically the same as saying that ~ isn't the only natural operation on Str
masak not saying anything is a natural operation. 10:03
just saying (Str, ~) is a monoid and "" its unit
in some sense, it's *the* monoid for Str.
moritz but then you make the leap that ?'0' shouldn't be false, because it's not the neutral element of the ~ operation
masak right.
moritz so you do privilege ~ to make that conclusion 10:04
masak yep.
because ~ is the operation that makes it a monoid, and monoids are nice
Mouq m: say ?"False" 10:05
camelia rakudo-moar ee72bd: OUTPUT«True␤»
masak ah -- mapping back from (Bool, ||) to (Str, ~) makes it clearer, I think. `False` should map back to Str's unit. but is that `""`, or `"0"`? 10:06
Mouq: right, that also highlights the inconsistency. it's *only* "0" that is privileged.
moritz: AngularJS considers a bunch of different strings to be falsy, among others "n" and "no". it creates all manner of hilarious bugs in user interfaces. 10:07
moritz: they do this because they are basically limited to messing with strings instead of real objects in a number of circumstances.
10:08 yeahnoob left
moritz masak: because they go through the DOM, and the DOM only does strings? 10:08
masak moritz: I think that experience made me a bit more sensitive to introducing special cases. and wanting to find the nice rule behind it all. what I found was monoids.
moritz: not really sure of why they do it with strings, to be honest. 10:09
moritz: maybe for the same reasons &is in Test.pm ended up doing it -- because it was kind of a "universal exchange format", and "simple". 10:10
smls grondilu: «while prompt("Temperature: ") -> $t { ... }» would be an even more convincing example case in favor of the change, because that convenience syntax *cannot* be used if a custom test has to be performed on the value 10:13
masak I think I find grondilu++'s use case more convincing than my own monoids reasoning.
it's like, we distinguish between falsy values and undefined (and consider that a strength)... 10:14
...but we spuriously consider "0" to be falsy.
10:15 kaleem left, kaleem joined 10:16 virtualsue joined
dalek kudo/nom: 0bc3a04 | Mouq++ | src/core/ (2 files):
Fix some issues with &hyper and optimize it

Fixes issues with hyper on empty lists and fixes some issues with hyper not returning the right type. Prevented flattening behavior. 1d05014 | Mouq++ | src/core/ (2 files):
  .eager shouldn't flatten
This fixes an issue with ((1, (2, 3)) »+« (4, (5, 6)))
10:16
10:16 dalek left, cognominal joined 10:17 cognominal left
Mouq Sorry dalek :( 10:17
10:17 dalek joined, ChanServ sets mode: +v dalek 10:27 pecastro joined 10:32 laouji left 10:33 laouji joined 10:35 laouji left, laouji joined
10:38 Ven joined
dalek ast: b80e436 | usev6++ | S03-operators/assign.t:
Add fuged test for RT #116178
10:39
Mouq Should we throw on hypering a known infinite list?
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=116178
masak Mouq: seems reasonable to me.
10:42 Ven_ joined, raiph left 10:45 Ven left 10:46 brrt left 10:49 sqirrel joined 10:51 kaleem left
Mouq Ah. 1 «+« (1 xx *) # not ok… (1,2,3) «+« (4,5,6 ... *) # not ok… (1,2,3) «+» (4,5,6 ... *) # totally fine 10:59
m: say (1,2,3) «+» (4,5,6 ... *)
camelia rakudo-moar 1d0501: OUTPUT«(timeout)use of uninitialized value of type Nil in numeric context in block <unit> at /tmp/wX8NDwp4w1:1␤␤use of uninitialized value of type Nil in numeric context in block <unit> at /tmp/wX8NDwp4w1:1␤␤use of uninitialized value of type Nil in num…»
Mouq Er. Hrm.
m: say (1,2,3) »+» (4,5,6 ... *) 11:00
camelia rakudo-moar 1d0501: OUTPUT«5 7 9␤»
Mouq That's what I meant :P
masak was gonna say.
11:03 kjs_ joined 11:04 [ptc] left, burnersk left 11:05 burnersk joined, [ptc] joined
torbjorn hm why cant you add two indefinite lists, ie (1,2,3 ... *) etc. in that example? 11:07
11:09 tadzik left, tadzik joined 11:11 cognominal joined
masak torbjorn: because the » symbols mean "hyper", i.e. "do it all (conceptually) in parallel", which runs into trouble with the list being infinite. 11:14
smls m: say (1,2,3 ... *) Z+ (1,2,3 ... *)
camelia rakudo-moar 1d0501: OUTPUT«2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 1…»
smls torbjorn: you can dop it with the Z metaop, which is lazy (unlike hypers) 11:15
masak right. it's two different "modes" of promoting a scalar operation to a listy one. 11:19
masak loves all the thought that has gone into Perl 6 in this
smls is honestly not quite convince that the theoretical "parallelism" of the hyper ops is going to pan out in terms of practical benefit 11:20
timotimo o/
dalek kudo/nom: 76ee8b6 | Mouq++ | src/core/ (2 files):
Throw if two infinite lists are attempted to be hyperop'd
11:22
timotimo does the hyper optimization only happen when you have flattenable things?
11:23 sqirrel left
Mouq timotimo: Do you mean the thing I mentioned or something else? 11:27
timotimo your thing
Mouq timotimo: Because the thing I mentioned was just algorithmic :P
Ulti masak I don't see why something being calculated in parallel necessarily means you couldn't expect it to remain lazy and just return something like a feed
timotimo huh?
Mouq timotimo: Although it also utilizes the for + range opt :)
timotimo i mean what you implemented
11:30 gunod joined
Mouq timotimo: &hyper descends into sub-lists/hashes, and calls &hyper on that. &hyper also is supposed to return a list/hash of the same type as it was passed. So I made it do these things better. As a nice side-effect, it got faster :) 11:31
11:32 Ven_ left
timotimo that's neat 11:34
11:35 cognominal left
gunod concerning variable interpolation in regexes: why does this work 11:36
m: class A{has $!b="b"; method match {my $b=$!b; my regex r { a $b c }; say "abc" ~~ &r}}; A.new.match
camelia rakudo-moar 1d0501: OUTPUT«「abc」␤»
gunod and this doesn't
m: class A{has $!b="b"; method match {my regex r { a $!b c }; say "abc" ~~ &r}}; A.new.match
camelia rakudo-moar 1d0501: OUTPUT«Nil␤»
11:38 cognominal joined
timotimo perhaps it's just not parsed right? 11:39
11:40 cognominal left, cognominal joined 11:41 cognominal left
torbjorn masak: smls: thanks! 11:41
psch m: class A { has $.b; sub foo { say $!b } }; # that's what i would expect from the regex as well 11:43
camelia rakudo-moar 76ee8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Lv7SA25YW0␤Variable $!b used where no 'self' is available␤at /tmp/Lv7SA25YW0:1␤------> 3class A { has $.b; sub foo { say $!b7⏏5 } }; # that's what i would expect from ␤»
Mouq guesses a bug in Cursor.INTERPOLATE 11:44
11:44 [ptc] left, burnersk left
timotimo oh, hm 11:44
11:44 burnersk joined 11:45 [ptc] joined
Mouq Oh wait, because \self is already set :P 11:46
regexes are methods
mystery solved :P
psch m: my &f = regex { { self.WHAT.say } }; "a" ~~ &f 11:47
camelia rakudo-moar 76ee8b: OUTPUT«(Cursor)␤»
psch duh.. :)
Mouq m: class A{has $!b="b"; method match {my regex r { a $!shouldn'tthisrandomnamefailthough c }; say "abc" ~~ &r}}; A.new.match
camelia rakudo-moar 76ee8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dGMgQUgWOp␤Attribute $!shouldn'tthisrandomnamefailthough not declared in class A␤at /tmp/dGMgQUgWOp:1␤------> 3domnamefailthough c }; say "abc" ~~ &r}}7⏏5; A.new.match␤ expecting any of:␤ …»
Mouq So…
psch m: say Cursor.can('b') 11:48
camelia rakudo-moar 76ee8b: OUTPUT«␤»
psch huh, so it does look in A
Mouq It's parsing it correctly, and then it creates the wrong AST?
*correctly is an ambiguous term here :P 11:49
I'm not sure what the correct behavior is
moritz the problem is likely that regexes are instances of a grammar or cursor or so 11:50
and so the lookup lands in the wrong instance
masak Ulti: "hyper" means "do everything as soon as possible, even if that means going parallel". "lazy" mean "do as little as possible, even if that means running little disconnected chunks of code in the future"
Ulti: they're mutually exclusive. *or* the burden of proof is on you to show how they're not ;) 11:51
smls moritz, Mouq: Regexes are methods operating on a Cursor instance, but they have their own syntax, so $!foo in a regex could very well be defined to DWIM rather than strictly do the same thing as $!foo in a normal method. 11:53
psch from the looks of it it already half-way DWIMs 11:54
moritz smls: sure
psch cf. Mouq's latest error message from camelia
moritz smls: not saying it can't be made to work, just trying to explain why it doesn't work right now
psch (or "camelias latest error message towards Mouq")
smls right 11:55
m: class A { has $!attr = "foo" }; my $method = method { say $!attr }; A.$method; 11:57
camelia rakudo-moar 76ee8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gTu_lJEKf_␤Cannot understand $!attr in this context␤at /tmp/gTu_lJEKf_:1␤------> 3foo" }; my $method = method { say $!attr7⏏5 }; A.$method;␤»
smls ^^ looks like private attributes are resolved at compile time anyway 11:58
and need to be used in the class'es "scope"
11:58 alini joined
psch m: class A { has $.a = "b" }; A.^add_method("c", method () { say $.a }); A.new.c 11:58
camelia rakudo-moar 76ee8b: OUTPUT«b␤»
psch thought ^add_method was runtime 11:59
ah
that's $!a vs $.a
smls psch: your example uses an auto-generated accessor method, not a private attribute
psch smls++ 12:00
smls in any case, this means that $!foo in regexes couldn't meaningfully refer to Cursor attributes anyway, right? 12:01
gunod so I tried to work around it. this doesn't work either:
m: class A{has $!b="b"; method match {my regex r($b) { a <$b> c }; say "abc".match(/<r($!b)>/) }}; A.new.match
camelia rakudo-moar 76ee8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s85ACNRDHW␤Variable '$b' is not declared. Did you mean '$!b'?␤at /tmp/s85ACNRDHW:1␤------> 3ethod match {my regex r($b) { a <$b> c }7⏏5; say "abc".match(/<r($!b)>/) }}; A.new.␤ expecting any of…»
smls Because while they're methods, they're defined outside the scope of the Cursor class.
12:03 skids left 12:16 kjs_ left 12:18 tbrowder left
FROGGS_ gunod: within that regex /<r($!b)>/ you are in another class... and this class does not have a $!b 12:18
m: class A{has $.b="b"; method match {my $o = self; my regex r { a "$o.b()" c }; say "abc" ~~ &r}}; A.new.match 12:20
camelia rakudo-moar 76ee8b: OUTPUT«「abc」␤»
FROGGS_ though, the attribute has to be private for that way
smls my regex r($b) { a $b c }; say "abc" ~~ &r.assuming("b"); # curious 12:24
12:24 Ven joined
smls m: my regex r($b) { a $b c }; say "abc" ~~ &r.assuming("b"); # curious 12:24
camelia rakudo-moar 76ee8b: OUTPUT«No such method '!cursor_start' for invocant of type 'Str'␤ in regex r at /tmp/1lDZ8ihMdQ:1␤ in sub CURRIED at src/gen/m-CORE.setting:4255␤ in method ACCEPTS at src/gen/m-CORE.setting:3847␤ in block <unit> at /tmp/1lDZ8ihMdQ:1␤␤»
smls ah well 12:25
moritz I'm probably quite slow for not having it realized before, but "Separate the API from the meta-API" seems to be a good design principle 12:29
that's what Perl 6 does with its .HOW and .^ calls, and also what sqlalchemy does with inspect(dataobject)
12:29 chenryn left
masak moritz: it's just Separation of Concerns. the object is concerned with one thing, the class metaobject with another. 12:30
(so, yes) :)
moritz I guess I haven't yet designed enough large enough systems to stumble upon it in my own work
masak: thanks, now I feel even more stupid :-) 12:33
masak sorry :/
moritz: but you did make me aware that on top of the SoC, we have .HOW and .^ as easy-access conduits from one concern to the other. that's significant, too.
moritz research.microsoft.com/apps/video/d...?id=226836 12:42
12:46 gunod left 12:48 kjs_ joined 12:53 Ven left 12:57 laouji left
masak moritz: vendethiel posted it in the backlog. did you find it independently? 13:02
13:03 Ugator left
moritz masak: yes 13:03
I don't do much backlog these days :(
masak me either, strangely :(
well, I encourage you to read vendethiel++'s reaction and the subsequent punfest: irclog.perlgeek.de/perl6/2015-03-11#i_10257405 13:04
FROGGS_ consistent :o( 13:06
err, :(
masak unexpected :o)
13:15 Ven joined
FROGGS_ hmmm, if I had a number like 283, and I'd had certain values like 23,33,44,62 that this number can consist of... how do I get the combination of the values that is equal to that number? 13:15
like 283 == 33×5+52+66
ohh, my values are more like 23,33,44,54,66
is there an easy way to get there?
masak sounds like one of the p6cc tasks
FROGGS_: is there an ordering requirement? do you have to use all of the values? 13:16
FROGGS_: which operations do you allow?
FROGGS_ no ordering 13:17
and not all values have to be used
and like the Bag earlier, the values can be N times in there 13:18
so it is about the sum of a multiple of the values 13:19
masak today's mini-challenge: twitter.com/mjdominus/status/574937856298369024 13:21
(I have a working and decently fast 16-line Perl 6 solution)
13:22 Ven left, cognominal joined
masak FROGGS_: another question: can one assume that there is a solution if the search space is searched deeply enough? 13:22
FROGGS_ masak: there is always a solution, yes 13:23
13:23 Hor|zon left
masak right. which means that the question is constrained :) 13:23
you didn't say which ops. only + and × ? 13:24
FROGGS_ correct, only those
I dunno where to start...
probably because I am bad at math :o)
[Coke] maaaan, I wish I could write this code in Perl6 right now. 13:34
masak is giving it a quick go
[Coke] (trying to do deprecated things with threads, lots of text-that-looks-like-XML generation...
FROGGS_ text-that-looks-like-XML :P
smls m: for 99999...10000 { my @d = .comb; if $_ % all (+@d[$_..5].join for 1..4) { say $_; exit }; say $_ } 13:39
camelia rakudo-moar 76ee8b: OUTPUT«99999␤99998␤»
smls massak: super naive solution ^^
well, without the final "say $_"
hm, dunno why camelia quit rather than timeout 13:40
on my system, it runs until it finds 95625
m: for 99999...10000 { my @d = .comb; if $_ % all (+@d[$_..5].join for 1..4) { .say; exit } } 13:41
camelia rakudo-moar 76ee8b: OUTPUT«99998␤»
smls hm, does my irc client replace double % with a single one?
13:42 raiph joined, raiph left, raiph joined
FROGGS_ m: say (23,33,44,52,66).permutations.elems 13:43
okay, brute-forcing it might take a while :P
|Tux| rekodubrew cannot fetch panda
==> Successfully installed JSON::Tiny
==> Fetching panda
and then hangs
camelia rakudo-moar 76ee8b: OUTPUT«120␤»
FROGGS_ |Tux|: I guess you have no problems accessing github?
|Tux| it fetches rakodobrew itself and nom fine
13:44 Ven joined
FROGGS_ smls: I see a single one, yes 13:44
m: for 99999...10000 { my @d = .comb; if $_ %% all (+@d[$_..5].join for 1..4) { .say; exit } }
tadzik [Tux]: it sometimes takes *a while*
oh, you're git-fetching
then it should not
camelia rakudo-moar 76ee8b: OUTPUT«95625␤» 13:45
FROGGS_ |Tux|: ohh, that "Fetching panda" can also mean that it copies the panda directory to a tempdir
|Tux| tries on another computer too
FROGGS_ |Tux|: do you have anything in there? like circular symlinks or other rubbish? :o)
|Tux| not that I am aware of :) 13:46
13:46 skids joined
smls FROGGS_: \o/ 13:48
I wonder what masak's (longer but probably much smarter) solution is 13:49
PerlJam smls: did you reply to mjd's tweet with your P6 solution?
smls no, i don't use twitter 13:50
|Tux| FROGGS_, also hangs on other system 13:52
other location and other network
full log: gist.github.com/Tux/7a60566c78cbc333da5d 13:54
13:54 spider-mario joined
FROGGS_ I have no idea, also because I did not use rakudobrew yet :S 13:57
colomon m: for 99999...10000 -> $n { if $n %% all (10000, 1000, 100, 10).map($n % *) { $n.say; exit } } 14:03
camelia rakudo-moar 76ee8b: OUTPUT«95625␤»
colomon FROGGS_: that’s about 4x faster than your solution. ;) 14:04
FROGGS_ colomon: not mine :o)
colomon oh, right, smls++
FROGGS_ I just pasted it
|Tux| git pull on panda itself pass'es 14:06
14:07 xfix joined
colomon dang, I switched to $n «%« (10000, 1000, 100, 10) instead of (10000, 1000, 100, 10).map($n % *) and it added 200% to the running time. 14:08
smls colomon++, hyperops-- 14:09
;)
gtodd .... scripts for sale: twitter.com/davewiner/status/530106220343214081
14:11 zakharyas1 joined
colomon m: (99999...10000).grep({$_ %% ($_ % 10000)}).grep({$_ %% ($_ % 1000)}).grep({$_ %% ($_ % 100)}).first({$_ %% ($_ % 10)}).say; 14:11
camelia rakudo-moar 76ee8b: OUTPUT«95625␤»
colomon (fastest yet, but obviously less than perfectly elegant) 14:12
gtodd errm what is that %% ? :-) so infix modulus compares each element of two lists then lets you do stuff with each result in a one liner
yikes
PerlJam colomon: and what's the performance difference? :)
smls gtodd: % mean "is divisible by"
double-% I mean 14:13
colomon smls++ means %%
PerlJam smls: what client are you using that it eats one of the %?
smls PerlJam: Konversation
PerlJam smls: try %25% 14:14
colomon PerlJam: I get 10 seconds for smls’s original, 2.2 for the first one I posted, 7.7 for the hyper version, and .6 for the one with all the greps
smls %25%
FROGGS_ :P
works *g*
PerlJam marks Konversation as "weird IRC client to not use" in his head 14:15
colomon: nice.
smls gtodd: it's basically convenience for ($a % $b != 0) just without requiring you to remember the != 0 correctly
14:16 raiph left
gtodd yup ... modulus is nice but ... just sticking it in front of a list is wow .... if $n %% all (10000, 1000, 100, 10) 14:16
smls gtodd: == 0 I mean, not != 0
gtodd !!
smls just proves that its an easy source of error ;) 14:17
gtodd: all() constructs a Junction
PerlJam smls: I look at %% as more "say what I mean" than convienence :)
er, convenience 14:18
gtodd what about %25% ;-)
smls junctions can be used in expressions where a single value is expected, but automatically cause the whole expression to be evaluated for each "value" of the junction, and return the logical result
gtodd yoleaux: .u ☮ 14:19
oops
moritz .u ☮
yoleaux U+262E PEACE SYMBOL [So] (☮)
gtodd ww
14:20 Hor|zon joined
gtodd U+262E now 14:20
msg yoleaux:
arg
14:24 Alina-malina left
smls %% 14:24
gtodd I just spent five minutes trying to get the perl6 REPL to behave like yoleaux
:-\
smls yay, disabling "Variable Expansion" (whatever that's for) in my irc client's settings seems to have fixed it 14:25
FROGGS_ I was hoping that somebody might spend a summer to make the REPL behave :S
14:25 Hor|zon left
PerlJam ah ... Konversation is a windows client? 14:25
14:25 Ven left
gtodd m: "U+262E".char 14:25
camelia rakudo-moar 76ee8b: OUTPUT«No such method 'char' for invocant of type 'Str'␤ in block <unit> at /tmp/tmnbauEIeY:1␤␤»
gtodd :-D
|Tux| one of the folders inside rakudobrew is moar-nom/panda/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.pand
a-work/1426081091_7/.panda-work/1426081091_7/.panda-work/1426081091_7/.panda-work
smls PerlJam: No, KDE/Linux
14:26 raiph joined, donaldh left
FROGGS_ |Tux|: so it does not clean up? 14:26
|Tux| smls, I use KDE + hexchat
I am using a clean moar-nom/panda folder
FROGGS_ eww 14:27
|Tux| tadzik?
smls FROGGS_: Yeah, the REPL has a bunch of problems.
tadzik [Tux]: ?
oh
that looks unfortunate
FROGGS_ |Tux| / tadzik: that probably mean that File::Find is lazy again?
means*
|Tux| it also means I cannot continue testing :(
FROGGS_ smls: yes, and it needs someone who only cares about that for a while
tadzik I can't really look at it now, but is it on fresh rakudobrew-build? 14:28
a new build, not an update?
|Tux| yep, fresh git pull
yesterday was still ok
tadzik huh
I don't think there were updates to either
gtodd now I will use perl6 power to tell me what unicode character the hex codepoint U+262E corresponds to m: "U+262E".chars ... errm 14:29
hehe
tadzik I can't really look into it now, but I'll tell rakudobrew to build me one and see if that works
smls For example, binding (rather than assigning) variables is pretty much busted in REPL
14:29 adu joined
|Tux| .u U+262e 14:30
yoleaux U+262E PEACE SYMBOL [So] (☮)
14:30 muraiki joined
gtodd yeah I know I know ... :-) 14:30
anyway yoleaux is so convenient that I forget about it ... and assume yoleauxness is built in to the REPL ;-) 14:31
14:34 dwarring left, Hor|zon joined
PerlJam gtodd: you can always write a yoleaux module for yourself that you can use with the REPL :) 14:35
14:48 kaare__ is now known as kaare_
gtodd camelia: absorb yoleaux into your Borg 14:49
errm I meant assimilate
PerlJam: twould be cool
tadzik [Tux]: yeah, it reproduced here :| 14:51
wtf
I blame rakudo :) 14:52
FROGGS_ tadzik: so there must be a rakudo change about cwd or something?
|Tux| happy its not his fault
tadzik FROGGS_: perhaps
FROGGS_ |Tux| / tadzik: asre symlinks in the path to that panda dir? 14:53
|Tux| no
tadzik no
FROGGS_ good
14:53 Ven joined
smls rosettacode.org/wiki/Permutations_w...ons#Perl_6 no longer works with current Rakudo, anyone know how to fix it? 14:55
14:55 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
dalek pan style="color: #395be5">perl6-examples: 2b1bc9b | paultcochrane++ | lib/Pod/Convenience.pm6:
Uncuddling elsif statements
14:57
pan style="color: #395be5">perl6-examples: 868d277 | paultcochrane++ | htmlify.pl:
Extract title contents in its own routine
pan style="color: #395be5">perl6-examples: 85ac1b9 | paultcochrane++ | / (2 files):
Add table headers to example index files
14:58 espadrine_ is now known as espadrine
gtodd m: sprintf "U+%x".uc , "☮".ords 15:00
camelia ( no output )
gtodd m: say sprintf "U+%x".uc , "☮".ords 15:01
camelia rakudo-moar 76ee8b: OUTPUT«U+262E␤»
15:01 Ven left
colomon smls: how is it failing? 15:01
smls m: my $k = <a b c>; my $n = 2; .say for [X]($k xx $n).tree;
camelia rakudo-moar 76ee8b: OUTPUT«a b c a b c␤»
smls should print all "permutations of $n elements drawn from $k" 15:03
15:05 beastd joined 15:06 Ven joined 15:07 cognominal left
gtodd so maybe it would be easy enough to add yoleauxisms to the REPL with the non-official accepted REPL shortcut mechanism :-) ... perlgeek.de/blog-en/perl-6/2013-repl-trick.html 15:12
15:12 kaare_ left
gtodd m: sub u(Mu \x) is export { sprintf "U+%x".uc , x.ords } ; say u "☮" ; 15:13
camelia rakudo-moar 76ee8b: OUTPUT«U+262E␤»
gtodd m: sub u(Str \x) is export { sprintf "U+%x".uc , x.ords } ; say u "☮" ;
camelia rakudo-moar 76ee8b: OUTPUT«U+262E␤»
moritz you probably want that to be %04x or %06x 15:14
deepending on how new or old your Unicode is :-)
15:14 Ven left
gtodd oh true heheh .. there must be a better way than writing 100 yoleaux subs :-) .... the perl way of auto sub routine generation from a hash 15:15
of course with the perl6 community no matter how odd the code was everyone would be nice to me :)
haha 15:16
15:34 FROGGS_ left 15:35 larion left 15:36 telex left 15:38 telex joined
gtodd I guess Scott Walter's book "Perl 6 Now: The Core Ideas Illustrated with Perl 5" (from 2005 ) is outdated ... but it's a nicely organized presentation .. like a long detailed version of perlgeek.de/en/article/5-to-6 15:38
15:40 zakharyas1 left, FROGGS joined
PerlJam um ... except it's more about how to do P6 stuff in P5 15:41
gtodd hehe :) ... I assume doc.perl6.org/language/5to6 is the main place for gathering docs about 5-to-6 and that it will become longer than one page as it it evolves 15:42
moritz doc.perl6.org/language/5to6 is meant to be a migration (of code and knowledge) guide 15:45
in perlgeek.de/en/article/5-to-6 I tried to introduce some new features, but mostly explain why they exists, what advantages they offer 15:46
gtodd ++ that is a great article ... the code translators ( perlito and the scripts by Util ) are useful/helpful too in their own way 15:48
15:49 J-L joined 15:50 Rounin left
J-L Well, I finished porting a Perl5 script to Perl6. The time to run the Perl5 script is about three seconds, and the time it takes to run the equivalent Perl6 script is about 73 seconds. The difference could be due to my not using the most efficient Perl6 code, but the high-level algorithms are pretty much the same in both versions. 15:51
gtodd hmm actually I guess BlueTiger is more than a set of scripts :-)
J-L: great! you have a benchmark :) 15:52
15:56 adu left
J-L gtodd: I suppose that's good that I have a benchmark... I'm just concerned there's such a large difference in run time (and that Perl6 is the slower one). 15:57
[Coke] m: say 73/3
camelia rakudo-moar 76ee8b: OUTPUT«24.333333␤»
gtodd J-L: www.perlmonks.org/?node_id=1099617 is another seat of pants "benchmark" that has slowly been improving
J-L I mean, if I'm to blame, then I can learn what I'm doing to make the script run so slow.
FROGGS J-L: sadly it is no surprise to me that the Perl 6 version is that much slower
gtodd J-L: but no quantum leaps
moritz still has hopes that GLR will make things faster 15:58
gtodd J-L: one day there will be a quantum leap in speed for some things
moritz however, the lack of GLR progress sadens me
FROGGS moritz: aye
moritz btw, quantum leaps are *very* small
we have them most days in rakudo :-)
PerlJam I've never thought of the GLR directly making things faster, just that they'll be more understandable or consistent across the language. 15:59
gtodd hahah
PerlJam speed has always seemed a secondary thing with the GLR for me.
gtodd order of magnitude leap :-)
PerlJam (maybe I'm wrong)
moritz I just know that our current list iteration speed isn't sustainable 16:00
and if we find no way to speed it up substantially, I'd be willing to drop laziness as a default
PerlJam huh 16:01
gtodd www.perlmonks.org/?node_id=1099617 with that I get .5 seconds for perl5 and 5 seconds for perl6 :-)
16:01 cdc left
moritz in virtually all profiles from programs not written by #perl6 regulars, list iteration takes at least 40% of the time, usually more like 80% 16:02
gtodd but it used to be 40 seconds for perl6 :)
PerlJam I tend to think of laziness-by-default to be one of the core concepts in P6 (i.e. if we can't keep it, we're doing somethign wrong)
moritz++ (for being pragmatic :) 16:03
gtodd because I don't use the exact code from the perlmonks node :)
but even using the same code the perl6 times have gone down from 60 second to 35 seconds etc etc. 16:05
J-L I discovered that appending one byte at a time to a Buf object is much, much slower than preallocating it and then just setting/populating the individual bytes. What took about 40 seconds with appending on Rakudo Perl on Windows, takes about 3 seconds when setting what was already allocated. 16:09
16:10 wryk joined, PZt left
FROGGS J-L: that sounds it does not allocate slots up to a factor of two, which it probably should do 16:11
moritz mutable Bufs are a fairly recent addition to rakudo 16:13
so I'm not surprised it shows warts
but in general, repeated concatenation is O(n^2)
16:13 J-L left 16:14 dalek left, pnu left, dalek joined, ChanServ sets mode: +v dalek, integral left, lsm01 left, nyuszika7h left, fernando___ left 16:15 integral joined, integral left, integral joined 16:16 lsm01 joined 16:18 fernando___ joined, beastd left 16:20 pnu joined
dalek p: 7e7efde | FROGGS++ | tools/build/MOAR_REVISION:
bump moar revision
16:28
p: 9233615 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/SerializationReader.java:
fixup outers via priorInvocation

This will fix the long standing issue with our scoped subs which are use-d by another package with gets precompiled. This showed up for URI in rakudo star for example.
FROGGS I am confident enough to push it now btw...
moritz prioriIncantatem!
FROGGS aye :o)
dalek kudo/nom: 10dcf35 | FROGGS++ | tools/build/NQP_REVISION:
bump nqp for jvm bugfix and moar improvements
16:30
16:30 raiph left, J-L joined
J-L which print, respectively: 254.99999999999997 255 255 16:31
moritz J-L: context? 16:33
J-L Sorry, I was comparing three different commands: ruby -e "print 2.55 * 100" vs. perl -e "print 2.55 * 100" vs. perl6 -e "print 2.55 * 100" 16:35
Apparently the ruby command gives something different depending on version and/or platform. Some versions give me 255.
Here's a fun comparison between Ruby, Perl5, and Perl6: 16:37
ruby -e "print( (2.55 * 100).to_i )" # prints 254
perl -e "print int(2.55 * 100)" # prints 254 16:38
perl6 -e "print( (2.55 * 100).Int )" # prints 255
Note that there is no bug in any of these... they're behaving exactly as they should.
PerlJam Rat++ :)
(floating point)-- 16:39
J-L Yeah... It's pretty clever.
FROGGS m: say 2.55.nude
camelia rakudo-moar 76ee8b: OUTPUT«51 20␤»
16:41 myp left
FROGGS .tell jnthn I've already applied it as github.com/perl6/nqp/commit/9233615bb1 16:41
yoleaux FROGGS: I'll pass your message to jnthn.
16:44 xinming left
J-L Whoa! I didn't know about "nude". How 'bout: 3.14159.nude.say 16:45
Interesting!
16:45 myp joined
FROGGS m: say Rat.^methods 16:45
camelia rakudo-moar 10dcf3: OUTPUT«Rat FatRat new nude Num floor ceiling Int Bridge base base-repeating succ pred norm narrow abs sign conj sqrt rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech acosech cotanh acotanh…»
moritz m: 3.14159.nude.say
camelia rakudo-moar 10dcf3: OUTPUT«314159 100000␤»
PerlJam m:pi.nude.say
moritz m: pi.Rat.nude.say 16:46
camelia rakudo-moar 10dcf3: OUTPUT«355 113␤»
J-L Yeah! Basically, 3.14159 == 314159/100000
moritz m: pi.Rat(1e-9).nude.say
camelia rakudo-moar 10dcf3: OUTPUT«103993 33102␤»
moritz m: pi.Rat(1e-12).nude.say
camelia rakudo-moar 10dcf3: OUTPUT«4272943 1360120␤»
TimToady .Rat is not very precise
coming from floating point
J-L Didn't know about pi.Rat.nude. Very nice! 16:47
PerlJam Did mine not elicit a complaint because there must be a space after the "m:" ?
m: pi.nude.say
camelia rakudo-moar 10dcf3: OUTPUT«No such method 'nude' for invocant of type 'Num'␤ in block <unit> at /tmp/OnwUmFLBip:1␤␤»
PerlJam yep
J-L Wait... is "m:" actually running commands? (Let me try...)
m: 4+5
TimToady pi is supposed to be a rat literal that knows how to turn into either Rat or FatRat, but we're not there yet
camelia ( no output )
J-L m: (4+5).say 16:48
camelia rakudo-moar 10dcf3: OUTPUT«9␤»
FROGGS J-L: it does, but you have to say/print something
J-L m:pi.say
FROGGS with space after colon
J-L m: pi.say 16:49
camelia rakudo-moar 10dcf3: OUTPUT«3.14159265358979␤»
TimToady maybe we should have a pi() function that you tell how many digits you want 16:50
PerlJam Is that the full precision of pi, or just the precision that's displayed?
m: pi.fmt("%.32f").say
camelia rakudo-moar 10dcf3: OUTPUT«3.14159265358979000000000000000000␤»
TimToady m: say atan2(1,1)*4
camelia rakudo-moar 10dcf3: OUTPUT«3.14159265358979␤»
TimToady seems pretty close to what fits in a floater 16:51
masak FROGGS: here's a solution: gist.github.com/masak/ed6e22bd3e6c0a4bb679
FROGGS: it doesn't stop after the first one, but gives you all the expressions that yield that result
PerlJam huh ... From Num.pm: my constant pi = 3.14159_26535_89793_238e0;
TimToady m: say 3.14159_26535_89793_238.WHAT 16:52
camelia rakudo-moar 10dcf3: OUTPUT«(Rat)␤»
masak FROGGS: there's a fair bit of duplication that could be handled by knowing more about precedence and only considering "canonical" expressions. but I took the easy way out -- and this works, just with some duplication in the results.
TimToady m: say 3.14159_26535_89793_238
camelia rakudo-moar 10dcf3: OUTPUT«3.141592653589793238␤»
TimToady m: say 3.14159_26535_89793_238.nude
camelia rakudo-moar 10dcf3: OUTPUT«1570796326794896619 500000000000000000␤»
16:53 J-L left, alini left
PerlJam If a Num can't give me those extra digits of precision, why are they specified? 16:53
TimToady that was probably the limit of the Rat, and someone added e0 16:54
m: say 500000000000000000.msb
camelia rakudo-moar 10dcf3: OUTPUT«58␤»
TimToady looks like we could get 6 more bits worth 16:55
but really, as soon as you multiply it by anything, it'll probably convert to Num anyway
and it's not like that is exact either 16:56
you could, of course, define as big a FatRat as you like
my \pi = fatpi(40) or whatever
16:56 raiph joined 16:57 J-L joined
J-L m:"test".say 16:57
m: "test 2".say
camelia rakudo-moar 10dcf3: OUTPUT«test 2␤»
16:57 wryk left 16:58 rararara2 joined
J-L m: "test 3" "with error" say() 16:58
camelia rakudo-moar 10dcf3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/kV990rP2e3␤Two terms in a row␤at /tmp/kV990rP2e3:1␤------> 3"test 3"7⏏5 "with error" say()␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ statement end␤ …»
[Coke] You can also do that in private, btw. :)
.... <<< /msg camelia m: say "turn down "~4.WHAT >>> 16:59
rararara2 I think that in perl6 you cannot do anymore neat tricks like this one: my $gzipit = ($matrixfn =~ /\.gz$/) ? "| gzip -c" : ""; open(OUTPUT, "$gzipit > $matrixfn");
it's a pity isn't it? 17:00
17:00 dwarring joined
PerlJam rararara2: oddly, I'm looking at some P5 code that does just that :) 17:00
TimToady you just have to use EVAL now
17:01 madmuid joined 17:06 fhelmberger left
jnthn .botsmaack 17:09
yoleaux 10 Mar 2015 23:15Z <FROGGS> jnthn: the outer of all evil: gist.github.com/FROGGS/5646d051dca96e3f879f (that fixes the jvm+uri issue)
16:41Z <FROGGS> jnthn: I've already applied it as github.com/perl6/nqp/commit/9233615bb1
jnthn ...well, that was easy :) 17:10
17:11 mr-foobar joined
hahainternet hola jnthn 17:12
ca va?
17:13 perl6_newbee joined
perl6_newbee hi al 17:13
l
17:14 rararara2 left
smls FROGGS: Does this solve your programming problem from earlier today? gist.github.com/smls/83829c30fdc22acaffbb 17:14
jnthn ca va bien, merci :)
17:14 smls left
jnthn Mais fatigue... 17:15
hahainternet jnthn: not that i want to pressure, i just wanted to ask if you ever got a chance to look at the two nqp/NativeCall questions i had a while ago
jnthn ...is this French or am I totally making it up... :)
hahainternet they were (a) preallocating structs and the like (TCL requires a DString allocating by the caller)
and (b) accessing unions, not as important but on my list
raiph PerlJam: about pi's accuracy in current Rakudo: blogs.perl.org/users/brad_gilbert/2...nt-1432069
hahainternet again no presure with this in any regard, i'm still writing in Golang which is lovely but no Perl 6
jnthn hahainternet: Was actually chatting about unions a bit with arnsholt++ last night. :) 17:16
hahainternet so "possibly soon" is an answer i should take away? 17:17
that's fine with me :)
i just want to ensure it doesn't get missed before 6.0.0 or whatever the hopefully promised goal is this year
gonna try and finish my wrapper in golang to a decent standard this week, then i can port it for fun
[Coke] anything that must be done for 6.0, we probably need an RT and have it tied to the release ticket. 17:18
hahainternet current perl 5 TCL.pm i don't like and being able to use Supplies will make things fun
[Coke]: well i am not in a position to demand it
so i'm just prodding jnthn every now and again in the hope he'll find it useful enough to ensure it works
i don't know nqp at all and haven't the time to invest yet, although hopefully before EOY i will
jnthn Well, thankfully NativeCall is not just me (or even muchly me) hacking on it these days, but anyway, it's on my radar. :)
I agree we need it. 17:19
hahainternet jnthn: if you want to point me at some required reading i'll put some time in
but i have two site backends and one network to fix this week
so it'll take some time
jnthn *nod* 17:20
hahainternet supplies and migrate is all in and working in rakudo/moar though right?
jnthn Yeah, this week has been crazy busy so far and next week also will be. But next few days should be better )
hahainternet i'm pretty sure it was a few months ago reading your talks
jnthn Well, it works as in "I got it to work for my talk", but it's not polished. 17:21
hahainternet rgr
going to try a little irc bot with backend processing going on
so a supply of messages to be handled back and forth
jnthn From April onwards I get a bunch more Perl 6 time, so will be able to tend to a lot of the things I'm wanting to :)
hahainternet seems like it should match up pretty closely with your code golf example
arnsholt hahainternet: Unions aren't implemented yet (and are gnarly for a couple of reasons jnthn pointed out to me last night), but preallocating structs should work already 17:22
17:23 eli-se joined
masak FROGGS: and now, predictably, I thought of a better way to do it :) 17:23
arnsholt Assuming preallocating structs means something like "struct foo *my_foo = malloc(sizeof(struct foo)); wants_preallocated(my_foo);"
hahainternet arnsholt: yeah it's something pretty similar to that, www.tcl.tk/man/tcl8.6/TclLib/DString.htm
Tcl_DStringInit initializes a dynamic string to zero length. The Tcl_DString structure must have been allocated by the caller. No assumptions are made about the current state of the structure; anything already in it is discarded. If the structure has been used previously, Tcl_DStringFree should be called first to free up any memory allocated for the old string. 17:24
arnsholt Yeah, that should just work, I think
hahainternet i'll have to have another go then, unions don't matter as much to me as i can still throw around pointers 17:25
arnsholt Yeah, as long as it's pointers it should mostly be a question of banging out all the definitions 17:26
hahainternet arnsholt: i'll come back to you in a day or so begging for help :) 17:29
17:31 cschwenz left 17:34 virtualsue left
raiph masak (or others): bug reporting help requested: gist.github.com/raiph/8bdd9faceff2ef964a71 17:34
arnsholt hahainternet: Sounds like a plan! =) 17:35
17:37 beastd joined
jnthn raiph: /$!a/ should be caught and complained about at compile time, but it ain't yet 17:37
raiph jnthn: the same problem occurs with various scenarios, not just regexes 17:38
jnthn Yeah, anon methods too
Though that one is a little more interesting maybe
If the anon method gets its self arg typed correctly it may be arguably OK 17:39
The regex one simply won't work out, though, so we should complain over that.
17:39 nebuchadnezzar left
raiph i'm particularly curious about whether the last two rt mentions in my gist ought be included as (potentially) the same thing 17:40
afk
jnthn Will have a look a little later...flight now :)
bbi2h
17:41 madmuid left 17:42 alini joined 17:48 pecastro left 17:51 madmuid joined 17:52 diana_olhovik_ left, revdiablo joined 17:53 dakkar left, eli-se left, kjs_ left 17:55 nebuchadnezzar joined
gtodd hmm OUTERS 17:55
timotimo i could out-ers you any day. come at me bro
gtodd heh 17:56
camelia: give me an example of the uise of outers from your copious log of successfully executed snippets
camelia: ? r you "awake" 17:57
I guess those are camelia-2.0 features
masak raiph: re gist.github.com/raiph/8bdd9faceff2ef964a71 18:08
raiph: link on line 2 looks like a genuine issue (and, I think, RT'd already)
raiph: your link on line 5 isn't a bug. 18:09
(more like a misunderstanding of the scoping of !-twigil variables)
18:10 gfldex joined
masak the link on line 8 seems to suffer from the same misunderstanding... 18:10
hm, or not. 18:11
no, that one should be fine, actually.
18:12 espadrine left
masak rt.perl.org/Ticket/Display.html?id=122892 is about !-twigil vars in regexes -- quite separate from all of the above ones. 18:13
rt.perl.org/Public/Bug/Display.html?id=122253 looks very similar, or even a dupe. 18:14
thou in his backlog only seems to be talking abotu BUILD/new issues -- unrelated to !-twigil vars and regexes 18:15
rt.perl.org/Public/Bug/Display.html?id=114672 only pertains to a wrong error message 18:16
rt.perl.org/Public/Bug/Display.html?id=78112 is again about a completely different thing 18:17
raiph: all in all -- thanks for taking the time to compile all those possibly-related things. most of them were not related, though. of your 8 links, only the 4th and 5th are closely related. 18:18
timotimo negative results ought to be published, too 18:19
masak absolutely 18:20
18:22 xinming joined 18:23 perl6_newbee left
Mouq raiph++ 18:29
18:29 grondilu left 18:36 adu joined 18:39 Alina-malina joined
dalek c: 197d042 | moritz++ | htmlify.p6:
Include any routines from superclasses/roles

Previously only methods were added. This fails to include those methods that are under a "routine" heading. Also, we shouldn't assume that users of a class are only interested in inherited/supplied methods; subs, traits and operators from a super type are equally interesting to users of a subclass.
18:43
18:48 dalek left, dalek joined, ChanServ sets mode: +v dalek
Mouq Hm… found a bug in xx 18:49
m: say (((1,2,(3,4)), 1 ?? (4,5,6,2) !! (2, 3)) xx *).munch(50).perl
camelia rakudo-moar 10dcf3: OUTPUT«(1, 2, 3, 4, 4, 5, 6, 2, 1, 2, 3, 4, 4, 5, 6, 2, 1, 2, 3, 4, 4, 5, 6, 2, 1, 2, 3, 4, 4, 5, 6, 2, 1, 2, 3, 4, 4, 5, 6, 2, 1, 2, 3, 4, 4, 5, 6, 2, 1, 2)␤»
Mouq m: say (((1,2,(3,4)), 1 ?? (4,5,6,2) !! (2, 3)) xx 10).munch(50).perl
camelia rakudo-moar 10dcf3: OUTPUT«(((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)), ((1, 2, (3, 4)), (4, 5, 6, 2)),…»
nwc10 sigh, the JIRA issue bot at work is rate limited.
dalek is not
this is the wrong way round :-/
(the JIRA bot spent over an hour churning out messages about commits it had seen when I pushed some reprocessed branches) 18:50
(this is not as bad as it sounds, as at work we have a channel named #botland where all the chatty bots live) 18:51
masak nwc10: "For whoever has it, it shall be given to him; and whoever does not have it, from him shall be taken even that which he has."
masak .oO( Fairness already exists -- it's just unevenly distributed ) 18:52
moritz nwc10: dalek is rate limited 18:55
nwc10: it just doesn't align too well with freenode's limiting 18:56
nwc10 ah. right. oh. thanks for the clarification
still, it amuses me every time someone does enough stuff that when they push it they kill dalek
it's a reward for a big contribution. 18:57
18:58 molaf joined, eli-se joined 18:59 eli-se left
timotimo they've killed dalekenny! 19:03
19:03 rurban left 19:05 madmuid left 19:09 madmuid joined 19:17 virtualsue joined
xfix github.com/perl6/specs/issues/87 19:17
eh, I also found '0' being false annoying. 19:18
But it also fits how typeless Perl is.
moritz Perl 6 isn't very typeless 19:19
masak how do I sort two arrays of Ints in "lexical" order? 19:24
(I'm stuck on writing an improved version of FROGGS' teaser problem)
that is, under this comparison, [2] < [2, 2] < [4] 19:25
(just as with characters in a string, elements are compared pairwise until either a difference is found or one of the arrays runs out of elements)
moritz masak: cmp 19:29
masak ooh 19:30
m: say [2] cmp [2, 2]
camelia rakudo-moar 10dcf3: OUTPUT«Less␤»
masak m: say [2, 2] cmp [4]
moritz m: say [2, 2] cmp [4]
camelia rakudo-moar 10dcf3: OUTPUT«Less␤»
masak well, that simplifies things :)
moritz++ 19:31
19:38 virtualsue left, diana_olhovik_ joined
masak FROGGS: I replaced my first solution at gist.github.com/masak/ed6e22bd3e6c0a4bb679 with a longer but much better one 19:38
this one doesn't report solutions which are trivial duplicates of each other
it keeps running until you stop it. mine has found two solutions in ~5 minutes. 19:39
(I can see that there is a solution with 51 terms, but this algorithm won't get there) 19:40
ooh, it found a third solution :> 19:41
FROGGS: anyway, enjoy. I spent way, way too much time on that. if you have any questions, let me know.
timotimo i can't reproduce the profiler crash any more .. ?! 19:42
Mouq xfix: '0' being false is more in the realms of the "typeless"ness of JS or PHP :P 19:44
xfix '0' is true in JavaScript. 19:45
FROGGS wow 19:46
masak++ and smls++
masak didn't see smls++'s gist.github.com/smls/83829c30fdc22acaffbb until now 19:48
dalek rl6-roast-data: 30b66cd | coke++ | / (9 files):
today (automated commit)
vendethiel would love for conditions to *require* Bools as well :).
masak smls: ooh, that's pretty clever. 19:49
Mouq xfix: Right, I conflating one craziness with another, sorry :)
masak and way faster than my solution. 19:50
[Coke] suggests that we make "true" and "yes" so True. 19:54
. o O (NOTE: NOT REALLY SUGGESTING THAT)
timotimo but also "ja" and "Ja", please 19:55
masak smls: slightly modifying your program, I could find all four solutions: gist.github.com/masak/70b1dbf77c88c43979cb
FROGGS and also aye, and yeah
and blimey
masak [Coke]: I have copied your brain state into a simulation, and I am now forcing your simulated peer to use the language you propose for all eternity. 19:56
looking back, this may have been an overreaction. but consider it an interesting, if inhumane, experiment. 19:57
19:59 dalek left
FROGGS perl6-j -e 'say shell "perl6-j -e \"{;}\""' # Proc::Status.new(exit => 0, pid => Any, signal => 0) 19:59
this might be the reason for many of the passing todos...
20:00 dalek joined, ChanServ sets mode: +v dalek
FROGGS when a subprocess dies, the exit status is still zeroish 20:00
timotimo that shouldn't be ...
masak today's autopun spotting: twitter.com/mjdominus/status/575729210549006336
FROGGS timotimo: perl6-j -e "{;}" itself dies with an unwindexception
arnsholt masak: Also a very good commentary on techno culture (sadly) 20:01
20:01 rindolf left
masak arnsholt: 'fraid you're right. 20:01
arnsholt: gamergate seems to consist of "<woman> there is harassment online -- <men> no, there isn't! -- * men doxx woman" 20:02
:(
arnsholt Pretty much
hahainternet you'll likely catch some shit even for saying that masak
but you're 100% right
[Coke] masak: That language is coldfusion. I'm already in hell, you can't hurt me. 20:03
vendethiel hahahahaha
masak [Coke]: good. I started to feel bad about the whole simulation thing.
[Coke] I hope someone feels bad about my professional life! 20:04
at least there is free coffee, which I will now go drink.
vendethiel masak: gamergate is the worst possible answer to an existing problem 20:05
(of all the people I have on steam, exactly ZERO of them actually read the "professional gaming journalism" scene because we all know how poxy it is) 20:07
masak *nod* 20:08
20:10 zakharyas left 20:11 yqt joined, colomon left
vendethiel has suffered from doxxing in the past and wouldn't wish it to anyone, especially member of the opposite sex that are even more targeted... 20:11
20:26 darutoko left 20:29 raiph left
avuserow o/ #perl6 20:31
hoelzro o/ avuserow 20:33
20:34 colomon joined 20:36 madmuid left
[Tux] tadzik, any workaround for panda? 20:46
masak .oO( a bamboo cage? ) :P 20:47
jnthn
.oO( a racoon? )
20:48
masak puts jnthn in the bamboo cage
jnthn It's cosy :) 20:49
20:49 molaf left
jnthn [Tux]: What's the panda issue, ooc? 20:49
FROGGS racoons are sweet :o)
jnthn FROGGS: I...think that's macaroons... :)
[Tux] jnthn, won't install under rakudobrew
FROGGS jnthn: it creates the .work dir in panda/ and then creates a .work in .work and then a .work in .work/.work/ etc 20:50
masak sounds like too much .work
jnthn wtf... 20:51
FROGGS good that empty folder do not need any space on disk :o)
jnthn: we had similar problems when File::Find was used lazily
jnthn Do we suspect a Panda change, or a Rakudo change that broke it? 20:52
FROGGS the intend was to get a snapshot of what's in cwd, create cwd/.work, and copy all of cwd to .work to build/test it
but when it was used lazily, it was attempted to copy the .work too
jnthn: there is no panda change since 11 days 20:53
so, that's unlikely
jnthn ok
retupmoca .botsnack
yoleaux :D
20:54 madmuid joined 21:02 agentzh joined, agentzh left, agentzh joined
dalek c: 6fd8df0 | paultcochrane++ | lib/Type/List.pod:
Document zip() builtin
21:04
c: b02b36f | paultcochrane++ | Makefile:
Add a "help" target with usage info to Makefile
c: 4903f5c | paultcochrane++ | htmlify.p6:
Merge branch 'master' of github.com:perl6/doc
21:05 skids left 21:09 diana_olhovik_ left
FROGGS about jvm-star: we had 5 failing modules, three were affected by "the uri issue", two of the work, one has other problems now, Grammar::Profiler::Simple still fails (str idx -3) and Digest::MD5 fails like always 21:09
TL;DR we are down to three differently failing modules 21:10
21:10 virtualsue joined
jnthn FROGGS++ 21:12
21:12 colomon left 21:14 abraxxa left 21:15 kaare_ joined 21:16 coffee` left
FROGGS we really need to fix Digest: testers.p6c.org/reports/26717.html 21:19
OpenSSL depends on it for example...
ohh dear 21:22
now my panda (without pandabrew) also hangs
(on jvm) 21:25
PerlJam I little while ago, I did "rakudobrew build moar" and went to a meeting. When I got back just now, my system was super slow. It seemed to be hung on fetching panda with the moar process consuming most of the CPU.
s/I/A/
FROGGS delete that .work* dir in the panda folder 21:26
.panda-work actually
bisecting now... 21:27
PerlJam nice ... a never ending directory structure
21:30 kaare_ left
FROGGS that one breaks panda: github.com/rakudo/rakudo/commit/1d...779a68cc50 21:32
masak 'night, #perl6
FROGGS I'll revert it and hope Mouq++ can check why that breaks panda 21:33
21:34 colomon joined
dalek kudo/nom: 7b153f5 | FROGGS++ | src/core/ (2 files):
Revert ".eager shouldn't flatten" (breaks panda rebootstrap)

This reverts commit 1d0501410068495a95ad5fa908fa77779a68cc50.
21:34
FROGGS .tell Mouq Sorry I had to revert your commit, but I dont have enough brane to hunt the panda rebootstrap issue today :/
yoleaux FROGGS: I'll pass your message to Mouq.
FROGGS |Tux|: panda should work now again (with latest rakudo) 21:35
PerlJam FROGGS++
FROGGS .tell tadzik github.com/rakudo/rakudo/commit/7b...f80e3dafba 21:36
yoleaux FROGGS: I'll pass your message to tadzik.
21:36 eli-se joined 21:40 kjs_ joined 21:42 espadrine joined 21:43 kaare_ joined
Mouq FROGGS: Oh dang, yeah no problem 21:47
yoleaux 21:34Z <FROGGS> Mouq: Sorry I had to revert your commit, but I dont have enough brane to hunt the panda rebootstrap issue today :/
FROGGS I guess it is about File::Find... 21:48
21:50 telex left 21:51 eli-se left 21:52 telex joined 21:57 xfix left 21:58 kjs_ left
[Tux] rebuilds … 21:58
FROGGS++ 22:01
m: class C { }; my C @x; @x.perl.say 22:03
camelia rakudo-moar 7b153f: OUTPUT«Array[C].new()␤»
[Tux] m: class C { }; my C @x; @x[1..2].perl.say
camelia rakudo-moar 7b153f: OUTPUT«()␤»
[Tux] shouldn't a slice keep the type?
jnthn Slices always return parcels, iirc 22:04
[Tux] and parcels are about to go away, right?
jnthn Right, to be unified with List, which also doesn't presently exist in typed form. 22:05
dalek kudo/nom: 858ac4e | jnthn++ | src/ (3 files):
Catch wrong attribute usage in a regex.

Regexes are methods on Cursor (or some subclass of it), meaning that an attribute access inside of them is relative to that. Rather than failing silently or exploding noisily at runtime, catch the problem at compile time. The typed exception's message explains the issue and offers a suggestion; wording tweaks welcome.
[Tux] that was quite surprising to me
22:05 adu left
dalek ast: f9c334d | jnthn++ | S05-interpolation/regex-in-variable.t:
Tests for RT #122253.

Replaces some bogus tests with incorrect expectations.
22:06
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122253
jnthn [Tux]: How so?
22:06 Alina-malina left
[Tux] a slice of dogs is still dogs 22:06
jnthn [Tux]: As in, what were you trying to do?
Mouq [Tux]: Slices becoming Parcel is important because Parcels are what's used for general assignments
so @a[1,2] = (3,4) is like (@a[1], @a[2]) = (3,4) 22:07
(at least, that's my understanding)
jnthn Mouq: True, though that doesn't mean a typed Parcel-y thing couldn't exist.
Mouq doesn't understand how that changes under GLR
jnthn: True :) 22:08
22:10 Alina-malina joined
jnthn .tell raiph 122892 and 122253 were about the same issue; I merged them, and then did the work needed to resolve them. 22:11
yoleaux jnthn: I'll pass your message to raiph.
Mouq obliterates panda and clones fresh to make sure his fix is actually a fix
[Tux] jnthn, any news on the profiler? (just curious, not being pushy) 22:12
22:13 madmuid left
jnthn [Tux]: No; I've been burried with $dayjob things for about the last week and a half, so I've not got much news on anything. 22:14
The patch I just did is the first useful thing I've done here for nearly a week... 22:15
jnthn should have a decent amount more time in the next few days, at least... 22:19
22:19 dolmen joined
jnthn For now, sleep... o/ 22:19
[Tux] sleep tight
Mouq 'night jnthn :) 22:21
22:21 madmuid joined 22:24 spider-mario left 22:36 adu joined 22:39 vendethiel left, donaldh joined 22:40 camelia left
donaldh nqp: QAST::WVal.new[0] # jvm gives java.lang.RuntimeException: This type does not support positional operations 22:40
dalek ast: a9895b9 | Mouq++ | S02-types/whatever.t:
((1,2) xx *) needs to be .flattened to be (1,2,1,2,…)
ast: 1cbaf96 | Mouq++ | S03-metaops/eager-hyper.t:
Fix eager-hyper.t tests so that they're actually meaningful
22:41 skids joined, vendethiel joined, camelia joined
Mouq nqp: QAST::WVal.new[0] 22:42
psch nqp-m: QAST::WVal.new[0]
donaldh camelia has died
Mouq She's just patiently waiting to be re-voiced :) 22:43
donaldh Anyhoo. Seems to be a behavioural difference between moar and jvm
22:43 ChanServ sets mode: +v camelia
camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 188.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Lost connection to server irc.freenode.org.␤» 22:43
..nqp-jvm: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-j": No such file or directory at lib/EvalbotExecuter.pm line 188.␤exec (./rakudo-inst/bin/nqp-j /tmp/tmpfile) failed: No such file or directory␤Lost connection to server irc.freenode.org.␤»
( no output )
( no output )
22:50 gfldex left 22:51 coffee` joined
dalek kudo/nom: a3b5619 | Mouq++ | src/core/List.pm:
Be more consistent about flattening with infix:<xx>
22:53
kudo/nom: b56fc0b | Mouq++ | src/core/metaops.pm:
Add support for hypers on lists ending in *

E.g., (1,2,3,*) «+« (4,5,6,7,8) === (5, 7, 9, 10, 11)
kudo/nom: 79661ac | Mouq++ | src/core/ (3 files):
Revert & fix "Revert ".eager shouldn't flatten" (breaks panda rebootstrap)"

This reverts commit 7b153f5c69c9a23124c5c608f697adf80e3dafba.
  .eager should actually be eager, even if it's called on a Parcel :P
More importantly, EAGER should actually eagerify its arguments. The issue was that it was making a Parcel, passing the Parcel to Any.eager to get flattened, and from there passed to List.eager. So we just make a flat List instead and call List.eager.
kudo/nom: 3da1bbd | Mouq++ | src/ (3 files):
Merge branch 'nom' of github.com/rakudo/rakudo into nom
Mouq dalek: You didn't die! :D
22:54 yqt left
Mouq FROGGS++ for the 'eager' issues 22:54
23:04 adu left, vendethiel left 23:05 alini left 23:06 Alina-malina left 23:07 Alina-malina joined 23:11 grondilu joined 23:16 tim_ joined 23:18 tim_ left 23:19 donaldh left 23:27 beastd left, virtualsue left
dalek ast: 1d6747d | Mouq++ | S03-metaops/hyper.t:
Unfudge passing hyper tests
23:32
ast: 966d85b | Mouq++ | S03-metaops/hyper.t:
Add tests for RT #120662
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=120662
23:39 wicope left
Mouq m: my @a=<a a a>;my @b=<b b b>;for (@a »,« @b) »,« @a -> $a, $b, $c {say "$a $b $c"} # RT #77746 23:40
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77746
camelia rakudo-moar 3da1bb: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<,> are not of the same length␤left: 6 elements, right: 3 elements␤ in sub hyper at src/gen/m-CORE.setting:21599␤ in block at src/gen/m-CORE.setting:21510␤ in block <unit> at /tmp/d2VerSVXcU:1…»
Mouq m: my @a=<a a a>;my @b=<b b b>;for (@a[] »,« @b) »,« @a -> $a, $b, $c {say "$a $b $c"} # RT #77746
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77746
camelia rakudo-moar 3da1bb: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<,> are not of the same length␤left: 6 elements, right: 3 elements␤ in sub hyper at src/gen/m-CORE.setting:21599␤ in block at src/gen/m-CORE.setting:21510␤ in block <unit> at /tmp/AIhRJ5K9WH:1…»
Mouq m: my @a=<a a a>;my @b=<b b b>;for (@a[*] »,« @b) »,« @a -> $a, $b, $c {say "$a $b $c"} # RT #77746
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77746
camelia rakudo-moar 3da1bb: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<,> are not of the same length␤left: 2 elements, right: 1 elements␤ in sub hyper at src/gen/m-CORE.setting:21531␤ in sub hyper at src/gen/m-CORE.setting:21606␤ in block at src/gen/m-CORE.setti…»
Mouq Err
m: my @a=<a a a>;my @b=<b b b>;for (@a[*] »,« @b) »,» @a -> $a, $b, $c {say "$a $b $c"} # RT #77746 23:41
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77746
camelia rakudo-moar 3da1bb: OUTPUT«a a b␤a a a␤b a a␤a b a␤»
Mouq m: my @a=<a a a>;my @b=<b b b>;for (@a »,« @b) »,» @a -> $a, $b, $c {say "$a $b $c"} # RT #77746 23:42
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=77746
camelia rakudo-moar 3da1bb: OUTPUT«a a b␤a a a␤b a a␤a b a␤»
Mouq Okay, cool
If that looks wrong, that's because it's very misleading :P 23:43
m: my @a=<a a a>;my @b=<b b b>; say ((@a »,« @b) »,» @a).perl
camelia rakudo-moar 3da1bb: OUTPUT«Array.new("a", "a", "b", "a", "a", "a", "b", "a", "a", "a", "b", "a")␤»
Mouq m: my @a=<a a a>;my @b=<b b b>; say ((@a[*] »,« @b) »,» @a).perl
camelia rakudo-moar 3da1bb: OUTPUT«((("a", "a"), ("b", "a")), (("a", "a"), ("b", "a")), (("a", "a"), ("b", "a")))␤»
Mouq m: my @a=<a1 a2 a3>;my @b=<b1 b2 b3>; say ((@a »,« @b) »,» <c1 c2 c3>).perl 23:44
camelia rakudo-moar 3da1bb: OUTPUT«Array.new("a1", "c1", "b1", "c2", "a2", "c3", "b2", "c1", "a3", "c2", "b3", "c3")␤»
Mouq m: my @a=<a1 a2 a3>;my @b=<b1 b2 b3>; say ((@a[*] »,« @b) »,» <c1 c2 c3>).perl
camelia rakudo-moar 3da1bb: OUTPUT«((("a1", "c1"), ("b1", "c1")), (("a2", "c2"), ("b2", "c2")), (("a3", "c3"), ("b3", "c3")))␤»
Mouq .ask TimToady Do these look OK to you? irclog.perlgeek.de/perl6/2015-03-11#i_10262758 23:45
yoleaux Mouq: I'll pass your message to TimToady.
Mouq Sorry for the spam
23:54 dolmen left