00:13 aries_liuxueyang left 00:23 aries_liuxueyang joined
Xliff hoelzro++ 00:31
Nice article. 00:32
Xliff grabs jq
00:32 huggable joined 00:38 gorgonzola left
teatime yar, +1 for uniprops command 00:43
Xliff Hmm.... what package is uniprops in? 00:47
00:49 Actualeyes joined
dalek c: b6ce6ba | coke++ | htmlify.p6:
We aren't using pack, so don't use it
00:49
00:51 mcsnolte joined
[Coke] Xliff: it's core 00:52
... or so I thought. one sec.
er, "uniprop" is core. 00:53
00:54 anomie__ left 00:58 yqt left 01:02 mattp_ joined
teatime [Coke]: we're talking about a CLI tool 01:03
Xliff: article says Unicode::Tussle 01:04
kalkin- who do i have to ping here to get the blessing for a PR adding a module to ecosystem?
hoelzro kalkin-: I can help! 01:05
Xliff: thanks! glad you liked it
kalkin- hoelzro: this would be great! :)
dalek osystem: 3eda843 | (Bahtiar `kalkin-` Gadimov)++ | META.list:
Add Hashids to ecosystem

See github.com/kalkin/perl6-hashids
01:06
osystem: 18e665e | hoelzro++ | META.list:
Merge pull request #213 from kalkin/master

