»ö« 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:01 kurahaupo joined 00:03 chartractegg joined 00:15 kurahaupo left, chartractegg left 00:16 kurahaupo joined 00:30 kurahaupo left 00:31 kurahaupo joined 00:34 st_elmo joined, st_elmo left 00:41 kurahaupo left 00:42 kurahaupo joined 00:52 kurahaupo left 00:53 kurahaupo joined 01:02 wamba left 01:07 kurahaupo left 01:09 kurahaupo joined 01:16 pierre_ joined 01:21 kurahaupo left, pierre_ left, kurahaupo joined
buggable New CPAN upload: Net-LibIDN-0.0.2.tar.gz by KAIEPI cpan.metacpan.org/authors/id/K/KA/...0.2.tar.gz 01:21
New CPAN upload: Net-LibIDN2-0.0.3.tar.gz by KAIEPI cpan.metacpan.org/authors/id/K/KA/...0.3.tar.gz
01:28 FROGGS_ left 01:33 kurahaupo left 01:34 kurahaupo joined 01:40 cdg joined 01:41 FROGGS_ joined 01:44 mcmillhj joined 01:45 cdg left, agwind left 01:46 kurahaupo left, ilbot3 left, kurahaupo joined 01:49 mcmillhj left 01:57 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:01 kurahaupo left, kurahaupo joined
Kaiepi how do you get cpan modules to link to your github account 02:06
02:12 kurahaupo left, kurahaupo joined
Kaiepi i have my authors and git linked in META6.json, but cpan still doesn't link to my github 02:15
02:22 kurahaupo left 02:24 kurahaupo joined 02:38 kurahaupo left, kurahaupo joined 02:44 Sgeo joined 02:46 Sgeo__ left 02:49 kurahaupo left 02:50 kurahaupo joined 02:59 eliasr left, kybr left 03:01 kybr joined 03:02 kurahaupo left, kurahaupo joined 03:08 sauvin joined 03:13 kurahaupo left 03:16 pierre joined 03:19 kurahaupo joined 03:20 pierre left 03:27 pharv left 03:34 kurahaupo left, kurahaupo joined 03:39 cdg joined 03:43 cdg left 03:44 mcmillhj joined 03:49 kurahaupo left, kurahaupo joined, mcmillhj left 04:04 kurahaupo left 04:05 kurahaupo joined 04:18 kurahaupo left 04:20 kurahaupo joined 04:24 araraloren joined
araraloren good noon :) 04:26
04:28 entonian joined 04:33 kurahaupo left 04:34 kurahaupo joined, entonian left 04:42 khw left
Kaiepi evening 04:43
04:44 kurahaupo left, kurahaupo joined 04:48 athenot_ joined, athenot left 04:54 troys left 04:59 kurahaupo left, kurahaupo joined 05:00 [particle]1 joined 05:01 cdg joined, [particle] left 05:05 cdg left 05:14 kurahaupo left, kurahaupo joined 05:18 wamba joined 05:22 [particle]1 left 05:26 kurahaupo left 05:27 kurahaupo joined, araraloren left, araraloren joined 05:30 [particle] joined 05:34 raschipi joined 05:35 skids left 05:38 [particle]1 joined 05:39 kurahaupo left 05:40 [particle] left, kurahaupo joined, [particle] joined 05:43 [particle]1 left 05:46 [particle]1 joined, [particle] left 05:48 AlexDaniel left 05:52 kurahaupo left, kurahaupo joined 05:53 raschipi left 06:00 wamba left 06:03 kurahaupo left, kurahaupo joined 06:11 sena_kun joined 06:15 kurahaupo left 06:16 kurahaupo joined 06:26 kurahaupo left 06:27 kurahaupo joined 06:42 kurahaupo left, kurahaupo joined 06:57 kurahaupo left 06:58 jmerelo joined, kurahaupo joined
jmerelo Good morning all 06:59
07:00 pierre joined 07:06 domidumont joined 07:12 domidumont left 07:13 domidumont joined, kurahaupo left 07:14 kurahaupo joined
Geth perl6-pod-to-bigpage: JJ++ created pull request #10:
Eliminates link to non-existing css
07:16
07:27 darutoko joined 07:28 kurahaupo left 07:41 alpha6 left, alpha6 joined 07:45 mcmillhj joined
jmerelo mcmillhj: hi! 07:47
07:49 mcmillhj left
El_Che jmerelo: morning 07:57
08:05 rindolf joined 08:14 domidumont left 08:18 domidumont joined 08:31 cdg joined
jmerelo 4 perl6 questions yesterday in StackOverflow. That's really a record... 08:32
El_Che nice
jmerelo Please drop by stackoverflow.com/questions/tagged/perl6 from time to time and give SO juice to questions and/or answers, to encourage them. Also answer to clarify or help in any way you can. 08:34
El_Che stackoverflow
it must been years since I logged in
08:35 cdg left
Kaiepi i like helping out whenever i can 08:36
El_Che I suspect I've used deffirent aliases
the one I can find has some posts in 2009 and 2011 :) 08:37
jmerelo Kaiepi: great :-)
El_Che lol
I am in the top 10% for perl 08:38
that means that stackoverflow for perl is not very active
Kaiepi i used it for a bit a few years ago but switched aliases when i wanted to move in a different direction for programming
which is why my github's pretty small
jmerelo El_Che: unfortunately, it's not, but there's a good dozen questions every day. Perl6 gets binary questions: one or none per day. Probably yesterday was the day with the most questions. 08:39
El_Che I had lots of solaris code that I even didn't bother to see if it worked on Linux
no point in putting that online
jmerelo Most questions are knowledgeably answered, anyway. But I'd like to see how it scales up. Good SO presence is essential for a healthy community (and to be noticed)
El_Che jmerelo: I'll try to participate on SO more then
Kaiepi it'd be worth it to be able to pick up some things along the way 08:41
El_Che (musings: I am writing something in MS Office in a VM for reasons, and I must say the thesaurus is damn handy compared to LIbreOffice) 08:42
jmerelo El_Che: you must not say that.
El_Che: you *want* to say that.
El_Che: I've mostly stopped using either. Either Google Docs for online collaboration, or emacs and markdown. 08:43
El_Che I wrote my previous thesis on OpenOffice
(LibreOffice wasn't forked yet)
Kaiepi vim, latex when i want stuff to look presentable
jmerelo El_Che: I used WordPerfect for nine, 1994 vintage...
El_Che and the previous one before that, in Star Office
I lived through history :) 08:44
jmerelo s/nine/mine/
El_Che jmerelo: yes, I started my first thesis on Word Perfect
But it had an annoying bug
"é" crashed the thing
then I tried MS word
and 50+ pages crashed the thing
Kaiepi i used to use indesign since word pissed me off so much 08:45
El_Che I think wordperfect for DOS was my first editor
jmerelo El_Che: yep. I remember setting it to auto-save every minute or so.
El_Che at work, I am aggressively pushing for MD for technical documentation 08:46
some people wanted MS word and MS foundation
for a interteam group focussed on devops
you should have heard me laugh :)
we decided to document our stuff in git + md, and the guy that has/want to interact with management can transcribe to whatever he wants :) 08:47
yesterday I missed Perl's TT and Ruby's erb for the first time in my life 08:48
Golang's templating is awful
thanks to puppet I got pretty fluent in Ruby's erb 08:49
(removing puppet from out setup, hence the move)
jmerelo El_Che: :-) 08:50
08:53 Guest28836 joined
Guest28836 is it possible to get the name of a variable? 08:53
araraloren yeah 08:54
m: my $x = 10; say $x.VAR.name;
camelia $x
Guest28836 for $x in [$a,$b,$c] {$x.VAR.name} # but get the a/b/c instead of x 08:56
araraloren m: for $x in [$a,$b,$c] {say $x.VAR.name} 08:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$x' is not declared
at <tmp>:1
------> 3for 7⏏5$x in [$a,$b,$c] {say $x.VAR.name}
araraloren m: for [$a,$b,$c] -> $x {say $x.VAR.name}
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3for [7⏏5$a,$b,$c] -> $x {say $x.VAR.name}
araraloren m: my ($a, $b, $c); for [$a,$b,$c] -> $x {say $x.VAR.name} 08:58
camelia $x
$x
$x
araraloren that's impossible , get a b c
08:58 |oLa| joined
araraloren m: my ($a, $b, $c); for [$a,$b,$c] -> \x {say x.VAR.name} 08:58
camelia <element>
<element>
<element>
lizmat m: my ($a, $b, $c); for $a,$b,$c -> \x {say x.VAR.name} # don't put them in an array 09:01
camelia $a
$b
$c
lizmat m: my ($a, $b, $c); for $a,$b,$c -> $x {say x.VAR.name} # -> $x re-containerizes, so you see the name of the new container 09:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
x used at line 1
lizmat m: my ($a, $b, $c); for $a,$b,$c -> $x {say $x.VAR.name} # -> $x re-containerizes, so you see the name of the new container
camelia $x
$x
$x
araraloren m: my ($a, $b, $c); for [$a,$b,$c] <-> \x {x = 20;}
camelia ( no output )
araraloren m: my ($a, $b, $c); for [$a,$b,$c] <-> \x {x = 20;}; say $a;
camelia (Any)
Guest28836 what about my($a,$b,$c);[$a,$b,$c].fmt($_.VAR.name ~ ": $_", "\n")
lizmat m: my ($a, $b, $c); for $a,$b,$c <-> \x {x = 20;}; say $a; 09:03
camelia 20
araraloren m: my ($a, $b, $c); for ($a,$b,$c) <-> \x {x = 20;}; say $a;
camelia 20
lizmat araraloren: you don't need the parens
araraloren List seems like ok ? so the Array also has some way like re-containerize ?
lizmat m: my ($a, $b, $c); for $a,$b,$c -> \x {x = 20;}; say $a; # nor do you need the <-> if you alias 09:04
camelia 20
lizmat m: my ($a, $b, $c); for $a,$b,$c -> $x {$x = 20;}; say $a # you do need it if you re-containerize
camelia Cannot assign to a readonly variable ($x) or a value
in block <unit> at <tmp> line 1
lizmat m: my ($a, $b, $c); for $a,$b,$c <-> $x {$x = 20;}; say $a # you do need it if you re-containerize
camelia 20
araraloren m: my ($a, $b, $c); my @x := ($a, $b, $c); for @x <-> \x {x = 20;}; say $a; 09:11
camelia 20
araraloren m: my ($a, $b, $c); my @x := ($a, $b, $c); for @x <-> \x {say x.VAR.name; }; 09:12
camelia $a
$b
$c
El_Che AlexDaniel`, Zoffix: idea for your bots. Post new perl6 question in SO to the channel 09:23
Guest28836 how do you format a float to have leading zeros? 3.3.fmt($x) # 03.30 09:24
El_Che Guest28836: docs.perl6.org/routine/sprintf 09:25
Guest28836 that doesn't have leading zeros
m: 3.3.fmt('%.2f') 09:27
camelia ( no output )
Guest28836 m: 3.3.fmt('%.2f').say
camelia 3.30
Guest28836 m: 3.3.fmt('%2.2f').say
camelia 3.30
09:28 pierre left 09:29 pierre joined 09:31 pierre left
Guest28836 m: my $x=3.3;Str(Int($x).fmt('%.2d')) ~ ($x%1).fmt('%.2f').substr(1) 09:37
camelia WARNINGS for <tmp>:
Useless use of "~" in expression "(Int($x).fmt('%.2d')) ~ ($x%1).fmt('%.2f').substr(1)" in sink context (line 1)
Guest28836 m: my $x=3.3;say Str(Int($x).fmt('%.2d')) ~ ($x%1).fmt('%.2f').substr(1) 09:38
camelia 03.30
09:46 aindilis left 09:51 lalitmee joined 09:54 frithnanth joined
titsuki_ m: sprintf("%05.2f",3.3).say 09:54
camelia 03.30
titsuki_ m: 3.3.fmt("%05.2f").say 09:55
camelia 03.30
titsuki_ both fmt and sprintf can make 03.30 09:56
jmerelo For those active in StackOverflow, there are a few unanswered Perl6 questions in the queue stackoverflow.com/unanswered/tagged/perl6 The one on singletons is still interesting. 09:57
frithnanth Hello, I'm trying to install Font::FreeType, but it fails during testing. I wanted to report a bug, but apparently the module is not hosted on github, instead there's a note telling to contact the developers through the #perl6 IRC channel 10:00
The error message is here: pastebin.com/raw/jybfifVA
jmerelo frithnanth: author seems to be p6-pdf, as per the header. And the repo seems to be here github.com/p6-pdf/Font-FreeType-p6 10:01
timotimo ther's nobody here called p6-pdf, though 10:02
.seen dwarring
yoleaux I saw dwarring 1 Jun 2017 21:48Z in #perl6: <dwarring> tbrowder: got it thanks!
timotimo well, that's been a long time
that repo does allow issues, though 10:03
jmerelo timotimo: right, that's an organization, sorry.
10:04 avalenn left, markong joined
timotimo no prob 10:06
frithnanth jmerelo: thanks 10:08
10:08 Guest28836 left
jmerelo frithnanth: no problem. Good luck. 10:11
10:13 frithnanth left 10:14 pierre joined 10:18 frithnanth joined, pierre left 10:38 cdg joined 10:43 cdg left 10:44 vike joined
jmerelo p6: my $start = now; say (<0 1>.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:44
camelia 50191
0.3386439
50143
0.1431063
10:45
jmerelo Why is it much faster to generate and sum Bools than Ints?
p6: my $start = now; const zeroone = <0 1>; say (zeroone.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3my $start = now; const zeroone =7⏏5 <0 1>; say (zeroone.roll xx 100000).…
jmerelo p6: my $start = now; constant zeroone = <0 1>; say (zeroone.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start;
camelia 49830
0.3080233
49915
0.0921131
jmerelo Even slower...
p6: my $start = now; my $zeroone := <0 1>; say ($zeroone.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:48
camelia 49982
0.28330960
50127
0.1403370
jmerelo p6: my $start = now; my $zeroone := (0,1); say ($zeroone.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:49
camelia 50442
0.2558326
49917
0.1427861
jmerelo p6: my $start = now; my @zeroone := (0,1); say (@zeroone.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start;
camelia 49995
0.3317698
49882
0.141525
jmerelo p6: my $start = now; say ((0,1).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:50
camelia 50398
0.2622463
49749
0.13946825
jmerelo p6: my $start = now; say ((1,0).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start;
camelia 49986
0.32676728
49964
0.14559766
jmerelo p6: my $start = now; say ((1,2).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start;
camelia 150219
0.2608219
49980
0.1412020
jmerelo p6: my $start = now; say ((True,False).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:51
camelia 50032
0.4048176
49841
0.1446197
jmerelo p6: my $start = now; my subset ZeroOne of Int where $_ = 0|1; say (ZeroOne.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:52
camelia Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'ZeroOne'. Did you forget a '.new'?
in block <unit> at <tmp> line 1
jmerelo p6: my $start = now; say ((0..1).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 10:57
camelia 49949
0.278208
50128
0.114807
lizmat jmerelo: please make it a perf issue :-) 11:00
jmerelo lizmat: not sure if it's an issue or just the way it is... I'm surprised, that's all. 11:01
lizmat without a ticket it will fall through the cracks :-) 11:02
jmerelo p6: my $start = now; my enum ZeroOne =<0 1>; say (ZeroOne.roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start;
camelia 5===SORRY!5=== Error while compiling <tmp>
An enum must supply an expression using <>, «», or ()
at <tmp>:1
------> 3my $start = now; my enum ZeroOne7⏏5 =<0 1>; say (ZeroOne.roll xx 100000).su
jmerelo lizmat: OK
p6: my $start = now; say ( (0..1).roll xx 100000); say now - $start; $start = now; say (Bool.roll xx 100000); say now - $start; 11:07
camelia (1 0 0 0 1 0 0 1 1 0 0 1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 1 1 ...)
0.1881399
(False True True True True True…
11:07 lalitmee left
jmerelo p6: my $start = now; my $foo= ( (0..1).roll xx 500000); say now - $start; $start = now; my $bar = (Bool.roll xx 500000); say now - $start; 11:07
camelia 0.847878
0.28053366
jmerelo p6: my $start = now; say ( (0..1).roll xx 100000).sum; say now - $start; $start = now; say (Bool.roll xx 100000).sum; say now - $start; 11:09
camelia 50196
0.23688404
50295
0.14079907
jmerelo p6: my $start = now; say ( (0..1).roll xx 500000).sum; say now - $start; $start = now; say (Bool.roll xx 500000).sum; say now - $start;
camelia 249997
1.0334842
250247
0.55719284
timotimo you perhaps want to have a private chat with camelia? 11:10
jmerelo timotimo: :-) I'm done now. 11:11
timotimo i'd bet Bool.roll is an optimized implementation 11:12
jmerelo Looks like it github.com/rakudo/rakudo/blob/98e5...ol.pm6#L23 11:13
timotimo do you know about SourceBaby?
s: Bool, 'roll', \(99)
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/ac5c...ol.pm6#L32
jmerelo timotimo: wow. No, I didn't know.
timotimo interesting.
ah, you were calling it with xx 11:15
benchable6: compare HEAD say sum Bool.roll xx 500000; ||| say sum Bool.roll(500000) 11:16
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, ¦HEAD: «Benchmark: ␤«timed out after 10 seconds»»
timotimo haha
benchable6: compare HEAD say sum Bool.roll xx 100000; ||| say sum Bool.roll(100000)
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/8d36dd8f2c497a1f8e...3d18078eab
timotimo wowza
that's incredible
how can it be almost 10x faster to use xx? 11:17
clearly we should just replace the implementation of Bool.roll(Bool:U: Int) to use xx instead of self.^enum_value_list.roll
lizmat because xx is optimized better than Bool.roll(N) ?
timotimo m: say Bool.^enum_value_list.^name 11:18
camelia List
timotimo Bool.roll(N) directly invokes List.roll
11:19 pierre joined
jmerelo Range seems to be computing the number of elements on the fly github.com/rakudo/rakudo/blob/98e5...ol.pm6#L23 11:19
timotimo i wonde rabout subclassability of Bool
that seems to be the wrong url
benchable6: compare HEAD say sum (0..1).roll(100_000) ||| say sum (0..1).roll xx 100_000 11:21
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/2d26d115d587cb0ba7...1cbe6750b0
jmerelo timotimo: right 11:22
timotimo it is very worth using the roll($n) form here
jmerelo timotimo: I meant this one github.com/rakudo/rakudo/blob/a7ed...e.pm6#L511
timotimo: hum 11:23
11:23 pierre left
timotimo greppable6: Bool\.(roll|pick) 11:23
greppable6 timotimo, 36 lines, 7 modules: gist.github.com/f72b60a28a2b2403ff...b54ec53d2a 11:24
jmerelo timotimo: right. Much faster, still way slower than Bool. 11:26
11:26 FROGGS_ is now known as FROGGS
jmerelo He 11:30
compare HEAD say sum (0..1).roll(100_000) ||| say so Bool.roll xx 100_000
timotimo you typo'd sum in the second half
11:31 lalitmee joined
timotimo and you need to address this bot 11:31
bench: compare HEAD say sum (0..1).roll(100_000) ||| say sum Bool.roll xx 100_000
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/7537f1227802f07c8a...754fd92c7a
jmerelo bench: compare HEAD say sum (0..1).roll(100_000) ||| say sum so Bool.roll xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/fb3e9d86f05cd75a4f...c93538ad5b 11:32
jmerelo he
timotimo huh, i would have expected a difference of about 100_000x faster for the second one
jmerelo Wait, not that 11:33
bench: compare HEAD say sum (0..1).roll(100_000) ||| say sum Bool.roll.Int xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/d598df67eaced4ec02...921388cb97
jmerelo Exactly the opposite
hum 11:34
bench: compare HEAD say (0..1).roll(100_000) ||| say Bool.roll.Int xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/d7e83b3b2d257dc705...0e2265bf90
jmerelo bench: compare HEAD say (0..1).roll(100_000) ||| say +Bool.roll xx 100_000 11:35
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/efe962d984c990892c...774101df9b
jmerelo So, not winning much... 11:36
timotimo saying the resulting list also takes a while
11:39 xtreak joined
jmerelo timotimo: but that would be pretty much the same for both. 11:41
timotimo fair enough, but it can still skew the factor 11:42
if for example saying the list took 100x as long as creating the list, the factor difference would be nearly 0
well, 1
jmerelo bench: compare HEAD (0..1).roll(100_000) ||| +Bool.roll xx 100_000 11:43
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/b6fc4c93755439d2a7...b68617df24
timotimo heh.
jmerelo bench: compare HEAD (0..1).roll(100_000) ||| Bool.roll xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/9a1b5ecef679fda24c...56339f4517
timotimo the first one doesn't do anything at all 11:44
jmerelo bench: compare HEAD my @þ = (0..1).roll(100_000) ||| my @þ = Bool.roll xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/fd4d7cd09df5c6e6d5...71a9fbd33a
jmerelo timotimo: but it does so very fast
timotimo not as fast as doing actually absolutely nothing
bench: compare HEAD (0..1).roll(100_000) ||| Nil 11:45
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/22a57229dc70e3d11e...3694b6520b
jmerelo timotimo: we should strive to optimize doing absolutely nothing :-)
timotimo we've been optimizing doing almost nothing for a while
jmerelo timotimo: :-) 11:46
bench: compare HEAD my @þ = (0..1).roll(100_000) ||| my @þ = +Bool.roll xx 100_000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/b1335c72ed01084052...956d5137df
jmerelo timotimo: Am I understanding this correctly? Is the second form slightly faster than the first? 11:47
timotimo yes
jmerelo timotimo: yay!
bench: compare HEAD my (0..1).roll(100_000) ||| my @þ = +Bool.roll xx 100_000 11:48
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/49b4f1f8369493fe92...e606855000
11:48 frithnanth left
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say (+Bool.roll xx 100_000).sum 11:48
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/54f4c1012925df02aa...cb4e9c16cb
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say (+Bool.roll xx 100_000).sum 11:49
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/41813ad41bba813ed7...22c003710a
jmerelo timotimo: sum is slower??? 11:50
timotimo i'm sorry, slower than what? 11:52
fwiw, if you .sum the result, you don't have to +Bool.roll, since sum will intify for you, it'd just be extra intifying work
jmerelo summing the generated array is slower for the intified bools than for the actual ints 11:53
timotimo: yep, but intifying should make the sum slower by almost half. Anyway, I guess that's not really important. 11:54
timotimo: surprising anyway since they should be the self same type of thing. And it's consistently so... 11:56
bench: compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000).grep( so * ) 11:57
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/1005566ecca425deaf...510b8b6982 11:58
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000) 11:59
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/ee9bc2c580f12f675d...14550232a5
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000).grep
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/08485555766b077d90...a22e793bca
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000).grep( * )
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/7a529bb6174171f5ac...612a9839b6
jmerelo OK, sum is always faster. 12:00
timotimo the result is wrong
m: say +(0..1).roll(100_000).grep( *.so ) 12:01
camelia 49539
jmerelo timotimo: that, too...
timotimo this is how you need to spell it
jmerelo bench: compare HEAD say (0..1).roll(100_000).sum ||| say +(0..1).roll(100_000).grep( *.so )
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/8755e4e59322ed41e0...97b65b0feb
timotimo i'm not sure if a count-only is involved there 12:02
coverable6: say +(0..1).roll(100_000).grep( *.so )
coverable6 timotimo, Seems like you forgot to specify a revision (will use “HEAD” instead of “say”)
timotimo coverable6: HEAD say +(0..1).roll(100_000).grep( *.so )
jmerelo timotimo: that's what I want to do...
coverable6 timotimo, gist.github.com/22b48beec6e5affd5b...b00fa377bd
timotimo, gist.github.com/b7a5d6b95c83a55bb6...29e1db373c 12:03
timotimo can't really see much in there %) 12:04
jmerelo timotimo: not really 12:05
timotimo what is what you want to do?
jmerelo timotimo: count ones 12:06
timotimo count-only is about giving the number of elements in a list without generating the list at all 12:07
only works for iterators of course
bench: compare HEAD say +(0..1).roll(100_000).grep( * ) ||| say (0..1).roll(100_000).grep( * ).elems
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/6e756d0598304e9a8e...9ce0957ffa
timotimo ok, that's about the same, as expected
oh, that's the wrong grep 12:08
bench: compare HEAD say +(0..1).roll(100_000).grep( *.so ) ||| say (0..1).roll(100_000).grep( *.so ).elems
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/4f91560ccd8dcdeb5a...4272919186
jmerelo hum
timotimo cool
well, not cool per se. the first one is faster, and i don't really know why?
bench: compare HEAD say +(0..1).roll(100_000).grep( *.so ) ||| bench: compare HEAD say +(0..1).roll(100_000).race.grep( *.so ) 12:09
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, ¦HEAD: «04===SORRY!04=== Error while compiling /tmp/TLvUdrLQBr␤Undeclared name:␤ HEAD used at line 1␤Undeclared routine:␤ compare used at line 1␤␤»
timotimo bench: compare HEAD say +(0..1).roll(100_000).grep( *.so ) ||| say +(0..1).roll(100_000).race.grep( *.so )
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/b6e937debc456d797e...4b22b84e4d
jmerelo timotimo: why race?
timotimo because parallelism
is rather a bit too slow, though
kind of natural, given it just calls .so on each element, which is very cheap 12:10
compared to managing workers and such
jmerelo timotimo: same as hyper?
timotimo bench: compare HEAD say +(0..1).roll(100_000).race.grep( *.so ) ||| say +(0..1).roll(100_000).race(:20_000batch).grep( *.so )
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/dea3aadd440e955c52...2e75cc8a98
12:10 athenot_ left
timotimo yes, race is hyper but it doesn't guarantee things come out in the same order as they came in 12:10
jmerelo timotimo: which we don't really care... 12:11
timotimo yup
bench: compare HEAD say +(0..1).roll(100_000).race.grep( *.so ) ||| say +(0..1).roll(100_000).race(:50_000batch,:2degree).grep( *.so )
benchable6 timotimo, starting to benchmark the 1 given commit
timotimo, gist.github.com/9804a74997b7ae183b...15f46f71c5
timotimo mhm
i'll go sit in the sun for a little bit :) 12:12
jmerelo timotimo: you do that. Thanks! 12:13
dogbert17 jmerelo: hi, are you by any chance the author of the module Algorithm::Evolutionary::Simple ? 12:15
jmerelo dogbert17: guilty as charged 12:16
dogbert17 jmerelo: have you seen this problem before: gist.github.com/dogbert17/a49bf695...dcbe611827
jmerelo dogbert17: no. Hum. Can you please create an issue? 12:17
dogbert17 jmerelo: sure 12:18
12:18 pierre joined
timotimo looks like it's trying to open an actual file called * 12:21
and not finding one
jmerelo timotimo: I'm checking it out. It's an error in the META6.json.
dogbert17 jmerelo: reported as github.com/JJ/p6-algorithm-evoluti...ple/issues 12:24
hmm, the link above should end with /issues/2
jmerelo dogbert17: don't worry, I got it in the mail. It's fixed now. I'm going to upload it now to CPAN. Thanks a lot, and let me know if I can help you any way with that :-) 12:25
dogbert17 this has to be the fastest fix ever, thx
jmerelo dogbert17: it was an easy one :-) 12:26
dogbert17 I was going to take a look at github.com/MoarVM/MoarVM/issues/822 12:27
jmerelo dogbert17: that would be great, although I have no problem with the newest one. I do have a segfault problem with one of the examples, but I think it's mainly due to not closing threads correctly. 12:28
Off to lunch with family. See you! 12:30
12:30 jmerelo left
buggable New CPAN upload: Algorithm-Evolutionary-Simple-0.0.3.tar.gz by JMERELO cpan.metacpan.org/authors/id/J/JM/...0.3.tar.gz 12:31
Geth ecosystem: a2143fda66 | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list
p6-Algorithm-AhoCorasick was moved to CPAN
12:33
titsuki_ bench: compare HEAD class A { has $.payload; method instance { state $instance = self.bless; }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; ||| class A { my $instance; has $.payload; method instance { unless $instance.defined { $instance = self.bless; }; $instance }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; 12:35
benchable6 titsuki_, starting to benchmark the 1 given commit
titsuki_, gist.github.com/b72d12ad7b8a193007...c95650d6de
titsuki_ bench: compare HEAD my class A { has $.payload; method instance { state $instance = self.bless; }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; ||| my class A { my $instance; has $.payload; method instance { unless $instance.defined { $instance = self.bless; }; $instance }; method modify($a) { $!payload = $a; }; submethod new{!!!} }; A.instance for ^1000000; 12:36
benchable6 titsuki_, starting to benchmark the 1 given commit
titsuki_, gist.github.com/0f9553ea25bb4b6af4...733de3061e
12:40 pierre left
buggable New CPAN upload: Algorithm-AhoCorasick-0.0.8.tar.gz by TITSUKI cpan.metacpan.org/authors/id/T/TI/...0.8.tar.gz 12:41
12:49 lalitmee left 12:50 eroux joined
titsuki_ say 楽土" ~~ /<:letter+:number+[_]>+/ 12:57
m: say 楽土" ~~ /<:letter+:number+[_]>+/
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say 楽土7⏏5" ~~ /<:letter+:number+[_]>+/
expecting any of:
infix
infix stopper
postfix
statement end
titsuki_ m: say "楽土" ~~ /<:letter+:number+[_]>+/
camelia 「楽土」
titsuki_ Does anyone know what ":" does in this case? 12:58
12:59 dalek left
titsuki_ The first "Identifier" example seems incorrect to me: docs.perl6.org/type/Grammar 12:59
MasterDuke titsuki_: it's pair syntax
docs.perl6.org/language/regexes#Un...properties
12:59 p6lert left
titsuki_ MasterDuke: Thanks!!! 12:59
MasterDuke np 13:00
13:00 Util left
Ulti jnthn++ for Concurrent::Trie since I just went looking for a Trie implementation :D 13:01
13:02 espadrine left
Ulti want to compile a regex of all the P6 keywords something like this m(a(x|p|tch)|in) from a trie to build a nano language file since someone asked for one ealier 13:03
titsuki_ m: say "楽土" ~~ /<:alpha>+/ 13:06
camelia 「楽土」
titsuki_ Is "楽土" alphabetic character? I'm confused... 13:07
13:08 eroux left
MasterDuke u: 楽土 13:08
unicodable6 MasterDuke, U+697D <CJK Ideograph-697D> [Lo] (楽)
MasterDuke, U+571F <CJK Ideograph-571F> [Lo] (土)
MasterDuke unidump: 楽土 13:09
unicodable6 MasterDuke, gist.github.com/7e4a703cf4e0547409...b64057ed89 13:10
MasterDuke titsuki_: ^^^, looks like yes
titsuki_ MasterDuke: oh, I'm very surprised. 13:11
13:16 synopsebot left
titsuki_ I understand that; we can read it from left to right and it is letter, so it is alphabetic. 13:23
13:28 xtreak left 13:30 comborico1611 joined
titsuki_ m: say "𞠀" ~~ /<:alpha>+/ # right-to-left one can be alphabetic, so my understanding is incorrect... 13:31
camelia 「𞠀」
13:33 MilkmanDan left 13:34 MilkmanDan joined 13:47 |oLa| left, khw joined 13:56 cdg joined 13:57 cdg left, cdg joined, espadrine joined 13:59 AlexDaniel joined 14:00 MilkmanDan left 14:01 MilkmanDan joined
Geth doc: titsuki++ created pull request #1888:
Fix Identifiers exmple
14:04
doc: 373f72bb25 | (Itsuki Toyota)++ | doc/Type/Grammar.pod6
Fix Identifiers exmple

The previous one calls pre-defined tokens (See: docs.perl6.org/language/regexes#Un...roperties) not user-defined one. That is confusing since this example defines unused tokens as if it used.
doc: 9d20f27dbf | (Itsuki Toyota)++ (committed using GitHub Web editor) | doc/Type/Grammar.pod6
Merge pull request #1888 from titsuki/fix-grammar

Fix Identifiers exmple
14:07 eliasr joined 14:15 MilkmanDan left 14:16 MilkmanDan joined 14:20 comborico1611 left
Geth doc: 0126740628 | cfa++ | 2 files
Add a couple of code words, nbsp fix.
14:26
14:28 cfa joined
cfa morning all 14:28
releasable6: status
releasable6 cfa, Next release in 21 days and ≈4 hours. Blockers: github.com/rakudo/rakudo/issues?q=...%9A%A0%22. Changelog for this release was not started yet
cfa, Details: gist.github.com/e68b9dc987ff939f1e...a6eb56402a
14:37 MasterDuke left
AlexDaniel squashable6: next 14:42
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 5 days and ≈19 hours (2018-04-07 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
14:48 Sgeo_ joined 14:50 Sgeo left 14:58 undersightable6 joined 15:02 zakharyas joined 15:07 SourceBaby left, sergot left, dalek joined, ChanServ sets mode: +v dalek, Geth left, p6lert joined, synopsebot joined, Geth_ joined, ChanServ sets mode: +v synopsebot, ChanServ sets mode: +v Geth_ 15:16 comborico1611 joined 15:17 herby_ joined
herby_ o/ 15:17
15:20 abraxxa joined 15:22 jmerelo joined 15:25 abraxxa left
dogbert17 hello herby 15:29
jmerelo: are you back
jmerelo dogbert17: yep
dogbert17 I'm not having much luck with v0.0.3 15:30
===> Install [FAIL] for Algorithm::Evolutionary::Simple:ver<0.0.3>:auth<github:JJ>: Failed to open file /home/dogbert/.zef/store/Algorithm-Evolutionary-Simple-0.0.3.tar.gz/Algorithm-Evolutionary-Simple-0.0.3/resources/examples/*: No such file or directory
jmerelo Sorry to hear that
I guess you can just clone the repo. That should work... 15:31
But I'll check that again.
dogbert17 thx, perhaps something wasn't commited
jmerelo I'm using mi6 and it looks like it does less things automatically than I thought it did...
hum 15:32
No, it's a META.json bug.
dogbert17 uh oh 15:34
15:35 Kaiepi left, Kaypie joined
jmerelo I mean, it's my fault, I simply thought that META.json would understand globs. It does not, so it's trying to extract the ' 15:37
*' file from the tar. I have uploaded a new version, it should be ready in a little while. 15:38
dogbert17: thanks again
dogbert17 cool, many thanks
jmerelo dogbert17: Thanks to you. Let me now if there's any problem with this new one...
15:39 abraxxa joined
dogbert17 jmerelo: will do, thx again 15:40
buggable New CPAN upload: Algorithm-Evolutionary-Simple-0.0.3.1.tar.gz by JMERELO cpan.metacpan.org/authors/id/J/JM/...3.1.tar.gz 15:41
15:51 araraloren left 16:02 abraxxa left 16:08 wamba joined 16:09 cfa left 16:23 pierre joined 16:32 dct joined 16:35 cognominal left, natrys joined 16:36 cognominal joined, comborico1611 left 16:44 sergot joined 16:51 cdg left 16:52 cdg joined 16:56 cdg left 17:04 zakharyas left 17:09 darutoko left, darutoko joined
jmerelo compare HEAD (^16).pick(2).sort x 10000 ||| (^16).roll(2).sort x 10000 17:11
bench: compare HEAD (^16).pick(2).sort x 10000 ||| (^16).roll(2).sort x 10000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/d42684ba13b4c54d1b...0eee7816f3
17:11 shadowpaste left
AlexDaniel jmerelo: did you mean xx ? 17:13
jmerelo bench: compare HEAD (my $one = 16.rand.Int; my $two = (16-$one).rand.Int) xx 10000 ||| (^16).roll(2).sort xx 10000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/0970899f8a510eabd7...4fec24fa75
jmerelo AlexDaniel: right
bench: compare HEAD (^16).pick(2).sort xx 10000 ||| (^16).roll(2).sort xx 10000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/2396cdfda9e8a6dc7c...a29ac38084 17:14
jmerelo bench: compare HEAD (my $one = 16.rand.Int; my $two = (16-$one).rand.Int) xx 50000 ||| (^16).pick(2).sort xx 50000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, ¦HEAD: «Benchmark: ␤«timed out after 10 seconds»»
AlexDaniel xD 17:15
17:15 shadowpaste joined
AlexDaniel fwiw benchable6 really needs some love 17:15
bench: compare HEAD (my $one = 16.rand.Int; my $two = (16-$one).rand.Int) xx 25000 ||| (^16).pick(2).sort xx 25000
benchable6 AlexDaniel, starting to benchmark the 1 given commit
AlexDaniel, gist.github.com/cc73341d08f572b67b...0ad601ce81
jmerelo bench: compare HEAD my $len = 64; (my $one = $len.rand.Int; my $two = ($len-$one).rand.Int) xx 25000 ||| (^$len).pick(2).sort xx 25000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, ¦HEAD: «04===SORRY!04=== Error while compiling /tmp/V5MBZ_mIJK␤Variable '$len' is not declared␤at /tmp/V5MBZ_mIJK:1␤------> 03.rand.Int) xx 25000 } ,1␉ => sub { (^08⏏04$len).pick(2).sort xx 25000 } ; my $b = ␤»
AlexDaniel oh actually these two snippets were a bit different 17:16
jmerelo bench: compare HEAD (my $one = 64.rand.Int; my $two = (64-$one).rand.Int) xx 25000 ||| (^64).pick(2).sort xx 25000
benchable6 jmerelo, starting to benchmark the 1 given commit
jmerelo, gist.github.com/8aeab0492da0fa472b...704ead29b5
AlexDaniel jmerelo: by the way, there's #whateverable channel specifically for bot abuse :)
17:17 pierre left
jmerelo AlexDaniel: never go to bed withouth learning a new thing... 17:17
AlexDaniel: I'm benchmarking this thing github.com/JJ/perl6eo/blob/master/xover.p6 17:18
But it's unbelievably slow. Slower than the slowest language I've checked so far. xover is an operation that is done in evolutionary algorithms pretty routinely. 17:19
I have tried to speed up every single bit: the random generation of the crossover point, the copying from one "chromosome" to another. Still very slow.
It's almost 100 times as slow as Perl, for instance, and scaling is much better for Perl. 17:20
AlexDaniel jmerelo: I can play with it, but note that tickets like this work pretty well: github.com/rakudo/rakudo/issues/1667
(sometimes) 17:21
especially if you have something to compare with
like the same thing written in ruby or python or whatever 17:22
17:22 dct left 17:25 pierre joined 17:26 dct joined 17:30 pierre left
jmerelo AlexDaniel: Done. I've added a test in C++, which is actually one of the slowest. Octave, for instance, does not degrade with size. Perl is much faster than C++ 17:31
17:32 zakharyas joined
jmerelo BTW, someone take a look at github.com/perl6/perl6-pod-to-bigpage/pull/10 I can accept it, but I don't want to break anything there... There are a bunch of improvements, addressing the issues I've included there. 17:33
There are two main improvements re: docs there. One, add a page title to the big-xhtml page, second, eliminate a link to a non-existent CSS file. 17:34
AlexDaniel maybe wait for a response from @gfldex :)
jmerelo AlexDaniel: OK 17:35
AlexDaniel jmerelo: FWIW it would be better if you included some scripting language in your benchmark
because trying to get it as fast as C++ version is difficult 17:36
the timing I mean
17:38 pierre joined 17:39 dct left
jmerelo AlexDaniel: in this case, C++ is quite slow. Perl is ten times as fast. 17:41
AlexDaniel compare it to perl5 then!
xD
heh 17:42
either way comparing to c++ is not very convincing :)
jmerelo AlexDaniel: Slowest in this benchmark is Perl6, followed by Scala, then C++
17:42 xinming joined, dct joined
jmerelo AlexDaniel: Perl, PHP, fastest 17:43
17:44 bwisti joined
jmerelo AlexDaniel: uploaded data to GitHub and @-ed you... Point is, anyway, if there's a way to make it faster. I'll try strings now. 17:45
17:45 xinming_ left 17:47 zakharyas left 17:50 dct left
jmerelo AlexDaniel: Using strings is even slower... 17:51
17:53 dct joined
AlexDaniel jmerelo: so there's no perl5-bitvector? 17:53
jmerelo AlexDaniel: There's no "bit" there, no explicit true or false. 17:55
AlexDaniel but you can do it with ints right? 17:56
jmerelo AlexDaniel: yep, or strings. Strings are more convenient, and I seem to remember they are fasters.
s/fasters/faster/
timotimo jmerelo: how does performance change when you use .skip($start).head($this-len) instead of the [$a..$b] form? 18:12
also, any reason your chromosome 1, 2, and x arrays aren't native int arrays? 18:13
i can try it myself i guess 18:15
18:17 dct left
timotimo it's noticably faster, but not like a breakthrough 18:18
with skip/head i mean
jmerelo timotimo: I'll have to try both those things. Thanks 18:19
I'm writing this paper for a workshop. Anyone wants to join, just make whatever modification and add him/herself as author github.com/JJ/2016-ea-languages-wc...-perls.Rnw 18:20
I do open science, so all and everyone are welcome.
But I'm leaving now. See you!
timotimo making them native makes it loads slower
both kinds
18:20 jmerelo left 18:30 Kaypie left 18:31 darutoko left 18:34 [Sno] joined 18:45 domidumont left 19:03 cdg joined 19:27 wamba left 19:33 irco joined 19:46 natrys left, natrys joined 19:55 spider-mario left 19:57 spider-mario joined 19:59 ctilmes joined 20:04 ctilmes left, captain-adequate joined 20:09 aindilis joined 20:10 dct joined 20:14 khisanth_ left
Altreus hello p6 pals 20:23
Can someone point me to why one might call a method with : instead of ()?
AlexDaniel Altreus: simply if you don't like () 20:27
a.b(c.d(…)) vs a.b: c.d: … 20:28
depending on the situation the version without parens may be easier to read
Altreus oh ok
it seems random here github.com/maros/oarm-p6/blob/mast...rm.pm6#L21
AlexDaniel yeah, inconsistent 20:29
Altreus: basically, you can also call subs with () or without
same deal
foo(bar(…)) vs foo bar … 20:30
Altreus that seems varied! 20:31
I didn't know I could omit all of it 🤔 20:32
20:34 dct left
masak I find I use the colon very rarely in that case 20:36
I also don't use the "indirect object" colon
but that's just me; YMMV
the first kind of colon is kind of like the `$` in Haskell: it can reduce the need for parentheses buildup, thereby also lessening the pressure to keep a "mental stack" of things 20:37
20:37 khisanth_ joined
El_Che let's explain perl 6 sugar complexity by pointing to haskell. Good plan :) 20:39
masak actually, syntactically, Haskell is quite OK 20:41
lizmat m: say "foo" # say() is a sub like any other :-) 20:42
camelia foo
masak and the definition of `$` in the Haskell setting is beautiful too:
f $ g = f g
that's... poetry :)
(the missing piece of that puzzle is that in Haskell, function application binds tigher than operators) 20:43
20:45 natrys left 20:46 eliasr left
masak Altreus: I think the interesting point for a language designer is that you can have subcall listops (`say "foo"`, like Perl 5 and Perl 6) or the ability to refer to subs without calling them (like Python and JavaScript), but you can't have both 20:56
jnthn fwiw, I mostly use the : form of method calls when I follow it with a bloc 20:57
*block
$lock.protect: { ...lots of lines here... }
It saves a ) *and* a ; in this case :) 20:58
Altreus that looks smart
El_Che that's indeed nice
Altreus balancing closing parens that are only surrounding braces in perl5 is a minor pain indeed
El_Che very declarative 20:59
Altreus masak: yes, that makes sense. I do separate those languages into those buckets, mentally
masak one of the intended uses of "statement macros" is to eliminate that colon so that user-declared statements with xblocks can be on an equal footing with built-in statements with xblocks 21:00
21:00 Kaiepi joined
buggable New CPAN upload: PDF-Class-0.1.2.tar.gz by WARRINGD cpan.metacpan.org/authors/id/W/WA/...1.2.tar.gz 21:11
21:22 robertle_ left 21:27 dct joined
Altreus sorry to bug so much but can someone weigh in on whether this method is strictly necessary, or is it entirely to allow for the translation of hash keys in the end user code to oarm_* names of the member vars in the HOW class? 21:27
github.com/maros/oarm-p6/blob/mast...e.pm6#L170 21:28
21:29 sena_kun left
Altreus In fact, does anyone have more examples of code that fiddles with the HOW so I can sort of cross-reference them and gain more insight? 21:29
21:33 dct left
timotimo huh, why does it call .STR on the $1; i don't think that would work? 21:39
Altreus: it looks like it just goes through all attributes the class has and assigns values from the %def hash into it. if some attribute is required but doesn't have an entry in the %def hash, it'll complain, and if something remains in %def by the end it will also complain 21:40
22:00 rindolf left 22:04 Sgeo joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/03/31/...-released/ 22:05
22:07 Sgeo_ left
El_Che lizmat: you're evil :) 22:18
lizmat *blush* :-)
AlexDaniel this one is early :) 22:20
22:20 gtodd joined
El_Che AlexDaniel: not in our part of the world :) 22:20
lizmat yeah, I think it's too obvious that Array.grab and fails-like are mere fabrications :-)
AlexDaniel El_Che: I mean compared to previous weeklies 22:21
gtodd stackoverflow.com/a/49475649/2019415 <-- Jonathan's suggested solution doesn't work for me
timotimo gtodd: are oyu using the REPL?
gtodd ohoh ... could be unicode cutg and paste thingies too 22:22
timotimo m: constant \term:<⊤> = True; say ⊤; # True
camelia True
gtodd timotimo: yes ... but all on one line
timotimo ah!
well, the REPL is very bad at defining stuff
gtodd m: say "⊤" ~~ /<.ident>/'; # Nil
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say "⊤" ~~ /<.ident>/7⏏5'; # Nil
expecting any of:
infix
infix stopper
postfix
statement end
st…
timotimo i think putting a grammar-changing definition and its usage on one line does work?
that's a ' too many
lizmat El_Che: it's also on FaceBook now: www.facebook.com/groups/perl6/perm...906736091/ 22:23
gtodd didn't compile as a script either ... possibie unicode char crap
timotimo Edits must be at least 6 characters; is there something else to improve in this post?
...
gtodd m: constant \term:<⊤> = True;say "⊤" ~~ /<.ident>/'; 22:24
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3t \term:<⊤> = True;say "⊤" ~~ /<.ident>/7⏏5';
expecting any of:
infix
infix stopper
postfix
statement e…
timotimo oh, you misunderstand
defining the constant will not change what the ident rule matches
AlexDaniel .tell MasterDuke fwiw github.com/perl6/atom-language-perl6/issues/66
yoleaux AlexDaniel: I'll pass your message to MasterDuke.
lizmat gets some sleep
gtodd timotimo: oops :-) that was not in the test I did locally :-D
timotimo the first piece of code is just to show that the T character you have there is not valid as an identifier 22:25
gtodd m: constant \term:<⊤> = True; say "⊤" ~~ /<.ident>/;
camelia Nil
timotimo because the <ident> rule you get for your own grammars just matches what perl6 uses to decide what is valid
gtodd ah ok
m: constant \term:<⊤> = True; say ⊤ ; 22:26
camelia True
AlexDaniel April Squashathon in 2023 is going to be on April 1st 22:29
and we missed one in 2017 22:31
gtodd timotimo: actually it seems to be the "False" term ⊥ that breaks things ...
don't know why ... oh well
make the multi subs in the example and then do: 22:33
constant \term:<⊤> = True;
constant \term:<⊥> = False;
say ((⟂ ⇒ ¬(⟂ ∨ ⊤)) ∧ (⟂ ∨ ⊤));
for the bork! :-)
say ((False ⇒ ¬(False ∨ ⊤)) ∧ (False ∨ ⊤)); # works fine though ... so I don't know 22:34
Altreus Surely there's an easier way of taking a hash and assigning it to class attributes
:\
timotimo there is 22:35
making a custom "new" method that passes an altered hash to self.bless ought to do it
though you'd still want to iterate over the attributes the class has, instead of just putting aorm_ in front of every hash entry's key
Altreus I do observe that these are being assigned to class variables 22:36
Is that why you can't do something simple akin to a constructor?
timotimo oh, they are?
gtodd: i copypasted the reverse-T symbol from the definition line into the usage line and now it works :|
gtodd ahah 22:37
timotimo m: say "⟂".&uniname
camelia PERPENDICULAR
timotimo m: say "⊥".&uniname
camelia UP TACK
timotimo that's utterly fantastic 22:38
gtodd jeez
I wish I had better eyesight :-D
I guess .uniname will help 22:39
errm .&uniname ... hmrrrm
timotimo there isn't a single difference in the font my terminal uses
"blah".&foo is just short for foo "blah" 22:40
22:42 Kaypie joined, Kaiepi left 22:43 comborico1611 joined 22:49 khw left
Altreus have I misunderstood? None of those HOW things in that Oarm code actually constructe an object does it? It just messes about with the metaclass of any class that invokes it through the trait mod, right? 22:51
So that TableHOW has two class attributes and that oarm_init_table just sets them
timotimo i might have misread, let me at the code again ... 22:53
oh, wait, i didn't even see the code with the trait_mod 22:54
22:56 Kaypie left
timotimo i'm not actually sure the code is really sane 22:56
m: class Foobar {}; class Barbaz {}; say Foobar.HOW.WHERE; say Barbaz.HOW.WHERE;
camelia 139997404411096
139997404473512
timotimo oh, ok, they really are different instances 22:57
22:57 Kaypie joined
timotimo ah, yes, it really does add class attributes 22:57
Altreus Am I looking at a thing worth learning from? :D 23:00
timotimo oh, it's a fine thing, i just hadn't read it right the first time 23:01
i have a module that creates a new class at run-time, but it doesn't change HOWs around
it just uses a regular HOW
Altreus is that on the internet somewhere too? :) 23:02
timotimo oh, of course
buggable: eco ADT
buggable timotimo, ADT 'Algebraic Data Types inspired by Haskell.': github.com/timo/ADT
Altreus thanks very much :) 23:05
I'm going to bed now
timotimo YW
good night!
Altreus night :)
23:16 ZofBot joined, ChanServ sets mode: +v ZofBot 23:18 markong left 23:19 cognominal left 23:22 cdg left 23:27 [Sno] left 23:34 SourceBaby joined, ChanServ sets mode: +v SourceBaby 23:37 dct joined 23:50 dct left 23:53 dct joined 23:56 [Sno] joined