»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:02 literal_ left 00:06 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Show non-$/ var use in actions in example 00:06
travis-ci.org/perl6/doc/builds/248167658 github.com/perl6/doc/compare/69964...2888310a06
00:06 travis-ci left 00:09 mcmillhj joined 00:11 dubi0us joined 00:16 mcmillhj left 00:20 dubi0us left 00:25 dubi0us joined 00:26 bjz left 00:32 mcmillhj joined 00:36 cpage_ joined, mcmillhj left 00:41 travis-ci joined
travis-ci Doc build errored. seatek 'Coke discovered my missing be' 00:41
travis-ci.org/perl6/doc/builds/248176364 github.com/perl6/doc/compare/d9288...d74e95cf20
00:41 travis-ci left 00:43 bjz joined, dubi0us left 00:47 mcmillhj joined 00:51 cyphase left 00:52 mcmillhj left
seatek wasn't there some better way to die? I'm kinda remembering it... like a lazy sort of die 00:58
all i get is lazy diets from Google 00:59
01:00 bjz left 01:03 troys is now known as troys_ 01:04 mcmillhj joined
geekosaur Failure? 01:06
which is a suspended exception that will explode if you use it as a normal value, although you can test for it and thereby defuse it 01:07
01:08 Cabanossi left 01:09 mcmillhj left, Cabanossi joined, dwarring left
seatek fail! yes that's it! :) thanks geekosaur :) 01:11
geekosaur oh, you want the sub/method 'fail'
01:29 cyphase joined 01:31 dubi0us joined, mcmillhj joined 01:34 dubi0us left 01:37 mcmillhj left 01:40 dubi0us joined 01:44 dubi0us left 01:45 mcmillhj joined 01:46 ilbot3 left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:50 dubi0us joined, mcmillhj left 01:51 cyphase left 01:58 cdg joined 01:59 mcmillhj joined, dubi0us left 02:04 mcmillhj left 02:07 Cabanossi left 02:09 Cabanossi joined, mcmillhj joined 02:15 mcmillhj left, noganex_ joined 02:18 noganex left 02:25 mcmillhj joined 02:31 mcmillhj left 02:37 dubi0us joined 02:39 pilne left, Cabanossi left, Cabanossi joined 02:41 dubi0us left 02:47 dubi0us joined 02:48 dubi0us left 02:53 dubi0us joined 02:57 dubi0us left 03:03 dubi0us joined 03:04 dubi0us_ joined 03:06 Cabanossi left, mcmillhj joined 03:07 dubi0us left 03:08 Cabanossi joined 03:12 mcmillhj left 03:15 zacts left 03:17 mcmillhj joined 03:22 mcmillhj left 03:29 zacts joined 03:33 cyphase joined 03:34 troys_ is now known as troys 03:35 mcmillhj joined, dubi0us_ left 03:36 dubi0us joined 03:38 seatek left, bwisti left 03:39 mcmillhj left 03:41 skids left 03:42 pompomcrab joined 03:43 dubi0us left 03:45 mcmillhj joined 03:47 BenGoldberg left 03:48 dubi0us joined 03:50 mcmillhj left 03:56 khw left 04:02 dubi0us left 04:05 kurahaupo left, Cabanossi left 04:07 mcmillhj joined 04:08 Cabanossi joined 04:10 xtreak_ joined, wamba joined 04:11 dubi0us joined 04:12 mcmillhj left 04:17 dubi0us_ joined 04:20 dubi0us left 04:21 seatek joined 04:22 dubi0us_ left, pompomcrab left 04:23 mcmillhj joined 04:24 astj left 04:25 astj joined 04:26 dubi0us joined 04:28 mcmillhj left 04:29 astj left 04:31 dubi0us left, dubi0us joined 04:32 cdg_ joined 04:34 cdg left 04:35 mcmillhj joined 04:36 dubi0us left 04:37 dubi0us joined 04:38 astj joined 04:40 mcmillhj left
seatek m: my $a = 'Dog'; my $rx = rx/^D.*/; say so $a ~~ $rx 04:40
camelia True
seatek That's neat
m: my $a = 'Dog'; my $r = '^D.*'; my $rx = rx/$r/; say so $a ~~ $rx 04:41
camelia False
seatek That confuses me
Is there a way to get a variable interpolated as a regex?
I've been digging 04:42
04:42 astj left
geekosaur <$var> 04:42
seatek oh my gosh that works 04:43
thank you so much ++geekosaur :)
but <<$r>> doesn't. i'll maybe try wrapping my head around it later 04:45
geekosaur regex language is not the same as regular perl 6. in regex language < > indicates some kind of special behavior
seatek that's what i was just thinking - universe into itself 04:46
geekosaur design.perl6.org/S05.html#Extensibl...%3C...%3E)
04:47 dubi0us left 04:48 dubi0us joined
geekosaur (that page may be a little out of date, those docs were preliminary specifications that have since been succeeded by actual code and tests, but they capture the intended design) 04:49
seatek so kinda like <alum> and <punct> -- meaning, do something weird with what's in here, and if it's a variable, go ahead and interpolate it
04:52 ufobat joined 04:53 dubi0us left 04:57 dubi0us joined
seatek ok looks like the "do something weird" is more like... i don't know... but wow... those brackets... amazing how many things can be associated with such tiny atomic stuff 04:57
04:57 curan joined 04:58 astj joined
seatek It's strange how this language can be so clear and minimal, and at the same time be so Baroque 04:59
05:01 dubi0us left 05:03 kurahaupo joined 05:06 dubi0us joined, mcmillhj joined, Cabanossi left
seatek my moarvm has cherubs and filigree in it. on a tensor 05:07
05:08 Cabanossi joined 05:11 dubi0us left 05:13 mcmillhj left, zoll joined 05:19 dubi0us joined 05:23 mr-foobar joined, mr-fooba_ left, cdg_ left, cdg joined 05:27 dubi0us left 05:28 mr-foobar left, dubi0us joined, mcmillhj joined, mr-foobar joined 05:33 mcmillhj left 05:36 dubi0us left 05:38 dubi0us joined 05:42 dubi0us left 05:45 Kaffe left 05:46 cyphase left 05:47 lowbro joined, lowbro left, lowbro joined 05:48 mcmillhj joined 05:49 dubi0us joined 05:53 xinming_ joined, mcmillhj left 05:59 troys left 06:00 mcmillhj joined 06:03 wamba left 06:05 mcmillhj left 06:07 dubi0us_ joined, dubi0us left 06:09 cyphase joined 06:10 W4RL0RD joined 06:12 cihan joined, dubi0us_ left, cihan left 06:15 cyphase left, lookatme joined
lookatme afternoon 06:16
06:16 mcmillhj joined, dubi0us joined 06:21 dubi0us left
zoll hi 06:21
06:21 Cabanossi left 06:23 Cabanossi joined 06:24 mcmillhj left 06:29 dubi0us joined 06:31 mcmillhj joined 06:36 mcmillhj left 06:38 dubi0us_ joined, dubi0us left 06:46 mcmillhj joined 06:47 nullcone_ joined, domidumont joined, dubi0us_ left 06:49 dubi0us joined 06:51 Cabanossi left, mcmillhj left 06:53 domidumont left, Cabanossi joined, dubi0us left 06:54 domidumont joined 06:58 dubi0us joined 07:00 cdg_ joined, zoll left 07:02 mcmillhj joined, cdg left, dubi0us left 07:07 mcmillhj left 07:08 dubi0us joined
Geth doc: ufobat++ created pull request #1397:
Describe $*MAIN-ALLOW-NAMED-ANYWHERE
07:12
07:12 ufobat left, ufobat joined 07:17 abraxxa joined, mcmillhj joined 07:18 dubi0us left 07:21 dubi0us joined 07:22 wamba joined 07:23 mcmillhj left 07:25 dubi0us left 07:27 nattefrost joined 07:28 dubi0us joined 07:32 dubi0us left, mcmillhj joined 07:33 dubi0us joined 07:34 W4RL0RD left 07:35 curan left, W4RL0RD joined 07:37 mcmillhj left 07:38 dubi0us left, dakkar joined 07:39 dubi0us joined 07:40 W4RL0RD left 07:43 wamba left 07:48 mcmillhj joined, dubi0us_ joined 07:49 dubi0us left 07:53 mcmillhj left 07:58 dubi0us_ left, dubi0us joined 08:01 mcmillhj joined 08:02 mscha left 08:04 jonas1 joined 08:06 mcmillhj left 08:07 b2gills joined 08:08 dubi0us_ joined, dubi0us left 08:12 cdg_ left 08:13 cdg joined 08:15 mcmillhj joined 08:17 dubi0us joined, dubi0us_ left 08:18 cdg left 08:20 parv joined, [particle] joined 08:21 seatek left, mcmillhj left, dubi0us left 08:24 xtreak joined 08:27 xtreak_ left 08:28 dubi0us joined 08:31 mcmillhj joined 08:35 xtreak left 08:36 mcmillhj left, [particle] left 08:37 [particle] joined 08:38 dubi0us left, dubi0us_ joined 08:43 dubi0us_ left, mcmillhj joined 08:47 dubi0us joined 08:48 mcmillhj left 08:50 donaldh joined 08:51 xtreak joined, bjz joined, dubi0us left 08:53 MasterDuke left, wamba joined, robertle joined, kyan left 08:54 TEttinger left 08:56 xtreak left 08:58 dubi0us joined 09:01 mcmillhj joined 09:06 donaldh left, pmurias joined 09:07 mcmillhj left 09:08 dubi0us left, donaldh joined 09:14 cdg joined 09:17 bjz left 09:18 cdg left 09:21 dubi0us joined, bjz joined 09:25 dubi0us left 09:28 dubi0us joined 09:29 Voldenet left 09:32 dubi0us left 09:34 nebuchadnezzar left 09:37 lookatme left 09:38 dubi0us joined 09:41 donaldh left 09:43 dubi0us left, Voldenet joined, Voldenet left, Voldenet joined
pmurias native ints are 64 bit? 09:44
yes 09:45
09:48 dubi0us joined 09:50 ChoHag left 09:51 Cabanossi left, donaldh joined 09:52 dubi0us left 09:53 Cabanossi joined 09:58 dubi0us joined, CQ joined 10:02 dubi0us left 10:03 dubi0us joined 10:08 dubi0us left, dubi0us joined 10:12 xtreak joined 10:13 dubi0us left 10:15 cdg joined 10:16 bjz left 10:17 dubi0us joined 10:19 cdg left 10:21 dubi0us left 10:22 xtreak left, Cabanossi left 10:23 Cabanossi joined 10:24 xtreak joined 10:28 dubi0us joined 10:29 xtreak left, xtreak joined 10:30 rindolf joined 10:32 xtreak left, ChoHag joined, dubi0us left 10:33 xtreak joined
lizmat pmurias: unless you're on a 32-bit system 10:35
m: say $?BITS
camelia 64
10:35 xtreak left
lizmat that would be 32 on a 32-bit system 10:35
although I must admit I have never been able to test that
10:39 xtreak joined
pmurias it's 32-bit on the js backend too because JavaScript doesn't yet have native 64bit integers :/ 10:40
10:41 ChoHag left
jnthn On MoarVM it ends up being 64-bit everywhere, fwiw 10:43
But it's spec'd as being machine defined
Or backend defined, rather
ilmari pmurias: shouldn't it be 53 on js? ;)
10:49 dubi0us joined
pmurias ilmari: that was one choice, I'm emitting the integer stuff as 32bit using the tricks asm.js uses 10:51
ilmari: which is basically |0 in a lot of places
tadzik why 53? :o 10:52
tbrowder .tell DrForr my Perl6::Parser PR passes all tests
yoleaux tbrowder: I'll pass your message to DrForr.
ilmari tadzik: that's the precision of 64bit floats
tadzik ah 10:53
ilmari they have a 53 bit mantissa, so with a zero exponent you can represetnt integers up to 2^53 exactly
tadzik I see
10:53 dubi0us left 10:57 cschwenz joined, dubi0us joined
Geth doc: 4a2d0f21d3 | (Gabor Szabo)++ | doc/Language/testing.pod6
add closing marks that were missing
10:59
11:03 cschwenz left, wamba left 11:06 Cabanossi left 11:07 dubi0us left 11:08 Cabanossi joined 11:10 dubi0us joined 11:11 nullcone_ left 11:20 dubi0us left, dubi0us joined 11:24 dubi0us left, parv left 11:27 dubi0us joined 11:31 travis-ci joined
travis-ci Doc build passed. Gabor Szabo 'add closing marks that were missing' 11:31
travis-ci.org/perl6/doc/builds/248322990 github.com/perl6/doc/compare/ecd74...2d0f21d387
11:31 travis-ci left, dubi0us left 11:36 dubi0us joined 11:37 donaldh left 11:38 nebuchadnezzar joined 11:39 bjz joined 11:41 dubi0us left 11:49 bjz left, dubi0us joined 11:50 xtreak left 11:52 Cabanossi left 11:53 Cabanossi joined
[Coke] I love ack, but I really wish that ack 2.0 would stop telling me that -a is the default. JUST LET ME TYPE IT. 11:57
I feel like it's trying to punish me for being a loyal user from the 1.0 days. :(
11:59 dubi0us left, dubi0us joined
zengargoyle heh, write a wrapper in ~/bin that removes -a. :) 12:01
12:04 dubi0us left, wamba joined 12:08 dubi0us joined 12:09 ChoHag joined 12:10 mr-foobar left
jast or you could stop typing it ;) 12:17
12:17 dubi0us left 12:18 AlexDaniel joined, El_Che joined 12:19 mniip joined 12:20 dubi0us joined
DeadDelta lizmat │ that would be 32 on a 32-bit system 12:23
12:23 ctilmes joined
DeadDelta lizmat: it's 64-bits still; at least on moar. $?BITS is computed to be the size of native int, while It's $*KERNEL.bits that gives 32 on 32-bit boxes, is computed by what uname gives 12:24
12:24 raschipi joined
zengargoyle heh, i think i once had a gripe about using uname because the output varies wildly across distros. 12:26
DeadDelta Don't gripe. Make it better. 12:27
It's all up in this file: github.com/rakudo/rakudo/blob/nom/.../Kernel.pm
12:29 dubi0us_ joined, dubi0us left
zengargoyle nah, i sorta remember discussing this with lizmat a long time ago and coming to no good conclusion. 12:30
it's more that parts of uname are just user/distro specified with no real logic behind it. it's more human-consumable then actually specified info. 12:31
good for per-distro/os usage, not good for cross platform utility. 12:32
debian ubuntu arch freebsd solaris redhat centos ... all put different sorts of things into what uname -flag returns. 12:34
raschipi Is it the uname binary that generates the string or is the kernel that returns a distro-specific string when uname(2) is called?
How does autoconf detects it? 12:35
zengargoyle raschipi: i don't recall exactly, i just remember trying various uname across all the OS i had access to at the time and throwing up my hands.
12:36 astj left
zengargoyle some of the fields are little more than a -Dsomething=somethin when building a kernel. some are using amd64 vs x86_64, some are adding extra bits of info to the strings. 12:37
raschipi Building systems usually make these determinations, autoconf, cmake, etc. Could look there to gather ideas. 12:38
zengargoyle they're really only mostly consistent across a 'distro'-ish. like if you get a version X.X.X or a string-X.X.X or X.X.X_something_other 12:39
tyil cant you just use `uname -m`, that should be pretty consistent 12:40
zengargoyle no longer has access to a plethora of OS to test against. 12:41
just on Solaris old $WORK had a 40 line or so script for specific version detection. 12:42
tyil I guess you can use `file $(which perl6)` to do a very dirty check to see what the package manager made of it :p 12:44
oh, `file $(which moar)` 12:46
12:48 wamba left 12:50 lucasb joined, donaldh joined 12:51 cpage_ left
raschipi Debian allows 32-bit moar to be installed in a 64-bit system. If there are multiple installations, that wouldn't be correct. 12:52
12:54 wamba joined 12:58 mr-foobar joined, CQ left, cschwenz joined
cschwenz p6: class Foo does Rational { }; 12:59
camelia 5===SORRY!5=== Error while compiling <tmp>
No appropriate parametric role variant available for 'Rational'
at <tmp>:1
cschwenz ^^^ what am i doing wrong?
DeadDelta cschwenz: Rational takes two parameters, the types for numerator and denominator 13:00
p6: class Foo does Rational[Int,Int] { };
camelia ( no output )
cschwenz DeadDelta++
thanks! :-)
13:02 st_elmo joined 13:03 dubi0us_ left 13:04 mcmillhj joined 13:05 nattefrost left 13:06 Cabanossi left 13:08 dubi0us joined, Cabanossi joined 13:11 bjz joined
lizmat DeadDelta: is there a reason to have Rational not default to [Int,Int] ? 13:12
13:12 dubi0us left
DeadDelta No idea 13:12
13:13 cpage_ joined
lizmat tries a spectest with defaults 13:14
DeadDelta Considering the attributes get default 0 and 1 values, the range of options is kinda limited :D
p6: class Foo does Rational[Num, Num] { }; Foo.new
camelia Type check failed in binding to parameter 'nu'; expected Num but got Int (0)
in block <unit> at <tmp> line 1
DeadDelta heh
13:17 ChoHag left 13:18 cpage_ left 13:19 dubi0us joined
lizmat cschwenz: github.com/rakudo/rakudo/commit/41ed2c03ab 13:22
$ 6 'class Foo does Rational { }; dd Foo.new(42,50)' 13:23
Foo.new(numerator => 21, denominator => 25)
13:23 dubi0us left
cschwenz lizmat++ :-) 13:29
13:35 cdg joined 13:37 bjz_ joined, kyan joined 13:38 bjz left
Geth doc: c4cbc81682 | (Jan-Olof Hendig)++ | 2 files
Fixed a few incorrect/missing »
13:45
13:48 skids joined 13:56 lizmat left 13:59 mr_ron joined
mr_ron m: { my int $a = 42; loop (my int $i = 0; $i < 10_000_000; $i++) { $a += 1 + $a % 3 } ; say $a; say now - ENTER now }; # nicer perf now 14:02
yoleaux 28 Jun 2017 10:11Z <DeadDelta> mr_ron: yesterday's discussion about natives was wrong. Literals *are* supposed to work work with native multies if they can fit (which they now do, once again, on latest commit)
camelia 15000042
1.0506027
DeadDelta And there's more discussion on that topic happening right now in #perl6-dev 14:03
mr_ron { my int $a = 42; for (1..10_000_000) { $a += 0 + $a % 3 } ; say $a; say now - ENTER now } # slower - in Perl5 ranges are faster
m: { my int $a = 42; for (1..10_000_000) { $a += 0 + $a % 3 } ; say $a; say now - ENTER now } # slower - in Perl5 ranges are faster
camelia 42
2.9684946
mr_ron m: { my int ($a, $one, $limit) = (42, 1, 10_000_000); for ($one..$limit) { $a += 0 + $a % 3 } ; say $a; say now - ENTER now } # still slower
camelia 42
4.8303067
14:04
DeadDelta I think Range just goes through .succ. There might not be any special native-int magic in it
s: ((my int $ = 1) .. (my int $ = 2)).iterator, 'pull-one'
14:05 SourceBaby joined, ChanServ sets mode: +v SourceBaby
DeadDelta s: ((my int $ = 1) .. (my int $ = 2)).iterator, 'pull-one' 14:05
SourceBaby DeadDelta, Sauce is at github.com/rakudo/rakudo/blob/d5bf...r.pm#L1665 14:06
DeadDelta Ah, nm, we do have it. lizmat++
mr_ron m: { my int $a = 42; for (1..10_000_000) { $a += 1 + $a % 3 } ; say $a; say now - ENTER now } # slower - in Perl5 ranges are faster 14:08
camelia 15000042
3.01248510
mr_ron m: { my int ($a, $one, $limit) = (42, 1, 10_000_000); for ($one..$limit) { $a += 1 + $a % 3 } ; say $a; say now - ENTER now } # still slower
camelia 15000042
5.16865642
timotimo it doesn't do the for-to-while-loop optimization
because the start and end points aren't constants 14:10
we could of course do it anyway
that wants careful testing
14:12 bjz_ left 14:13 bjz joined 14:14 khw joined, wamba left 14:21 andrzejku_ left 14:22 andrzejku_ joined 14:26 colomon joined
mr_ron I am sick right now and have to come back 14:26
colomon Dunno where things stand with MAIN / $*MAIN-ALLOW-NAMED-ANYWHERE, but the only reason I haven’t used it extensively in my code is because I didn’t know it existed before this morning. Of course, I’d really prefer it if the default was True rather than False… 14:29
DeadDelta colomon: the things stand at it being removed and replaced with a hash of options instead of a single scalar option. With (currently) the only option being the allow named anywhere option. 14:30
in 10 hours 14:31
colomon sounds good.
DeadDelta buggable: eco getopt 14:36
buggable DeadDelta, Found 6 results: Getopt::Tiny, Getopt::Long, Getopt::Type, Getopt::Kinoko, Getopt::Std. See modules.perl6.org/#q=getopt
raschipi What $*MAIN-ALLOW-NAMED-ANYWHERE does? 14:37
DeadDelta Nothing.
:)
It doesn't exist. Pay no attention to the man behind the curtain 14:38
raschipi I will ask lizmat since she implemented it in the first place.
14:38 ChoHag joined 14:39 wamba joined
DeadDelta raschipi: gist.github.com/zoffixznet/187333d...4cab37e513 14:39
raschipi And the interface being built will allow dor this to be set for each option instead of all-or-nothing? 14:41
colomon has been doing this using @*ARGS = |@*ARGS.grep(/^"--"/), |@*ARGS.grep({ $_ !~~ /^"--"/ }); 14:42
DeadDelta raschipi: the only change being made is we're making the options for handling MAIN more extensible. Instead of shoving in yet another global the next time someone wants something different, we'd just handle another key in a hash 14:43
And looking at Getopt::* impls; wouldn't be a terrible idea to allow passing a class that handles options to, say, %*MAIN-SUB-OPTIONS<parser> and have it use the class to parse out the options any way the user want, while still receiving them via the MAIN sub 14:44
raschipi Sounds very good.
DeadDelta You want the unixy things? %*MAIN-SUB-OPTIONS<parser> = Getopts::Unixy. You like git-like parsing? %*MAIN-SUB-OPTIONS<parser> = Getopts::GitLike 14:45
raschipi So, the global variable won't be substituted by a Hash, but by a key in a hash that will deal with other things related to the problem
zengargoyle while we're at it.... is there an example somewhere of a 'modulino'? i.e. a class/module/unit like thing that can be either use'd or run directly.
lucasb m: say < oh --hai oh --hai >.sort(* !~~ /^ '--'/) 14:46
camelia (--hai --hai oh oh)
lucasb ^^ I wonder if such idiom would fit colomon's need
DeadDelta Useless use of regex :)
m: for ^10000 { $ = < oh --hai oh --hai >.sort(* !~~ /^ '--'/) }; say now - INIT now
camelia 0.5954372
colomon m: say < oh --hai ohno --haiku >.sort(* !~~ /^ '--'/)
camelia (--hai --haiku oh ohno)
DeadDelta m: for ^10000 { $ = < oh --hai oh --hai >.sort: *.starts-with('--').not }; say now - INIT now 14:47
camelia 0.1742473
colomon lucasb: is it stable? rearranging the order of the arguments (other than moving —’s forward) would be bad
lucasb colomon: if the sort is stable? sorry, idk. 14:49
DeadDelta: yeah, .starts-with seems better suited for this job, thanks :)
colomon m: say < oh --hai ah —boo >.sort(* !~~ /^ '--'/)
camelia (--hai oh ah —boo)
colomon stupid IRC client 14:50
lucasb is there a 'partition' method for arrays? eg. split the elements into 2 arrays based on an predicate given as argument?
raschipi classify
colomon lucasb: yes
raschipi "Transforms a list of values into a hash representing the classification of those values according to &mapper;" 14:51
&mapper being *.starts-with('--') 14:52
lucasb m: say < a --b c --d >.classify(*.starts-with('--')).values
camelia ([--b --d] [a c])
colomon m: say < a --b c --d >.classify(*.starts-with('--')).values.slip
camelia No such method 'slip' for invocant of type 'Seq'. Did you mean any of these?
Slip
flip
sin
skip

