»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:07 avuserow left 00:10 avuserow joined 00:12 espadrine left
IOninja m: say "\x[31a]" 00:21
camelia rakudo-moar 266f34: OUTPUT«̚␤»
IOninja Hotkeys: it's a *combining* character. So it combines with your quote or, in the latter case, with the backslash. 00:22
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:23
IOninja heh 00:26
So it should combine, but only when the programmer wants it to? :) 00:27
m: say q "̚what a neat idea"̚"̚
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…»
IOninja gah
m: say q "̚what a neat idea"̚
camelia rakudo-moar 266f34: OUTPUT«what a neat idea␤»
IOninja Hm, hexchat doesn't even let me select *just* the thingie 00:28
00:29 mspo left, mspo joined 00:30 lukaramu left 00:36 agentzh joined 00:37 yqt left, yqt joined 00:42 labster joined 00:46 retupmoca joined 00:47 llfourn joined 00:52 llfourn left 00:53 yqt left 00:54 yqt joined
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
or maybe they got back fast again
geekosaur this is why the next unicode standard is going to have an invisible letter... 00:55
(i.e. something to attach "standalone" combiners to) 00:56
samcv is it confirmed they are doing it geekosaur?
did they say something since it was proposed?
geekosaur I thought it was...
(if they aren't then someone needs a cluebat) 00:57
samcv also the 'official' method is to use a nbsp + the other cp
(currently that is)
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:58
s/obj/obviously 00:59
also wtf is with constants being automatically exported 01:00
when using a module
is that intentional?
ahhh MoarVM panic: Internal error: invalid thread ID -1525282512 in GC work pass 01:04
01:16 Actualeyes left 01:17 zakharyas joined 01:19 tharkun left 01:20 kyan left 01:21 tharkun joined, yqt left, b2gills joined 01:22 yqt joined 01:25 newbie joined 01:28 yqt left 01:31 sammers joined 01:34 kyan joined 01:42 labster left 01:48 llfourn joined 01:53 llfourn left 02:14 newbie1 joined 02:17 newbie left 02:27 BenGoldberg left 02:50 llfourn joined 02:52 newbie1 left 02:54 kalkin- left, kalkin- joined 02:55 llfourn left 03:08 ssotka left, Actualeyes joined 03:18 labster joined 03:19 cale2 joined 03:20 Actualeyes left, BenGoldberg joined
cale2 Is there a module that scans P6 source code and converts texas symbols into their unicode variants? 03:23
MasterDuke cale2: not that i know of, but i bet you could use DrForr's Perl6::Parser to implement it 03:27
03:27 Actualeyes joined
cale2 Yeah, it makes sense to be built into the Tidy tool 03:32
03:37 Actualeyes left 03:39 noganex_ joined 03:42 noganex left 03:51 llfourn joined 03:56 llfourn left 04:01 Actualeyes joined 04:14 BenGoldberg left 04:18 pyrimidine left 04:22 cale2 left 04:33 Cabanoss- joined 04:37 Cabanossi left, Cabanoss- is now known as Cabanossi 04:41 skids joined 04:53 llfourn joined 04:58 llfourn left 04:59 khw left 05:02 faraco joined 05:16 pyrimidine joined 05:19 wamba joined 05:25 CIAvash joined 05:42 curan joined 05:47 xtreak joined 05:54 llfourn joined 05:59 llfourn left 06:06 faraco left 06:13 ufobat joined 06:15 xtreak left 06:16 aborazmeh joined, aborazmeh left, aborazmeh joined, cibs left 06:18 cibs joined 06:21 jraglin left 06:23 mrdside joined, mrdside left 06:24 xtreak joined 06:27 ssotka joined 06:37 skids left 06:39 ChoHag left 06:40 wamba left 06:41 AlexDaniel left 06:48 RabidGravy joined, samcv joined
samcv oops looks like I must have parted accidentally 06:49
06:50 mrdside joined, mrdside left 06:56 llfourn joined 06:58 ccakes joined 07:00 llfourn left 07:03 kaare__ left, kaare_ joined 07:05 aborazmeh left 07:10 Woodi joined 07:12 cibs left 07:14 cibs joined 07:15 wamba joined 07:21 bjz joined, darutoko joined 07:24 mrdside joined 07:27 ssotka left
mrdside hi, can anybody help understand grammars? do these three grammars should work same? gist.github.com/mrDSide/f76373f91d...06438535f0 07:27
moritz mrdside: nope 07:28
the first one allows one <pu> followed by multiple <crd> 07:29
mrdside moritz: and `G1` and `G2`?
moritz but G2 only allows one <crd> after <pu>
and G3 makes the (inlined) <crd> optional (* instead of +) 07:30
also, there's no point in writing [<people>+]+
07:30 robertle left
moritz <people>+ is fine 07:30
mrdside moritz: my mistake, new version - gist.github.com/mrDSide/f76373f91d...06438535f0
data file - gist.github.com/mrDSide/53ecaeed84...655026a3bf 07:31
moritz same difference to G3 (* instead of +)
also, there's no backtracking across token { } boundaries, so I'm not sure if inlining might make a difference 07:32
mrdside gist.github.com/mrDSide/f76373f91d...06438535f0
07:32 xtreak left, ccakes left
moritz mrdside: what do you hope to learn from this, except whether I'm good at spotting small differences? 07:33
07:33 ccakes joined
moritz afk& 07:34
07:34 agentzh left
mrdside moritz: i want to get tree like in `G1` shen do actions, but it doesnt work, only work as `G1` and `G3` 07:34
can i see TOP after substitution? 07:35
07:36 agentzh joined
mrdside moritz: work `G1` but not `G2` 07:37
07:40 agentzh left
moritz mrdside: is each of the pu/crd/exp regexes supposed to match exactly one line? 07:50
mrdside no, see gist.github.com/mrDSide/53ecaeed84...655026a3bf
07:51 bjz left
mrdside moritz: no, see gist.github.com/mrDSide/53ecaeed84...655026a3bf 07:51
07:53 bjz joined
moritz mrdside: so you're actually relying on backtracking then; change 'token' to 'regex' then 07:53
or find a better way to determine the end of a record
mrdside moritz: each <people> ends with '>' 07:54
moritz: begins with "<ПУ-3", then [<crd>|<exp>], then closing symbol '>' 07:55
but closing '>' goes before '\n'
moritz ok, try to make people, crd and exp each regex, not token 07:56
mrdside moritz: ok, thx
07:56 mrdside left 07:57 llfourn joined 07:58 kent\n joined 08:02 llfourn left 08:05 TEttinger left 08:09 Ven joined 08:15 rindolf joined 08:22 Actualeyes left 08:28 retupmoca left, faraco joined
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?
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-.
DrForr blinks in pleased surprise.
08:45 wamba left 08:50 bjz left 08:51 Wanderer68 left 08:52 bjz joined 08:58 Ven left, llfourn joined 08:59 kaare_ left 09:01 Ven joined 09:03 llfourn left 09:04 geekosaur left 09:05 geekosaur joined 09:06 kaare_ joined 09:13 Ven left 09:17 dakkar joined 09:24 xtreak joined 09:27 xtreak left, wamba joined 09:29 bjz left 09:33 ufobat left 09:35 bjz joined 09:42 Ven joined 09:44 zakharyas left, zakharyas joined 09:49 shlomif joined, zakharyas left 09:51 rindolf left 09:54 espadrine joined, GauravArya joined
GauravArya Hello Guys, anyone here? 09:54
tadzik yes
yoleaux 12 Feb 2017 16:08Z <RabidGravy> tadzik: there you go matey github.com/tadzik/JSON-Unmarshal/pull/23 - it would be a great boon if you could look as I found it testing something else :)
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
browse based stops working after a while..
09:55 shlomif is now known as rindolf, ocbtec joined 09:56 abraxxa joined 10:00 llfourn joined
moritz GauravArya: /join #perl6 10:01
GauravArya moritz: thanks man.. checking it out.. 10:02
10:05 llfourn left 10:08 user9 left 10:12 koki1 joined
GauravArya i'll be back.. have not been able to setup weechat as of now. 10:16
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?
Ulti MasterDuke: prove on sequences.t in the BioInfo module 10:25
*BagHash 10:26
10:27 bjz left 10:29 espadrine left 10:31 agentzh joined, bjz joined 10:35 agentzh left 10:36 bjz_ joined 10:38 bjz left 10:40 Ven left, BooK joined
dogbert11 Ulti: perhaps the Baggy version of classify-list does what you want 10:41
docs.perl6.org/routine/classify-list 10:42
10:43 ufobat joined, ocbtec left 10:50 wamba left 10:51 pochi joined 10:56 wamba joined
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? 10:57
jnthn my $count = %hash.elems 11:01
or my $count = +%hash
11:01 newbie1 joined
arnsholt Or just +%hash, no? 11:01
jnthn tends to find the first a little clearer :)
But yeah, either works fine :) 11:02
11:02 llfourn joined, labster left
masak m: my %hash = <a a b b c c>; say 1 * %hash 11:02
camelia rakudo-moar 266f34: OUTPUT«3␤»
masak :P
m: my %hash = <a a b b c c>; say (0 ** 0) * %hash 11:03
camelia rakudo-moar 266f34: OUTPUT«3␤»
arnsholt =p
masak m: my %hash = <a a b b c c>; say ([*]) * %hash
camelia rakudo-moar 266f34: OUTPUT«3␤»
masak so many options
m: my %hash = <a a b b c c>; say %hash + % 11:04
camelia rakudo-moar 266f34: OUTPUT«3␤»
GauravArya jnthn: thanks man, worked like a charm... 11:05
masak m: sub postfix:<!>($N) { [*] 2..$N }; say %hash * (@)!
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 * (@)!␤»
masak m: sub postfix:<!>($N) { [*] 2..$N }; my %hash = <a a b b c c>; say %hash * (@)!
camelia rakudo-moar 266f34: OUTPUT«3␤»
GauravArya masak: thanks for showing me so many options... just great !!
masak I think I'm the first person to take the factorial of an anonymous array
11:06 espadrine joined
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?
arnsholt Yes!
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
Oooh, do tell!
11:07 llfourn left
masak arnsholt: but it hinges on doing the reference inside of a code block (which again changes the timing equation) 11:07
arnsholt Funky
masak the case in question is something like `macro moo(paramlist, ...) is parsed(/ ... { declare_stuff(paramlist, ...) } ... /) { ... }` 11:08
because the parameter `paramlist` is only used within the block in the trait, the timing works out OK 11:09
or it could, with some work
the indirect way to reference the same value would be something like `$<paramlist>.ast` or whuddeber 11:10
11:10 kent\n left
arnsholt Right, right 11:11
That definitely makes sense
11:11 kent\n joined
masak just wanted to share that :) 11:13
11:15 user9 joined
arnsholt Yeah, that was a neat use-case 11:22
I forgot to consider the case of closing over the parameter with a lambda
11:23 bjz_ left 11:26 faraco left, bjz_ joined 11:36 jonas1 joined 11:39 g4 joined, g4 left, g4 joined 11:42 kyan left
masak .oO( never go in against a lambda when death is on the line! ) 11:44
11:55 bjz joined 11:56 bjz_ left 12:03 llfourn joined 12:08 llfourn left, sufrostico joined, sufrosti1o joined 12:14 gregf_ joined 12:17 lukaramu joined 12:22 GauravArya left 12:24 sena_kun joined 12:30 eroux joined 12:32 bjz left 12:37 eroux left, eroux joined 12:40 bjz joined, grondilu joined
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:42
any idea? 12:43
12:43 pyrimidine left, pyrimidine joined
moritz token brakcets { \[ ~ \] <contents>* } 12:44
masak moritz++ beat me to it
moritz token contents { \w+ | <brackets> }
masak takes a little bit more to get decent error messages, I think
DrForr That's... just about what I was going to write. Though I prefer quotes.
moritz re decent error messages, chapter 9 of my book deals with that :-) 12:45
masak .oO( <shameless plug> ) :P
grondilu pretty sure I had tried somthing like that but the code was hanging
moritz ... and my current blog post
grondilu I'll try again
masak moritz++ # contextually aware ads for useful content
moritz grondilu: you'll need to take care that if you quantify something, it must consume at least one character
grondilu even with '*'? 12:46
moritz yes
grondilu is confused
moritz if you <foo>*, and <foo> can match yero characters, then <foo>* hangs
*zero
grondilu I see 12:47
DrForr grondilu: token brackets { '[' <contents>* ']' } # may be simpler to follow.
grondilu ^this I am absolutely sure I had tried 12:48
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
grondilu I wanted to do something similar to rosettacode.org/wiki/Balanced_brack..._a_grammar
with a bit of recursion, basically 12:51
arnsholt If DrForr's rule doesn't work, there's probably an error in the contents rule 12:53
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:54
arnsholt Sounds appropriate 12:55
grondilu tried again and seems to have something that works now :/ 12:56
I'll gist it if you're curious
paste.debian.net/914119/
I'm not sure what I had done wrong before. Nevermind. 12:57
arnsholt \o/ 12:59
13:00 sammers left 13:01 wamba left
DrForr Heh. You may have moved terms around in order - sometimes it's dependent on the order in the term. 13:01
13:04 wamba joined, llfourn joined 13:07 bjz left 13:09 llfourn left 13:10 brrt joined 13:12 sammers joined 13:18 mxco86 joined 13:23 sammers left 13:26 john51_ joined, curan left 13:27 nebuchad` joined 13:30 ilmari_ joined, BinGOs_ joined, petercom1and joined, rjbs- joined, lukiramu joined, sufrosti2o joined, ilbelkyr_ joined, rblackwe_ joined 13:31 z-b joined, hwu joined, rjbs left, rjbs- is now known as rjbs, ponbiki_ joined, huf_ joined, Actualeyes joined 13:32 hwu_ left, sufrostico left, huf left, hobbs left, nebuchadnezzar left, petercommand left, ponbiki left, dalek joined, ChanServ sets mode: +v dalek, hobbified joined, ilmari_ is now known as ilmari 13:34 lukaramu left 13:35 sammers joined 13:36 awwaiid joined, Unavowed joined 13:37 solarbunny joined 13:38 SCHAAP137 joined 13:42 ponbiki_ is now known as ponbiki 13:45 nebuchad` is now known as nebuchadnezzar 13:46 mscha joined
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
mscha In other words, Rat.norm() doesn't normalize; but Rat.nude() does. 13:47
jnthn Worse, it seems to do it in-place?!
mscha Yup
jnthn Which will be a concurrency bug
Rat is meant to be immutable
mrdside hi! how can i get symbols code? "ABC".substr(2,1)<unicode code>?
mscha Usually not a problem - it's rare to get a non-normalized Rat. 13:48
jnthn mscha: Still worth an RT, IMO :)
mrdside: .ords
masak mscha: please file a rakudobug
mscha I will.
mrdside m: "ABC".substr(2,1).ords
camelia ( no output )
jnthn m: say "ABC".substr(2,1).ords 13:49
camelia rakudo-moar 266f34: OUTPUT«(67)␤»
mrdside jnthn: thx
13:49 mrdside left 13:50 BinGOs_ is now known as BinGOs, BinGOs left, BinGOs joined 13:51 GauravArya joined
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? 13:59
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
GauravArya: docs.perl6.org/language/concurrency.html if you haven't found it yet
GauravArya thanks.. :) 14:01
i was struggling.. :P
you read my mind.. you got 6th sense..
hehe
sjn \o 14:05
Quick question; Who's working in the JVM backend these days?
and/or knows it well enough to talk about it? :) 14:06
14:06 cdg joined, llfourn joined
moritz bartolin maybe? 14:06
14:06 cdg left
IOninja succeeds in removing the black header on GitHub 14:07
Tampermonkey: gist.github.com/zoffixznet/1ca8cc3...a0c4c4ef2c
14:07 cdg joined 14:08 cdg left
DrForr "black header" doesn't sound good, what was it about? 14:08
14:08 cdg joined
timotimo github's new design 14:08
some people seem to dislike it
moritz github now looks like every bootstrap site out there 14:09
14:11 llfourn left, skids joined
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:11
tadzik everyone's complaining about github colorscheme, and I just sit here unaware with my userstyles 14:12
tadzik checks in porn mode
IOninja I'm not complaining anymore. Fixed it with a user script.
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
camelia rakudo-moar 266f34: OUTPUT«(2 6 2 6 (1 3) 1 3 1 3)␤»
IOninja I just need to propagate it to my phone, my VM, and two work boxes...
s: .5, 'norm', \() 14:14
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/266f...al.pm#L204
IOninja hah
.oO( well, here's your problem :P )
mscha Hah indeed...
IOninja Will fix shortly.
DrForr Ack. That simple feature took the team like a week to pull together for blogs.perl.org II. 14:15
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
IOninja The reason they aren't always right now is for optimization 14:17
14:17 bitmap joined
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
14:18 cale2 joined
mscha It'd be nice if calling .numerator() or .denominator() would normalize, though. (Just like .nude() apparently does.) 14:19
14:20 cdg left 14:21 cdg joined
IOninja m: (1/0).REDUCE-ME 14:21
camelia ( no output )
kalkin- .tell DrForr awesome, i already have a line-start patchset working, will upgrade it to also use line-end.
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.
kalkin-: I'll pass your message to DrForr.
IOninja Nah, I disagree with that one. They're attributes. You get their values.
14:22 cdg_ joined
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.
mscha Well, then nude() shouldn't normalize either.
14:23 cdg_ left
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.)
moritz yes, it's a method
14:26 cdg left 14:27 cdg joined, pmurias joined 14:28 cdg_ joined 14:29 jonas1 left
cale2 m: say WHAT(2.5) 14:29
camelia rakudo-moar 266f34: OUTPUT«(Rat)␤»
cale2 m: 2.5.WHAT
camelia ( no output )
cale2 m: say 2.5.WHAT
camelia rakudo-moar 266f34: OUTPUT«(Rat)␤»
grondilu couldn't qx return a Blob when the executed command returns binary data?
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};)
IOninja not almost every single; just a few
cale2 more than a few. I'd say almost every built in 14:31
14:31 cdg left 14:33 agentzh joined, japhb joined
timotimo what is UFCS? 14:33
universal first class subroutines? 14:34
jnthn Methods that exist in Any or Cool will tend to have a function form
Not sure how strictly that is followed, but it's the best guideline I can think of
cale2 universal function call syntax
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;␤»
timotimo m: say comb "hello":
camelia rakudo-moar aac9ef: OUTPUT«(h e l l o)␤»
timotimo m: say comb "hello"
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"␤»
timotimo interesting discontinuity 14:36
14:36 itaipu joined
cale2 I thought : was only used on method arguments 14:36
14:37 agentzh left
cale2 m: (1,2,3,4).reduce: { $^a + $^b } 14:37
camelia ( no output )
timotimo yup
it's a method call with "indirect object syntax"
it was invented to please people who want to write "new MyClass: ..."
cale2 BTW, has anyone seen this paper: www.ccs.neu.edu/racket/pubs/popl16-tfgnvf.pdf
timotimo instead of MyClass.new(...)
cale2 about gradual typing costs in typed racket
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 left, itaipu joined
cale2 GauravArya: open a file in the REPL and call .^methods on it 14:39
[Coke] $obj.meth($arg1, $arg2, :namedarg<a>) 14:40
perlpilot GauravArya: docs.perl6.org/routine/seek
[Coke]: I think he means for specific methods
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 :(
coke.. i am gonna try that one now.. 14:42
14:43 wamba left, eroux left
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:43
cale2 seek $file: 20, SeekFromBeginning 14:44
14:45 eroux joined, brrt1 joined
cale2 Funny thing about that particular example is the URL says "routine", but it says it is a method. docs.perl6.org/routine/seek#(IO::H...ethod_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, cpage left, brrt left, cpage__ is now known as cpage, kst` joined
perlpilot m: say Method.^mro 14:46
camelia rakudo-moar aac9ef: OUTPUT«((Method) (Routine) (Block) (Code) (Any) (Mu))␤»
[Coke] alternative to cale2's syntax is $file.seek(20, SeekFromBeginning);
perlpilot cale2: because methods are routines :)
timotimo m: say Method.isa(Routine) 14:47
camelia rakudo-moar aac9ef: OUTPUT«True␤»
cale2 perlpilot: so is it `seek $file: 20, SeekFromBeginning;` or `$file.seek(20, SeekFromBeginning);` or `seek($file, 20, SeekFromBeginning);`
[Coke] cales2 if seek is a sub, probably yes to all. 14:48
(not every method has a sub variant)
moritz I don't think we need an indirect method call example for all methods 14:49
there's a universal equivalance between $x.foo and foo($x:)
SmokeMachine IOninja: how did you "fixed" the GitHub?
cale2 Having these distinctions provides almost no benefits. I really don't get it.
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
OO won 20 years ago
perlpilot "won"?
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
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
moritz yes, but Perl 5 has nearly no built-in methods 14:52
I'm not sure it's worth having for everything though
IOninja SmokeMachine: hm?
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.
cale2 self.function is sugar for function(self)?
moritz no
for function(self:)
cale2 perlpilot: I agree 100%
moritz though it's more the other way 'round :-) 14:54
cale2 but you shouldn't arbitrarily pick OO for this, Procedural for that
perlpilot moritz: yeah :)
moritz cale2: why not?
cale2 moritz: because it's arbitrary. people like freedom, but they also like consistency
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
cale2: and yes, consistency is good, but it's better to *allow* for it than to *enforce* it :)
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..."
DrForr WWDKD 14:56
perlpilot huh. I thought of Djikstra before Knuth
cale2 perlpilot: But when it is arbitrarily set up ahead of time, you've already enforced it.
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
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:57
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
cale2 moritz: but it has forced you into OO, even if it says it hasn't
moritz cale2: not really. I can write fine procedural or even functional Perl 6 code 14:59
cale2: that might call a method from the standard library here and there, but that doesn't make it any less functional or procedural
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 wamba left
DrForr things may be objects under the hood, but you're not forced to say $x.assign(1.plus(2)). 15:00
15:00 ocbtec joined, g4 left 15:01 colomon left
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
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
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
moritz would welcome our haskell or ruby-inspired overlord documentation or blog authors
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.
pmurias cale2: the functional and OO paradigms mix well together
moritz perlpilot: the functional style would be to traverse the tree of Match objects instead of having action methods fire
cale2 pmurias: Only if you make objects that are purely state and not behaviors attached. Then make functions that always return new objects 15:04
15:06 resol left
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:06
you do sacrifice some benefits of both of them but a lot of people code in a mixed style 15:07
15:07 llfourn joined
arnsholt moritz: That's pretty close to how action methods work though, isn't it? 15:08
moritz arnsholt: the timing is different
arnsholt Yeah, the timing is different, but the semantics are very similar
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)"
arnsholt Main difference is that you can have action methods that get called for matches that end up being rejected
perlpilot GauravArya: the docs also seem to be sparse on what the return type/value is for seek(). :-( 15:10
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?
GauravArya see.. normally, using perl5, you get the current seek value, which is numeric or integer type
IOninja perlpilot: that will be rectified by end of March 15:12
15:12 sweet_guy joined
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:12 llfourn left
GauravArya hey man, I would be happy to do something.. my day job is total boring.. guys running around behind revenue numbers.. 15:13
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
GauravArya: also, docs.perl6.org/routine/hyper
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..
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..
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
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 github.com/perl6/doc/tree/master/doc
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".. ;)
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
IOninja GauravArya: but do point out stuff that's LTA. Like that .seek doesn't return position :) 15:22
huggable: LTA
huggable IOninja, "Less Than Awesome"; antonym: PDG "Pretty Damn Good"
lucs (président directeur-général) 15:23
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
15:24 sweet_guy left
GauravArya so currently i am trying to pass the "syntax" barrier.. as I come from perl5 world.. 15:24
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:25
Just to know how this process works and how and what to do. 15:26
IOninja GauravArya: doc issues report in github.com/perl6/doc
GauravArya okay.
thanks
IOninja GauravArya: and all others by emailing to [email@hidden.address]
it will then show up in perl6 queue on rt.perl.org/ (you can use perl6.fail to view the currently open issues) 15:27
15:31 mr-foobar left
GauravArya thanks.. 15:33
so does it mean that the code is buggy currently?
sena_kun >Generated on 2017-02-07T16:00:17Z from Type/IO.pod6 from perl6/doc on GitHub, commit db18eca 15:34
15:34 pyrimidine left
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, lizmat left
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:35
IOninja GauravArya: but IO stuff... yeah, that area didn't get a lot of love. Tests are sparse. Some behaviour is LTA. 15:36
GauravArya: perl 5 runs in a VM too. You just don't know it :)
GauravArya :)
IOninja It's coupled with it, whereas ours is not, so you can swap it to somethign else, like JVM
GauravArya IOninja: now that is not something I didn't know about.. :P
sorry, i meant, that is indeed something.. whats happening to my fingers.. 15:37
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
15:39 pyrimidine left
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:39
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
perlpilot: i didn't get you
IOninja & 15:41
15:41 pyrimidine joined
Geth doc: ad9c12a587 | (Will "Coke" Coleda)++ | 2 files
remove trailing whitespace
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.
moritz time cat thefile > /dev/null 15:42
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.
(and if you're looking for speed, I don't think Perl 6 will beat Perl 5 in this regard ;-) 15:44
(yet!)
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
perlpilot: yes , i know perl6 is slow but i am overwhelmed with the new features its bringing..
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
GauravArya c++ ? 15:46
mspo I think without those three things it's difficult to think something is very future proof
GauravArya: a little too low level maybe? 15:47
moritz rust?
sena_kun *cough* ...askel... *cough-cough*
mspo go, rust, perl6, elixir, dart (ish?)
GauravArya mspo: agreed..
mspo how is haskell's utf8?
15:48 brrt1 left
mspo bolted-on or native-feel 15:48
sena_kun isn't it?
mspo I don't know I'm asking :)
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...
Ulti in response to stackoverflow.com/questions/4191448...t-in-perl6 is there a strong argument for not just simply allowing negative integers to imply the *-n functionality?
sena_kun mspo, there are utf8-ready packages for encoding/decoding and stuff. 15:49
mspo sena_kun: so bolted-on
unfortunate
sena_kun mspo, you still need to use such things anyway, not in the least because of default strings that are... Bad. 15:50
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. :)
jnthn Ulti: Being able to detect off-by-ones and similar accidents. :)
mspo so you have to do > import Prelude hiding (readFile, writeFile) 15:52
sena_kun mspo, you can just use custom prelude. :) 15:53
mspo sena_kun: so bolted on
kalkin- How do I run a perl6 file from perl6, without spawning perl6?
IOninja kalkin-: EVALFILE
Geth doc/master: 4 commits pushed by (Will "Coke" Coleda)++ 15:54
mspo I think erlang might actually be unicode-friendly, weirdly enough
kalkin- IOninja: thanks will try that
IOninja laughs at "horse noise"
intersting: 15:55
m: say &circumfix:<:{ }>.name
camelia rakudo-moar aac9ef: OUTPUT«␤»
IOninja m: my &foo = sub bar {}; say &foo.name 15:56
camelia rakudo-moar aac9ef: OUTPUT«bar␤»
IOninja Ah, nevermind. Not interesting.
gfldex m: say &circumfix:<{ }>.name
camelia rakudo-moar aac9ef: OUTPUT«circumfix:<{ }>␤»
IOninja github.com/rakudo/rakudo/blob/nom/...sh.pm#L762
moritz could be changed into ... = anon sub circumfix:<:{ }>(... to get a name 15:58
(possibly)
IOninja m: my &circumfix:<z{ }> = sub circumfix:<z{ }> {};
camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
IOninja heh
m: my &circumfix:<z{ }> = anon sub circumfix:<z{ }> {};
camelia ( no output )
15:58 pyrimidine left
IOninja m: my &circumfix:<z{ }> = anon sub circumfix:<z{ }> {}; say &circumfix:<z{ }>.name 15:58
camelia rakudo-moar aac9ef: OUTPUT«circumfix:<z{ }>␤»
IOninja cool
mspo sena_kun: isn't concurrency in haskell also driven by various libraries?
15:59 pyrimidine joined
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␤»
IOninja m: my &z; sub z {}
camelia rakudo-moar aac9ef: OUTPUT«===SORRY!===␤P6opaque: no such attribute '$!yada' in type Routine when trying to get a value␤»
IOninja Needs fixin'
moritz indee'
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
sena_kun mspo, it has some primitives in base, but it can be extended further with modules.
jnthn Yeah
mspo sena_kun: that doesn't help it's already difficult approachability :) 16:01
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
but I admit it can be difficult. :)
mspo sena_kun: core things have gravity 16:03
16:03 pyrimidine left
sena_kun mspo, a bit more details, please? if I'm not annoying now 16:04
mspo sena_kun: if ~everyone is using hackage.haskell.org/package/utf8-string then that should just become the core strings package
sena_kun: and then "haskell" the language grows first class utf8 strings as a feature 16:05
sena_kun: but, in general, the stdlib (or prelude or whatever) is important in my opinion
sena_kun mspo, yep, and that will(or will be close to) break all the old code that worked for the decades.
mspo haskell isn't that old ;) 16:06
sena_kun backward compatibility is a horrble beast.
mspo it's just as important as the stdlib :)
churn sucks!
sena_kun mspo, okay, maybe for years. :)
anyway, enough offtopic here from me today. There are still people needed to go wild in github.com/perl6/doc/pulls. 16:08
16:09 llfourn joined
sena_kun Especially for #1187. 16:09
mspo oh actually, haskell's built in Char is called out as "unicode" according to www.haskell.org/onlinereport/basic.html 16:10
Prelude> let y = "¶¨∆∞∂å√®´√" 16:12
Prelude> y
"\182\168\8710\8734\8706\229\8730\174\180\8730"
interesting
CIAvash `putStrLn y` works 16:14
sena_kun mspo, it's a interpreter-related issue(AFAIK), you cat putStr to get proper characters.
mspo yes
16:16 alimon joined
mspo okay, haskell is modern :) 16:16
Ulti m: my %hash = ("hi"=>"world"); say "5" ++%hash;
camelia rakudo-moar aac9ef: OUTPUT«6␤»
Ulti ^ thats a bit confusing
jnthn Redundant second +, since infix:<+> already will numify :) 16:17
Ulti yeah
but you can do it is more my point and it looks like prefix increment
gfldex m: my %hash = ("hi"=>"world"); say "5" ++ %hash;
camelia rakudo-moar aac9ef: OUTPUT«6␤»
16:17 brrt joined
IOninja Then it'd be a TTIAR 16:17
16:18 llfourn left
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
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. :)
Ulti yeah
16:20 wamba joined 16:23 eliasr joined
IOninja Hm, this no longer hangs: github.com/rakudo/rakudo/blob/nom/...#L761-L762 16:25
But now it dies with "don't change grammar in the setting, please!"
I mean making it a normal circumfix sub does. 16:26
Ulti is IOninja Zoffix doing IO work?
IOninja Wonder why? How come the sub circumfix:<{ }>(*@elems) { my % = @elems } above doesn't cause grammar change?
sena_kun Ulti, yes. 16:27
moritz IOninja: there's probably a rule for circumfix:<{ }> in the grammar, but not for circumifix:<:{ }> 16:29
*circumfix
IOninja Ahhh
Thanks. Now I get it 16:30
16:30 AlexDaniel joined
IOninja Well, sorta. 16:30
I can still make a new circumfix but without changing grammar if I use the my &circumfix:<> thing? 16:31
Or is the grammar change canary not detecting that change?
moritz no idea
IOninja m: my &circumfix:sym<foo>; 16:32
camelia ( no output )
IOninja m: sub circumfix:sym<foo> {};
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 {};␤»
IOninja oh, interesting. I tried giving it a name with `anon sub circumfix:<:{ }>` and now it complains about changing grammar :| 16:33
moritz :(
m: sub circumfix:sym<foo bar>($x) { "[$x]" }; say foo 42 bar
camelia rakudo-moar aac9ef: OUTPUT«[42]␤»
16:33 brrt left
moritz m: sub circumfix:sym<bra ket>($x) { "[$x]" }; say bra 42 ket 16:34
camelia rakudo-moar aac9ef: OUTPUT«[42]␤»
IOninja
.oO( I thought I made that throw :/ )
m: sub infix:sym<wat> {} 16:35
camelia ( no output )
IOninja m: sub infix:foo<bar>:sym<wat> {}
camelia ( no output )
IOninja :S
Ah, it's for stuff that isn't a proper category: github.com/rakudo/rakudo/blob/nom/...4684-L4711 16:36
m: sub notinfix:foo<bar>:sym<wat> {}
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:39 ocbtec left 16:41 eroux left
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:42
mspo sounds like you need a mutex 16:43
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?
moritz GauravArya: if at all possible, return separate hashes from processing each chunk, and then in the end combine them (in a single thread)
mspo 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.
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
GauravArya is that bad?
mspo usually slower than just reading a file :) 16:47
but more fun?
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
camelia rakudo-moar aac9ef: OUTPUT«{a => 1, b => 2, c => 3, d => 4}␤»
moritz GauravArya: not bad at all 16:48
GauravArya mspo: why would it be slower?
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..
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?
mspo GauravArya: I suppose so 16:50
give it a shot
16:50 mr_ron joined
mspo I guess I'm saying that the feeder thread isn't usually slow enough to optimize 16:52
the workers should run in parallel
cat | xargs -P :)
16:54 GauravArya left, GauravArya joined
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.. 16:56
16:57 abraxxa left 17:02 newbie1 left, mscha left 17:03 newbie1 joined 17:04 gregf_ left
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
17:06 kurahaupo joined, pyrimidine joined 17:07 ssotka joined
tony-o timotimo: the repo browser thing should be fixed 17:09
17:09 girafe joined 17:10 GauravArya left, japhb left 17:11 pyrimidine left
Geth doc: cadaf583bd | (Will "Coke" Coleda)++ | .gitignore
git ignore generated examples
17:12
17:14 llfourn joined
tony-o timotimo: to answer the syntax question, it's using github in the background 17:14
i'll have a look at why that's happening later today tho, right now i need to get work done 17:15
17:19 llfourn left, khw joined 17:21 khw left
IOninja m: multi foo {}; multi foo ($x, :$foo) {}; say &foo.multi 17:23
camelia rakudo-moar aac9ef: OUTPUT«False␤»
IOninja Docs say "Returns True if the routine is a multi sub or method."
Is it a bug?
jnthn m: multi foo {}; multi foo ($x, :$foo) {}; say &foo.candidates>>.multi 17:24
camelia rakudo-moar aac9ef: OUTPUT«(True True)␤»
jnthn No, because &foo points at the proto
IOninja Ah. Thanks
17:26 seatek joined
perlpilot Is there a way to ask if a Sub is a proto or not? 17:26
jnthn .is_dispatcher I think 17:27
perlpilot (I guess .multi does that too, but the name is slightly strange for that purpose)
Geth doc: c0b61c9247 | (Zoffix Znet)++ | doc/Type/Routine.pod6
Add example for .multi

