Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-14

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 timotimo doc is now writing the X:: stuff
00:06 cale2 what's the difference between .. and ...
00:07 IOninja cale2: one's a range operator the other's is sequence operator
00:07 IOninja m: say eager 10..1
00:07 camelia rakudo-moar aac9ef: OUTPUT«()␤»
00:07 IOninja m: say eager 10…1
00:07 camelia rakudo-moar aac9ef: OUTPUT«(10 9 8 7 6 5 4 3 2 1)␤»
00:08 IOninja You can perform operations on a range without reifying all of its elements, but not with a sequence
00:08 IOninja m: say 42 ~~ 0..10
00:08 camelia rakudo-moar aac9ef: OUTPUT«False␤»
00:08 IOninja m: say 42 ~~ 0..50
00:08 camelia rakudo-moar aac9ef: OUTPUT«True␤»
00:08 IOninja And you can make arbitrary sequences
00:08 IOninja m: say (1, 1, *+* … *)[^20]; # fibonacci seq
00:08 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)␤»
00:09 IOninja m: say 42 ~~ 0..Inf # better example of not reifying stuff
00:09 camelia rakudo-moar aac9ef: OUTPUT«True␤»
00:11 IOninja m: say sum 0..99999999999999999999999999999999999999999999999999999999999999999999999999999999999 # another example of usefulness of Range
00:11 camelia rakudo-moar aac9ef: OUTPUT«4999999999999999999999999999999999999999999999999999999999999999999999999999999999950000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
00:14 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)␤»
00:14 IOninja https://en.wikipedia.org/wiki/Hofstadter_sequence#Hofstadter_G_sequence
00:19 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:21 IOninja :)
00:21 cale2 this rosalind question is tricky
00:22 cale2 Given: Positive integers n≤40n≤40 and k≤5k≤5.
00:22 cale2 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).
00:22 cale2 It's like a modified version of the fib sequence
00:23 cale2 sample input = 5 3 ............ sample output = 19
00:23 TimToady we're assuming any two rabbits can reproduce here? :)
00:24 TimToady 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 #perl6
00:24 TimToady so they could just be amoebas instead...
00:25 cale2 exactly
00:28 cale2 "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
00:28 timotimo or maybe it's already done
00:29 timotimo it seems like you have to put in a line for language.html for the tutorial to show up
00:29 timotimo https://docs.perl6.org/language/haskell-to-p6.html - but it can be reached if you know the name
00:30 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␤»
00:32 cale2 m: say (1, 1, *+* * 3 ... *)[5]
00:32 camelia rakudo-moar aac9ef: OUTPUT«142␤»
00:32 cale2 m: say (1, 3, *+* ... *)[5]
00:32 camelia rakudo-moar aac9ef: OUTPUT«18␤»
00:33 cale2 That's it
00:33 cale2 but it should be 19 instead of 18 :S
00:33 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
00:34 TEttinger "french bulldog syndrome"
00:34 cale2 m: say (1, 1, 3, *+* ... *)[5]
00:34 camelia rakudo-moar aac9ef: OUTPUT«11␤»
00:34 cale2 m: say (1, 3, *+* ... *)[5] + 1; # solved :)
00:34 camelia rakudo-moar aac9ef: OUTPUT«19␤»
00:41 timotimo uh oh, need to go to bed soon and i was distracted from writing the weekly …
00:48 BenGoldberg joined #perl6
00:48 aborazmeh joined #perl6
00:48 aborazmeh joined #perl6
00:50 timotimo https://docs.google.com/document/d/1UbTto18TOYbS0qm6yZG-KeII0twfFqkJY0_k8Y8oSJw/edit?usp=sharing - please 2 review
00:53 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
00:54 timotimo tony-o: i wonder why HTTP::Server::Threaded wasn't moved under perl6 org?
00:58 cibs joined #perl6
01:01 pyrimidine joined #perl6
01:02 cale2 Can you define your own iterators in P6?
01:02 timotimo of course
01:03 timotimo our current iterators are already defined in perl6
01:03 cale2 so they will respond to ... ?
01:03 timotimo huh?
01:03 cale2 doesn't ... call the .successor method on your iterator?
01:03 timotimo no, it calls .succ on each value
01:04 timotimo to go through an iterator you want something like for, or map
01:04 timotimo well, really what i mean is, you want to wrap a Seq around the iterator
01:04 timotimo then you can do whatever you like
01:05 timotimo i'll go ahead and publish the post
01:06 timotimo done and done
01:06 timotimo https://p6weekly.wordpress.com/2017/02/14/2017-07-more-than-one-zero/ read up, everybody!
01:09 kyan joined #perl6
01:12 cale2 timotimo: the reason I ask is because it turns out that the rabbits' age needs to be accounted for
01:12 cale2 so they only multiply after they've sat out for their first month of existence lol
01:14 Ben_Goldberg joined #perl6
01:16 john51 joined #perl6
01:20 Geth ¦ doc: 5a14552dd7 | (Brad Gilbert)++ | doc/Language/haskell-to-p6.pod6
01:20 Geth ¦ doc: POD not Markdown
01:20 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5a14552dd7
01:21 john51 joined #perl6
01:21 BenGoldberg_ joined #perl6
01:25 llfourn joined #perl6
01:26 john51 joined #perl6
01:26 pyrimidine joined #perl6
01:30 cale2 https://glot.io/snippets/en3ytrg8zy
01:31 john51 joined #perl6
01:32 silug joined #perl6
01:33 cale2 I"m getting "Cannot assign to a readonly variable or a value" over and over
01:34 masak probably don't want `.=` on that `.push`
01:34 cale2 https://glot.io/snippets/en3ytrg8zy
01:34 cale2 updated
01:34 masak .push is already mutating
01:34 cale2 it's thinking that the array is read only :S
01:34 timotimo right, you want <-> $age instead of -> $age
01:35 cale2 huh?
01:35 masak `for $pairs-produced` will only ever loop once, over that Int
01:35 timotimo that, too
01:35 cale2 That's fine, there's only one item
01:35 timotimo hi masak :)
01:35 cale2 so it should only loop once
01:35 masak ahoj timotimo
01:36 john51 joined #perl6
01:36 timotimo so it doesn't matter what you give for $pairs-produced?
01:36 timotimo even though it's a required parameter?
01:36 masak cale2: then you can remove the for loop
01:36 cale2 It starts with one item in the array, then adds items as it goes on
01:38 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␤␤»
01:38 timotimo anyway, putting @*ARGS = <--months=5 --pairs-produced=3>; at the beginning and turning the -> into <-> makes it run
01:38 timotimo m: say phi
01:38 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    phi used at line 1␤␤»
01:38 timotimo time for me to sleep! o/
01:39 masak cale2: that innermost for loop will only ever loop once, though
01:39 masak here, let me demonstrate
01:39 masak m: my $number = 42; for $number { say "OH HAI" }
01:39 camelia rakudo-moar aac9ef: OUTPUT«OH HAI␤»
01:39 BenGoldberg m: constant Φ = 5 ** .5 * .5 + .5; say Φ;
01:39 camelia rakudo-moar aac9ef: OUTPUT«1.61803398874989␤»
01:40 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 φ?
01:40 BenGoldberg m: constant Φ = 5 ** .5 * .5 + .5; say Φ; constant ϕ = Φ - 1; say ϕ;
01:40 camelia rakudo-moar aac9ef: OUTPUT«1.61803398874989␤0.618033988749895␤»
01:40 cale2 oh nevermind, i didn't read the lines correctly :D
01:41 cale2 masak: except it is an array of numbers
01:41 cale2 here it is fixed: https://glot.io/snippets/en3ytrg8zy
01:42 masak cale2: `Int :$pairs-produced!` is not an array of numbers, it's an Int
01:42 masak you're looping over *one* Int
01:42 cale2 what code are you looking at?
01:42 masak eventually I will be able to convince you of this -- can't we skip to where I already did? :)
01:42 masak cale2: I'm looking at the latest URL you pasted
01:43 masak I think you are sending the same URL over and over
01:43 masak don't know if you want that
01:43 Xliff for (^$pairs-produced) { @rabbit-ages.push: 1 }
01:43 masak better
01:43 cale2 Xliff: ah, that loop!
01:43 masak parens unnecessary :)
01:43 Xliff masak: :P
01:44 Xliff Allow me my syntactic idiosyncracies
01:44 masak wouldn't dream of doing otherwise :)
01:44 Xliff Because ^3.pick doesn't work without the parens.
01:44 masak put in double parens for all I care :P
01:44 Xliff (((((masak))))).roll
01:44 * masak rolls
01:44 * masak rolls with it
01:45 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␤␤»
01:45 BenGoldberg m: (((((enum <masak>))))).roll.say
01:45 camelia rakudo-moar aac9ef: OUTPUT«masak => 0␤»
01:45 Xliff m: (((((enum <masak BenGoldberg Xliff>))))).roll.say
01:45 camelia rakudo-moar aac9ef: OUTPUT«BenGoldberg => 1␤»
01:45 Xliff m: (((((enum <masak BenGoldberg Xliff>))))).roll.say
01:45 camelia rakudo-moar aac9ef: OUTPUT«BenGoldberg => 1␤»
01:45 Xliff m: (((((enum <masak BenGoldberg Xliff>))))).pick.say
01:45 camelia rakudo-moar aac9ef: OUTPUT«Xliff => 2␤»
01:46 AlexDaniel m: say ^50 .pick
01:46 camelia rakudo-moar aac9ef: OUTPUT«5␤»
01:46 AlexDaniel Xliff: oh really?
01:46 BenGoldberg m: [<3d6>].roll.say
01:46 camelia rakudo-moar aac9ef: OUTPUT«3d6␤»
01:46 Xliff Huh!
01:46 Xliff m: ^50.pick
01:46 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)␤»
01:46 Xliff m: ^50 .pick
01:46 camelia rakudo-moar aac9ef: ( no output )
01:46 Xliff m: ^50 .pick.say
01:46 camelia rakudo-moar aac9ef: OUTPUT«33␤»
01:47 Xliff That space should have no effect
01:47 Xliff But it does.... aaaaieee!
01:47 BenGoldberg rakudobug?
01:47 Xliff Yeah. That's an LTA
01:47 AlexDaniel I don't think it is a bug
01:48 Xliff *shrug*
01:48 Xliff I prefer parens there than a space.
01:48 AlexDaniel I don't know the reasoning though
01:48 Xliff Of course, my preference means little.
01:49 masak the space having an effect is a relatively new thing
01:49 masak used to be a TTIAR
01:49 AlexDaniel Xliff: I don't think so. You can use parens in your code as much as you want, this means a lot :)
01:50 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␤␤»
01:50 BenGoldberg m: sub infix:<d>(Int $dice, $sides is copy) { $sides = 1..$sides; [+] $sides.pick }; say 3 d 6 for 1..10;
01:50 camelia rakudo-moar aac9ef: OUTPUT«5␤6␤1␤5␤6␤3␤2␤6␤5␤2␤»
01:50 BenGoldberg m: sub infix:<d>(Int $dice, $sides is copy) { $sides = 1..$sides; [+] $sides.pick xx $dice }; say 3 d 6 for 1..10;
01:50 camelia rakudo-moar aac9ef: OUTPUT«8␤8␤7␤9␤11␤8␤14␤11␤10␤15␤»
01:50 AlexDaniel masak: wasn't it like this right from the start? I mean, when infix . was introduced
01:51 AlexDaniel c: all ^50 .pick.say
01:51 masak AlexDaniel: there's no `infix:<.>`
01:51 masak AlexDaniel: you might be thinking of `infix:<.=>`
01:51 committable6 AlexDaniel, https://gist.github.com/e101be26628e09d4cb91022d20a6745d
01:51 AlexDaniel m: ^50 . pick . say
01:51 camelia rakudo-moar aac9ef: OUTPUT«36␤»
01:52 AlexDaniel well, it *looks* like an infix, but whatever
01:52 masak maybe I'm wrong. maybe that's how the new feature works :)
01:52 masak in which case you're absolutely right
01:52 BenGoldberg Prior to 2015.10, it produced a 'two terms in a row' type error.
01:52 itaipu joined #perl6
01:52 AlexDaniel bisect: 50 . say
01:52 masak but in that case, "when infix . was introduced" was fairly recently
01:52 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
01:52 bisectable6 AlexDaniel, Output on both points: 50
01:52 masak 2015.10 sounds about right
01:52 AlexDaniel bisect: ^0 . pick . say
01:52 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
01:52 bisectable6 AlexDaniel, Output on both points: Nil
01:53 BenGoldberg m: ^0 . pick . say;
01:53 camelia rakudo-moar aac9ef: OUTPUT«Nil␤»
01:53 AlexDaniel bisect: ^1 .pick.say
01:53 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=aac9efc) the exit code is 0 and the output is identical as well
01:53 bisectable6 AlexDaniel, Output on both points: 0
01:53 derrick joined #perl6
01:53 AlexDaniel ahhh right
01:53 AlexDaniel wtf am I doing
01:53 AlexDaniel bisect: old=2015.09 50 . say
01:53 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.09 new=aac9efc). Old exit code: 1
01:53 AlexDaniel here
01:53 bisectable6 AlexDaniel, bisect log: https://gist.github.com/0ae6e9a3fbfa7e377e2594003b551b29
01:53 bisectable6 AlexDaniel, (2015-09-26) https://github.com/rakudo/rakudo/commit/cb25b2f475f31335d77d018474482aceec2c74de
01:54 AlexDaniel masak: see! It says infix:<.> right there :)
01:54 derrick hello
01:55 AlexDaniel derrick: hello :)
01:55 AlexDaniel c: cb25b2f47 ^50 .pick.say
01:55 committable6 AlexDaniel, ¦«cb25b2f»: 18
01:55 AlexDaniel masak: and yes, it worked like this right from the start (the start being the introduction of infix:<.>)
01:56 cale2 I'm trying to get the output to mirror this pic lol
01:56 cale2 https://cdn-images-1.medium.com/max/600/1*S8NqTJkpoIFrXH4gzyrDsQ.png
01:56 AlexDaniel cale2: perhaps consider generated some input for graphviz?
01:56 AlexDaniel u: bunny
01:56 unicodable6 AlexDaniel, U+1F46F WOMAN WITH BUNNY EARS [So] (👯)
01:56 AlexDaniel u: rabbit
01:56 unicodable6 AlexDaniel, U+1F407 RABBIT [So] (🐇)
01:56 unicodable6 AlexDaniel, U+1F430 RABBIT FACE [So] (🐰)
01:57 cale2 how do I use those unicode symbols in my code?
01:57 cale2 m: say "U+1F430"
01:57 camelia rakudo-moar aac9ef: OUTPUT«U+1F430␤»
01:57 masak AlexDaniel: I sit corrected. :)
01:57 cale2 m: say U+1F430
01:57 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say U+17⏏5F430␤»
01:58 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␤»
01:58 AlexDaniel say “\x[1F430]”
01:58 AlexDaniel m: say “\x[1F430]”
01:58 camelia rakudo-moar aac9ef: OUTPUT«🐰␤»
01:58 AlexDaniel m: say “\c[RABBIT]”
01:58 camelia rakudo-moar aac9ef: OUTPUT«🐇␤»
01:58 BenGoldberg m: "\c[PILE OF POO]".say
01:58 camelia rakudo-moar aac9ef: OUTPUT«💩␤»
01:59 AlexDaniel .oO( … everyone's favorite )
01:59 BenGoldberg This would be more fun if hexchat suppored colored unicode.
01:59 masak AlexDaniel: that commit message also pegs TimToady as not a big proponent of infix:<.> and fluent programming...
02:00 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
02:01 AlexDaniel I'm using it all the time
02:01 masak I've only seen it used here on channel by enthusiastic youngsters
02:01 * masak .oO( "get off my lawn" indeed )
02:01 AlexDaniel ఠ_ఠ
02:01 masak I keep putting in those backspaces at the end of lines, too
02:01 masak the unspace markers, I mean
02:02 cale2 what does infix<.> do?
02:02 masak and I keep using parentheses to indicate precedence, as honest hard-working citizens do
02:02 AlexDaniel m: 42.say
02:02 camelia rakudo-moar aac9ef: OUTPUT«42␤»
02:02 AlexDaniel m: 42 . say
02:02 camelia rakudo-moar aac9ef: OUTPUT«42␤»
02:02 AlexDaniel cale2: it allows you to put spaces around the dot
02:02 cale2 that confuses it with function composition, no?
02:03 AlexDaniel You mean ∘?
02:04 masak nothing to do with function composition
02:04 masak the `.` here still means public attribute/method call
02:05 AlexDaniel masak: but there is a line, right? You don't write 25 + (5 × 2) do you?
02:06 masak AlexDaniel: no, I write `25 + 5 * 2` :)
02:07 AlexDaniel masak: then I'm not sure what you've meant with your message about parens to indicate precedence
02:08 AlexDaniel by the way:
02:08 AlexDaniel m: 42 . WHAT
02:08 camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤Method call must either supply a name or have a child node that evaluates to the name␤»
02:09 masak that could be seen as a bug, I think
02:09 masak it's because .WHAT is "special"
02:09 AlexDaniel yea, WAT
02:09 AlexDaniel but there is a ticket for this
02:10 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 masak it doesn't mean I enjoy putting in unnecessary parentheses in my arithmetic expressions.
02:10 AlexDaniel RT #126855
02:10 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=126855
02:12 itcharlie joined #perl6
02:14 SmokeMachine Where can I read the implementation of infix:<.>?
02:16 geekosaur s: &infix<.>
02:16 SourceBaby geekosaur, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Undeclared routine:â�¤    infix used at line 6. Did you mean 'indir', 'index'?â�¤â�¤
02:16 geekosaur s: &infix:<.>
02:16 SourceBaby geekosaur, Something's wrong: �ERR: [31m===[0mSORRY![31m===[0m Error while compiling -e�Malformed postfix call�at -e:1�------> [32m.[33m�[31m<EOL>[0m�
02:16 geekosaur sourcebot is never easy to figure out :/
02:16 masak s: infix:<.>
02:16 SourceBaby masak, Something's wrong: �ERR: [31m===[0mSORRY![31m===[0m Error while compiling -e�Malformed postfix call�at -e:1�------> [32m.[33m�[31m<EOL>[0m�
02:18 masak something's wrong indeed :/
02:19 SmokeMachine Github search ignores :<.>
02:22 cdg joined #perl6
02:27 llfourn joined #perl6
02:29 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␤␤
02:29 cale2 Why does it say there's no method "age" for the grep https://glot.io/snippets/en3ytrg8zy
02:29 SmokeMachine s: &infix:<+>
02:29 SourceBaby SmokeMachine, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/Numeric.pm#L186
02:29 cale2 it should have a read method for the objects
02:30 SmokeMachine s: &infix:<.>
02:30 SourceBaby SmokeMachine, Something's wrong: �ERR: [31m===[0mSORRY![31m===[0m Error while compiling -e�Malformed postfix call�at -e:1�------> [32m.[33m�[31m<EOL>[0m�
02:31 AlexDaniel mch: my $x = ‘.’; say infix:[$x]
02:31 committable6 AlexDaniel, https://gist.github.com/26556ae2480434452912d5b21d3bc460
02:31 TEttinger uhhh what happened to the colors?
02:31 BenGoldberg s: &infix:<+>
02:31 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/Numeric.pm#L186
02:32 AlexDaniel TEttinger: colors never worked with SourceBaby
02:32 TEttinger oh ok
02:32 SmokeMachine AlexDaniel: thanks!
02:32 BenGoldberg I'm guessing that SourceBaby isn't configured to use irc colors, and uses xterm colors instead.
02:32 AlexDaniel SmokeMachine: sorry… for what?
02:32 BenGoldberg Err, ansi colors
02:33 AlexDaniel BenGoldberg: it just dumps whatever it recieves, so yes
02:33 SmokeMachine Oh! No source... :(
02:33 AlexDaniel the easiest way to fix it is to use RAKUDO_ERROR_COLOR
02:34 AlexDaniel s: %*ENV<RAKUDO_ERROR_COLOR> = 0; &infix:<.>
02:34 SourceBaby AlexDaniel, Ehhh... I'm too scared to run that code.
02:34 AlexDaniel :P
02:34 SmokeMachine AlexDaniel: sorry.. I got confused... I thought that was the source of &infix:<.>
02:34 AlexDaniel SmokeMachine: well, the source is right here:
02:35 AlexDaniel bisect: old=2015.09 50 . say
02:35 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.09 new=aac9efc). Old exit code: 1
02:35 bisectable6 AlexDaniel, bisect log: https://gist.github.com/aae6c4dd45600bc63a32e80115642a43
02:35 bisectable6 AlexDaniel, (2015-09-26) https://github.com/rakudo/rakudo/commit/cb25b2f475f31335d77d018474482aceec2c74de
02:35 SmokeMachine AlexDaniel: thanks!
02:35 AlexDaniel not only the source, it is the whole commit :)
02:36 AlexDaniel .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]
02:36 SourceBaby BenGoldberg, Something's wrong: �ERR: [31m===[0mSORRY![31m===[0m Error while compiling -e�Malformed postfix call�at -e:1�------> [32m.[33m�[31m<EOL>[0m�
02:37 BenGoldberg s: ((BEGIN %*ENV<RAKUDO_ERROR_COLOR> = 0),&infix:<+>)[1]
02:37 SourceBaby BenGoldberg, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/Numeric.pm#L186
02:37 BenGoldberg s: ((BEGIN %*ENV<RAKUDO_ERROR_COLOR> = 0),&infix:<.>)[1]
02:37 SourceBaby BenGoldberg, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Malformed postfix call␤at -e:1␤------> .<HERE><EOL>␤
02:37 AlexDaniel \o/
02:37 AlexDaniel SourceBaby: source
02:37 SourceBaby AlexDaniel, See: https://github.com/zoffixznet/perl6-sourceable
02:40 AlexDaniel https://github.com/zoffixznet/perl6-sourceable/pull/5
02:40 AlexDaniel color…s
02:46 BenGoldberg color xx 0
02:46 cale2 I should just make a stack overflow account for my P6 questions lol
02:46 cale2 m: say (1,2,3,4,5).grep( $_ > 5);
02:46 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␤␤»
02:46 AlexDaniel m: say (1,2,3,4,5).grep(* > 5);
02:46 camelia rakudo-moar aac9ef: OUTPUT«()␤»
02:46 cale2 how do you get around that?
02:46 AlexDaniel or
02:46 AlexDaniel m: say (1,2,3,4,5).grep({$_ > 5});
02:46 camelia rakudo-moar aac9ef: OUTPUT«()␤»
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:48 adu joined #perl6
02:48 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…»
02:48 cale2 m: say (1,2,3,4,5).grep( say $_.WHAT);
02:48 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␤␤»
02:50 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 Actualeyes joined #perl6
02:50 geekosaur m: say (* + 5).WHAT
02:50 camelia rakudo-moar aac9ef: OUTPUT«(WhateverCode)␤»
02:51 pyrimidine joined #perl6
02:51 AlexDaniel m: say {$_ + 5}.WHAT
02:51 camelia rakudo-moar aac9ef: OUTPUT«(Block)␤»
02:54 pyrimidi_ joined #perl6
02:57 fil512 joined #perl6
02:57 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?
02:57 cale2 hi fil512
02:58 fil512 hi cale
02:58 fil512 i want to create a rule like:
02:58 fil512 token TOP { ^ [ <comment> | <chunk> ]* $ }
02:58 fil512 where comment is '\\' \N*
02:59 fil512 I want <chunk> to be everything else
02:59 fil512 almost like a !<comment>
02:59 fil512 but I can't figure out how to write that
03:00 labster joined #perl6
03:01 AlexDaniel cale2: @a.push(@b.pop) ?
03:02 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 fil512 I could just use split, but eventually I am going to be parsing stuff inside the chunks
03:02 fil512 would like to use the grammar construct if i can
03:06 fil512 if i put .+ in <chunk> it just gobbles up everything
03:06 leah2 joined #perl6
03:06 AlexDaniel fil512: well, you can use something like: chunk { <!comment>+ }
03:07 AlexDaniel but if I were you I'd try to rethink what exactly I am trying to achieve :)
03:07 cale2 AlexDaniel: for @nursery -> $pair {        $pair.grow-up;              if $pair.of-age {         @nursery.pop: $pair;         @playpen.push: $pair;       }     }
03:08 cale2 moving from the nursery to the playpen ;)
03:08 cale2 I guess I'd need the index maybe...
03:08 fil512 <!comment>+ hangs
03:08 fil512 got into an infinite loop
03:08 fil512 anyways that won't really work because I'm going to want to parse out stuff in the <chunk> later on anyway
03:09 cale2 fil512: May be better to make a stack overflow post that clearly outlines what you expect to happen and what happens
03:09 AlexDaniel fil512: if you gist your example we can figure out why it hangs :)
03:09 cale2 I'm not an expert in grammars
03:09 fil512 it just feels like this has got to be a common parsing thing people need to do
03:09 fil512 parse gunk out, and then also keep all the non-gunk for parsing later
03:09 fil512 it's a lot like "split"
03:10 AlexDaniel keep all the non-gunk for parsing later? Like multi-pass parsing? :S
03:11 AlexDaniel fil512: ah, right
03:11 AlexDaniel fil512: it's probably { <!comment>+ . }
03:11 AlexDaniel oops
03:11 AlexDaniel fil512: it's probably { [<!comment> .]+ }
03:13 AlexDaniel cale2: what's @nursery.pop: $pair; ?
03:13 AlexDaniel how come you pass an argument to pop?
03:13 AlexDaniel and you're also iterating it… you don't want .pop at all
03:16 AlexDaniel 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 movl joined #perl6
03:20 cale2 AlexDaniel: https://glot.io/snippets/en41uv8b4w
03:21 cale2 if gather/take _removes_ the item from the list, that may work
03:21 xtreak joined #perl6
03:21 AlexDaniel cale2: it's grep that does it
03:22 AlexDaniel ah wait!
03:22 AlexDaniel categorize?
03:22 AlexDaniel m: say categorize { $_ %% 2 }, (1, 7, 6, 3, 2);
03:22 camelia rakudo-moar aac9ef: OUTPUT«{False => [1 7 3], True => [6 2]}␤»
03:23 AlexDaniel cale2: in your case it would be @nursery.categorize: { $pair.of-age }
03:24 AlexDaniel 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]}␤»
03:24 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
03:24 AlexDaniel so what do you need exactly…
03:24 AlexDaniel if you want to take something and throw away the rest, then use grep
03:25 AlexDaniel if you want to end up with two piles of something, then use categorize
03:25 AlexDaniel (or even .classify)
03:28 llfourn joined #perl6
03:30 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]}␤»
03:30 cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.categorize: { $_ %% 2 };
03:30 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 #perl6
03:31 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:34 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 '6⏏5 21 7' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
03:34 cale2 m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.values.categorize({ $_ %% 2 });
03:34 camelia rakudo-moar aac9ef: OUTPUT«{True => [[6 2] [1 7]]}␤»
03:34 BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>;
03:34 camelia rakudo-moar aac9ef: OUTPUT«[6 2]␤»
03:35 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␤␤»
03:35 BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>.categorize: { $_ %% 2 };
03:35 camelia rakudo-moar aac9ef: OUTPUT«{True => [6 2]}␤»
03:35 BenGoldberg m: my %stuff = categorize { $_ %% 2 }, (1, 7, 6, 3, 2); %stuff<False>.pop; say %stuff.<True>.categorize: { $_ % 3 };
03:35 camelia rakudo-moar aac9ef: OUTPUT«{0 => [6], 2 => [2]}␤»
03:36 cale2 I need to join together the categories and re-do it
03:37 noganex joined #perl6
03:37 cale2 How do you round-trip from categories, back to a list, back to categories
03:37 AlexDaniel whyyy
03:38 AlexDaniel 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 cale2 ohhhh, I'll just keep an array and then a separate categorized thing
03:40 cale2 two different structures
03:43 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 AlexDaniel just don't delete stuff you don't want to delete, right? :)
03:50 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: { …»
03:50 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«[1 3 1 3 1]␤»
03:50 cale2 I need categorize to keep object references
03:57 pyrimidine joined #perl6
03:59 cale2 going back to nursery and playpen setup
03:59 cale2 m: for (1,2,3,4,5).pairs -> $i, $num { say $i ~ $num }
03:59 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␤␤»
04:00 cale2 what's with that error?
04:04 * [Coke] yawns.
04:05 cale2 [Coke]: why didn't 5 get printed in my example above?
04:06 [Coke] you have 5 items and two params.
04:06 [Coke] m: for (1,2,3,4,5).pairs -> $i, $num? { say $i ~ $num }
04:06 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␤»
04:06 cale2 .pairs grabs the index and the item
04:06 [Coke] m: for (1,2,3,4,5).pairs -> $i, $num? { say $i ~ $num // 'empty' }
04:06 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␤»
04:07 [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␤»
04:07 [Coke] I am missing something in the def check, but the ? on the parameter is the key bit - makes $num optional.
04:07 [Coke] otherwise it's required, and on the last iteration you wouldn't have had one, so it can't go
04:08 cale2 Oh, I think what I want is .kv
04:08 cale2 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
04:09 [Coke] er..
04:09 [Coke] right. 5 interleaved pairs.
04:09 cale2 m: say (1,2,3,4,5).kv; for (1,2,3,4,5).kv -> $index, $item { say $index ~ $item }
04:09 camelia rakudo-moar aac9ef: OUTPUT«(0 1 1 2 2 3 3 4 4 5)␤01␤12␤23␤34␤45␤»
04:09 cale2 the first is just a plain list
04:10 cale2 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␤»
04:10 cale2 a Seq :)
04:10 [Coke] m: for (1,2,3,4,5).pairs.kv > $i, $num { say $i ~ $num}
04:10 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}␤»
04:10 [Coke] m: for (1,2,3,4,5).pairs.kv -> $i, $num { say $i ~ $num}
04:10 camelia rakudo-moar aac9ef: OUTPUT«00   1␤11    2␤22    3␤33    4␤44    5␤»
04:10 [Coke] ^^ there you go
04:10 [Coke] not that $num is a $pair, there.
04:10 [Coke] *note
04:11 [Coke] 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:11 zakharyas joined #perl6
04:22 b2gills fil512: you could try  token TOP { ^ [ <comment> || <chunk> ]* $ }; token comment { '\\' \N* <eol> }; token chunk { \N* <eol> }; token eol { \n | $ }
04:30 llfourn joined #perl6
04:33 Cabanoss- joined #perl6
04:33 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:39 BenGoldberg joined #perl6
04:49 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 cale2 That is the most infuriating error
04:49 Tonik joined #perl6
04:50 pyrimidine joined #perl6
04:53 BenGoldberg joined #perl6
04:55 pyrimidine joined #perl6
04:56 aborazmeh joined #perl6
04:56 aborazmeh joined #perl6
04:57 samcv ok i'm rewriting my grant proposal in pod since i guess the ian hague grant and general grants have different formats
04:58 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 samcv so they don't want by hour? i'm uncertain
05:13 pyrimidine joined #perl6
05:17 wamba joined #perl6
05:26 labster joined #perl6
05:30 itcharlie left #perl6
05:31 llfourn joined #perl6
05:33 CIAvash joined #perl6
05:49 cibs joined #perl6
05:55 curan joined #perl6
05:55 Beginner_Guy joined #perl6
06:06 aborazmeh joined #perl6
06:06 aborazmeh joined #perl6
06:32 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:33 llfourn joined #perl6
06:35 ssotka joined #perl6
06:39 repl joined #perl6
06:39 seatek left #perl6
06:48 RabidGravy joined #perl6
06:55 xtreak joined #perl6
06:57 darutoko joined #perl6
06:59 pyrimidine joined #perl6
07:00 bjz joined #perl6
07:00 aborazmeh joined #perl6
07:00 aborazmeh joined #perl6
07:05 cyphase joined #perl6
07:08 wamba joined #perl6
07:34 llfourn joined #perl6
07:42 parv joined #perl6
07:47 ufobat joined #perl6
07:53 AlexDaniel joined #perl6
07:57 g4 joined #perl6
08:25 repl joined #perl6
08:31 abraxxa joined #perl6
08:35 llfourn joined #perl6
08:36 agentzh joined #perl6
08:39 dakkar joined #perl6
08:40 xtreak joined #perl6
08:46 xtreak joined #perl6
08:47 ccntrq joined #perl6
08:50 bjz joined #perl6
09:03 pyrimidine joined #perl6
09:04 jonas1 joined #perl6
09:16 zakharyas joined #perl6
09:17 bjz_ joined #perl6
09:20 wamba joined #perl6
09:23 espadrine joined #perl6
09:26 xtreak joined #perl6
09:28 timotimo tony-o: well, that would just be consistent :P
09:34 timotimo Xliff: did you know about "^3 .pick", though? :)
09:35 timotimo Xliff: never mind, someone else already pointed it out
09:37 llfourn joined #perl6
09:41 koki1 joined #perl6
09:43 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 #perl6
09:57 mrdside hi. can i put in grammar something like "(\n|EOF)" (new line or end of file)?
09:57 moritz EOF is $
09:57 moritz though if you match a $$ (logical end-of-line), that also matches at end-of-file
09:58 moritz m: say so "ab\n" ~~ /\n$$/
09:58 camelia rakudo-moar aac9ef: OUTPUT«False␤»
09:58 moritz m: say so "ab\n" ~~ /$$/
09:58 camelia rakudo-moar aac9ef: OUTPUT«True␤»
09:58 moritz m: say so "ab\n" ~~ /$$\n?/
09:58 camelia rakudo-moar aac9ef: OUTPUT«True␤»
09:58 moritz m: say so "ab\n" ~~ /$$\n/
09:58 camelia rakudo-moar aac9ef: OUTPUT«True␤»
09:58 moritz m: say so "ab\n" ~~ /$$\n?/
09:58 camelia rakudo-moar aac9ef: OUTPUT«True␤»
09:58 mrdside moritz: \O/
09:58 moritz m: say so "ab" ~~ /$$\n?/
09:58 camelia rakudo-moar aac9ef: OUTPUT«True␤»
09:58 mrdside moritz: thx
09:58 moritz mrdside: / $$ \n? / should be what you want
09:59 mrdside moritz: for me "СТАЖ.+?(\n|$)" works perfect
10:00 mrdside moritz: grammars solved my problem
10:00 moritz \o/
10:00 moritz mrdside: did the fix with regex instead of token help?
10:01 mrdside moritz: can i use in "method" for grammars any routines?
10:02 mrdside moritz: i need convert string to number
10:02 moritz use +$thestring
10:02 moritz inside a code block
10:02 mrdside moritz: can i `made` immutable list or array?
10:03 mrdside moritz: $/.split('=')[0]+thestring
10:03 moritz m: $_ = 'abc1234'; m/(\d+) { make 2 * +$0 }/ and say $/.made
10:03 camelia rakudo-moar aac9ef: OUTPUT«2468␤»
10:03 moritz mrdside: sure
10:04 mrdside moritz: how? nothing about this in tutorial
10:04 pyrimidine joined #perl6
10:05 moritz mrdside: you can pass any data structure to make
10:05 moritz make (1, 2, 3, 'my mom')
10:05 mrdside moritz: ok, this is cast, but i have string in format "\d+\,\d{2}"
10:06 moritz mrdside: substitute , by . and then use prefix +
10:06 moritz or $first_number + $second_number / 100
10:06 mrdside moritz:  $/.split('=')[0].subst(',','.')
10:14 mrdside moritz: last question. i need to make an array in `.map: *.made`
10:15 moritz mrdside: have you tried .map(*.made).Array ?
10:16 mrdside moritz: no, maybe it's there some more complex tutorial about grammars? i'm absolutely newby in perl.
10:17 pyrimidine joined #perl6
10:17 holyghost joined #perl6
10:29 moritz EGONE
10:39 llfourn joined #perl6
10:46 bjz joined #perl6
10:54 DrForr Egon? Where?
10:57 moritz dust in the wind
10:58 espadrine joined #perl6
11:00 Ven joined #perl6
11:03 nowan_ joined #perl6
11:04 lukaramu joined #perl6
11:05 nhywyll joined #perl6
11:07 agentzh joined #perl6
11:10 holyghost joined #perl6
11:14 IOninja samcv: I put the total sum and not hours in my proposal.
11:15 DarthGandalf joined #perl6
11:17 wamba joined #perl6
11:17 pyrimidine joined #perl6
11:19 xtreak joined #perl6
11:22 rindolf joined #perl6
11:31 tomaw joined #perl6
11:40 llfourn joined #perl6
11:41 zakharyas joined #perl6
11:43 arnsholt Bah. Going back to Perl 5 and remembering to put parens around conditions and the like is hard >.<
11:44 DrForr It gets easier, took me a few months to make the switch seamless.
11:45 masak I find it effortless nowadays
11:45 masak Perl 6 is the odd one out there, actually. well, it and Python
11:50 IOninja erm..
11:50 IOninja And Go... and Rust...
11:50 El_Che and ruby
11:52 bjz_ joined #perl6
11:53 kurahaupo joined #perl6
11:54 kent\n joined #perl6
12:00 telex joined #perl6
12:05 zakharyas joined #perl6
12:05 koki1 joined #perl6
12:08 arnsholt masak: I don't program in either frequently enough to be able to switch subconciously, unfortunately
12:08 arnsholt And Smalltalk is no help at all =)
12:09 parv joined #perl6
12:14 gregf_ joined #perl6
12:17 masak Smalltalk a lot lately?
12:18 DrForr Only at parties.
12:18 arnsholt =D
12:18 arnsholt masak: $dayjob.primary-system is implemented in Smalltalk, so yeah
12:18 arnsholt Smalltalk and SQL, for the most part
12:20 masak cool
12:20 masak what implementation of Smalltalk are you using?
12:20 arnsholt Visual Smalltalk Enterprise
12:20 arnsholt Last updated in 1999 >.<
12:21 masak heh
12:21 arnsholt (One of the major pieces of technical debt in the system, incidentally)
12:21 arnsholt Getting the system over to VAST would probably be a big improvement
12:22 arnsholt (Or one could dream, and say Pharo...)
12:22 pyrimidine joined #perl6
12:28 bjz joined #perl6
12:31 * masak .oO( a VAST improvement -- too obvious a pun? )
12:32 arnsholt Yeah, I almost put it in, but it was almost too easy =)
12:32 arnsholt Pharo being far more advanced would be somewhat less obvious, I guess. Maybe =)
12:34 * masak .oO( Pharo, Pharo, gotta get down on Pharo... pun, pun, pun... ) :P
12:35 * DrForr does a few Pharo shuffles.
12:36 eliasr joined #perl6
12:38 ggoebel joined #perl6
12:41 llfourn joined #perl6
13:02 movl joined #perl6
13:08 ocbtec joined #perl6
13:13 pyrimidine joined #perl6
13:18 pyrimidine joined #perl6
13:20 newcoder joined #perl6
13:20 newcoder What's special about perl6? Why will people use perl6 instead of perl5?
13:20 newcoder Will perl5 be obsolete?
13:26 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:27 DrForr And no, Perl 5 isn't going away for a long time.
13:27 newcoder DrForr: 'side by side' how?
13:27 newcoder DrForr: Either you have to install perl5 or perl6
13:28 DrForr No. One is 'perl', one is 'perl6'.
13:28 newcoder You can't write perl6 program with perl/perl5
13:28 DrForr Yes, you can, with Inline::Perl6.
13:30 DrForr And you can use Perl 5 from Perl 6 with Inline::Perl5 (in perl 6.)
13:31 lukiramu joined #perl6
13:32 newcoder left #perl6
13:33 timotimo well, i'm sure they learned something
13:33 DrForr They're over on freenode #perl since they lost the argument here.
13:35 timotimo it didnt seem like they were arguing?
13:38 DrForr True, they were more telling us how perl 6 works without having any idea.
13:38 IOninja huh?
13:38 cale2 joined #perl6
13:38 IOninja Seems a legitimate question to ask when the two languages are named "Perl" and "Perl 6"
13:39 timotimo yeah
13:39 timotimo and we told them and all is well
13:39 IOninja Saying they're two different languages clarifies any confusion about obsolecense, side-by-sideness, or using one from the other
13:39 DrForr Yeah, it is. That's why I said they can coexist happily.
13:40 itcharlie joined #perl6
13:40 agentzh joined #perl6
13:41 timotimo it seemed like a "obsoleting perl5 is dumb" - "thats why we dont do that" kind of deal
13:42 timotimo i.e. "hey the thing youre not doing is dumb!"
13:43 llfourn joined #perl6
13:43 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:44 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.
13:45 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 moritz cale2: what do you want the error message to say?
13:46 moritz 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
13:46 cale2 There's literally no way to troubleshoot this runtime error given that information
13:46 jnthn Does your code call a method .of-age?
13:47 cale2 The program was running just fine, then at some point, it throws that.
13:47 cale2 Is it because the the array became empty and it tried to call a method on an empty object?
13:48 moritz no
13:48 moritz the array contains an Any
13:48 moritz which you could catch earlier if you gave the loop param a type constriant
13:48 moritz *constraint
13:48 moritz for @array -> MyType $x { ... }
13:48 moritz then it'll tell you that it got an Any but expected a MyType
13:49 cale2 Any may as well be a Null
13:50 cale2 It's probably because the .kv method is not giving me the index and the object
13:50 cale2 it's probably giving me the index and another index or something like that
13:51 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␤␤»
13:51 timotimo grr
13:51 timotimo m: say <foo bar baz quux>.kv.perl
13:51 camelia rakudo-moar aac9ef: OUTPUT«(0, "foo", 1, "bar", 2, "baz", 3, "quux").Seq␤»
13:51 timotimo it gives you an index then an obj then an index etc
13:51 timotimo so you iterate with two vars
13:52 cale2 I wish it were true man
13:52 timotimo show your code please
13:53 Vasyl joined #perl6
13:54 timotimo test
13:55 timotimo connection is breaking up...
13:55 jnthn cale2: Did you try `say @the-thing-you're-looping-over.kv.perl` or some such?
13:55 jnthn To see what's actually there?
13:55 cale2 https://glot.io/snippets/en4jdfyvyg
13:57 timotimo urgh this ssh app wont let me click the link nor copy the alternative buffer
13:57 cale2 try this link https://glot.io/snippets/en4jdfyvyg/raw
13:58 timotimo k appointment. l8r!
14:00 perlpilot good morning
14:02 perlpilot cale2: What do you think @nursery[$i]:delete does?
14:02 perlpilot cale2: That's how you're getting Any in your @nursery btw  :)
14:02 IOninja DrForr: do people often come to #perl with questions about or related to Perl 6?
14:03 DrForr Not often, but it does happen.
14:03 perlpilot and usually they get redirected here.
14:04 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 IOninja m: my @a = ^10; @a[5]:delete; .say for @a
14:04 camelia rakudo-moar aac9ef: OUTPUT«0␤1␤2␤3␤4␤(Any)␤6␤7␤8␤9␤»
14:05 IOninja nm
14:05 cale2 I need to remove the selected item from the array and place that same item in the other array
14:05 cale2 there's no way to do it other than that...
14:05 IOninja Well, there's splice()
14:06 IOninja wonder how well that place with looping...
14:06 cale2 splice doesn't take a reference to the object, it only copies it
14:06 cale2 I think...
14:07 perlpilot eh?
14:07 IOninja references? wat?
14:07 timotimo doesnt it return the stuff it took out?
14:07 jnthn Splice works in-place on the array it's called on
14:07 IOninja m: my @b; my @a = ^10; for @a.kv -> $k, $v { @b.append: @a.splice: $k, 1; $v.say }; say @b
14:07 camelia rakudo-moar aac9ef: OUTPUT«0␤2␤4␤6␤8␤[0 2 4 6 8]␤»
14:08 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␤»
14:08 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«0␤1␤2␤3␤4␤5␤7␤8␤9␤[5]␤»
14:08 IOninja seems to work well
14:08 timotimo m: say <a b c d e f>.splice(3,2,0)
14:08 camelia rakudo-moar aac9ef: OUTPUT«No such method 'splice' for invocant of type 'List'␤  in block <unit> at <tmp> line 1␤␤»
14:08 cale2 i'll try it now
14:08 timotimo ah
14:08 IOninja only Arrays
14:08 timotimo m: say [<a b c d e f>].splice(3,2,0)
14:08 camelia rakudo-moar aac9ef: OUTPUT«[d e]␤»
14:08 IOninja and Buf
14:08 timotimo returns what it takes out
14:09 timotimo which you can then append
14:09 timotimo m: say [<a b c d e f>].splice(3,1,0).perl
14:09 camelia rakudo-moar aac9ef: OUTPUT«["d"]␤»
14:09 timotimo one element list if only 1 removed
14:09 cale2 it worked! now to fix the broken logic
14:09 IOninja \o/
14:11 cale2 Adding type annotations to the arrays didn't work though.
14:11 sjn joined #perl6
14:12 IOninja Hm, my thing did'nt work right tho. Why does @b have 5  yet the chopped thing was a 6
14:12 cdg joined #perl6
14:12 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]␤»
14:12 IOninja ok...
14:12 IOninja That's weird
14:13 timotimo well
14:13 timotimo the k and v are set from "for"
14:13 timotimo those dont change from under your feet
14:13 cale2 it's because of this line: @playpen.push: @nursery.splice($i, 1);
14:13 cale2 I had to flatten it to: @playpen.push: |@nursery.splice($i, 1);
14:13 perlpilot cale2: or use append instead of push
14:14 matiaslina joined #perl6
14:14 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!
14:15 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:16 perlpilot iterating over something you're modifying is fraught
14:16 IOninja Yeah, looks like that's the case
14:18 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.
14:18 IOninja m: my @a = "a".."c"; for @a.kv -> $k, $v { say "Cut({@a.splice: $k, 1})" if $k == 1; $v.say };
14:18 camelia rakudo-moar aac9ef: OUTPUT«a␤Cut(b)␤b␤»
14:18 cale2 perlpilot: Perhaps, but doesn't logic affect how we express things?
14:19 IOninja heh
14:19 cale2 sorry *language
14:19 perlpilot cale2: yeah ... assuming you know the language well enough to be appropriately expressive  :-)
14:19 IOninja You've been saying language X is clearer than perl 6 for months here now :)
14:19 cdg_ joined #perl6
14:20 pyrimidine joined #perl6
14:20 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␤»
14:20 IOninja m: my @a = "a".."d"; for @a.kv -> $k, $v { $v.say; say "Cut({@a.splice: $k+1, 1})" if $k == 1; };
14:20 camelia rakudo-moar aac9ef: OUTPUT«a␤b␤Cut(c)␤d␤»
14:20 jnthn I'm quite sure the haskell solution doesn't involve mutating something that's being iterated over. :P
14:20 perlpilot heh, indeed
14:20 * IOninja tries to wrap head around those last two.
14:21 IOninja Success!
14:21 cale2 That may be the case, but I'm writing it in the traditional OO method, no?
14:21 cale2 the update logic is held inside the object. I'm just sending it a message
14:22 jnthn I don't think I'd writing code the mutates something I'm iterating over in any style. :-)
14:22 jnthn *I'd write
14:22 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.
14:22 IOninja Now can I sleep peacefully.
14:24 * IOninja contemplates splicing up a fibonacci sequence
14:25 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
14:26 perlpilot (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}
14:26 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␤»
14:26 IOninja cool!
14:27 sammers joined #perl6
14:27 IOninja It's an evenly odd sequence :P
14:27 perlpilot rotor would be so much simpler and easier to grok.  :)
14:27 IOninja perlpilot: I'd like to see that done with rotor
14:29 perlpilot It would need a 0 in the front that gets thrown away
14:29 IOninja OK
14:30 IOninja 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)␤»
14:31 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 IOninja oops
14:32 camelia rakudo-moar aac9ef: OUTPUT«(timeout)False␤»
14:32 IOninja kinda expected it to be lazy
14:32 cale2 jnthn: How would you update an array of objects without iterating over them?
14:32 perlpilot cale2: you wouldn't *modify* them in the midst of iteration.  You'd still iterate them in some fashion
14:33 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)␤»
14:33 IOninja m: (do for ^Inf { rand })[^10].say
14:33 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.
14:33 cale2 but prepend broke stuff
14:33 IOninja So loop {} is lazy by for ain't? :/
14:34 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 #perl6
14:36 jnthn cale2: I'd probably write it somethin glike this: https://glot.io/snippets/en4khuprse
14:36 jnthn *something like
14:38 jnthn Which gets rid of the need for indexes at all
14:39 SourceBaby joined #perl6
14:39 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 joined #perl6
14:40 NeuralAnomaly joined #perl6
14:41 buggable joined #perl6
14:43 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:44 jkva_ joined #perl6
14:44 llfourn joined #perl6
14:44 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 #perl6
14:46 moritz python doesn't really lack timtowtdi
14:46 moritz they just pretend that
14:46 IOninja hehe
14:46 PotatoGim joined #perl6
14:47 SmokeMachine joined #perl6
14:47 cale2 I think for non-geniuses the freedom can be a curse, yeah
14:47 cale2 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 #perl6
14:49 cale2 for @nursery -> $pair {        push $pair.of-age ?? @playpen !! @growing, $pair;       $pair.grow-up;     }
14:49 cale2 does that `push` function push on to the @nursery?
14:49 jnthn No
14:50 jnthn First argument is what array to push to
14:50 jnthn You could write it ($pair.of-age ?? @playpen !! @growing).push: $pair
14:50 jnthn But putting the push up front felt clearer to me
14:52 IOninja hah
14:52 IOninja So only geniuses are free?
14:52 IOninja dat logic
14:52 BinGOs joined #perl6
14:54 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 IOninja why is it not lazy?
14:54 IOninja Even m: (lazy do for ^Inf { rand })[^10].say is not lazy :\
14:58 dakkar joined #perl6
14:59 cale2 IOninja: only geniuses can write good code in a completely free language
15:01 cognominal joined #perl6
15:03 pyrimidine joined #perl6
15:05 sufrostico joined #perl6
15:05 sufrosti1o joined #perl6
15:08 IOninja [citation needed]
15:09 IOninja English is even freer than Perl 6... am I to assume anyone who can cobble up a coherent sentece is a genius :)
15:10 Peter_R joined #perl6
15:10 sufrosti2o joined #perl6
15:11 huf_ coherent is fairly easy, elegant is much harder :)
15:12 tony-o timotimo: transfered H:S:T
15:12 IOninja cale2: and I assume you can, of course? :)
15:12 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.
15:14 jnthn I've also seen good examples of code in all of those.
15:15 jnthn But I think the goodness was more in good and well-expressed solution to problem.
15:19 agentzh joined #perl6
15:23 timeless joined #perl6
15:29 nightfrog joined #perl6
15:33 perlpilot jnthn: that's been my experience as well.
15:39 cale2 https://glot.io/snippets/en4m83hbra
15:39 cale2 in case anyone is curious
15:41 sena_kun joined #perl6
15:46 llfourn joined #perl6
15:51 IOninja heh
15:52 sufrostico joined #perl6
15:52 sufrosti1o joined #perl6
15:52 sufrosti2o joined #perl6
15:52 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:54 sena_kun >Haskell is clearer
15:54 sena_kun lol
15:55 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
15:55 perlpilot cale2: You could have written the Perl in much the same way as the Haskell btw.
15:55 Actualeyes joined #perl6
15:56 perlpilot cale2: and Haskell *is* better than Perl ... for some problems.   There is no "universal better"  ;-)
15:57 perlpilot 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.
15:58 mspo TMTOWTDI?
15:58 mspo oh yeah
15:58 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
15:58 IOninja :)
15:58 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.
15:59 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 :)
16:00 perlpilot cale2: Haskell is already embedded in Perl 6  :)
16:00 perlpilot It's just embedded really really deep.
16:00 b2gills cale2: why did you use filter(grep) and map in Haskell, but you didn't in Perl 6?
16:01 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
16:02 cale2 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.
16:02 timotimo you shrugged? more like you snapped! :D
16:03 sena_kun it can be. (:
16:03 pyrimidine joined #perl6
16:04 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 :)
16:04 sena_kun cale2, every language is for bad, for good, for ugly programmers too.
16:04 pyrimidine not sure if anyone else is on the o'reilly 'deal of the day' list, but 'Think Perl 6' is today's special :)
16:05 sena_kun many of such bad programmers are professors for some reason. I think there is some connection between! It is conspiracy!
16:06 pyrimidine Not sure if this link will work: http://shop.oreilly.com/product/0636920065883.do?code=DEAL&amp;imm_mid=0ed47e&amp;cmp=em-prog-books-videos-product-dod_think_perl_6_deal
16:08 IOninja pyrimidine: link just leads me to the book... no deal of the days
16:08 pyrimidine add to cart, it's applied after
16:08 perlpilot I didn't realize that book was 475 pages.
16:09 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 IOninja Oh yeah. If you go to cart it knocks off about $20
16:09 pyrimidine yup, it's 50% off
16:10 IOninja Guess I should buy it.
16:10 pyrimidine It's a early release, so it's not complete yet
16:10 pyrimidine but you'll get all the updates
16:11 * [Coke] stares at chdir $?FILE.IO.dirname.IO.dirname (docs/xt/example*)
16:11 [Coke] er, https://github.com/perl6/doc/blob/master/xt/examples-compilation.t#L7
16:11 sena_kun [Coke], to find out relative path, isn't it?
16:12 IOninja pyrimidine: I guess it'd help me learn Perl 6 :)
16:12 IOninja huggable: FindBin
16:12 huggable IOninja, use lib $*PROGRAM.parent.parent.child("lib").Str; # finds lib/ for scripts in bin/ or t/
16:12 pyrimidine IOninja: heh.  I don't think that's a problem :)
16:12 sena_kun [Coke], stupid me wasn't able to find a better way to do so. But it should be rewritten anyway.
16:13 IOninja m: dd [ $?FILE.IO.dirname.IO.dirname ]; dd [ $?FILE.IO.dirname ]
16:13 camelia rakudo-moar aac9ef: OUTPUT«["/"]␤["/tmp"]␤»
16:14 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␤␤»
16:14 IOninja .oO( why is it a Str :/ )
16:14 * [Coke] wouldn't say stupid. I just couldn't tell what it was trying to do.
16:14 [Coke] at first glance, it seemed like a no-op
16:14 IOninja Yeah, to me too
16:15 IOninja m: dd $?FILE.IO.parent
16:15 camelia rakudo-moar aac9ef: OUTPUT«"/tmp".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤»
16:17 IOninja [Coke]: do people ever blow the deadline of the grant delivery they promised and is it a big deal?
16:19 perlpilot IOninja: are you already planning to miss your deadline?
16:21 IOninja perlpilot: nope
16:21 * IOninja re-reads the grant to see what was promised
16:22 itaipu joined #perl6
16:22 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:23 IOninja IANAGM?
16:24 perlpilot i am not a grant manager
16:24 IOninja lol
16:24 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
16:24 gfldex also: i am not a grand mage
16:24 ufobat joined #perl6
16:26 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.
16:26 perlpilot but again, I would imagine that communication is super important in this situation
16:27 perlpilot IOninja: Have I mentioned that you should communicate often with your grant manager?  ;)
16:27 IOninja [Coke] is my grant manager :)
16:31 mspo is perl6 doing GSoC this year?
16:31 mspo or moar
16:33 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
16:33 timotimo oof
16:34 timotimo i seem to recall trouble 2 years ago or so lefzt perlers bitter about gsoc
16:34 timotimo am i misremembering?
16:34 perlpilot TPF applied and was rejected because they were looking for "newer orgs" at one point.
16:34 perlpilot (they == google)
16:35 timotimo pff, age-ism
16:35 IOninja perl's not cool enough!
16:35 mspo yeah they rejected netbsd for 2-3 years for that
16:35 mspo but then last year they let us back in
16:35 mspo so you have to keep at it
16:35 mspo I'm not involved this year so we'll see
16:40 st_elmo joined #perl6
16:40 skaji joined #perl6
16:41 pyrimidine joined #perl6
16:44 cschwenz joined #perl6
16:47 [Coke] (grants) as was said, you only get paid upon completion. There are rules about lack of communication == giving up your grant.
16:47 llfourn joined #perl6
16:48 IOninja Cool.
16:48 mspo we require contract "renewals" per year when paying "for work" instead of "for time"
16:50 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:51 cschwenz left #perl6
16:59 ssotka joined #perl6
17:00 pyrimidine joined #perl6
17:00 [Coke] IOninja: danke.
17:01 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 #perl6
17:14 faraco joined #perl6
17:15 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:16 cale2 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 cale2 One day I'll write a perl6 slang that adds type annotations on the line above the subroutine lol
17:17 b2gills you can already do that
17:17 b2gills m: sub foo ( Str --> Str ){...}; sub foo ( $a ) { $a x 2 }; say foo 'ab'
17:17 camelia rakudo-moar aac9ef: OUTPUT«abab␤»
17:18 b2gills m: sub foo ( Str --> Str ){...}; sub foo ( $a ) { $a x 2 }; say foo 5
17:18 camelia rakudo-moar aac9ef: OUTPUT«55␤»
17:18 IOninja heh
17:19 IOninja 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) ... })␤»
17:20 faraco m: say '"Braile" or "Dancer2" Perl 5'
17:20 camelia rakudo-moar aac9ef: OUTPUT«"Braile" or "Dancer2" Perl 5␤»
17:22 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
17:22 camelia rakudo-moar aac9ef: OUTPUT«55␤»
17:22 IOninja m: multi foo ( Str --> Str ){...}; multi foo ( $a ) { $a x 2 }; say foo "x"
17:22 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␤␤»
17:22 IOninja :D
17:25 timotimo there's a syntax where the return value goes before the sub name
17:26 timotimo it'd also allow a newline in between
17:26 timotimo i never wrote it like that, though
17:26 eroux joined #perl6
17:26 timotimo perhaps it only works with "my ... sub"?
17:29 IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { $x x 2 }; foo "x"
17:29 camelia rakudo-moar aac9ef: ( no output )
17:29 IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { $x x 2 }; foo 42
17:29 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␤»
17:29 IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { ($x x 2).Int }; foo "42"
17:29 camelia rakudo-moar aac9ef: ( no output )
17:29 IOninja m: proto foo (Str --> Str) {*}; multi foo ($x) { ($x x 2).Int }; say foo "42"
17:29 camelia rakudo-moar aac9ef: OUTPUT«4242␤»
17:29 IOninja aww
17:32 timotimo m: my Int␤sub test() { 99 }; say test
17:32 camelia rakudo-moar aac9ef: OUTPUT«99␤»
17:32 timotimo ^- that's how you get at least the return type into the line above the sub itself
17:33 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␤␤»
17:33 IOninja heh cool
17:33 IOninja m: my int sub test() { 42 }; say test
17:33 camelia rakudo-moar aac9ef: OUTPUT«42␤»
17:34 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␤»
17:34 IOninja m: my Nil sub test() { 42 }; say test
17:34 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␤␤»
17:34 timotimo heh.
17:37 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:38 IOninja and sticking a `try` on it makes the operation twice slower...
17:40 IOninja huh weird:
17:40 IOninja m: use nqp; sub x {}; for ^100_000 { $ = nqp::istype(&x, Routine) && nqp::getattr_i(&x, Routine, q|$!yada|) }; say now - INIT now
17:40 camelia rakudo-moar aac9ef: OUTPUT«0.0783406␤»
17:40 IOninja m: use nqp; my &x; for ^100_000 { $ = nqp::istype(&x, Routine) && nqp::getattr_i(&x, Routine, q|$!yada|) }; say now - INIT now
17:40 camelia rakudo-moar aac9ef: OUTPUT«0.1643105␤»
17:41 amalia__ joined #perl6
17:41 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:42 timotimo maybe it can only type-specialize in one case
17:42 IOninja Ah
17:43 IOninja 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 #perl6
17:43 IOninja Oh well, I'll use that
17:47 IOninja Wonder if "redeclaration of routine" looks weird: https://gist.github.com/zoffixznet/a6aaf3f1323b362401f4589317feea14
17:48 IOninja since my &x is not a routine, is it?
17:48 IOninja m: my &x; say &x.^name
17:48 camelia rakudo-moar aac9ef: OUTPUT«Callable␤»
17:48 IOninja close enuf :P
17:49 IOninja hm
17:49 llfourn joined #perl6
17:49 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>␤»
17:49 IOninja ok, at least that's not new :)
17:49 IOninja m: my &x; multi sub 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 sub x ($) {}7⏏5<EOL>␤»
17:50 IOninja I am declaring multi sub, computer!
17:52 moritz but my &x isn't a proto
17:54 IOninja heh, looks like someone had a lot of fun writing roast. grep -FR 'WTF' shows some very strange tests :P
17:55 pmurias joined #perl6
17:55 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␤»
17:56 IOninja moritz: ^ but in the method case it actually tells me what's up.
17:57 moritz IOninja: yes, that's a better error message
17:57 moritz m: sub x() { }; multi x() { }
17:57 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 #perl6
18:00 IOninja heh and the author of the funny test is... jnthn :) https://github.com/perl6/roast/commit/0df5ccbdf857f2f1492ea54c3754bb004063c4d6
18:00 IOninja jnthn: though for some reason github tells me it's an "Unrecognized author"
18:00 jdv79 how does one ref an anon block inside itself?
18:01 IOninja &?BLOCK
18:01 gfldex he clearly doesn't get the recognition he should get
18:02 ilmari From: jnthn <jnthn@c213334d-75ef-0310-aa23-eaa082d1ae64> # someone hasn't configured git user.{email,name}
18:02 ilmari oh, svn...
18:02 moritz it was a git-svn import
18:02 ilmari someone didn't configure git-svn properly
18:03 ilmari svn.authorsfile
18:03 moritz someone didn't configure git-svn at all
18:04 moritz our svn was dying, and I was glad that I managed to update my older git-svn clone at all to newest state
18:08 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 #perl6
18:09 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:10 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:10 sufrostico joined #perl6
18:11 timotimo cool, you're going to build a course for perl6?
18:11 moritz summan: thank you for volunteering!
18:12 espadrine joined #perl6
18:13 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 summan Perl foundation can do it.
18:14 DrForr The Perl Foundation is made of people. Programming languages don't write themselves :)
18:15 itaipu joined #perl6
18:15 [Coke] You may be over-estimating the amount of time available by people already volunteering at TPF.
18:16 [Coke] seems like the sort of thing that'd be amenable to a grant.
18:18 summan Perl 6 design is great. Though I use scientific stack in Python and R for statistics, I was just going through this http://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...
18:19 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
18:20 IOninja + a ton of books
18:20 IOninja I lost track of how many there are coming out this year
18:21 IOninja uuuh... Well now I know why so many people are using dev commits with rakudobrew: http://perl6intro.com/#_installing_perl_6
18:22 IOninja .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?
18:23 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.
18:24 mst perl foundation grants can help fund that person
18:24 mst but first you need to find the person
18:24 DrForr Or be that person.
18:24 IOninja .tell hankache Your perl6intro site tells users to use untested development commits by building them with rakudobrew: http://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
18:24 yoleaux IOninja: I'll pass your message to hankache.
18:25 IOninja summan: what a coincidence. There's an article written just for that topic: http://perl6.party/post/Open-Source-Projects--When-Ideas-Meet-Reality
18:26 summan IOninja Oh yeah, nice to see :)
18:27 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 IOninja summan: we're all busy with stuff we feel needs doing. If you feel MOOC stuff needs to be done. Do it.
18:28 IOninja summan: "But I am no expert programmer, just a novice."  You don't need to be an expert.
18:29 IOninja And in some respects it's better that you're not.
18:29 IOninja summan: write the course. Let experts review it for mistakes. You don't need an expert to write it.
18:29 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.
18:30 DrForr I'd be more than happy to review whatever you do and offer feedback, I've given Perl 6 training worldwide :)
18:30 labster joined #perl6
18:33 summan DrForr Will try my best !! :)
18:33 ggoebel joined #perl6
18:34 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:38 cale2 gitbooks > MOOCs
18:38 cale2 something like 70% of MOOCs people never even finish
18:38 cale2 gitbooks are lightweight, no commitment required, no login required.
18:39 mst different people prefer learning from different media
18:39 mst so sweeping X > Y statements are generally bollocks
18:39 IOninja m: say 42 > 5
18:39 camelia rakudo-moar aac9ef: OUTPUT«True␤»
18:40 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 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
18:40 camelia rakudo-moar aac9ef: OUTPUT«True␤»
18:41 DrForr cale2: I think you two are in violent agreement :)
18:41 IOninja m
18:41 IOninja m: say quietly Perl == Cool
18:41 camelia rakudo-moar aac9ef: OUTPUT«True␤»
18:42 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 DrForr cale2: Great opportunity to make your own!
18:42 cale2 DrForr: I'm a bad programmer, remember? :)
18:42 mst cale2: well done on completely missing the point
18:43 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 :)
18:44 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: 😘
18:45 [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 itaipu joined #perl6
18:45 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 mst note, I hate MOOCs and would much prefer to learn from a gitbook
18:45 timotimo i'd love to have perl6 shouted into my head by a mst :3
18:46 IOninja :)
18:46 mst I've not found I'm particularly good at class-style lecturing
18:46 b2gills I first learned Perl 5 by the error messages and the included docs
18:46 timotimo OK, that's fine
18:46 mst then again, I've always previously attempted to produce a 'normal' class
18:47 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 :(
18:47 timotimo you do you, mst
18:47 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"
18:47 IOninja heh
18:47 mst but I think having somebody who hates watching videos making one is probably silly
18:47 hobbs I think the result would be entertaining
18:48 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
18:48 DrForr You too can be Tron Guy :)
18:49 b2gills I would subscribe to a mst channel if all he did was rant
18:50 DrForr I believe we call that 'IRC' :)
18:50 llfourn joined #perl6
18:56 itaipu joined #perl6
19:00 IOninja .ask TimToady is `sink Failure.new` supposed to ignore the Failure?
19:00 yoleaux IOninja: I'll pass your message to TimToady.
19:03 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?
19:03 TimToady m: sink Failure.new
19:03 camelia rakudo-moar b51a55: OUTPUT«Failed␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
19:03 TimToady m: eager Failure.new
19:03 camelia rakudo-moar b51a55: ( no output )
19:03 IOninja Thanks.
19:03 TimToady m: so Failure.new
19:03 camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of "so " in expression "so Failure.new" in sink context (line 1)␤»
19:03 TimToady heh
19:04 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
19:06 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 TimToady m: sink 42
19:06 camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
19:06 TimToady m: eager 42
19:06 camelia rakudo-moar b51a55: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 42 in sink context (line 1)␤»
19:06 TimToady hmm
19:07 TimToady m: eager 42, 43
19:07 camelia rakudo-moar b51a55: ( no output )
19:07 TimToady m: sink 42, 43
19:07 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)␤»
19:07 TimToady interesting that eager only silences the list
19:08 TimToady m: eager so Failure.new
19:08 camelia rakudo-moar b51a55: ( no output )
19:08 TimToady anyway, that's not what sink is for
19:08 girafe joined #perl6
19:09 TimToady m: try Failure.new
19:09 camelia rakudo-moar b51a55: ( no output )
19:09 TimToady lot's of other ways to silence a failure
19:10 jnthn I'm a tad surprised try didn't fatalize it...
19:10 jnthn m: try { Failure.new }
19:10 camelia rakudo-moar b51a55: ( no output )
19:10 jnthn m: try +'nope'
19:10 camelia rakudo-moar b51a55: ( no output )
19:11 jnthn Oh, duh
19:11 jnthn It does and then catches the exception
19:11 jnthn I even wrote the code that makes that happen. :P
19:14 TimToady indeed :)
19:16 * TimToady is glad he lives in the state of CA, not the country of CA, because his furnace is bust
19:17 rindolf joined #perl6
19:18 * IOninja recently learned CA has "Yolo by-pass"
19:18 IOninja https://www.google.ca/maps/place/Yolo+Bypass+Wildlife+Area/@38.559757,-121.6302524,17z/data=!3m1!4b1!4m5!3m4!1s0x809ad4b4b3b6cbb5:0x58115d9eea2ceac7!8m2!3d38.5597528!4d-121.6280637
19:18 DrForr Cloning?
19:18 IOninja :)
19:19 itaipu joined #perl6
19:19 DrForr I was amused when I was driving back from dropping Percy off and passed the (closed) Donner Party Picnic Ground.
19:20 TimToady well, CA has Yoho you can bypass...
19:20 DrForr "Donner party, table for 7... er, 6?"
19:21 TimToady what self-serving people!
19:21 agentzh joined #perl6
19:21 DrForr Biting sarcasm.
19:21 * TimToady will chew on that...
19:22 samcv good * perl 6
19:22 perlpilot cale2: That wasn't a "bad quote" it was an interesting one.  I like the sentiment.
19:23 labster joined #perl6
19:28 samcv .tell lizmat thanks for " Make Int.WHICH about 1.7x faster" :)
19:28 yoleaux samcv: I'll pass your message to lizmat.
19:33 IOninja I see the "Shouldn't happen" in the comment but it did happen to me like a week ago: https://github.com/rakudo/rakudo/blob/b51a5505a6b766e6be1861f4f6d08a0986b1a7ac/src/core/Failure.pm#L34-L35
19:34 IOninja In https://irclog.perlgeek.de/perl6-dev/2017-02-08#i_14066457
19:34 IOninja m: https://gist.github.com/zoffixznet/b7fe8919516ac0e2bb791e4a664b2822
19:34 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…»
19:34 IOninja e: https://gist.githubusercontent.com/zoffixznet/b7fe8919516ac0e2bb791e4a664b2822/raw/5e0bb1aec6e410e297c40eefc81fac90b5266b3d/p6.p6
19:34 evalable6 IOninja, Successfully fetched the code from the provided URL.
19:34 evalable6 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..…»
19:34 evalable6 IOninja, Full output: https://gist.github.com/8a1276fbef864dbae458e5470fb3c6d6
19:35 itaipu joined #perl6
19:35 cdg joined #perl6
19:36 IOninja hm, but only on my 32-bit box
19:36 ChoHag joined #perl6
19:36 IOninja .ask dogbert11 do you get any warnings about Failures in DESTROY when running this code on 32-bit box? https://gist.githubusercontent.com/zoffixznet/b7fe8919516ac0e2bb791e4a
19:36 yoleaux IOninja: I'll pass your message to dogbert11.
19:37 IOninja Got 2017.01-121-gf94cb21 on both 32-bit and 64-bit and only 32-bit one complains
19:40 IOninja .tell dogbert11 previous URL seems busted; this one: https://gist.github.com/zoffixznet/b7fe8919516ac0e2bb791e4a664b2822
19:40 yoleaux IOninja: I'll pass your message to dogbert11.
19:44 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 timotimo until we figure out sinking better :)
19:45 IOninja Well I tickedted its happening: https://rt.perl.org/Ticket/Display.html?id=130786
19:45 timotimo but the "only 32bit" thing makes me a bit uncomfortable :)
19:45 IOninja Uncomfortable how?
19:45 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 #perl6
19:49 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␤␤»
19:49 IOninja ain't useless :/
19:49 eliasr joined #perl6
19:49 gdonald joined #perl6
19:50 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
19:50 perigrin_ w/ 52
19:50 timotimo through the magic of code-gen
19:51 IOninja perigrin_: No win. Try again.
19:52 llfourn joined #perl6
19:52 perigrin_ IOninja: it was there, just wasn't there with w/
19:52 perigrin_ :)
20:02 IOninja Looks like the confusion that $proc.out.close returns the proc is prevalent: https://rt.perl.org/Ticket/Display.html?id=125757#txn-1383778
20:02 bjz joined #perl6
20:02 IOninja Or rather... people thinking that IO::Pipe.close throws when it doesn't
20:03 IOninja m: sub meows { Proc.new: :command["false"] }; try meows
20:03 camelia rakudo-moar b51a55: ( no output )
20:03 IOninja s: sub meows { Proc.new: :command["false"] }; try meows; exit
20:03 SourceBaby IOninja, Something's wrong: ␤ERR:
20:04 IOninja Well, it 'splodes in non-restricted setting.
20:04 IOninja 'cause the explosion is in a sinking Proc and so happens after the try.
20:04 IOninja I dunno... is this a doc problem or a design problem? :)
20:06 IOninja Actually make it three people...
20:15 IOninja m: |Failure.new
20:15 camelia rakudo-moar b51a55: ( no output )
20:16 IOninja m: sink |Failure.new
20:16 camelia rakudo-moar b51a55: ( no output )
20:16 IOninja m: sink [Failure.new],
20:16 camelia rakudo-moar b51a55: OUTPUT«Failed␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
20:16 IOninja Weird, no?
20:16 IOninja (the slip preventing 'splosion that is)
20:18 IOninja Actually, blocking sinkage. `|run "false"` doesn't explode
20:18 mr_ron joined #perl6
20:19 agentzh joined #perl6
20:20 IOninja Anyone wanting to give a talk? Toronto Perl Mongers are lookin' for speakers.
20:21 IOninja ☃☃☃☃☃☃☃
20:22 IOninja :)
20:22 * IOninja ends the soliloquy
20:24 arnsholt IOninja: If you're springing for airfare OSL-YYZ, I'm sure I can come up with something =)
20:25 IOninja heh, doubt there's any airfare springed
20:25 IOninja Unless you're famous.
20:25 IOninja :)
20:26 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 #perl6
20:27 cale2 perhaps then .slurp coerces IO::Path to an IO::Handle
20:29 Xliff .slurp returns the contents.
20:29 IOninja cale2: not really; just uses it to slurp the thing pointed to by that IO::Path: https://github.com/rakudo/rakudo/blob/b51a550/src/core/IO/Path.pm#L458-L487
20:29 Xliff .open should return the IO::Handle
20:32 IOninja Kinda weird design
20:32 IOninja IO::Handle has slurp-rest; IO::Path has slurp;
20:34 [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 #perl6
20:34 [Coke] perlpilot: there's always 6.d
20:35 * [Coke] wonders if slurp(:rest) would have worked.
20:35 IOninja [Coke]: doesn't seem so: https://www.google.com/search?q=wiki+Will+Coke+Coleda&amp;ie=utf-8&amp;oe=utf-8
20:35 [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 :)
20:36 IOninja perlpilot: like... slurp? :)
20:36 perlpilot IOninja: exactly! :)
20:36 [Coke] oh so I can expect about 4.50. Canadian. :)
20:36 IOninja :) We'll pay for your parking ;)
20:36 [Coke] aahahaha. perfect.]
20:40 pmurias joined #perl6
20:44 parv joined #perl6
20:52 cale2 Can you convert a seq to an array?
20:53 llfourn joined #perl6
20:54 Actualeyes joined #perl6
20:54 sena_kun cale2, .list?
20:55 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␤␤»
20:55 sena_kun not .Array though
20:55 gfldex .Array is not the problem
20:55 gfldex it's not that easy to create a Seq
20:56 gfldex m: dd (1…3).Array
20:56 camelia rakudo-moar b51a55: OUTPUT«[1, 2, 3]␤»
20:56 sena_kun neat.
20:57 sena_kun 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
20:58 perlpilot [Coke]: do you think TPF would give small travel grants for speakers to spread the Perl word?
20:59 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
21:00 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:01 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
21:01 * mst uses .list sometimes to get something bindable
21:02 mst when I'm trying to be readonly-everything
21:03 sena_kun gfldex, I've built a test around your script, but we lost information after extracting to properly shout about errors
21:06 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:13 cale2 joined #perl6
21:13 gregf_ joined #perl6
21:13 dmaestro joined #perl6
21:15 gdonald joined #perl6
21:16 cale2 joined #perl6
21:16 gregf_ joined #perl6
21:16 dmaestro joined #perl6
21:26 agentzh joined #perl6
21:28 bjz joined #perl6
21:29 wamba joined #perl6
21:32 dogbert17 joined #perl6
21:33 dogbert17 IOninja: ran you code a few times and saw no DESTROY warnings
21:35 lucs dogbert17: I believe you have some yoleaux messages addressed to dogbert11 waiting.
21:36 dogbert17 lucs: the ones from IOninja?
21:36 lucs Yes
21:39 dogbert17 dogbert11 is my $work alter-ego
21:39 lucs Oh, just saying.
21:39 dogbert17 lucs: thx for pointing it out
21:39 lucs Sure thing.
21:40 sufrostico joined #perl6
21:41 IOninja dogbert17: OK will just close my ticket then
21:41 IOninja dogbert17: oh, which perl6 version did you use?
21:42 IOninja I guess I should still just close it since I don't know how to repro it on HEAD
21:44 dogbert17 IOninja: This is Rakudo version 2017.01-207-gb51a5505a built on MoarVM version 2017.01-45-g2b0739d8
21:46 IOninja m: say $*PERL.compiler.version
21:46 camelia rakudo-moar b51a55: OUTPUT«v2017.01.207.gb.51.a.550␤»
21:46 IOninja yeah that already has my fix for ~~
21:47 hobbs gb.51.a.550?
21:47 cdg joined #perl6
21:47 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 07EAAAEVL joined #perl6
21:47 IOninja yeah
21:47 timotimo did i fixbreak something?
21:47 dogbert17 many things :)
21:47 IOninja don't think so :)
21:47 cale2 m: say (1,2,3,4) + (5,6,7);
21:47 camelia rakudo-moar b51a55: OUTPUT«7␤»
21:48 cale2 m: say (1,2,3,4) ~ (5,6,7);
21:48 camelia rakudo-moar b51a55: OUTPUT«1 2 3 45 6 7␤»
21:48 cale2 m: say (1,2,3,4) ++ (5,6,7);
21:48 camelia rakudo-moar b51a55: OUTPUT«7␤»
21:48 cale2 m: say join (1,2,3,4), (5,6,7);
21:48 camelia rakudo-moar b51a55: OUTPUT«51 2 3 461 2 3 47␤»
21:48 IOninja Lists are Cool
21:48 andrzejku_ joined #perl6
21:48 cale2 how the hell do i do concat two @arrays lol
21:48 timotimo what did i make a fix for?
21:48 timotimo cale2: with the , operator and "flat"
21:49 cale2 m: say (1,2,3,4), (5,6,7);
21:49 camelia rakudo-moar b51a55: OUTPUT«(1 2 3 4)(5 6 7)␤»
21:49 cale2 m: say |(1,2,3,4), (5,6,7);
21:49 camelia rakudo-moar b51a55: OUTPUT«1234(5 6 7)␤»
21:49 cale2 m: say |(1,2,3,4), |(5,6,7);
21:49 camelia rakudo-moar b51a55: OUTPUT«1234567␤»
21:49 perlpilot cale2: those are lists you're trying to concatenate btw :)
21:50 dogbert17 timotimo: some strange DESTROY warnings if I remember correctly
21:50 timotimo jesus, my last rakudo commit was 3 months ago
21:51 IOninja :o
21:51 IOninja mine was 3 hours ago :)
21:51 hoelzro timotimo: mine was 5 =(
21:51 IOninja Slackers! ;)
21:51 timotimo oh, no, i searched wrong
21:51 cale2 perlpilot: If lists, seqs, and arrays were the same thing, what would anyone complain about?
21:51 timotimo i actually did something 4 weeks ago
21:51 timotimo and one 9 weeks ago
21:52 IOninja cale2: same thing being what?
21:52 perlpilot cale2: someone will always find *something* to complain about :)
21:53 IOninja cale2, and what about Slips :)
21:54 IOninja 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 llfourn joined #perl6
21:55 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 cale2 Will be interesting to see how "Think Perl 6" teaches them all
21:55 ggoebel joined #perl6
21:56 TEttinger joined #perl6
21:56 IOninja hehe
21:56 IOninja Well, they all do Positional role, so there is some sameness :)
21:57 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
21:57 Geth ¦ doc: Fix a couple of examples, add 'haskell' page to ignore-list of extract-examples.p6
21:57 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9771ffeeb9
21:57 IOninja m: class Sameness is Array is Seq is Slip {}; say Sameness.new: 1, 2, 3
21:57 camelia rakudo-moar b51a55: OUTPUT«[1 2 3]␤»
21:57 IOninja ehehe
21:58 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.
21:58 IOninja What is that anyway?
21:59 IOninja But why are you adding typing?
21:59 cale2 m: my @stuff; for 1,2,3,4 { @stuff.push: $_ }; say @stuff;
21:59 camelia rakudo-moar b51a55: OUTPUT«[1 2 3 4]␤»
21:59 IOninja ah
21:59 cale2 that method
22:00 cale2 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 :)
22:00 perlpilot cale2: do you expect type annotations in Perl 6 to act like Haskell in some way?
22:00 dogbert17 timotimo, IOninja: http://irclog.perlgeek.de/perl6-dev/2016-09-14#i_13211439
22:00 cale2 IOninja: Yeah, teach loop/push first. Then gather/take is like "oh I don't need the accumulator any more"
22:01 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
22:01 perlpilot okay ... I was getting a feeling like you were expecting something akin to Haskell's type inferencing to happen in Perl 6
22:02 IOninja cale2, and you can play to language's strength: gradual typing and not bother with types until you learn about them.
22:03 IOninja Instead of wanting sameness.
22:03 Geth ¦ doc: 5c2a3bcf00 | Cale++ | doc/Language/haskell-to-p6.pod6
22:03 Geth ¦ doc: add placeholder for gather/take
22:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5c2a3bcf00
22:04 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:05 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:06 cale2 I get the impression that there _is_ such a thing as idiomatic Perl6. But people pretend that there isn't.
22:09 perlpilot cale2: I suggest you ask TimToady about "idiomatic Perl 6" some time  :-)
22:11 perlpilot cale2: and, yes, there is such a thing.
22:14 IOninja cale2: hehe, interesting. I do believe there is idiomatic Perl 6, but I'd have a hard time naming examples.
22:14 IOninja Other than assuming everything TimToady writes is idiomatic by definition :P
22:16 IOninja 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 rindolf joined #perl6
22:19 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:21 gfldex for '.' { .Str.say when !.IO.d; .IO.dir()>>.&?BLOCK when .IO.d }
22:21 gfldex ^^^ I cound 3 idioms in there
22:21 gfldex count even
22:25 atweiden joined #perl6
22:26 Geth ¦ doc: 6c1c54ee99 | (Wenzel P. P. Peppmeyer)++ | doc/Language/variables.pod6
22:26 Geth ¦ doc: mexico examples
22:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6c1c54ee99
22:26 IOninja hehe is that what we call the opposite of Texas? :)
22:26 IOninja Oh 'cause it is... literally I guess
22:26 gfldex at least I do
22:27 IOninja I like it.
22:28 cale2 gfldex: I like it. Let's call the Perl::Tidy tool that converts texas to unicode `Perl::Tidy::Mexify` or something lol
22:29 TEttinger huh, except that mexico uses even longer names than texas
22:29 cale2 in that case `Perl::Tidy::WingDingify`
22:29 TEttinger simplest is "mexico city" vs. "ciudad mexico" (not sure if it needs "ciudad de")
22:31 TEttinger the chinese ideograms are about as close as it gets to one symbol for one concept
22:32 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
22:32 cale2 wow, I guessed for "unicode characters" and it was right lol
22:33 Beginner_don joined #perl6
22:33 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
22:33 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
22:33 TEttinger IOninja: didn't they leave the cities though?
22:34 TEttinger did their script stay in use?
22:34 IOninja No idea.
22:34 IOninja Heh, google-mapping "Maya" gives me Floridian city named "Mayo" :P
22:34 imcsk8_ joined #perl6
22:35 pochi_ joined #perl6
22:35 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 #perl6
22:36 cale2 The imagery of the Alamo lol
22:36 ggherdov__ joined #perl6
22:36 kaare__ joined #perl6
22:36 TEttinger was the battle of the alamo in the Mexican-American war?
22:36 hobbified joined #perl6
22:36 cale2 Perl6 is one of the few languages that the Cherokee could program in: https://en.wikipedia.org/wiki/Cherokee_syllabary
22:36 cale2 in their own language, I mean
22:36 diego_k joined #perl6
22:36 hobbs joined #perl6
22:37 TEttinger are the keywords remappable, if there are any?
22:37 TEttinger I'm not sure if the sigils can be changed
22:37 cale2 TEttinger: Idk, but I think there was a basement there
22:37 mr-fooba_ joined #perl6
22:37 plicease_ joined #perl6
22:37 mspo_ joined #perl6
22:37 perlpilo1 joined #perl6
22:37 kentnl joined #perl6
22:37 KotH_ joined #perl6
22:37 hoelzro_ joined #perl6
22:38 gfldex_ joined #perl6
22:38 lucs_ joined #perl6
22:38 effbiai joined #perl6
22:38 effbiai joined #perl6
22:38 cibs_ joined #perl6
22:39 IOninja What's special about Perl 6 and Cherokee?
22:39 riatre_ joined #perl6
22:40 IOninja m: sub ᎢᏣᎵᏍᎠᏁᏗ { say "ᎢᏣᎵᏍᎠᏁᏗ" }; ᎢᏣᎵᏍᎠᏁᏗ
22:40 camelia rakudo-moar b51a55: OUTPUT«ᎢᏣᎵᏍᎠᏁᏗ␤»
22:40 IOninja Works in Perl 5 too
22:40 cale2 Oh, you can name perl5 functions in unicode? did not know
22:41 cale2 golang only allows for unicode in strings i think
22:41 gabiruh joined #perl6
22:42 ccakes_ joined #perl6
22:42 perlpilot re mexico v. texas ... that's taking the analogy somewhere far away from home  :)
22:43 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 simcop2387 joined #perl6
22:43 BinGOs joined #perl6
22:44 Technaton joined #perl6
22:45 cale2 texas is to ascii as wisconsin is to to unicode
22:46 IOninja weeeeeeeeeeeek=
22:46 mst joined #perl6
22:46 IOninja weeeeeeeeeeee
22:46 nightfrog joined #perl6
22:46 tharkun joined #perl6
22:46 sQuEE joined #perl6
22:46 DarthGandalf joined #perl6
22:47 perigrin joined #perl6
22:47 torbjorn joined #perl6
22:47 riatre joined #perl6
22:47 roguelazer joined #perl6
22:47 salparadise joined #perl6
22:48 salva joined #perl6
22:48 geekosaur joined #perl6
22:50 ggherdov__ joined #perl6
22:50 m0ltar joined #perl6
22:50 PotatoGim joined #perl6
22:51 khw joined #perl6
22:51 leah2 joined #perl6
22:52 BinGOs joined #perl6
22:52 simcop2387 joined #perl6
22:52 kentnl joined #perl6
22:52 kaare__ joined #perl6
22:52 mr_ron joined #perl6
22:52 Khisanth joined #perl6
22:52 huf joined #perl6
22:52 xinming joined #perl6
22:52 felher joined #perl6
22:52 zoosha joined #perl6
22:52 ilogger2 joined #perl6
22:52 erdic joined #perl6
22:52 jeek joined #perl6
22:52 shadowpaste joined #perl6
22:52 dg joined #perl6
22:52 astj joined #perl6
22:52 ambs joined #perl6
22:52 Alikzus joined #perl6
22:52 mattp joined #perl6
22:52 risou___ joined #perl6
22:52 ShoaibJahejo joined #perl6
22:52 Possum joined #perl6
22:52 [ptc] joined #perl6
22:52 jercos joined #perl6
22:52 jdv79 joined #perl6
22:52 esh joined #perl6
22:52 timotimo ah, i remember that fix!
22:53 timotimo cale2: "there is more than one way to do it" doesn't mean "every way to do it is the right way"
22:55 cgfbee joined #perl6
22:56 parisba_ joined #perl6
22:56 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:57 perlpilot foolish humans.
22:57 perlpilot ;-)
22:57 ribasushi joined #perl6
22:58 leedo joined #perl6
22:58 * IOninja doesn't think like that at all :o
22:59 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
23:00 llfourn joined #perl6
23:00 * 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 #perl6
23:01 eliasr joined #perl6
23:01 girafe joined #perl6
23:03 perlpilot But, I'll agree that Perl *can be* (and often is) lower level than Haskell.
23:04 timotimo the way haskell does its lazy evaluation can sometimes make understanding how it actually executes its things really tricky
23:04 timotimo but that's no issue when you're not interested in that
23:04 timotimo which you can totally do
23:05 Actualeyes joined #perl6
23:06 BuildTheRobots joined #perl6
23:10 cale2 I'm confused about how you set an attribute on an object. I thought `has $.thing is rw` did it
23:10 john51 joined #perl6
23:11 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␤␤»
23:11 cale2 Yep, that's what I get every time
23:11 cale2 oops
23:12 cale2 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")␤»
23:12 cale2 what the
23:14 IOninja heh
23:14 IOninja cale2: maybe you were using $!stuff? That's a private attr
23:14 IOninja m: class Thing { has $!stuff is rw };
23:14 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};␤»
23:14 IOninja Though that warns
23:15 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? :)
23:16 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
23:16 camelia rakudo-moar b51a55: OUTPUT«You got a dime!␤»
23:16 IOninja ehehe
23:16 timotimo well done
23:21 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:23 timotimo yup
23:23 timotimo if you develop on multiple machines, may want to build a network-attached storage solution for your dime count
23:24 IOninja :D
23:26 b2gills better yet send it over irc to a bot that keeps track, and tweets the cumulative count on a regular basis
23:28 timotimo right, chatbots are the next disruptive technology
23:31 BenGoldberg joined #perl6
23:32 lep_ joined #perl6
23:33 agentzh joined #perl6
23:36 IOninja ugh... stupid bots are refusing to join.
23:36 IOninja they're striking
23:38 IOninja Guess it's my excuse to go gaming today and do the changelog populating tomorrow :}
23:42 timotimo :) :)
23:42 timotimo how long until release?
23:48 ugexe joined #perl6
23:50 avalenn joined #perl6
23:55 Geth joined #perl6

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

Perl 6 | Reference Documentation | Rakudo