Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-13

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:10 avuserow joined #perl6
00:21 IOninja m: say "\x[31a]"
00:21 camelia rakudo-moar 266f34: OUTPUT«̚␤»
00:22 IOninja Hotkeys:  it's a *combining* character. So it combines with your quote or, in the latter case, with the backslash.
00:23 Hotkeys I realize what it does but I feel like being able to have it in some sort of literal string would be pretty reasonable
00:26 IOninja heh
00:27 IOninja So it should combine, but only when the programmer wants it to? :)
00:27 IOninja m: say q "̚what a neat idea"̚"̚
00:27 camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3say q "̚what a neat idea"̚7⏏5"̚␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement mo…»
00:27 IOninja gah
00:27 IOninja m: say q "̚what a neat idea"̚
00:27 camelia rakudo-moar 266f34: OUTPUT«what a neat idea␤»
00:28 IOninja Hm, hexchat doesn't even let me select *just* the thingie
00:29 mspo joined #perl6
00:36 agentzh joined #perl6
00:37 yqt joined #perl6
00:42 labster joined #perl6
00:46 retupmoca joined #perl6
00:47 llfourn joined #perl6
00:54 yqt joined #perl6
00:54 samcv are rakudo's travis builds and the docs starting to be faster? my UCD repo I added travis to it and it seems to go pretty fast. idk it could be they throttle users who have used too much
00:54 samcv or maybe they got back fast again
00:55 geekosaur this is why the next unicode standard is going to have an invisible letter...
00:56 geekosaur (i.e. something to attach "standalone" combiners to)
00:56 samcv is it confirmed they are doing it geekosaur?
00:56 samcv did they say something since it was proposed?
00:56 geekosaur I thought it was...
00:57 geekosaur (if they aren't then someone needs a cluebat)
00:57 samcv also the 'official' method is to use a nbsp + the other cp
00:57 samcv (currently that is)
00:58 samcv though in the past they recommended using space before the joiner, which obj was bad advice so it was changed maybe in 4.0 or so to recommend using nbsp
00:59 samcv s/obj/obviously
01:00 samcv also wtf is with constants being automatically exported
01:00 samcv when using a module
01:00 samcv is that intentional?
01:04 samcv ahhh MoarVM panic: Internal error: invalid thread ID -1525282512 in GC work pass
01:17 zakharyas joined #perl6
01:21 tharkun joined #perl6
01:21 b2gills joined #perl6
01:22 yqt joined #perl6
01:25 newbie joined #perl6
01:31 sammers joined #perl6
01:34 kyan joined #perl6
01:48 llfourn joined #perl6
02:14 newbie1 joined #perl6
02:46 samcv left #perl6
02:50 llfourn joined #perl6
02:54 kalkin- joined #perl6
03:08 Actualeyes joined #perl6
03:18 labster joined #perl6
03:19 cale2 joined #perl6
03:20 BenGoldberg joined #perl6
03:23 cale2 Is there a module that scans P6 source code and converts texas symbols into their unicode variants?
03:26 MasterDuke cale2: not that i know of, but i bet you could use DrForr's Perl6::Parser to implement it
03:27 Actualeyes joined #perl6
03:32 cale2 Yeah, it makes sense to be built into the Tidy tool
03:39 noganex_ joined #perl6
03:51 llfourn joined #perl6
04:01 Actualeyes joined #perl6
04:33 Cabanoss- joined #perl6
04:41 skids joined #perl6
04:53 llfourn joined #perl6
05:02 faraco joined #perl6
05:16 pyrimidine joined #perl6
05:19 wamba joined #perl6
05:25 CIAvash joined #perl6
05:42 curan joined #perl6
05:47 xtreak joined #perl6
05:54 llfourn joined #perl6
06:13 ufobat joined #perl6
06:16 aborazmeh joined #perl6
06:16 aborazmeh joined #perl6
06:18 cibs joined #perl6
06:23 mrdside joined #perl6
06:24 xtreak joined #perl6
06:27 ssotka joined #perl6
06:48 RabidGravy joined #perl6
06:48 samcv joined #perl6
06:49 samcv oops looks like I must have parted accidentally
06:50 mrdside joined #perl6
06:56 llfourn joined #perl6
06:58 ccakes joined #perl6
07:03 kaare_ joined #perl6
07:10 Woodi joined #perl6
07:14 cibs joined #perl6
07:15 wamba joined #perl6
07:21 bjz joined #perl6
07:21 darutoko joined #perl6
07:24 mrdside joined #perl6
07:27 mrdside hi, can anybody help understand grammars? do these three grammars should work same? https://gist.github.com/mrDSide/f76373f91d199c5325403e06438535f0
07:28 moritz mrdside: nope
07:29 moritz the first one allows one <pu> followed by multiple <crd>
07:29 mrdside moritz: and `G1` and `G2`?
07:29 moritz but G2 only allows one <crd> after <pu>
07:30 moritz and G3 makes the (inlined) <crd> optional (* instead of +)
07:30 moritz also, there's no point in writing [<people>+]+
07:30 moritz <people>+ is fine
07:30 mrdside moritz: my mistake, new version - https://gist.github.com/mrDSide/f76373f91d199c5325403e06438535f0
07:31 mrdside data file - https://gist.github.com/mrDSide/53ecaeed84ae56242dc14b655026a3bf
07:31 moritz same difference to G3 (* instead of +)
07:32 moritz also, there's no backtracking across token { } boundaries, so I'm not sure if inlining might make a difference
07:32 mrdside https://gist.github.com/mrDSide/f76373f91d199c5325403e06438535f0
07:33 moritz mrdside: what do you hope to learn from this, except whether I'm good at spotting small differences?
07:33 ccakes joined #perl6
07:34 moritz afk&
07:34 mrdside moritz: i want to get tree like in `G1` shen do actions, but it doesnt work, only work as `G1` and `G3`
07:35 mrdside can i see TOP after substitution?
07:36 agentzh joined #perl6
07:37 mrdside moritz: work `G1` but not `G2`
07:50 moritz mrdside: is each of the pu/crd/exp regexes supposed to match exactly one line?
07:50 mrdside no, see https://gist.github.com/mrDSide/53ecaeed84ae56242dc14b655026a3bf
07:51 mrdside moritz: no, see https://gist.github.com/mrDSide/53ecaeed84ae56242dc14b655026a3bf
07:53 bjz joined #perl6
07:53 moritz mrdside: so you're actually relying on backtracking then; change 'token' to 'regex' then
07:53 moritz or find a better way to determine the end of a record
07:54 mrdside moritz: each <people> ends with '>'
07:55 mrdside moritz: begins with "<ПУ-3", then [<crd>|<exp>], then closing symbol '>'
07:55 mrdside but closing '>' goes before '\n'
07:56 moritz ok, try to make people, crd and exp each regex, not token
07:56 mrdside moritz: ok, thx
07:57 llfourn joined #perl6
07:58 kent\n joined #perl6
08:09 Ven joined #perl6
08:15 rindolf joined #perl6
08:28 faraco joined #perl6
08:32 DrForr Yow, just got a PR for perl6-Perl6-Parser, and from a name I don't recognize to boot.
08:32 yoleaux 11 Feb 2017 17:24Z <kalkin-> DrForr: I would like to change the Perl6::Element constructor to accept just an NqpMatch so it could access the NqpMatch.orig to calculate the actual line-start & line-end. Would you accept such PR?
08:38 DrForr .tell kalkin- Ah, line-start and line-end. Yes, please. I was planning to do that anyway for better feedback to the user, though I'm concerned about here-docs because they're a bit more complex than regular tokens.
08:38 yoleaux DrForr: I'll pass your message to kalkin-.
08:38 * DrForr blinks in pleased surprise.
08:52 bjz joined #perl6
08:58 llfourn joined #perl6
09:01 Ven joined #perl6
09:05 geekosaur joined #perl6
09:06 kaare_ joined #perl6
09:17 dakkar joined #perl6
09:24 xtreak joined #perl6
09:27 wamba joined #perl6
09:35 bjz joined #perl6
09:42 Ven joined #perl6
09:44 zakharyas joined #perl6
09:49 shlomif joined #perl6
09:54 espadrine joined #perl6
09:54 GauravArya joined #perl6
09:54 GauravArya Hello Guys, anyone here?
09:54 tadzik yes
09:54 yoleaux 12 Feb 2017 16:08Z <RabidGravy> tadzik: there you go matey https://github.com/tadzik/JSON-Unmarshal/pull/23 - it would be a great boon if you could look as I found it testing something else :)
09:55 GauravArya tadzik: Hey there.. i am trying to add perl6 irc to weechat (i am a newbie..) but  can't seem to figure out.. which link to be used
09:55 GauravArya browse based stops working after a while..
09:55 ocbtec joined #perl6
09:56 abraxxa joined #perl6
10:00 llfourn joined #perl6
10:01 moritz GauravArya: /join #perl6
10:02 GauravArya moritz: thanks man.. checking it out..
10:12 koki1 joined #perl6
10:16 GauravArya i'll be back.. have not been able to setup weechat as of now.
10:24 Ulti is there a hashbag version of classify that counts the elements rather than builds a list of the elements?
10:24 yoleaux 7 Feb 2017 21:57Z <MasterDuke> Ulti: what code did you run to generate your profile?
10:25 Ulti MasterDuke: prove on sequences.t in the BioInfo module
10:26 Ulti *BagHash
10:31 agentzh joined #perl6
10:31 bjz joined #perl6
10:36 bjz_ joined #perl6
10:40 BooK joined #perl6
10:41 dogbert11 Ulti: perhaps the Baggy version of classify-list does what you want
10:42 dogbert11 https://docs.perl6.org/routine/classify-list
10:43 ufobat joined #perl6
10:51 pochi joined #perl6
10:56 wamba joined #perl6
10:57 GauravArya do we have an equivalent of my $count  = keys %hash  in perl6 ? What is the way to get the count of hash keys in perl6, without counter loop?
11:01 jnthn my $count = %hash.elems
11:01 jnthn or my $count = +%hash
11:01 newbie1 joined #perl6
11:01 arnsholt Or just +%hash, no?
11:01 * jnthn tends to find the first a little clearer :)
11:02 jnthn But yeah, either works fine :)
11:02 llfourn joined #perl6
11:02 masak m: my %hash = <a a b b c c>; say 1 * %hash
11:02 camelia rakudo-moar 266f34: OUTPUT«3␤»
11:02 masak :P
11:03 masak m: my %hash = <a a b b c c>; say (0 ** 0) * %hash
11:03 camelia rakudo-moar 266f34: OUTPUT«3␤»
11:03 arnsholt =p
11:03 masak m: my %hash = <a a b b c c>; say ([*]) * %hash
11:03 camelia rakudo-moar 266f34: OUTPUT«3␤»
11:03 masak so many options
11:04 masak m: my %hash = <a a b b c c>; say %hash + %
11:04 camelia rakudo-moar 266f34: OUTPUT«3␤»
11:05 GauravArya jnthn: thanks man, worked like a charm...
11:05 masak m: sub postfix:<!>($N) { [*] 2..$N }; say %hash * (@)!
11:05 camelia rakudo-moar 266f34: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%hash' is not declared. Did you mean any of these?␤    &hash␤    Hash␤␤at <tmp>:1␤------> 3sub postfix:<!>($N) { [*] 2..$N }; say 7⏏5%hash * (@)!␤»
11:05 masak m: sub postfix:<!>($N) { [*] 2..$N }; my %hash = <a a b b c c>; say %hash * (@)!
11:05 camelia rakudo-moar 266f34: OUTPUT«3␤»
11:05 GauravArya masak: thanks for showing me so many options... just great !!
11:05 masak I think I'm the first person to take the factorial of an anonymous array
11:06 espadrine joined #perl6
11:06 DrForr . o ( Not gamma? )
11:06 masak arnsholt: by the way -- remember the conversation the other day about "timing" and references to parameters in trait_mod:<is> routine traits?
11:06 arnsholt Yes!
11:07 masak arnsholt: I have a case (in 007) where it actually would make sense to refer to a parameter inside the trait value
11:07 * arnsholt prepares to have his mind blown
11:07 arnsholt Oooh, do tell!
11:07 masak arnsholt: but it hinges on doing the reference inside of a code block (which again changes the timing equation)
11:07 arnsholt Funky
11:08 masak the case in question is something like `macro moo(paramlist, ...) is parsed(/ ... { declare_stuff(paramlist, ...) } ... /) { ... }`
11:09 masak because the parameter `paramlist` is only used within the block in the trait, the timing works out OK
11:09 masak or it could, with some work
11:10 masak the indirect way to reference the same value would be something like `$<paramlist>.ast` or whuddeber
11:11 arnsholt Right, right
11:11 arnsholt That definitely makes sense
11:11 kent\n joined #perl6
11:13 masak just wanted to share that :)
11:15 user9 joined #perl6
11:22 arnsholt Yeah, that was a neat use-case
11:22 arnsholt I forgot to consider the case of closing over the parameter with a lambda
11:26 bjz_ joined #perl6
11:36 jonas1 joined #perl6
11:39 g4 joined #perl6
11:39 g4 joined #perl6
11:44 * masak .oO( never go in against a lambda when death is on the line! )
11:55 bjz joined #perl6
12:03 llfourn joined #perl6
12:08 sufrostico joined #perl6
12:08 sufrosti1o joined #perl6
12:14 gregf_ joined #perl6
12:17 lukaramu joined #perl6
12:24 sena_kun joined #perl6
12:30 eroux joined #perl6
12:37 eroux joined #perl6
12:40 bjz joined #perl6
12:40 grondilu joined #perl6
12:42 grondilu Hello, do you guys 'dc', the unix desktop calculator?  I was trying to write a Perl6 parser for it lately, and I failed to write a rule for its macros (aka strings).  They use balanced brackets ([]).  E.g.  [],  [foo], [foo[bar]] etc.
12:43 grondilu any idea?
12:43 pyrimidine joined #perl6
12:44 moritz token brakcets { \[ ~ \] <contents>* }
12:44 masak moritz++ beat me to it
12:44 moritz token contents { \w+ | <brackets> }
12:44 masak takes a little bit more to get decent error messages, I think
12:44 DrForr That's... just about what I was going to write. Though I prefer quotes.
12:45 moritz re decent error messages, chapter 9 of my book deals with that :-)
12:45 * masak .oO( <shameless plug> ) :P
12:45 grondilu pretty sure I had tried somthing like that but the code was hanging
12:45 moritz ... and my current blog post
12:45 grondilu I'll try again
12:45 masak moritz++ # contextually aware ads for useful content
12:45 moritz grondilu: you'll need to take care that if you quantify something, it must consume at least one character
12:46 grondilu even with '*'?
12:46 moritz yes
12:46 * grondilu is confused
12:46 moritz if you <foo>*, and <foo> can match yero characters, then <foo>* hangs
12:46 moritz *zero
12:47 grondilu I see
12:47 DrForr grondilu: token brackets { '[' <contents>* ']' } # may be simpler to follow.
12:48 grondilu ^this I am absolutely sure I had tried
12:49 grondilu for one it wasn't checking the bracket were balanced
12:49 masak it's possible to write a grammar engine that makes <foo>* with foo-can-match-empty not hang
12:49 grondilu I wanted to do something similar to http://rosettacode.org/wiki/Balanced_brackets#Parsing_with_a_grammar
12:51 grondilu with a bit of recursion, basically
12:53 arnsholt If DrForr's rule doesn't work, there's probably an error in the contents rule
12:54 grondilu what I had for contents was an other regex that at some point refered to 'brackets', so there was a bit of recursion.
12:55 arnsholt Sounds appropriate
12:56 * grondilu tried again and seems to have something that works now :/
12:56 grondilu I'll gist it if you're curious
12:56 grondilu http://paste.debian.net/914119/
12:57 grondilu I'm not sure what I had done wrong before.  Nevermind.
12:59 arnsholt \o/
13:01 DrForr Heh. You may have moved terms around in order - sometimes it's dependent on the order in the term.
13:04 wamba joined #perl6
13:04 llfourn joined #perl6
13:10 brrt joined #perl6
13:12 sammers joined #perl6
13:18 mxco86 joined #perl6
13:26 john51_ joined #perl6
13:27 nebuchad` joined #perl6
13:30 ilmari_ joined #perl6
13:30 BinGOs_ joined #perl6
13:30 petercom1and joined #perl6
13:30 rjbs- joined #perl6
13:30 lukiramu joined #perl6
13:30 sufrosti2o joined #perl6
13:30 ilbelkyr_ joined #perl6
13:30 rblackwe_ joined #perl6
13:31 z-b joined #perl6
13:31 hwu joined #perl6
13:31 ponbiki_ joined #perl6
13:31 huf_ joined #perl6
13:31 Actualeyes joined #perl6
13:32 dalek joined #perl6
13:32 hobbified joined #perl6
13:35 sammers joined #perl6
13:36 awwaiid joined #perl6
13:36 Unavowed joined #perl6
13:37 solarbunny joined #perl6
13:38 SCHAAP137 joined #perl6
13:46 mscha joined #perl6
13:46 mscha m: my $f = 1/13² + 1/26² + 1/39² + 1/78²; say ($f.numerator, $f.denominator, $f.norm.numerator, $f.norm.denominator, $f.nude, $f.numerator, $f.denominator);
13:46 camelia rakudo-moar 266f34: OUTPUT«(50 6084 50 6084 (25 3042) 25 3042)␤»
13:46 mrdside joined #perl6
13:47 mscha In other words, Rat.norm() doesn't normalize; but Rat.nude() does.
13:47 jnthn Worse, it seems to do it in-place?!
13:47 mscha Yup
13:47 jnthn Which will be a concurrency bug
13:47 jnthn Rat is meant to be immutable
13:47 mrdside hi! how can i get symbols code? "ABC".substr(2,1)<unicode code>?
13:48 mscha Usually not a problem - it's rare to get a non-normalized Rat.
13:48 jnthn mscha: Still worth an RT, IMO :)
13:48 jnthn mrdside: .ords
13:48 masak mscha: please file a rakudobug
13:48 mscha I will.
13:48 mrdside m: "ABC".substr(2,1).ords
13:48 camelia rakudo-moar 266f34: ( no output )
13:49 jnthn m: say "ABC".substr(2,1).ords
13:49 camelia rakudo-moar 266f34: OUTPUT«(67)␤»
13:49 mrdside jnthn: thx
13:50 BinGOs joined #perl6
13:51 GauravArya joined #perl6
13:59 GauravArya hi guys, i have been playing with Proc::Async and its wonderful. One could process system commands and collect output in async fashion and populate a global data structure. But what is the way to run a subroutine, instead of system commands?
14:00 GauravArya My goal is to parse a 20gb logfile and spawn 10-12 processes at different seek intervals, to populate my global hash...
14:00 moritz GauravArya: you can do that with start
14:00 moritz GauravArya: https://docs.perl6.org/language/concurrency.html if you haven't found it yet
14:01 GauravArya thanks..  :)
14:01 GauravArya i was struggling.. :P
14:01 GauravArya you read my mind.. you got 6th sense..
14:01 GauravArya hehe
14:04 sjn \o
14:05 sjn Quick question; Who's working in the JVM backend these days?
14:06 sjn and/or knows it well enough to talk about it? :)
14:06 cdg joined #perl6
14:06 llfourn joined #perl6
14:06 moritz bartolin maybe?
14:07 * IOninja succeeds in removing the black header on GitHub
14:07 IOninja Tampermonkey: https://gist.github.com/zoffixznet/1ca8cc3953b9613d16ff34a0c4c4ef2c
14:07 cdg joined #perl6
14:08 DrForr "black header" doesn't sound good, what was it about?
14:08 cdg joined #perl6
14:08 timotimo github's new design
14:08 timotimo some people seem to dislike it
14:09 moritz github now looks like every bootstrap site out there
14:11 skids joined #perl6
14:11 IOninja DrForr: bootstrap has light and dark modes. And they set their header to dark mode, while leaving rest of the site in light mode. And worse still, they left notification circle the same color, so you get light blue circle showing up on this nearly-black background.
14:12 tadzik everyone's complaining about github colorscheme, and I just sit here unaware with my userstyles
14:12 * tadzik checks in porn mode
14:12 IOninja I'm not complaining anymore. Fixed it with a user script.
14:12 mscha m: my $f = 1/6 + 1/6; my $g = $f.norm; say ($f.numerator, $f.denominator, $g.numerator, $g.denominator, $f.nude, $f.numerator, $f.denominator, $g.numerator, $g.denominator); # Not as rare as I thought
14:12 camelia rakudo-moar 266f34: OUTPUT«(2 6 2 6 (1 3) 1 3 1 3)␤»
14:12 IOninja I just need to propagate it to my phone, my VM, and two work boxes...
14:14 IOninja s: .5, 'norm', \()
14:14 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/266f345/src/core/Rational.pm#L204
14:14 IOninja hah
14:14 IOninja .oO( well, here's your problem :P )
14:14 mscha Hah indeed...
14:14 IOninja Will fix shortly.
14:15 DrForr Ack. That simple feature took the team like a week to pull together for blogs.perl.org II.
14:16 IOninja Which one? Making your site ugly by typing 11 characters? :)
14:16 moritz that (method norm returning self) was from happier days where our nudes were always norm'd
14:17 IOninja The reason they aren't always right now is for optimization
14:17 bitmap joined #perl6
14:18 IOninja so that 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 + 1/6 doesn't do reduction that many times for no reason
14:18 cale2 joined #perl6
14:19 mscha It'd be nice if calling .numerator() or .denominator() would normalize, though.  (Just like .nude() apparently does.)
14:21 cdg joined #perl6
14:21 IOninja m: (1/0).REDUCE-ME
14:21 camelia rakudo-moar 266f34: ( no output )
14:21 kalkin- .tell DrForr awesome, i already have a line-start patchset working, will upgrade it to also use line-end.
14:21 yoleaux 08:38Z <DrForr> kalkin-: Ah, line-start and line-end. Yes, please. I was planning to do that anyway for better feedback to the user, though I'm concerned about here-docs because they're a bit more complex than regular tokens.
14:21 yoleaux kalkin-: I'll pass your message to DrForr.
14:21 IOninja Nah, I disagree with that one. They're attributes. You get their values.
14:22 cdg_ joined #perl6
14:23 DrForr kalkin-: Howdy. It's one of the things on my to-do list. In Perl 5 calculating that is expensive enough that it's only done on-demand, so it may be a separate runtime check.
14:23 yoleaux 14:21Z <kalkin-> DrForr: awesome, i already have a line-start patchset working, will upgrade it to also use line-end.
14:23 mscha Well, then nude() shouldn't normalize either.
14:24 mscha nude: "Returns a list of the numerator and denominator."
14:24 DrForr .nude() is a method call, not an attribute? (asking, as that's a reason to separate distinctions.)
14:24 moritz yes, it's a method
14:27 cdg joined #perl6
14:27 pmurias joined #perl6
14:28 cdg_ joined #perl6
14:29 cale2 m: say WHAT(2.5)
14:29 camelia rakudo-moar 266f34: OUTPUT«(Rat)␤»
14:29 cale2 m: 2.5.WHAT
14:29 camelia rakudo-moar 266f34: ( no output )
14:29 cale2 m: say 2.5.WHAT
14:29 camelia rakudo-moar 266f34: OUTPUT«(Rat)␤»
14:29 grondilu couldn't qx return a Blob when the executed command returns binary data?
14:30 cale2 Does Perl6 have UFCS or is almost every single method just ALSO defined as a routine?
14:30 grondilu (or maybe a :bin adverb, e.g. qx:bin{program};)
14:30 IOninja not almost every single; just a few
14:31 cale2 more than a few. I'd say almost every built in
14:33 agentzh joined #perl6
14:33 japhb joined #perl6
14:33 timotimo what is UFCS?
14:34 timotimo universal first class subroutines?
14:34 jnthn Methods that exist in Any or Cool will tend to have a function form
14:34 jnthn Not sure how strictly that is followed, but it's the best guideline I can think of
14:34 cale2 universal function call syntax
14:35 cale2 m: say comb('hello'); say 'hello'.comb;
14:35 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling comb(Str) will never work with proto signature ($, $, $?)␤at <tmp>:1␤------> 3say 7⏏5comb('hello'); say 'hello'.comb;␤»
14:35 timotimo m: say comb "hello":
14:35 camelia rakudo-moar aac9ef: OUTPUT«(h e l l o)␤»
14:35 timotimo m: say comb "hello"
14:35 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling comb(Str) will never work with proto signature ($, $, $?)␤at <tmp>:1␤------> 3say 7⏏5comb "hello"␤»
14:36 timotimo interesting discontinuity
14:36 itaipu joined #perl6
14:36 cale2 I thought : was only used on method arguments
14:37 cale2 m: (1,2,3,4).reduce: { $^a + $^b }
14:37 camelia rakudo-moar aac9ef: ( no output )
14:37 timotimo yup
14:37 timotimo it's a method call with "indirect object syntax"
14:37 timotimo it was invented to please people who want to write "new MyClass: ..."
14:37 cale2 BTW, has anyone seen this paper: http://www.ccs.neu.edu/racket/pubs/popl16-tfgnvf.pdf
14:37 timotimo instead of MyClass.new(...)
14:37 cale2 about gradual typing costs in typed racket
14:38 cale2 timotimo: Yeah, that's basically UFCS. To me, it just muddies the waters, but oh well
14:38 GauravArya where can one find information about how to use methods and pass arguements? I feel I am not able to understand the docs without seeing an example. I am trying to get seek value on a fh
14:39 itaipu joined #perl6
14:39 cale2 GauravArya: open a file in the REPL and call .^methods on it
14:40 [Coke] $obj.meth($arg1, $arg2, :namedarg<a>)
14:40 perlpilot GauravArya: https://docs.perl6.org/routine/seek
14:40 perlpilot [Coke]: I think he means for specific methods
14:41 perlpilot GauravArya: you could try the search bar on doc.perl6.org for most things.
14:41 GauravArya perlpilot: i have seen that description but i am not able  to put together a syntax :(
14:42 GauravArya coke.. i am gonna try that one now..
14:43 perlpilot GauravArya: I agree that an improvement to the docs would be to have small examples for each routine.  (P5 docs did that for the most part)
14:44 cale2 seek $file: 20, SeekFromBeginning
14:45 eroux joined #perl6
14:45 brrt1 joined #perl6
14:45 cale2 Funny thing about that particular example is the URL says "routine", but it says it is a method. https://docs.perl6.org/routine/seek#(IO::Handle)_method_seek
14:45 kalkin- DrForr: looks like it's not that expensive in Perl6. But I had to add a required field $.orig to Perl6::Element and patch all the functions creating Perl6::* objects
14:45 cpage__ joined #perl6
14:45 kst` joined #perl6
14:46 perlpilot m: say Method.^mro
14:46 camelia rakudo-moar aac9ef: OUTPUT«((Method) (Routine) (Block) (Code) (Any) (Mu))␤»
14:46 [Coke] alternative to cale2's syntax is $file.seek(20, SeekFromBeginning);
14:46 perlpilot cale2: because methods are routines :)
14:47 timotimo m: say Method.isa(Routine)
14:47 camelia rakudo-moar aac9ef: OUTPUT«True␤»
14:47 cale2 perlpilot: so is it `seek $file: 20, SeekFromBeginning;` or `$file.seek(20, SeekFromBeginning);` or `seek($file, 20, SeekFromBeginning);`
14:48 [Coke] cales2 if seek is a sub, probably yes to all.
14:48 [Coke] (not every method has a sub variant)
14:49 moritz I don't think we need an indirect method call example for all methods
14:49 moritz there's a universal equivalance between $x.foo and foo($x:)
14:49 SmokeMachine IOninja: how did you "fixed" the GitHub?
14:49 cale2 Having these distinctions provides almost no benefits. I really don't get it.
14:50 moritz the main benefit is easier transition for those not used to much OO
14:50 cale2 moritz: I can't think of anyone in the world that fits that mold
14:50 cale2 OO won 20 years ago
14:50 perlpilot "won"?
14:51 moritz cale2: there are quite a few Perl 5 programmers who haven't really warmed up to OO yet
14:51 cale2 every school in the world teaches it
14:51 wamba joined #perl6
14:51 moritz I tend to prefer the sub form of IO and some list routines
14:51 cale2 So coming from perl5, even then you have the $object->method syntax which you can say is a mirror of $object.method
14:51 colomon joined #perl6
14:52 moritz yes, but Perl 5 has nearly no built-in methods
14:52 moritz I'm not sure it's worth having for everything though
14:52 IOninja SmokeMachine: hm?
14:53 cale2 So which is sugar for which?
14:53 perlpilot I would claim that not all problems are a "natural" fit for an OO solution.
14:53 cale2 self.function is sugar for function(self)?
14:53 moritz no
14:53 moritz for function(self:)
14:53 cale2 perlpilot: I agree 100%
14:54 moritz though it's more the other way 'round :-)
14:54 cale2 but you shouldn't arbitrarily pick OO for this, Procedural for that
14:54 perlpilot moritz: yeah :)
14:54 moritz cale2: why not?
14:54 cale2 moritz: because it's arbitrary. people like freedom, but they also like consistency
14:55 perlpilot cale2: the point is that different people think of things in different ways ... the benefit of Perl's "extra syntax" is to accommodate other modes of thought.
14:55 perlpilot cale2: and yes, consistency is good, but it's better to *allow* for it than to *enforce* it  :)
14:55 cale2 Too much freedom can give the average programmer analysis paralysis. Not everyone has time to consider "should this be a method or should it be a function... what would [famous programmer] say about this..."
14:56 DrForr WWDKD
14:56 perlpilot huh.  I thought of Djikstra before Knuth
14:56 cale2 perlpilot: But when it is arbitrarily set up ahead of time, you've already enforced it.
14:56 pmurias sjn: re who works on the jvm backend, I tend look at it to help determin how stuff is supposed to work on the js backend, I have fixed some minor stuff in it to get things more consistent but  I don't really develop the JVM backend
14:57 cale2 Perhaps I think there should just be a Math module with functions that operate on Numbers. But you've already chosen that there are numbers with Math methods. So you *have* enforced it
14:58 cale2 Just trying to offer a different perspective
14:58 moritz cale2: there are languages that force you into one paradigm. Perl 6 isn't one of them, intentionally. Trying to argue against that won't help anybody
14:58 cale2 moritz: but it has forced you into OO, even if it says it hasn't
14:59 moritz cale2: not really. I can write fine procedural or even functional Perl 6 code
14:59 moritz cale2: that might call a method from the standard library here and there, but that doesn't make it any less functional or procedural
14:59 cale2 and then it tries to pretend that it hasn't forced you into it, by making concessions like `function self: arg1, arg2`
15:00 DrForr things may be objects under the hood, but you're not forced to say $x.assign(1.plus(2)).
15:00 ocbtec joined #perl6
15:01 moritz cale2: the structure of your code decides whether code is imperative/functional/OO, not whether it contains method calls or not
15:01 cale2 I think I'm just railing against the way the language has been presented thus far. We need more voices from different perspectives simply teaching from their own perspective. "I came from Perl5" "I came from Haskell" "I came from Ruby" etc
15:02 moritz and if you structure your code as mostly pure, higher-order functions, you're writing functional code
15:02 cale2 I don't think it's helpful to present Perl6 as all of those things because the audience just gets confused thinking that they should use all of those paradigms together
15:02 perlpilot I guess one place where we're bent more towards objects is Grammars.  There's no conveniently procedural way to put together a grammar with actions and not expose that you have to know some OO concepts
15:02 * moritz would welcome our haskell or ruby-inspired overlord documentation or blog authors
15:03 cale2 moritz: I started that haskell-to-p6 doc yesterday
15:03 perlpilot In any case ... simple examples in the docs would be a boon to would-be Perl 6 programmers I think.
15:03 pmurias cale2: the functional and OO paradigms mix well together
15:03 moritz perlpilot: the functional style would be to traverse the tree of Match objects instead of having action methods fire
15:04 cale2 pmurias: Only if you make objects that are purely state and not behaviors attached. Then make functions that always return new objects
15:06 pmurias cale2: that would be using both paradigms at once. What I meant is that you can use both stateful objects and higher order functions in the same program
15:07 pmurias you do sacrifice some benefits of both of them but a lot of people code in a mixed style
15:07 llfourn joined #perl6
15:08 arnsholt moritz: That's pretty close to how action methods work though, isn't it?
15:08 moritz arnsholt: the timing is different
15:08 arnsholt Yeah, the timing is different, but the semantics are very similar
15:09 moritz arnsholt: action methods are fired after each successfully parsed token, so you can rely on post-order semantics
15:09 GauravArya my $sk = $fh.seek(0,SeekFromBeginning)  -- > Using this, when I print $sk, i get "(Mu)"
15:09 arnsholt Main difference is that you can have action methods that get called for matches that end up being rejected
15:10 perlpilot GauravArya: the docs also seem to be sparse on what the return type/value is for seek().  :-(
15:11 GauravArya Actually, I don't mind debugging a bit.. but since this is all new to me.. i am not able to make heads or tails about it..
15:11 IOninja GauravArya: what did you expect $sk to be?
15:11 GauravArya see.. normally, using perl5, you get the current seek value, which is numeric or integer type
15:12 IOninja perlpilot: that will be rectified by end of March
15:12 sweet_guy joined #perl6
15:12 GauravArya i wanted t store the current seek position, and pass it on to the next iteriation of Promise, so that it could read from where the last one left off..
15:12 perlpilot IOninja: Maybe sooner if we can recruit someone like GauravArya to help  ;-)
15:13 GauravArya hey man, I would be happy to do something.. my day job is total boring.. guys running around behind revenue numbers..
15:14 IOninja GauravArya: noted. ATM you can get current position with .tell
15:14 moritz GauravArya: you should read from a single thread, and from there distribute work to other worker threads
15:14 moritz GauravArya: also, https://docs.perl6.org/routine/hyper
15:15 moritz basically, with hyper you can process a list in parallel, and have control over the batch size and number of paralllel worker
15:15 GauravArya okay, i was thinking that  i will go serially with seek 0 till some value, and then start next one from there and so one and so one..
15:16 cale2 pmurias: The trick is combining the correct aspects from both paradigms. If you want to follow functional trends, create read-only objects and pure functions that operate on them.
15:16 GauravArya sorry, i mean tell, not seek in my explanation.. goof up..
15:17 IOninja GauravArya: I don't think you can currently read from the same filehandle in multiple threads.
15:17 GauravArya IOninja: so you mean to say that the file will be locked when one thread is using it? In perl5 using parallel fork manager, i have already done that
15:18 GauravArya and it worked wonderfully, the only drawback was that one couldn't populate the global data structure
15:18 cale2 GuaravArya: feel free to test this routines and update the docs if changes need to be made or examples added https://github.com/perl6/doc/tree/master/doc
15:19 IOninja GauravArya: not locked, I think currently it'll just throw. Last I recall the discussion on the topic it was something about libuv being paranoid about it.
15:19 GauravArya moritz: i am checking hyper .. its a total "newstuff".. ;)
15:21 IOninja GauravArya: as for testing and documenting these routines as people above invite you... Keep in mind there's a currently running IO grant with TPF that will be doing work with all the IO routines. Your documenting and testing efforts may be wasted if what you test/document is changed by that grant work.
15:21 GauravArya IOninja: its cool, then i can always test something out there.. hehe
15:22 IOninja GauravArya: but do point out stuff that's LTA. Like that .seek doesn't return position :)
15:22 IOninja huggable: LTA
15:22 huggable IOninja, "Less Than Awesome"; antonym: PDG "Pretty Damn Good"
15:23 lucs (président directeur-général)
15:24 GauravArya IOninja: I would be more than happy to do so, but currently my issue is that, i don't even know whether i am doing the right thing or typing the right syntax? I am in that nascent state right now..
15:24 GauravArya so currently i am trying to pass the "syntax" barrier.. as I come from perl5 world..
15:25 GauravArya And.. where does one report such errors/anomalies/unexpected-behavior? I am not aware about this, if you can help me with a link to read up, that would be great.
15:26 GauravArya Just to know how this process works and how and what to do.
15:26 IOninja GauravArya: doc issues report in https://github.com/perl6/doc
15:26 GauravArya okay.
15:26 GauravArya thanks
15:26 IOninja GauravArya: and all others by emailing to rakudobug@perl.org
15:27 IOninja it will then show up in perl6 queue on https://rt.perl.org/ (you can use http://perl6.fail to view the currently open issues)
15:33 GauravArya thanks..
15:33 GauravArya so does it mean that the code is buggy currently?
15:34 sena_kun >Generated on 2017-02-07T16:00:17Z from Type/IO.pod6 from perl6/doc on GitHub, commit db18eca
15:34 sena_kun is it me or the docs server info is a bit old?
15:34 IOninja GauravArya: All code is buggy :)
15:35 pyrimidine joined #perl6
15:35 GauravArya IOninja: i got one question, why is Perl6 running on VM and does not have a compiled binary like perl5.. or is it that it will follow later? or is the VM the future now
15:36 IOninja GauravArya: but IO stuff... yeah, that area didn't get a lot of love. Tests are sparse. Some behaviour is LTA.
15:36 IOninja GauravArya: perl 5 runs in a VM too. You just don't know it :)
15:36 GauravArya :)
15:36 IOninja It's coupled with it, whereas ours is not, so you can swap it to somethign else, like JVM
15:36 GauravArya IOninja: now that is not something I didn't know about.. :P
15:37 GauravArya sorry, i meant, that is indeed something.. whats happening to my fingers..
15:39 GauravArya IOninja: I have huge interest in IO as I use it on a regular basis, and I need to collect statistics, which caused me to learn perl in the first place.. a 20gb logfile takes around 30 minutes to process with perl5, to process line by line, matching most lines with static matching.. I want to bring it down to less than 5 minutes if possible.
15:39 GauravArya I got somehow close with the Parallel::ForkManager but lost interest when found out that you couldn't pass back the data structure, and it had to be dumped out into a file to be read again..
15:40 perlpilot GauravArya: you might want to check that the raw read/write speed doesn't hamper you too much  :)
15:40 GauravArya it was almost equal to running 10 instances of same script at different seek intervals
15:40 GauravArya perlpilot: i didn't get you
15:41 * IOninja &
15:41 pyrimidine joined #perl6
15:41 Geth ¦ doc: ad9c12a587 | (Will "Coke" Coleda)++ | 2 files
15:41 Geth ¦ doc: remove trailing whitespace
15:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ad9c12a587
15:41 perlpilot GauravArya: you said the script runs in 30 min and you'd like to get it down to 5 min.   Check that raw disk IO doesn't preclude your desires.
15:42 moritz time cat thefile > /dev/null
15:43 GauravArya oh! that.. yes.. its OK.. i keep an eye on the wa, hi, si on top.. when I was using parallel fork manager, so that thing was  able to parse 50gb logfile, collect a phone(12 digit) phone number from line, populate it in the hash and write it to the file ... all in less than 3 minutes..
15:43 perlpilot GauravArya: wrt Parallel::ForkManager sharing a data structure ... depending on what you need to do with that data structure, you could do a client/server thing where all of your forks write to a socket that aggregates the results.
15:44 perlpilot (and if you're looking for speed, I don't think Perl 6 will beat Perl 5 in this regard  ;-)
15:44 perlpilot (yet!)
15:45 GauravArya okay.. I could have done sockets.. and that would have served the purpose too.. but its much cooler to populate the global DS at your own will.. just a way, i mean, i wanted to do this way.. nothing again sockets.. they are cool too..
15:45 GauravArya perlpilot: yes , i know perl6 is slow but i am overwhelmed with the new features its bringing..
15:46 GauravArya i can wait for speed to come later, till then keep learning..
15:46 mspo yeah I've been trying to think of languages that have similar feature sets (concurrency, parallelism, utf8 strings)
15:46 mr-foobar joined #perl6
15:46 GauravArya c++ ?
15:46 mspo I think without those three things it's difficult to think something is very future proof
15:47 mspo GauravArya: a little too low level maybe?
15:47 moritz rust?
15:47 sena_kun *cough* ...askel... *cough-cough*
15:47 mspo go, rust, perl6, elixir, dart (ish?)
15:47 GauravArya mspo: agreed..
15:47 mspo how is haskell's utf8?
15:48 mspo bolted-on or native-feel
15:48 sena_kun isn't it?
15:48 mspo I don't know I'm asking :)
15:48 GauravArya mspo: and Mr. Doulas Schmidt made ACE to wrap it all up in a nice bundle, but to understand that fireball, its a monumental task altogether...
15:48 Ulti in response to http://stackoverflow.com/questions/41914489/accessing-the-last-element-in-perl6 is there a strong argument for not just simply allowing negative integers to imply the *-n functionality?
15:49 sena_kun mspo, there are utf8-ready packages for encoding/decoding and stuff.
15:49 mspo sena_kun: so bolted-on
15:49 mspo unfortunate
15:50 sena_kun mspo, you still need to use such things anyway, not in the least because of default strings that are... Bad.
15:51 Ulti hmm actually the final comment from Christopher Bottoms sums it up well
15:51 sena_kun but it can be very fast, high-level, etc. Not an ad. :)
15:51 jnthn Ulti: Being able to detect off-by-ones and similar accidents. :)
15:52 mspo so you have to do > import Prelude hiding (readFile, writeFile)
15:53 sena_kun mspo, you can just use custom prelude. :)
15:53 mspo sena_kun: so bolted on
15:53 kalkin- How do I run a perl6 file from perl6, without spawning perl6?
15:53 IOninja kalkin-: EVALFILE
15:54 Geth ¦ doc/master: 4 commits pushed by (Will "Coke" Coleda)++
15:54 Geth ¦ doc/master: 9045b1fae7 | Anglicize horse noise.
15:54 Geth ¦ doc/master: 40591d8c7f | fix typo
15:54 Geth ¦ doc/master: 558519cf96 | standarize spelling
15:54 Geth ¦ doc/master: 8343096370 | learn new words
15:54 Geth ¦ doc/master: review: https://github.com/perl6/doc/compare/ad9c12a587...8343096370
15:54 mspo I think erlang might actually be unicode-friendly, weirdly enough
15:54 kalkin- IOninja: thanks will try that
15:54 * IOninja laughs at "horse noise"
15:55 IOninja intersting:
15:55 IOninja m: say &circumfix:<:{ }>.name
15:55 camelia rakudo-moar aac9ef: OUTPUT«␤»
15:56 IOninja m: my &foo = sub bar {}; say &foo.name
15:56 camelia rakudo-moar aac9ef: OUTPUT«bar␤»
15:56 IOninja Ah, nevermind. Not interesting.
15:56 gfldex m: say &circumfix:<{ }>.name
15:56 camelia rakudo-moar aac9ef: OUTPUT«circumfix:<{ }>␤»
15:56 IOninja https://github.com/rakudo/rakudo/blob/nom/src/core/Hash.pm#L762
15:58 moritz could be changed into  ... = anon sub circumfix:<:{ }>(... to get a name
15:58 moritz (possibly)
15:58 IOninja m: my &circumfix:<z{ }> = sub circumfix:<z{ }> {};
15:58 camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
15:58 IOninja heh
15:58 IOninja m: my &circumfix:<z{ }> = anon sub circumfix:<z{ }> {};
15:58 camelia rakudo-moar aac9ef: ( no output )
15:58 IOninja m: my &circumfix:<z{ }> = anon sub circumfix:<z{ }> {}; say &circumfix:<z{ }>.name
15:58 camelia rakudo-moar aac9ef: OUTPUT«circumfix:<z{ }>␤»
15:58 IOninja cool
15:58 mspo sena_kun: isn't concurrency in haskell also driven by various libraries?
15:59 pyrimidine joined #perl6
15:59 IOninja m: my &z = sub z {}
15:59 camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
15:59 IOninja m: my &z; sub z {}
15:59 camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
15:59 IOninja Needs fixin'
15:59 moritz indee'
16:00 IOninja I guess it's seeing &z assumes it's a proper Routine and tries to see if it's a yada
16:00 jnthn Heh, I suspect it's trying to avoid a redecl error
16:00 sena_kun mspo, it has some primitives in base, but it can be extended further with modules.
16:00 jnthn Yeah
16:01 mspo sena_kun: that doesn't help it's already difficult approachability :)
16:02 sena_kun mspo, I don't get it why do you think that it is bad not to push everything into the core of the language. libraries are nice. I know such approach has its own drawbacks, but it is not something to blame seriously.
16:02 sena_kun but I admit it can be difficult. :)
16:03 mspo sena_kun: core things have gravity
16:04 sena_kun mspo, a bit more details, please? if I'm not annoying now
16:04 mspo sena_kun: if ~everyone is using https://hackage.haskell.org/package/utf8-string  then that should just become the core strings package
16:05 mspo sena_kun: and then "haskell" the language grows first class utf8 strings as a feature
16:05 mspo sena_kun: but, in general, the stdlib (or prelude or whatever) is important in my opinion
16:05 sena_kun mspo, yep, and that will(or will be close to) break all the old code that worked for the decades.
16:06 mspo haskell isn't that old ;)
16:06 sena_kun backward compatibility is a horrble beast.
16:06 mspo it's just as important as the stdlib :)
16:06 mspo churn sucks!
16:06 sena_kun mspo, okay, maybe for years. :)
16:08 sena_kun anyway, enough offtopic here from me today. There are still people needed to go wild in https://github.com/perl6/doc/pulls.
16:09 llfourn joined #perl6
16:09 sena_kun Especially for #1187.
16:10 mspo oh actually, haskell's built in Char is called out as "unicode" according to https://www.haskell.org/onlinereport/basic.html
16:12 mspo Prelude> let y = "¶¨∆∞∂å√®´√"
16:12 mspo Prelude> y
16:12 mspo "\182\168\8710\8734\8706\229\8730\174\180\8730"
16:12 mspo interesting
16:14 CIAvash `putStrLn y` works
16:14 sena_kun mspo, it's a interpreter-related issue(AFAIK), you cat putStr to get proper characters.
16:14 mspo yes
16:16 alimon joined #perl6
16:16 mspo okay, haskell is modern :)
16:16 Ulti m: my %hash = ("hi"=>"world"); say "5" ++%hash;
16:16 camelia rakudo-moar aac9ef: OUTPUT«6␤»
16:16 Ulti ^ thats a bit confusing
16:17 jnthn Redundant second +, since infix:<+> already will numify :)
16:17 Ulti yeah
16:17 Ulti but you can do it is more my point and it looks like prefix increment
16:17 gfldex m: my %hash = ("hi"=>"world"); say "5" ++ %hash;
16:17 camelia rakudo-moar aac9ef: OUTPUT«6␤»
16:17 brrt joined #perl6
16:17 IOninja Then it'd be a TTIAR
16:18 jnthn Ulti: Yeah, it's not really good style :)
16:18 Ulti im not sure Im a fan of + ever being used for the make it a number stuff
16:19 Ulti especially since one of the major things you do with a number is add them together
16:19 jnthn It's one of those places where knowing the rule that a term should always be followed by an infix is helpful. :)
16:19 Ulti yeah
16:20 wamba joined #perl6
16:23 eliasr joined #perl6
16:25 IOninja Hm, this no longer hangs: https://github.com/rakudo/rakudo/blob/nom/src/core/Hash.pm#L761-L762
16:25 IOninja But now it dies with "don't change grammar in the setting, please!"
16:26 IOninja I mean making it a normal circumfix sub does.
16:26 Ulti is IOninja Zoffix doing IO work?
16:26 IOninja Wonder why? How come the sub circumfix:<{ }>(*@elems) { my % = @elems } above doesn't cause grammar change?
16:27 sena_kun Ulti, yes.
16:29 moritz IOninja: there's probably a rule for circumfix:<{ }> in the grammar, but not for circumifix:<:{ }>
16:29 moritz *circumfix
16:29 IOninja Ahhh
16:30 IOninja Thanks. Now I get it
16:30 AlexDaniel joined #perl6
16:30 IOninja Well, sorta.
16:31 IOninja I can still make a new circumfix but without changing grammar if I use the my &circumfix:<> thing?
16:31 IOninja Or is the grammar change canary not detecting that change?
16:31 moritz no idea
16:32 IOninja m: my &circumfix:sym<foo>;
16:32 camelia rakudo-moar aac9ef: ( no output )
16:32 IOninja m: sub circumfix:sym<foo> {};
16:32 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Not enough symbols provided for categorical of type circumfix; needs 2␤at <tmp>:1␤------> 3sub circumfix:sym<foo>7⏏5 {};␤»
16:33 IOninja oh, interesting. I tried giving it a name with `anon sub circumfix:<:{ }>` and now it complains about changing grammar :|
16:33 moritz :(
16:33 moritz m: sub circumfix:sym<foo bar>($x) { "[$x]" }; say foo 42 bar
16:33 camelia rakudo-moar aac9ef: OUTPUT«[42]␤»
16:34 moritz m: sub circumfix:sym<bra ket>($x) { "[$x]" }; say bra 42 ket
16:34 camelia rakudo-moar aac9ef: OUTPUT«[42]␤»
16:34 IOninja .oO( I thought I made that throw :/ )
16:35 IOninja m: sub infix:sym<wat> {}
16:35 camelia rakudo-moar aac9ef: ( no output )
16:35 IOninja m: sub infix:foo<bar>:sym<wat> {}
16:35 camelia rakudo-moar aac9ef: ( no output )
16:35 IOninja :S
16:36 IOninja Ah, it's for stuff that isn't a proper category: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L4684-L4711
16:36 IOninja m: sub notinfix:foo<bar>:sym<wat> {}
16:36 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤The :sym<> colonpair is reserved␤at <tmp>:1␤------> 3sub notinfix:foo<bar>:sym<wat>7⏏5 {}␤»
16:42 GauravArya moritz: I feel i understand why you suggested hyper, instead of Pomise.start. As it looks like, with my current approach, there may be chances of collision inside hash, as I will try to populate a global hash via separate threads. Can hyper help here?
16:43 mspo sounds like you need a mutex
16:44 GauravArya mspo: yes.. but do we got one? or something similar?
16:44 jnthn GauravArya: Do you do a bunch of processing, and then put the results of that into the hash?
16:44 moritz GauravArya: if at all possible, return separate hashes from processing each chunk, and then in the end combine them (in a single thread)
16:45 mspo https://docs.perl6.org/type/Lock
16:45 GauravArya jnthn: yes sir, to make long story short, I am trying to process a huge file, parallelly and simultaneously populate a hash which shall be parsed again to print final stats.
16:46 GauravArya moritz: hmm.. this could work.. maybe i could populate each thread's own hash, and then pass it back to main thread and copy it..
16:46 moritz GauravArya: that's pretty much map/reduce on a single machine
16:46 GauravArya is that bad?
16:47 mspo usually slower than just reading a file :)
16:47 mspo but more fun?
16:47 jnthn m: sub foo() { start { %(a => 1, b => 2) } }; sub bar() { start { %(c => 3, d => 4) } }; my %final-hash = flat await foo, bar; say %final-hash
16:47 camelia rakudo-moar aac9ef: OUTPUT«{a => 1, b => 2, c => 3, d => 4}␤»
16:48 moritz GauravArya: not bad at all
16:48 GauravArya mspo: why would it be slower?
16:49 mspo GauravArya: sequentially reading a file is very very fast
16:49 GauravArya moritz: but yes, parallel processing sounds fun to me, definitely.. with parallel fork manager, i regularly light up all 24cores of our office's 24-core HP DL380 gen8 .. just for kicks..
16:49 GauravArya mspo: but if we are seeking at a particular value, the system knows where to start and will sequentially seek from there, isn't that how it works?
16:50 mspo GauravArya: I suppose so
16:50 mspo give it a shot
16:50 mr_ron joined #perl6
16:52 mspo I guess I'm saying that the feeder thread isn't usually slow enough to optimize
16:52 mspo the workers should run in parallel
16:52 mspo cat | xargs -P :)
16:54 GauravArya joined #perl6
16:56 GauravArya so i guess, in order to do what I want to do, i should make couple of threads, open file at different seek positions, populate data, send it back to main, join all that up and then do the final printing..
17:03 newbie1 joined #perl6
17:06 tony-o timotimo: i'll take a look at the markup, i probably messed up that repo browser/tab thing during the fix
17:06 kurahaupo joined #perl6
17:06 pyrimidine joined #perl6
17:07 ssotka joined #perl6
17:09 tony-o timotimo: the repo browser thing should be fixed
17:09 girafe joined #perl6
17:12 Geth ¦ doc: cadaf583bd | (Will "Coke" Coleda)++ | .gitignore
17:12 Geth ¦ doc: git ignore generated examples
17:12 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cadaf583bd
17:14 llfourn joined #perl6
17:14 tony-o timotimo: to answer the syntax question, it's using github in the background
17:15 tony-o i'll have a look at why that's happening later today tho, right now i need to get work done
17:19 khw joined #perl6
17:23 IOninja m: multi foo {}; multi foo ($x, :$foo) {}; say &foo.multi
17:23 camelia rakudo-moar aac9ef: OUTPUT«False␤»
17:23 IOninja Docs say "Returns True if the routine is a multi sub or method."
17:23 IOninja Is it a bug?
17:24 jnthn m: multi foo {}; multi foo ($x, :$foo) {}; say &foo.candidates>>.multi
17:24 camelia rakudo-moar aac9ef: OUTPUT«(True True)␤»
17:24 jnthn No, because &foo points at the proto
17:24 IOninja Ah. Thanks
17:26 seatek joined #perl6
17:26 perlpilot Is there a way to ask if a Sub is a proto or not?
17:27 jnthn .is_dispatcher I think
17:27 perlpilot (I guess .multi does that too, but the name is slightly strange for that purpose)
17:28 Geth ¦ doc: c0b61c9247 | (Zoffix Znet)++ | doc/Type/Routine.pod6
17:28 Geth ¦ doc: Add example for .multi
17:28 Geth ¦ doc:
17:28 Geth ¦ doc: And mention the thing where &foo is a proto and its multi returns false
17:28 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c0b61c9247
17:30 khw joined #perl6
17:34 japhb joined #perl6
17:42 ggoebel joined #perl6
17:44 [Coke] DrForr: looking at https://github.com/drforr/perl6-Perl6-Parser/blob/master/lib/Perl6/Parser.pm6 - why is it sometimes 8, sometimes 4 indent?
17:48 TimToady .tell GauravArya the problem with parallel reads from the same file is that it's only going to work well if you have something like an SSD to read from; otherwise you're probably just waiting for the disk head to go back and forth a lot
17:48 yoleaux TimToady: I'll pass your message to GauravArya.
17:49 inra joined #perl6
17:57 rindolf Hi all
18:00 pyrimidine joined #perl6
18:15 llfourn joined #perl6
18:21 IOninja hi
18:23 agentzh joined #perl6
18:26 samcv [Coke], looks like there's tabs in that file. you can get github to change the tabs displayed with editorconfig https://github.com/perl6/Atom-as-a-Perl6-IDE#editorconfig
18:26 samcv details in my link
18:33 DrForr [Coke]: Where do you see 4-space?
18:34 DrForr Oh, never mind, I do that in a few places still, should remove those.
18:35 DrForr Fixed, will be pushed after I get something else accomplished :)
18:43 eroux joined #perl6
18:46 samcv in my projects where I use tabs, i just have a .editorconfig file to set tabstop at 4 spaces so it doesn't look blown up
18:46 samcv really useful
18:47 samcv this is mine in one project https://github.com/samcv/keira-perl6-ircbot/blob/master/.editorconfig
18:47 mspo 10x white space is fibonacci spacing
18:48 mspo so each block is indented by the next fibonacci number
18:48 samcv lol what. please no
18:48 mspo if your tab key doesn't do this for you then please try a real editor
18:48 mspo or go back to "coding" in "php" ;)
18:49 DrForr The 4-space indents were where I was lining up <foo bar> that went past the 80-column boundary.
18:50 DrForr I usually put them at tab stops (now), but I started out indenting halfway.
18:52 samcv i like tabs for personal projects since i can change the tabstop whenever i please
18:52 samcv but others don't like it ;)
18:52 samcv but .editorconfig is great. i have the atom plugin, there's ones for vim and others. and can enforce number of tabs per filetype in a project even
18:53 samcv and make sure ones on windows don't save in CRLF
18:53 samcv there's plugins for basically every editor
18:53 mspo VSCode is actually pretty nice
18:54 samcv This sample i have here https://github.com/perl6/Atom-as-a-Perl6-IDE/blob/master/config/.editorconfig sets tabstop to 4 for perl6 files, 2 spaces for .travis.yml and sets it to use real tabs for Makefiles
18:54 samcv mspo, VSCode is based on the same thing atom is based on i believe
18:54 ggoebel joined #perl6
18:54 mspo samcv: yet somehow it's 100x faster ;)
18:54 mspo samcv: they're both atom apps
18:54 mspo like slack
18:54 mspo err- electron :)
18:54 samcv you mean electron
18:54 ilmari samcv: missing } in [*.{p6,pl6,pm,pm6,t]
18:54 samcv they have made atom much faster in the last few release
18:54 samcv thanks ilmari
18:55 samcv but yeah editorconfig is great
18:55 samcv can even strip whitespace at the end of lines. and the atom plugin is really good, will even tell you when some other setting or plugin is interfeering with it
18:57 [Coke] in my projects where I use tabs, I remove them with fire.
18:57 samcv lol
18:57 mspo [Coke]: are you in the US?
18:57 [Coke] mspo: Hai.
18:58 mspo I have a theory that tabs are preferred by europeans (and rob pike)
18:58 [Coke] mspo: ¿por que?
18:58 [Coke] ah.
18:58 samcv you can get a VSCode plugin for editorconfig it looks like
18:58 samcv http://editorconfig.org/#download so many editors with plugins for it!
19:02 sena_kun joined #perl6
19:02 samcv nice just installed the vim editorconfig plugin. works flawlessly
19:03 hobbs joined #perl6
19:04 itaipu_ joined #perl6
19:06 samcv most of the projects i work on, i just clone an editorconfig file and tweak to their tab style, which is easier than fussing with vim/atom settings
19:09 mr_ron joined #perl6
19:15 RabidGravy boo!
19:16 sufrostico joined #perl6
19:17 llfourn joined #perl6
19:19 sufrosti1o joined #perl6
19:19 sufrosti2o joined #perl6
19:20 TEttinger joined #perl6
19:21 samcv boo!
19:28 itaipu joined #perl6
19:28 cdg joined #perl6
19:31 inra joined #perl6
19:33 inraa joined #perl6
19:35 timotimo boo
19:36 espadrine joined #perl6
19:37 itcharlie joined #perl6
19:42 gk-1wm-su joined #perl6
19:42 gk-1wm-su left #perl6
19:42 IOninja ????????????!
19:43 timotimo you complete me, IOninja
19:51 IOninja So I guess bdfoy doesn't wish to respond to questions on his tickets that come from *me*? https://rt.perl.org/Ticket/Display.html?id=130715#ticket-history
19:52 * IOninja creates a new alias on RT :P
19:53 timotimo i find it slightly surprising that $proc.err.close returns $proc
19:53 timotimo is that so you can $proc.err.close.out.close or something?!
19:53 IOninja probably
19:54 timotimo wtf :)
19:58 coreutil joined #perl6
19:59 coreutil joined #perl6
20:00 * AlexDaniel wonders if he will ever adapt to this bracing style
20:01 bjz joined #perl6
20:02 AlexDaniel it's going to happen at some point, I'm pretty sure. But it's different from all other variations because I'm actually used to the fact that this amount of indentation means this or that…
20:03 coreutil joined #perl6
20:03 sufrostico joined #perl6
20:04 sufrosti1o joined #perl6
20:04 sufrosti2o joined #perl6
20:04 coreutil joined #perl6
20:04 IOninja Why do you need to adapt to it? :)
20:05 AlexDaniel well… I don't know… I want to be able to read the ticket
20:05 IOninja Just take it for what it is: poorly formatted code.
20:06 IOninja Hm. We added some new features, but I don't see them in the docs.
20:06 AlexDaniel but, but! Shouldn't we be more open-minded?
20:06 IOninja Kinda puts it at odds with the changelog: "Added Any.skip(n)" and users have no place to look at it?
20:07 coreutil joined #perl6
20:07 IOninja Kinda confusingly, there *is* a skip, but it's for the Test::skip
20:07 IOninja Or was it meant to be a private method?
20:07 timotimo oh! i have to write the weekly tonight
20:08 nhywyll joined #perl6
20:10 samcv timotimo, mention that i added a docs section for my collation stuff https://docs.perl6.org/language/experimental#Collation and feedback is wanted if people want to make comments on it
20:11 samcv idk how that would work in anycase
20:11 samcv but you should link to it
20:11 Tonik joined #perl6
20:12 timotimo cool
20:12 timotimo i don't know what you mean by that, though
20:12 coreutil joined #perl6
20:14 samcv Samantha McVey has added documentation for the experimental string sort collation features, which partially implements the Unicode Collation Algorithm.
20:14 samcv idk what is the best way to get feedback on something, idk maybe a docs ticket? though maybe not the best place. maybe a specs ticket?
20:14 timotimo i meant "idk how that would work in anycase"
20:14 timotimo what you mean by that
20:14 samcv oh
20:14 samcv getting feedback
20:14 timotimo ah
20:15 samcv probably a specs ticket would be good maybe
20:15 samcv does that sound good to you?
20:16 [Coke] if you want feedback on a docs ticket, you can ask here; you can assign people to the ticket and ask for review (for PRs you can ask for review directly)
20:16 AlexDaniel and still mention it here because they might miss it otherwise
20:16 [Coke] I wonder if we should have a place where devs could highlight one or two things that they would like feedback on (like : "please work on this ticket", or "what do you think of this ticket" where other devs could go through the list.)
20:16 samcv that would be nice
20:17 [Coke] like on a github perl6/*/wiki
20:17 IOninja Ah, now I spot tests for Any.skip/Supply.skip; so those are public
20:17 AlexDaniel timotimo: I have a feeling that it was done on purpose so that it blows up
20:18 AlexDaniel and if it was accidental, I'm happy with it anyway :)
20:18 llfourn joined #perl6
20:19 AlexDaniel the whole idea behind throwing when there is a non-zero exit code is pretty nice
20:19 AlexDaniel it prevents silent failures nicely. And if you want it to fail silently, just do it explicitly
20:20 IOninja [Coke]: wasn't that the plan behing @LARRY ticket tag?
20:20 IOninja I know I don't review those... or even if I'm meant to :/
20:21 [Coke] IOninja: that's fine for RT... but it's not like @LARRY is going through those on a regular basis.
20:21 IOninja AlexDaniel: I think the point of the ticket is non-zero exit code != failure
20:21 [Coke] but we have a ton of different issue queues.
20:21 AlexDaniel toh ok
20:23 AlexDaniel I've left a comment. I think somebody has to reject it :)
20:25 IOninja FWIW "this wall of text" comes off a bit negative. We do want detailed bug reports.
20:26 AlexDaniel not sure if bug reports actually need a backstory… I've always thought that my style is good enough – “here's some short code that looks wrong, [I was expecting …/it is wrong because …]”
20:27 AlexDaniel and here the title say that .close sholudn't blow up, then the text says that we shouldn't throw at all, and all that stuff because somebody was trying to work around some other ticket, and the docs say this and that… Is it all necessary?
20:28 AlexDaniel I can include all that in my bug reports, sure… does anybody need it?
20:28 [Coke] important to know what the docs say, yes.
20:28 [Coke] and that they read them.
20:28 [Coke] [6~
20:30 IOninja In my reading, I see: someone got exploding .close, stuck a `try` on it, but it still was exploding, because it's the sunk proc that explodes. So they wrote (possibly in our docs) that you need that LEAVE stuff. Brian read it, along with the interpretation that it's required and .close throws, and made a ticket that .close shouldn't throw.
20:31 mrdside joined #perl6
20:31 IOninja I think I see where
20:32 IOninja https://docs.perl6.org/type/IO.html#method_close
20:32 IOninja "You may want to consider using a LEAVE phaser to guard against exceptions."
20:32 * IOninja changes it
20:32 AlexDaniel oh. OK
20:34 IOninja which is actually the wrong close for bdfoy's ticket; that one's for IO::Pipe.close
20:34 Geth ¦ doc: d1f2d496ce | (Zoffix Znet)++ | doc/Type/IO.pod6
20:34 Geth ¦ doc: Remove suggestion for using LEAVE phasers
20:34 Geth ¦ doc:
20:34 Geth ¦ doc: Seems to cause unwanted confusion: https://rt.perl.org/Ticket/Display.html?id=130715
20:34 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d1f2d496ce
20:36 telex joined #perl6
20:36 AlexDaniel IOninja: ok but it should probably also check the result of the close
20:37 AlexDaniel oh… not in this case right
20:37 IOninja it?
20:37 labster joined #perl6
20:37 IOninja s: IO::Handle, 'close'
20:37 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/IO/Handle.pm#L118
20:38 IOninja heh "# TODO: catch errors"
20:38 IOninja but looks like that one doesn't throw. just returns, erm, null?
20:38 robertle joined #perl6
20:38 IOninja m: use nqp; sub meow { my $x := nqp::null }; dd meow
20:38 camelia rakudo-moar aac9ef: OUTPUT«Mu␤»
20:38 IOninja A Mu
20:39 pmurias joined #perl6
20:40 AlexDaniel s: IO::Handle, 'write'
20:40 SourceBaby AlexDaniel, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/IO/Handle.pm#L637
20:41 AlexDaniel IOninja: actually, the docs were right I think
20:41 silug joined #perl6
20:42 itaipu joined #perl6
20:43 IOninja AlexDaniel: I don't get what they mean by "use LEAVE phaser to guard against exceptions"
20:43 AlexDaniel it has nothing to do with exceptions from the .close itself
20:43 AlexDaniel and you have to read the whole thing
20:43 AlexDaniel for example:
20:43 IOninja Ah
20:44 AlexDaniel m: my $file = { … }; die ‘oops’ if ‘run grep, …’; LEAVE { say ‘ok, let's close our file here!’ }
20:44 camelia rakudo-moar aac9ef: OUTPUT«ok, let's close our file here!␤oops␤  in block <unit> at <tmp> line 1␤␤»
20:44 AlexDaniel so you've opened a file, then something died in the middle of your code
20:44 AlexDaniel you want to close the file in LEAVE anyway
20:44 IOninja I don't get why I need to close it thought
20:44 IOninja *though
20:44 AlexDaniel that's a good, but different question
20:45 perlpilot doesn't it close eventually anyway?
20:45 gfldex .close is a bad example. Remove a temp file would fit better but is hard to do in a doc example
20:45 IOninja Well, I removed a note from .close.
20:45 gfldex it does close but you may run out of filehandles until then
20:46 AlexDaniel … so you should close?
20:46 gfldex if you open loads of files, you should
20:46 perlpilot so, it's really a question of timing?
20:46 IOninja Anyway. If that LEAVE goes back in, I'd prefer if it included a concrete example to avoid the confusion bdfoy experienced.
20:46 * IOninja goes back to populating changelog
20:46 gfldex please take into account that we got a thread scheduler now. That can explode things quickly.
20:49 mr_ron joined #perl6
20:52 timotimo ?
20:53 timotimo gfldex: what does that mean?
20:53 timotimo also, dinner time!
20:54 gfldex timotimo: imagine my @array; @array».your-method-here();
20:54 Geth ¦ doc: 137aa82763 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6
20:54 Geth ¦ doc: Revert "Remove suggestion for using LEAVE phasers"
20:54 Geth ¦ doc:
20:54 Geth ¦ doc: This reverts commit d1f2d496ceab75573642ea51d61063b9939dde08.
20:54 Geth ¦ doc:
20:54 Geth ¦ doc: Not only this .close is not related to the thing experienced in the
20:54 Geth ¦ doc: ticket, but it also talks about exceptions in other parts of your code
20:54 Geth ¦ doc: (not even related to the file you want to close).
20:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/137aa82763
20:54 Geth ¦ doc: bff39653d8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6
20:54 Geth ¦ doc: More precise explanation of using LEAVE for .close
20:54 Geth ¦ doc:
20:54 Geth ¦ doc: There is probably a much better way to phrase it, but for the moment
20:54 Geth ¦ doc: this will do.
20:54 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bff39653d8
20:55 gfldex right now opening files in your-method-here doesn't really do anything but with tons of threads it may hurt.
20:55 AlexDaniel this is a rough attempt to fix it. Feel free to improve it of course
20:58 pyrimidine joined #perl6
20:58 ribasushi joined #perl6
21:02 cale2 has anyone tried using perl6 with hackerrank?
21:04 cale2 [Coke]: Cheers for the horse correction. I never was good with this thing https://www.amazon.com/Fisher-Price-See-Say-Farmer-Says/dp/B00JYCN84A
21:05 aindilis joined #perl6
21:10 AlexDaniel buggable: tag SEGV
21:10 buggable AlexDaniel, There are 31 tickets tagged with SEGV; See http://perl6.fail/t/SEGV for details
21:12 [Coke] cale2: np: just shutting up xt/aspell.t
21:14 cdg joined #perl6
21:17 aindilis joined #perl6
21:19 llfourn joined #perl6
21:21 pmurias joined #perl6
21:30 ggoebel joined #perl6
21:34 bjz joined #perl6
21:40 cdg_ joined #perl6
21:40 khw joined #perl6
21:46 coreutil joined #perl6
21:47 coreutil joined #perl6
21:48 pukku joined #perl6
21:48 RabidGravy well at least I got somewhere
21:48 RabidGravy perl6 -Ilib -e 'use Device::USB; say Device::USB.version'
21:48 RabidGravy Device::USB::Version.new(major => 1, minor => 0, micro => 21, nano => 11156, rc => "", describe => "http://libusb.info")
21:48 coreutil joined #perl6
21:49 newbie1 joined #perl6
21:49 pukku Hi! Is there any way to take Perl6 code and have it turned into HTML, for inclusion in a web page? Kind of like what Perl::Tidy does with the '-html' argument?
21:50 moritz pukku: yes, there's vim with :TOhtml, and Text::VimColor (p5) that automates it
21:50 moritz pukku: also pygments can hilight Perl 6 code
21:50 moritz pukku: finally, https://docs.perl6.org/ uses something based on nodejs to hilight the code
21:50 RabidGravy or copy it into a github gist and copy the resulting html :)
21:51 pukku Thanks! That's a bunch of things I can look at...
21:52 RabidGravy doesn't Pod::To::HTML do something with code blocks nowadays?
21:53 labster joined #perl6
21:53 moritz only if you pass it a callback that does the thing
21:53 moritz iirc
21:53 IOninja perl6.party uses codemirror.js with this file (it ain't perfect): https://github.com/zoffixznet/perl6.party/blob/master/assets/js/codemirror/perl6-mode.js
21:54 IOninja Useful when you don't want to re-generate the stuff for every minor change.
22:00 pyrimidine joined #perl6
22:14 pukku Thanks for the suggestions -- pygments has a site called "dpaste.org", which you can use to generate a gist, and then edit the html.
22:21 llfourn joined #perl6
22:30 coreutil joined #perl6
22:32 labster joined #perl6
22:34 coreutil joined #perl6
22:34 krmx joined #perl6
22:34 coreutil joined #perl6
22:36 ccakes joined #perl6
22:37 coreutil joined #perl6
22:37 coreutil joined #perl6
22:38 coreutil joined #perl6
22:39 AlexDaniel s: Proc, 'close'
22:39 SourceBaby AlexDaniel, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
22:40 cale2 m: say 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC'.comb.Bag;
22:40 camelia rakudo-moar aac9ef: OUTPUT«bag(C(12), T(21), G(17), A(20))␤»
22:41 coreutil joined #perl6
22:41 cale2 weird how the docs say .Bag works on a Mix. Yet .comb doesn't produce a Mix
22:41 ChoHag joined #perl6
22:42 AlexDaniel ah, it's in Handle
22:42 AlexDaniel right
22:43 AlexDaniel cale2: sorry, what's the question?
22:44 AlexDaniel cale2: .comb produces a Seq, which you can turn into a Bag or a Mix
22:44 cale2 AlexDaniel: Actually .Bag also operates on a Setty. I'm guessing .comb produces a Setty type
22:45 AlexDaniel Seq is not a Setty
22:45 AlexDaniel s: Seq, 'Bag'
22:45 SourceBaby AlexDaniel, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|58312464>} (Method+{<anon|5831246...)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e
22:45 IOninja cale2: no, Any object can be a .Bag. And you've .Bag'ed a Seq
22:45 AlexDaniel s: ().Seq, 'Bag'
22:45 SourceBaby AlexDaniel, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|58312464>} (Method+{<anon|5831246...)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e
22:45 AlexDaniel IOninja: I'll never learn this :(
22:45 IOninja I think something's broke with it...
22:46 IOninja s: '', 'say', \()(
22:46 SourceBaby IOninja, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at -e:7â�¤------> [32m<BOL>[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        argument listâ�¤
22:46 IOninja s: '', 'say', \()
22:46 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/aac9efc/src/core/Mu.pm#L470
22:46 IOninja or not...
22:46 AlexDaniel cale2: but it's good that you're mentioning a problem with the docs!
22:46 AlexDaniel cale2: what exactly were you reading?
22:46 cale2 AlexDaniel: https://docs.perl6.org/routine/Bag
22:47 AlexDaniel hmm
22:47 cale2 Also, is it stated anywhere that you can have multiple selectors on a Bag and it will print all of them on the same line? I only see that you can use one selector at a time in the docs
22:48 IOninja cale2: it's just a hash slice
22:48 cale2 m: say 'AGCTTTTCATTCTGACTGCAAAGAGTGTCTGATAGCAGC'.comb.Bag<A T C G>
22:48 camelia rakudo-moar aac9ef: OUTPUT«(10 12 8 9)␤»
22:48 AlexDaniel but it can be mentioned
22:48 AlexDaniel cale2: can you open some doc issues for these issues?
22:49 AlexDaniel .oO( or maybe fix them right away if you can )
22:49 IOninja AlexDaniel: this bug is actually what hitting the bot: https://rt.perl.org/Ticket/Display.html?id=128905#ticket-history
22:49 AlexDaniel ah, this again
22:50 cale2 IOninja: I don't even see where it says Bag type inherits from Hash type, though.
22:50 cale2 So how could it allow for Hash Slices
22:50 IOninja cale2: fine, a bag slice :)
22:52 IOninja Don't see any of these in the docs.... well, rather don't see any them in the TOC so unless you already know or try, you won't know these are available on all the Anyies: https://github.com/rakudo/rakudo/blob/nom/src/core/Any.pm#L436-L442
22:54 pyrimidi_ joined #perl6
23:00 gk--1wm- joined #perl6
23:00 gk--1wm- left #perl6
23:04 newbie1 joined #perl6
23:06 agentzh joined #perl6
23:15 Geth ¦ doc: 09a4093f1a | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO/Handle.pod6
23:15 Geth ¦ doc: Revert "Added doc for the :close adverb in slurp-rest"
23:15 Geth ¦ doc:
23:15 Geth ¦ doc: This reverts commit 71fde8d0a1d4a95522672f37e1eb2c9461e9dbb3.
23:15 Geth ¦ doc:
23:15 Geth ¦ doc: No spec, no docs. Doc issue #883
23:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/09a4093f1a
23:16 Woodi joined #perl6
23:18 IOninja .oO( wonder .slurp-rest doesn't just close... without any args )
23:20 itcharlie left #perl6
23:23 llfourn joined #perl6
23:23 timotimo hum. did the haskell-to-perl6 page go away again?
23:24 Khisanth joined #perl6
23:24 timotimo oh
23:24 timotimo Generated on 2017-02-07T16:14:16Z
23:25 timotimo where do the logs go again ...
23:26 timotimo container binding?Sigilless variables also bind by default and so do parameters with the trait C$LESS-THAN_SIGNis raw ($REVERSE_SOLIDUS).html
23:26 timotimo fantastic
23:26 timotimo ===SORRY!===
23:26 timotimo Could not find OO::Monitors at line 2 in:
23:26 timotimo EZPZ
23:28 timotimo m: say capwords
23:28 camelia rakudo-moar aac9ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    capwords used at line 1␤␤»
23:30 timotimo we might also want a newer rakudo version on hack?
23:30 timotimo annoyingly, install-modules won't finish
23:30 timotimo because Inline::Python fails its tests
23:30 AlexDaniel cale2++
23:30 timotimo maybe it requires a newer rakudo to work, or maybe it's just broken in general
23:31 gfldex https://docs.perl6.org/build-log/
23:31 timotimo yup.
23:31 timotimo ah, looks like it works with a newer rakudo.
23:31 timotimo so i'll go ahead and update rakudo on hack
23:32 timotimo hold on to your hats!
23:32 timotimo because the update-rakudobrew script starts off nice and gentle with rm -rf rakudobrew .perl6
23:33 timotimo i wonder why nobody noticed the doc site hasn't been updated in a week :)
23:35 timotimo rakudo is now doing the core setting
23:36 lep-delete joined #perl6
23:37 IOninja Someone did today earlier
23:38 timotimo aha!
23:38 timotimo then it's my fault for not noticing/backlogging
23:38 cale2 say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' );
23:38 cale2 m: say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' );
23:38 camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
23:39 timotimo cale2: what has science done!!!
23:39 cale2 What is going on with this? Why is the trans not working?
23:39 timotimo because you're supposed to use it like this:
23:39 * IOninja doesn't see non-workedness
23:40 cale2 m: say 'AAAACCCGGT'.uc.trans( 'A' => 'T', 'C' => 'G' ).flip;
23:40 camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
23:40 timotimo m: say 'AAAACCCGGT'.uc.flip.trans( ['A', 'C'] => ['T', 'G'] );
23:40 camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
23:40 timotimo oh, it was already doing it
23:40 timotimo m: say 'AAAACCCGGT'.uc.flip; say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' );
23:40 camelia rakudo-moar aac9ef: OUTPUT«TGGCCCAAAA␤TGGGGGTTTT␤»
23:41 timotimo totally seems to work?
23:41 IOninja Yes.
23:41 cale2 huh?
23:41 timotimo there are no more A or C in the output
23:41 cale2 ohhh, I didn't put it the rest of the matches
23:41 cale2 :D
23:42 cale2 m: say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G', 'T' => 'A', 'G' => 'C');
23:42 camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
23:42 cale2 seems like there should be an easier way to have a two way street kind of replacement
23:42 IOninja m: say 'AAAACCCGGT'.uc.flip.trans: <A C T G> => <T G A C>
23:42 camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
23:43 timotimo yeah
23:43 timotimo what the ninja said
23:43 cale2 so I actually did want the range version
23:44 timotimo yup
23:44 timotimo well, not range really
23:45 timotimo ah, update-and-sync refuses to build because it's already at the latest commit
23:45 timotimo i tricked it!
23:45 IOninja m: say 'AAAACCCGGT'.uc.flip.trans: |.self, |.antipair with <A C> => <T G>
23:45 camelia rakudo-moar aac9ef: OUTPUT«TGGCCCAAAA␤»
23:46 IOninja m: say 'AAAACCCGGT'.uc.flip.trans: .self, .antipair with <A C> => <T G>
23:46 camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
23:46 IOninja (the | version slips the pairs as named args, so it don't work)
23:48 timotimo processing language pod files ...
23:49 cale2 http://rosalind.info/ pretty fun so far
23:49 timotimo it's cool
23:51 timotimo writing language document ...
23:51 cale2 m: say Cool.new.WHAT
23:51 camelia rakudo-moar aac9ef: OUTPUT«(Cool)␤»
23:52 cale2 I agree
23:52 ugexe is there a way for a module to access the CompUnit that gets used on it? e.g. I want to get at the distribution version of the module, ala `$*CURRENT-COMPUNIT.distribution.meta<ver>` (or is there a better way to do this?)
23:53 ugexe for `multi MAIN('--version') { say ... }`
23:55 ugexe I recall some type of .^version method too, although I don't recall if it related to the distribution version of the class it worked on or not
23:56 timotimo hm, something that works a little bit like %*RESOURCES?
23:56 ugexe yeah. there was supposed to be a %?META6, so closer to that but same idea yea
23:57 ugexe i could always put the meta6 in the resource directory heh
23:57 timotimo ugh :)

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

Perl 6 | Reference Documentation | Rakudo