»ö« 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.
timotimo doc is now writing the X:: stuff 00:00
00:04 pyrimidi_ left
cale2 what's the difference between .. and ... 00:06
IOninja cale2: one's a range operator the other's is sequence operator 00:07
m: say eager 10..1
camelia rakudo-moar aac9ef: OUTPUT«()␤»
IOninja m: say eager 10…1
camelia rakudo-moar aac9ef: OUTPUT«(10 9 8 7 6 5 4 3 2 1)␤»
IOninja You can perform operations on a range without reifying all of its elements, but not with a sequence 00:08
m: say 42 ~~ 0..10
camelia rakudo-moar aac9ef: OUTPUT«False␤»
IOninja m: say 42 ~~ 0..50
camelia rakudo-moar aac9ef: OUTPUT«True␤»
IOninja And you can make arbitrary sequences
m: say (1, 1, *+* … *)[^20]; # fibonacci seq
camelia rakudo-moar aac9ef: OUTPUT«(1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765)␤»
IOninja m: say 42 ~~ 0..Inf # better example of not reifying stuff 00:09
camelia rakudo-moar aac9ef: OUTPUT«True␤»
IOninja m: say sum 0..99999999999999999999999999999999999999999999999999999999999999999999999999999999999 # another example of usefulness of Range 00:11
camelia rakudo-moar aac9ef: OUTPUT«4999999999999999999999999999999999999999999999999999999999999999999999999999999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
IOninja m: my @G = 0, {++$ - @G[@G[$++]]} … ∞; say @G[^30] 00:14
camelia rakudo-moar aac9ef: OUTPUT«(0 1 1 2 3 3 4 4 5 6 6 7 8 8 9 9 10 11 11 12 12 13 14 14 15 16 16 17 17 18)␤»
IOninja en.wikipedia.org/wiki/Hofstadter_s...G_sequence
TimToady Making anonymous variables behave like implicit state vars is either one of the best decisions or one of the worst decisions I've ever made, and quite possibly both. 00:19
IOninja :) 00:21
cale2 this rosalind question is tricky
Given: Positive integers n≤40n≤40 and k≤5k≤5. 00:22
Return: The total number of rabbit pairs that will be present after nn months, if we begin with 1 pair and in each generation, every pair of reproduction-age rabbits produces a litter of kk rabbit pairs (instead of only 1 pair).
It's like a modified version of the fib sequence
sample input = 5 3 ............ sample output = 19 00:23
TimToady we're assuming any two rabbits can reproduce here? :)
oh, they always reproduce in pairs, I see... 00:24
cale2 That's the confusing part. It talks about pairs of rabbits as if they're one unit
00:24 llfourn joined
TimToady so they could just be amoebas instead... 00:24
cale2 exactly 00:25
"A key observation is that the number of offspring in any month is equal to the number of rabbits that were alive two months prior" 00:28
timotimo docs are now syncing it seems like
or maybe it's already done
it seems like you have to put in a line for language.html for the tutorial to show up 00:29
docs.perl6.org/language/haskell-to-p6.html - but it can be reached if you know the name
00:29 llfourn left
cale2 m: say (1, 1, (* * 3)+(* * 3) ... *)[5] #given the sample input, it should be something like this 00:30
camelia rakudo-moar aac9ef: OUTPUT«306␤»
cale2 m: say (1, 1, *+* * 3 ... *)[5] 00:32
camelia rakudo-moar aac9ef: OUTPUT«142␤»
cale2 m: say (1, 3, *+* ... *)[5]
camelia rakudo-moar aac9ef: OUTPUT«18␤»
cale2 That's it 00:33
but it should be 19 instead of 18 :S
TEttinger there's plenty of issues with that rabbit simulation, chief among them is that they're going to die of inbreeding-relted diseases for any high enough value of nn
"french bulldog syndrome" 00:34
cale2 m: say (1, 1, 3, *+* ... *)[5]
camelia rakudo-moar aac9ef: OUTPUT«11␤»
cale2 m: say (1, 3, *+* ... *)[5] + 1; # solved :)
camelia rakudo-moar aac9ef: OUTPUT«19␤»
00:36 cdg_ left 00:38 girafe left
timotimo uh oh, need to go to bed soon and i was distracted from writing the weekly … 00:41
00:48 BenGoldberg joined, aborazmeh joined, aborazmeh left, aborazmeh joined
timotimo docs.google.com/document/d/1UbTto1...sp=sharing - please 2 review 00:50
cale2 Will Server and Server::Async become the defacto servers? I'd like to translate some Go Web Dev tutorials into P6 eventually 00:53
timotimo HTTP::Server is more just an interface declaration, really
tony-o: i wonder why HTTP::Server::Threaded wasn't moved under perl6 org? 00:54
00:57 cibs left, newbie1 left 00:58 cibs joined 01:01 pyrimidine joined
cale2 Can you define your own iterators in P6? 01:02
timotimo of course
our current iterators are already defined in perl6 01:03
cale2 so they will respond to ... ?
timotimo huh?
cale2 doesn't ... call the .successor method on your iterator?
timotimo no, it calls .succ on each value
to go through an iterator you want something like for, or map 01:04
well, really what i mean is, you want to wrap a Seq around the iterator
then you can do whatever you like
i'll go ahead and publish the post 01:05
01:05 pyrimidine left
timotimo done and done 01:06
p6weekly.wordpress.com/2017/02/14/...-one-zero/ read up, everybody!
01:09 kyan joined
cale2 timotimo: the reason I ask is because it turns out that the rabbits' age needs to be accounted for 01:12
so they only multiply after they've sat out for their first month of existence lol
01:14 john51_ left, Ben_Goldberg joined 01:15 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg, aborazmeh left 01:16 john51 joined 01:17 silug left, john51 left
Geth doc: 5a14552dd7 | (Brad Gilbert)++ | doc/Language/haskell-to-p6.pod6
POD not Markdown
01:20
01:21 john51 joined, BenGoldberg_ joined, BenGoldberg left, BenGoldberg_ is now known as BenGoldberg, BenGoldberg is now known as Ben_Goldberg, Ben_Goldberg is now known as BenGoldberg 01:22 john51 left 01:25 llfourn joined 01:26 john51 joined, pyrimidine joined 01:27 john51 left 01:30 llfourn left
cale2 glot.io/snippets/en3ytrg8zy 01:30
01:31 john51 joined, pyrimidine left 01:32 silug joined, john51 left
cale2 I"m getting "Cannot assign to a readonly variable or a value" over and over 01:33
masak probably don't want `.=` on that `.push` 01:34
cale2 glot.io/snippets/en3ytrg8zy
updated
masak .push is already mutating
cale2 it's thinking that the array is read only :S
timotimo right, you want <-> $age instead of -> $age
cale2 huh? 01:35
masak `for $pairs-produced` will only ever loop once, over that Int
timotimo that, too
cale2 That's fine, there's only one item
timotimo hi masak :)
cale2 so it should only loop once
masak ahoj timotimo
01:36 john51 joined
timotimo so it doesn't matter what you give for $pairs-produced? 01:36
even though it's a required parameter?
masak cale2: then you can remove the for loop
cale2 It starts with one item in the array, then adds items as it goes on
BenGoldberg m: say Phi; 01:38
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ Phi used at line 1␤␤»
timotimo anyway, putting @*ARGS = <--months=5 --pairs-produced=3>; at the beginning and turning the -> into <-> makes it run
m: say phi
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ phi used at line 1␤␤»
timotimo time for me to sleep! o/
masak cale2: that innermost for loop will only ever loop once, though 01:39
here, let me demonstrate
m: my $number = 42; for $number { say "OH HAI" }
camelia rakudo-moar aac9ef: OUTPUT«OH HAI␤»
BenGoldberg m: constant Φ = 5 ** .5 * .5 + .5; say Φ;
camelia rakudo-moar aac9ef: OUTPUT«1.61803398874989␤»
cale2 ohhhh, I'm incrementing age... So I need to make it read-write. That error message was bad. It gave me a totally wrong line number 01:40
masak BenGoldberg: shouldn't it be lower-case φ?
BenGoldberg m: constant Φ = 5 ** .5 * .5 + .5; say Φ; constant ϕ = Φ - 1; say ϕ;
camelia rakudo-moar aac9ef: OUTPUT«1.61803398874989␤0.618033988749895␤»
cale2 oh nevermind, i didn't read the lines correctly :D
masak: except it is an array of numbers 01:41
here it is fixed: glot.io/snippets/en3ytrg8zy
masak cale2: `Int :$pairs-produced!` is not an array of numbers, it's an Int 01:42
you're looping over *one* Int
cale2 what code are you looking at?
masak eventually I will be able to convince you of this -- can't we skip to where I already did? :)
cale2: I'm looking at the latest URL you pasted
I think you are sending the same URL over and over 01:43
don't know if you want that
Xliff for (^$pairs-produced) { @rabbit-ages.push: 1 }
masak better
cale2 Xliff: ah, that loop!
masak parens unnecessary :)
01:43 petercom1and is now known as petercommand
Xliff masak: :P 01:43
Allow me my syntactic idiosyncracies 01:44
masak wouldn't dream of doing otherwise :)
Xliff Because ^3.pick doesn't work without the parens.
masak put in double parens for all I care :P
Xliff (((((masak))))).roll
masak rolls
masak rolls with it
BenGoldberg m: (((((enum masak))))).roll.say 01:45
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤ enum used at line 1␤ masak used at line 1␤␤»
BenGoldberg m: (((((enum <masak>))))).roll.say
camelia rakudo-moar aac9ef: OUTPUT«masak => 0␤»
Xliff m: (((((enum <masak BenGoldberg Xliff>))))).roll.say
camelia rakudo-moar aac9ef: OUTPUT«BenGoldberg => 1␤»
Xliff m: (((((enum <masak BenGoldberg Xliff>))))).roll.say
camelia rakudo-moar aac9ef: OUTPUT«BenGoldberg => 1␤»
Xliff m: (((((enum <masak BenGoldberg Xliff>))))).pick.say
camelia rakudo-moar aac9ef: OUTPUT«Xliff => 2␤»
AlexDaniel m: say ^50 .pick 01:46
camelia rakudo-moar aac9ef: OUTPUT«5␤»
AlexDaniel Xliff: oh really?
BenGoldberg m: [<3d6>].roll.say
camelia rakudo-moar aac9ef: OUTPUT«3d6␤»
Xliff Huh!
m: ^50.pick
camelia rakudo-moar aac9ef: OUTPUT«Potential difficulties:␤ Precedence of ^ is looser than method call; please parenthesize␤ at <tmp>:1␤ ------> 3^507⏏5.pick␤WARNINGS for <tmp>:␤Useless use of "^" in expression "^50.pick" in sink context (line 1)␤»
Xliff m: ^50 .pick
camelia ( no output )
Xliff m: ^50 .pick.say
camelia rakudo-moar aac9ef: OUTPUT«33␤»
Xliff That space should have no effect 01:47
But it does.... aaaaieee!
BenGoldberg rakudobug?
Xliff Yeah. That's an LTA
AlexDaniel I don't think it is a bug
Xliff *shrug* 01:48
I prefer parens there than a space.
AlexDaniel I don't know the reasoning though
Xliff Of course, my preference means little.
masak the space having an effect is a relatively new thing 01:49
used to be a TTIAR
AlexDaniel Xliff: I don't think so. You can use parens in your code as much as you want, this means a lot :)
BenGoldberg m: sub infix:<d>(Int $dice, Int $sides is copy) { $sides = 1..$sides; [+] $sides.pick }; say 3 d 6 for 1..10; 01:50
camelia rakudo-moar aac9ef: OUTPUT«Type check failed in assignment to $sides; expected Int but got Range (1..6)␤ in sub infix:<d> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: sub infix:<d>(Int $dice, $sides is copy) { $sides = 1..$sides; [+] $sides.pick }; say 3 d 6 for 1..10;
camelia rakudo-moar aac9ef: OUTPUT«5␤6␤1␤5␤6␤3␤2␤6␤5␤2␤»
BenGoldberg m: sub infix:<d>(Int $dice, $sides is copy) { $sides = 1..$sides; [+] $sides.pick xx $dice }; say 3 d 6 for 1..10;
camelia rakudo-moar aac9ef: OUTPUT«8␤8␤7␤9␤11␤8␤14␤11␤10␤15␤»
AlexDaniel masak: wasn't it like this right from the start? I mean, when infix . was introduced
c: all ^50 .pick.say 01:51
masak AlexDaniel: there's no `infix:<.>`
AlexDaniel: you might be thinking of `infix:<.=>`
committable6 AlexDaniel, gist.github.com/e101be26628e09d4cb...2d20a6745d
AlexDaniel m: ^50 . pick . say
camelia rakudo-moar aac9ef: OUTPUT«36␤»
AlexDaniel well, it *looks* like an infix, but whatever 01:52
masak maybe I'm wrong. maybe that's how the new feature works :)
in which case you're absolutely right
BenGoldberg Prior to 2015.10, it produced a 'two terms in a row' type error.
01:52 itaipu joined
AlexDaniel bisect: 50 . say 01:52
masak but in that case, "when infix . was introduced" was fairly recently
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: 50
masak 2015.10 sounds about right
AlexDaniel bisect: ^0 . pick . say
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: Nil
BenGoldberg m: ^0 . pick . say; 01:53
camelia rakudo-moar aac9ef: OUTPUT«Nil␤»
AlexDaniel bisect: ^1 .pick.say
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: 0
01:53 derrick joined
AlexDaniel ahhh right 01:53
wtf am I doing
bisect: old=2015.09 50 . say
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.09 new=aac9efc). Old exit code: 1
AlexDaniel here
bisectable6 AlexDaniel, bisect log: gist.github.com/0ae6e9a3fbfa7e377e...003b551b29
AlexDaniel, (2015-09-26) github.com/rakudo/rakudo/commit/cb...ceec2c74de
AlexDaniel masak: see! It says infix:<.> right there :) 01:54
derrick hello
AlexDaniel derrick: hello :) 01:55
c: cb25b2f47 ^50 .pick.say
committable6 AlexDaniel, ¦«cb25b2f»: 18
AlexDaniel masak: and yes, it worked like this right from the start (the start being the introduction of infix:<.>)
cale2 I'm trying to get the output to mirror this pic lol 01:56
cdn-images-1.medium.com/max/600/1*...zyrDsQ.png
AlexDaniel cale2: perhaps consider generated some input for graphviz?
u: bunny
unicodable6 AlexDaniel, U+1F46F WOMAN WITH BUNNY EARS [So] (👯)
AlexDaniel u: rabbit
unicodable6 AlexDaniel, U+1F407 RABBIT [So] (🐇)
AlexDaniel, U+1F430 RABBIT FACE [So] (🐰)
cale2 how do I use those unicode symbols in my code? 01:57
m: say "U+1F430"
camelia rakudo-moar aac9ef: OUTPUT«U+1F430␤»
masak AlexDaniel: I sit corrected. :)
cale2 m: say U+1F430
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say U+17⏏5F430␤»
BenGoldberg m: "\u[1F430]".say 01:58
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\u'␤at <tmp>:1␤------> 3"\7⏏5u[1F430]".say␤ expecting any of:␤ double quotes␤ term␤»
AlexDaniel say “\x[1F430]”
m: say “\x[1F430]”
camelia rakudo-moar aac9ef: OUTPUT«🐰␤»
AlexDaniel m: say “\c[RABBIT]”
camelia rakudo-moar aac9ef: OUTPUT«🐇␤»
BenGoldberg m: "\c[PILE OF POO]".say
camelia rakudo-moar aac9ef: OUTPUT«💩␤»
AlexDaniel
.oO( … everyone's favorite )
01:59
BenGoldberg This would be more fun if hexchat suppored colored unicode.
masak AlexDaniel: that commit message also pegs TimToady as not a big proponent of infix:<.> and fluent programming...
AlexDaniel masak: I also recall TimToady regretting it a little bit 02:00
masak I can't recall using infix:<.> once since it was introduced
AlexDaniel I'm using it all the time 02:01
masak I've only seen it used here on channel by enthusiastic youngsters
masak .oO( "get off my lawn" indeed )
AlexDaniel ఠ_ఠ
masak I keep putting in those backspaces at the end of lines, too
the unspace markers, I mean
cale2 what does infix<.> do? 02:02
masak and I keep using parentheses to indicate precedence, as honest hard-working citizens do
AlexDaniel m: 42.say
camelia rakudo-moar aac9ef: OUTPUT«42␤»
AlexDaniel m: 42 . say
camelia rakudo-moar aac9ef: OUTPUT«42␤»
AlexDaniel cale2: it allows you to put spaces around the dot
cale2 that confuses it with function composition, no?
AlexDaniel You mean ∘? 02:03
masak nothing to do with function composition 02:04
the `.` here still means public attribute/method call
AlexDaniel masak: but there is a line, right? You don't write 25 + (5 × 2) do you? 02:05
masak AlexDaniel: no, I write `25 + 5 * 2` :) 02:06
AlexDaniel masak: then I'm not sure what you've meant with your message about parens to indicate precedence 02:07
by the way: 02:08
m: 42 . WHAT
camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
masak that could be seen as a bug, I think 02:09
it's because .WHAT is "special"
AlexDaniel yea, WAT
but there is a ticket for this
02:09 derrick left
masak AlexDaniel: re precedence, I mean that given the choice between whitespace to indicate precedence and parentheses to indicate precedence, I greatly prefer the latter. 02:10
it doesn't mean I enjoy putting in unnecessary parentheses in my arithmetic expressions.
AlexDaniel RT #126855
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=126855
02:12 itcharlie joined
SmokeMachine Where can I read the implementation of infix:<.>? 02:14
geekosaur s: &infix<.> 02:16
SourceBaby geekosaur, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ infix used at line 6. Did you mean 'indir', 'index'?␤␤
geekosaur s: &infix:<.>
SourceBaby geekosaur, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .⏏<EOL>␤
geekosaur sourcebot is never easy to figure out :/
masak s: infix:<.>
SourceBaby masak, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .⏏<EOL>␤
masak something's wrong indeed :/ 02:18
SmokeMachine Github search ignores :<.> 02:19
02:22 labster left, cdg joined 02:27 llfourn joined
SmokeMachine s: infix:<+> 02:29
SourceBaby SmokeMachine, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Int); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
cale2 Why does it say there's no method "age" for the grep glot.io/snippets/en3ytrg8zy
SmokeMachine s: &infix:<+>
SourceBaby SmokeMachine, Sauce is at github.com/rakudo/rakudo/blob/aac9...ic.pm#L186
cale2 it should have a read method for the objects
SmokeMachine s: &infix:<.> 02:30
SourceBaby SmokeMachine, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .⏏<EOL>␤
AlexDaniel mch: my $x = ‘.’; say infix:[$x] 02:31
committable6 AlexDaniel, gist.github.com/26556ae24804344529...b21d3bc460
TEttinger uhhh what happened to the colors?
BenGoldberg s: &infix:<+>
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/aac9...ic.pm#L186
02:32 llfourn left
AlexDaniel TEttinger: colors never worked with SourceBaby 02:32
TEttinger oh ok
SmokeMachine AlexDaniel: thanks!
BenGoldberg I'm guessing that SourceBaby isn't configured to use irc colors, and uses xterm colors instead.
AlexDaniel SmokeMachine: sorry… for what?
BenGoldberg Err, ansi colors
AlexDaniel BenGoldberg: it just dumps whatever it recieves, so yes 02:33
SmokeMachine Oh! No source... :(
AlexDaniel the easiest way to fix it is to use RAKUDO_ERROR_COLOR
s: %*ENV<RAKUDO_ERROR_COLOR> = 0; &infix:<.> 02:34
SourceBaby AlexDaniel, Ehhh... I'm too scared to run that code.
AlexDaniel :P
SmokeMachine AlexDaniel: sorry.. I got confused... I thought that was the source of &infix:<.>
AlexDaniel SmokeMachine: well, the source is right here: 02:35
bisect: old=2015.09 50 . say
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.09 new=aac9efc). Old exit code: 1
AlexDaniel, bisect log: gist.github.com/aae6c4dd45600bc63a...0115642a43
AlexDaniel, (2015-09-26) github.com/rakudo/rakudo/commit/cb...ceec2c74de
02:35 ufobat left
SmokeMachine AlexDaniel: thanks! 02:35
AlexDaniel not only the source, it is the whole commit :)
.oO( and a better way to fix SourceBaby is to make it use Whateverable :P )
02:36
BenGoldberg s: ((%*ENV<RAKUDO_ERROR_COLOR> = 0),&infix:<.>)[1]
SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .⏏<EOL>␤
BenGoldberg s: ((BEGIN %*ENV<RAKUDO_ERROR_COLOR> = 0),&infix:<+>)[1] 02:37
SourceBaby BenGoldberg, Sauce is at github.com/rakudo/rakudo/blob/aac9...ic.pm#L186
BenGoldberg s: ((BEGIN %*ENV<RAKUDO_ERROR_COLOR> = 0),&infix:<.>)[1]
SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .<HERE><EOL>␤
AlexDaniel \o/
SourceBaby: source
SourceBaby AlexDaniel, See: github.com/zoffixznet/perl6-sourceable
02:39 cdg left
AlexDaniel github.com/zoffixznet/perl6-sourceable/pull/5 02:40
color…s
BenGoldberg color xx 0 02:42
cale2 I should just make a stack overflow account for my P6 questions lol 02:43
m: say (1,2,3,4,5).grep( $_ > 5); 02:45
camelia rakudo-moar aac9ef: OUTPUT«Use of uninitialized value of type Any in numeric context␤ in block <unit> at <tmp> line 1␤Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at <tmp> line 1␤␤»
AlexDaniel m: say (1,2,3,4,5).grep(* > 5);
camelia rakudo-moar aac9ef: OUTPUT«()␤»
cale2 how do you get around that?
AlexDaniel or
m: say (1,2,3,4,5).grep({$_ > 5});
camelia rakudo-moar aac9ef: OUTPUT«()␤»
02:46 ilbot3 left
AlexDaniel cale2: so you have to pass a code block. Or WhateverCode 02:46
cale2 AlexDaniel: Because * defaults to Mu instead of Any? or what is going on? 02:47
02:47 Actualeyes left, ilbot3 joined, ChanServ sets mode: +v ilbot3 02:48 adu joined
cale2 m: say (1,2,3,4,5).grep( say $_.WHAT; $_ > 5); 02:48
camelia rakudo-moar aac9ef: OUTPUT«(Any)␤Use of uninitialized value of type Any in numeric context␤ in block <unit> at <tmp> line 1␤Cannot resolve caller grep(List: List, List); none of these signatures match:␤ ($: Bool:D $t, *%_)␤ ($: Mu $t, *%_)␤ in block <unit> at <tm…»
cale2 m: say (1,2,3,4,5).grep( say $_.WHAT);
camelia rakudo-moar aac9ef: OUTPUT«(Any)␤Cannot use Bool as Matcher with '.grep'. Did you mean to use $_ inside a block?␤ in block <unit> at <tmp> line 1␤␤»
geekosaur grep takes a block. you can create one explicitly with braces in which case it will be run with $_ locally set to the item being checked. if you use code with * in it, it gets turned into a closure block (this is WhateverCode) 02:50
02:50 Actualeyes joined
geekosaur m: say (* + 5).WHAT 02:50
camelia rakudo-moar aac9ef: OUTPUT«(WhateverCode)␤»
02:51 pyrimidine joined
AlexDaniel m: say {$_ + 5}.WHAT 02:51
camelia rakudo-moar aac9ef: OUTPUT«(Block)␤»
02:54 pyrimidi_ joined, pyrimidine left 02:57 fil512 joined
fil512 Hi I have a grammar parsing problem 02:57
cale2 Is there an idiomatic way to pop an item from one array and push it onto another?
hi fil512
fil512 hi cale 02:58
i want to create a rule like:
token TOP { ^ [ <comment> | <chunk> ]* $ }
where comment is '\\' \N*
I want <chunk> to be everything else 02:59
almost like a !<comment>
but I can't figure out how to write that
02:59 pyrimidi_ left 03:00 labster joined
AlexDaniel cale2: @a.push(@b.pop) ? 03:01
fil512 it's almost like I want to do a split on <comment> and then group up the matches and the in-between non-matches 03:02
I could just use split, but eventually I am going to be parsing stuff inside the chunks
would like to use the grammar construct if i can
03:03 itaipu left
fil512 if i put .+ in <chunk> it just gobbles up everything 03:06
03:06 leah2 joined
AlexDaniel fil512: well, you can use something like: chunk { <!comment>+ } 03:07
but if I were you I'd try to rethink what exactly I am trying to achieve :)
cale2 AlexDaniel: for @nursery -> $pair { $pair.grow-up; if $pair.of-age { @nursery.pop: $pair; @playpen.push: $pair; } }
moving from the nursery to the playpen ;) 03:08
I guess I'd need the index maybe...
fil512 <!comment>+ hangs
got into an infinite loop
anyways that won't really work because I'm going to want to parse out stuff in the <chunk> later on anyway
cale2 fil512: May be better to make a stack overflow post that clearly outlines what you expect to happen and what happens 03:09
03:09 mr_ron left
AlexDaniel fil512: if you gist your example we can figure out why it hangs :) 03:09
cale2 I'm not an expert in grammars
fil512 it just feels like this has got to be a common parsing thing people need to do
parse gunk out, and then also keep all the non-gunk for parsing later
it's a lot like "split"
AlexDaniel keep all the non-gunk for parsing later? Like multi-pass parsing? :S 03:10
fil512: ah, right 03:11
fil512: it's probably { <!comment>+ . }
oops
fil512: it's probably { [<!comment> .]+ }
cale2: what's @nursery.pop: $pair; ? 03:13
how come you pass an argument to pop?
and you're also iterating it… you don't want .pop at all
cale2: you can try something crazy like @playpen.append: gather @nursery .= grep { $pair.grow-up; take $pair if $pair.of-age; not $pair.of-age } 03:16
03:17 movl joined
cale2 AlexDaniel: glot.io/snippets/en41uv8b4w 03:20
if gather/take _removes_ the item from the list, that may work 03:21
03:21 xtreak joined
AlexDaniel cale2: it's grep that does it 03:21
ah wait! 03:22
categorize?
m: say categorize { $_ %% 2 }, (1, 7, 6, 3, 2);
camelia rakudo-moar aac9ef: OUTPUT«{False => [1 7 3], True => [6 2]}␤»
AlexDaniel cale2: in your case it would be @nursery.categorize: { $pair.of-age } 03:23
m: say categorize { $_ %% 2 ?? ‘alive’ !! ‘dead’ }, (1, 7, 6, 3, 2); 03:24
camelia rakudo-moar aac9ef: OUTPUT«{alive => [6 2], dead => [1 7 3]}␤»
cale2 AlexDaniel: I would only need one array in that case. the issue with that one array is that, every time rabbits had babies, they'd get appended to the current array that was looping. Then the babies would age too quickly
AlexDaniel so what do you need exactly…
if you want to take something and throw away the rest, then use grep
if you want to end up with two piles of something, then use categorize 03:25
(or even .classify)
03:28 llfourn joined
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff; 03:30
camelia rakudo-moar aac9ef: OUTPUT«{False => [1 7], True => [6 2]}␤»
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.categorize: { $_ %% 2 };
camelia rakudo-moar aac9ef: OUTPUT«Cannot resolve caller Real(Pair: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
03:30 retupmoca joined
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.categorize({ $_ %% 2 }); 03:31
camelia rakudo-moar aac9ef: OUTPUT«Cannot resolve caller Real(Pair: ); none of these signatures match:␤ (Mu:U \v: *%_)␤ in block <unit> at <tmp> line 1␤␤»
03:33 llfourn left
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.values.join.categorize({ $_ %% 2 }); 03:34
camelia rakudo-moar aac9ef: OUTPUT«Cannot convert string to number: trailing characters after number in '036⏏5 21 7' (indicated by ⏏)␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.values.categorize({ $_ %% 2 });
camelia rakudo-moar aac9ef: OUTPUT«{True => [[6 2] [1 7]]}␤»
BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>;
camelia rakudo-moar aac9ef: OUTPUT«[6 2]␤»
cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.values.flatten.categorize({ $_ %% 2 }); 03:35
camelia rakudo-moar aac9ef: OUTPUT«No such method 'flatten' for invocant of type 'Seq'␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>.categorize: { $_ %% 2 };
camelia rakudo-moar aac9ef: OUTPUT«{True => [6 2]}␤»
BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>.categorize: { $_ % 3 };
camelia rakudo-moar aac9ef: OUTPUT«{0 => [6], 2 => [2]}␤»
cale2 I need to join together the categories and re-do it 03:36
03:37 noganex joined
cale2 How do you round-trip from categories, back to a list, back to categories 03:37
AlexDaniel whyyy
I mean, why categorize when you want to throw it all back 03:38
cale2 AlexDaniel: because the rabbits grow up. things change
03:40 noganex_ left
cale2 ohhhh, I'll just keep an array and then a separate categorized thing 03:40
two different structures
AlexDaniel I've just realized that I've been living without any sort of recycle bin on my PC for more than 3 years 03:44
just don't delete stuff you don't want to delete, right? :)
cale2 m: my @list = (1,3,1,3,1); my %stuff = categorize { $_ > 2 }, @list; %stuff<True>.map: { * + 2 }; say @list; 03:50
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed double closure; WhateverCode is already a closure without curlies, so either remove the curlies or use valid parameter syntax instead of *␤at <tmp>:1␤------> 3 2 }, @list; %stuff<True>.map: { …»
cale2 m: my @list = (1,3,1,3,1); my %stuff = categorize { $_ > 2 }, @list; %stuff<True>.map: { $_ + 2 }; say @list;
camelia rakudo-moar aac9ef: OUTPUT«[1 3 1 3 1]␤»
cale2 I need categorize to keep object references
03:57 pyrimidine joined
cale2 going back to nursery and playpen setup 03:59
m: for (1,2,3,4,5).pairs -> $i, $num { say $i ~ $num }
camelia rakudo-moar aac9ef: OUTPUT«0 11 2␤2 33 4␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
cale2 what's with that error? 04:00
04:02 pyrimidine left
[Coke] yawns. 04:04
cale2 [Coke]: why didn't 5 get printed in my example above? 04:05
[Coke] you have 5 items and two params. 04:06
m: for (1,2,3,4,5).pairs -> $i, $num? { say $i ~ $num }
camelia rakudo-moar aac9ef: OUTPUT«0 11 2␤2 33 4␤Use of uninitialized value <element> of type Mu in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block at <tmp> line 1␤4 5␤»
cale2 .pairs grabs the index and the item
[Coke] m: for (1,2,3,4,5).pairs -> $i, $num? { say $i ~ $num // 'empty' }
camelia rakudo-moar aac9ef: OUTPUT«0 11 2␤2 33 4␤Use of uninitialized value <element> of type Mu in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤ in block at <tmp> line 1␤4 5␤»
[Coke] m: for (1,2,3,4,5).pairs -> $i, $num? { say $i ~ (defined $num ?? $num !! "empty")} 04:07
camelia rakudo-moar aac9ef: OUTPUT«0 1True␤2 3True␤4 5True␤»
[Coke] I am missing something in the def check, but the ? on the parameter is the key bit - makes $num optional.
otherwise it's required, and on the last iteration you wouldn't have had one, so it can't go
cale2 Oh, I think what I want is .kv 04:08
But the docs say that .kv gives an interleaved list. Which is misleading, because it actually will give you pairs if you want it to
[Coke] er.. 04:09
right. 5 interleaved pairs.
cale2 m: say (1,2,3,4,5).kv; for (1,2,3,4,5).kv -> $index, $item { say $index ~ $item }
camelia rakudo-moar aac9ef: OUTPUT«(0 1 1 2 2 3 3 4 4 5)␤01␤12␤23␤34␤45␤»
cale2 the first is just a plain list
m: say (1,2,3,4,5).kv.WHAT; for (1,2,3,4,5).kv -> $index, $item { say $index ~ $item } 04:10
camelia rakudo-moar aac9ef: OUTPUT«(Seq)␤01␤12␤23␤34␤45␤»
cale2 a Seq :)
[Coke] m: for (1,2,3,4,5).pairs.kv > $i, $num { say $i ~ $num}
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$i' is not declared␤at <tmp>:1␤------> 3for (1,2,3,4,5).pairs.kv > 7⏏5$i, $num { say $i ~ $num}␤»
[Coke] m: for (1,2,3,4,5).pairs.kv -> $i, $num { say $i ~ $num}
camelia rakudo-moar aac9ef: OUTPUT«00 1␤11 2␤22 3␤33 4␤44 5␤»
[Coke] ^^ there you go
not that $num is a $pair, there.
*note
so, first, get the interleaved pairs, then get the kv combo of the array of pairs, then pass the key and the value into the parameters (which now match so don't ahve to be optional) 04:11
cale2 I think the docs should say that even though .kv gives you a Seq, you can still iterate using each index and item as if it gave you a list of pairs
04:12 zakharyas joined
b2gills fil512: you could try token TOP { ^ [ <comment> || <chunk> ]* $ }; token comment { '\\' \N* <eol> }; token chunk { \N* <eol> }; token eol { \n | $ } 04:22
04:30 llfourn joined 04:33 Cabanoss- joined
ugexe m: my %h = a => 1, b => 2, c => 3; .say for %h.pairs; # its implied multiple ways 04:33
camelia rakudo-moar aac9ef: OUTPUT«a => 1␤c => 3␤b => 2␤»
04:35 llfourn left, BenGoldberg left 04:36 Cabanossi left, Cabanoss- is now known as Cabanossi 04:39 BenGoldberg joined, BenGoldberg left 04:48 AlexDaniel left
cale2 If I see one more "No such method for type Any" when looping over an array of objects, I'm going to lose it 04:49
That is the most infuriating error
04:49 Tonik joined 04:50 pyrimidine joined 04:53 BenGoldberg joined 04:54 pyrimidine left 04:55 pyrimidine joined 04:56 Tonik left, aborazmeh joined, aborazmeh left, aborazmeh joined
samcv ok i'm rewriting my grant proposal in pod since i guess the ian hague grant and general grants have different formats 04:57
04:57 adu left
samcv anybody know since the ian hague grant wanted hours and dollars per month, but the general grant template just says to "put how much you think the project is worth" 04:58
so they don't want by hour? i'm uncertain
05:00 pyrimidine left 05:06 labster left 05:13 pyrimidine joined 05:17 wamba joined 05:21 pyrimidine left 05:23 khw left 05:25 retupmoca left 05:26 labster joined 05:30 itcharlie left 05:31 BenGoldberg left, llfourn joined 05:32 ssotka left 05:33 CIAvash joined 05:36 llfourn left 05:47 cibs left, cale2 left 05:49 cibs joined 05:53 aborazmeh left 05:55 curan joined, Beginner_Guy joined 05:59 eroux left 06:06 aborazmeh joined, aborazmeh left, aborazmeh joined 06:20 aborazmeh left
tony-o timotimo: i hadn't maintained threaded - it was meant to get us by until Async stuff was more stable, and that's a reality now :-). I'm more than happy to move it in if desired 06:32
06:33 llfourn joined 06:35 ssotka joined, wamba left 06:38 llfourn left 06:39 repl joined, seatek left 06:48 RabidGravy joined 06:52 xtreak left 06:55 xtreak joined 06:57 darutoko joined 06:59 pyrimidine joined 07:00 bjz joined, cyphase left, aborazmeh joined, aborazmeh left, aborazmeh joined 07:05 pyrimidine left, cyphase joined 07:08 wamba joined 07:12 agentzh left 07:25 skids left 07:34 llfourn joined 07:39 llfourn left 07:42 parv joined 07:45 aborazmeh left 07:47 ufobat joined 07:50 ssotka left 07:53 AlexDaniel joined 07:57 g4 joined 08:01 ufobat left 08:23 repl left 08:25 repl joined 08:27 repl left 08:31 abraxxa joined 08:35 llfourn joined 08:36 agentzh joined 08:38 xtreak left 08:39 dakkar joined, wamba left 08:40 agentzh left, llfourn left, xtreak joined 08:41 robertle left 08:43 ccntrq left 08:46 xtreak left, koki1 left, xtreak joined 08:47 ccntrq joined 08:49 bjz left 08:50 bjz joined 08:54 xtreak left 09:03 pyrimidine joined 09:04 jonas1 joined 09:08 pyrimidine left 09:16 zakharyas left, zakharyas joined 09:17 bjz_ joined 09:19 bjz left 09:20 wamba joined 09:21 zakharyas left 09:22 AlexDaniel left 09:23 espadrine joined 09:26 xtreak joined
timotimo tony-o: well, that would just be consistent :P 09:28
09:32 espadrine left
timotimo Xliff: did you know about "^3 .pick", though? :) 09:34
Xliff: never mind, someone else already pointed it out 09:35
09:37 llfourn joined 09:41 koki1 joined 09:42 llfourn left
timotimo .tell cale2 i think you were still confused about the kv thing. .kv gives you a flat list, -> $index, $num takes two items from the list on each iteration. .pairs gives you a flat list of Pair objects, and if you -> $a, $b, it'll take two of these pairs on each iteration. you seem to think that -> $a, $b does unpacking. it does not. -> ($a, $b) does unpacking. 09:43
yoleaux timotimo: I'll pass your message to cale2.
09:51 mrdside joined 09:56 wamba left
mrdside hi. can i put in grammar something like "(\n|EOF)" (new line or end of file)? 09:57
moritz EOF is $
though if you match a $$ (logical end-of-line), that also matches at end-of-file
m: say so "ab\n" ~~ /\n$$/ 09:58
camelia rakudo-moar aac9ef: OUTPUT«False␤»
09:58 kyan left
moritz m: say so "ab\n" ~~ /$$/ 09:58
camelia rakudo-moar aac9ef: OUTPUT«True␤»
moritz m: say so "ab\n" ~~ /$$\n?/
camelia rakudo-moar aac9ef: OUTPUT«True␤»
moritz m: say so "ab\n" ~~ /$$\n/
camelia rakudo-moar aac9ef: OUTPUT«True␤»
moritz m: say so "ab\n" ~~ /$$\n?/
camelia rakudo-moar aac9ef: OUTPUT«True␤»
mrdside moritz: \O/
moritz m: say so "ab" ~~ /$$\n?/
camelia rakudo-moar aac9ef: OUTPUT«True␤»
mrdside moritz: thx
moritz mrdside: / $$ \n? / should be what you want
mrdside moritz: for me "СТАЖ.+?(\n|$)" works perfect 09:59
moritz: grammars solved my problem 10:00
moritz \o/
mrdside: did the fix with regex instead of token help?
mrdside moritz: can i use in "method" for grammars any routines? 10:01
moritz: i need convert string to number 10:02
moritz use +$thestring
inside a code block
mrdside moritz: can i `made` immutable list or array?
moritz: $/.split('=')[0]+thestring 10:03
moritz m: $_ = 'abc1234'; m/(\d+) { make 2 * +$0 }/ and say $/.made
camelia rakudo-moar aac9ef: OUTPUT«2468␤»
moritz mrdside: sure
mrdside moritz: how? nothing about this in tutorial 10:04
10:04 pyrimidine joined
moritz mrdside: you can pass any data structure to make 10:05
make (1, 2, 3, 'my mom')
mrdside moritz: ok, this is cast, but i have string in format "\d+\,\d{2}"
moritz mrdside: substitute , by . and then use prefix + 10:06
or $first_number + $second_number / 100
mrdside moritz: $/.split('=')[0].subst(',','.')
10:10 pyrimidine left 10:12 TEttinger left
mrdside moritz: last question. i need to make an array in `.map: *.made` 10:14
moritz mrdside: have you tried .map(*.made).Array ? 10:15
mrdside moritz: no, maybe it's there some more complex tutorial about grammars? i'm absolutely newby in perl. 10:16
10:17 pyrimidine joined, holyghost joined 10:20 mrdside left 10:22 pyrimidine left
moritz EGONE 10:29
10:38 Actualeyes left 10:39 llfourn joined 10:40 labster left 10:44 llfourn left 10:46 bjz joined 10:47 bjz_ left
DrForr Egon? Where? 10:54
10:57 xtreak left
moritz dust in the wind 10:57
10:58 espadrine joined 10:59 holyghost left 11:00 Ven joined 11:02 parv left 11:03 nowan_ joined 11:04 lukaramu joined 11:05 nhywyll joined 11:07 agentzh joined 11:10 holyghost joined 11:11 DarthGandalf left, agentzh left
IOninja samcv: I put the total sum and not hours in my proposal. 11:14
11:15 DarthGandalf joined, movl left 11:17 wamba joined, pyrimidine joined 11:19 xtreak joined, xtreak left 11:22 rindolf joined 11:24 pyrimidine left 11:31 tomaw left, tomaw joined 11:40 llfourn joined 11:41 zakharyas joined
arnsholt Bah. Going back to Perl 5 and remembering to put parens around conditions and the like is hard >.< 11:43
DrForr It gets easier, took me a few months to make the switch seamless. 11:44
11:45 llfourn left
masak I find it effortless nowadays 11:45
Perl 6 is the odd one out there, actually. well, it and Python
IOninja erm.. 11:50
And Go... and Rust...
El_Che and ruby
11:52 curan left, bjz_ joined 11:53 kurahaupo joined, kent\n left, bjz left 11:54 kent\n joined 11:58 telex left 11:59 nhywyll left 12:00 telex joined 12:02 zakharyas left 12:05 zakharyas joined, koki1 left, koki1 joined
arnsholt masak: I don't program in either frequently enough to be able to switch subconciously, unfortunately 12:08
And Smalltalk is no help at all =)
12:09 parv joined, ChoHag left 12:14 gregf_ joined
masak Smalltalk a lot lately? 12:17
DrForr Only at parties. 12:18
arnsholt =D
masak: $dayjob.primary-system is implemented in Smalltalk, so yeah
Smalltalk and SQL, for the most part
masak cool 12:20
what implementation of Smalltalk are you using?
arnsholt Visual Smalltalk Enterprise
Last updated in 1999 >.<
masak heh 12:21
arnsholt (One of the major pieces of technical debt in the system, incidentally)
12:21 bjz_ left
arnsholt Getting the system over to VAST would probably be a big improvement 12:21
(Or one could dream, and say Pharo...) 12:22
12:22 pyrimidine joined 12:25 ggoebel left 12:27 pyrimidine left 12:28 bjz joined
masak .oO( a VAST improvement -- too obvious a pun? ) 12:31
arnsholt Yeah, I almost put it in, but it was almost too easy =) 12:32
Pharo being far more advanced would be somewhat less obvious, I guess. Maybe =)
masak .oO( Pharo, Pharo, gotta get down on Pharo... pun, pun, pun... ) :P 12:34
DrForr does a few Pharo shuffles. 12:35
12:36 eliasr joined 12:38 ggoebel joined 12:41 llfourn joined 12:45 holyghost left 12:47 llfourn left, bjz left 12:48 parv left 13:02 movl joined 13:08 ocbtec joined 13:12 zakharyas left 13:13 pyrimidine joined 13:18 pyrimidine left, pyrimidine joined 13:20 newcoder joined
newcoder What's special about perl6? Why will people use perl6 instead of perl5? 13:20
Will perl5 be obsolete?
13:20 Ven left 13:23 pyrimidine left 13:25 fil512 left
DrForr You don't have to use it "instead of", you can use both perl 5 and perl 6, they coexist side-by-side. 13:26
And no, Perl 5 isn't going away for a long time. 13:27
newcoder DrForr: 'side by side' how?
DrForr: Either you have to install perl5 or perl6
DrForr No. One is 'perl', one is 'perl6'. 13:28
newcoder You can't write perl6 program with perl/perl5
DrForr Yes, you can, with Inline::Perl6.
And you can use Perl 5 from Perl 6 with Inline::Perl5 (in perl 6.) 13:30
13:31 lukiramu joined 13:32 newcoder left
timotimo well, i'm sure they learned something 13:33
DrForr They're over on freenode #perl since they lost the argument here.
13:34 lukaramu left
timotimo it didnt seem like they were arguing? 13:35
DrForr True, they were more telling us how perl 6 works without having any idea. 13:38
IOninja huh?
13:38 cale2 joined
IOninja Seems a legitimate question to ask when the two languages are named "Perl" and "Perl 6" 13:38
timotimo yeah 13:39
and we told them and all is well
IOninja Saying they're two different languages clarifies any confusion about obsolecense, side-by-sideness, or using one from the other
DrForr Yeah, it is. That's why I said they can coexist happily.
13:40 itcharlie joined, agentzh joined
timotimo it seemed like a "obsoleting perl5 is dumb" - "thats why we dont do that" kind of deal 13:41
i.e. "hey the thing youre not doing is dumb!" 13:42
13:43 llfourn joined
DrForr Closer to "The thing I say you're doing because of the name..." whereas my response was "slow down, that's not happening..." 13:43
cale2 I think "No such method 'of-age' for invocant of type 'Any'" needs to be changed 13:44
yoleaux 09:43Z <timotimo> cale2: i think you were still confused about the kv thing. .kv gives you a flat list, -> $index, $num takes two items from the list on each iteration. .pairs gives you a flat list of Pair objects, and if you -> $a, $b, it'll take two of these pairs on each iteration. you seem to think that -> $a, $b does unpacking. it does not. -> ($a, $b) does unpacking.
cale2 when you loop through an array of objects, and you try to call methods on the objects. It's 100% LTA right now 13:45
13:45 agentzh left
moritz cale2: what do you want the error message to say? 13:45
undefined is not a function? :-) 13:46
cale2 moritz: Perhaps something related to the loop itself. I can't say given that I still don't know what the error is pointing to
There's literally no way to troubleshoot this runtime error given that information
jnthn Does your code call a method .of-age?
cale2 The program was running just fine, then at some point, it throws that. 13:47
Is it because the the array became empty and it tried to call a method on an empty object?
moritz no 13:48
the array contains an Any
13:48 llfourn left
moritz which you could catch earlier if you gave the loop param a type constriant 13:48
*constraint
for @array -> MyType $x { ... }
then it'll tell you that it got an Any but expected a MyType
cale2 Any may as well be a Null 13:49
It's probably because the .kv method is not giving me the index and the object 13:50
it's probably giving me the index and another index or something like that
timotimo m: say <foo bar baz quux>.jv.perl 13:51
camelia rakudo-moar aac9ef: OUTPUT«No such method 'jv' for invocant of type 'List'␤ in block <unit> at <tmp> line 1␤␤»
timotimo grr
m: say <foo bar baz quux>.kv.perl
camelia rakudo-moar aac9ef: OUTPUT«(0, "foo", 1, "bar", 2, "baz", 3, "quux").Seq␤»
timotimo it gives you an index then an obj then an index etc
so you iterate with two vars
cale2 I wish it were true man 13:52
timotimo show your code please
13:53 Vasyl joined
timotimo test 13:55
connection is breaking up...
jnthn cale2: Did you try `say @the-thing-you're-looping-over.kv.perl` or some such?
To see what's actually there?
cale2 glot.io/snippets/en4jdfyvyg
timotimo urgh this ssh app wont let me click the link nor copy the alternative buffer 13:57
cale2 try this link glot.io/snippets/en4jdfyvyg/raw
timotimo k appointment. l8r! 13:58
perlpilot good morning 14:00
cale2: What do you think @nursery[$i]:delete does? 14:02
cale2: That's how you're getting Any in your @nursery btw :)
IOninja DrForr: do people often come to #perl with questions about or related to Perl 6?
DrForr Not often, but it does happen. 14:03
perlpilot and usually they get redirected here.
IOninja cale2: FWIW you can use safecall .? to avoid that error and short-curcuit outta the loop (or don't loop over holes in the first place) 14:04
m: my @a = ^10; @a[5]:delete; .say for @a
camelia rakudo-moar aac9ef: OUTPUT«0␤1␤2␤3␤4␤(Any)␤6␤7␤8␤9␤»
IOninja nm 14:05
cale2 I need to remove the selected item from the array and place that same item in the other array
there's no way to do it other than that...
IOninja Well, there's splice()
wonder how well that place with looping... 14:06
cale2 splice doesn't take a reference to the object, it only copies it
I think...
perlpilot eh? 14:07
IOninja references? wat?
timotimo doesnt it return the stuff it took out?
jnthn Splice works in-place on the array it's called on
IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { @b.append: @a.splice: $k, 1; $v.say }; say @b
camelia rakudo-moar aac9ef: OUTPUT«0␤2␤4␤6␤8␤[0 2 4 6 8]␤»
IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { @b.append: @a.splice: $k, 1 if $k == 5\; $v.say }; say @b 14:08
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3 @b.append: @a.splice: $k, 1 if $k == 5\7⏏5; $v.say }; say @b␤»
IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { @b.append: @a.splice: $k, 1 if $k == 5; $v.say }; say @b
camelia rakudo-moar aac9ef: OUTPUT«0␤1␤2␤3␤4␤5␤7␤8␤9␤[5]␤»
IOninja seems to work well
timotimo m: say <a b c d e f>.splice(3,2,0)
camelia rakudo-moar aac9ef: OUTPUT«No such method 'splice' for invocant of type 'List'␤ in block <unit> at <tmp> line 1␤␤»
cale2 i'll try it now
timotimo ah
IOninja only Arrays
timotimo m: say [<a b c d e f>].splice(3,2,0)
camelia rakudo-moar aac9ef: OUTPUT«[d e]␤»
IOninja and Buf
timotimo returns what it takes out
which you can then append 14:09
m: say [<a b c d e f>].splice(3,1,0).perl
camelia rakudo-moar aac9ef: OUTPUT«["d"]␤»
timotimo one element list if only 1 removed
cale2 it worked! now to fix the broken logic
IOninja \o/
14:09 sjn left
cale2 Adding type annotations to the arrays didn't work though. 14:11
14:11 sjn joined
IOninja Hm, my thing did'nt work right tho. Why does @b have 5 yet the chopped thing was a 6 14:12
14:12 cdg joined
IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { @b.append: @a.splice: $k+1, 1 if $k == 5; $v.say }; say @b 14:12
camelia rakudo-moar aac9ef: OUTPUT«0␤1␤2␤3␤4␤5␤7␤8␤9␤[6]␤»
IOninja ok...
That's weird
timotimo well 14:13
the k and v are set from "for"
those dont change from under your feet
cale2 it's because of this line: @playpen.push: @nursery.splice($i, 1);
I had to flatten it to: @playpen.push: |@nursery.splice($i, 1);
perlpilot cale2: or use append instead of push
14:14 matiaslina joined
IOninja timotimo: right, but the $v.say produces exact same output, even though the code changed to slice the NEXT element instead of the sliced the first time :/ 14:14
cale2 right!
IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { "k: $k".say; @b.append: @a.splice: $k+1, 1 if $k == 5; $v.say }; say @b 14:15
camelia rakudo-moar aac9ef: OUTPUT«k: 0␤0␤k: 1␤1␤k: 2␤2␤k: 3␤3␤k: 4␤4␤k: 5␤5␤k: 6␤7␤k: 7␤8␤k: 8␤9␤[6]␤»
14:15 sammers left
perlpilot iterating over something you're modifying is fraught 14:16
IOninja Yeah, looks like that's the case
cale2 to be honest I'm re-writing it in haskell and the logic is more clear :S 14:18
perlpilot cale2: I'd say that's more a function of you than the language.
IOninja m: my @a = "a".."c"; for @a.kv -> $k, $v { say "Cut({@a.splice: $k, 1})" if $k == 1; $v.say };
camelia rakudo-moar aac9ef: OUTPUT«a␤Cut(b)␤b␤»
cale2 perlpilot: Perhaps, but doesn't logic affect how we express things?
IOninja heh 14:19
cale2 sorry *language
perlpilot cale2: yeah ... assuming you know the language well enough to be appropriately expressive :-)
IOninja You've been saying language X is clearer than perl 6 for months here now :)
14:19 cdg_ joined 14:20 pyrimidine joined
IOninja m: my @a = "a".."d"; for @a.kv -> $k, $v { $v.say; say "Cut({@a.splice: $k, 1})" if $k == 1; }; 14:20
camelia rakudo-moar aac9ef: OUTPUT«a␤b␤Cut(b)␤d␤»
IOninja m: my @a = "a".."d"; for @a.kv -> $k, $v { $v.say; say "Cut({@a.splice: $k+1, 1})" if $k == 1; };
camelia rakudo-moar aac9ef: OUTPUT«a␤b␤Cut(c)␤d␤»
jnthn I'm quite sure the haskell solution doesn't involve mutating something that's being iterated over. :P
perlpilot heh, indeed
IOninja tries to wrap head around those last two. 14:21
Success!
cale2 That may be the case, but I'm writing it in the traditional OO method, no?
the update logic is held inside the object. I'm just sending it a message
jnthn I don't think I'd writing code the mutates something I'm iterating over in any style. :-) 14:22
*I'd write
IOninja The in first, we cut "b" and "c" is missing cause it moved to idx 1 and so idx 2 is d; and in the second one we cut one further in line so the shortage doesn't make indexing weird.
Now can I sleep peacefully.
IOninja contemplates splicing up a fibonacci sequence 14:24
14:24 cdg left 14:25 pyrimidine left
IOninja eh, too hard 14:25
perlpilot This reminds me of some code I was looking at yesterday. The gist of it was my @a = @other[0..2]; if (some_condition) { @a[2] = @a[3]; pop @a; } It took me a while to figure out what was really going on in that if statement
(I had to remove all of the extraneous code first) 14:26
IOninja m: my @a = 1 … *; for @a.kv -> $k, $v { @a.splice: $k+1, 1 if $k %% 2; $v.say; last if $++ > 20}
camelia rakudo-moar aac9ef: OUTPUT«1␤3␤4␤6␤7␤9␤10␤12␤13␤15␤16␤18␤19␤21␤22␤24␤25␤27␤28␤30␤31␤33␤»
IOninja cool!
14:27 sammers joined
IOninja It's an evenly odd sequence :P 14:27
perlpilot rotor would be so much simpler and easier to grok. :)
IOninja perlpilot: I'd like to see that done with rotor 14:28
perlpilot It would need a 0 in the front that gets thrown away 14:29
IOninja OK
m: my @a = 0 … *; say @a.rotor(2 => 1).flat.[1..20] 14:30
camelia rakudo-moar aac9ef: OUTPUT«(1 3 4 6 7 9 10 12 13 15 16 18 19 21 22 24 25 27 28 30)␤»
IOninja m: my @a = 0 … *; say @a.rotor(2 => 1).flat.[1..20] eqv my @b = 1 … *; (do for @b.kv -> $k, $v { @b.splice: $k+1, 1 if $k %% 2; $v })[^20] 14:31
oops
camelia rakudo-moar aac9ef: OUTPUT«(timeout)False␤» 14:32
IOninja kinda expected it to be lazy
cale2 jnthn: How would you update an array of objects without iterating over them?
perlpilot cale2: you wouldn't *modify* them in the midst of iteration. You'd still iterate them in some fashion
IOninja m: (do loop { rand })[^10].say 14:33
camelia rakudo-moar aac9ef: OUTPUT«(0.535942470218007 0.432600492498629 0.141581615585711 0.00287844879814243 0.785823253284184 0.548317367701326 0.276469376450457 0.903177553464192 0.95945752288883 0.96783026971298)␤»
IOninja m: (do for ^Inf { rand })[^10].say
cale2 I agree, my solution so far is bad because of that. rabbits grow up too fast. That's why I tried to prepend them to the list so they wouldn't be immediately modified.
but prepend broke stuff
IOninja So loop {} is lazy by for ain't? :/
camelia rakudo-moar aac9ef: OUTPUT«(timeout)» 14:34
perlpilot cale2: my @next_gen = @curr_gen.grep(...); ... @curr_gen = @next_gen; # you could do something like this
14:36 skids joined
jnthn cale2: I'd probably write it somethin glike this: glot.io/snippets/en4khuprse 14:36
*something like
Which gets rid of the need for indexes at all 14:38
14:39 SourceBaby joined, ChanServ sets mode: +v SourceBaby
perlpilot or you could use classify if that fits your brain better 14:39
jnthn I thought about classify, but the .grow-up at the end of the loop made it come out worse.
14:40 Geth left, Geth joined, ChanServ sets mode: +v Geth, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly 14:41 buggable joined, ChanServ sets mode: +v buggable
perlpilot some people balk at Perl because it gives you so many options. I think that's one of the things that makes it so beautiful. You can explore different ways of doing things and expand your brain-power a little bit in the process. 14:43
14:43 PotatoGim left 14:44 jkva_ joined, llfourn joined
perlpilot (That's the dividing line between Perl and Python even ... IF you think TMTOWTDI is a blessing, you're a Perl person. If you think TMTOWTDI is a curse, you're a Python person) 14:45
IOninja dislikes Python due to its whitespace-indents rather than lack of TMTOWTDI
14:45 Actualeyes joined
moritz python doesn't really lack timtowtdi 14:46
they just pretend that
14:46 BinGOs left
IOninja hehe 14:46
14:46 PotatoGim joined 14:47 SmokeMachine joined
cale2 I think for non-geniuses the freedom can be a curse, yeah 14:47
For a normal person to understand why one design pattern is better than another, you need to have a strong understanding of the magic under the hood
14:47 olinkl joined
cale2 for @nursery -> $pair { push $pair.of-age ?? @playpen !! @growing, $pair; $pair.grow-up; } 14:49
does that `push` function push on to the @nursery?
jnthn No
First argument is what array to push to 14:50
14:50 llfourn left
jnthn You could write it ($pair.of-age ?? @playpen !! @growing).push: $pair 14:50
But putting the push up front felt clearer to me
IOninja hah 14:52
So only geniuses are free?
dat logic
14:52 BinGOs joined
IOninja Accidentally left perl6 -e 'm: (do for ^Inf { rand })[^10].say' running in a terminal... Chewed up 3.7GB before I realized what was making my box lag 14:54
why is it not lazy?
Even m: (lazy do for ^Inf { rand })[^10].say is not lazy :\
14:55 sufrosti1o left, sufrosti2o left, sufrostico left 14:56 dakkar left 14:58 dakkar joined
cale2 IOninja: only geniuses can write good code in a completely free language 14:59
15:01 cognominal joined 15:03 pyrimidine joined 15:05 sufrostico joined, sufrosti1o joined
IOninja [citation needed] 15:08
English is even freer than Perl 6... am I to assume anyone who can cobble up a coherent sentece is a genius :) 15:09
15:10 Peter_R joined, sufrosti2o joined
huf_ coherent is fairly easy, elegant is much harder :) 15:11
tony-o timotimo: transfered H:S:T 15:12
IOninja cale2: and I assume you can, of course? :)
jnthn I've never worked in a programming language where I didn't come across poorly thought out or poorly factored code. I have found that in some languages that tend to lean towards the more verbose side, code can more easily *look* good because there just aren't many ways to look, but zoom out enough and it's still structurally rotten.
I've also seen good examples of code in all of those. 15:14
But I think the goodness was more in good and well-expressed solution to problem. 15:15
15:19 agentzh joined 15:20 pyrimidine left 15:24 timeless joined, agentzh left 15:29 abraxxa left 15:30 nightfrog joined 15:32 jonas1 left 15:33 huf_ is now known as hf, hf is now known as huf
perlpilot jnthn: that's been my experience as well. 15:33
cale2 glot.io/snippets/en4m83hbra 15:39
in case anyone is curious
15:40 Actualeyes left 15:41 sena_kun joined 15:46 llfourn joined 15:49 sufrosti2o left 15:50 sufrosti1o left, sufrostico left
IOninja heh 15:51
15:52 sufrostico joined, llfourn left, sufrosti1o joined, sufrosti2o joined
IOninja cale2: well, that looks like gibberish to me 'cause I never seen Haskell code. So your whole Language X is better/clearer/consicer than Perl 6 feels to me to be just your extra experience with those languages than with Perl 6. 15:52
sena_kun >Haskell is clearer 15:54
lol
IOninja Well, I'm also forgetting I'm not a genius and apparently only geniuses can grok awesome codes. 15:55
cale2 IOninja: I would never say haskell is better than perl6. You could probably write a perl6 version of the program that looks just like the haskell. But the perl6 language gets me lost in the weeds with all the different options. I'm not that good of a programmer unfortunately
perlpilot cale2: You could have written the Perl in much the same way as the Haskell btw.
15:55 Actualeyes joined
perlpilot cale2: and Haskell *is* better than Perl ... for some problems. There is no "universal better" ;-) 15:56
TMTOWTDI includes not using Perl if that's what works :) 15:57
IOninja cale2: from your questions and statements, I'd guess you get lost because you try to find the bestest "way" to do something; like trying to stick types all over the places. There is no best.
mspo TMTOWTDI? 15:58
oh yeah
cale2 IOninja: You're right! If I'm writing OO, I want it to be brilliantly OO. If I'm writing FP, I want it to be brilliant FP
IOninja :)
sena_kun Like hell haskell is clearer when you have a monsterous monad transformer inside of a core and you need to keep track of tons of lifts and modules and stuff like functional dependencies, database-related DSLs and everything else.
perlpilot sena_kun: you sound like you've used Haskell before ;) 15:59
cale2 That's why we should embed haskell inside of other languages just to handle domain logic :)
perlpilot cale2: Haskell is already embedded in Perl 6 :) 16:00
It's just embedded really really deep.
b2gills cale2: why did you use filter(grep) and map in Haskell, but you didn't in Perl 6?
sena_kun perlpilot, I'm using right now in couple of my projects. No, I don't hate it, I love it. :) But when I saw "haskell is clearer than X" I shrugged. :) 16:01
cale2 b2gills: I did. I was using grep: $pair.of-age
sena_kun: I find more and more that haskell really is for bad programmers though. I'm not smart enough to keep everything in my own head. Easier to write it down the second it comes to me. Hence all of my types everywhere in P6 16:02
perlpilot cale2: from my perspective, what you did was try one programming paradigm in Haskell and another programming paradigm in Perl 6 and blame the language for your choices.
timotimo you shrugged? more like you snapped! :D
sena_kun it can be. (: 16:03
16:03 pyrimidine joined
b2gills A lot of features in Perl 6 are a direct consequence of the first implementation being built in Haskell 16:04
perlpilot cale2: I think I have to start a quote file for you now. "haskell really is for bad programmers" is just too good :)
sena_kun cale2, every language is for bad, for good, for ugly programmers too.
pyrimidine not sure if anyone else is on the o'reilly 'deal of the day' list, but 'Think Perl 6' is today's special :)
sena_kun many of such bad programmers are professors for some reason. I think there is some connection between! It is conspiracy! 16:05
pyrimidine Not sure if this link will work: shop.oreilly.com/product/0636920065...erl_6_deal 16:06
IOninja pyrimidine: link just leads me to the book... no deal of the days 16:08
pyrimidine add to cart, it's applied after
perlpilot I didn't realize that book was 475 pages.
IOninja If I go to deal of the day page, I get "Learning React Native" and "Tableau 10 Business Intelligence Cookbook" but no Perl 6 16:09
Oh yeah. If you go to cart it knocks off about $20
pyrimidine yup, it's 50% off 16:10
IOninja Guess I should buy it.
pyrimidine It's a early release, so it's not complete yet
but you'll get all the updates
[Coke] stares at chdir $?FILE.IO.dirname.IO.dirname (docs/xt/example*) 16:11
er, github.com/perl6/doc/blob/master/x...ation.t#L7
sena_kun [Coke], to find out relative path, isn't it?
IOninja pyrimidine: I guess it'd help me learn Perl 6 :) 16:12
huggable: FindBin
huggable IOninja, use lib $*PROGRAM.parent.parent.child("lib").Str; # finds lib/ for scripts in bin/ or t/
pyrimidine IOninja: heh. I don't think that's a problem :)
sena_kun [Coke], stupid me wasn't able to find a better way to do so. But it should be rewritten anyway.
IOninja m: dd [ $?FILE.IO.dirname.IO.dirname ]; dd [ $?FILE.IO.dirname ] 16:13
camelia rakudo-moar aac9ef: OUTPUT«["/"]␤["/tmp"]␤»
IOninja m: dd $?FILE.parent 16:14
camelia rakudo-moar aac9ef: OUTPUT«No such method 'parent' for invocant of type 'Str'␤ in block <unit> at <tmp> line 1␤␤»
IOninja
.oO( why is it a Str :/ )
[Coke] wouldn't say stupid. I just couldn't tell what it was trying to do.
at first glance, it seemed like a no-op
IOninja Yeah, to me too
m: dd $?FILE.IO.parent 16:15
camelia rakudo-moar aac9ef: OUTPUT«"/tmp".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤»
IOninja [Coke]: do people ever blow the deadline of the grant delivery they promised and is it a big deal? 16:17
perlpilot IOninja: are you already planning to miss your deadline? 16:19
IOninja perlpilot: nope 16:21
IOninja re-reads the grant to see what was promised
16:22 itaipu joined
perlpilot IOninja: also, IANAGM but I would guess that since it's paid on completion, it's not that big a deal if you miss a deadline, but communication with your GM is paramount to keeping the grant active until it is complete. 16:22
IOninja IANAGM? 16:23
perlpilot i am not a grant manager 16:24
IOninja lol
pyrimidine IOninja: I recall something happening a few years back re: a grant that wasn't (or couldn't be) completed. I think they are pretty flexible though
gfldex also: i am not a grand mage
16:24 ufobat joined
perlpilot pyrimidine: I can remember at least 2 grants that extended well past their deadlines. I don't know if they ever paid out or were simply dropped. 16:26
IOninja I still think I'll be able to finish I intend to finish before end of March, as promised, but I think my Feb report will be sparser than what it should be if you follow my breakdown of deliverables. I guess I'm worrying prematurely.
perlpilot but again, I would imagine that communication is super important in this situation 16:27
IOninja: Have I mentioned that you should communicate often with your grant manager? ;)
IOninja [Coke] is my grant manager :)
mspo is perl6 doing GSoC this year? 16:31
or moar
moritz it doesn't look like anybody has stepped up and done the necessary work 16:33
perlpilot If TPF or the like haven't applied, they missed the deadline. Org application deadline was Feb 9
timotimo oof
i seem to recall trouble 2 years ago or so lefzt perlers bitter about gsoc 16:34
am i misremembering?
perlpilot TPF applied and was rejected because they were looking for "newer orgs" at one point.
(they == google)
timotimo pff, age-ism 16:35
IOninja perl's not cool enough!
mspo yeah they rejected netbsd for 2-3 years for that
but then last year they let us back in
so you have to keep at it
I'm not involved this year so we'll see 16:36
16:40 st_elmo joined, skaji joined 16:41 pyrimidine left 16:42 pyrimidine joined 16:44 cschwenz joined
[Coke] (grants) as was said, you only get paid upon completion. There are rules about lack of communication == giving up your grant. 16:47
16:47 llfourn joined
IOninja Cool. 16:48
mspo we require contract "renewals" per year when paying "for work" instead of "for time"
IOninja [Coke]: My Feb report will be ready by end of day Feb 27th. It's my last off-work day of the month. 16:50
16:51 cschwenz left 16:52 llfourn left 16:59 pyrimidine left, ssotka joined 17:00 pyrimidine joined
[Coke] IOninja: danke. 17:00
timotimo that'll be fab for feb 17:01
mspo I could share some language if you want to use a similar setup
17:10 khw joined 17:13 pyrimidine left 17:14 faraco joined
cale2 perlpilot: I don't see how this is a bad quote "haskell really is for bad programmers". At least in simple levels (before you get to higher level stuff, which you don't necessarily have to right away) it is true. It holds your hand and forces you to answer "what does this function do, now this one, now what is this data" building up programs from small pieces 17:15
I think declarative is easier than imperative, but maybe that's just me. Easier to say "what does it do" rather than "how does it do it" 17:16
One day I'll write a perl6 slang that adds type annotations on the line above the subroutine lol
b2gills you can already do that 17:17
m: sub foo ( Str --> Str ){...}; sub foo ( $a ) { $a x 2 }; say foo 'ab'
camelia rakudo-moar aac9ef: OUTPUT«abab␤»
b2gills m: sub foo ( Str --> Str ){...}; sub foo ( $a ) { $a x 2 }; say foo 5 17:18
camelia rakudo-moar aac9ef: OUTPUT«55␤»
IOninja heh
m: sub foo ( Str --> Str ){...}; sub foo ( $a ) { $a x 2 }; say &foo.candidates 17:19
camelia rakudo-moar aac9ef: OUTPUT«(sub foo ($a) { #`(Sub|68052176) ... })␤»
faraco m: say '"Braile" or "Dancer2" Perl 5' 17:20
camelia rakudo-moar aac9ef: OUTPUT«"Braile" or "Dancer2" Perl 5␤»
b2gills I can't believe no one complained about that not working (failing) correctly. Actually ... yes I can. 17:22
IOninja m: multi foo ( Str --> Str ){...}; multi foo ( $a ) { $a x 2 }; say foo 5
camelia rakudo-moar aac9ef: OUTPUT«55␤»
IOninja m: multi foo ( Str --> Str ){...}; multi foo ( $a ) { $a x 2 }; say foo "x"
camelia rakudo-moar aac9ef: OUTPUT«Stub code executed␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
IOninja :D
timotimo there's a syntax where the return value goes before the sub name 17:25
it'd also allow a newline in between 17:26
i never wrote it like that, though
17:26 eroux joined
timotimo perhaps it only works with "my ... sub"? 17:26
IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { $x x 2 }; foo "x" 17:29
camelia ( no output )
IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { $x x 2 }; foo 42
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling foo(Int) will never work with proto signature (Str --> Str)␤at <tmp>:1␤------> 3-> Str) {*}; multi foo ($x) { $x x 2 }; 7⏏5foo 42␤»
IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { ($x x 2).Int }; foo "42"
camelia ( no output )
IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { ($x x 2).Int }; say foo "42"
camelia rakudo-moar aac9ef: OUTPUT«4242␤»
IOninja aww
17:32 faraco left
timotimo m: my Int␤sub test() { 99 }; say test 17:32
camelia rakudo-moar aac9ef: OUTPUT«99␤»
timotimo ^- that's how you get at least the return type into the line above the sub itself
IOninja m: my Int␤sub test() { "x" }; say test 17:33
camelia rakudo-moar aac9ef: OUTPUT«Type check failed for return value; expected Int but got Str ("x")␤ in sub test at <tmp> line 2␤ in block <unit> at <tmp> line 2␤␤»
IOninja heh cool
m: my int sub test() { 42 }; say test
camelia rakudo-moar aac9ef: OUTPUT«42␤»
IOninja m: my 42 sub test() { 42 }; say test 17:34
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 42 sub test() { 42 }; say test␤»
IOninja m: my Nil sub test() { 42 }; say test
camelia rakudo-moar aac9ef: OUTPUT«Type check failed for return value; expected Nil but got Int (42)␤ in sub test at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
timotimo heh.
IOninja is there some sort of hasattr? Looking for non-explosive version of nqp::getattr_i that just gives me 0 or something if the attr doesn't exist 17:37
and sticking a `try` on it makes the operation twice slower... 17:38
17:38 sufrosti2o left, sufrostico left, sufrosti1o left 17:39 ocbtec left
IOninja huh weird: 17:40
m: use nqp; sub x {}; for ^100_000 { $ = nqp::istype(&x, Routine) && nqp::getattr_i(&x, Routine, q|$!yada|) }; say now - INIT now
camelia rakudo-moar aac9ef: OUTPUT«0.0783406␤»
IOninja m: use nqp; my &x; for ^100_000 { $ = nqp::istype(&x, Routine) && nqp::getattr_i(&x, Routine, q|$!yada|) }; say now - INIT now
camelia rakudo-moar aac9ef: OUTPUT«0.1643105␤»
17:41 amalia__ joined
IOninja When it *is* a routine it does both istype and getattr but that's twice as fast as just istype on an Any? 17:41
timotimo maybe it can only type-specialize in one case 17:42
IOninja Ah
m: use nqp; constant &x = Any; for ^100_000 { $ = nqp::istype(&x, Routine) && nqp::getattr_i(&x, Routine, q|$!yada|) }; say now - INIT now 17:43
camelia rakudo-moar aac9ef: OUTPUT«0.0674589␤»
17:43 Tonik joined
IOninja Oh well, I'll use that 17:43
17:46 espadrine left, itaipu left
IOninja Wonder if "redeclaration of routine" looks weird: gist.github.com/zoffixznet/a6aaf3f...9317feea14 17:48
since my &x is not a routine, is it?
m: my &x; say &x.^name
camelia rakudo-moar aac9ef: OUTPUT«Callable␤»
IOninja close enuf :P
17:49 ggoebel left
IOninja hm 17:49
17:49 llfourn joined
IOninja m: my &x; multi x($) {} 17:49
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of routine 'x' (did you mean to declare a multi-sub?)␤at <tmp>:1␤------> 3my &x; multi x($) {}7⏏5<EOL>␤»
IOninja ok, at least that's not new :)
m: my &x; multi sub x ($) {}
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of routine 'x' (did you mean to declare a multi-sub?)␤at <tmp>:1␤------> 3my &x; multi sub x ($) {}7⏏5<EOL>␤»
IOninja I am declaring multi sub, computer! 17:50
moritz but my &x isn't a proto 17:52
17:52 dakkar left 17:53 llfourn left
IOninja heh, looks like someone had a lot of fun writing roast. grep -FR 'WTF' shows some very strange tests :P 17:54
17:55 pmurias joined
IOninja m: class { method x {}; multi method x {} } 17:55
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'x' when an only method is also in the package '<anon|60568608>'␤at <tmp>:1␤»
IOninja moritz: ^ but in the method case it actually tells me what's up. 17:56
moritz IOninja: yes, that's a better error message 17:57
m: sub x() { }; multi x() { }
camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of routine 'x' (did you mean to declare a multi-sub?)␤at <tmp>:1␤------> 3sub x() { }; multi x() { }7⏏5<EOL>␤»
18:00 itaipu joined
IOninja heh and the author of the funny test is... jnthn :) github.com/perl6/roast/commit/0df5...004063c4d6 18:00
jnthn: though for some reason github tells me it's an "Unrecognized author"
jdv79 how does one ref an anon block inside itself?
IOninja &?BLOCK 18:01
gfldex he clearly doesn't get the recognition he should get
18:02 matiaslina left
ilmari From: jnthn <jnthn@c213334d-75ef-0310-aa23-eaa082d1ae64> # someone hasn't configured git user.{email,name} 18:02
oh, svn...
moritz it was a git-svn import
ilmari someone didn't configure git-svn properly
svn.authorsfile 18:03
moritz someone didn't configure git-svn at all
our svn was dying, and I was glad that I managed to update my older git-svn clone at all to newest state 18:04
18:08 itaipu left
IOninja m: { say $++ and $++ < 10 and &?BLOCK() } 18:08
camelia rakudo-moar aac9ef: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
18:08 summan joined
summan Perl 6 is awesome, amazing great language. But we need MOOC on it. Moreover it needs to also focus on big data, analytics and machine learning to succeed. !!! 18:09
Perl 6 is awesome, amazing great language. But we need MOOC on it. Moreover it needs to also focus on big data, analytics and machine learning to succeed. 18:10
18:10 sufrostico joined
timotimo cool, you're going to build a course for perl6? 18:11
moritz summan: thank you for volunteering!
18:12 espadrine joined
summan timotimo Would have done. But I am no expert programmer, just a novice. For people like us courses on Perl 6 would be great on platforms like www.coursera.org or edx.org 18:13
Perl foundation can do it.
DrForr The Perl Foundation is made of people. Programming languages don't write themselves :) 18:14
18:15 itaipu joined
[Coke] You may be over-estimating the amount of time available by people already volunteering at TPF. 18:15
seems like the sort of thing that'd be amenable to a grant. 18:16
summan Perl 6 design is great. Though I use scientific stack in Python and R for statistics, I was just going through this perl6intro.com/. I found Perl 6 to be an elegant language. So I just wanted to learn it. So a course on it woud be justified. I myself learned Python and R from www.coursera.org and www.edx.org. 18:18
IOninja Seems both sites are for courses offered for free by universities...
DrForr There's a few tutorials on Safari and a recent webcast is going up soon. 18:19
IOninja wow lots of translations for perl6intro.com
+ a ton of books 18:20
I lost track of how many there are coming out this year
uuuh... Well now I know why so many people are using dev commits with rakudobrew: perl6intro.com/#_installing_perl_6 18:21
.seen hankache 18:22
yoleaux I saw hankache 28 Jan 2017 12:15Z in #perl6: <hankache> windows users, what terminal do you use? Any alternative to cmd.exe?
summan Reaching to community of people should be of priority I guess. PyData and PyCon are examples in python + a lot of courses. A beginner definitely would delve into where the resources for learning are plenty. Its a simple rule!! 18:23
mst summan: "perl foundation" can't do it. you need a person to write it.
perl foundation grants can help fund that person 18:24
but first you need to find the person
DrForr Or be that person.
IOninja .tell hankache Your perl6intro site tells users to use untested development commits by building them with rakudobrew: perl6intro.com/#_installing_perl_6 We generally avoid suggesting rakudobrew since users aren't skilled enough to fix any issues with it and users should be using properly tested user releases, not whatever commit ended up being HEAD when they build perl6
yoleaux IOninja: I'll pass your message to hankache.
IOninja summan: what a coincidence. There's an article written just for that topic: perl6.party/post/Open-Source-Projec...et-Reality 18:25
summan IOninja Oh yeah, nice to see :) 18:26
IOninja summan: well, nothing's changed from when the first time you were telling us to write MOOC courses followed by a bunch of exclamation marks. 18:27
summan: we're all busy with stuff we feel needs doing. If you feel MOOC stuff needs to be done. Do it.
summan: "But I am no expert programmer, just a novice." You don't need to be an expert. 18:28
And in some respects it's better that you're not. 18:29
summan: write the course. Let experts review it for mistakes. You don't need an expert to write it.
DrForr And as I like to point out, if you're *not* an expert it's actually better, as you're learning and can take notes as you go along.
I'd be more than happy to review whatever you do and offer feedback, I've given Perl 6 training worldwide :) 18:30
18:30 labster joined
summan DrForr Will try my best !! :) 18:33
18:33 itaipu left, ggoebel joined
DrForr It can be something as simple as: "I got frustrated trying to figure out what X means. I looked all over and couldn't find docs." 18:34
cale2 gitbooks > MOOCs 18:38
something like 70% of MOOCs people never even finish
gitbooks are lightweight, no commitment required, no login required.
mst different people prefer learning from different media 18:39
so sweeping X > Y statements are generally bollocks
IOninja m: say 42 > 5
camelia rakudo-moar aac9ef: OUTPUT«True␤»
cale2 mst: For a group of people that have minimal time, with the goal of creating a lot of content, gitbooks are better than MOOCs. 18:40
18:40 eliasr left
cale2 From a creator perspective, MOOCs would require at least double the effort. But if someone wants to, that would be cool! 18:40
IOninja m: say quietly not X > not Cool
camelia rakudo-moar aac9ef: OUTPUT«True␤»
DrForr cale2: I think you two are in violent agreement :) 18:41
IOninja m
m: say quietly Perl == Cool
camelia rakudo-moar aac9ef: OUTPUT«True␤»
cale2 I mentioned yesterday that I would love to translate some Golang sources to Perl6. But I'm not sure if Perl6 web dev idioms are finished yet 18:42
18:42 summan left
DrForr cale2: Great opportunity to make your own! 18:42
cale2 DrForr: I'm a bad programmer, remember? :)
mst cale2: well done on completely missing the point
cale2 I strictly stick to ruining documentation instead of ruining actual code 18:43
DrForr cale2: No, but that just means you're going to be a more effective canary than most would be :)
mst cale2: I'm not telling you where to spend your time; it's your time - but there are people who will learn better from one or the other so 'X > Y' is still silly 18:44
cale2 mst: 😘
[Coke] I don't particular find "feel free" to be helpful in this case; no, there isn't a clear perl 6 lib to use like there is in p5 yet. I ran up against this in parrot back in the day: sometimes you just want to be a user, you don't want to shave yaks all the way down. 18:45
18:45 itaipu joined
mst cale2: also, for example, I can think of plenty of people for whom MOOCs' having a specific timeline and etc. helps them motivate themselves, so ranking "no commitment required" as an advantage is an error 18:45
note, I hate MOOCs and would much prefer to learn from a gitbook
timotimo i'd love to have perl6 shouted into my head by a mst :3
IOninja :) 18:46
mst I've not found I'm particularly good at class-style lecturing
b2gills I first learned Perl 5 by the error messages and the included docs
timotimo OK, that's fine
mst then again, I've always previously attempted to produce a 'normal' class
timotimo ah, that must be the mistake! ;) 18:47
IOninja I've learned both Perl 5 and Perl 6 from IRC... and never bothered with docs with either :(
timotimo you do you, mst
mst maybe if I threw that out the window and went "let's do this mst style, and it'll maybe work for 10% of people, and everybody else can watch somebody competent at the standard approach"
IOninja heh
mst but I think having somebody who hates watching videos making one is probably silly
hobbs I think the result would be entertaining
b2gills I first learned Perl 6 by reading and watching everything I could get my hands on it for about 5 years or more, while never actually trying it 18:48
hobbs you might be a youtube celebrity
DrForr You too can be Tron Guy :)
b2gills I would subscribe to a mst channel if all he did was rant 18:49
DrForr I believe we call that 'IRC' :) 18:50
18:50 itaipu left, llfourn joined 18:55 llfourn left 18:56 itaipu joined
IOninja .ask TimToady is `sink Failure.new` supposed to ignore the Failure? 19:00
yoleaux IOninja: I'll pass your message to TimToady.
TimToady no, the main point of lazy failures is to not throw away the information when you sink it (or try to use it) 19:03
yoleaux 19:00Z <IOninja> TimToady: is `sink Failure.new` supposed to ignore the Failure?
TimToady m: sink Failure.new
camelia rakudo-moar b51a55: OUTPUT«Failed␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
TimToady m: eager Failure.new
camelia ( no output )
IOninja Thanks.
TimToady m: so Failure.new
camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of "so " in expression "so Failure.new" in sink context (line 1)␤»
TimToady heh
19:04 rindolf left
TimToady not really useless there... 19:04
IOninja I recall making it throw but now on a ticket someone says `sink ` is a way to silence failures... Wanted to ensure my "fix" wasn't wrong :P
TimToady sink is more or less what happens to statements that aren't the last, and we shouldn't bend it to mean something else, which this is, subtly 19:06
m: sink 42
camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
TimToady m: eager 42
camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
TimToady hmm
m: eager 42, 43 19:07
camelia ( no output )
TimToady m: sink 42, 43
camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 43 in sink context (lines 1, 1)␤Useless use of constant integer 42 in sink context (lines 1, 1)␤»
TimToady interesting that eager only silences the list
19:07 itaipu left
TimToady m: eager so Failure.new 19:08
camelia ( no output )
TimToady anyway, that's not what sink is for
19:08 girafe joined
TimToady m: try Failure.new 19:09
camelia ( no output )
TimToady lot's of other ways to silence a failure
jnthn I'm a tad surprised try didn't fatalize it... 19:10
m: try { Failure.new }
camelia ( no output )
jnthn m: try +'nope'
camelia ( no output )
jnthn Oh, duh 19:11
It does and then catches the exception
I even wrote the code that makes that happen. :P
TimToady indeed :) 19:14
19:15 sufrostico left
TimToady is glad he lives in the state of CA, not the country of CA, because his furnace is bust 19:16
19:17 rindolf joined
IOninja recently learned CA has "Yolo by-pass" 19:18
www.google.ca/maps/place/Yolo+Bypa...21.6280637
DrForr Cloning?
IOninja :)
19:19 itaipu joined
DrForr I was amused when I was driving back from dropping Percy off and passed the (closed) Donner Party Picnic Ground. 19:19
TimToady well, CA has Yoho you can bypass... 19:20
DrForr "Donner party, table for 7... er, 6?"
TimToady what self-serving people! 19:21
19:21 agentzh joined
DrForr Biting sarcasm. 19:21
TimToady will chew on that...
samcv good * perl 6 19:22
perlpilot cale2: That wasn't a "bad quote" it was an interesting one. I like the sentiment.
19:22 labster left 19:23 labster joined 19:25 agentzh left 19:28 itaipu left
samcv .tell lizmat thanks for " Make Int.WHICH about 1.7x faster" :) 19:28
yoleaux samcv: I'll pass your message to lizmat.
19:29 Tonik left
IOninja I see the "Shouldn't happen" in the comment but it did happen to me like a week ago: github.com/rakudo/rakudo/blob/b51a...pm#L34-L35 19:33
In irclog.perlgeek.de/perl6-dev/2017-...i_14066457 19:34
m: gist.github.com/zoffixznet/b7fe891...4a664b2822
camelia rakudo-moar b51a55: OUTPUT« ok 1 - 3..4 ~~ -1/0..1/0␤ ok 2 - 0/0..0/0 ~~ -1/0..1/0␤ ok 3 - 2..3 ~~ 2..3␤ ok 4 - "2".."3" ~~ 2..3␤ ok 5 - 2.0..3.0 ~~ 2..3␤ ok 6 - 2..3 ~~ 2..3␤ ok 7 - 2.5..2.8 ~~ 2..3␤ ok 8 - FatRat.new(2, 1)..FatRat.new(3, 1…»
IOninja e: gist.githubusercontent.com/zoffixz...6b3d/p6.p6
evalable6 IOninja, Successfully fetched the code from the provided URL.
IOninja, rakudo-moar b51a550: OUTPUT«(exit code 2) ok 1 - 3..4 ~~ -1/0..1/0␤ ok 2 - 0/0..0/0 ~~ -1/0..1/0␤ ok 3 - 2..…»
IOninja, Full output: gist.github.com/8a1276fbef864dbae4...470fb3c6d6
19:35 itaipu joined, cdg joined
IOninja hm, but only on my 32-bit box 19:36
19:36 ChoHag joined
IOninja .ask dogbert11 do you get any warnings about Failures in DESTROY when running this code on 32-bit box? gist.githubusercontent.com/zoffixz...e2bb791e4a 19:36
yoleaux IOninja: I'll pass your message to dogbert11.
IOninja Got 2017.01-121-gf94cb21 on both 32-bit and 64-bit and only 32-bit one complains 19:37
19:38 CIAvash left, cdg_ left 19:39 cdg left
IOninja .tell dogbert11 previous URL seems busted; this one: gist.github.com/zoffixznet/b7fe891...4a664b2822 19:40
yoleaux IOninja: I'll pass your message to dogbert11.
19:41 itaipu left 19:42 darutoko left
timotimo IOninja: yeah, that warning is a helpful thing to have, we put it in mostly because it does tend to happen a bunch 19:44
until we figure out sinking better :)
IOninja Well I tickedted its happening: rt.perl.org/Ticket/Display.html?id=130786 19:45
timotimo but the "only 32bit" thing makes me a bit uncomfortable :)
IOninja Uncomfortable how?
timotimo it could very well be that it's just the size of objects and frames being different sizes causes GC to do things in a slightly different order
19:48 itaipu joined, itcharlie left
IOninja m: my $f = Failure.new; sink $f 19:49
camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of $f in sink context (line 1)␤Failed␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
IOninja ain't useless :/
19:49 eliasr joined, gdonald joined
IOninja The code where the DESTROY stuff happens has `try` prefix before code that makes the Failures 19:50
timotimo try is supposed to make failures immediately fatal
perigrin_ w/ 52
timotimo through the magic of code-gen
IOninja perigrin_: No win. Try again. 19:51
19:52 llfourn joined
perigrin_ IOninja: it was there, just wasn't there with w/ 19:52
:)
19:57 llfourn left
IOninja Looks like the confusion that $proc.out.close returns the proc is prevalent: rt.perl.org/Ticket/Display.html?id...xn-1383778 20:02
20:02 bjz joined
IOninja Or rather... people thinking that IO::Pipe.close throws when it doesn't 20:02
m: sub meows { Proc.new: :command["false"] }; try meows 20:03
camelia ( no output )
IOninja s: sub meows { Proc.new: :command["false"] }; try meows; exit
SourceBaby IOninja, Something's wrong: ␤ERR:
IOninja Well, it 'splodes in non-restricted setting. 20:04
'cause the explosion is in a sinking Proc and so happens after the try.
I dunno... is this a doc problem or a design problem? :)
Actually make it three people... 20:06
m: |Failure.new 20:15
camelia ( no output )
IOninja m: sink |Failure.new 20:16
camelia ( no output )
IOninja m: sink [Failure.new],
camelia rakudo-moar b51a55: OUTPUT«Failed␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
IOninja Weird, no?
(the slip preventing 'splosion that is)
Actually, blocking sinkage. `|run "false"` doesn't explode 20:18
20:18 mr_ron joined 20:19 agentzh joined
IOninja Anyone wanting to give a talk? Toronto Perl Mongers are lookin' for speakers. 20:20
☃☃☃☃☃☃☃ 20:21
:) 20:22
IOninja ends the soliloquy
20:23 girafe left
arnsholt IOninja: If you're springing for airfare OSL-YYZ, I'm sure I can come up with something =) 20:24
20:24 agentzh left
IOninja heh, doubt there's any airfare springed 20:25
Unless you're famous.
:)
cale2 what happens when you put `.IO` on the end of a filename? Is .IO coercing the Str to a IO::Handle type? 20:26
IOninja IO::Path
20:27 agentzh joined
cale2 perhaps then .slurp coerces IO::Path to an IO::Handle 20:27
Xliff .slurp returns the contents. 20:29
IOninja cale2: not really; just uses it to slurp the thing pointed to by that IO::Path: github.com/rakudo/rakudo/blob/b51a...#L458-L487
Xliff .open should return the IO::Handle
20:30 wamba left
IOninja Kinda weird design 20:32
IO::Handle has slurp-rest; IO::Path has slurp;
20:33 pmurias left
[Coke] IOninja: buffalo is kind of a long drive for me. - also, am I famous? 20:34
perlpilot still wishes "slurp-rest" didn't exist or had a better name
20:34 kurahaupo_ joined
[Coke] perlpilot: there's always 6.d 20:34
[Coke] wonders if slurp(:rest) would have worked. 20:35
IOninja [Coke]: doesn't seem so: www.google.com/search?q=wiki+Will+...p;oe=utf-8
20:35 kurahaupo left
[Coke] IOninja: I'm at least name dropped in wikipedia. :P 20:35
IOninja [Coke]: the reason I mention famousnes is we did pull together something around a grand for Damian Conway's visit :)
perlpilot: like... slurp? :) 20:36
perlpilot IOninja: exactly! :)
[Coke] oh so I can expect about 4.50. Canadian. :)
IOninja :) We'll pay for your parking ;)
[Coke] aahahaha. perfect.]
20:39 amalia__ left, kurahaupo_ left 20:40 pmurias joined 20:44 parv joined 20:51 Actualeyes left
cale2 Can you convert a seq to an array? 20:52
20:53 llfourn joined, itaipu left 20:54 Actualeyes joined
sena_kun cale2, .list? 20:54
gfldex m: dd Seq.new.Array 20:55
camelia rakudo-moar b51a55: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
sena_kun not .Array though
gfldex .Array is not the problem
it's not that easy to create a Seq
m: dd (1…3).Array 20:56
camelia rakudo-moar b51a55: OUTPUT«[1, 2, 3]␤»
sena_kun neat.
gfldex, by the way, I'd want to talk with you a bit about the docs, are you relatively free now? 20:57
gfldex yes
perlpilot [Coke]: do you think TPF would give small travel grants for speakers to spread the Perl word? 20:58
20:59 llfourn left
perlpilot [Coke]: not in the sense that you would apply for one, but that Toronto.pm would apply for one to get reimbursed for flying someone (maybe you) in 20:59
sena_kun okay. I've finished(or almost) work on a single style and compileable examples, but in process a question risen. Your extract-examples script indeed extract examples, but for what purpose? Cannot we in such fashion just execute examples directly instead of extracting? 21:00
cale2 gather/take creates a Seq. I just assigned it to an @array variable and that converted it 21:01
mst gfldex: grep/map return Seqs too
mst uses .list sometimes to get something bindable
when I'm trying to be readonly-everything 21:02
sena_kun gfldex, I've built a test around your script, but we lost information after extracting to properly shout about errors 21:03
timotimo IOninja: the reason why there's slurp and slurp-rest is because slurp includes opening and closing, whereas slurp-rest is about a file-handle that neds up staying open afterwards 21:06
21:08 bjz left 21:12 cale2 left, gregf_ left, dmaestro left 21:13 cale2 joined, gregf_ joined, dmaestro joined, Actualeyes left 21:14 gdonald left 21:15 gdonald joined, cale2 left, gregf_ left, dmaestro left 21:16 cale2 joined, gregf_ joined, dmaestro joined, gregf_ left 21:25 parv left, agentzh left 21:26 agentzh joined 21:27 ggoebel left 21:28 bjz joined 21:29 wamba joined 21:31 st_elmo left 21:32 dogbert17 joined
dogbert17 IOninja: ran you code a few times and saw no DESTROY warnings 21:33
lucs dogbert17: I believe you have some yoleaux messages addressed to dogbert11 waiting. 21:35
dogbert17 lucs: the ones from IOninja? 21:36
lucs Yes
dogbert17 dogbert11 is my $work alter-ego 21:39
lucs Oh, just saying.
dogbert17 lucs: thx for pointing it out
lucs Sure thing.
21:40 sufrostico joined 21:41 wamba left
IOninja dogbert17: OK will just close my ticket then 21:41
dogbert17: oh, which perl6 version did you use?
I guess I should still just close it since I don't know how to repro it on HEAD 21:42
21:42 gdonald left
dogbert17 IOninja: This is Rakudo version 2017.01-207-gb51a5505a built on MoarVM version 2017.01-45-g2b0739d8 21:44
21:44 bjz left
IOninja m: say $*PERL.compiler.version 21:46
camelia rakudo-moar b51a55: OUTPUT«v2017.01.207.gb.51.a.550␤»
IOninja yeah that already has my fix for ~~
hobbs gb.51.a.550? 21:47
21:47 cdg joined
dogbert17 IOninja: remember seeing it a few months ago, there was some discussion on IRC which led to timotimo making a fix 21:47
hobbs oh, it's interpreting it as that thing where every switch between alpha and numeric is a new significant segment
21:47 EAAAEVL joined
IOninja yeah 21:47
timotimo did i fixbreak something?
dogbert17 many things :)
IOninja don't think so :)
cale2 m: say (1,2,3,4) + (5,6,7);
camelia rakudo-moar b51a55: OUTPUT«7␤»
cale2 m: say (1,2,3,4) ~ (5,6,7); 21:48
camelia rakudo-moar b51a55: OUTPUT«1 2 3 45 6 7␤»
cale2 m: say (1,2,3,4) ++ (5,6,7);
camelia rakudo-moar b51a55: OUTPUT«7␤»
cale2 m: say join (1,2,3,4), (5,6,7);
camelia rakudo-moar b51a55: OUTPUT«51 2 3 461 2 3 47␤»
IOninja Lists are Cool
21:48 andrzejku_ joined
cale2 how the hell do i do concat two @arrays lol 21:48
timotimo what did i make a fix for?
cale2: with the , operator and "flat"
cale2 m: say (1,2,3,4), (5,6,7); 21:49
camelia rakudo-moar b51a55: OUTPUT«(1 2 3 4)(5 6 7)␤»
cale2 m: say |(1,2,3,4), (5,6,7);
camelia rakudo-moar b51a55: OUTPUT«1234(5 6 7)␤»
cale2 m: say |(1,2,3,4), |(5,6,7);
camelia rakudo-moar b51a55: OUTPUT«1234567␤»
perlpilot cale2: those are lists you're trying to concatenate btw :)
dogbert17 timotimo: some strange DESTROY warnings if I remember correctly 21:50
timotimo jesus, my last rakudo commit was 3 months ago
IOninja :o 21:51
mine was 3 hours ago :)
hoelzro timotimo: mine was 5 =(
IOninja Slackers! ;)
timotimo oh, no, i searched wrong
cale2 perlpilot: If lists, seqs, and arrays were the same thing, what would anyone complain about?
timotimo i actually did something 4 weeks ago
and one 9 weeks ago
IOninja cale2: same thing being what? 21:52
perlpilot cale2: someone will always find *something* to complain about :)
IOninja cale2, and what about Slips :) 21:53
cale2, Arrays and Slips are Lists. Arrays are mutable and Slips... slip... into surrounding stuff. Seqs lazily generate and forget stuff, seems a far cry from Lists 21:54
21:54 llfourn joined
cale2 To a beginner, they're all the same thing. except sometimes things don't work because they're different types and then you have to fiddle until it works. 21:55
Will be interesting to see how "Think Perl 6" teaches them all
21:55 ggoebel joined 21:56 TEttinger joined
IOninja hehe 21:56
Well, they all do Positional role, so there is some sameness :)
cale2 Realistically, the only reason a beginner would need to know about Seq is if they learn about gather/take. They probably should learn the imperative accumulator method before learning gather/take, though. 21:57
Geth doc: 9771ffeeb9 | Altai-man++ | 3 files
Fix a couple of examples, add 'haskell' page to ignore-list of extract-examples.p6
IOninja m: class Sameness is Array is Seq is Slip {}; say Sameness.new: 1, 2, 3
camelia rakudo-moar b51a55: OUTPUT«[1 2 3]␤»
IOninja ehehe
21:58 pmurias left
IOninja "imperative accumulator method"... *snores* 21:58
cale2 The differences are frustrating when you're adding typing to your program. All of the sudden Array[Stuff] doesn't compile because your gather/take actually produced a Seq.
IOninja What is that anyway?
But why are you adding typing? 21:59
cale2 m: my @stuff; for 1,2,3,4 { @stuff.push: $_ }; say @stuff;
camelia rakudo-moar b51a55: OUTPUT«[1 2 3 4]␤»
IOninja ah
cale2 that method
IOninja: why wouldn't you add typing. It's nice to know that your function returns an Array of a certain thing 22:00
IOninja loop amd push sounds much less intimidating :)
perlpilot cale2: do you expect type annotations in Perl 6 to act like Haskell in some way?
dogbert17 timotimo, IOninja: irclog.perlgeek.de/perl6-dev/2016-0...i_13211439
cale2 IOninja: Yeah, teach loop/push first. Then gather/take is like "oh I don't need the accumulator any more"
22:00 lukiramu left, rindolf left
cale2 perlpilot: cognitively, type annotations are helpful to humans just as much as computers. look at the signature "ah, I know what this func does" 22:01
IOninja cale2, but if you're unfamiliar with Perl 6 types your effect is frustration
perlpilot okay ... I was getting a feeling like you were expecting something akin to Haskell's type inferencing to happen in Perl 6
IOninja cale2, and you can play to language's strength: gradual typing and not bother with types until you learn about them. 22:02
Instead of wanting sameness. 22:03
22:03 skids left
Geth doc: 5c2a3bcf00 | Cale++ | doc/Language/haskell-to-p6.pod6
add placeholder for gather/take
22:03
22:03 llfourn left
perlpilot I'd say this is where Haskell and Perl 6 are polar opposites. In Haskell, you add types so that the compiler can help you write the code; in Perl 6 you leave off the types so that the compiler doesn't get in your way of writing the code ;-) 22:04
cale2 IOninja: Nobody can tell me Perl6's strengths, though. When I ask, they say TMTOWTDI. When I do it a different way, they say "play to Perl6's strengths". okay... 22:05
I get the impression that there _is_ such a thing as idiomatic Perl6. But people pretend that there isn't. 22:06
22:07 sena_kun left
perlpilot cale2: I suggest you ask TimToady about "idiomatic Perl 6" some time :-) 22:09
22:11 RabidGravy left
perlpilot cale2: and, yes, there is such a thing. 22:11
IOninja cale2: hehe, interesting. I do believe there is idiomatic Perl 6, but I'd have a hard time naming examples. 22:14
Other than assuming everything TimToady writes is idiomatic by definition :P
But I notice you throw around all sorts of CS terms I never heard of. Perhaps idiomatic Perl is writing code ignoring all these strict rules and definitions... or perhaps I think so because that's how I code :P clueless about something-something-aggregators you showed earlier 22:16
22:16 rindolf joined
IOninja And, to me at least, TIMTWOADY means you can write `for ^5 { .say }` or `^5 .map: &say` or `.say for 0..4`; same as in English you structure phrases differently, as they fit. Not that you can do FP-only-and-nothing-but-FP while someone can do OO-only-and-nothing-but-OO and declarative whatver that is 22:19
gfldex for '.' { .Str.say when !.IO.d; .IO.dir()>>.&?BLOCK when .IO.d } 22:21
^^^ I cound 3 idioms in there
count even
22:25 atweiden joined
Geth doc: 6c1c54ee99 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod6
mexico examples
22:26
IOninja hehe is that what we call the opposite of Texas? :)
Oh 'cause it is... literally I guess
gfldex at least I do
IOninja I like it. 22:27
cale2 gfldex: I like it. Let's call the Perl::Tidy tool that converts texas to unicode `Perl::Tidy::Mexify` or something lol 22:28
TEttinger huh, except that mexico uses even longer names than texas 22:29
cale2 in that case `Perl::Tidy::WingDingify`
TEttinger simplest is "mexico city" vs. "ciudad mexico" (not sure if it needs "ciudad de")
the chinese ideograms are about as close as it gets to one symbol for one concept 22:31
22:31 andrzejku_ left
cale2 TEttinger: creo que se llama "mexico" porque espanol tiene los caracturas unicoda 22:32
TEttinger I guess "mexico" could include the maya, but I don't know if they lived there or further south. and the maya used a one-to-one symbol-to-concept mapping
cale2 wow, I guessed for "unicode characters" and it was right lol
22:33 Beginner_don joined
IOninja The Mayan people are still alive dude :) 22:33
TEttinger I guess. spanish has just a few unicode chars, enough to fit in Latin-1
cale2 perlpilot: I would imagine idiomatic Perl6 would mostly come through in control flow. Structurally Idiomatic Perl6 in large applications would probably just be OO
TEttinger IOninja: didn't they leave the cities though?
did their script stay in use? 22:34
IOninja No idea.
Heh, google-mapping "Maya" gives me Floridian city named "Mayo" :P
22:34 imcsk8_ joined 22:35 pochi_ joined
cale2 TEttinger: Texas is close to Mexico. Texas is ascii, Mexico is unicode because it has to be. You could say Texas vs Chinese, but it doesn't have a ring to it / the imagery isn't as good :P 22:35
TEttinger true
22:35 pnu___ joined
cale2 The imagery of the Alamo lol 22:36
22:36 ggherdov__ joined, kaare__ joined
TEttinger was the battle of the alamo in the Mexican-American war? 22:36
22:36 hobbified joined
cale2 Perl6 is one of the few languages that the Cherokee could program in: en.wikipedia.org/wiki/Cherokee_syllabary 22:36
in their own language, I mean
22:36 diego_k joined, hobbs left, hobbified is now known as hobbs, hobbs left 22:37 hobbs joined
TEttinger are the keywords remappable, if there are any? 22:37
I'm not sure if the sigils can be changed
cale2 TEttinger: Idk, but I think there was a basement there
22:37 mr-fooba_ joined, plicease_ joined, mspo_ joined, perlpilo1 joined, kentnl joined, KotH_ joined, hoelzro_ joined 22:38 gfldex_ joined, lucs_ joined, effbiai joined, effbiai left, effbiai joined, cibs_ joined
IOninja What's special about Perl 6 and Cherokee? 22:39
22:39 riatre_ joined
IOninja m: sub ᎢᏣᎵᏍᎠᏁᏗ { say "ᎢᏣᎵᏍᎠᏁᏗ" }; ᎢᏣᎵᏍᎠᏁᏗ 22:40
camelia rakudo-moar b51a55: OUTPUT«ᎢᏣᎵᏍᎠᏁᏗ␤»
IOninja Works in Perl 5 too
cale2 Oh, you can name perl5 functions in unicode? did not know
golang only allows for unicode in strings i think 22:41
22:41 gabiruh joined 22:42 ccakes_ joined
perlpilot re mexico v. texas ... that's taking the analogy somewhere far away from home :) 22:42
22:42 atweiden left, khw left, BinGOs left, buggable left, NeuralAnomaly left, Geth left, kent\n left, cibs left, leah2 left, ccakes left, mr-foobar left, pochi left, kaare_ left, mspo left, cgfbee left, Beginner_Guy left 22:43 pnu___ is now known as pnu__
IOninja Yeah, as long as you use proper switches, tell it your source is in utf8, and sacrifice a goat to god Rah. 22:43
22:43 simcop2387 joined, BinGOs joined 22:44 KotH_ is now known as KotH, Technaton joined 22:45 ribasushi left
cale2 texas is to ascii as wisconsin is to to unicode 22:45
22:46 zacts left, cale2 left, dmaestro left, ggoebel left, sufrostico left, koki1 left, telex left, tomaw left, jervo left, agentzh left, espadrine left, gfldex_ left, perlpilo1 left, Beginner_don left, ssotka left, sammers left, nowan_ left, b2gills left, abruanese left, sjn left, MilkmanDan left, rindolf left, ChoHag left, timeless left, olinkl left, Vasyl left, aindilis left, cpage left, hwu left, kalkin- left, xui_nya[m] left, mulk[m] left, andrzejku left, avalenn left, r3m left, cibs_ left, KotH left, plicease_ left, diego_k left, jkva_ left, Cabanossi left, Unavowed left, ponbiki left, M-Illandan left, baest left, dogbert11 left, El_Che left, sjohnson left, TEttinger left, japhb left, SCHAAP137 left, z-b left, ilmari left, CIAvash[m] left, Matias[m] left, dj_goku left, ilmari[m] left, obfusk left, ccakes_ left, pochi_ left, SmokeMachine left, movl left, alimon left, awwaiid left, nebuchadnezzar left, dp[m] left, cpage_ left, eroux left, kst` left, rblackwe_ left, mxco86 left, user9 left, BooK left, avuserow left, d^_^b left, shadowpaste left, hoelzro_ left, Peter_R left, ilbelkyr left, brabo left, Juerd left, Sgeo left, Xliff left, beatdown left, samcv left, cxreg2 left, mls left, JimmyZ left, tbrowder left, luis left, jantore left, broquaint left, lucs_ left, labster left, ccntrq left, john51 left, bitmap left, camelia left, nine left, TimToady left, wcummings left, go|dfish left, bartolin left, SHODAN left, raydiak left, gabiruh left, imcsk8_ left, ufobat left, noganex left, Woodi left, rjbs left, [particle] left, effbiai left, cdg left, ilbot3 left, lep-delete left, dogbert17 left, petercommand left, bolangi left, eiro left, jordman left, eady left, Util left, cosimo left, kshannon left, cyphase left, silug left, setty1 left, vktec left, mephinet left, jnap_ left, mrsolo left, Technaton left, mspo_ left, mr-fooba_ left, hobbs left, pnu__ left, skaji left, cognominal left, SourceBaby left, g4 left, solarbunny left, dalek left, mienaikage left, wictory[m] left, tadzik left, Matthew[m] left, musca left, geekosaur left, PotatoGim left, eliasr left, ggherdov__ left, DarthGandalf left, tharkun left, nightfrog left, torbjorn left, riatre_ left, salparadise left, sQuEE` left, m0ltar left 22:53 leah2 joined, khw joined, PotatoGim joined, m0ltar joined, ggherdov__ joined, geekosaur joined, salva joined, salparadise joined, roguelazer joined, riatre joined, torbjorn joined, perigrin joined, DarthGandalf joined, sQuEE joined, tharkun joined, nightfrog joined, mst joined, Technaton joined, ccakes_ joined, gabiruh joined, cibs_ joined, effbiai joined, lucs_ joined, gfldex_ joined, hoelzro_ joined, KotH joined, perlpilo1 joined, mspo_ joined, plicease_ joined, mr-fooba_ joined, diego_k joined, hobbs joined, pnu__ joined, pochi_ joined, imcsk8_ joined, Beginner_don joined, rindolf joined, TEttinger joined, ggoebel joined, gdonald joined, cdg joined, sufrostico joined, dogbert17 joined, agentzh joined, dmaestro joined, cale2 joined, ChoHag joined, labster joined, espadrine joined, eroux joined, ssotka joined, skaji joined, ufobat joined, timeless joined, Peter_R joined, cognominal joined, olinkl joined, SmokeMachine joined, jkva_ joined, SourceBaby joined, sammers joined, sjn joined, Vasyl joined, movl joined, koki1 joined, telex joined, tomaw joined, nowan_ joined, ccntrq joined, g4 joined, cyphase joined, Cabanossi joined, noganex joined, ilbot3 joined, john51 joined, silug joined, lep-delete joined, Woodi joined, aindilis joined, japhb joined, alimon joined, kst` joined, cpage joined, bitmap joined, SCHAAP137 joined, solarbunny joined, Unavowed joined, awwaiid joined, dalek joined, ponbiki joined, hwu joined, z-b joined, rblackwe_ joined, ilbelkyr joined, karatkievich.freenode.net sets mode: +vvv SourceBaby ilbot3 dalek, rjbs joined, petercommand joined, ilmari joined, nebuchadnezzar joined, mxco86 joined, user9 joined, BooK joined, samcv joined, kalkin- joined, b2gills joined, avuserow joined, bolangi joined, setty1 joined, mienaikage joined, mulk[m] joined, xui_nya[m] joined, Matias[m] joined, CIAvash[m] joined, ilmari[m] joined, Matthew[m] joined, dp[m] joined, M-Illandan joined, tadzik joined, dj_goku joined, wictory[m] joined, camelia joined, nine joined, brabo joined, Juerd joined, sjohnson joined, Sgeo joined, obfusk joined, baest joined, beatdown joined, jervo joined, MilkmanDan joined, cpage_ joined, vktec joined, r3m joined, TimToady joined, wcummings joined, andrzejku joined, Xliff joined, [particle] joined, eiro joined, dogbert11 joined, abruanese joined, karatkievich.freenode.net sets mode: +v camelia, d^_^b joined, avalenn joined, El_Che joined, drrho joined, moritz joined, zostay joined, LeCamarade joined, pierrot joined, Hotkeys joined, freeze joined, DrForr joined, peteretep joined, notbenh_ joined, w4and0er96 joined, kipd joined, mithaldu_ joined, mindos joined, chansen_ joined, vike joined, inokenty joined, mtj_ joined, araujo joined, matt_ joined, xxpor_ joined, adrusi_ joined, shmibs joined, bhm_ joined, grumble joined, jferrero_ joined, sivoais_ joined, Kaffe_ joined, tony-o joined, literal joined, [Coke] joined, ranguard joined, sergot joined, Grauwolf joined, Spot__ joined, TBSliver joined, dylanwh joined, koki joined, timotimo joined, mitchum joined, eaterof joined, konobi joined, integral_ joined, kybr joined, perlpilot joined, dustinm` joined, emdashcomma joined, ugjka joined, daxim joined, notbenh joined, arnsholt joined, ssm joined, clkao joined, protium joined, garu joined, Exodist joined, hahainternet joined, tailgate joined, ingy joined, Ulti joined, Grrrr joined, andrewalker joined, vcv joined, TheDir joined, Undercover joined, masak joined, stmuk joined, f3ew joined, robinsmidsrod joined, Mithaldu joined, tyil joined, stux|RC joined, titsuki joined, breinbaas joined, Celelibi joined, sunnavy joined, mniip joined, eythian joined, jcallen joined, tardisx joined, Bucciarati joined, avar joined, spider-mario joined, jsimonet joined, DrEeevil joined, yoleaux joined, statisfiable6 joined, bisectable6 joined, karatkievich.freenode.net sets mode: +vvvv Undercover yoleaux statisfiable6 bisectable6, benchable6 joined, committable6 joined, karatkievich.freenode.net sets mode: +vv benchable6 committable6, unicodable6 joined, evalable6 joined, saki joined, k-man joined, pecastro joined, ttkp6 joined, vytas joined, tinita joined, alnewkirk joined, xfix joined, Gothmog_ joined, eyck joined, jast joined, Guest5935 joined, sftp joined, synopsebot6 joined, diakopter joined, krakan joined, charsbar joined, revere joined, IOninja joined, chee joined, jnthn joined, orevdiabl joined, damnlie_ joined, smash joined, Praise joined, leego joined, profan joined, obra joined, wtw joined, domm1 joined, isacloud joined, cxreg2 joined, eady joined, mls joined, WAABGHP joined, go|dfish joined, JimmyZ joined, bartolin joined, SHODAN joined, tbrowder joined, raydiak joined, jordman joined, luis joined, jantore joined, musca joined, karatkievich.freenode.net sets mode: +vvv unicodable6 evalable6 synopsebot6, broquaint joined, Util joined, mephinet joined, jnap_ joined, cosimo joined, kshannon joined, mrsolo joined
timotimo ah, i remember that fix! 22:53
cale2: "there is more than one way to do it" doesn't mean "every way to do it is the right way"
22:55 ufobat left, cgfbee joined 22:56 parisba_ joined
perlpilot Really, the key thing is that there is a human in the mix. And that human gets to use his or her brain to decide "is this right or not". But sometimes (often?) humans don't want to think about that; they just want to be able to say "I'm doing things in style A, what's the appropriate way to do X in style A" and get a ready-made answer. 22:56
foolish humans. 22:57
;-)
22:57 ribasushi joined 22:58 leedo joined, leedo left
IOninja doesn't think like that at all :o 22:58
22:58 rindolf left
cale2 perl is actually much "lower level" than haskell. If you want to speak in terms of abstractions. haskell abstracts the machine away to such a degree, that many people actually want to go back to visualizing the computer model 22:59
23:00 llfourn joined
timotimo can imagine that 23:00
perlpilot cale2: I dunno. I think that Perl is much broader than Haskell in that it tries to bridge the gap between low level and high level
23:01 kyan joined, eliasr joined, girafe joined
perlpilot But, I'll agree that Perl *can be* (and often is) lower level than Haskell. 23:03
timotimo the way haskell does its lazy evaluation can sometimes make understanding how it actually executes its things really tricky 23:04
but that's no issue when you're not interested in that
which you can totally do
23:05 Actualeyes joined, llfourn left 23:06 BuildTheRobots joined 23:10 john51 left
cale2 I'm confused about how you set an attribute on an object. I thought `has $.thing is rw` did it 23:10
23:10 john51 joined
cale2 m: class Thing { has $.stuff is rw }; my Thing $t.=new; $t.thing = 'hello'; say $t; 23:11
camelia rakudo-moar b51a55: OUTPUT«No such method 'thing' for invocant of type 'Thing'␤ in block <unit> at <tmp> line 1␤␤»
cale2 Yep, that's what I get every time
oops
m: class Thing { has $.stuff is rw }; my Thing $t.=new; $t.stuff = 'hello'; say $t; 23:12
camelia rakudo-moar b51a55: OUTPUT«Thing.new(stuff => "hello")␤»
cale2 what the
IOninja heh 23:14
cale2: maybe you were using $!stuff? That's a private attr
m: class Thing { has $!stuff is rw };
camelia rakudo-moar b51a55: OUTPUT«Potential difficulties:␤ useless use of 'is rw' on $!stuff␤ at <tmp>:1␤ ------> 3class Thing { has $!stuff is rw 7⏏5};␤»
IOninja Though that warns
cale2 If I had a dime for every time I tried to invoke a method on Any 23:15
timotimo well, how are you putting your Anys into your variables? :)
perigrin cale2: Any.port.in($a_storm) ? 23:16
IOninja m: use MONKEY-TYPING; augment class Any { method FALLBACK (|) { say "You got a dime!" } }; my $x; $x.somethin'or-other
camelia rakudo-moar b51a55: OUTPUT«You got a dime!␤»
IOninja ehehe
timotimo well done
IOninja Add a state counter var, a BEGIN that loads data from file and END that writes it back; stick it into a module and alias perl6 to perl6 -MDimeCounter; and you'll know exactly how many dimes you'd get :) 23:21
timotimo yup 23:23
if you develop on multiple machines, may want to build a network-attached storage solution for your dime count
IOninja :D 23:24
b2gills better yet send it over irc to a bot that keeps track, and tweets the cumulative count on a regular basis 23:26
timotimo right, chatbots are the next disruptive technology 23:28
23:31 agentzh left, BenGoldberg joined, cdg left 23:32 lep_ joined 23:33 agentzh joined 23:34 lep-delete left
IOninja ugh... stupid bots are refusing to join. 23:36
they're striking
23:37 agentzh left
IOninja Guess it's my excuse to go gaming today and do the changelog populating tomorrow :} 23:38
timotimo :) :) 23:42
how long until release?
23:48 ugexe joined 23:49 avalenn left 23:50 avalenn joined 23:55 Geth joined, ChanServ sets mode: +v Geth