And mention the thing where &foo is a proto and its multi returns false
17:28
17:28 ggoebel left 17:30 dakkar left, khw joined 17:34 japhb joined 17:42 ggoebel joined
[Coke] DrForr: looking at github.com/drforr/perl6-Perl6-Pars...Parser.pm6 - why is it sometimes 8, sometimes 4 indent? 17:44
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
rindolf Hi all 17:57
18:00 pyrimidine joined 18:04 sena_kun left, ggoebel left 18:15 llfourn joined, khisanth_ left 18:17 grondilu left 18:20 llfourn left
IOninja hi 18:21
18:23 agentzh joined
samcv [Coke], looks like there's tabs in that file. you can get github to change the tabs displayed with editorconfig github.com/perl6/Atom-as-a-Perl6-I...itorconfig 18:26
details in my link
18:29 inra left
DrForr [Coke]: Where do you see 4-space? 18:33
Oh, never mind, I do that in a few places still, should remove those. 18:34
Fixed, will be pushed after I get something else accomplished :) 18:35
18:43 eroux joined
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
really useful
this is mine in one project github.com/samcv/keira-perl6-ircbo...itorconfig 18:47
mspo 10x white space is fibonacci spacing
so each block is indented by the next fibonacci number 18:48
samcv lol what. please no
mspo if your tab key doesn't do this for you then please try a real editor
or go back to "coding" in "php" ;)
DrForr The 4-space indents were where I was lining up <foo bar> that went past the 80-column boundary. 18:49
I usually put them at tab stops (now), but I started out indenting halfway. 18:50
samcv i like tabs for personal projects since i can change the tabstop whenever i please 18:52
but others don't like it ;)
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
and make sure ones on windows don't save in CRLF 18:53
there's plugins for basically every editor
mspo VSCode is actually pretty nice
samcv This sample i have here github.com/perl6/Atom-as-a-Perl6-I...itorconfig sets tabstop to 4 for perl6 files, 2 spaces for .travis.yml and sets it to use real tabs for Makefiles 18:54
mspo, VSCode is based on the same thing atom is based on i believe
18:54 ggoebel joined
mspo samcv: yet somehow it's 100x faster ;) 18:54
samcv: they're both atom apps
like slack
err- electron :)
samcv you mean electron
ilmari samcv: missing } in [*.{p6,pl6,pm,pm6,t]
samcv they have made atom much faster in the last few release
thanks ilmari 18:55
but yeah editorconfig is great
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
[Coke] in my projects where I use tabs, I remove them with fire. 18:57
samcv lol
18:57 mr_ron left
mspo [Coke]: are you in the US? 18:57
[Coke] mspo: Hai.
mspo I have a theory that tabs are preferred by europeans (and rob pike) 18:58
[Coke] mspo: ¿por que?
ah.
samcv you can get a VSCode plugin for editorconfig it looks like
editorconfig.org/#download so many editors with plugins for it!
19:02 sena_kun joined
samcv nice just installed the vim editorconfig plugin. works flawlessly 19:02
19:03 hobbified is now known as hobbs, hobbs left, hobbs joined 19:04 itaipu_ joined, itaipu left 19:05 espadrine left
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:07
19:09 mr_ron joined
RabidGravy boo! 19:15
19:16 sufrostico joined 19:17 llfourn joined, sufrosti1o left 19:18 sufrosti2o left 19:19 sufrosti1o joined, sufrosti2o joined 19:20 TEttinger joined
samcv boo! 19:21
19:21 llfourn left 19:23 darutoko left 19:28 itaipu joined, cdg joined 19:31 inra joined, itaipu_ left 19:32 cdg_ left 19:33 cdg left, inraa joined 19:34 inraa left
timotimo boo 19:35
19:36 espadrine joined 19:37 itcharlie joined 19:42 gk-1wm-su joined, gk-1wm-su left
IOninja 🅱🅾🅾! 19:42
timotimo you complete me, IOninja 19:43
19:50 CIAvash left, inra left
IOninja So I guess bdfoy doesn't wish to respond to questions on his tickets that come from *me*? rt.perl.org/Ticket/Display.html?id...et-history 19:51
IOninja creates a new alias on RT :P 19:52
timotimo i find it slightly surprising that $proc.err.close returns $proc 19:53
is that so you can $proc.err.close.out.close or something?!
IOninja probably
timotimo wtf :) 19:54
19:58 coreutil joined, coreutil left 19:59 coreutil joined
AlexDaniel wonders if he will ever adapt to this bracing style 20:00
20:01 coreutil left, bjz joined 20:02 sufrostico left
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:02
20:02 sufrosti2o left, sufrosti1o left 20:03 coreutil joined, sufrostico joined 20:04 sufrosti1o joined, coreutil left, sufrosti2o joined, coreutil joined
IOninja Why do you need to adapt to it? :) 20:04
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.
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?
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 left, coreutil joined
IOninja Kinda confusingly, there *is* a skip, but it's for the Test::skip 20:07
Or was it meant to be a private method?
timotimo oh! i have to write the weekly tonight
20:08 nhywyll joined
samcv timotimo, mention that i added a docs section for my collation stuff docs.perl6.org/language/experimental#Collation and feedback is wanted if people want to make comments on it 20:10
idk how that would work in anycase 20:11
but you should link to it
20:11 Tonik joined
timotimo cool 20:12
i don't know what you mean by that, though
20:12 coreutil left, coreutil joined
samcv Samantha McVey has added documentation for the experimental string sort collation features, which partially implements the Unicode Collation Algorithm. 20:14
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?
timotimo i meant "idk how that would work in anycase"
what you mean by that
samcv oh
getting feedback
timotimo ah
samcv probably a specs ticket would be good maybe 20:15
does that sound good to you?
[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
[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.)
samcv that would be nice
[Coke] like on a github perl6/*/wiki 20:17
IOninja Ah, now I spot tests for Any.skip/Supply.skip; so those are public
AlexDaniel timotimo: I have a feeling that it was done on purpose so that it blows up
and if it was accidental, I'm happy with it anyway :) 20:18
20:18 llfourn joined
AlexDaniel the whole idea behind throwing when there is a non-zero exit code is pretty nice 20:19
it prevents silent failures nicely. And if you want it to fail silently, just do it explicitly
IOninja [Coke]: wasn't that the plan behing @LARRY ticket tag? 20:20
I know I don't review those... or even if I'm meant to :/
[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
[Coke] but we have a ton of different issue queues.
AlexDaniel toh ok
I've left a comment. I think somebody has to reject it :) 20:23
20:23 coreutil left, llfourn left
IOninja FWIW "this wall of text" comes off a bit negative. We do want detailed bug reports. 20:25
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:26
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:27
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.
and that they read them.
[6~
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:30
20:31 mrdside joined
IOninja I think I see where 20:31
docs.perl6.org/type/IO.html#method_close 20:32
"You may want to consider using a LEAVE phaser to guard against exceptions."
IOninja changes it
20:32 Tonik left
AlexDaniel oh. OK 20:32
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
Remove suggestion for using LEAVE phasers

Seems to cause unwanted confusion: rt.perl.org/Ticket/Display.html?id=130715
20:35 itaipu left, telex left 20:36 telex joined
AlexDaniel IOninja: ok but it should probably also check the result of the close 20:36
oh… not in this case right 20:37
IOninja it?
20:37 labster joined
IOninja s: IO::Handle, 'close' 20:37
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/aac9...le.pm#L118
20:38 pmurias left
IOninja heh "# TODO: catch errors" 20:38
but looks like that one doesn't throw. just returns, erm, null?
20:38 robertle joined, mrdside left
IOninja m: use nqp; sub meow { my $x := nqp::null }; dd meow 20:38
camelia rakudo-moar aac9ef: OUTPUT«Mu␤»
IOninja A Mu
20:39 sena_kun left, pmurias joined, ribasushi left
AlexDaniel s: IO::Handle, 'write' 20:40
SourceBaby AlexDaniel, Sauce is at github.com/rakudo/rakudo/blob/aac9...le.pm#L637
AlexDaniel IOninja: actually, the docs were right I think 20:41
20:41 silug joined 20:42 itaipu joined
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
and you have to read the whole thing
for example:
IOninja Ah
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␤␤»
AlexDaniel so you've opened a file, then something died in the middle of your code
you want to close the file in LEAVE anyway
IOninja I don't get why I need to close it thought
*though
AlexDaniel that's a good, but different question
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
IOninja Well, I removed a note from .close.
gfldex it does close but you may run out of filehandles until then
AlexDaniel … so you should close? 20:46
gfldex if you open loads of files, you should
perlpilot so, it's really a question of timing?
IOninja Anyway. If that LEAVE goes back in, I'd prefer if it included a concrete example to avoid the confusion bdfoy experienced.
IOninja goes back to populating changelog
gfldex please take into account that we got a thread scheduler now. That can explode things quickly.
20:49 mr_ron left, mr_ron joined
timotimo ? 20:52
gfldex: what does that mean? 20:53
also, dinner time!
gfldex timotimo: imagine my @array; @array».your-method-here(); 20:54
Geth doc: 137aa82763 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6
Revert "Remove suggestion for using LEAVE phasers"

This reverts commit d1f2d496ceab75573642ea51d61063b9939dde08.
Not only this .close is not related to the thing experienced in the ticket, but it also talks about exceptions in other parts of your code
  (not even related to the file you want to close).
doc: bff39653d8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO.pod6
More precise explanation of using LEAVE for .close

There is probably a much better way to phrase it, but for the moment this will do.
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 left, pyrimidine joined, ribasushi joined 21:01 ggoebel left
cale2 has anyone tried using perl6 with hackerrank? 21:02
21:03 pyrimidine left 21:04 aindilis left
cale2 [Coke]: Cheers for the horse correction. I never was good with this thing www.amazon.com/Fisher-Price-See-Sa...B00JYCN84A 21:04
21:04 pmurias left 21:05 aindilis joined
AlexDaniel buggable: tag SEGV 21:10
buggable AlexDaniel, There are 31 tickets tagged with SEGV; See perl6.fail/t/SEGV for details
21:11 bjz left
[Coke] cale2: np: just shutting up xt/aspell.t 21:12
21:14 cdg joined 21:16 aindilis left 21:17 aindilis joined 21:19 llfourn joined 21:20 itaipu left 21:21 pmurias joined 21:25 llfourn left 21:30 ggoebel joined 21:34 bjz joined 21:37 ilbelkyr_ is now known as ilbelkyr 21:40 khw left, cdg_ joined, khw joined 21:43 cdg left 21:44 bjz left 21:46 coreutil joined, coreutil left 21:47 labster left, coreutil joined, coreutil left 21:48 pukku joined, newbie1 left
RabidGravy well at least I got somewhere 21:48
perl6 -Ilib -e 'use Device::USB; say Device::USB.version'
Device::USB::Version.new(major => 1, minor => 0, micro => 21, nano => 11156, rc => "", describe => "libusb.info")
21:48 coreutil joined 21:49 coreutil left, newbie1 joined
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:49
moritz pukku: yes, there's vim with :TOhtml, and Text::VimColor (p5) that automates it 21:50
pukku: also pygments can hilight Perl 6 code
pukku: finally, docs.perl6.org/ uses something based on nodejs to hilight the code
RabidGravy or copy it into a github gist and copy the resulting html :)
pukku Thanks! That's a bunch of things I can look at... 21:51
RabidGravy doesn't Pod::To::HTML do something with code blocks nowadays? 21:52
21:53 labster joined
moritz only if you pass it a callback that does the thing 21:53
iirc
IOninja perl6.party uses codemirror.js with this file (it ain't perfect): github.com/zoffixznet/perl6.party/...l6-mode.js
Useful when you don't want to re-generate the stuff for every minor change. 21:54
21:56 nhywyll left 22:00 pyrimidine joined 22:12 RabidGravy left
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:14
22:14 pukku left 22:17 wamba left 22:21 llfourn joined 22:25 agentzh left 22:26 llfourn left, labster left 22:27 pmurias left, espadrine left 22:29 ccakes left 22:30 coreutil joined 22:32 labster joined 22:33 coreutil left 22:34 coreutil joined, krmx joined, krmx left, coreutil left, coreutil joined 22:36 ccakes joined 22:37 coreutil left, coreutil joined, coreutil left, coreutil joined 22:38 lukiramu left, coreutil left, coreutil joined
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␤␤
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 left, coreutil joined
cale2 weird how the docs say .Bag works on a Mix. Yet .comb doesn't produce a Mix 22:41
22:41 ChoHag joined
AlexDaniel ah, it's in Handle 22:42
right
22:42 coreutil left
AlexDaniel cale2: sorry, what's the question? 22:43
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
AlexDaniel Seq is not a Setty 22:45
s: Seq, 'Bag'
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 l
IOninja cale2: no, Any object can be a .Bag. And you've .Bag'ed a Seq
AlexDaniel s: ().Seq, 'Bag'
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 l
AlexDaniel IOninja: I'll never learn this :(
IOninja I think something's broke with it... 22:46
s: '', 'say', \()(
SourceBaby IOninja, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Unable to parse expression in argument list; couldn't find final ')' ␤at -e:7␤------> <BOL>⏏<EOL>␤ expecting any of:␤ argument list␤
IOninja s: '', 'say', \()
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/aac9...Mu.pm#L470
IOninja or not...
AlexDaniel cale2: but it's good that you're mentioning a problem with the docs!
cale2: what exactly were you reading?
cale2 AlexDaniel: docs.perl6.org/routine/Bag
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
IOninja cale2: it's just a hash slice 22:48
cale2 m: say 'AGCTTTTCATTCTGACTGCAAAGAGTGTCTGATAGCAGC'.comb.Bag<A T C G>
camelia rakudo-moar aac9ef: OUTPUT«(10 12 8 9)␤»
AlexDaniel but it can be mentioned
cale2: can you open some doc issues for these issues?
.oO( or maybe fix them right away if you can )
22:49
22:49 kurahaupo left
IOninja AlexDaniel: this bug is actually what hitting the bot: rt.perl.org/Ticket/Display.html?id...et-history 22:49
AlexDaniel ah, this again
cale2 IOninja: I don't even see where it says Bag type inherits from Hash type, though. 22:50
So how could it allow for Hash Slices
IOninja cale2: fine, a bag slice :)
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: github.com/rakudo/rakudo/blob/nom/...#L436-L442 22:52
22:54 pyrimidi_ joined, pyrimidine left 23:00 gk--1wm- joined, gk--1wm- left 23:03 newbie1 left 23:04 Woodi left, newbie1 joined 23:06 agentzh joined
Geth doc: 09a4093f1a | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/IO/Handle.pod6
Revert "Added doc for the :close adverb in slurp-rest"

This reverts commit 71fde8d0a1d4a95522672f37e1eb2c9461e9dbb3.
No spec, no docs. Doc issue #883
23:15
23:16 Woodi joined
IOninja
.oO( wonder .slurp-rest doesn't just close... without any args )
23:18
23:20 itcharlie left 23:23 llfourn joined
timotimo hum. did the haskell-to-perl6 page go away again? 23:23
23:24 Khisanth joined
timotimo oh 23:24
Generated on 2017-02-07T16:14:16Z
23:24 rindolf left
timotimo where do the logs go again ... 23:25
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
fantastic
===SORRY!===
Could not find OO::Monitors at line 2 in:
EZPZ
23:27 llfourn left
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␤␤»
timotimo we might also want a newer rakudo version on hack? 23:30
annoyingly, install-modules won't finish
because Inline::Python fails its tests
AlexDaniel cale2++
timotimo maybe it requires a newer rakudo to work, or maybe it's just broken in general
gfldex docs.perl6.org/build-log/ 23:31
timotimo yup.
ah, looks like it works with a newer rakudo.
so i'll go ahead and update rakudo on hack
hold on to your hats! 23:32
because the update-rakudobrew script starts off nice and gentle with rm -rf rakudobrew .perl6
23:33 lep-delete left
timotimo i wonder why nobody noticed the doc site hasn't been updated in a week :) 23:33
rakudo is now doing the core setting 23:35
23:36 lep-delete joined
IOninja Someone did today earlier 23:37
timotimo aha! 23:38
then it's my fault for not noticing/backlogging
cale2 say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' );
m: say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' );
camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
timotimo cale2: what has science done!!! 23:39
cale2 What is going on with this? Why is the trans not working?
timotimo because you're supposed to use it like this:
IOninja doesn't see non-workedness
cale2 m: say 'AAAACCCGGT'.uc.trans( 'A' => 'T', 'C' => 'G' ).flip; 23:40
camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
timotimo m: say 'AAAACCCGGT'.uc.flip.trans( ['A', 'C'] => ['T', 'G'] );
camelia rakudo-moar aac9ef: OUTPUT«TGGGGGTTTT␤»
timotimo oh, it was already doing it
23:40 eliasr left
timotimo m: say 'AAAACCCGGT'.uc.flip; say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G' ); 23:40
camelia rakudo-moar aac9ef: OUTPUT«TGGCCCAAAA␤TGGGGGTTTT␤»
timotimo totally seems to work? 23:41
IOninja Yes.
cale2 huh?
timotimo there are no more A or C in the output
cale2 ohhh, I didn't put it the rest of the matches
:D
m: say 'AAAACCCGGT'.uc.flip.trans( 'A' => 'T', 'C' => 'G', 'T' => 'A', 'G' => 'C'); 23:42
camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
cale2 seems like there should be an easier way to have a two way street kind of replacement
IOninja m: say 'AAAACCCGGT'.uc.flip.trans: <A C T G> => <T G A C>
camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
timotimo yeah 23:43
what the ninja said
cale2 so I actually did want the range version
timotimo yup 23:44
well, not range really
ah, update-and-sync refuses to build because it's already at the latest commit 23:45
i tricked it!
IOninja m: say 'AAAACCCGGT'.uc.flip.trans: |.self, |.antipair with <A C> => <T G>
camelia rakudo-moar aac9ef: OUTPUT«TGGCCCAAAA␤»
IOninja m: say 'AAAACCCGGT'.uc.flip.trans: .self, .antipair with <A C> => <T G> 23:46
camelia rakudo-moar aac9ef: OUTPUT«ACCGGGTTTT␤»
IOninja (the | version slips the pairs as named args, so it don't work)
timotimo processing language pod files ... 23:48
cale2 rosalind.info/ pretty fun so far 23:49
timotimo it's cool
writing language document ... 23:51
cale2 m: say Cool.new.WHAT
camelia rakudo-moar aac9ef: OUTPUT«(Cool)␤» 23:52
cale2 I agree
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?)
for `multi MAIN('--version') { say ... }` 23:53
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:55
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
i could always put the meta6 in the resource directory heh 23:57
timotimo ugh :)