Add Hashids to ecosystem
hoelzro kalkin-++
kalkin- hoelzro: Thank you! :) 01:07
hoelzro happy to be of service!
01:07 anomie__ joined 01:08 AlexDaniel left 01:09 perlawhirl joined
Xliff hoelzro++, now see? THAT is service! ;) 01:13
01:15 xinming left 01:17 xinming joined 01:28 kalkin- left, kalkin-_ joined 01:29 pierre_ joined 01:30 pierre_ left, pierre_ joined 01:34 kalkin-_ is now known as kalkin- 01:35 kent\n left 01:46 ilbot3 left 01:47 ilbot3 joined 01:54 BenGoldberg joined 02:07 pierre_ left 02:10 pierre_ joined, Zoffix joined 02:13 labster left 02:19 pierrot joined 02:26 kid51 left 02:27 pierre_ left 02:31 pierre_ joined 02:41 Actualeyes left 02:42 perlawhirl left 02:44 noganex joined 02:46 noganex_ left 02:56 pierre_ left, pierre_ joined, skink left 02:57 cpage_ left 03:01 |meta left, mcsnolte left 03:10 dj_goku joined 03:16 MadcapJake left 03:18 MadcapJake joined 03:20 ssotka left, MadcapJake left 03:21 jrusso joined 03:22 jrusso is now known as MadcapJake 03:29 jack_rabbit joined 03:34 labster joined 03:41 cpage_ joined 03:43 cpage_ left, cpage_ joined
PerlJam nine++ Just saw your GPW talk. Very nice! 03:53
03:56 Actualeyes joined 03:57 Ben_Goldberg joined, BenGoldberg left 03:58 Ben_Goldberg is now known as BenGoldberg 04:01 Ben_Goldberg joined 04:02 BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 04:22 khw left 04:24 Sgeo left 04:29 Cabanossi left 04:31 Cabanossi joined 04:32 huggable left, huggable joined 04:37 pierre_ left 04:46 pierre_ joined 04:50 pierre_ left 04:52 mohae joined 04:54 mohae_ left 04:56 azawawi joined 04:57 Sgeo joined
azawawi pasteboard.co/1lKrDoSB.png # GTK::Scintilla: Zoom and long lines API :) 04:57
04:59 azawawi left 05:02 anomie__ left, anomie__ joined 05:20 ssotka joined
nine PerlJam: thanks :) 05:25
05:32 domidumont joined 05:33 BenGoldberg left 05:36 domidumont left 05:37 domidumont joined 05:38 kent\n joined, kent\n left, kent\n joined 05:44 Actualeyes left 05:47 pierre_ joined 05:51 pierre_ left 05:52 nadim left, nadim joined 05:59 bjz joined 06:00 Actualeyes joined 06:01 bjz_ left 06:02 silug left 06:07 sno left 06:12 bjz left 06:13 rurban joined 06:17 silug joined 06:18 wamba joined 06:19 ufobat joined 06:20 pierre_ joined 06:23 bjz joined 06:26 domidumont left, firstdayonthejob joined 06:28 labster left 06:29 bjz left 06:32 _mg_ joined 06:33 dwarring left 06:39 abraxxa joined 06:41 ufobat left 06:44 abraxxa left, firstdayonthejob left, abraxxa joined 06:53 abraxxa left 06:54 abraxxa joined 06:55 ufobat joined 07:05 jjido joined 07:06 jjido left, cosimo joined 07:07 cosimo left 07:08 cosimo joined 07:14 bjz joined 07:16 darutoko joined 07:20 g4 joined 07:22 labster joined 07:29 zakharyas joined 07:30 jack_rabbit left 07:34 jack_rabbit joined 07:36 ssotka left 07:37 kanishka joined, pierre_ left 07:44 luiz_lha left, luiz_lha_ joined 07:45 pierre_ joined 07:47 pierre_ left, pierre_ joined 07:51 mr-foobar joined 07:52 sno joined 07:56 dakkar joined 08:01 mr-foobar left 08:03 pierre_ left 08:04 bjz left 08:09 pierre_ joined 08:10 zakharyas left 08:11 pierre_ left, pierre_ joined 08:21 aries_liuxueyang left 08:22 TreyHarr1 left, TreyHarr1 joined 08:24 ocbtec joined, aries_liuxueyang joined 08:26 rurban left 08:28 darutoko left 08:32 huggable left 08:39 luiz_lha_ is now known as luiz_lha 08:44 pierre_ left 08:48 Ven joined 08:53 pierre_ joined 08:58 pierre_ left 09:02 iH2O joined 09:03 iH2O left 09:06 pierre_ joined 09:11 RabidGravy joined 09:18 Ven left
RabidGravy boom 09:20
09:26 Actualeyes left 09:33 TEttinger left 09:44 domidumont joined 09:49 wamba left 09:54 zakharyas joined 09:58 rindolf joined, ocbtec left 10:02 bjz joined 10:03 ocbtec joined 10:09 wamba joined, grondilu joined 10:11 labster left 10:16 anomie__ left
Zoffix .ask TimToady would you have time to offer a ruling on what the default tolerance to is-approx in Test.pm6 should be? Is it relative or absolute, and what value? My ideal choice would be absolute with $*TOLERANCE to match ≅. The specs/docs use absolute at 1e-5. And current impl uses relative at 1e-6. My more detailed plan for rewrite of is-approx: github.com/zoffixznet/debug/blob/m...-rework.md 10:21
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix yoleaux, join #perl6-dev
10:22 pierre_ left 10:29 wamba left
Zoffix .tell TimToady sorry, ≅ uses relative tolerance, not absolute, but my ideal choice would still be to match it. 10:31
yoleaux Zoffix: I'll pass your message to TimToady.
Zoffix That or change it to absolute :P Why is it relative? I thought it was at 1e-15 to get rid of Num fuzziness 10:33
(change it on ≅)
m: say 3e20 ≅ 3e20+100000 10:34
camelia rakudo-moar 33ab86: OUTPUT«True␤»
Zoffix m: say 3e20 ≅ 3e20+1000000
camelia rakudo-moar 33ab86: OUTPUT«False␤»
Zoffix m: say &[≅](”Your mamma so fat”) 10:41
camelia rakudo-moar 33ab86: OUTPUT«True␤»
grondilu (well that's a weird string fill-in) 10:50
Zoffix ≅ should also use <= and not < methinks 10:52
m: my $*TOLERANCE = 0; say 24 ≅ 24
camelia rakudo-moar 33ab86: OUTPUT«False␤»
Zoffix Maybe I'll file a bug report to find out why from Sam why I'm wrong.... 10:53
10:55 azawawi joined
azawawi hi 10:55
Zoffix \o 10:56
11:03 brrt joined
azawawi RabidGravy: ping 11:06
Zoffix: :)
Zoffix: i need menubar wrapped in GTK::Simple (github.com/perl6/gtk-simple/tree/m...TK/Simple) 11:07
pasteboard.co/1lKrDoSB.png # GTK::Scintilla demo should have a menu bar
11:12 kid51 joined 11:14 xinming left, xinming joined 11:16 _mg_ left 11:17 kid511 joined
RabidGravy boom 11:18
11:18 kid51 left
RabidGravy azawawi, the only thing that is preventing me from implementing menus there is that there is just so much to implement 11:21
azawawi link it plz 11:22
RabidGravy developer.gnome.org/gtk3/stable/GtkMenuBar.html 11:26
I haven't made anything yet 11:27
azawawi zetcode.com/gui/gtk2/menusandtoolbars/ ? 11:28
so basically wrap GTK::MenuBar and GTK::Menu and GTK::MenuItem ? 11:30
RabidGravy yeah 11:31
11:31 brrt left
dalek k-simple: 7791648 | azawawi++ | README.md:
Make AppVeyor CI badge work
11:32
11:46 kyrose joined
kyrose Hi, I am new to Perl language (both 5 and 6). I wanted to know, should I learn perl 5 first and then move to perl 6? 11:47
RabidGravy Thinking of using martinfowler.com/apsupp/recurring.pdf as a basis for a high level scheduling thingy, is there any other useful reading on the matter
kyrose, well a lot of the Perl 5 knowledge will be transferrable to Perl 6, but it's not required 11:48
ilmari if you don't already know Perl 5, trying to learn both at the same time could get confusing 11:49
RabidGravy if you're doing it just for more knowledge I would leap in to 6, if you're doing it for more pragmatic reasons (such as work) then I'd start with 5
ilmari like trying to learn e.g. spanish and italian at the same time
kyrose I just wanted to learn for fun. I like the C-syntax style of this high level language, but also wanted to learn perl 6 for production(maybe) 11:50
ilmari in that case I'd go straight for perl 6
11:50 kid511 left
RabidGravy yeah, 6 11:50
kyrose thanks. Ermm, also, is Perl 6 got an official forum and somehow the infamous CPAN? 11:51
ilmari there's modules.perl6.org/ 11:52
RabidGravy well there are a fraction of the number of modules, but modules.perl6.org/
at some point it will be folded into the architecture that underlies CPAN 11:53
11:53 cgfbee left
kyrose Ty. So, how about perl 5, will it stay version 5 forever? The website says 'perl 6 and perl 5 is a different language'? 11:54
RabidGravy yeah, the sub-version will monotonously increase forever
11:54 rindolf left
DrForr It should really be considered 'perl5' version 24, at the moment. 11:54
11:55 xinming left 11:56 bjz left
RabidGravy yeah, it's significantly different to the 5.000m that I first used 11:56
kyrose I see
11:57 skids left
kyrose Oh I just realized travis-ci build for github do support Perl 6. This is very useful. 11:58
RabidGravy yeah, most of the module developers use it
11:59 bjz joined
kyrose I hope perl will be supported more soon. I always see 'perl is dead, perl is ugly, perl is this perl is that', even looking for tutorial :(. And a web dev told me to not use Perl. 12:00
RabidGravy Well Perl is most definitely not dead, it's just not quite as fashionable as some languages 12:01
teatime yeah, that has become the fashionable opinion
12:02 Akagi201 left
teatime but it's so undeserved :( 12:02
DrForr It's fashionable for Python users to slag it for no good reason.
kyrose Yeah true. I tried perl 5 for my sysadmin task, even I'm very new at it, I can do much useful stuff in 2 lines.
RabidGravy that's been true since the late 90s
anyhow, I've got to go out and buy a garden fork as the previous one self destructed on Monday 12:03
toodles
kyrose Bye. Anyway, I'm kyrose, I think I wanna familiarize myself with Perl 6 community. Nice to meet you guys. 12:05
DrForr Check out perl6.org for starters.
kyrose Thanks for the reference. 12:07
12:08 pmurias joined 12:09 cgfbee joined
literal m: my $foo = <foo bar>.SetHash; say $foo.WHAT 12:10
camelia rakudo-moar 725054: OUTPUT«(SetHash)␤»
literal m: my %foo = <foo bar>.SetHash; say %foo.WHAT
camelia rakudo-moar 725054: OUTPUT«(Hash)␤»
literal why is the latter not a SetHash?
jnthn Because assignment is *into* the thing on the left 12:11
So you have a Hash (resulting from `my %foo`) and you're assigning the values from the SetHash into it 12:12
m: my %foo := <foo bar>.SetHash; say %foo.WHAT
camelia rakudo-moar 725054: OUTPUT«(SetHash)␤»
jnthn Binding is what's wanted in this case
literal I was under the impression that the % sigil could be used for many 'hashy' types, not just Hash. Is that incorrect?
jnthn It can, but you need to bind
literal ok, so with assignment @ and % are always Array and Hash ?
jnthn Yes 12:13
literal alright
jnthn Unless you bind something else
Or use `is`
12:13 xinming joined
jnthn m: my %foo is SetHash = <foo bar>; say %foo.WHAT 12:13
camelia rakudo-moar 725054: OUTPUT«Cannot modify an immutable SetHash␤ in block <unit> at /tmp/UGhEW5ZIwo line 1␤␤»
jnthn Ah, but SetHash has not STORE method I guess
12:13 rindolf joined
jnthn So yeah, use the binding thing I mentioned above 12:14
literal yeah
12:16 ocbtec left
El_Che wouldn't be a good idea to add "rakudobrew build zef" to trakudo.org/how-to-get-rakudo/#Insta...akudobrew? Now it only mentions panda 12:16
12:19 pmurias left, pmurias joined 12:26 ZoffixW joined 12:27 azawawi left, ocbtec joined
ZoffixW kyrose, you can use most of Perl 5's modules (metacpan.org/) from Perl 6. See Inline::Perl5 . Talk for the module: www.youtube.com/watch?v=CEs1g94qNs...e=youtu.be 12:28
hugTABTAB.,.. damn you bot :(
kyrose Thanks ZoffixW
timotimo i'm surprised synopsebot6 is still up :P
kyrose allisonrandal.com/2013/03/31/mythb...love-perl/ - Whoa! Perl philosophy makes the devs so different in expressing their thought! 12:30
12:31 huggable joined
ZoffixW Yey.. 10th time the charm it seems. 12:31
huggable, Inline::Perl5
huggable ZoffixW, nothing found
ZoffixW huggable, module Inline::Perl5
huggable ZoffixW, nothing found
ZoffixW Ah, right. I never reimplemented that feature after the time I wiped the server... 12:32
kyrose can I ask. what is huggable? Is that bot command?
ZoffixW kyrose, yes, huggable is a Perl 6 IRC robot 12:33
There's a major bug that prevents it from joining half the time that I'm yet to find time to fix :P
kyrose wait, you're the bot developer?
ZoffixW huggable, Inline::Perl5 :is: Inline::Perl5 lets you use most of Perl 5's CPAN from Perl 6. See modules.perl6.org/repo/Inline::Perl5 and the talk about the module www.youtube.com/watch?v=CEs1g94qNso
huggable ZoffixW, Added Inline::Perl5 as Inline::Perl5 lets you use most of Perl 5's CPAN from Perl 6. See modules.perl6.org/repo/Inline::Perl5 and the talk about the module www.youtube.com/watch?v=CEs1g94qNso
ZoffixW kyrose, I guess :) 12:34
kyrose ZoffixW, cool!
perlpilot buenos dias señors y señoras 12:36
DrForr ?Que tal? 12:38
12:39 kyrose left
perlpilot good this morning so far 12:39
12:45 huf joined 12:47 Sgeo left 12:52 Akagi201 joined 12:55 _mg_ joined, domidumont left, sufrostico joined, ZoffixW left
[Coke] Many eyes make light work. 13:00
13:01 pierre_ joined
grondilu hello. Question : in linear algebra we often see expressions like transpose(A)*M*A. Do you think it's possible to define a ternary operator a*b*c in order to optimize this kind of expression? 13:03
of course a, b and c would have constraints. 13:04
13:04 jack_rabbit left
perlpilot grondilu: Almost all "is it possible" type questions have an answer of "yes" in Perl 6 ;) 13:05
grondilu I'm not sure there is a syntax for ternary operator though 13:06
m: sub ternary:<§ §>($, $, $) {...}
camelia rakudo-moar 725054: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p6LhJIsk7i␤Cannot add tokens of category 'ternary'␤at /tmp/p6LhJIsk7i:1␤------> 3sub ternary:<§ §>7⏏5($, $, $) {...}␤»
timotimo we currently implement the ?? !! with a special grammar rule in the perl6 grammar
grondilu timotimo: yeah that's what I thought
13:07 kanishka left
grondilu though I suppose I could mix the output of a*b with a role used as a constraint for the second multiplication. 13:07
though it'd be pretty ugly, especially since I want the constraint on c depending on a. 13:09
like where c == transpose(a) for instance.
13:09 tbrowder joined
perlpilot grondilu: I think it was brrt that was saying the other day that there wasn't going to be enough pressure to make "PDL in Perl6" because why not just use PDL or NumPy or R or etc. Whatever you're doing ... keep doing it :) 13:10
grondilu truly it's not for linear algebra that I'm considering it, rather for my Clifford module. But the linalg exemple makes things simpler to explain. 13:11
13:11 brrt joined
perlpilot grondilu: for that particular example, it seems like you'd want a binary op on A and M that would do transpose(A)*M*A 13:16
13:20 |meta joined, ZoffixW joined
ZoffixW m: class MyTernaryFalse {}; class MyTernaryTrue { has $.value }; sub infix:<§> { ($^a ~~ MyTernaryFalse) ?? $^b !! ($^a ~~ MyTernaryTrue) ?? $^a.value !! $^a ?? MyTernaryTrue.new(:value($^b)) !! MyTernaryFalse.new }; say 0 § "a" § "b"; say 1 § "a" § "b" 13:21
camelia rakudo-moar ef376d: OUTPUT«b␤a␤»
13:21 skids joined
DrForr I still want to see § as a sigil for sets :) 13:23
ZoffixW .u §
yoleaux U+00A7 SECTION SIGN [Po] (§)
ZoffixW m: 1 ~~ Illegal ?? 2 !! 3; class Illegal {} 13:24
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vPjLothpBE␤Expected a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use a space like ? ?)␤at /tmp/vPjLothpBE:1␤------> 031 ~~ Illegal ??7⏏5 2 !! 3; class…»
ZoffixW ^ LTA error
m: (1 ~~ Illegal) ?? 2 !! 3; class Illegal {}
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/53guuJnmev␤Illegally post-declared type:␤ Illegal used at line 1␤␤»
13:26 kyrose joined
ZoffixW m: wat ?? 2 !! 3; 13:26
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/rz9bTxDv4M␤Expected a term, but found either infix ?? or redundant prefix ?␤ (to suppress this message, please use a space like ? ?)␤at /tmp/rz9bTxDv4M:1␤------> 3wat ??7⏏5 2 !! 3;␤»
ZoffixW m: (wat) ?? 2 !! 3;
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7MWXNvY9ts␤Undeclared routine:␤ wat used at line 1. Did you mean 'WHAT'?␤␤»
kyrose Hi, is this a good way to write simple perl class - pastebin.com/Zu42sb99
grondilu perlpilot: I don't want to introduce an other symbol. I'd like the optimization to be invisible. 13:27
ZoffixW kyrose, that looks good to me
Though, I'd pic FtoF as method name
*CtoF
kyrose ZoffixW: thanks ^_^ 13:28
ZoffixW kyrose, and you ought to make ℃ and ℉ as postfix ops :P 13:29
13:29 yqt joined, bjz_ joined
ZoffixW I had a plan to release a module like that at the back of my mind for awhile 13:29
kyrose ah 13:30
13:30 bjz left, Zero_Dogg left, Zero_Dogg joined
timotimo ℉ ought to give a syntax error immediately 13:30
ZoffixW Why?
timotimo because, ugh, fahrenheit 13:31
please autodefenestrate if you want to use fahrenheit for anything :P
kyrose I'm happy to try to make a module now! ^^
13:32 pmurias left
[Coke] timotimo: hey, some of us are stuck with it. :| 13:32
13:32 Actualeyes joined 13:33 pierrot left
timotimo be the change i want to see in the world! ;) 13:33
ZoffixW m: sub postfix:<℃> ($c) { class :: { method to-f { $c * 9/5 + 32 } }.new }; say 100℃.to-f 13:34
camelia rakudo-moar ef376d: OUTPUT«212␤»
geekosaur thinks both of those should produce Kelvin
DrForr Rankine FTW :) 13:35
kyrose <> <- what is that called? 13:36
ZoffixW m: sub postfix:<℃> ($c) { my $z = class :: {}.new; $z.^add_method('℉', { $c * 9/5 + 32 } ); $z }; say 100℃."℉"()
camelia rakudo-moar ef376d: OUTPUT«212␤»
13:36 gtodd joined
ZoffixW kyrose, wordspace or something like that 13:37
m: say <blah blah blah and more blah>.join: '|'
camelia rakudo-moar ef376d: OUTPUT«blah|blah|blah|and|more|blah␤»
RabidGravy qw
ZoffixW Saves you from typing 'blah', 'blah', 'blah', 'and', 'more', 'blah',
quote words
kyrose ZoffixW, oh you mean like <dog cat chicken> instead of ("dog", "cat", "chicken")? 13:38
ZoffixW right 13:39
kyrose oh, so it's more like a symbol?
and how do you use that compiler XD
*camelia bot
ZoffixW m: code to execute
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zXs7XKu99Z␤Undeclared routines:␤ code used at line 1␤ execute used at line 1␤ to used at line 1. Did you mean 'so', 'tc'?␤␤»
ZoffixW or m: URL to a gist
kyrose m: print "Hello world\n"; 13:40
camelia rakudo-moar ef376d: OUTPUT«Hello world␤»
kyrose oh I see now
Man, I'm such a noob. I need to learn a lot!
ZoffixW kyrose, I feel the same... and I wrote my first program 16 years ago :P
DrForr So do I :) 13:41
Only 16? Wowsers.
kyrose 16 years?! You guys are perl hackers it seems.
RabidGravy I wrote my first program 38 years ago and I still haven't a clue, obviously not Perl though 13:42
DrForr I've done this (not professionally) for about 36 years myself :)
kyrose I just started 3 hours ago. :O
gtodd I am goofing around with feeds and lists/arrays to see how fast they are compared with last time I checked :) 13:43
DrForr (obviously not all Perl, but ... At least the last ~20 years.)
ZoffixW Sheesh, the argument for Fahreinheit over Celcius is so flimsy www.zmescience.com/other/fahrenheit...after-all/ 13:44
kyrose and you guys still loyal to it by being here.
ZoffixW The author obviously never seen a decimal point.
gtodd some of the "tests" (not really) might have been from pre GLR ... so this is now an error perl6 -e 'my @arr := "/usr/share/dict/web2".IO.slurp.lines(:eager); @arr ==> grep({m/<<zygote>>/}) ==> my $word; say $word'
"expected Positional but got Seq"
ZoffixW kyrose, I'm not loyal :) I use it 'cause I like it and I'll be gone the second something better comes along.
gtodd and this works: perl6 -e 'my @arr = "/usr/share/dict/web2".IO.slurp.lines(:eager); @arr ==> grep({m/<<zygote>>/}) ==> my $word; say $word 13:45
13:45 wamba joined
kyrose ZoffixW: :) 13:45
oh oh, I tried this but doesn't work. hold on
tony-o i like celsius, that's one of the few measurements i like from the metric system 13:46
gtodd I'm assuming that why I needed := (vs. = in current perl6) is "something about GLR, just forget this and move on"
13:46 pmurias joined
kyrose m: perl -e 'my $x = 0; while ($x <= 100) { print "The [$x]\n"; $x++}' 13:46
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pCKRwKkOA_␤Two terms in a row␤at /tmp/pCKRwKkOA_:1␤------> 3perl -e7⏏5 'my $x = 0; while ($x <= 100) { print "␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ …»
ZoffixW m: my $x = 0; while ($x <= 100) { print "The [$x]\n"; $x++} 13:47
camelia rakudo-moar ef376d: OUTPUT«The [0]␤The [1]␤The [2]␤The [3]␤The [4]␤The [5]␤The [6]␤The [7]␤The [8]␤The [9]␤The [10]␤The [11]␤The [12]␤The [13]␤The [14]␤The [15]␤The [16]␤The [17]␤The [18]␤The [19]␤The [20]␤The [21]␤The [22]␤The [23]␤Th…»
ZoffixW Seems to work fine for me
kyrose whot, hmm
ZoffixW m: "The [$x]".say for ^100 13:48
camelia rakudo-moar ef376d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/PATZXYY1Dv␤Variable '$x' is not declared␤at /tmp/PATZXYY1Dv:1␤------> 3"The [7⏏5$x]".say for ^100␤»
ZoffixW m: "The [$_]".say for ^100
camelia rakudo-moar ef376d: OUTPUT«The [0]␤The [1]␤The [2]␤The [3]␤The [4]␤The [5]␤The [6]␤The [7]␤The [8]␤The [9]␤The [10]␤The [11]␤The [12]␤The [13]␤The [14]␤The [15]␤The [16]␤The [17]␤The [18]␤The [19]␤The [20]␤The [21]␤The [22]␤The [23]␤Th…»
kyrose wow, there's more than one way to do it.
gtodd anyway the above used to take 44 seconds and now only takes 29 :-) 13:49
ZoffixW That's the Perl moto
timotimo what? for just 100 ints? :o
gtodd and time perl6 -e 'say "/usr/share/dict/web2".IO.slurp.lines(:eager).grep("zygote");' used to take 61 seconds and now only takes 0.87 seconds 13:50
timotimo oh
ZoffixW gtodd, is your rakudo older than two hours?
gtodd heheh
ZoffixW ?
kyrose ZoffixW: yeah, forgot the philosophy of Perl XD
gtodd the old results were from 9 months ago I think
ZoffixW I think jnthn++ pushed a whole bunch of performance fixes 2 hours ago is why I ask
gtodd Zoffix rakudo from about an hour ago 13:51
ZoffixW: I was just taking a walk down memory/performance lane ...
13:51 darutoko joined
gtodd ZoffixW: there was a "naïve benchmark" I'd always try: www.perlmonks.org/?node_id=1099617 13:56
13:58 ptolemarch joined
ZoffixW Calling it naive is giving it too much credit :P 13:59
gtodd ZoffixW: the difference is still large but on my system I think perl5 is around 0.5 second and perl6 is around 20 seconds on a log file with 500k+ lines so massive speed up by perl6
ZoffixW Which perl5 version?
gtodd ZoffixW: well you'd have to write it differently now anyway doesn't ~~ m/ / give an error in perl6 ? 14:00
perl5 is 5.22 I think
yes
ZoffixW m: say 'foo' ~~ m/'f'/
camelia rakudo-moar ef376d: OUTPUT«「f」␤»
DrForr 5.24.0 is current. 14:02
gtodd hrrm yes: as written on the perlmonks node perl6 -n -e 'say $0 if ~~ m/(<<\w**5>>)/' logs.txt gives me an error about terms 14:03
perlpilot "if ~~ m//" doesn't make any sense 14:04
14:04 zakharyas left 14:05 zakharyas joined
gtodd yeah I guess it used to work anyhway I changed it to: if m// 14:05
heheh look away :) perl6 -n -e 'say $/.Str if /(<<\w**5>>)/' logs.txt 14:06
anyway that node is notorious :)
grrr
perlpilot why does the P6 put the word boundaries within the parens, but the P5 puts them outside? 14:09
14:09 zakharyas left 14:11 cdg joined
perlpilot time perl -n -E 'say $1 if /\b(\w{5})\b/;' /usr/share/dict/words >/dev/null --> real0m0.296s 14:12
time perl6 -n -e 'say ~$0 if m/<< (\w**5) >>/;' /usr/share/dict/words >/dev/null --> real0m56.632s
14:13 g4 left
gtodd perlpilot: time perl6 -n -e 'say $/.Str if m/<<\w**5>>/;' /usr/share/dict/web2 .... works without the parens and is faster for me so I don't know :-D 14:19
kyrose I don't know why, but class for perl 6 really make my eye seeing perl code easier. I can track where object and output goes now.
RabidGravy yeah 14:21
gtodd perlpilot: although still 25 seconds versus 0.24
14:24 brrt left 14:25 pierre_ left
kyrose Okay. I gtg. Bye! 14:28
14:28 kyrose left, cosimo left
gtodd perlpilot: anyway I think the word boundary stuff in perl5 is more part of the regex "sub language" ?? with perl6 there is a :P5 modifier for matching using the RE syntax ... it slows things down a bit AFAICT 14:32
14:37 kanishka joined 14:40 cosimo joined 14:41 kyrose joined
kyrose Hi, I see there are Int, Str, but is there Float? Or how to make like 'my Float $e = 90.2; say $e;' 14:43
timotimo we have Num for that
but when you write 90.2 you get a Rat instead 14:44
kyrose oh
thanks
14:45 sena_kun joined
perlpilot kyrose: you really want to use Rat if you can. 14:45
kyrose I'll see what I can do perlpilot 14:46
ZoffixW There's Numeric too, if you don't care what type of number it is
Or you can omit a type entirely. Gradual Typing, baby <3
sena_kun hi, folks. Please, check out new PR to ecosystem. 14:47
ZoffixW perl6.party/post/Perl-6-Types--Made-for-Humans
dalek osystem: 927ec76 | Altai-man++ | META.list:
Add WWW::DuckDuckGo to the ecosystem
osystem: 1b73f40 | (Zoffix Znet)++ | META.list:
Merge pull request #214 from Altai-man/master

