»ö« 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.
zengargoyle hehe, `p6doc -l` shows zef, `p6doc zef` throws 'Could not find zef at line 0 in:' and lists all the places in the $*REPO 'in sub locate-curli-module ...' 00:07
maybe that's the error for 'zef doesn't have any POD'... 00:08
zengargoyle but i think maybe the wrappers get in the way also... most Module show 'No Pod found in ...' 00:15
zengargoyle much LTA 00:16
ack '^=' /opt/rakudobrew/moar-nom/install/share/perl6/site/bin/ 00:22
zengargoyle barfy error does not change if temporarily remove rakudobrew/bin wrapper or site/bin/wrapper, would expect if it is getting all the way into REPO it would say 'No Pod Found in ..../$HASH' like other modules... 00:31
lookatme morning 01:02
Zoffix \o 01:03
ijneb it's 9pm here, but good morning lookatme! 01:04
lookatme It's 9am here
ijneb wow, complete opposites
lookatme :) 01:05
ijneb do you live in China?
lookatme yeah, and I guess maybe you are American . 01:06
ijneb you're indeed correct
SmokeMachine Why nor camelia perl 6? 01:20
Zoffix hm? 01:21
SmokeMachine Sorry didn’t read the back log and didn’t push the “send” on purpose...
Zoffix heh
ijneb Zoffix: are you 6cuts.wordpress.com? 01:22
6guts* 01:23
Zoffix ijneb: nope, jnthn++ is 01:24
ijneb ah 01:25
ryu0 m: [+] 1,2,3 01:35
camelia Potential difficulties:
Useless use of [+] in sink context
at <tmp>:1
------> 3<BOL>7⏏5[+] 1,2,3
Zoffix m: say [+] 1,2,3
camelia 6
ryu0 m: say [+] 1,2,3
camelia 6
ryu0 m: say [-] 1,2,3
camelia -4
ijneb didn't know you could do that 01:36
ryu0 do what?
m: say [/] 1,2,3
camelia 0.166667
ijneb [operator] <list>
ryu0 ijneb: perl6intro.com/#_reduction_operators 01:37
lookatme m: say [*] 1, 2, 3
camelia 6
Zoffix m: sub infix:<♥> { " ♥♥$^a♥$^b♥♥ " }; say [♥] 1, 2, 3
camelia ♥♥ ♥♥1♥2♥♥ ♥3♥♥
ryu0 Ah, so it works with any operatorfitting a given pattern.
Sounds like a compact version of map reduce. 01:38
ijneb m: [x] 1,2,3
camelia Potential difficulties:
Useless use of [x] in sink context
at <tmp>:1
------> 3<BOL>7⏏5[x] 1,2,3
Zoffix m: sub a-callable-works-too { " ♥♥$^a♥$^b♥♥ " }; say [[&a-callable-works-too]] 1, 2, 3
camelia ♥♥ ♥♥1♥2♥♥ ♥3♥♥
Zoffix can't have any whitespace inside the `[]` tho
so no [[&{ $^a + $^b }]]
Zoffix The bot doesn't automatically print values. You need to put `say` or `put` or `print` or `dd` to print stuff 01:39
ijneb m: say [x] 1, 2, 3
camelia 111111
lookatme m: say [[&say]] 1, 2, 3
camelia 12
True3
True
ryu0 m: [lcm] 30, 40, 20 01:41
camelia Potential difficulties:
Useless use of [lcm] in sink context
at <tmp>:1
------> 3<BOL>7⏏5[lcm] 30, 40, 20
ryu0 m: say [lcm] 30, 40, 20
camelia 120
ryu0 m: say [gcd] 30, 40, 20
camelia 10
BenGoldberg m: say [[$_]] 1, 2, 3 for { " ♥♥$^a♥$^b♥♥ " }; 01:42
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say [[$_]]7⏏5 1, 2, 3 for { " ♥♥$^a♥$^b♥♥ " };
expecting any of:
infix
infix stopper
postfix
stateme…
BenGoldberg m: say [[&$_]] 1, 2, 3 for { " ♥♥$^a♥$^b♥♥ " };
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in bracketed infix; couldn't find final ']'
at <tmp>:1
------> 3say [[&7⏏5$_]] 1, 2, 3 for { " ♥♥$^a♥$^b♥♥ " };
Zoffix m: say [[&foo]] 1, 2, 3 for my &foo = { " ♥♥$^a♥$^b♥♥ " }; 01:43
camelia ♥♥ ♥♥1♥2♥♥ ♥3♥♥
Zoffix It doesn't try to take any old thing there as it's formally ambiguous with the array contructor 01:44
ijneb Why can't I do `[|] True, False, False`
Zoffix m: say [|] True, False, False
camelia any(True, False, False)
Zoffix You can...
BenGoldberg I think it's very strange that you can use &foo before 'my &foo'. 01:45
m: say [?|] True, False, False
camelia True
ijneb Thanks, that's what I wanted
Zoffix m: say so [|] True, False, False
camelia True
ijneb there are so many ways to do things in perl6
Zoffix BenGoldberg: it's not really "before" :) It's already known at compile time and gets its value at run time in time. 01:46
Zoffix ijneb: TimToady is the motto! 01:46
TimToady => TIMTOWTDI => There's More Than One Way To Do It
Same as there's more than one way say the same thing in English. 01:47
ijneb I like it
Zoffix :)
Zoffix m: my $x = 42 if 0; say $x 01:47
camelia (Any)
Zoffix BenGoldberg: ^ what do you think of that one? :)
BenGoldberg In perl6, |, &, and ^ create superpositions. They're really great when they're the right tool for the job, but slightly annoying when you'd expected or intended semantics from, say, C or perl5 01:48
Zoffix Yeah, Rakudo carved its own path, instead of following some other languages just because.
You use Junctions much more often than bitwise ops, so it makes sense to use these symbols for them 01:49
BenGoldberg That construct, imho, should produce a warning, since it looks like an old perl5ism for creating a 'state' variable before the state keyword existed.
ijneb I'd like for the perl6 userbase to grow more
It'd be nice to have a lot more modules
Zoffix BenGoldberg: I'd love to shove all the perl5ism warnings up some hole...
BenGoldberg That's right, why did I write superposition instead of junction :/ 01:50
Zoffix All they do is annoy people who are writing proper Rakudo code
m: { say $^LULZ }(42)
camelia 42
Zoffix m: { say $^L }(42)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^L variable; in Perl 6 please use Form module
at <tmp>:1
------> 3{ say $^L7⏏5 }(42)
Zoffix No, I don't care what some other language uses $^L for. I'm writing Rakudo, shush :)
lookatme m: { say $^l }(42); 01:52
camelia 42
BenGoldberg m: no warnings 'perl5'; m: { say $^L }(42)
camelia ===SORRY!===
Don't know how to 'no warnings' just yet
Zoffix ijneb: that's great! Write modules. Write blog posts. Tell people about how awesome the language is. And the userbase will grow :)
ijneb how would I do something like 'a'..'c'
lookatme m: { say $^L }(42);
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of $^L variable; in Perl 6 please use Form module
at <tmp>:1
------> 3{ say $^L7⏏5 }(42);
Zoffix ijneb: just like that
ijneb where it puts a, b, and c into a list
lookatme m: say 'a' ... 'c' 01:53
camelia (a b c)
lookatme just like that
ijneb coooool 01:54
perlawhirl alternatively... 01:55
m: say ('a'...*)[^3]
camelia (a b c)
perlawhirl m: say ('a'...*)[^10]
camelia (a b c d e f g h i j)
Zoffix Those aren't equivalent tho. Range (the 'a'..'c') increments the ord of the chars, while the Sequence op ('a'…'c') increments $previous-char.ord.succ.chr. It don't matter for 'a' and 'c' but with higher chars the sequence actually has infinite loops in it, because the .succ of a char gets normalized into an *earlier* codepoint 01:56
Zoffix And ('a'...*)[^10] can be written as ('a'...*).head: 10. The indexing caches the Seq, so it keeps all the previous values, while .head makes a new Seq with just the first N items. 01:58
Zoffix drops to bed
lookatme :) 02:00
zengargoyle would also think that if any renaming happened it should just be 'Camelia' or 'Camelia Perl' and if some org own trademark or whatnot to avoid someone putting out 'camelia' compiler.... 02:06
zengargoyle »ö« Perl (prounounced "Camelia Perl"). let the non-unicode world burn. 02:10
Zoffix surely the BUTTERFLY char is the one to make non-unicode world burn 02:12
It's even sponsored :)
m: say "\c[BUTTERFLY]"
camelia 🦋
Zoffix and that looks broken in the logs; I guess they're not 100% fixes :S
Zoffix *fixed 02:12
perlawhirl Recently in some code, I realised Int:D² is much slower than Int:D × Int:D
Apart from optimising &infix:<**>, which I'm not smart enough to do... 02:13
would it be worthwhile adding a special case: postfix:<²>(Int:D \a) { a * a }
Zoffix No
ijneb does say truncate the length of the printed rats
Zoffix incredible: nope, same as `print` 02:15
I mean ijneb
perlawhirl Zoffix: I trust your judgment, but for my on education can you expand on the why 02:15
briefly :D 02:16
Zoffix ijneb: it won't keep repeating infinitely though, the number of digits you get is 6 if denominator is less than 100_000 or denominator's length + 1 if it ain't 02:17
ijneb m: say pi;
camelia 3.14159265358979
ijneb does it only have that many digits of pi? 02:18
Zoffix perlawhirl: "premature optimization is the root of all evil". So what that it's faster? What are the chances that'd be the part of the code that's the bottleneck? Just not a common feature to grow the size of CORE.setting and add more maintenance and more bugs and more possible interactions. If a power instead of multiplication is your bottleneck, you'd write multiplication. 02:19
ijneb: yeah
Zoffix my constant tau = 6.28318_53071_79586_476e0; 02:20
my constant pi = 3.14159_26535_89793_238e0;
my constant e = 2.71828_18284_59045_235e0;
It's not even a Rat, but a Num
Why? Faster.
ijneb I see
What's the difference between a Rat & a Num?
Zoffix A Rat is two Ints (numerator and denominator). Num is a native num 02:21
m: say .1 + .2 == .3
camelia True
Zoffix ^ in many (if not most) languages that'd give False, because they use a num and get floating point noise
ijneb interesting 02:22
Zoffix You still get it with Rat's when you produce the final single number (the final division of numerator and denominator), but you're not affected by all the floating point noise while doing the operations, because they're all done on those Ints 02:23
lookatme m: say .1.WHAT 02:24
camelia (Rat)
ijneb so we only use nums for speed? 02:25
Zoffix And memory
BenGoldberg m: dd pi 02:26
camelia 3.14159265358979e0
BenGoldberg m: say pi - 3.1415926535897e0; 02:26
camelia 9.32587340685131e-14
lookatme m: say Num.new(0.1) + Num.new(0.2) == Num.new(0.3);
camelia False
perlawhirl Zoffix: I understand that logic. I hope the '**' op can be optimised later, but i thought it might be an acceptable interim solution given that - as far as exponentiation goes - the power of 2 is the most common 02:27
lookatme m: my $r = Num.new(0.1) + Num.new(0.2); say Num.new(3.00000001) > $x > Num.new(0.2999999);
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3Num.new(0.2); say Num.new(3.00000001) > 7⏏5$x > Num.new(0.2999999);
lookatme m: my $r = Num.new(0.1) + Num.new(0.2); say Num.new(3.00000001) > $r > Num.new(0.2999999);
camelia True
Zoffix .1e0 is a better way to write a Num 02:28
m: say .1e0 + .2e0 === .3e0 02:30
camelia False
ijneb Why?
Zoffix Less typing than Num.new(0.1) and also it gets created at compile type
lookatme They float number defined in IEE754
They float number defined in IEEE754 02:31
Zoffix They float number defined in IEEE754-2008
:)
zengargoyle m: say .1e0 + .2e0 == .3e0
camelia False
perlawhirl Zoffix: FWIW, in my own code, changing `n²` to `n * n` reduced runtime from > 2.5s to < 0.5s... so while the optimisation may be premature, it's not insignificant. 02:32
zengargoyle m: say 1e0/3e0 + 2e0/3e0 == 3e0
camelia False
zengargoyle m: say 1e0/3e0 + 2e0/3e0 == 1e0
camelia True
Zoffix m: my $x = 42.rand.Int; for ^1000_000 { $ = $x² }; say now - INIT now 02:33
MasterDuke m: say .1e0 + .2e0 == .3e0 # the num version
camelia 3.04596777
False
Zoffix m: my $x = 42.rand.Int; for ^1000_000 { $ = $x * $x }; say now - INIT now 02:33
camelia 0.67628618
zengargoyle m: say 1e0/3e0 + 2e0/3e0 == .999999999999999999999999999e0
camelia True
Zoffix m: my $x = 42.rand.Int; for ^1000_000 { $ = $x ** 2 }; say now - INIT now
camelia 2.8471633
lookatme Is there a convenience way check Num's precision error ? 02:34
MasterDuke huh, lag on my client and i just now saw Zoffix's num version fly by
lookatme like |x - y| < 0.00001; 02:34
Zoffix lookatme: use =~= operator
MasterDuke m: say .1e0 + .2e0 =~= .3e0 02:35
camelia True
Zoffix m: say .1e0 + .2e0 ≅ .3e0
camelia True
Zoffix m: my $*TOLERANCE = 1000000; say .1e0 + .2e0 ≅ 42
camelia True
Zoffix :)
ijneb Are rats implemented in most modern languages? 02:36
and used like how they are in perl6
Zoffix used same as in perl6, yeah in a few modern ones (I forget the names; R I think?). All the other langs probably have a library and either use methods or overload the core ops, if the language allows. 02:38
Zoffix &
protium 3.WHAT 02:51
m: 3.WHAT 02:53
camelia ( no output )
protium m: say 3.WHAT 02:54
camelia (Int)
ryu0 Question. Is it possible we could get camelia to join some other channels as well? We could use a perl6 bot in #learnprogramming and #lpmc too. 03:25
ryu0 m: say "Hi" 03:29
camelia Hi 03:29
MasterDuke ryu0: i don't remember exactly who runs camelia, but you could ask moritz or timotimo (though they're in some european timezones) 03:31
ryu0 MasterDuke: i learned they're already in one of the channels. 03:32
MasterDuke another option would be to ask AlexDaniel if evalable6 (essentially a camelia clone) could join those channels
ah, cool 03:33
lookatme A cool idea 03:41
zengargoyle hrm, i don't know... camelia i think is usually HEAD or close. a bot that was some YYYY.MM release might be better outside of #perl6 03:43
BenGoldberg * 03:47
zengargoyle m: say $*PERL.compiler 03:50
camelia rakudo (2017.07.126.g.86.cb.1363.d)
zengargoyle 's is rakudo (2017.07.54.g.640641876) 03:51
bot in the wild should probably track a released version..... 03:52
zengargoyle 's 2¢
moritz ryu0: both on freenode as well? 05:21
ryu0 moritz: yes. 05:47
moritz ryu0: the bot should soon join 06:10
ryu0 ok. 06:16
moritz: thanks
moritz ryu0: did it work? 06:50
lookatme How to use it ? 06:51
moritz m: say 21 * 2 06:52
camelia 42
lookatme Hmm, that's work 06:53
ryu0 moritz: yes. 06:55
dragonX p6: say "abracadabra".match(/ A .* A /, :i, :ex ); 07:38
camelia ()
dragonX where is :ignore adverb ? 07:39
lookatme .match not support :i 07:40
docs.perl6.org/routine/match#class_Str
I'm not see :i in the document 07:41
lookatme dragonX, ^^^ 07:42
p6: say "abracadabra".match(/ :i A .* A /, :ex );
camelia (「abracadabra」 「abracada」 「abraca」 「abra」 「acadabra」 「acada」 「aca」 「adabra」 「ada」 「abra」)
lookatme p6: say "abracadabra".match(m:/ A .* A /, :ex );
moritz lookatme: :ignorecase/:i must be attached directly to the regex
camelia 5===SORRY!5=== Error while compiling <tmp>
Colons may not be used to delimit quoting constructs
at <tmp>:1
------> 3say "abracadabra".match(m:7⏏5/ A .* A /, :ex );
expecting any of:
colon pair (restricted)
lookatme p6: say "abracadabra".match(m:i/ A .* A /, :ex );
camelia Use of uninitialized value 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
Cannot resolve caller match(Str: Nil, :ex); none of these signatu…
moritz lookatme: rx:i/... / or :i on the inside 07:43
lookatme p6: say "abracadabra".match(rx:i/ A .* A /, :ex );
camelia (「abracadabra」 「abracada」 「abraca」 「abra」 「acadabra」 「acada」 「aca」 「adabra」 「ada」 「abra」)
moritz lookatme: by the time match() receives the regex, it's already combiled, and too late to change it to match case-insensitive
lookatme yeah, not `m`, it's `rx`
moritz see also leanpub.com/perl6regex/ :-) 07:43
lookatme m// will automate match with $_ 07:44
stackoverflow.com/questions/453270...synonymous 07:45
_ramix_ Hey guys, I've updated this Perl6 module: github.com/ramiroencinas/perl6-Fil...m-Capacity but when I try to update this module with zef in my desktop environment, zef still using the older version. I tried to uninstall, nuke and install again, but the result is the same. Any ideas? Thanks! 08:55
timotimo _ramix_: might be necessary to change the version in your meta file 08:57
timotimo or perhaps your zef binary and your perl6 binary are from different installations 08:58
m: .say for $*REPO.repo-chain
camelia inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakudo-m-inst-1/share/perl6
CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repos
timotimo you can check where your packages come from with this piece of code
and then perhaps check the modification dates or something
BBL 08:59
RockyBalboa Hello guys! I'm just starting to learn Perl 6 today! :) I have a trivial question. Let's say I have my script file "main.pl". How can I include the module Hello located in "./lib/Hello.pm" ? If I try "use Hello;", it seems "./lib/" in not in my PERL6PATH ? What is the most common idiom to include "./lib" in my lookup path ? Thanks a lot for your help. :)
lookatme seems like I have the same problem _ramix_ , you can clone the repo and manual install it 09:02
jnthn RockyBalboa: One way would be to pass -Ilib to perl6 (before main.pl) 09:06
lookatme RockyBalboa, you can run you main.pl like that: `Perl6 -Ilib ./main.pl` 09:08
_ramix_ <lookatme> I have cloned the repo in a test dir and the files are ok (updated). I'll try to do a manual installation. 09:09
RockyBalboa Thanks you very much! Your solution is working. Is there a way to code that directly in my "main.pl" file ? :) 09:10
By the way, I'am coming from Ruby, I am very impressed with Perl6! :) 09:12
lookatme RockyBalboa, you can add 'use lib "lib";' before use Hello; 09:13
RockyBalboa Perfect! Thanks a lot lookatme. :) 09:14
lookatme you welcome! 09:16
_ramix_ <timotimo> the module version in the meta file is "*" and the output of the code points to c:\rakudo\share\perl6 .\site and .\vendor. The zef location is C:\rakudo\share\perl6\site\bin and this path is included in %PATH%. My environment is Windows 10 with the current rakudostar (2017.07). I detected it the same issue with Windows 7. 09:26
With new installations of rakudostar this doesn´t happen. 09:28
cschwenz i'm having trouble finding this in the docs; in regexes, what is the Perl 6 equivalent for Perl 5's m{ \Q$foo\E }x construct? 09:32
moritz cschwenz: m{ $foo } 09:33
cschwenz really? it doesn't interpolate in regex context?
huh, cool! :-)
moritz if $foo is a string, it's a literal match
if you want it to be interpreted as a regex, you need to do m{ <$foo> } 09:34
lookatme and I think more common way is $($foo) 09:35
lookatme m: my $r = '#hello'; say "#hello" ~~ /<$r>/; 09:36
camelia 5===SORRY!5===
Regex not terminated.
at /home/camelia/EVAL_0:1
------> 3anon regex { #hello}7⏏5<EOL>
Regex not terminated.
at /home/camelia/EVAL_0:1
------> 3anon regex { #hello}7⏏5<EOL>
Malformed regex
at /home/camelia/EV…
lookatme m: my $r = '#hello'; say "#hello" ~~ /$($r)/;
camelia 「#hello」
moritz leanpub.com/perl6regex talks about these things in chapter 4
m: my $x = '.a'; say 'ba' ~~ / $($x)/ 09:37
camelia Nil
moritz looks like a literal match to me
lookatme Oh, it's literal match 09:38
sorry
_ramix_ timotimo lookatme: The problem came with the use of "*" in version field at the META6.json. Fixed!! thanks! 10:54
timotimo aha!
maybe we should warn about that
_ramix_ with debian was easy, but in windows I needed to uninstall rakudostar, delete all files related to zef and install rakudostar again. 10:56
robertle is it possible that "zef install . --force-install" does not actually overwrite the installed version, or perhaps fails to flush the precompiled? I make changes to a module, do this but fail to see my changes when using them from another perl6 program... 11:25
melezhik Hi! Has anybody experienced inormous disk write when installing modules with zef? 11:27
melezhik I am troubleshoting increasing HDD disk write operations, and I "suspect" zef. But I am not sure, probably someone has already seen such a issues ... 11:28
ubastonak I was browsing around old mailing lists and I found this: hpux.connect.org.uk/hppd/hpux/Misc/undump-1.1/ to convert a coredump in an exec. Do you think perl6 could use something akin undump to increase its startup speeds? 11:29
ubastonak apparently emacs reduces it's startup time from 5 secs to .5 secs using a similar mechanism (unexec) 11:31
ilmari glibc wants to remove some of the stuff needed for that: lwn.net/Articles/673724/ 11:44
moritz I don't have any experience with such stuff, but it sounds I'd be better to wait until stuff is much more stable 11:46
_ramix_ timotimo: It would be a good idea 11:47
raschipi m: say 21 * 2 12:12
camelia 42
araraloren evening 12:20
andrzejku hey guys 12:42
raschipi hello andrzejku and araraloren 12:43
andrzejku do you know what happend with perlix project?
mcmillhj Can someone give an example of a use case for 'reversed operators'? 12:44
raschipi If you want to combine them, for example. If you use a reduce operator to divide, it will do it left to right. But if you want to reduce a list right to left, you'll need the reverse of the operator. 12:46
raschipi m: [/] 45,5,9,3; [R/] 45,5,9,3 12:47
camelia Potential difficulties:
Useless use of [/] in sink context
at <tmp>:1
------> 3<BOL>7⏏5[/] 45,5,9,3; [R/] 45,5,9,3
Useless use of [R/] in sink context
at <tmp>:1
------> 3[/] 45,5,9,3; 7⏏5[R/] 45,5,9,3
mcmillhj hmm ok so like foldl versus foldr
raschipi m: say [/] 45,5,9,3; say [R/] 45,5,9,3
camelia 0.333333
0.001481
araraloren m: say 12 / 4; say 4 R/ 12; 12:48
camelia 3
3
[Coke] wonders how bad it would be to actually test doc examples OUTPUT. (security, slowdown of testing...) 12:54
meemoo why oriented programming is at the heart of perl6? 13:43
Anthony_ p6: say 2+2; 13:44
camelia 4
Anthony_ p6: say (1,2,3) <<+>> (4,5,6);
camelia (5 7 9)
moritz disoriented programming is so frustrating
Anthony_ :D
kinda 13:45
p6: say 1..5;
camelia 1..5
Anthony_ p6: say [*]1..5;
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say [*]7⏏051..5;
expecting any of:
infix
infix stopper
postfix
statement end
statement modifier
Anthony_ p6: say [*] 1..5;
camelia 120
meemoo wops i meant to write OOP :D
raschipi meemoo: Did you mean object-oriented? 13:46
Anthony_ Does anyone know how I can "compose" operators?
raschipi Anthony_: Tell us what you really want.
Anthony_ matrix multiplication
raschipi meemoo: Larry likes it. 13:47
Anthony_ I heard that larry wants people to ask what they want instead of how they want to do it 13:47
but doesn't this go just a little bit against the perl mantra?
raschipi Anthony_: There's more than one way to do it, but that doesn't mean you should. 13:48
Anthony_ Yeah
jnthn Just because everything either is or can act like an object in Perl 6 doesn't mean you have to write everything in an OO way.
Anthony_ I am trying to directly do my APL thinking in Perl 6 13:48
but I should rather think in Perl 6 13:49
raschipi Anthony_: You're looking for the X operator. 13:50
Anthony_ really? 13:51
Well then, I'll consult the documentation ;)
raschipi docs.perl6.org/language/operators#infix_X 13:51
Anthony_ thank you
raschipi np
Anthony_ wow 13:52
it also works as a hyper operator!
that's nice :D
"meta" operator
sorry :)
raschipi Test it for the usecase where one of the sides is an scalar, though.
Anthony_ yes, of course 13:53
Just out of curiousity: Can I nest multiple meta operators? 13:56
jnthn Yes, they're just sugar for higher order functions really 13:57
Anthony_ Alright, thank you 13:58
jnthn m: say (1,2,3) ZR- (4, 5, 6)
camelia (3 3 3)
Anthony_ I must admit, that I love the whole operator thing in Perl 6
It allows for highly expressive code
jnthn m: say (1,2,3) Z[R-] (4, 5, 6) # can use square brackets if you want to make interpretation of them really clear (or aren't sure how they'll group :)) 13:59
camelia (3 3 3)
Anthony_ Ah, OK
That's nice
raschipi A Prolog programmer in love with Perl6's operators 14:00
Anthony_ Why Prolog programmer?
You mean you are a Prolog programmer? 14:01
raschipi Sorry, I misunderstood you, then.
Anthony_ You didn't
I like Prolog
but I didn't mention it in here
How do you know? :D
raschipi Sorry, you mentioned APL, not prolog 14:03
Anthony_ But it is right anyway :)
What was your former (or current) language?
Perl 5? 14:04
raschipi bash 14:05
Anthony_ really?
that's cool 14:06
nine robertle: installed distributions are meant to be immutable. The --force option violates this, so it's quite possibleb that it will stop or has stopped working at some point. 14:55
jdv79 did mem usage or leakage change recently? 15:34
i have an app that's eating 3G, or 75%, of my ram. i think thhat's new. 15:35
lizmat jdv79: well, jnthn has been changing a lot of the MoarVM internals, so not unlikely a new leak got introduced 15:39
data points welcome on #moarvm I guess :-)
jdv79 yeah. investigaing. thanks.. 15:41
tony-o jdv79: what app? 15:42
mantovani what is the name of the utility to install perl6 modules ? 15:54
Aaronepower mantovani: zef 15:54
mantovani cool 15:55
thank you very much sir
[Coke] ponders how to figure out what a hanging p6 program is doing. 15:58
mantovani just to be sure, I'm trying to use Net::Curl but I didn't see any documentation, even the t/ directory doesn't have any examaple 15:58
Should I look in a specific place to get documentation ?
lizmat github.com/ugexe/zef 15:59
mantovani not about zef, about Net::Curl
[Coke] mantovani: github.com/azawawi/perl6-net-curl/...r/examples ?
mantovani perfect 16:00
I look into test folder but I didn't see this
[Coke]++
What module do you suggest to write a HTTP client ? 16:03
I see many on modules.perl6.org/#q=HTTP
jdv79 tony-o: essentially its a multithreaded fetcher and parse web tpe thing
uses HTML::Parser::XML, HTTP::Tinyish, JSON::Pretty, OO::Monitors 16:05
mantovani thanks 16:09
tony-o super cool 16:19
is it a scraper?
jdv79 are you talking to me?
tony-o jdv79: yea
jdv79 its more of a aggregator and rules engine type thing
tony-o mantovani: modules.zef.pm/modules/Timothy%20T...TP::Client 16:20
jdv79 its something of a port of some ideas from github.com/huginn/huginn 16:21
tony-o rad 16:22
hannah_montana hello 17:19
skids o/ 17:25
Oh he left. The attention span on these millenials... 17:26
perigrin she came in like a wrecking ball 17:27
[Coke] what is the point of "links.txt" in the perl6 doc repo? 17:58
It's a generated file, pushed to the site (docs.perl6.org/links.txt) and is only referenced in util/test-links.sh
(ah. that file has no documentation, but it's verifying that links exist. 18:02
we don't want to do that against the live site.
[Coke] opens github.com/perl6/doc/issues/1433 18:05
rindolf perigrin: heh 18:13
[Coke] docs needs both JSON::Fast and JSON::Tiny (due to direct and nested deps) 18:29
[Coke] gets a malformed Utf8 error trying to test ===> Testing: IO::Socket::SSL:auth('github:sergot') 18:30
sena_kun [Coke], installs fine for me. 18:32
AH, no. 18:34
It was the wrong one, IO::Socket::Async::SSL.
[Coke] opens github.com/sergot/io-socket-ssl/issues/19 18:35
sena_kun `zef --force install IO::Socket::SSL` is fine for me too.
on gentoo, though.
[Coke] ... sure, force doesn't care if the test fails. :) 18:36
sena_kun [Coke], it should grumble, but install anyway, right? in my case, it wrote "OK" for test phase. Doesn't --force at least comply about failed tests? 18:38
[Coke] ... yes, I can force the install. The test should not be failing 18:40
sena_kun hmmm.
Geth modules.perl6.org: briandfoy++ created pull request #77:
Look for .appveyor.yml and appveyor.yml
18:52
Zoffix * [Coke] wonders how bad it would be to actually test doc examples OUTPUT. 18:53
Geth modules.perl6.org: 7eb6719651 | (brian d foy)++ (committed by Moritz Lenz) | lib/ModulesPerl6/DbBuilder/Dist/Source/GitHub.pm
Look for .appveyor.yml and appveyor.yml

Either will work. www.appveyor.com/docs/build-config...ive-naming
Zoffix [Coke]: FWIW, I wrote at least a few code examples that will have different output each time
Or if they're run on different OSes (like IO::Path stuff)
moritz I think it's a good idea, but only if you whitelist the code examples to run 18:54
(which I guess can be semi-automated by running all of them twice, and comparing the output, and whitelisting those that are reproducible; then you can look at all the others) 18:55
Zoffix lots of new users here lately :) 19:09
[Coke] (code examples) - it would only be for things with OUTPUT: 20:00
[Coke] and we can do something else for things that can change. SAMPLE: ? 20:00
Geth modules.perl6.org: briandfoy++ created pull request #78:
The start of an AppVeyor post processor
20:06
nadim_ hi, it there a way to detect if a variable is set to an enum? i now that the enumeration value itself belongs to the enum class with two attributes but I want to be able to say that the class was created by an enum. 20:27
raschipi Testing it's in the enum isn't enough? 20:30
The docs say there's a " lack of introspectiveness" for enums. Their create a Map when they are declared. 20:32
nadim_: Are you testing a variable set to one of the values of the enum or the variable that was returned when declaring? 20:33
nadim_ my problem is when dumping variables set to enum value, I see the $.key and $.value of it
raschipi And what would you prefer? 20:34
nadim_ here is a Stash dump, in it there are the enumerations, I'd rather not see the inside of them. imgur.com/7u1DLz1 20:35
if enums where derived form a base class I could filter them 20:36
raschipi Yep, I would say that's a bug in the data dumper 20:37
nadim_ ugexe: no it's not
raschipi: no it's not
those attributes are there, we're simply not used to see them
it's an over zealous dump, I need to dampen it ;) 20:38
raschipi Well, it should have an option to hide it, I meant it as an wishlist bug
m: say Bool.HOW ~~ Metamodel::EnumHOW; 20:39
camelia True
raschipi m: say False.HOW ~~ Metamodel::EnumHOW; 20:40
camelia True
nadim_ raschipi: I agree, I actually would like that not be an option but I need to be able to detect it's an enum
raschipi m: say 42.HOW ~~ Metamodel::EnumHOW;
lizmat nadim_: enums do the role Enumeration, does that help ? 20:41
camelia False
nadim_ lizmat: could be 20:42
lizmat m: say False ~~ Enumeration
camelia False
lizmat hmmm
ah, False never smartmatches
m: use nqp; say nqp::istype(False,Enumeration) 20:43
camelia 0
lizmat m: use nqp; say nqp::istype(Bool,Enumeration)
camelia 0
jdv79 so i have a small program that attempts to scrape a little of HN and i think something with the asyncness of it is causing it to produce unstable results
raschipi m: enum Names ( name1 => 1, name2 => 2 ); say name1.HOW ~~ Metamodel::EnumHOW;
camelia True
lizmat m: enum <foo bar>; dd bar ~~ Enumeration 20:44
camelia Bool::True
lizmat nadim_: I guess Bool is the odd one out as it needs to be made during the bootstrap, before role Enumeration even exists
jdv79 yeha, its stable under RAKUDO_MAX_THREADS=1. hmm... 20:45
nadim_ Bool has a type handler in ddt so I think I can handle it
lizmat ok, cool
nadim_ lizmat: you mmay remember that you recommended using a construct like: my $a = something but role. I used that constructbut when I dumped $a I could not see the extra role attributes 20:49
lizmat: so I have been adding support to it. imgur.com/gsFNJKM
lizmat nadim_: cool
MasterDuke jdv79: can you post it somewhere? 20:50
jdv79 how could .grep(.defined).elems be one greater than .elems 20:51
wt....
yeah
nadim_ lizmat: I may have gone over board with my test example though imgur.com/R3DTykY 20:52
Let's seen If I can harness the Enums. thank you for the example above 20:53
jdv79 gist.github.com/anonymous/71d97c3b...393b46a473 20:54
lizmat nadim_: hehe :-)
the world can fit in a singleton, as long as you mix in enough roles :-) 20:55
jdv79 is confused about single and multithread results on that one
raschipi nadim_: sorry for saying it's a bug, I used it as a synonim for 'ticket', didn't mean it's broken.
nadim_ raschipi: absolutely no problems, 1/ someone sees a bug I am not seing is a good thing 2/someone finding something working to be bugggy means that it can be a bit better ;) 20:56
nadim_ a failing test brought my attention to it, so at some point I also considered this to be a bug 20:58
raschipi nadim_: Another thing that could be useful is showing the long name for them, i.e. instead of just 'True', show 'Bool::True' 21:00
jdv79 MasterDuke: any ideas? 21:01
nadim_ the type is shown for all entries so True.Bool 1.Int 'blah'.Str
raschipi I see, thanks 21:02
MasterDuke jdv79: nothing blindingly obvious
jdv79 ok, thanks 21:03
nadim_ raschipi: I now that there is a little problem with the install, Dam it!, but you should try the module ;)
raschipi nadim_: Will do. 21:07
jdv79 huh. if i sleep a couple seconds after the reace block in single threaded the #s match 21:10
nadim_ lizmat: based on what you said a: multi method get_header (Enumeration $e) { '', '.' ~ $e.^name, DDT_FINAL } did the trick perfectly. what I am surprised to see is that when asking for the bas classes the Enumeratioon class is not returned
jdv79 i thought await would block until all promises were complete
*react
lizmat nadim_: yeah, it's a low level mess :-)
nadim_ but it's all good I guess, now stash dumping passed its test again, thanks. imgur.com/fthEDkK 21:11
raschipi nadim_: send me a link
nadim_ best have it hidden :) the good thing is that the class matches even if it not returned
jdv79 huh. i have to await outside the react block 21:12
nadim_ raschipi: I have an install problem, that I hope to fix to night, but here you go blogs.perl.org/users/nadim_khemir/2...on-15.html
nadim_ lizmat: what's $¢? 21:14
raschipi g'night people
nadim_ night
Zoffix night
lizmat nadim_: something deep internal related to matching afaik 21:14
Zoffix current cursor or something like that 21:15
Zoffix m: grammar Meows { token TOP { .+ { say $¢.^mro } } }.parse: "foo" 21:16
camelia ((Meows) (Grammar) (Match) (Capture) (Cool) (Any) (Mu))
jdv79 MasterDuke: yeah, that was it
nadim_ lizmat: there's a lot going on in there 21:26
nadim_ ugexe: I still don't see what the error is at github.com/nkh/P6-Data-Dump-Tree/b....json#L24, There are two modules, one is LayHorizontal and the other one is Horizontal 21:29
Geth modules.perl6.org/master: 4 commits pushed by (brian d foy)++, (Zoffix Znet)++ 21:34
modules.perl6.org: 24ba560706 | (Zoffix Znet)++ (committed using GitHub Web editor) | README.md
[REBUILD] trigger full rebuild
21:35
nadim_ ugexe: I removed both lines and it installs. that's the only difference it takes to make it work. the only place where Horizontal is loaded at line 2 is in LayHorizontal. all tests pass, don't know why zef croaks on that. 21:40
jnthn: aliasing the name of a module via META&.json worked perfectly 21:41
zengargoyle nadim_: do you also have something like constant DDT = .... somewhere in longnamefile? 22:01
nadim_ zengargoyle: no 22:10
zengargoyle ah, maybe i mis-followed things. :) thought the thing was being able to 'use DDT;' and 'DDT.new' when it's really Data::Dumper;:Tree. 22:12
i think i know somebody who *really* wants that sort of thing. 22:14
nadim_ I can do use DDT; I think use Data::Dump::Tree.new looks nicer and if one gets to the point of creating an object rather than just using the subs, then it is serious enough to use the whole name. 22:20
zengargoyle i agree, i'm asking for somebody else who *really* wants the short name.... i think the META trickery will help a bit. 22:27
zengargoyle i'll have to play with the META and constant thing to say "use longname and you can make short work". 22:29
vs just use short and you are in for a world of hurt. 22:30
jnthn m: await quietly Promise.in(0.00001) 22:33
camelia ( no output )
jnthn jdv79: Can just quiet the warning like that if you aren't bothered
jdv79 oh, cool. my p6-fu doesn't include quietly yet. thanks! 22:35
jnthn Oh, I answered on the wrong channel...d'oh :) 22:36
Geth modules.perl6.org: 221988d0f6 | (Zoffix Znet)++ | lib/ModulesPerl6/DbBuilder/Dist/PostProcessor/AppVeyor.pm
[REBUILD] Fix up AppVeyor API URL

Current version gives a 404.
Fix by adding the ?recodsNumber param, per API docs[^1]. This makes the postprocessor successfully fetch AppVeyor requests in local tests.
  [1] www.appveyor.com/docs/api/projects...ct-history
22:54
ugexe .tell nadim_ Data::Dump::Tree::DHTML.pm is not a module name 23:36
or rather, it is your module name
ijneb Does anyone have some cool perl6 one-liners? 23:48
Zoffix messanging bot ain't around
ijneb: yup 23:49
m: sub infix:<⁣> { [+] @_ }; say 2⁣2
camelia 4
ijneb any others lol 23:50
any cool obfuscated perl6 inventions 23:51
Zoffix m: sub infix:<¯\(°_o)/¯> { @_.pick }; say 'Coke' ¯\(°_o)/¯ 'Pepsi';
camelia Coke
Zoffix Man, wtf modules.perl6.org refuses to do a full rebuild :| 23:52
ijneb lmao
Zoffix What's annoying is I think interrupting the build script will cause it delete all the unprocessed modules in the next run. HM