»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:02 cpage_ left 00:05 sufrostico joined, kid51 joined, cpage_ joined 00:07 firstdayonthejob joined 00:15 wamba left 00:30 sufrostico left, BenGoldberg joined 00:36 firstdayonthejob left, khw left 00:41 vendethiel left 00:42 SCHAAP137 left 00:44 vendethiel joined 00:45 cdg left 00:47 spider-mario left 00:52 khw joined 00:55 jme` left 01:00 jargan joined, jast left 01:01 yeahnoob joined 01:12 anthk_ left, Herby_ joined
Herby_ Evening, everyone! 01:12
dalek c: 5cce96b | skids++ | doc/Type/X/NoDispatcher.pod:
Correct typo and re-massage sentence.
01:13
c: dfad2e7 | skids++ | doc/Language/modules-extra.pod:
Spelling, more compact index title, add some modules
Herby_ m: <a b c>.permutations.say
camelia rakudo-moar 85d20f: OUTPUT«((a b c) (a c b) (b a c) (b c a) (c a b) (c b a))␤»
Herby_ \o
m: .say for permutations <a b c> 01:14
camelia rakudo-moar 85d20f: OUTPUT«This type cannot unbox to a native integer␤ in block <unit> at /tmp/oGEfh9wyVS line 1␤␤»
gfldex m: say 'Hi Herby_'.comb.permutations
camelia rakudo-moar 85d20f: OUTPUT«((H i H e r b y _) (H i H e r b _ y) (H i H e r y b _) (H i H e r y _ b) (H i H e r _ b y) (H i H e r _ y b) (H i H e b r y _) (H i H e b r _ y) (H i H e b y r _) (H i H e b y _ r) (H i H e b _ r y) (H i H e b _ y r) (H i H e y r …»
Herby_ :)
Thinking about creating a small "Scrabble dictionary" look-up tool 01:15
in perl 6. The user can enter up to 7 characters, and the tool will tell them which ones are words 01:16
and then perhaps build off that
exciting stuff, I know
01:19 lokien_ left 01:26 Actualeyes joined, vendethiel left 01:30 vendethiel joined 01:42 travis-ci joined
travis-ci Doc build passed. skids 'Spelling, more compact index title, add some modules' 01:42
travis-ci.org/perl6/doc/builds/105056619 github.com/perl6/doc/compare/f5253...ad2e71b12b
01:42 travis-ci left 02:01 mattp_ joined 02:05 xpen joined 02:07 maslan left 02:15 addison left, vendethiel left 02:16 leont left
ZoffixWin Herby_, seems inefficient :) 02:17
Herby_ Do tell! 02:19
02:20 llfourn joined
Herby_ inefficient == awesome? 02:21
ZoffixWin Herby_, if using dynamite to hammer a nail is awesome... :) 02:22
02:22 Upasaka left
ZoffixWin Wait... That does sound awesome! 02:22
Herby_ yeah it does!
llfourn is there any way to test that something doesn't warn?
(or does) 02:23
ZoffixWin llfourn, hm, there's Test::Output that can capture STDERR.. Other than that *shrug*
llfourn cool thanks. 02:24
02:26 vendethiel joined
ZoffixWin Herby_, hm, here's one I started going with, but then realized it only solves for exact matches :) perl6 -e 'my %words = "/usr/share/dict/american-english".IO.words.map: { .fc.comb.sort.join("") => $_ }; loop { say "Enter your scrabble letters: "; my $letters = [~] $*IN.get.fc.comb.sort; $letters eq $_ and say %words{$_} for %words.keys }' 02:27
m: say 'food'.comb.permutations
camelia rakudo-moar 85d20f: OUTPUT«((f o o d) (f o d o) (f o o d) (f o d o) (f d o o) (f d o o) (o f o d) (o f d o) (o o f d) (o o d f) (o d f o) (o d o f) (o f o d) (o f d o) (o o f d) (o o d f) (o d f o) (o d o f) (d f o o) (d f o o) (d o f o) (d o o f) (d o f o) (d o o f))␤»
ZoffixWin m: say 'food '.comb.permutations
camelia rakudo-moar 85d20f: OUTPUT«((f o o d ) (f o o d) (f o d o ) (f o d o) (f o o d) (f o d o) (f o o d ) (f o o d) (f o d o ) (f o d o) (f o o d) (f o d o) (f d o o ) (f d o o) (f d o o ) (f d o o) (f d o o) (f d o o) (f o o d) (f o d o) (f o o d) (f …»
ZoffixWin m: say 'cat '.comb.permutations
camelia rakudo-moar 85d20f: OUTPUT«((c a t ) (c a t) (c t a ) (c t a) (c a t) (c t a) (a c t ) (a c t) (a t c ) (a t c) (a c t) (a t c) (t c a ) (t c a) (t a c ) (t a c) (t c a) (t a c) ( c a t) ( c t a) ( a c t) ( a t c) ( t c a) ( t a c))␤»
Herby_ nice! I wish programming came that easy to me. 02:28
I was also trying to think if there was a way to take advance of async/parallel work
as an added bonus
but i guess you can only really check one word at a time?
ZoffixWin Ah! True 02:29
Nah, you can check more than one :)
Lemme try a method with permutations
Also, I've been coding for the last 15 years... So programming coming to me wasn't THAT easy :P 02:30
Herby_ hah yeah you have a point
02:31 Upasaka joined
ZoffixWin m: my @letters = 'cta'.comb.permutations».join: ""; my @words = <cat mat fat>; .comb.permutations».join("") ⊆ @letters and say "Found word!: $_" for @words 02:33
camelia rakudo-moar 85d20f: OUTPUT«Found word!: cat␤»
ZoffixWin m: my @letters = 'mata'.comb.permutations».join: ""; my @words = <cat mat fat>; .comb.permutations».join("") ⊆ @letters and say "Found word!: $_" for @words
camelia ( no output )
ZoffixWin :(
02:33 addison_ joined
ZoffixWin ah, right 02:33
Meh. Need to go to bed :) 02:34
Herby_ sleep is for the weak!
ZoffixWin but adding .hyper: :batch(@words/4) would make it parallel :)
That's what I said LAST night and I was cursing myself this morning :)
Herby_ I'm curious what the benchmark difference would be on 7 letters: parallel vs. non-parallel 02:36
I wrote something similar in Python as my first project a long time ago. very ugly algorithm. took 2.5 minutes to run for 7 letters :)
ZoffixWin Don't hold your breath ATM. I think hyper/race are a tad broken: rt.perl.org/Ticket/Display.html?id=127365 and rt.perl.org/Ticket/Display.html?id=127364 02:37
02:38 jack_rabbit joined
Herby_ ahh 02:38
02:38 addison_ left 02:40 addison joined
Herby_ could you do something with promises? 02:40
have one promise run one permutation, and so on?
*i have an extremely weak grasp on async/parallel stuff
well, nm. that wouldnt be efficient. you'd have 2k+ promises for 7 letters 02:41
6k plus i mean
02:45 addison left, DrPete joined 02:46 vendethiel left, addison joined 02:48 DrPete_ left 02:51 addison left 02:52 kalkin-_ joined 02:55 nanis left 02:56 kalkin-__ left 02:58 yqt left
ZoffixWin m: my @letters = 'cat'.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { ([~] .comb.sort) => $_ }; $_ ∈ @letters and say "Found word!: %words{$_}" for %words.keys 03:03
camelia rakudo-moar 85d20f: OUTPUT«Found word!: cat␤»
ZoffixWin m: my @letters = 'mata'.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { ([~] .comb.sort) => $_ }; $_ ∈ @letters and say "Found word!: %words{$_}" for %words.keys
camelia rakudo-moar 85d20f: OUTPUT«Found word!: mat␤»
ZoffixWin m: my @letters = 'almdasmdasfata'.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { ([~] .comb.sort) => $_ }; $_ ∈ @letters and say "Found word!: %words{$_}" for %words.keys
camelia rakudo-moar 85d20f: OUTPUT«Found word!: mat␤Found word!: fat␤»
ZoffixWin NOW I can sleep :D Herby_ ^ 03:04
Herby_ sleep tight, sweet prince
i'm gonna have to spend some time breaking your code down to see if i can understand it :)
ZoffixWin m: my @letters = 'mata'.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { .comb.sort.join => $_ }; $_ ∈ @letters and say "Found word!: %words{$_}" for %words.keys 03:05
camelia rakudo-moar 85d20f: OUTPUT«Found word!: mat␤»
ZoffixWin oh, needs an .fc to compare properly 03:06
m: my @letters = 'mata'.fc.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { .fc.comb.sort.join => $_ }; $_ ∈ @letters and say "Found word!: %words{$_}" for %words.keys
camelia rakudo-moar 85d20f: OUTPUT«Found word!: mat␤»
ggoebel14 m: gather
reduce { ($^a).flat.[*-1] eq $^b
?? (($^a).flat, $^b).flat.list
!! ( take $^a; $^b ).[*-1] },
(<a a a b b c>.flat, 0).flat.list
camelia rakudo-moar 85d20f: OUTPUT«5===SORRY!5===␤Whitespace required after keyword 'gather'␤at /tmp/TCG0hSkBRQ:1␤------> 3gather7⏏5<EOL>␤Missing block or statement␤at /tmp/TCG0hSkBRQ:1␤------> 3gather7⏏5<EOL>␤ expecting any of:␤ term␤␤»
ZoffixWin ggoebel14, try pastebinning on gist.github.com/ and then giving Camelia the URL 03:07
ggoebel14 gist.github.com/ggoebel/0734dcbf491c0d135819 03:08
ZoffixWin m: gist.github.com/ggoebel/0734dcbf491c0d135819
ggoebel14 m: gist.github.com/ggoebel/0734dcbf491c0d135819
camelia ( no output )
Herby_ wow, didn't know camelia could do that 03:09
pull from a URL
AlexDaniel you can also use bitbucket snippets or gitlab snippets 03:10
AlexDaniel is against monopoly :)
skids1 wonders how 'perl6 -MPanda::Builder -e 'Panda::Builder.build($*CWD)' works in other modules' travis.yml
ZoffixWin Herby_, hm, I found a way to make that code about 1000 times faster lol :)
Herby_ do tell! 03:11
ZoffixWin m: my $letters = set 'mata'.fc.comb.combinations».sort».join; my %words = "cat\nmat\nfat".words.map: { .fc.comb.sort.join => $_ }; $_ ∈ $letters and say "Found word!: %words{$_}" for %words.keys
camelia rakudo-moar 85d20f: OUTPUT«Found word!: mat␤»
ZoffixWin This way it doesn't coerse an array into a set for each run
(I suppose using @letters.first: 'word' works too, but that's not fancy at all :))
AlexDaniel m: gitlab.com/snippets/14172
camelia rakudo-moar 85d20f: OUTPUT«((a a a) (b b) c)␤»
ggoebel14 m: gist.github.com/ggoebel/7fd823f020d09d623c58
camelia rakudo-moar 85d20f: OUTPUT«((a a a) (b b) c)␤»
Herby_ a 1000% speed improvement is a pretty good optimization! :) 03:12
AlexDaniel (unless it was very very very slow)
ZoffixWin Well, it was just an eyeball :) with 17 found words: array method ran for about a minute and printed 4 of them, before I killed it; while set method printed them all out almost instantly :) 03:13
ggoebel14 That is a perl 6 version of a solution to problem 9 from sites.google.com/site/prologsite/p...g-problems
03:13 kid51 left
zostay .tell hoelzro it crashes every time for me, i've tested it on OS X and Linux 03:13
yoleaux 26 Jan 2016 23:54Z <hoelzro> zostay: I can't reproduce the issue on my box (64-bit Arch Linux); let me know when you're around so we can figure this out =)
zostay: I'll pass your message to hoelzro.
zostay blast
ggoebel14 I'm trying to do them as one-liners in the perl 6 REPL
ZoffixWin m: 'dfstwetfgcxbfgsdfgfsdgdf'.comb.combinations.elems.say 03:14
0.o
hoelzro zostay: what version of Moar/Rakudo are you on?
yoleaux 03:13Z <zostay> hoelzro: it crashes every time for me, i've tested it on OS X and Linux
camelia rakudo-moar 85d20f: OUTPUT«(timeout)»
ZoffixWin m: 'dfstwetfgcxbfgsdf'.comb.combinations.elems.say
hoelzro also, what does ulimit -a report for you?
camelia rakudo-moar 85d20f: OUTPUT«(timeout)» 03:15
Herby_ lol zoffix
03:15 vendethiel joined
Herby_ giving Camelia a heartattack 03:15
ggoebel14 wondering if all those .flats and .lists are necessary... or if there is some other way
ZoffixWin Yeah, it only works for very few letters, unless you have a meaty box :P
AlexDaniel ggoebel14: there is definitely some other way
Herby_ try 7
ZoffixWin ggoebel14, my wild guess would be there's definitely a better way :)
Herby_ m: 'eiakfke'.comb.combinations.elems.say 03:16
camelia rakudo-moar 85d20f: OUTPUT«128␤»
Herby_ m: 'eiakfkke'.comb.combinations.elems.say
camelia rakudo-moar 85d20f: OUTPUT«256␤»
Herby_ m: 'eiakfzkke'.comb.combinations.elems.say
camelia rakudo-moar 85d20f: OUTPUT«512␤»
ZoffixWin ggoebel14, which one is "problem 9" exactly? 03:17
zostay hoelzro: i generally build a fresh rakudobrew before each try, last try was a week or so ago... building again to retry now
ggoebel14 sites.google.com/site/prologsite/p...problems/1
hoelzro zostay: ok; I just tried with today's. let me know if it still breaks for you
zostay ulimit -a: gist.github.com/zostay/21c91b7beefcc1b62aa2 03:18
hoelzro zostay: which box is that on?
OS X or Linux?
ZoffixWin m: say bag(<a a a a b c c a a d e e e e>).map: { .value == 1 ?? .key !! [.key xx .value] }; 03:19
camelia rakudo-moar 85d20f: OUTPUT«([a a a a a a] [c c] b [e e e e] d)␤»
ZoffixWin ggoebel14, ^
zostay just happened with a fresh build on OS X... bringing up my linux vm to try that next
ggoebel14 that doesn't work
ZoffixWin Why not? 03:20
ggoebel14 you're only supposed to pack consecutive letters
ZoffixWin Ah
hoelzro zostay: which distro is your linux VM?
and I take it these machines are both 64-bit?
ZoffixWin right
ggoebel14 m: say gather reduce { ($^a).flat.[*-1] eq $^b ?? (($^a).flat, $^b).flat.list !! ( take $^a; $^b ).[*-1] }, (<a a a a b c c a a d e e e e>.flat, 0).flat.list 03:21
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) b (c c) (a a) d (e e e e))␤»
03:22 colomon left
ZoffixWin m: say <a a a a b c c a a d e e e e>.join.comb(/(.)$0*/).map: { .chars == 1 ?? $_ !! [.comb]} 03:22
camelia rakudo-moar 85d20f: OUTPUT«([a a a a] b [c c] [a a] d [e e e e])␤»
03:22 Calibellus joined
ZoffixWin ggoebel14, that looks right :D 03:22
Fun problems on that list. 03:23
ggoebel14 nice
ZoffixWin Gonna play around with them tomorrow :) ggoebel14++ thanks for showing that page
AlexDaniel ZoffixWin: but that works with strings and not with list elements
sortiz Wanting the expression "list context" to be eradicated from the perl6 documentation.
ZoffixWin AlexDaniel, what are "list elements"? 03:24
AlexDaniel ZoffixWin: what if you have “aa”
ZoffixWin: <a aa aa aa b>
ZoffixWin AlexDaniel, ahh :) True. I'm taking the example too literally :)
03:26 colomon joined
zostay yes, both 64, the linux distro is Mint Mate running in virtualbox on my macbook 03:26
hoelzro: ^^^
03:28 cpage_ left
hoelzro ok 03:28
03:29 anthk_ joined 03:32 bowtie left 03:33 bowtie joined 03:36 vendethiel left 03:37 bowtie is now known as Guest36732
AlexDaniel aaahh! 03:38
I have an idea!
03:39 vendethiel joined, noganex joined 03:42 noganex_ left
AlexDaniel so the question is: If I have a list like <a a a b b c> how can I produce <3 2 1> from that? 03:44
that is, how many times the element was repeated
ZoffixWin <a a a b b c a a> would produce <3 2 1 2>, with the "c" NOT an array
AlexDaniel well, my idea is that I can .squish the list. Then if there's any easy way to get the counts then I can just Z** it and that's it 03:45
ZoffixWin Oh 03:46
03:46 BenGoldberg left
zostay hoelzro: also happens on linux with the current rakudobrew build 03:46
AlexDaniel if only there was an easy way to get the counts
hoelzro grrr
I'll try to build a rakudobrew, then
ZoffixWin AlexDaniel, there is! And you're the same person who said "Aha!" last time I showed it :) 03:47
m: my $in = <aa aa a a b c c a a>; say $in.squish Z bag |$in;
camelia rakudo-moar 85d20f: OUTPUT«((aa a => 4) (a c => 2) (b b => 1) (c aa => 2))␤»
ZoffixWin :S
m: my $in = <aa aa a a b c c a a>; say $in.squish Z (bag |$in);
camelia rakudo-moar 85d20f: OUTPUT«((aa a => 4) (a c => 2) (b b => 1) (c aa => 2))␤»
ZoffixWin Well, something along those lines lol :D
AlexDaniel ZoffixWin: yes but it does not work this way
TimToady .tell b2gills definitely looks like a bug to me
yoleaux 26 Jan 2016 20:10Z <b2gills> TimToady: Should the right alternation take precedence? 「say 'abc' ~~ / <:L> | <:L><:L><:L>+ /」
TimToady: I'll pass your message to b2gills.
ZoffixWin m: say bag <aa aa a a b c c a a>;
camelia rakudo-moar 85d20f: OUTPUT«bag(a(4), c(2), b, aa(2))␤»
ZoffixWin ah 03:48
AlexDaniel <a a a b a> is <3 1 1> and NOT <4 1>
zostay hoelzro: here's the ulimit -a for that too in case it matters: gist.github.com/zostay/a35124cd22f94e03437c
ZoffixWin AlexDaniel, right :)
I should be sleeping right now
\o
hoelzro zostay: thanks for the input; at this point, there's probably a small difference in how I build Moar vs how rakudobrew does
night ZoffixWin
I'll try on rakudobrew, see what happens 03:49
AlexDaniel ggoebel14: such an interesting task
TEttinger (map count (partition-by identity '(a a a b b c))) 03:50
whoops
AlexDaniel aaaah I have an idea 03:52
zostay thanks hoelzro, you rock and Godspeed
hoelzro shoot 03:59
zostay: still passing o_O
I can fire up a Mint box tomorrow and see if that does it
04:01 vendethiel left
zostay bizarre... 04:02
AlexDaniel YEAH BABY
zostay are you running it with prove or directly with perl? if i run prove, it appears to work, but if i run it as perl6 -Ilib t/http-1.0.t, it aborts
AlexDaniel ggoebel14: one second :D 04:03
04:03 vendethiel joined 04:06 zacts left
AlexDaniel m: my $x = 1; my @l = <a a a a b b c d d>; say (gather for @l.rotor(2 => -1, :partial) { .[0] cmp (.[1] // ()) ?? (take .[0] xx $x; $x = 1) !! $x++ }) 04:10
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) (b b) (c) (d d))␤»
AlexDaniel ggoebel14: nah, well… that's probably the best thing I can come up with
ggoebel14: but maybe it will give you some ideas
the trick here is the following 04:11
m: my @l = <a a a a b b c d d>; say @l.rotor(2 => -1, :partial)
camelia rakudo-moar 85d20f: OUTPUT«((a a) (a a) (a a) (a b) (b b) (b c) (c d) (d d) (d))␤»
AlexDaniel ggoebel14: so we are doubling every element. This helps to see ahead
04:16 zacts joined
ggoebel14 AlexDaniel: interesting 04:20
AlexDaniel m: my $x = 1; my @l^C <a a a a b b c d d>; say @l.rotor(2 => -1, :partial).map({ .[0] cmp (.[1] // () ) ?? $_ !! 1 })
camelia rakudo-moar 85d20f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9o4hpenR6J␤Undeclared name:␤ C used at line 1␤␤»
AlexDaniel what? 04:21
ah whoops
m: my $x = 1; my @l = <a a a a b b c d d>; say @l.rotor(2 => -1, :partial).map({ .[0] cmp (.[1] // () ) ?? $_ !! 1 })
camelia rakudo-moar 85d20f: OUTPUT«(1 1 1 (a b) 1 (b c) (c d) 1 (d))␤»
AlexDaniel ggoebel14: interestingly the answer is right there…
ggoebel14: perhaps you can manage to get it with .reduce
m: my $x = 1; my @l = <a a a a b b c d d>; say @l.rotor(2 => -1, :partial).map({ .[0] cmp (.[1] // () ) ?? $_ !! 1 }).reverse 04:22
camelia rakudo-moar 85d20f: OUTPUT«((d) 1 (c d) (b c) 1 (a b) 1 1 1)␤»
AlexDaniel ggoebel14: maybe this will help
ggoebel14 AlexDaniel: I did manage to solve it with reduce... but I had to pad an extra element on the list... and make excessive use of .flat and .list 04:23
m: say gather reduce { ($^a).flat.[*-1] eq $^b ?? (($^a).flat, $^b).flat.list !! ( take $^a; $^b ).[*-1] }, (<a a a a b c c a a d e e e e>.flat, 0).flat.list
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) b (c c) (a a) d (e e e e))␤»
AlexDaniel ggoebel14: but it's all gather-take, what's the point of reduce there? 04:24
ggoebel14 AlexDaniel: hmm... going to try to wrap my head around your use of rotor
AlexDaniel m: say gather say reduce { ($^a).flat.[*-1] eq $^b ?? (($^a).flat, $^b).flat.list !! ( take $^a; $^b ).[*-1] }, (<a a a a b c c a a d e e e e>.flat, 0).flat.list 04:25
camelia rakudo-moar 85d20f: OUTPUT«0␤((a a a a) b (c c) (a a) d (e e e e))␤»
04:25 cpage_ joined
ggoebel14 AlexDaniel: it either builds up the consecutive duplicate list or takes it and starts the next 04:26
04:26 vendethiel left 04:27 psy_ left
ggoebel14 AlexDaniel: pretty much the same as what you're trying to do with rotor... 04:27
AlexDaniel :)
04:27 vendethiel joined
skids1 is the point of this excercise to avoid state variables? 04:28
AlexDaniel skids1: not really, you can use a state variable if it results in a really short code :) 04:29
skids1: try it, maybe you'll do better. But any time I tried to introduce a variable the code just ballooned in size 04:36
ggoebel14 skids1: the point is to pack consecutive duplicate values in a list by converting <a a a a b c c a a d e e e e> into ((a a a a) b (c c) (a a) d (e e e e)) 04:37
skids1 Is that the point, or counting? 04:38
AlexDaniel skids1: that's the point. But if you can count it then the problem is solved
skids1 ok I thought the packin was the "simpler problem" counting got reduced to.
not the other way around
AlexDaniel :))
well 04:39
m: say <a a a a b c c>.squish Zxx <4 1 2>
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) (b) (c c))␤»
ggoebel14 my solution manages to pack without counting...
hoelzro zostay: perl6 -Ilib t/http-1.0.t 04:40
AlexDaniel ggoebel14: yeah, but let's agree that it's not the prettiest solution out there :)
ggoebel14 yep
AlexDaniel .squish Zxx is really, really short, if only we could get these numbers… 04:41
but sure there are other approaches
today is another day when I wish that .squish was able to produce pairs
“good job, you squished it! Now tell me what happened” 04:43
skids1 m: say (<a a a>,"b",<a a>).map: {slip($_[0], $_.elems)}
camelia rakudo-moar 85d20f: OUTPUT«(a 3 b 1 a 2)␤»
AlexDaniel skids1: are you trying to make it work other way round? Just use 「flat」! :) 04:44
skids1: problem number 9
skids1: sites.google.com/site/prologsite/p...problems/1
skids1 No just demonstrating the conversion from lol to counts is also simple. 04:45
hoelzro goes off to bed
skids1 Ah, ok. so you do want single element lists. 04:46
AlexDaniel m: my @l= <a a a>, <b>, <a a>; say @l.List.flat.squish Z @l».elems
camelia rakudo-moar 85d20f: OUTPUT«((a 3) (b 1) (a 2))␤»
AlexDaniel yeah it's simple indeed 04:47
AlexDaniel loves to zip stuff around
04:49 vendethiel left 04:53 AlexDaniel left
skids1 I'm too efficiency oriented to have considered that way. 04:55
04:55 Sgeo_ left 04:57 revhippie left
ggoebel14 hmm... if I use slips, I can get rid of all the .flats and .lists 05:00
m: say gather reduce { (|$^a).[*-1] eq $^b ?? (|$^a, $^b) !! ( take $^a; $^b ).[*-1] }, |<a a a a b c c a a d e e e e>, 0 05:01
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) b (c c) (a a) d (e e e e))␤»
05:06 nige1 joined 05:10 Herby_ left 05:11 Sgeo joined 05:12 Sgeo_ joined 05:17 Sgeo left 05:18 vendethiel joined 05:29 khw left 05:31 samb1 left, sortiz left 05:41 vendethiel left 05:42 samb1 joined
skids1 m: say (|<a a a a b c c a a d e e e e>,()).map: { state $l = |(); my $m = $l[0] eqv $^v; $l = (|$l,$v) if $m; LEAVE { $l = ($v,) unless $m }; $l.list if not $m } # I could squeeze more chars out, but why bother 05:43
camelia rakudo-moar 85d20f: OUTPUT«((a a a a) (b) (c c) (a a) (d) (e e e e))␤»
05:44 Cabanossi left 05:48 Cabanossi joined 05:50 vendethiel joined
skids1 interestingly... 05:52
m: say (1..2).map: { 1 if 0; LEAVE { }; }
camelia rakudo-moar 85d20f: OUTPUT«WARNINGS for /tmp/03uhXYjjjC:␤Useless use of constant integer 1 in sink context (line 1)␤(Nil Nil)␤»
skids1 m: say (1..2).map: { LEAVE { }; 1 if 0; }
camelia rakudo-moar 85d20f: OUTPUT«()␤»
05:54 Felipe joined
Felipe Hello all. 05:54
skids1 o/
Felipe I’m having a first look at perl 6 and wondering what the point of the $! variable is, since there is now real try/catch … ?
05:55 mattp_ left 06:02 _Gustaf_ joined 06:05 Calibellus left 06:08 Felipe left, Felipe joined, Felipe left
skids1 m: try { die 1 }; $!.perl.say; # mostly for stuff like that I think 06:09
camelia rakudo-moar 85d20f: OUTPUT«X::AdHoc.new(payload => 1)␤»
skids1 oh he left
06:12 vendethiel left
sjn r: try { open("nosuchfile", :ro) }; $!.perl.say; 06:13
camelia rakudo-moar 85d20f: OUTPUT«X::AdHoc.new(payload => "open is disallowed in restricted setting")␤»
..rakudo-jvm 6c0f93: OUTPUT«X::AdHoc.new(payload => "java.nio.file.NoSuchFileException: /home/camelia/nosuchfile")␤»
06:22 mattp_ joined 06:23 vendethiel joined 06:27 skids1 left 06:33 CIAvash joined 06:44 vendethiel left 06:49 vendethiel joined 06:59 domidumont joined 07:02 sjoshi joined, Sqirrel left 07:03 domidumont left 07:04 domidumont joined 07:06 mr-foobar joined 07:12 Relsak left 07:15 geraud left 07:17 grassass left 07:21 zostay left, Upasaka left, Upasaka joined 07:24 Guest1337 joined 07:26 zostay joined 07:28 FROGGS joined
FROGGS o/ 07:28
07:33 vendethiel left 07:39 nakiro joined 07:41 Guest1337 left, firstdayonthejob joined 07:42 vendethiel joined 07:47 nige1 left, darutoko joined 07:51 regreg left 07:53 llfourn left 07:54 abraxxa joined, zakharyas joined
El_Che does rakudobrew only install stuff in its clone directory? is it thus safe to copy that directory to an other machine? 07:55
07:58 RabidGravy joined 07:59 zakharyas left 08:00 _mg_ joined
RabidGravy MARNIG! 08:01
moritz don't go screaming around like this, RabidGravy. And a good morning to you too. 08:02
08:05 vendethiel left 08:06 ely-se joined 08:07 Guest36732 left, marmay left 08:08 bowtie_ joined, vendethiel joined
nine *yawn* such noise early in the morning 08:11
ely-se nine: must be the garbage collector
08:11 Ven joined 08:18 jdrab left, nige1 joined 08:26 wamba joined 08:31 vendethiel left 08:32 fireartist joined
abraxxa good morning! 08:34
08:34 vendethiel joined
abraxxa I'd like to get style feedback on gist.github.com/abraxxa/58c1123ca6a03cb54808 08:35
note that there is a revision 1 also
08:37 firstdayonthejob left 08:39 zakharyas joined 08:41 lokien_ joined
RabidGravy abraxxa, if brevity isn't the point and it was my code I would split it into a further two subroutines 08:45
i.e. the equality statement and the bag statement in subs passed the list and a list of indices
08:49 Skarsnik joined
ely-se add :D constraints 08:50
08:55 vendethiel left
Ven :U 08:55
moritz :/ 08:57
09:00 vendethiel joined 09:01 azawawi joined
azawawi hi 09:01
and good morning :)
ely-se :P 09:03
09:03 rindolf joined
RabidGravy marning 09:03
09:07 MARTIMM joined 09:11 leont joined 09:15 ely-se left 09:18 zakharyas left 09:20 vendethiel left
stmuk good moaning 09:21
09:21 dakkar_ joined 09:26 _Gustaf_ left
azawawi is reading www.reddit.com/r/perl/comments/427...e_popular/ 09:27
09:28 leont left 09:29 _mg_ left
stmuk is that "good moaning" or not? :) 09:30
09:30 yeahnoob left
jnthn It's reddit, so probably not :P 09:30
yoleaux 26 Jan 2016 16:33Z <nine> jnthn: github.com/tadzik/panda/issues/290
09:31 _Gustaf_ joined 09:32 _mg_ joined 09:34 zakharyas joined 09:35 Kogurr left 09:37 brrt joined 09:42 llfourn joined
DrForr azawawi: Blah blah mod_php blah mod_perl stupid and hard. 09:46
abraxxa RabidGravy: thanks, can you paste an example? 09:47
09:48 Skarsnik left 09:49 vendethiel joined, _Gustaf_ left
brrt fwiw, i do recognise that argument. i recently had to help somebody find the largest number in a csv column 09:50
in python, at $thesis-institute, hardly any 'real' programmers there 09:51
i mean, even if you write a horrific program in python, it will probably never be unreadable
on the other hand...
not sure if that is entirely true.
i can't imagine someone solving the same problem in perl arriving at a significantly greater complexity than the python case 09:52
jnthn Readability and comprehension are different, though. :) I've never had a problem reading Java code, but comprehending what 5 levels of inheritance and 100 2-line methods do when put together can be more of a challenge. :) 09:54
09:54 ely-se joined
jnthn (No, not all codebases are like that, but those that are hurt. :)) 09:55
brrt yeah, i know about that one 09:56
09:57 ab6tract joined
brrt my favorite version of that is when some developers' IDE collapses anonymous classes into 'lambda syntax', and said developer used three levels deep of them 09:58
jnthn Heh, when I saw IntelliJ do that I thought...hmm, cute. I'd not quite imagined that failure mode. :)
ab6tract .ask lizmat is it just me or does IO.watch only produce FileEventChanged::FileRenamed, even for moments when a file has been created or deleted
yoleaux ab6tract: I'll pass your message to lizmat.
ab6tract .ask lizmat (that's on OS X) 09:59
yoleaux ab6tract: I'll pass your message to lizmat.
10:02 hankache joined 10:03 _Gustaf_ joined 10:06 Skarsnik joined 10:07 zakharyas left
hankache .tell FROGGS I installed the MS Windows® Rakudo Star release candidate on a Windows 8.1 Machine, and here are my comments: 1)MSI name is 2016.01 but within the installer it says 2015.12. These need to be in sync. 10:08
10:08 _Gustaf_ left
yoleaux hankache: I'll pass your message to FROGGS. 10:08
FROGGS hankache: yes, that's because I cannot bump the rakudo release vsion before its release has happened... 10:09
yoleaux 10:08Z <hankache> FROGGS: I installed the MS Windows® Rakudo Star release candidate on a Windows 8.1 Machine, and here are my comments: 1)MSI name is 2016.01 but within the installer it says 2015.12. These need to be in sync.
FROGGS this will be solved for the real release automatically
hankache .tell FROGGS: 2) The REPL has already line editing features but when run it says "try panda install Readline or Linenoise"
yoleaux hankache: What kind of a name is "FROGGS:"?!
RabidGravy ab6tract, it only produces those two events, it's up to you to work out what actually happened 10:10
hankache .tell FROGGS 2) The REPL has already line editing features but when run it says "try panda install Readline or Linenoise"
yoleaux hankache: I'll pass your message to FROGGS.
gfldex FROGGS: the installed doesn't create any file associations. Is that intentional?
10:10 _Gustaf_ joined
Skarsnik Hello 10:10
hankache hiya 10:11
10:12 vendethiel left
hankache FROGGS do you bumdle Linenoise in the MSI ? 10:13
bundle*
ely-se I heard the French eat FROGGS
Skarsnik Someone know a good standalone (no deps) xml lib?
hankache Grenouilles ;)
i got to run. FROGGS++ for the release 10:14
10:14 hankache left
|Tux| csv-ip5xs 17.540 10:15
test 22.439
test-t 12.152
csv-parser 49.087
10:28 virtualsue joined
stmuk I tried the R* RC on 64 bit linux and saw no problems 10:29
dalek c: a4f053b | fireartist++ | template/header.html:
remove 'autofocus' from search input field
c: 9e1b8dc | moritz++ | template/header.html:
Merge pull request #370 from fireartist/master

remove 'autofocus' from search input field
stmuk Linenoise didn't work on Windows when I tried it a few days back
|Tux| brrt: p6 -MText::CSV -e'csv(in=>"legs.csv",headers=>"auto").map({$_<legs>.Int}).max.say' 10:31
brrt nice :-) 10:33
but that gives me for just a single column, and i need all of 'm
Skarsnik how I do a \n in a WHY pod statement? 10:34
|Tux| you know of perl6, just play
10:35 jargan is now known as jast, sena_kun joined
|Tux| you need all columns for the row that contains the max in column x? 10:35
I thought that Array would have a .last 10:39
10:40 Ven left
ab6tract RabidGravy: i only ever see *one* event 10:41
FileRenamed
and essentially useless to even have a category for it, if it never changes 10:42
|Tux| m: my@f=^10;@f.last.say
camelia rakudo-moar 85d20f: OUTPUT«Method 'last' not found for invocant of class 'Array'␤ in block <unit> at /tmp/h3LlckMhH3 line 1␤␤»
|Tux| why not?
<headbang /> was renamed to tail
brrt: p6 -MText::CSV -e'my$m;csv(in=>"legs.csv",headers=>"auto",filter=>{my$l=$_<legs>;$m//=$l;$l>$m}).tail.say' 10:43
(code => 11, legs => 750, species => Illacme Plenepes)
RabidGravy ab6tract, well on Linux you get FileRenamed and FileChanged, there are currently only those two events
brrt [Tux]: will you be at FOSDEM perchance?
|Tux| nope
not planning
10:43 vendethiel joined
|Tux| should I? 10:43
brrt well, not sure
if you want to :-)
ab6tract RabidGravy: yup, i assumed Linux would be smarter than OS X here
brrt i'll be there at least :-) as will liz and woolfy
DrForr Moi as well :) 10:44
10:44 lnrdo joined
ab6tract RabidGravy: just confirmed again that OS X sends a FileRenamed when i edit a file 10:44
smh 10:45
|Tux| I think I prefer the presence of my wife, who is working abroad this week
10:45 virtualsue left, mr-foobar left
brrt well, no argument there :-) 10:46
RabidGravy libuv only sends renamed and changed events, inotify has a dozen or so
|Tux| cannot but think there is a more elegant solution to the code in that filter I just posted
too perl5'ish
RabidGravy I guess the smart money would be on making a specific Inotify version in the ecosystem 10:47
(I'm not volunteering to do that, though I did tinker with the pyinotify a couple of years ago) 10:48
10:49 lokien_ left 10:50 lnrdo left, azawawi left
ab6tract whatt... libuv, y u no smart? 10:50
i was under the impression that inotify was a linux only deal 10:51
10:51 lnrdo joined
sena_kun ab6tract, inotify is built into kernel, while libuv is strongly optional and in fact other package afaik(just checked on gentoo). 10:52
10:52 AlexDaniel joined
ab6tract sena_kun: yes, that's not my issue. i just don;t see how someone can code two file change notifications and call it done 10:53
jnthn ab6tract: I suspect they went for the lowest common denominator of portability
ab6tract sena_kun: especially since, as you point out, inotify is part of the linux kernel and therefore not a platform independent solution 10:54
sena_kun Yesterday I went into "Not implemented" for "/::/" and... Do we have any plans about when it will be implemented?
ab6tract jnthn: well, considering it dumbs down to a single event in OS X...
they should have set the bar lower :)
10:55 espadrine joined
jnthn When I was exposing that stuff for Perl 6, I was surprised it only handled those cases. Then started looking at what different platforms offered, and realized it was going to turn into a lot more work than I had time for to go build our own smarter solution. :) 10:55
(Of course, nothing stops us doing so in the future.)
ab6tract (the single event on os x could be a rakudo/moar issue, though i doubt it since there are two event types on Linux and that part shouldn't be platform-dependent) 10:56
jnthn ab6tract: Rakudo/Moar do almost nothing additional to exposing the events libuv makes available... 10:57
ab6tract jnthn: exactly why i qualified it with doubt
jnthn ab6tract: Yes, was just confirming your doubt makes sense to me also. :)
ab6tract ok :D 10:59
oof
have negative tuits today, i'm afraid
jnthn sena_kun: That one is trickier than it looks, if I remember correctly, because it's meant to terminate the most recent longest token match (so, alternation or protoregex), and that can mean non-local flow control (as in, peeling away a few stack frames).
ab6tract thanks for vouching for my sanity :)
until later #perl6, happy hacking!
10:59 ab6tract left 11:03 vendethiel left 11:05 vendethiel joined 11:07 _mg_ left 11:09 virtualsue joined
timotimo finally downloads the rakudo star rc 11:11
11:11 pmurias joined
timotimo the first things that i notice is our Configure.pl still talks about "a --prefix that contains nqp-{p,j,m} executables", and that it puts an example including JVM first in the list 11:12
abraxxa timotimo: oh cewl, a remote controlled rakudo star ;O 11:14
11:14 virtualsue left
timotimo and when finishing configuring it says "make to build rakudo, then make test to run some tests" 11:15
but "make test" just tells you "instead of make test, use make rakudo-test, make modules-test or make rakudo-spectest"
11:21 diego_k left 11:22 diegok joined
timotimo Please remove leading 'v' from perl version in Template::Mustache's meta info. 11:25
we could fix this for the "final" rakudo star
Please remove leading 'v' from perl version in Template::Mojo's meta info.
i still find it weird that we ship a MD5 module in star %) 11:28
11:29 kalkin-_ left
timotimo ==> Please make sure that /tmp/rakudo-star-2016.01-RC1/install/bin is in your PATH 11:34
this piece of output gets absolutely drowned out by all the modules being installed
so we should probably get it re-output'd at the end again
moritz +1 11:35
timotimo FROGGS: very +1 on the effort put into 2016.01, thanks so much!
Skarsnik why 2-3 templates stuff in rstar? x) 11:36
moritz Skarsnik: iirc because Bailador draws them in 11:37
Skarsnik is Bailador really used? Last time I checked there was no session support ~~
11:37 Ven joined 11:38 nige1 left 11:39 lnrdo left 11:40 lnrdo joined, pmurias left 11:43 llfourn left 11:44 nige1 joined 11:45 pmurias joined 11:46 llfourn joined
DrForr pmurias: BTW thanks for submitting a name with U+1042 in it to blogs.perl.org :) 11:53
timotimo m: say uniname(0x1042)
camelia rakudo-moar 85d20f: OUTPUT«MYANMAR DIGIT TWO␤»
timotimo m: say chr(0x1042)
camelia rakudo-moar 85d20f: OUTPUT«၂␤»
DrForr Oh, 0142, not 1042.
timotimo m: say uniname(0x142) 11:54
camelia rakudo-moar 85d20f: OUTPUT«LATIN SMALL LETTER L WITH STROKE␤»
timotimo ah
that is more expected :)
DrForr dyselxia kkicing in teher.
11:55 xpen left
pmurias DrForr: ? 11:55
DrForr Your account on blogs.perl.org, at least I assume you're Paweł Murias IRL :)
pmurias DrForr: U+1042 seems to be the Myanmar Digit Two 11:56
timotimo look again, he typo'd
DrForr Yes, corrected to U+0142 :)
pmurias DrForr: yes, I'm Paweł, hope my name didn't break anything
DrForr It along with many others, yours just happened to be the first one I ran across :) 11:57
Just dealing with mysql. 12:00
12:01 ely-se left 12:05 zakharyas joined
timotimo TIL about mplayer -udp-master and -udp-slave. damn, that's cool. (in this case: playing video with one audio stream on one output and another audio stream on another 12:07
12:10 vendethiel left 12:16 vendethiel joined
xenu /win 14 12:16
oops
timotimo oh, we have a deity among us 12:19
dalek c: 94a777d | (Zoffix Znet)++ | html/js/main.js:
Remove left-over autofocus code

Part of the removal of autofocus search box in PR github.com/perl6/doc/pull/370
12:21
AlexDaniel .u U+1042
yoleaux U+1042 MYANMAR DIGIT TWO [Nd] (၂)
12:27 jameslines joined 12:31 jameslines left 12:33 ely-se joined 12:37 sufrostico joined
lizmat good *, #perl6! 12:38
yoleaux 09:58Z <ab6tract> lizmat: is it just me or does IO.watch only produce FileEventChanged::FileRenamed, even for moments when a file has been created or deleted
09:59Z <ab6tract> lizmat: (that's on OS X)
timotimo ab5tract: how FileEventChanged get fired is, sadly, very platform-dependent; nothing much we can do about it i'm afraid
lizmat ab5tract: what timotimo said
m: $_ = 42; { $_ = 666; .say }; .say # is this a bug ? 12:39
camelia rakudo-moar 85d20f: OUTPUT«666␤666␤»
jnthn lizmat: It's bound to the outer iirc 12:40
12:40 jeek left
jnthn lizmat: Which is consistent with given 12:40
lizmat so how would it get bound to the inner scope ?
timotimo with a sub or given or whatever you'd actually get a new $_, right?
jnthn No, the inner's $_ initialization is like $_ := OUTER::<$_> or so
(but code-gen'd more optimally)
timotimo oh i see
jnthn I just meant consistent as in: 12:41
m: my $a = 42; given $a { $_ = 69; }; say $a
camelia rakudo-moar 85d20f: OUTPUT«69␤»
lizmat '$_ = 666; my $a = 42; given $a { $_ = 69; }; say $a; .say 12:42
m: $_ = 666; my $a = 42; given $a { $_ = 69; }; say $a; .say
camelia rakudo-moar 85d20f: OUTPUT«69␤666␤»
lizmat hmmm...
this because of a mail in perl6-users about the globalness of $! 12:43
jnthn $! is per-routine 12:44
moritz lizmat: p6l I think
jnthn sub foo() { ... } is implicitly sub foo() { my ($_, $/, $!); ... }
lizmat moritz: you're right, p6l :-) 12:45
rindolf lizmat: good morning.
jnthn Note also that the binding is almost certainly right 'cus
lizmat rindolf o/
jnthn if .foo { .=bar }
rindolf lizmat: what's up?
jnthn Relies on $_ in the inner block being bound in order to work
lunch time, bbl & 12:46
lizmat rindolf: just had brunch 12:47
rindolf lizmat: ah.
lizmat played "war on terror" until 4am
12:49 kanishka left
timotimo m: say uniname("卌") 12:53
camelia rakudo-moar 85d20f: OUTPUT«<CJK Ideograph>␤»
timotimo d'oh
dalek p: 6dc8c8c | (Pawel Murias)++ | src/vm/js/bin/run_tests.pl:
[js] Pass t/moar/02-multidim.t.
12:55
p: 6e6470b | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] Implement partial nqp::hllizerfor (for builtin things only).
p: 527fd9d | (Pawel Murias)++ | t/nqp/97-hll.t:
Add some nqp::hllizefor tests.
12:58 vendethiel left 13:01 Actualeyes left 13:05 vendethiel joined 13:07 Ven left 13:08 ely-se left
rindolf lizmat: "war on terror"! 13:13
13:13 telex left
lizmat it's like risk with nukes and terrorists and a balaclava marked "EVIL" 13:14
13:14 telex joined
rindolf lizmat: «Why can’t we ever attempt to solve a problem in this country without having a “War” on it?» -- Rich Thomson, talk.politics.misc 13:15
13:15 jeek joined
lizmat www.waronterrortheboardgame.com 13:15
rindolf wonders if a “War on Copyright Infringement” board game is going to be popular. ;-) 13:16
13:19 llfourn left
RabidGravy m: subset JJ of Mu where { $_.can("foo") }; sub bar(JJ:D $f) { say "boo" }; bar(1); # what's this iterator malarkey? 13:19
camelia rakudo-moar 85d20f: OUTPUT«===SORRY!===␤Method 'iterator' must be implemented by Iterable because it is required by a role␤»
13:20 Actualeyes joined
jdv79 thats too boring to be a war effort. drugs, terror, sugar, smoking - these are worthy it seems. 13:20
moritz lizmat: sounds like fun :-) 13:21
RabidGravy m: subset JJ of Mu where { $_.can("foo") }; sub bar(JJ $f) { say "boo" }; bar(1); # just to be clear it's only with the :D
camelia rakudo-moar 85d20f: OUTPUT«Constraint type check failed for parameter '$f'␤ in sub bar at /tmp/kw8NfgXCQM line 1␤ in block <unit> at /tmp/kw8NfgXCQM line 1␤␤»
hoelzro stmuk: re: Linenoise, did you try after rebuilding rakudo from scratch? 13:23
I've seen others end up with some sort of weird rakudo build where that helps 13:24
I still have yet to reproduce that failure, sadly =/
13:25 itaipu joined 13:27 ely-se joined 13:28 lnrdo left 13:29 lnrdo joined
DrForr gives up and declares war on declaring wars on things. And collapses into the screaming recursive void. 13:30
13:36 kaare_ joined 13:41 Ven joined
[Coke] wonders if anyone else is eagerly awaiting the Deadpool film, or if it's just Coke. 13:41
timotimo i'm a deadpool fan, too
[Coke] er, sorry, I mean 💀💩L 13:42
well, timotimo++ then! ;)
timotimo er, maybe "fan" is a bit much 13:43
moritz 's threadpools are dead pools
timotimo i don't know much about the guy's backstory, haven't read any of his comics ...
i haven't read any comic-books, come to think of it
13:45 xpen joined 13:48 vendethiel left
[Coke] I might have his original appearance in the new mutants. 13:50
but I wasn't a fan until much later, just catching bits on the internet. 13:51
13:51 vendethiel joined 13:54 ely-se left 14:05 xpen left, xpen joined 14:12 vendethiel left 14:15 cdg joined 14:17 xpen_ joined 14:19 xpen left, cdg left, nige1 left 14:20 kanishka joined 14:22 cdg joined
MadcapJake What's the difference between a `depends` array in your META6.json and a `deps.proto` file? 14:23
moritz I'm pretty sure depends.proto is ignored by now 14:24
proto was the pre-successor of panda
first proto, then neutro, then panda, iirc 14:25
MadcapJake oh ok, yeah i didn't realize i was looking at an article from 2010 xD
14:27 flaviusb joined
RabidGravy Just discovered why I didn't have a meta test on JSON::Class 14:29
14:32 nige1 joined
dalek p: 9584e81 | (Pawel Murias)++ | src/vm/js/ (3 files):
[js] Implement nqp::settypehll and nqp::settypehllrole and make it work with nqp::hllizefor.
14:32
p: 00f430b | (Pawel Murias)++ | t/nqp/97-hll.t:
Test nqp::settypehll and nqp::settypehllrole.
14:40 sufrostico left, ely-se joined 14:41 sufrostico joined 14:44 sjoshi left 14:46 xpen_ left, xpen joined, skids joined 14:49 vendethiel joined, go|dfish left 14:52 go|dfish joined
awwaiid Just got this to work... so psyched! use Inline::Ruby::Sweet; "[1,2,3]":rb.each: -> $n { say "I got $n!" } # outputs correctly :) 14:53
Skarsnik Sweet? 14:55
AlexDaniel oh, it looks like we have a bunch of inline modules. Inline::Brainfuck – yay
DrForr I'm tempted to do Malbolge, but I'm afraid the tests would be a b*tch. 14:56
awwaiid ::Sweet is my experimental-layer, in this case just turning EVAL("[1,2,3]", :lang<Ruby>) into "[1,2,3]":rb
14:57 xpen_ joined
AlexDaniel awwaiid: do you have to disable complaining monkey in order to do that? 14:57
awwaiid I do whatever it takes
AlexDaniel I'm just thinking that it is still EVAL… :) 14:58
awwaiid haha
Yes, it turns on MONKEY-SEE-NO-EVAL so you can do "[1,2,$foo]":rb
AlexDaniel by the way, how can you pass variables into that without any problems? What's the easiest way?
awwaiid AlexDaniel: what do you want it to look like? 14:59
AlexDaniel awwaiid: I want it to look safe
15:00 llfourn joined 15:01 xpen left
awwaiid mmm. like [1,2,3]:rb.each... ? 15:02
15:02 zakharyas left
AlexDaniel awwaiid: no I mean if instead of 1,2,3 I have $x, $y and $z in Perl 6 15:02
jnthn Well, I guess the real question is if "[$a,$b]":rb is doing string interpolation of $a and $b or something clever :) 15:03
awwaiid like [$x, $y, $z]:rb --> gives back a ruby obj?
15:03 lokien_ joined
AlexDaniel jnthn: you're good at reformulating my dumb thoughts :) 15:04
awwaiid ah. yeah I have like RbObject.from(...) that supports simple things, but not arrays yet, which I could teach :rb how to use 15:05
15:08 _Gustaf_ left 15:09 bowtie_ left 15:11 vendethiel left, sortiz joined
hoelzro I did some diving into how anonymous state variables work, so I decided to write a blog post about it: hoelz.ro/blog/anonymous-state-varia...-they-work 15:12
I'm hoping to write up more of these kinds of things, to show people that working on Perl 6 and figuring it out by reading the source is pretty simple
15:18 nige1 left, lnrdo left
sortiz \o #perl6 15:25
15:29 yurivish_ joined, vendethiel joined
hoelzro o/ sortiz 15:32
timotimo hoelzro: the step from the token variable to the action declare_variable is a bit far for people who have no idea of the rakudo internals 15:34
moritz m: sub f() { say (state $)++ }; f(); f(); 15:35
camelia rakudo-moar 85d20f: OUTPUT«0␤1␤»
moritz m: sub f() { say (my $)++ }; f(); f();
camelia rakudo-moar 85d20f: OUTPUT«0␤0␤»
15:35 molaf joined
moritz hoelzro: maybe don't call them "state variables" when you don't use the "state" declarator 15:35
15:39 xinming left 15:40 fireartist left
timotimo m: sub f() { say $++ }; f(); f(); 15:41
camelia rakudo-moar 85d20f: OUTPUT«0␤1␤»
timotimo it's "anonymous state variables" right in the title
i think it's okay
if you put a state declarator each time, it'd be no surprise at all to see that each gets to be a different one
sortiz hoelzro, I have a question for you: In my module, for travis I'm using dist:trusty, but travis ignores me. Only happens when language is 'perl6', any ideas? 15:43
15:44 CIAvash left 15:45 xpen_ left
brrt nice writup hoelzro++ 15:51
15:58 edenc joined, psy joined 15:59 psy left 16:00 psy joined 16:02 sena_kun left 16:06 lnrdo joined 16:07 FROGGS left
RabidGravy m: role Foo { has Str $.id ; }; my $a = class {}; $a.^add_role(Foo); $a.^compose; say $a.^attributes; say $a.new(id => "foo") 16:10
camelia rakudo-moar 85d20f: OUTPUT«(Str $!id)␤P6opaque: no such attribute '$!id'␤ in block <unit> at /tmp/yqFkrhLeh2 line 1␤␤»
RabidGravy is there anyway to do that so it actually works? the anonymous class there is just for example, in reality it could have come from anywahere 16:11
16:11 yurivish_ left, pmurias left
dalek kudo-star-daily: 9e61216 | coke++ | log/ (5 files):
today (automated commit)
16:12
kudo-star-daily: a3653a7 | coke++ | log/ (5 files):
today (automated commit)
rl6-roast-data: 55715f4 | coke++ | / (6 files):
today (automated commit)
timotimo RabidGravy: yeah, you can Metaobject::ClassHOW.new_class instead of class {}
or you could my $a = class :: does Foo {} 16:13
16:13 vendethiel left
RabidGravy The class {} there is just for example, it would in reality be a Type object passed to a method 16:14
timotimo ok, so? you can does or but it dynamically 16:15
16:15 domidumont left
RabidGravy can't does a type object 16:15
timotimo can't but a type object either?
RabidGravy but I didn't try, lets see
jnthn You can but it, and you get back an anonymous subclass of the type with the role composed into it 16:16
RabidGravy yeah, but works, always forget about that
timotimo and "but" is just "and" with funny semantics :P
16:16 lnrdo left
RabidGravy let's see if it works for my actual code 16:17
timotimo what gave you the impression that any code could ever work for anything, ever? :\ 16:18
16:19 ely-se left, lnrdo joined
RabidGravy too many drugs in the eighties 16:19
and it does actually work! yay! 16:20
16:20 jast left, jast joined 16:21 [ptc] left
hoelzro timotimo: I didn't want to bog people down with too many details 16:22
timotimo no. "it but actually work!"
hoelzro moritz: what would you suggest as an alternative to "state variable"?
RabidGravy this is so I can add attributes _rev and _id to a class that I'm going to deserialise from JSON in the CouchDB thing
hoelzro sortiz: it ignores you? did you activate the repo in the travis admin? 16:23
hoelzro often forgets taht
timotimo: it surprised me at first, but in hindsight it doesn't =)
16:24 tth_ joined, [ptc] joined 16:25 tth left, sQuEE is now known as sQuEE`, sQuEE` is now known as sQuEE
sortiz hoelzro, Yes, sure. But travis insist in using "precise", not "trusty", so all tests attempts fails. Sorry to bother you with this. 16:27
hoelzro no worries, I'm on the hook for it =)
sortiz: so perl6 works with precise, but not trusty?
and other languages work with trusty?
16:27 lnrdo left
hoelzro it may be just that we need to do something to enable perl6 on trusty 16:27
sortiz hoelzro, Yes, exactly.
16:28 lnrdo joined
sortiz hoelzro, And my module needs a library only shipped whit trusty. :( 16:28
s/whit/with/ 16:29
hoelzro ugh 16:30
16:34 Ven left
hoelzro sortiz: I'm at work right now, but I can try to take a look later 16:35
on an unrelated note, is anyone else interested in helping to get rakudo-j up and running again? either now, or in the near future after rakudo-m has settled down a bit? 16:36
I did some digging on it last night, and I'm wondering if there's someplace I should be posting my findings, like an RT ticket 16:37
16:37 brrt left
sortiz hoelzro, Thank you! 16:38
16:39 vendethiel joined 16:40 CIAvash joined, lnrdo left
skids Hrm... new to travis -- does it just sometimes not notice a push for a while? 16:42
16:42 musiKk joined, domidumont joined 16:43 mohae_ joined 16:44 mohae left, Kogurr joined 16:45 tth_ is now known as tth
hoelzro skids: it shouldn't take more than a few minutes 16:46
it's usually instant
skids Yeah it was instant last night, but right now it hasn't seen my latest commit to Perl6-Proc-Screen for over an hour
Though, that commit was *to* .travis.yml 16:47
hoelzro it should still pick it up
skids One would think :-) 16:48
sortiz In my case every single push was was tryed almost instantly. 16:50
16:51 raiph joined 16:54 nakiro left 16:56 sQuEE is now known as sQuEE`, RAMBO joined 16:57 sufrostico left, sufrostico joined, xinming joined 16:58 abraxxa left
[Coke] hoelzro++ 16:59
moritz hoelzro: "anonymous variable"
17:00 sQuEE` is now known as sQuEE, Zero_Dogg left 17:01 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
hoelzro moritz: if it were just an anonymous variable, though, I would expect a new one for each iteration of the loop 17:02
even though it isn't declared with the state declarator, it behaves like a state variable
17:04 itaipu left
RAMBO HI 17:06
hoelzro hi! 17:07
17:12 bowtie joined, bowtie is now known as Guest32512
sortiz moritz, In docs.perl6.org/language/variables, about the '$' variable says: "As well as explicitly declared named state variables $ can be used as an anonymous state variable without an explicit state declaration" 17:15
17:18 rurban joined 17:19 RAMBO left 17:20 vendethiel left 17:24 SCHAAP137 joined
moritz sortiz: ok, maybe I'm wrong here 17:25
sortiz m: sub f { ++state $; }; say f,f,f; # With explicit state 17:26
camelia rakudo-moar 85d20f: OUTPUT«123␤»
sortiz m: sub f { ++$; }; say f,f,f; # Without explicit state
camelia rakudo-moar 85d20f: OUTPUT«123␤»
17:27 khw joined
ilmari m: sub f { (++$, $++); }; say f,f,f; 17:27
camelia rakudo-moar 85d20f: OUTPUT«(1 0)(2 1)(3 2)␤»
ilmari and each $ is separate
17:28 itaipu joined 17:30 Upasaka left, CIAvash left
sortiz BTW in roast is only tested with an explicit state declaration, and I can't found any reference in the Synopses. 17:31
17:32 CIAvash joined 17:33 espadrine left, vendethiel joined, Upasaka joined
hoelzro ugh, I remember finding it in the synopses, but I forget where 17:33
the closest thing I can find is design.perl6.org/S02.html#Names (look for bare sigil) 17:35
17:38 Actualeyes left
sortiz Found the term used by jnthn in: rt.perl.org/Ticket/Display.html?id...n-1186387, closed. 17:39
17:39 xdbr left
sortiz These formalities are very important to me. :) 17:46
17:46 dakkar_ left 17:47 musiKk left 17:52 Actualeyes joined 17:53 perlpilot left 17:58 lsm-desktop left 17:59 rurban left 18:00 lsm-desktop joined
sortiz m: sub f { my \b := $; ++b, b+10 }; say f,f,f; # my or state? :) 18:03
camelia rakudo-moar 85d20f: OUTPUT«(1 11)(2 12)(3 13)␤»
18:03 zoosha left 18:05 firstdayonthejob joined 18:09 Ven joined, rurban joined, Actualeyes left
moritz state, state, state 18:10
I officially withdraw my objections
18:12 rurban left
MadcapJake nine: thanks for the help with this github.com/MadcapJake/p6dx/blob/ma...m6#L27-L36 18:18
sortiz moritz++ # The good mood
MadcapJake p6dx can now search any modules listed in «depends» array in META6.json for completions
18:19 llfourn left
nine MadcapJake: glad I could help :) 18:19
MadcapJake now, time to integrate this into an Atom Editor package 18:22
Hotkeys oh man 18:25
are we getting better atom tools for p6
MadcapJake yep :D
Hotkeys Also what is the best highlighting package for p6 in atom right now
is it just language-perl?
MadcapJake personally, i prefer language-perl6fe ;)
Hotkeys I tried perl6fe but it did a lot of not-highlighting 18:26
hoelzro perl6fe is quite nice
MadcapJake++
18:26 itaipu left
MadcapJake Hotkeys: are you sure you followed the installation instructions? 18:26
Hotkeys I think I did
it was a while ago
MadcapJake please submit bug reports as I am the language-perl6fe developer 18:27
Hotkeys I'll give it another go
masak ey, #perl6 18:28
MadcapJake at this point it's really solid and (last i checked) highlights the rakudo repo pretty well
18:28 addison joined
MadcapJake Hotkeys: I have a linter package in the works, but I hit a roadblock (perl6 errors are not really machine-readable) and so I am writing a custom linter with cascading rulesets that'll be built in to P6Dx (and the linter package will then just run it internally) 18:30
Hotkeys neat 18:31
hoelzro ahoy masak
Hotkeys yeah the error messages are nice for people
which is nice except when making a linter
:p
MadcapJake yep exactly, each one is different, so I was originally writing custom patterns and functions for each type and it was going to really become a challenge to finish (let alone maintain) 18:32
Hotkeys what theme is this i.github-camo.com/0f28e089008622d8...312e706e67
MadcapJake plus it was all in JS which was 😷
Hotkeys oh
github image links are gross
didn't realize
sorry
DrForr Heh. I wrote a little "just-f*ing-fix-it" utility that fixes common semicolon and whatnot errors, it has to parse the error statement for that purpose. 18:33
18:33 dfcarpenterak joined
Hotkeys I need one of those for every time I save my code 18:33
the amount of times I forget a semi-colon
crazy
DrForr I might put it in the Acme:: section. 18:34
Hotkeys or like 18:35
sometimes I don't put a semi-colon like in the last line of a function
because I'm lazy
but then I decide to add lines after that
TimToady sounds good enough for Wiley Coyote
Hotkeys and suddenly rakudo gets angry
MadcapJake DrForr: nice! I think my P6Dx linter will have a couple different kind of semi-colon rules: strict (every line), normal (every non-curly line), and relaxed (allow no semi-colons on last line of block)
18:36 abaugher_ left
masak m: class Base {}; class Derived is Base {}; role R[::T] {}; say R[Derived] ~~ R[Base]; say R[Base] ~~ R[Derived] 18:36
camelia rakudo-moar 85d20f: OUTPUT«True␤False␤»
Hotkeys relaxed++
MadcapJake: do you know the theme used in the image I linked?
18:36 dfcarpenterak left
Hotkeys I want something nice an dcolorful like that 18:36
MadcapJake Hotkeys: yeah that's Brahalla
masak ok, so generic roles in Perl 6 are covariant.
is there a way to make a contravariant role in Perl 6?
18:36 dfcarpenterak joined
masak (or an invariant one) 18:37
18:37 abaugher_ joined, Ven left
skids travis mystery solved: if you check the "build only if travis.yml is present" box what it actually means is "build only if a validly parseable .travis.yml is present and otherwise show no visible signs of failure unless you go to Settings/Requests just sit there looking dumb" :-/ 18:37
MadcapJake Hotkeys: my personal favorite is Railscast, it fits really well with how the perl6fe selectors are assigned 18:38
Hotkeys hmm
masak skids: easy -- just add a unit test that makes sure that the travis.yml is correct oh wait
MadcapJake come to think of it, i'm surprised i never put a pic of that up in the readme!
skids masak: :-)
masak skids: actually, that might still be a good idea 18:39
skids: since at least then you could catch it locally
Hotkeys I just tried railscast and there was mostly white text
skids masak: yeah. But if you put it in t/ then you need a build dependency on a TAML module :-)
*YAML
ingy &YAML 18:40
18:40 CIAvash left 18:41 atweiden joined
ingy offers skids an anchor for their alias :) 18:41
DrForr Aroo? LTNS dude.
Hotkeys although there are a lot of railscast themes on the package finder
MadcapJake Hotkeys: it uses more white than other themes, but containers should all be light blue (and nicely the twigils are noticeable but yet not overpowering, which is something that jnthn noticed was a problem with some themes)
masak ingy! \o/
ingy: do you, like, have a summoning function for "YAML" or sump'n?
DrForr He's the Kibo of i.p.org :) 18:42
18:42 itaipu joined
Hotkeys I want something colorful like brahalla but not as dark 18:42
masak skids: who wouldn't want a build dependency on a YAML module? what are you trying to optimize for here? :P
ingy masak: yes, but don't abuse it :)
18:43 ely-se_ joined
jnthn masak: Invariant is most likely to happen through a type modifier (Foo:I or so) 18:43
Or type smiley as we like to call them 18:44
:I looks smug 'cus it got *exactly* the type it wanted :P
And clear :C for contravariant is "extremely unhappy because now I have to learn what variance is" :P 18:45
*clearly
MadcapJake Hotkeys: here's how railscast looks for me twitter.com/MadcapJake/status/6924...2235078656
jdv79 could :P be something?
ely-se_ following the support of Japanese brackets we should also support Asian-style type smileys
18:46 vendethiel left
ely-se_ Int(^_^) 18:46
Hotkeys Which railscast theme is that MadcapJake
skids masak: Oh it's not really a problem, in fact locally I keep my META6 in YAML, I was just being facetious
alpha123 ely-se_: we should also CJK kanji for common keywords to improve density
Hotkeys just started project euler
I like how many I can do right in the repl
skids masak: because I never understood why we used JSON there anyway.
MadcapJake Hotkeys: atom.io/packages/railscast-theme
alpha123 isnt exactly sure how to translate 'class', 'role', or 'grammar' but maybe we can figure something out 18:47
ingy skids: because JSON parsers are simple to make?
Hotkeys MadcapJake: oh this is much better than the other railscast I tried
alpha123 we should also support braille translations of keywords for screenreaders 18:48
Hotkeys ely-se_+++
skids ingy: maybe too simple judging from the number of them we have :-)
Hotkeys can we get morse code p6?
MadcapJake yeah this one is great, also for more eye candy: enrmarc.github.io/atom-theme-gallery/
18:48 lostinfog joined
DrForr Hotkeys: Don't tempt me :) I'm already pondering Marain :) 18:48
jdv79 skids: isn't that just because of speed?
18:49 vendethiel joined
jdv79 we'd probably only have 2 or 3 if perf was good. having one is probably impossible in a perlish world. 18:49
Hotkeys DrForr: what about galactic basic
18:49 MARTIMM left
alpha123 we should go all Firefly and just have a hybrid chinese/english syntax, once we have the basic kanji down code density could go through the roof 18:50
skids jdv79: I dunno, has anyone actually speed-tested/optimized YAML for simple META6-like things that do not excercise most of it? 18:51
RabidGravy well there are only 4
18:51 ely-se_ left
alpha123 Hotkeys: how are you gonna do some of the weirder operators in morse code 18:51
18:51 ely-se_ joined
Hotkeys invent new morse 18:51
or have very long combinations
alpha123 telegraphing perl around would be quite handy so we probably should invent some way to encode them 18:52
RabidGravy infact 3 *parsers* in the ecosystem
jdv79 skids: I don't think so. what is the reason META6 would be in YAML?
skids jdv76: because it's less of a PITA to read/write by hand, mostly.
RabidGravy JSON::Pretty uses JSON::Tiny to parse
jdv79 well, that's subjective. i actually find json much easier to write/read by hand and to write parsers and generators for. 18:53
El_Che skids++
jdv79 when i have to write yaml i always have to look at the spec
but maybe that's just me
El_Che json is the new xml :)
MadcapJake yaml is a superset of json, so technically they're all valid yaml files ;)
ingy yaml is the old json :) 18:54
18:55 FROGGS joined
MadcapJake skids: my language-perl6fe has a nice little grammar for META6 files that highlights required keys and shows you when it's not valid (the only thing it can't catch is a comma at the end of a list) 18:56
s|list|array/object|
ingy I think both were started in 2001, but yaml (and pretty much everyone else) only became "aware" of json in 2005. Ironically yaml was /almost/ a superset even then. 18:57
FROGGS o/ 18:59
yoleaux 10:10Z <hankache> FROGGS: 2) The REPL has already line editing features but when run it says "try panda install Readline or Linenoise"
skids Weird. I add an "apt-get install screen" to my travis build after a first run of tests so I can ensure a module will install w/o screen, then suddenly screen is available for the tests run before that statement, where it was not with the statement absent. ETOOMUCHMAGIC. 19:02
19:03 musiKk joined 19:04 zakharyas joined 19:15 nige1 joined 19:16 spider-mario joined 19:19 dfcarpenterak left
skids And... it gets wierder. If I apt-get remove screen, it successfully removes, and then later when I install it there's no installation candidate. 19:22
Hotkeys is there a way to get the number of digits in a number besides doing $n.Str.chars 19:23
DrForr log(10,$value) :)
Hotkeys oh
math 19:24
ely-se_ No; numbers have no digits. Some representations of numbers do.
Hotkeys shh
forgot how useful math is
skids Someday computers will be intelligent enough to forget to use math just like us humans. 19:25
tony-o_ should that be log($val,10).ceil ? 19:29
19:29 perlpilot joined
Hotkeys should be floor(log($val,10) + 1) 19:30
tony-o_ ceiling
m: say (log(10,40)+1).floor
camelia rakudo-moar 85d20f: OUTPUT«1␤»
tony-o_ that doesn't look right
[Coke] sees kibo in backscroll, and is once again weirded out that his alma mater has such famous folk.
tony-o_ m: say log(40,10).ceiling 19:31
camelia rakudo-moar 85d20f: OUTPUT«2␤»
tony-o_ m: say log(4000,10).ceiling
camelia rakudo-moar 85d20f: OUTPUT«4␤»
tony-o_ m: say (4.log(10)+1).floor
camelia rakudo-moar 85d20f: OUTPUT«1␤»
tony-o_ m: say (40.log(10)+1).floor 19:32
camelia rakudo-moar 85d20f: OUTPUT«2␤»
tony-o_ m: say (400.log(10)+1).floor
camelia rakudo-moar 85d20f: OUTPUT«3␤»
tony-o_ not sure ($_+1).floor rather than .ceiling, though :-)
stmuk is someone with commit access able to look at github.com/sergot/openssl/pull/18 please? 19:33
19:34 ely-se_ left
tony-o_ stmuk++ 19:35
19:36 rurban joined
lizmat m: subset JJ where *.can("foo"); -> JJ:D $a { } # golf of RabidGravy's problem 19:37
camelia rakudo-moar 85d20f: OUTPUT«===SORRY!===␤Method 'iterator' must be implemented by Iterable because it is required by a role␤»
lizmat m: subset JJ where *.can("foo"); -> JJ $a { } # it's indeed in the :D
camelia ( no output )
19:37 dfcarpenterak joined
RabidGravy weird isn't it? 19:38
jnthn Aye. Will be an interesting bug to look into :)
lizmat it's trying to pun some role 19:39
Hotkeys the log method doesn't work for really big numbers
m: (1, 1, * + * ... *.Str.chars >= 1000)[*-1].log10 19:40
camelia ( no output )
lizmat jnthn: in role Perl6::Metamodel::RolePunning
Hotkeys rude
m: say (1, 1, * + * ... *.Str.chars >= 1000)[*-1].log10
camelia rakudo-moar 85d20f: OUTPUT«Inf␤»
jnthn lizmat: Yes, more interesting is how we end up trying to :) 19:41
lizmat hmmm.... seems precomp is involved ?
lizmat gives up 19:43
19:44 addison left
lizmat RabidGravy: perhaps rakudobug it with an --ll-exception backtrace ? 19:44
vendethiel realizes a lot of his directories now have a ".precomp" dir from a lot of random-perl6-ing around
19:44 vendethiel left
Hotkeys m: say log(10 ** 309, 10) 19:44
camelia rakudo-moar 85d20f: OUTPUT«Inf␤»
Hotkeys :(
flussence spent most of today writing some highly-optimized perl5 code for fun. 75% less cpu than /usr/sbin/fancontrol! 19:45
19:46 rurban left
flussence (who'd have thought a bash script that spends most of its time running `sleep 10` could be so expensive?) 19:46
Hotkeys lol 19:47
dalek ar/release: 7fbfba7 | FROGGS++ | tools/build/ (2 files):
revert using --bindir when installing panda

We can install panda and the binaries of the Star dist into install/bin, though when the user later installs binaries or updates panda, these would go into install/share/perl6/site/bin by default. Since there is currently no sane way to prevent that, we just install non-core stuff info [...]/site/bin, and the user will have to add two paths to PATH.
19:48
19:49 vendethiel joined
dalek ar/release: 52bd3fc | FROGGS++ | tools/build/Makefile.in:
display all-is-well message when installation completes

  diakopter++
19:49
ar/release: 70ddde5 | FROGGS++ | tools/build/Makefile.in:
fix typo
19:50
19:50 SCHAAP137 left 19:53 SCHAAP137 joined
MadcapJake m: sub digs($i) { sub rec($i, $v) { if $i %% 10 { rec(($i/10).round, $v + 1) } else { $v } }($i, 1) }; digs(100000000000); # Hotkeys 19:55
camelia ( no output )
MadcapJake m: sub digs($i) { sub rec($i, $v) { if $i %% 10 { rec(($i/10).round, $v + 1) } else { $v } }($i, 1) }; say digs(100000000000);
camelia rakudo-moar 85d20f: OUTPUT«12␤»
MadcapJake A bit confusing that the repl ouputs last result and camelia doesn't :P 19:56
19:57 addison joined
MadcapJake I wish I could've done $v++ up there but it wouldn't let me do that without `is rw` and then I couldn't just supply `1` for some reason 19:57
vendethiel "$v is copy" as an argument works 19:59
MadcapJake oh nice!
20:00 cat_ joined
cat_ 20:01
20:03 lostinfog left
cat_ I'm curious what the Perl 6 community thinks of this: stackoverflow.com/q/35016310/ 20:06
20:06 itaipu left 20:07 dfcarpenterak left
cat_ p6: say "Hello"; 20:07
camelia rakudo-moar 85d20f: OUTPUT«Hello␤»
masak hello, cat_ 20:09
cat_ hi, masak! 20:11
jdv79 does anyone know of a gh -> cpan author mapping?
i am in need
dalek kudo/nom: 6e73d2a | FROGGS++ | src/core/CompUnit/Repository/ (2 files):
Revert "make CUR.bindir overridable"

This reverts commit cf7706f0f866c20bfa9d345e86143f701ef35912.
kudo/nom: 86a90be | FROGGS++ | src/core/CompUnit/Repository/Installation.pm:
wrapper scripts need use $*EXECUTABLE

If we are using $*EXECUTABLE-NAME, we might execute a different perl6 version from PATH.
kudo/2016.01-preparation: bf0df6c | FROGGS++ | src/core/CompUnit/Repository/ (2 files):
Revert "make CUR.bindir overridable"

This reverts commit cf7706f0f866c20bfa9d345e86143f701ef35912.
20:12
kudo/2016.01-preparation: 6841e71 | FROGGS++ | src/core/CompUnit/Repository/Installation.pm:
wrapper scripts need use $*EXECUTABLE

If we are using $*EXECUTABLE-NAME, we might execute a different perl6 version from PATH.
ar/release: 87e9bf3 | FROGGS++ | modules/ (9 files):
updated submodules
20:23
RabidGravy what's the difference between LEAVE and POST?
dalek ar: fd22c79 | FROGGS++ | modules/ (20 files):
attempt at bootstrapping panda directly
20:24
star: ac288f0 | FROGGS++ | / (5 files):
star: first working post 6.c star
20:24 dalek left
jdv79 wonder if its as ignorable as the diff between PUT and POST 20:24
FROGGS sorry dalek
20:24 yqt joined
mspo LEAVE ? 20:24
20:24 dalek joined, ChanServ sets mode: +v dalek
FROGGS mspo: doc.perl6.org/language/phasers#LEAVE 20:26
RabidGravy m: sub f { LEAVE { say "leaving" }; say "f" }; sub g { POST { say "posting" }; say "g" }; f; g;
camelia rakudo-moar 85d20f: OUTPUT«f␤leaving␤g␤posting␤»
RabidGravy they appear to behave the same
jnthn POST is for postconditions 20:27
If it evaluates to false you get l'exception
RabidGravy ah
m: sub f { LEAVE { say "leaving" }; say "f" }; sub g { POST { False}; say "g" }; f; g;
camelia rakudo-moar 85d20f: OUTPUT«f␤leaving␤g␤Postcondition '{ False}' failed␤ in sub g at /tmp/fimrssa2ES line 1␤ in block <unit> at /tmp/fimrssa2ES line 1␤␤»
mspo FROGGS: I went all HTTP-crazy 20:28
FROGGS stmuk: do you know why travis fails to test openssl?
jnthn m: class Account { has $.balance = 0; method withdraw($amount) { $!balance -= $amount; POST $!balance > 0 } }; Account.new.withdraw(10)
camelia rakudo-moar 85d20f: OUTPUT«Postcondition '$!balance > 0' failed␤ in method withdraw at /tmp/bSENBFKC3A line 1␤ in block <unit> at /tmp/bSENBFKC3A line 1␤␤»
FROGGS stmuk: I'd like to merge your PR but without seeing it pass its test... well
jdv79 the phaser docs aren't for noobs
RabidGravy I only noticed it earlier with a sub called POST that doesn't work with brackets
jdv79 (i'm having trouble reading them) 20:29
20:29 darutoko left
mspo END {} was so simple in perl5 ;) 20:29
lizmat m: END say "it still is"
camelia rakudo-moar 85d20f: OUTPUT«it still is␤»
dalek c: f06adef | (Christopher Bottoms)++ | doc/Language/traps.pod:
minor typo edits
c: 4b8c1ee | (Christopher Bottoms)++ | doc/Language/traps.pod:
fixed parentheses (can't have single quotes inside single quotes)
c: f98c68d | FROGGS++ | doc/Language/traps.pod:
Merge pull request #371 from molecules/patch-2

minor typo edits
jnthn Don't think END got any harder. BEGIN and CHECK mean you need to know about precomp, though :)
mspo too bad objects don't have easy-to-use phasers
just bananas ways to init stuff 20:31
jdv79 what is so bananas? 20:32
skids anything that mixes BUILD with roles 20:33
And the signature binding magic in BUILD
(versus initial default values)
cat_ the whole language is pretty bananas, imo, but in a good way 20:34
20:35 leat left
AlexDaniel m: ‘🍌’.uniname.say 20:35
camelia rakudo-moar 86a90b: OUTPUT«BANANA␤»
jdv79 BUILD's signature handing isn't special cased is it? 20:36
vendethiel nope 20:39
skids rt.perl.org/SelfService/Display.html?id=125437 the IRC log linked therein shows some user-experience issues with BUILD, both due to the ticket substance and in addition to that. 20:40
hoelzro LEAVE just executes its contents; POST throws an exception if its contents evaluate to a falsey value
20:40 Atomic_07Gq0 joined
mspo jdv79: BUILD vs BUILDALL + callsame vs the other one 20:40
jdv79 nextsame? 20:41
mspo sure
I find the situation pretty confusing, at least
RabidGravy there's hundred of them
AlexDaniel RT 125437
skids m: say (1..2).map: { 1 if 0; LEAVE { } } # From last night -- should the "1 if 0" not be the implcit return of that block?
camelia rakudo-moar 86a90b: OUTPUT«WARNINGS for /tmp/nyEeDztXIP:␤Useless use of constant integer 1 in sink context (line 1)␤(Nil Nil)␤»
AlexDaniel bot?
FROGGS AlexDaniel: synopsebot is gone, dunno why 20:44
hoelzro skids: I don't believe so, no 20:45
(judging from my previous experiences with CATCH)
m: sub f { 1; CATCH {} } say f()
camelia rakudo-moar 86a90b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/t2Bra5CEfu␤Strange text after block (missing semicolon or comma?)␤at /tmp/t2Bra5CEfu:1␤------> 3sub f { 1; CATCH {} }7⏏5 say f()␤ expecting any of:␤ infix␤ infix stopper␤ …»
hoelzro m: sub f { 1; CATCH {} }; say f()
camelia rakudo-moar 86a90b: OUTPUT«WARNINGS for /tmp/DrJdD2gOmF:␤Useless use of constant integer 1 in sink context (line 1)␤Nil␤»
skids So phasers constitute a statement in general?
20:45 domidumont left
hoelzro yup 20:46
that sounds like a nice linter rule - sink context thing happening before final phaser
skids Well, first we have to figure out if it is intended behavior :-) 20:47
hoelzro true =)
skids m: { my $a = LEAVE { }}; $a.say; # just wondering 20:48
camelia rakudo-moar 86a90b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DuRCslx6mc␤Variable '$a' is not declared␤at /tmp/DuRCslx6mc:1␤------> 3{ my $a = LEAVE { }}; 7⏏5$a.say; # just wondering␤»
skids m: my $a; { $a = LEAVE { }}; $a.say; # just wondering
camelia rakudo-moar 86a90b: OUTPUT«(Any)␤»
20:52 cat_ left
hoelzro skids: design.perl6.org/S04.html#The_Relat...Statements 20:52
now, we just need a formal definition for statement =)
skids hoelzro: yep. The example above though was indeed expecting the if to produce a (). Actually that whole last paragraph is just really saying "Note: if 0 { } returns slip()" 20:55
hoelzro *nod*
sortiz I wasn't expecting that phasers _without_ a run-time value counts as statements in its surroundings ! 20:56
skids m: (-> $ { })().perl.say # checking
camelia rakudo-moar 86a90b: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤ in block <unit> at /tmp/gbqCWQzUxE line 1␤␤»
20:56 addison left
skids m: (-> $ { })("ergh").perl.say # checking 20:56
camelia rakudo-moar 86a90b: OUTPUT«Nil␤»
skids MmmHmm. Either stale design doc or that should be () (or probably |()). 20:57
hoelzro it's a little weird; I feel like phasers without values are statements; those with values are expressions, and expressions are a time of statement
but I could be wrong; I just can't find a formal definition for what consistutes a statement in Perl 6
the example gives if() as a statement, however, which doesn't yield a value 20:58
skids Sure it does, slip() is a value :-) 20:59
sorta
hoelzro heh, touché
sortiz m: say (if True -> $a { !$a }); 21:02
camelia rakudo-moar 86a90b: OUTPUT«False␤»
hoelzro hmm 21:03
m: sub f { if True -> $a { $a } }; say f()
camelia rakudo-moar 86a90b: OUTPUT«True␤»
hoelzro oh, that makes sense
m: sub f { if False -> $a { $a } }; say f() 21:04
camelia rakudo-moar 86a90b: OUTPUT«()␤»
hoelzro so my earlier assertion was wrong
skids It was perhaps a needlessly confusing statement to put before the phaser in that example :-) 21:05
21:09 addison_ joined, Zero_Dogg left 21:10 Zero_Dogg joined
sortiz m: sub f { LEAVE { say 'foo' }; 'baz'}; say f; # Expected 21:12
camelia rakudo-moar 86a90b: OUTPUT«foo␤baz␤»
sortiz m: sub f { 'baz'; LEAVE { say 'foo' }; }; say f; # The _same_ expected, but nope
camelia rakudo-moar 86a90b: OUTPUT«WARNINGS for /tmp/okTwJtLoZg:␤Useless use of constant string "baz" in sink context (line 1)␤foo␤Nil␤»
lizmat blogs.perl.org/users/zoffix_znet/20...rsday.html # ZoffixWin++ 21:14
21:15 llfourn joined 21:18 geraud joined 21:20 llfourn left
FROGGS ZoffixWin++ 21:22
21:23 Psyche^ joined 21:24 xxpor joined, regreg joined
sortiz And in any case, I don't know where that Nil comes from. 21:25
21:26 atweiden left 21:27 Psyche^_ left
skids Might be the pre-glr pre-EMPTY Nil still lingering around 21:28
*Empty
21:28 itaipu joined
masak m: sub f {}; say f 21:29
camelia rakudo-moar 86a90b: OUTPUT«Nil␤»
masak sortiz: you get a `Nil` in your case for the same reason as you get a `Nil` above
(because there's no last statement to implicitly return a value)
FROGGS ***ALL*** - new release candidate of Rakudo Star is available: froggs.de/perl6/raku​do-star-2016.01-RC2.tar.gz 21:30
masak \o/ FROGGS++
'night, #perl6
FROGGS ***ALL*** - a windows msi is also available, though the PATH to site/bin needs to be set additionally: froggs.de/perl6/rakudo-sta​r-2016.0...0(JIT).msi
skids masak: "If there are no statements in the block at all, the result is also ()." from S04, maybe stale, or maybe right. 21:31
sortiz FROGGS++ 21:34
edenc FROGGS++
jdv79 FROGGS: what's with the RC stuff? is there uncertainty it works or something? 21:36
i don't remember that in the past
lizmat ReleaseCandidate 21:37
if we don't find any errors, it's what we're going to release
pretty standard in P5 world :-)
FROGGS jdv79: it is a way to gain feedback from more than one platform, and to hotfix stuff before the real release was made 21:38
jdv79 i'm familiar with the concept. i just don't remember that being part of the p6 related releases. 21:39
sortiz masak, But if "there's no last statement", why the 'baz'; don't becomes the "last" one?
jdv79 so its likely a fine release - we're just now being more attentive. 21:40
lizmat is looking at Mu.WALK: it *is* specced, it has spectest, but no documentation whatsoever 21:41
nor can I find anything that calls it other than the spectest
sortiz Found non-expresionable phasers handling LTA. 21:43
21:45 yurivish is now known as fa
FROGGS gnight #perl6, will look into setting PATH when installing the windows msi tomorrow 21:47
21:47 FROGGS left, Ven joined 21:48 kaare_ left, gfldex_win joined
gfldex_win FROGGS: gist.github.com/anonymous/edae0ee546d071491a73 21:49
.tell FROGGS please check gist.github.com/anonymous/edae0ee546d071491a73
yoleaux gfldex_win: I'll pass your message to FROGGS.
ZoffixWin gfldex_win, does that happen with any other modules? 21:50
gfldex i will check
ZoffixWin Oh. *I'm* on Windows right now! :D
RabidGravy lizmat, I can't actually think of a use for it either
ZoffixWin tries the RC
21:50 nige1 left
RabidGravy m: class G { method b { say "G" }}; class H is G { method b { say "H" } }; H.WALK(name => "b")>>.(H.new) 21:51
camelia rakudo-moar 86a90b: OUTPUT«H␤G␤»
ZoffixWin I get a 404 on that MSI link :/
RabidGravy I'm sure I could
lizmat froggs.de/perl6/rakudo-star-2016.01...0(JIT).msi # ZoffixWin: this one seems to work 21:53
ZoffixWin Does. Thanks.
gfldex ZoffixWin: same problem on another very simple module
lizmat the tar URL seems wrong also: this seems to be the correct one: froggs.de/perl6/rakudo-star-2016.01-RC2.tar.gz 21:55
ZoffixWin .tell FROGGS One thing I notice right away is the MSI tells me nothing about WHERE it's copying the files. :/ 21:56
yoleaux ZoffixWin: I'll pass your message to FROGGS.
flussence hazards a guess at %PROGRAMFILES%Rakudo Star or suchlike 21:57
gfldex it's C:\Rakudo
21:57 skids left, molaf left
ZoffixWin k... and C:\rakudo\share\perl6\site\bin for panda 21:59
rindolf ZoffixWin: hi, sup?
ZoffixWin .tell FROGGS not sure if it's know, but since you only mentioned that site/bin needs to be added... I also had to add C:\rakudo\bin to path 22:00
yoleaux ZoffixWin: I'll pass your message to FROGGS.
22:00 ely-se joined
gfldex_win ZoffixWin: set PATH=C:\rakudo\bin;C:\rakudo\share\perl6\site\bin;C:\Program Files\Git\bin;%PATH% 22:00
after you insalled git ofc :)
jdv79 ZoffixWin: are there plans to support multiple auth/ver/api kinda variations on dists for modules.perl6.org?
ZoffixWin jdv79, I thought we decided MetaCPAN6 is the way to go? 22:01
jdv79 yeah. just asking. so modules.perl6.org is inactive in terms of development then? 22:02
22:02 wamba left
jdv79 i think we have cpan6 and pause6 from markov. he was a little unclear but i'll just run with that angle for now:) 22:03
ZoffixWin m: .tell FROGGS here's the conclusion of my testing RC2 and trying to install a module. perl6 itself seems to work and I tried Test.pm6 and it works too. gist.github.com/zoffixznet/b104d0f9a9f965c92dd3 22:04
camelia rakudo-moar 86a90b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/o7a56JunKA␤Two terms in a row␤at /tmp/o7a56JunKA:1␤------> 3.tell7⏏5 FROGGS here's the conclusion of my test␤ expecting any of:␤ infix␤ infix stopper␤ statement end…»
ZoffixWin .tell FROGGS here's the conclusion of my testing RC2 and trying to install a module. perl6 itself seems to work and I tried Test.pm6 and it works too. gist.github.com/zoffixznet/b104d0f9a9f965c92dd3
yoleaux ZoffixWin: I'll pass your message to FROGGS.
ZoffixWin jdv79, yeah, I, personally, don't have any plans to add any new features to modules.perl6.org, because we're going with the whole MetaCPAN model and stuff. Seems it'd be a waste of effort to work on modules.perl6.org too :) I'll probably contribute to the MetaCPAN stuff in the future, but currently I'm on "vacation" until March :) 22:05
El_Che sounds like an euphemism for jail 22:07
jdv79 happy vaca'ing then!
ZoffixWin El_Che, yes, I'm in jail... they let us sit on IRC 24/7 :P 22:08
22:08 itaipu left
alpha123 sticking prisoners on programming related IRC channels seems like either torture or a great idea 22:09
El_Che hehe
if I would be a guard, I would let you
keep them doped with irc :)
TEttinger all right, who's been in #prison_escape ? 22:10
22:11 gfldex_win left
jdv79 ZoffixWin: what prompted such a long vaca? 22:15
22:16 llfourn joined
jdv79 [Coke]: sup with your node eating the box? 22:16
ZoffixWin jdv79, personal stuff :) Just too stressed to do much. In March, I'll resolve a major part of it, hence the date for when vacation will end :)
(it's not a vacation from my work, hence the double quotes around "vacation") 22:17
jdv79 [Coke]: 36k minutes seems like a lot of cpu time
22:20 llfourn left
timotimo m: say "foo".startswith("f") 22:23
camelia rakudo-moar 86a90b: OUTPUT«Method 'startswith' not found for invocant of class 'Str'␤ in block <unit> at /tmp/FyS_WTMe4_ line 1␤␤»
timotimo wasn't this a thing?
aaah!
kebap
RabidGravy kebabydoodleday 22:25
lizmat m: say "foo".starts-with("f") # kebab indeed 22:26
camelia rakudo-moar 86a90b: OUTPUT«True␤»
jdv79 .tell [Coke] would you mind keepin your node in check? 22:28
yoleaux jdv79: I'll pass your message to [Coke].
22:29 kanishka left 22:31 Ven left 22:33 rindolf left, dfcarpenterak joined 22:35 Atomic_07Gq0 left, roguelazer left
ZoffixWin m: say "ß".starts-with( "ß".uc ) 22:35
camelia rakudo-moar 86a90b: OUTPUT«False␤»
22:36 ruoso left
lizmat m: say "ß" eq "ß".uc 22:37
camelia rakudo-moar 86a90b: OUTPUT«False␤»
lizmat m: say "ß".uc 22:38
camelia rakudo-moar 86a90b: OUTPUT«SS␤»
lizmat ZoffixWin: did you expect something eles ?
ZoffixWin lizmat, at first, when I misread the original example testing for "F" :)
And I thought the test was case-insensitive :P 22:39
AlexDaniel m: say ‘foo’.startswith(‘f’)
camelia rakudo-moar 86a90b: OUTPUT«Method 'startswith' not found for invocant of class 'Str'␤ in block <unit> at /tmp/4xUlKofSB1 line 1␤␤»
AlexDaniel why can't it tell me to use starts-with?
lizmat AlexDaniel: starts-with
ah
AlexDaniel lizmat: yeah but I don't have lizmat in my terminal 22:40
lizmat hehe
AlexDaniel m: say ‘foo’.starts-wizh(‘f’)
camelia rakudo-moar 86a90b: OUTPUT«Method 'starts-wizh' not found for invocant of class 'Str'␤ in block <unit> at /tmp/Xuj94JRz4X line 1␤␤»
lizmat well, one of those things everybody agrees would be a good thing
22:40 roguelazer joined
lizmat but atm we don't create a levenshtein yet in that case 22:40
AlexDaniel so there's levenshtein for methods?
lizmat no, there isn't, and that's the problem 22:41
AlexDaniel is there a report for that?
lizmat not sure
22:42 zakharyas left 22:44 vendethiel left 22:45 rurban joined
ZoffixWin m: say "ȹ".lc.starts-with("ȹ".uc) 22:46
camelia rakudo-moar 86a90b: OUTPUT«True␤»
ZoffixWin :D
Oh: 22:48
m: say "\xFFFFFF".chars
camelia rakudo-moar 86a90b: OUTPUT«1␤»
ZoffixWin m: say "\xFFFFFF"
camelia rakudo-moar 86a90b: OUTPUT«(signal SEGV)»
ZoffixWin m: say "\xFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
camelia rakudo-moar 86a90b: OUTPUT«===SORRY!===␤chr codepoint cannot be negative␤»
hoelzro hoooboy
22:49 musiKk left
hoelzro rakudo bug it! 22:49
ZoffixWin it might already be. Part of my brain says I've seen this before in the channel
22:50 ruoso joined 22:54 dfcarpenterak left, rurban left 22:55 dfcarpenterak joined
geekosaur not that one specifically? but there've been a couple similar ones 22:55
that said, it's probably falling into the same buggy code path as the one reported a couple days ago 22:57
jdv79 Skarsnik: META6.info isn't a thing - github.com/Skarsnik/gptrixie/blob/...META6.info 22:58
its META6.json and/or META.info
Skarsnik oh xD
jdv79 broke my script. by contents looks likes its a META.info. 22:59
22:59 kid51 joined
Skarsnik what did it broke? 22:59
What the diff? x)
jdv79 the hacky metacpan loading script.
META.info is panda/current ecosystem and META6.json is for zef/cpan6 stuff 23:00
best to just rename to META.info for now
Skarsnik wait what? 23:01
I though there was one spec for that
jdv79 or does panda accept META6.info now? idk.
dalek c: 0c95b7e | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Spec (5 files):
get a few more heading levels in line
c: 228f1b0 | (Wenzel P. P. Peppmeyer)++ | doc/Type/IO/Spec/QNX.pod:
fix pod title
jdv79 i'll just skip that dist for now:) i gotta run. 23:02
Skarsnik I will change it tommorow 23:04
23:04 RabidGravy left
Skarsnik too tired x) 23:04
23:06 vendethiel joined 23:07 pyrimidine left
ZoffixWin m: say "\x1FFFF" 23:15
camelia rakudo-moar 86a90b: OUTPUT«\x{1FFFF}␤»
ZoffixWin m: say "\x2000"
camelia rakudo-moar 86a90b: OUTPUT« ␤»
ZoffixWin m: say "\x20000"
camelia rakudo-moar 86a90b: OUTPUT«(signal SEGV)»
23:15 ely-se left
AlexDaniel ZoffixWin: yes it is 23:16
23:16 pyrimidine joined
ZoffixWin cool :) 23:16
AlexDaniel rt.perl.org/Public/Bug/Display.html?id=125817
the title is a bit wrong because originally it was just a LTA
but I've left a comment there that now it segfaults 23:17
dalek c: 3c04f55 | (Wenzel P. P. Peppmeyer)++ | doc/Language/ (3 files):
last few heading levels fixed
23:20
23:27 vendethiel left 23:36 DrPete left
lizmat .tell japhb I am curious how you actually got Date subclassing to work: class A is Date { has $.a }; dd A.new(:2016year,:42a).a gives Any instead of 42 23:41
yoleaux lizmat: I'll pass your message to japhb.
lizmat good night, #perl6! 23:44
23:44 dfcarpenterak left 23:45 Skarsnik left 23:49 vendethiel joined 23:59 edehont joined, lokien_ left