Add WWW::DuckDuckGo to the ecosystem
sena_kun thanks.
perlpilot heh, ZoffixW++ you're too fast.
As I was looking at it, the PR changed before my eyes as if by magic ;) 14:48
ZoffixW :)
gregf_ /aws
14:49 wamba left
gregf_ :/ sorry 14:49
kyrose m: my $tenth = 1/10; say $tenth.WHAT; 14:51
camelia rakudo-moar ef376d: OUTPUT«(Rat)␤»
timotimo m: say 0.1e0.WHAT 14:52
camelia rakudo-moar ef376d: OUTPUT«(Num)␤»
14:52 sena_kun left
kyrose weird..my rakudo didn't compile above code with perl -e 14:52
[Coke] jezu, I'm coming up on 40 years here.
ZoffixW m: my $tenth = 1/10; say $tenth.nude;
camelia rakudo-moar ef376d: OUTPUT«(1 10)␤»
timotimo well, yeah, you need perl6 -e instead :)
[Coke] (in time from first program from backscroll) 14:53
kyrose well, yeah, you need perl6 -e instead :), I just realized I use perl5. Thanks Errgh. (annoying when 2 version of perl installed in the same machine) 14:54
ZoffixW kyrose, use camelia via /msg instead of perl6 -e '...'
/msg camelia m: 'blah'
kyrose thanks for that info 14:55
ZoffixW kyrose, for scripts, some folks like to plop `use v6` at the start that cries when you run the script with the wrong perl
kyrose so do i need to include that even for one liner?
RabidGravy and indeed modules
no, it's not required
ZoffixW never uses it 14:56
kyrose ^^
15:02 kurahaupo joined 15:05 kyrose left 15:08 tbrowder left
RabidGravy I think I've broken my brane trying to reconcile martinfowler.com/apsupp/recurring.pdf and rrules from www.rfc-editor.org/rfc/rfc5545.txt 15:12
15:13 pmurias left
ZoffixW that looks scary :) 15:14
172 pages... like a small novel
geekosaur horror story, probably 15:15
15:15 pmurias joined 15:25 _mg_ left 15:28 atje joined, _mg_ joined 15:29 atje left
titsuki Hi all. I have a question. Is the behavior that the submethod doesn't check its name of the arguments a bug ? 15:30
m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(text => "10");
camelia rakudo-moar 4a2929: OUTPUT«hash␤»
15:31 yqt left, Akagi201 left
titsuki I think that it should say "text". 15:31
timotimo hah 15:32
you have a method called "submethod" there
you may want a multi submethod called "BUILD" instead
titsuki sorry 15:33
m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(text => "10"); 15:34
camelia rakudo-moar 4a2929: OUTPUT«hash␤»
titsuki it still says "hash"
Xliff titsuki: You are getting a hash because that's what you are passing.
m: class A { multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:text("10"));
camelia rakudo-moar 4a2929: OUTPUT«hash␤»
Xliff Technically named parameters are hashes. 15:35
timotimo um, only if you slurp it
psch m: class A { multi submethod BUILD(:$text) { "text".say; }; multi submethod BUILD(:%hash) { "hash".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:text("10"));
camelia rakudo-moar 4a2929: OUTPUT«text␤»
psch order of declaration
Xliff psch++
ugexe it because you need to mark them required, named arguments are optional
ZoffixW :o 15:36
I didn't know order of declaration mattered.
psch it does for nameds, and optionals in general i think too
jnthn For tie-breaking, yes, and named parameters only ever act as tie-breakers in multi dispatch
15:36 pmurias left
ZoffixW m: class A { multi submethod BUILD(:%hash!) { "hash".say; }; multi submethod BUILD(:$text!) { "text".say; }; multi submethod BUILD(:@array) { "array".say; }; }; A.new(:10text); 15:36
camelia rakudo-moar 4a2929: OUTPUT«text␤»
ZoffixW ugexe++
psch ah, right, it's actually just for tie-breaking. not related to the parameter type 15:37
titsuki ugexe: I see. Thanks !
Xliff I get confused with the (:(val)name) passing method.
psch m: say :("foo")bar # ?
camelia rakudo-moar 4a2929: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oh_N8OS3HN␤Two terms in a row␤at /tmp/oh_N8OS3HN:1␤------> 3say :("foo")7⏏5bar # ?␤ expecting any of:␤ infix␤ infix stopper␤ postfix␤ statement end␤ …»
psch Xliff: not sure what you mean, no such form exists :) 15:38
Xliff In named parameter passing. Look at Zoffy's last example. Particularly the last statement.
ZoffixW :4242foo
15:38 kaare__ joined
ZoffixW Xliff, if it's digits only, you can write it first and avoid parens 15:38
psch right, but that's explicitly only [ <colon> <numeric> <ident> ]
Xliff ZoffixW, I prefer :foo(4242)
ZoffixW too many parens for my taste :) 15:39
Xliff LOL
I understand that. Really.
15:39 ptolemarch left
ZoffixW m: say :١١١foo 15:39
camelia rakudo-moar 4a2929: OUTPUT«===SORRY!===␤Error encoding ASCII string: could not encode codepoint 1633␤»
Xliff Except I have a higher tolerance. Now anything LISPy.... that is Too Many Parens.
ZoffixW 0.o
psch .u circled ten 15:40