in block <unit> at <tmp> line 1
lucasb now, just need to join :)
DeadDelta m: say < a --b c --d >.classify(*.starts-with('--')).values.Str 14:53
camelia --b --d a c
DeadDelta Oh
[Coke] to DeadDelta's point, made github.com/coke/ack2/commit/5693a0...430fd8d5f5 ; now at least I can ack in peace.
DeadDelta m: say < a --b c --d >.classify(*.starts-with('--')).values».Slip.flat
camelia (--b --d a c)
14:53 Burgos joined
Burgos Hello! 14:53
DeadDelta \o
m: say < a --b c --d >.classify(*.starts-with("--")).values»<>.flat 14:54
camelia (--b --d a c)
Burgos I was just curious and tried to use autosplit with perl6 (rakudo), but it doesn't seem like it's supported
DeadDelta What's autosplit?
[Coke] what is autosplit?
Burgos `perl -F: -lane ...`
[Coke] heh
Burgos namely, option `-a`
14:55 st_elmo left
Burgos googling doesn't help much 14:55
I found this draft, where it says it should stay the same: design.perl6.org/S19.html
moritz perldoc perlrun explains it
Burgos but brings nothing: www.google.de/search?q=site:docs.p...SvU_a6t5gK
moritz I think it's not yet implemented (though I might be wrong)
Burgos so I was just curious if it's not implemented yet
or not supported 14:56
[Coke] It's not implemented, and it's not tested in the spec, either, as far as I know.
zengargoyle moritz: ACK email.
[Coke] (so, less I than NYI: it's not on the roadmap, I don't think) 14:57
Burgos: note that the design docs are merely historical at this point.
the real spec is the tests in the roast repo.
Burgos yeah, that's why I looked in docs.perl6.org 14:58
thanks!
zengargoyle what's the 'official' NYI thing? say i have a function and just want to croak NYI, is there an easy thing?
raschipi '...' does that
DeadDelta m: X::NYI.new(:feature<meows>).throw
camelia meows not yet implemented. Sorry.
in block <unit> at <tmp> line 1
zengargoyle DeadDelta: thanks much.
[Coke] docs.perl6.org/language/5to6-nutshell says NYI, but that probably needs to be updated.
I wouldn't add anything new that throws that exception. 14:59
DeadDelta Never used that feature in Perl 5 15:00
zengargoyle m: sub f { ... }; f();
camelia Stub code executed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
DeadDelta the perl -lane 'say pop @F'; would be perl6 -ne '.words[0].say' 15:01
zengargoyle m: sub f { X::NYI.new(:feature<f>).throw }; f();
camelia f not yet implemented. Sorry.
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
zengargoyle *sweet* 15:02
timotimo i don't think autosplit is hard to implement, honestly
DeadDelta m: sub f { ... X::NYI.new: :feature<f> }; f();
camelia f not yet implemented. Sorry.
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
timotimo hm, though maybe adding the @F lexical needs to happen so early that we might not have a good handle on it
DeadDelta m: sub f { ??? X::NYI.new: :feature<f> }; f();
camelia f not yet implemented. Sorry.
in sub f at <tmp> line 1
DeadDelta m: sub f { !!! X::NYI.new: :feature<f> }; f(); 15:03
camelia f not yet implemented. Sorry.
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
DeadDelta m: sub f { !!! X::NYI.new: feature => &?ROUTINE.name }; f(); 15:04
camelia f not yet implemented. Sorry.
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
Burgos > <timotimo> i don't think autosplit is hard to implement, honestly 15:05
yeah, could be one of the things one could easily contribute
if the rain continues over the next weekend, who knows
timotimo it is raining here right now
DeadDelta m: sub term:<♥♥♥> { die X::NYI.new: feature => callframe(1).code.name }; sub f { ♥♥♥ }; f(); 15:06
camelia f not yet implemented. Sorry.
in sub term:<♥♥♥> at <tmp> line 1
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
DeadDelta hehe neat :)
15:07 Cabanossi left 15:08 Cabanossi joined
Burgos yeah, but I'm at work :( 15:09
timotimo it stopped raining. no -a for you! :P 15:10
15:11 domidumont left
Burgos :-) 15:13
timotimo i wonder how late we're allowed to throw lexicals into the qast tree
DeadDelta You could always do a dynamic var :) 15:16
buggable: eco LN
buggable DeadDelta, LN 'Get $*ARGFILES with line numbers via $*LN': github.com/zoffixznet/perl6-LN
DeadDelta ^ like there
timotimo hmm, a dynamic var isn't as pretty as just @F 15:19
15:21 dubi0us joined
DeadDelta Why 'F' anyway? 15:22
15:23 mack[m] joined
zengargoyle Field 15:25
timotimo actually, i wouldn't mind if we put it into $/
15:25 dubi0us left, nicq20 joined
zengargoyle probably AWK or before, FS = Field Separator. 15:26
$/ might make it harder to sub-match on fields. 15:28
15:28 araraloren joined
zengargoyle Re: my latest fight with grammar/actions and using ($/) 15:29
15:30 dubi0us joined
zengargoyle if $/[0] ~~ 'foo' { say $/[1] } 15:31
vs if @F[0] ~~ 'foo { say @F[1] }
raschipi What's the matter, to avoid the pitfall... 15:32
15:32 dubi0us left, literal_ joined 15:33 dubi0us joined
zengargoyle it seems in the actions case, use ($bar) instead of ($/) which .... i guess binds $bar to $/ or something. 15:33
i.e. manually keeping track and unpacking $/ at every level where you might need to use ~~ (or whatever uses $/) again. 15:35
DeadDelta TBH, my feeling about it is don't add @F at all
Perl 5's split does a lot of magic we don't do. And we also have .comb. 15:36
timotimo you can if $/[0] ~~ /foo/ -> $othermatch { }
perlpilot DeadDelta: and ... there's module space for this stuff.
DeadDelta -F: -lane in perl6 would produce....
m: ":foobar:ber::meow".split: ':'
camelia ( no output ) 15:37
DeadDelta m: dd ":foobar:ber::meow".split: ':'
camelia ("", "foobar", "ber", "", "meow").Seq
zengargoyle fwiw, i tried using a Block (or whatever a { .... } would be and it don't work. :)
DeadDelta Well, OK, it's the same in Perl 5.
But still, it feels to be one of those crtiptic and weird Perl 5 bells and whistles 15:38
zengargoyle it's a very common use when dealing with input from pipe like things on unixy like things. 15:40
DeadDelta What? using a bunch of switches and a @F variable instead of just using .words or .comb methods?
'-a 15:41
'-a @F' is the same length as .words and you don't have to learning anything extra
perlpilot yeah, having some specialized thing for common command line operations is very AWK/Perl 5 thinking.
15:42 dubi0us left
perlpilot And, again, if you need some specialized thing for command line stuff ... write a module for it. 15:42
(though, I would like to see perl6 garner a -i ala P5 at some point)
zengargoyle it's the same with -n and -p 15:43
convience of not having to do that yourself for a simple -e '<some code>' 15:44
DeadDelta yeah, wtf do we even have '-' ---
15:44 dakkar left
DeadDelta yeah, wtf do we even have '-p' -_- 15:44
perldoc perlrun is 24 pages long. 15:45
Well, screens
19 pages of US Letter paper
15:46 wamba left
zengargoyle let's make everybody write their own while/print? loops each time even though it's like 90% of the simple use case that they would want to be as simple as possible. 15:46
DeadDelta Where do you get your percentages from? 15:47
zengargoyle lol, 30 years of programming (mostly on unix though...) 15:48
DeadDelta Right, so made up.
zengargoyle aka /my ***
DeadDelta Made up numbers for a single human.
:)
15:48 jamesaxl joined
perlpilot zengargoyle: would you object to `perl6 -MCU -e '...'` ? (if there were a CU module that had command utilities) 15:48
zengargoyle perlpilot: not at all 15:49
DeadDelta Or alias perl6='perl6 -MCU'
15:49 dubi0us joined
DeadDelta & 15:50
zengargoyle i could probably go through the *near* *infinite* number of files i have named '0liners' for all of the perl one-liner's i've written that use -a, but i'm lazy.
perlpilot zengargoyle: my experience so far has been that Perl 6 has enough power in the language that I don't really miss fancy command line options from Perl 5 15:51
DeadDelta It'd still be a datapoint for a single programmer
I've never used -a in my life in the ~10 years I've used Perl 5 for example.
zengargoyle DeadDelta: you've missed out. 15:52
perlpilot -a is probably more common from Perl "old timers" :)
DeadDelta zengargoyle: nope.
I didn't bother reading the 19 pages of perldoc perlrun and probably learned some other things in its place :)
DeadDelta && 15:53
15:54 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed a few incorrect/missing »' 15:54
travis-ci.org/perl6/doc/builds/248377017 github.com/perl6/doc/compare/4a2d0...cbc81682b3
15:54 travis-ci left, troys joined 15:56 leont joined, noganex joined 15:57 lichtkind left 15:58 noganex_ left, cschwenz left, abraxxa left 15:59 smls joined 16:01 dubi0us left
smls bisectable6: my @a = 1, 2, 3; say DUMP @a 16:01
bisectable6 smls, On both starting points (old=2015.12 new=41ed2c0) the exit code is 1 and the output is identical as well
smls, Output on both points: «MVMArray: Can't shift from an empty array␤ in block <unit> at /tmp/5loc42TDxz line 1␤»
16:02 dubi0us joined
smls Didn't DUMP once work, as a tool to introspect the "innards" of an array (i.e. how much has been reified etc.)? 16:03
16:03 leont left
moritz before the GLR, maybe? 16:04
smls hm, probably
16:06 dubi0us left, smls left 16:07 smls joined, Cabanossi left
[Coke] m: my @a = lazy 1,2,3; dd @a 16:07
camelia Array @a = (1, 2, 3, Any, Any, Any, Any, Any, Any, Any... lazy list)
16:08 Cabanossi joined
[Coke] (it just shows 10, doesn't care what's reified) 16:08
16:08 lichtkind joined 16:10 robertle left
smls [Coke]: Right, but sometimes (when debugging) it can be helpful to look under the hood. 16:10
I was looking at the lastest Perl 6 question on Stack Overflow, which involves an infinite array of arrays recursively defined with gather/take. 16:11
And calling `dd` or `say` on it, seems to simply hang indefinitely. 16:12
raschipi link?
smls stackoverflow.com/questions/448219...s-operator
16:13 uberbaud joined
smls ^^ Try to add a "dd @arrs;" after the "my @arrs = ..." line. 16:14
raschipi If the list is infinite, hanging is expected. If you try to reify an infinite list, it will hang. 16:15
It's an infinite loop.
smls m: my @a = 1..*; dd @a; 16:16
camelia Array @a = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10... lazy list)
smls raschipi: not normally ^^
16:17 dubi0us joined
[Coke] smls: can you golf that SO post to the unexpected behavior? 16:18
smls haven't tried yet
nicq20 Sorry to derail the conversation, is it possible to pass named args to a `use`? 16:19
DeadDelta nicq20: not with the current scheme
16:20 jonas1 left
DeadDelta It just treats them as tags :/ 16:20
nicq20: or I should say, I really wanted to figure out how and failed :/
nicq20 Aww, man.
DeadDelta Even passing them as :foo.Pair triggers the tag, even tho a normal sub would take it as a positional pair :/
nicq20 I've been looking for a bit, and the only thing I could find that clearly explained is: 16:21
16:21 jonas1 joined
nicq20 Whereas UNIT::EXPORT packages deal with the named parameters passed to use, the EXPORT sub handles positional parameters. If you pass positional parameters to use they will be passed to EXPORT. If a positional is passed the module no longer exports default symbols. 16:21
docs.perl6.org/language/modules#EXPORT
DeadDelta buggable: author zoffixznet
buggable DeadDelta, Found 35 dists for zoffixznet. See temp.perl6.party/buggable/55318663...53312.html
16:21 dubi0us left
DeadDelta nicq20: basically this is the best I cooked up: github.com/zoffixznet/perl6-Rakudo...Prereq.pm6 16:22
Passing opts as positional strings and under the hood treating them as bool named args 16:23
This line in particular: github.com/zoffixznet/perl6-Rakudo...req.pm6#L6
16:25 smls left 16:29 dubi0us joined
nicq20 DeadDelta: Thanks! I'll see if I can figure something out. 16:29
16:29 donaldh left
nicq20 I wonder if that can be changed with a slang. :/ 16:33
16:33 araraloren left
zengargoyle is the Test module fixed enough to document? 16:33
16:33 dubi0us left
moritz yes, see docs.perl6.org/language/testing 16:34
DeadDelta zengargoyle: it's fully documented
16:36 pilne joined
zengargoyle Language/testing doesn't help much. * throws-like — a given block of code (or string to be evaled) throws a given 16:36
exception
DeadDelta zengargoyle: well, "throws-like" is a link to detailed explaination. Click it
zengargoyle oh, web docs.... :( 16:37
DeadDelta Oh scroll further down. It's all in that single document
zengargoyle wondering if adding POD to Test.pm6 was a good idea or not.
there is only one line for 'throws-like' in Language/testing 16:38
16:38 dubi0us joined
DeadDelta My browser tells me there are 4 16:38
zengargoyle i had to look at src for Test.pm6 to get details.
ah, i'm relying on the p6doc
DeadDelta No, POD to Test.pm6 is not a good idea, because you need special arrangements to be able to contribute to rakudo/rakudo dir, whereas anyone can contribute to perl6/doc 16:39
zengargoyle aka not-web something.
DeadDelta s/dir/repo/;
Wonder why p6doc isn't rendering Language/testing in full :/
zengargoyle has commit. :P
ah, that may be a thing.
zengargoyle thinks perldoc was one of the major things that made me choose perl over some other languages. :) 16:41
16:41 konsolebox joined
DeadDelta mhm, it's good 16:42
16:42 dubi0us left
zengargoyle i'd rather have Test doc in POD in Test.pm6 than just on some random web page. 16:43
zengargoyle grudgingly checks web pages.... 16:44
raschipi Make it generate info so that the links work, since they will be written for the web... 16:46
16:46 AlexDaniel left
[Coke] part of the issue is that we want docs that are independent of the impl. 16:46
(for modules, it's ok to tie the docs to the impl, but not for anything that's "core")
16:46 AlexDaniel joined, Ven joined 16:47 Ven is now known as Guest17457, Guest17457 is now known as Ven``
Ven`` o/ 16:47
16:47 uberbaud left
raschipi It should still work in the command line, even if it's shipped separately from any particaular implementation... 16:47
Ven`` it's been a few years and I can't remember. 16:48
The zen slice is only useful for interpolation, yeah?
16:48 dubi0us joined, bjz left
Ven`` <TimToady> on zen slices, .[] is supposed to be equivalent to @() 16:48
zengargoyle [Coke]: yeah, Test is a module that i expect to have self-hosted docs of actual workings. 16:49
raschipi Which is the same as calling .list on it as I recall.
zengargoyle last time i checked, Test was still being tweaked a bit... 16:50
perlpilot Ven``: Why do you ask?
Ven`` they were in some talk, and a student asked 16:51
DeadDelta Ven``: yes, it doesn't even reify and just returns self 16:52
Ven`` well, it returns `self.list`
16:52 dubi0us left
DeadDelta Ven``: that's just the "anything is a 1-item list" 16:53
s: [], 'ZEN-POS', \()
SourceBaby DeadDelta, Sauce is at github.com/rakudo/rakudo/blob/7b17...ny.pm#L317
DeadDelta Actually no.
Ven``: where's the self.list? Even the Any candidate returns self
m: dd 42[]
camelia 42
16:54 literal_ left
raschipi Ok, so .[] and @() are different 16:55
DeadDelta Yeah 16:56
raschipi m: dd 1.[], @(1);
camelia 1
(1,)
16:56 dubi0us joined
DeadDelta Maybe the Any candidate should do self.list I thought it would and the Positionals would just do self 16:56
m: dd 1.list[], @(1); 16:57
camelia (1,)
(1,)
DeadDelta Ven``: where is that TimToady's quote from? I'll commit this tonight unless someone beats me to it 16:58
16:58 wamba joined
raschipi DeadDelta: ask him if he didn't use rule 2 first. Maybe it's an old quote. 16:59
DeadDelta nm, found it irclog.perlgeek.de/perl6/2013-06-12#i_7189796
I'm not going by Rule 1, but by it making sense :D 17:00
raschipi m: dd 1.[*];
camelia (1,)
DeadDelta That reifies
s: 1, 'AT-POS', \(*)
SourceBaby DeadDelta, Sauce is at github.com/rakudo/rakudo/blob/7b17...ny.pm#L299
DeadDelta wat...
m: dd Whatever.new.Int 17:01
camelia No such method 'Int' for invocant of type 'Whatever'
in block <unit> at <tmp> line 1
DeadDelta You're lying to me, robot!
zengargoyle remembers [] and [*] were slightly different
DeadDelta s: &postcircumfix:<[ ]>, \(1, *) 17:02
SourceBaby DeadDelta, Sauce is at github.com/rakudo/rakudo/blob/7b17...ce.pm#L400
DeadDelta Ahh. `SELF[^SELF.elems];`SELF[^SELF.elems];
17:03 robertle joined
DeadDelta s: 1, 'AT-POS', \(^(1.elems)) 17:03
SourceBaby DeadDelta, Sauce is at github.com/rakudo/rakudo/blob/7b17...ny.pm#L299
DeadDelta Still weird. It treats the range as Cool and converts it to an Int which just happens to work :/ 17:04
DeadDelta stops bot-spamming and leaves to do things
(it doesn't do the ^ Cool thing. it still goes through another &postcircumfix:<[ ]> candidate that does things) 17:05
17:06 Cabanossi left
raschipi m: say (1 .. *)[] 17:06
camelia 1..Inf
raschipi m: say (1 .. *)[*]
camelia Cannot .elems a lazy list
in block <unit> at <tmp> line 1
17:08 Cabanossi joined 17:11 lucasb left 17:27 Ven`` left, setty1 joined, Burgos left 17:41 nhywyll joined 17:46 DeadDelta is now known as peer2peerpressur 17:47 mr-foobar left 17:48 peer2peerpressur is now known as HelpBot[perl6]
ufobat m: my @a = "A" .. "Z"; say @a.sort: { if $^a.starts-with("A") { Less } else { $^a cmp $^b }} 17:50
camelia Too few positionals passed; expected 2 arguments but got 1
in block at <tmp> line 1
in block <unit> at <tmp> line 1
ufobat i cant spot my mistake :( 17:51
17:51 Cabanossi left
HelpBot[perl6] ufobat: the $^a and $^b apply to your else block not to sort 17:51
m: my @a = "A" .. "Z"; say @a.sort: { $^a.starts-with("A") ?? Less !! $^a cmp $^b } 17:52
camelia (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
ufobat ah1
17:52 pompomcrab joined
ufobat thank you! 17:53
HelpBot[perl6] Any time!
17:53 Cabanossi joined
HelpBot[perl6] m: my @a = "A" .. "Z"; say @a.sort: { $^b; if $^a.starts-with("A") { Less } else { $a cmp $b }} 17:54
camelia (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
HelpBot[perl6] Also works. $^foo needs to be used just once, after that you can refer to it without the carrot, which is helpful in precicely such cases, where you want to use a var in some other block 17:55
m: my @a = "A" .. "Z"; say @a.sort: -> $a, $b { if $a.starts-with("A") { Less } else { $a cmp $b }}
camelia (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
HelpBot[perl6] Also good.
[Coke] "caret" 17:56
ufobat thats funny i didnt expect that you could leave out the ^
thats really helpful 17:57
[Coke] m: my @a = ("A" .. "Z").pick; say @a.sort: -> $a, $b { if $a.starts-with("A") { Less } else { $a cmp $b }}
camelia (Q)
17:57 mr-foobar joined
[Coke] m: my @a = ("A" .. "Z").pick(*); say @a.sort: -> $a, $b { if $a.starts-with("A") { Less } else { $a cmp $b }} 17:57
camelia (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
[Coke] ;(just to make sure it's doing something. :)
HelpBot[perl6] m: my @a = ("A" .. "Z").pick(*); say @a.sort: { -$a.starts-with("A") || $a cmp $b } 17:58
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared. Did you mean '@a'?
at <tmp>:1
------> 3= ("A" .. "Z").pick(*); say @a.sort: { -7⏏5$a.starts-with("A") || $a cmp $b }
HelpBot[perl6] m: my @a = ("A" .. "Z").pick(*); say @a.sort: { -$^a.starts-with("A") || $^a cmp $^b } 17:59
camelia (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)
HelpBot[perl6] ehehe
needs an `or` tho :)
[Coke] wonders what the point of the starts-with was there. 18:00
HelpBot[perl6] Because the input data may more than 1 letter :) 18:01
m: { dd $:a, $^a }(:72a) 18:02
camelia Int $a = 72
Int $a = 72
HelpBot[perl6] m: { dd $^a, $:a }(72) 18:03
camelia Int $a = 72
Int $a = 72
[Coke] sure, but cmp still works.
ufobat aye, but
it makes no sense in my example 18:04
[Coke] m: my @a = <A B EGG AXE ZOO APE>; say @a.sort: { -$^a.starts-with("A") || $^a cmp $^b }
camelia (A AXE APE B EGG ZOO)
ufobat i didnt work carfully ;)
[Coke] hokay
18:04 mr_ron left 18:06 jonas1 left 18:08 itaylor57 joined 18:16 domidumont joined 18:23 domidumont left
ugexe m: my @a = <A B EGG AXE ZOO APE B>; say @a.sort({ not $^a.starts-with("A") }).sort 18:24
camelia (A APE AXE B B EGG ZOO)
HelpBot[perl6] Why does that sort B before ZOO? 18:25
Oh there are two sorts, nevermind
ugexe m: my @a = <A B EGG AXE ZOO APE B>; say @a.sort.sort({ not $^a.starts-with("E") }); # probably a better example 18:27
camelia (EGG A APE AXE B B ZOO)
18:27 jonas1 joined 18:29 zakharyas joined 18:31 jonas1 left, seatek joined, troys left 18:32 jonas1 joined
tbrowder ref Proc: should I change to Proc::Async instead for basic system calls, 18:38
18:40 dubi0us left 18:42 pompomcrab left
ugexe well, it can't hurt 18:44
tbrowder sounds like a plan! thanx, ugexe 18:48
18:49 |oLa| joined 18:51 Cabanossi left 18:53 Cabanossi joined 18:54 zacts left
tyil !p6 "1.000.000,0".succ.say 18:56
p6: "1.000.000,0".succ.say
camelia 2.000.000,0
tyil how can I make it return 1.000.001,0?
18:57 ptolemarch joined 18:58 dubi0us joined
ugexe m: "1.000.000,0" but role :: { method succ { return "1.000.001,0" } }.succ.say 19:00
camelia 1.000.001,0
geekosaur I think it just uses Perl 6's own rules to parse the number out of the Str, and like most languages Perl 6's numeric syntax is not locale aware
tyil sad 19:01
perlpilot you can always write a module for it. 19:03
19:03 cdg left
HelpBot[perl6] p6: "1.000.000,0".comb(/\d+/).join.Numeric.succ.say 19:04
camelia 10000001
tyil I was just wondering as someone asked :p
19:05 dubi0us left
HelpBot[perl6] is too used to North American numerals for 1.000.000,0 to look completely alien :P 19:05
19:05 mantovani joined
HelpBot[perl6] m: "1.000.000,0".trans([<, .>] => ['.', '']).succ.say 19:07
camelia 1000001.0
perlpilot m: "1.000.000,0".trans(< , . > => < . , >).succ.say 19:09
camelia 1,000,001.0
perlpilot :)
19:09 buggable joined, ChanServ sets mode: +v buggable
HelpBot[perl6] :) 19:09
19:09 dubi0us joined
geekosaur aside from needing to map it back again... :p 19:10
perlpilot just noticed that his text is just a slightly lighter shade as everyone else's on his IRC client
I've been using this client for 1.5 years and only just noticed the difference
geekosaur (he)xchat?
perlpilot yeah
19:12 zacts joined 19:14 dubi0us left 19:23 hey-joe joined 19:25 dubi0us joined 19:29 dubi0us left 19:33 dubi0us joined
hey-joe what is perl6 one-liner like perl -e 'print((<>)[-10..-2])' ( shorter than perl6 -e 'lines.reverse[2..10].reverse' ) ? 19:35
moritz lines[*-10..*-2] 19:36
jnthn lines[*-10..*-2]
heh ;)
19:37 dubi0us left
hey-joe "This Seq has already been iterated, and its values consumed (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array)" 19:37
moritz lines.list[*-10..*-2] 19:39
19:39 dubi0us joined
HelpBot[perl6] hey-joe: but normally you'd not need .list; your perl6 is just too old and has a bug 19:39
hey-joe oh! thanks moritz! 19:40
HelpBot[perl6] wait huh.
hey-joe: what's the full code that caused the Seq error?
19:41 grondilu joined
HelpBot[perl6] ah, nm, yeah it's a bug that existed in ¦«2017.01,2017.02,2017.03,2017.04.3»: and is now fixed :) 19:42
hey-joe version is 2017.04.3;MoarVM 2017.04-53-g66c6dda; perl6 -e 'say lines[*-10..*-2]' 19:43
HelpBot[perl6] Thanks. Yes, on newer perl6 you don't need .list
19:43 dubi0us left 19:46 mcmillhj left
moritz $ $ seq 20 | perl6 -e 'say lines[*-10..*-2]' 19:46
(11 12 13 14 15 16 17 18 19) 19:47
19:47 mcmillhj joined
HelpBot[perl6] TIL about seq :) 19:47
moritz :-) 19:48
19:48 dubi0us joined 19:50 zacts left 19:52 hey-joe left 19:53 dubi0us left
perlpilot There used to be a program called "jot" that does what "seq" does. I wonder why they called it jot? 19:56
19:57 dubi0us joined
hobbs something to do with iota and counting? 19:57
geekosaur jot's the freebsd version
(and os x)
perlpilot weird ... I remember it from like 20 years ago and I'm fairly sure I wasn't using any FreeBSD systems. 19:58
hobbs yeah, a few languages use "iota" to produce a list of sequential integers
someone must have been feeling mildly punny when they decided to call it jot 19:59
geekosaur well, any 4.2BSD offshoot
hobbs Or non-english-speaky, perhaps
perlpilot oh, I see ... jot does so much more than seq www.freebsd.org/cgi/man.cgi?query=jot 20:00
20:01 andrzejku joined
geekosaur including commercial unixes that started out 4bsd-ish and switched over to system v would still have kept jot 20:01
hobbs that's moderately silly
perlpilot maybe HPUX had it? I seem to recall that it was a hybrid unix
20:01 dubi0us left, mcmillhj left 20:07 dubi0us joined
geekosaur very likely, yes, they were one of the switchovers 20:11
20:12 Sound joined 20:27 nullcone_ joined 20:28 espadrine joined 20:29 zakharyas left 20:34 cdg joined 20:36 cdg_ joined
El_Che stmuk: is there a difference between rakudo-star macos pkg and the one in homebrew? (they both are directly from your sources) 20:37
20:39 cdg left, dubi0us left 20:46 raschipi left 20:57 jamesaxl left 21:02 mcmillhj joined 21:04 bjz joined
moritz m: say 'ẞ'.lc; say 'ẞ'.lc.uc 21:05
camelia ß
SS
moritz the capital letter sharp s was mostly unused in idiomatic German, but now it's being officially introduced: www.tagesschau.de/inland/eszett-103.html (warning, German only)
21:06 Cabanossi left 21:07 dubi0us joined 21:08 literal_ joined, Cabanossi joined
moritz luckily they don't seem to mandate it as a case folding target 21:08
21:08 mcmillhj left
moritz m: say 'ẞ' ~~ /:i ß/ 21:09
camelia 「ẞ」
moritz m: say 'SS' ~~ /:i ß/
camelia 「S」
21:10 jonas1 left 21:15 skids left 21:16 dubi0us left, nhywyll left, lizmat joined 21:17 dubi0us joined, andrzejku left 21:21 dubi0us left
literal_ What's the proper way to call a sub in a dynamically loaded (`require`-d) module? 21:22
HelpBot[perl6] Didn't you ask that already last night? 21:24
literal_ Yeah but the suggested answer doesn't seem to work
HelpBot[perl6] literal_: which one?
literal_ I've got to the point where it's loading correctly 21:25
HelpBot[perl6] m: my $name = 'Test'; require ::($name); ::('&\qq[$name]::EXPORT::DEFAULT::ok')(1)
camelia ok 1 -
HelpBot[perl6] seems to work here
That's requiring module 'Test' and uses its `ok` sub
literal_ What's going on with that &\qq? What is that doing? 21:27
I know about qq but what does &\ mean there
HelpBot[perl6] It's not &\, it's & and \qq escape sequence 21:28
m: my $name = 'Test'; require ::($name); ::('&' ~ $name ~ '::EXPORT::DEFAULT::ok')(1)
camelia ok 1 -
HelpBot[perl6] And \qq can be used in single-quoted string to drop into more liberal interpolation mode, like I used it to interpolate the $name var 21:29
literal_ Any reason just $name would not work?
HelpBot[perl6] m: my $name = 'Test'; require ::($name); ::("&$name::EXPORT::DEFAULT::ok")(1)
camelia Use of uninitialized value $v of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
No such symbol '&'
in block <unit> at <tmp> line 1
HelpBot[perl6] You get the error
Though I'm not 100% sure why; I would've expected it to require parens for `&` to not be parsed as just text 21:30
literal_ That's strange
HelpBot[perl6] m: my $name = 'Test'; say "&$name" 21:31
camelia &Test
HelpBot[perl6] m: my $name = 'Test'; say "&$name::F"
camelia Use of uninitialized value $v of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
&
HelpBot[perl6] Seems it's the `::` that mess it up
Ohhh
It's not the `&` that messes it up. It just thinks I meant $name::Foo::Bar variable :)
literal_ Aha 21:32
HelpBot[perl6] m: my $name = 'Test'; require ::($name); ::("&$name\::EXPORT::DEFAULT::ok")(1)
camelia ok 1 -
HelpBot[perl6] there we go
21:33 nebuchadnezzar left
perlpilot could have also done ... 21:33
m: my $name = 'Test'; require ::($name); ::('&'~$name~'::EXPORT::DEFAULT::ok')(1)
camelia ok 1 -
literal_ Ah beautiful, I had forgotten to add the &
perlpilot oh, you said that earlier 21:34
HelpBot[perl6]++ :)
literal_ Thanks for being patient with my stupidity
With that settled I can get to the fun bits 21:35
21:41 zacts joined 21:43 wamba left 21:44 dubi0us joined, |oLa| left 21:48 dubi0us left 21:50 literal_ left 21:51 zacts left 21:53 dubi0us joined 21:58 Kaffe joined, nebuchadnezzar joined, dubi0us left, literal_ joined 22:00 dubi0us joined
Geth doc: d4b10c3436 | (Jan-Olof Hendig)++ | doc/Type/Array.pod6
Added docs for method 'dynamic'. jnthn++
22:04
22:04 dubi0us left 22:05 rindolf left 22:07 setty1 left 22:08 dubi0us joined 22:17 dubi0us left
Geth doc: 05cc5c4da5 | (Jan-Olof Hendig)++ | doc/Type/Hash.pod6
Added docs for method 'dynamic'. jnthn++
22:17
22:18 zacts joined, espadrine left 22:20 perlpilot left
Geth doc: 2d8b7779f9 | (Jan-Olof Hendig)++ | doc/Type/Any.pod6
Fixed broken link. AlexDaniel++
22:20
doc: c2313e5ae7 | (Jan-Olof Hendig)++ | doc/Type/Hash.pod6
Fixed indentation
22:24
22:29 dubi0us joined 22:30 astj joined 22:31 astj left 22:34 bjz left, dubi0us left
Geth doc: 00a904f6cc | (Zoffix Znet)++ | doc/Type/Array.pod6
Fix/Expand Array.append docs

  - Use more precise language about what and how .append flattens
22:34
doc: 5efc7f06f7 | (Zoffix Znet)++ | doc/Type/Array.pod6
Revert "Fix/Expand Array.append docs"

This reverts commit 00a904f6ccec2e4139450aeac0bdcc0f30b822ec.
It's a rogue commit. The disicion for change was abandoned.
22:35
22:38 dubi0us joined 22:40 zacts left 22:42 dubi0us left, travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Added docs for method 'dynamic'. jnthn++' 22:42
travis-ci.org/perl6/doc/builds/248558574 github.com/perl6/doc/compare/c4cbc...b10c3436a3
22:42 travis-ci left
Geth doc: 559b74f734 | (Zoffix Znet)++ | doc/Language/functions.pod6
Remove trailing whitespace
22:42
doc: 5c766b72d3 | (Zoffix Znet)++ | doc/Language/functions.pod6
Document %*SUB-MAIN-OPTS

Closes #1397 Rakudo impl: github.com/rakudo/rakudo/commit/40b0169d08 Spec: github.com/perl6/roast/commit/754a45c006
22:44
HelpBot[perl6] colomon: ^ you showed interest in this arg.
colomon woah, spiffy — that notification popped up while I was reading the commit (via e-mail rather than IRC) 22:45
22:46 Guest15764 joined 22:47 astj joined, skids joined 22:48 pmurias left 22:52 Cabanossi left 22:53 Cabanossi joined, ufobat left 22:58 Guest15764 left, dubi0us joined, plicease joined 23:06 literal_ left 23:08 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Added docs for method 'dynamic'. jnthn++' 23:08
travis-ci.org/perl6/doc/builds/248562772 github.com/perl6/doc/compare/d4b10...cc5c4da5c1
23:08 travis-ci left, dubi0us_ joined, travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Fix/Expand Array.append docs 23:08
travis-ci.org/perl6/doc/builds/248568093 github.com/perl6/doc/compare/c2313...a904f6ccec
23:08 travis-ci left, dubi0us left 23:11 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Fixed broken link. AlexDaniel++' 23:11
travis-ci.org/perl6/doc/builds/248563794 github.com/perl6/doc/compare/05cc5...8b7779f92d
23:11 travis-ci left 23:12 dubi0us_ left 23:18 linuksz joined
linuksz i get the following error, when i try to run 'alacryd install': 23:19
===SORRY!===
Attempt to read past end of string heap when reading string
is it a bug in alacryd or in rakudo or in moarvm?
geekosaur that sounds like a MoarVM-level "shouldn't happen" error 23:20
linuksz what should i do? 23:21
HelpBot[perl6] linuksz: what perl6 version are you using? perl6 -v 23:22
linuksz This is Rakudo version 2017.06 built on MoarVM version 2017.06
implementing Perl 6.c.
i am using Arch Linux
23:22 dubi0us joined
Geth Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/bddb349fee 23:25
HelpBot[perl6] tries cloning it
No such method 'install' for invocant of type 'CompUnit::Repository::FileSystem' 23:26
in sub install at /tmp/tmp.ckO0uiV3sp/lib/Alacryd.pm (Alacryd) line 45
linuksz: what code are you executing?
linuksz how do you mean this? 23:28
HelpBot[perl6] linuksz: what are you running that causes the error?
linuksz 'alacryd install' from terminal
HelpBot[perl6] hm. Well, the repo checkout gives me "No such method 'install' for invocant of type 'CompUnit::Repository::FileSystem'" 23:30
23:30 Sound left
HelpBot[perl6] I'm assuming you've used `pacaur -S alacryd 23:30
to install it? 23:31
buggable: eco Alacryd
buggable HelpBot[perl6], Nothing found
HelpBot[perl6] It also doesn't appear to be a published module.
linuksz: it looks to be just a broken module installer. `zef` is what all the cool kids use these days for that purpose 23:32
buggable: eco zef
buggable HelpBot[perl6], zef 'It's like [cpanm] wearing high heels with a tracksuit': github.com/ugexe/zef 2 other matching results: modules.perl6.org/#q=zef
HelpBot[perl6] huggable: zef
huggable HelpBot[perl6], To install Perl 6's zef package manager: cd $(mktemp -d) && git clone github.com/ugexe/zef . && perl6 -Ilib bin/zef install .
23:32 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Revert "Fix/Expand Array.append docs" 23:32
travis-ci.org/perl6/doc/builds/248568321 github.com/perl6/doc/compare/00a90...fc7f06f70d
23:32 travis-ci left
HelpBot[perl6] It only now occured to me what the "high heels with a tracksuit" in zef's description is about :) 23:33
23:33 astj left
linuksz so the mistake is in alacryd? 23:34
timotimo HelpBot[perl6]: can you explain it to me?
is it like "parts are elegant, parts are sloppy"?
HelpBot[perl6] linuksz: looks to be, yeah. Perhaps try contacting the author if you really want to use it?
timotimo: "Yolandi Visser of Die Antwoord is quoted as saying, "It's associated with people who "soop" their cars up and rock gold and shit. Zef is, you're poor but you're fancy. You're poor but you're sexy, you've got style." 23:35
timotimo: en.wikipedia.org/wiki/Zef
timotimo oh!
i *think* i've actually read that
and must have forgotten
tbrowder i just updated my perl 6 r/w tests for the rakudo version right after jnthn updated rakudo and nqp with his IO improvements; see github.com/tbrowder/perl6-read-write-tests 23:36
linuksz annoying, because alacryd is used for many AUR packages. i will contact the author.
HelpBot[perl6] weird. never heard of it 23:39
tbrowder: can't figure out what are the actual tests. Like what code is being benched? 23:40
geekosaur arch strikes again (they broke ghc 8.0.2 recently too)
23:43 TEttinger joined 23:44 linuksz left
tbrowder you have to look at the code, but basically it's a test of P5 and P6 running a series of read tests of ASCII text files of 100-character lines from 10 thousand lines to 100 million lines. I'll improve the README, thanks for comment. 23:45
HelpBot[perl6] tbrowder: doesn't look like a good comparison to me. From what I can see you have utf8 encoding off in perl 5. In Perl 6 you're also using .split instead of using .lines on the handle. And lastly, your timings also include all the test script option parsing where you're using a whole bunch of regex AND I assume startup cost is also factored? 23:46
23:48 astj joined
HelpBot[perl6] tbrowder: a few days ago, jnthn++ was benching reading N lines in Perl 6 vs Perl 5. The difference was like 1.24x, which is way off the 17x-20x mark your results are showing (I think jnthn++ was testing with 1-million line file) 23:49
HelpBot[perl6] leaves to kill criminals in Far Cry 4 23:50
23:53 astj left
tbrowder early on i compared ascii-only vs utf8 for p6 and there was no sig difference so the test hasn't changed; so,as you say, i do need to compare utf8 to utf8 p5 to p6, will change, thnx for looking 23:53
HelpBot[perl6] tbrowder: .split on IO::Handle slurps the entire file into memory. I would bet you'll see an improvement if you switch it to .lines 23:55
tbrowder also, early on we looked at various p6 thngs like split vs. lines vs. slurp and lines and saw no sig difference.
but i'll use what you suggest...stay tuned 23:56
23:58 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Remove trailing whitespace' 23:58
travis-ci.org/perl6/doc/builds/248570510 github.com/perl6/doc/compare/5efc7...9b74f73464
23:58 travis-ci left, travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Document %*SUB-MAIN-OPTS 23:58
travis-ci.org/perl6/doc/builds/248570769 github.com/perl6/doc/compare/559b7...766b72d302
23:58 travis-ci left