»ö« 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.
dalek c: 1c5f8fb | gfldex++ | util/list-missing-methods.p6:
handle enums
00:06
00:10 wamba left 00:15 pierre_ joined 00:19 mcmillhj joined 00:21 adamfish joined 00:24 adamfish left, mcmillhj left 00:28 kurahaupo left 00:39 mcmillhj joined 00:43 mcmillhj left 00:50 mcmillhj joined 00:57 mcmillhj left 01:02 mcmillhj joined 01:03 canopus left 01:06 labster left 01:07 mcmillhj left 01:09 canopus joined 01:16 zacts left, pierre_ left 01:21 mcmillhj joined
gfldex lolibloggedagain! gfldex.wordpress.com/2016/10/03/be...e-channel/ 01:24
01:24 pierre_ joined 01:26 mcmillhj left 01:28 Sqirrel left 01:29 pierre_ left 01:44 grondilu left 01:45 ilbot3 left 01:47 ilbot3 joined 01:50 mcmillhj joined 01:52 Sqirrel joined 01:54 mcmillhj left
SmokeMachine____ What is the difference between ..., !!!, ??? ? 02:01
m: role A {method a{...}}; class B does A {} 02:04
camelia rakudo-moar 3a6cd8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'a' must be implemented by B because it is required by a role␤at <tmp>:1␤»
SmokeMachine____ m: role A {method a{!!!}}; class B does A {}
camelia rakudo-moar 3a6cd8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'a' must be implemented by B because it is required by a role␤at <tmp>:1␤»
SmokeMachine____ m: role A {method a{???}}; class B does A {}
camelia rakudo-moar 3a6cd8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'a' must be implemented by B because it is required by a role␤at <tmp>:1␤»
geekosaur ... is fail, !!! is die, ??? is warn 02:05
TimToady but they're all officially "stubs"
02:07 pierre_ joined
SmokeMachine____ camelia: gave the same error for the all 3... 02:07
geekosaur yes, because you didn't test it
you got the same compile time error for composing the method; these are runtime things when you *call* a, not when you fail to compose it because you never defined it in the class 02:08
SmokeMachine____ geekosaur: but ??? Shouldn't give a warning?
So on that usage, all 3 are the same? 02:09
geekosaur you didn't use it, it never got invoked
again, these are *runtime* failures. you mis-declared the class and got a *compile* time error
un related
m: role A {method a{;}}; class b does A {} 02:10
camelia ( no output )
geekosaur er
ok, right, it detects that specially when composing roles, but it still gave you the compile time error instead. which is kinda magic
and unrelated to the runtime behavior
TimToady in a role, any stub means "must be declared in the class"
SmokeMachine____ TimToady: ok! Thanks! 02:11
geekosaur: thank you too!
geekosaur sadly the magic does make it somewhat confusing because ou might expect different behavior at compile time. but it's not clear what a compile time warning, for eample, would accomplish 02:12
SmokeMachine____ geekosaur: yes... in the case that I was trying to use it, I was wanting to ??? Give me a compile time warning... 02:13
geekosaur that could probably be done, but not clear that actually makes sense
SmokeMachine____ Wouldn't that makes sense? 02:14
*make
My case is: I have a role that has 2 "load" methods, 1 with the signature (::?CLASS:U: $id) and the other one with the signature: (::?CLASS:D) the first one instanciate a object of ::?CLASS (::?CLASS.new: :$id) and call the second one... 02:18
But I'd like to give some options to the class that will does the role: 02:19
02:19 isBEKaml joined
SmokeMachine____ I forgot to say: the second one is a stub! 02:20
1st option, write a "defined" load function
Or write the "undefined" load function that does not use the defined version... 02:21
But if I do the 2nd option, it gives me a compile time error... because the defined version is a stub... 02:22
But it will not be used... so if it were a warning that would be ok... 02:23
This is the role that I'm writing (not done yet): github.com/FCO/JSON-API/blob/maste...source.pm6
Any idea to do what I want? 02:25
02:26 kaare_ joined 02:37 zakharyas joined
seatek The more I dig, after I get past my next frustrated thing, the more I like it, and appreciate how it was done. 02:39
02:42 mcmillhj joined 02:45 isBEKaml left 02:46 jdahl joined 02:47 mcmillhj left 02:51 pierre_ left 02:52 pierre_ joined, mcmillhj joined 02:54 labster joined 02:58 mcmillhj left 02:59 noganex joined 03:02 noganex_ left 03:05 mcmillhj joined
BenGoldberg SmokeMachine____, Out of curiosity, why aren't JSON::API::Attr and JSON::API::Id simply empty roles? 03:05
SmokeMachine____ BenGoldberg: I think it'll do something in the future... (but not sure yet) 03:06
And I think I had read somewhere that's a good practice to create a method with the same name of the positional par when using a trait on a attribute... 03:09
BenGoldberg: ^^
03:10 mcmillhj left
SmokeMachine____ My memory isn't very good 03:10
03:14 stmuk joined 03:33 mcmillhj joined
TimToady seatek++ for persistence 03:34
03:36 zacts joined, pierre_ left 03:38 mcmillhj left 03:40 pierre_ joined 03:50 _slade_ joined 03:52 khw left
shinobicl Hi all... how can i print the current method/class where i am in (for a logging function) ? 03:53
03:53 nadim_ left 03:54 wamba joined
shinobicl that is, to define the LOG function in an utility .pm file, and then use it anywhere, and that this LOG funcion shows from where it was called. 03:57
AlexDaniel shinobicl: docs.perl6.org/type/CallFrame ? 04:02
04:02 cibs left 04:03 cibs joined
geekosaur m: class Foo { method bar { say $?CLASS, "::", $?ROUTINE;}}; Foo.new 04:05
camelia rakudo-moar 3a6cd8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?ROUTINE' is not declared. Did you mean 'Routine'?␤at <tmp>:1␤------> 3s Foo { method bar { say $?CLASS, "::", 7⏏5$?ROUTINE;}}; Foo.new␤»
geekosaur m: class Foo { method bar { say $?CLASS, "::", &?ROUTINE.name;}}; Foo.new.bar 04:07
camelia rakudo-moar 3a6cd8: OUTPUT«(Foo)::bar␤»
04:08 BenGoldberg left, AlexDaniel left
geekosaur m: class Foo { method bar { say ::?CLASS, "::", &?ROUTINE.name;}}; Foo.new.bar 04:08
camelia rakudo-moar 3a6cd8: OUTPUT«(Foo)::bar␤»
geekosaur m: class Foo { method bar { say $?CLASS.name, "::", &?ROUTINE.name;}}; Foo.new.bar
camelia rakudo-moar 3a6cd8: OUTPUT«No such method 'name' for invocant of type 'Foo'␤ in method bar at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
geekosaur meh
m: class Foo { method bar { say $?CLASS.^name, "::", &?ROUTINE.name;}}; Foo.new.bar 04:09
camelia rakudo-moar 3a6cd8: OUTPUT«Foo::bar␤»
04:09 jdahl left, jdahl joined 04:10 jdahl left 04:11 pierre_ left 04:19 pierre_ joined 04:24 pierre_ left, skids left 04:40 stmuk_ joined 04:41 stmuk left 04:42 mcmillhj joined 04:46 shinobicl left 04:47 mcmillhj left 04:54 wamba left, Cabanossi left 04:59 Cabanossi joined
dalek href="https://perl6.org/add-resources-redirect:">perl6.org/add-resources-redirect: 852b5a1 | (perl6.org website)++ | source/.htaccess:
Include redirect from old /documentation/ to new /resources/
05:06
05:08 mcmillhj joined 05:11 pierre_ joined 05:13 mcmillhj left 05:23 domidumont joined 05:26 _slade_ left, _slade_ joined 05:27 domidumont left 05:29 domidumont joined 05:30 mcmillhj joined
moritz uhm, isn't all of perl6.org about resources? what's wrong with /documentation/ ? 05:35
05:36 mcmillhj left
moritz is there any discussion about this in an issue tracker that I should read? 05:37
05:43 benjikun left
TimToady I guess to millenials "documentation" is something you avoid reading because it's required, while "resources" are there to be consulted when you feel like it. :) 05:53
*millennials 05:54
I guess "millenial" would rhyme with "menial" 05:55
06:01 zengargoyle left
geekosaur not sure if it's that or just maintaining the link to the original (annum) 06:04
06:06 domidumont left 06:07 domidumont joined, domidumont left, rgrinberg left 06:08 domidumont joined 06:31 pierre_ left, salva left, seatek left 06:32 ShimmerFairy joined, mcmillhj joined, xinming_ is now known as xinming 06:35 labster left 06:37 mcmillhj left 06:39 domidumont left 06:41 pierre_ joined 06:46 mempko joined 06:51 bjz joined
TEttinger I guess to some people millennials are a monolithic bunch of slackers 06:54
have fun in your next hundred years of code I guess 06:55
07:04 domidumont joined 07:07 ecocode joined 07:09 bjz left 07:12 rindolf joined, nadim_ joined 07:13 ecocode left, ecocode joined 07:15 wamba joined
huf_ it's the yooths that are the problem. they have no respect for their elders, just like the yooths of ancient greece had no respect for their elders. 07:21
we've been on a constant downward slide since antiquity
07:22 mcmillhj joined, bjz joined 07:25 pierre_ left 07:27 mcmillhj left 07:31 pierre_ joined 07:34 pdcawley joined 07:51 g4 joined 07:53 mcmillhj joined 07:57 cibs left 07:58 cibs joined, mcmillhj left 07:59 wamba left 08:05 dakkar joined 08:07 labster joined, labster left, labster joined
masak huf_: does anyone seriously doubt that? :P 08:08
(hi, #perl6)
arnsholt o/
huf_ masak: no, this assumption is in core 08:09
masak "constant downward slide" sounds like a good general summary of the time since antiquity. we've had a weird blip with enlightenment and stuff, but recent developments show that it didn't catch on.
huf_ yeah i know, our washing machines cant even hold a conversation anymore 08:10
arnsholt Constant downward slide since the golden age of heroes =p
huf_ not like back in the good old days of slavery in the antique world
masak huf_: I notice traces of voice in your sarcasm :P
arnsholt Even ancient Greece was merely the age of iron; not even the silver age
huf_ masak: oh no, that rather detracts from the point :) 08:11
masak :P
sorry for my bleak cynicism, everybody. I've ingested the coffee, but it hasn't been absorbed yet. :P 08:12
arnsholt Your caffeine stream is recaffeinating, good =)
huf_ i'm not sure how much of a blip the enlightenment was. have you seen their toilets?
masak arnsholt: tell me more about that. ancient Greece was a mere shadow of... what?
DrForr Too much blood in the caffeine stream, eh. 08:13
huf_ a taller ancient greece hovering above greece
08:13 aries_liuxueyang joined, Actualeyes left
arnsholt masak: The golden age of heroes! When heroes and gods walked the Earth and things were awesome^Wterribly exciting 08:13
huf_ ww2?
arnsholt en.wikipedia.org/wiki/Ages_of_Man#..._Five_Ages 08:15
Turns out I'm misremembering somewhat, but the general gist of it is right
"Hesiod finds himself in the Iron Age. During this age humans live an existence of toil and misery. Children dishonor their parents, brother fights with brother and the social contract between guest and host (xenia) is forgotten."
Hesiod being ~750-650 BCE, according to Wikipedia =) 08:16
DrForr Heh. Currently watching (for background noise) "Secrets of Stonehenge' (sadly no /Spinal Tap/ references made yet.)
08:17 Actualeyes joined 08:21 aries_liuxueyang left 08:23 domidumont left 08:26 Dunearhp joined, mcmillhj joined
masak arnsholt: could simply be that amnesiac nostalgia is a very old thing. :P 08:27
DrForr Nostalgia ain't what it used to be. 08:29
masak even meta-nostalgia is beginning to feel a bit jaded.
huf_ back in the day, old people used to complain better about the youth 08:30
but now that they're made up of said former useless youth grown old, they're shit at even that 08:31
masak they can't even nostalgia right
masak .oO( "you had one job" )
08:31 mcmillhj left, _slade_ left 08:32 aries_liuxueyang joined 08:39 mcmillhj joined
arnsholt masak: Or that the youth of today are simply terrible. I know which one I'm betting on =p 08:39
DrForr "Kids today." 08:42
08:43 mcmillhj left
masak arnsholt: yes. people have saying it for ages, but this generation of old people happens to be right about it for the first time in history. it makes sense. 08:44
arnsholt I know, right! 08:52
Stopped clocks, and all that
08:52 MARTIMM joined 08:55 aries_liuxueyang left
masak I believe "The time is out of joint" was uttered very recently. 08:57
08:57 mcmillhj joined
masak we live in exceptional times. 08:58
masak stops sarcasm-trolling and drinks more coffee 09:00
09:02 mcmillhj left 09:05 domidumont joined 09:06 TEttinger left 09:22 ecocode` joined 09:23 user9 joined, ecocode left 09:25 pierre_ left 09:26 bjz left 09:30 mcmillhj joined 09:33 pierre_ joined 09:35 mcmillhj left 09:37 aries_liuxueyang joined 09:40 zakharyas left, zakharyas joined 09:45 zakharyas left 09:47 bjz joined
tbrowder .tell timotimo I've experimented all I can with the travis build for my use case and can't come up with a better solution than my original one (I'll tweak the gist a bit later, though). I thought using environment vars would help but it just complicated the build by littering it with sub-builds, one for every env var in the .travis.yml file! 09:49
09:52 ecocode` left, bjz left 09:53 bjz joined, bjz left
lizmat gfldex: thanks for the overview :-) 10:03
gfldex yw
10:03 FROGGS joined
FROGGS o/ 10:05
10:07 ocbtec joined 10:09 gregf_ joined 10:24 mempko left 10:26 bjz joined 10:29 bjz left, bjz joined 10:31 zakharyas joined
dalek href="https://perl6.org:">perl6.org: 0b79607 | (Josiah Dahl)++ | / (3 files):
Fixed 'Resources' and 'Documentation' highlighting in the navbar. Renamed the folder 'documentation' to 'resources'
10:37
href="https://perl6.org:">perl6.org: e885101 | (Josiah Dahl)++ | / (3 files):
Merge branch 'issue_57'
href="https://perl6.org:">perl6.org: 2dbc228 | (Josiah Dahl)++ | / (2 files):
Changed 'Documentation' link in footer to 'References'
href="https://perl6.org:">perl6.org: 2535f08 | (Josiah Dahl)++ | / (2 files):
Accidentally wrote references instead of resources/
href="https://perl6.org:">perl6.org: 5a73999 | (Josiah Dahl)++ | includes/footer:
fixed link to resources in footer
href="https://perl6.org:">perl6.org: 47e7383 | (Zoffix Znet)++ | / (5 files):
Merge pull request #59 from josiahdahl/master

Issue #57 - Resources Tab Nav Issues
href="https://perl6.org:">perl6.org: 852b5a1 | (perl6.org website)++ | source/.htaccess:
Include redirect from old /documentation/ to new /resources/
href="https://perl6.org:">perl6.org: 52bbb14 | (Zoffix Znet)++ | source/.htaccess:
Merge pull request #60 from perl6/add-resources-redirect

Include redirect from old /documentation/ to new /resources/
hackedNODE giggles at (perl6.org website)++ 10:39
The thing got sentient! :P
masak that was always a risk 10:42
DrForr Skynet, now powered by Perl 6. 10:45
10:46 bjz left
dalek href="https://perl6.org:">perl6.org: 062c3f2 | (Zoffix Znet)++ | source/resources/index.html:
s/Documentation/Resources/
10:48
gfldex does `zef test .` have a look at META*.json? 10:50
10:51 bjz joined, labster left, bjz left 10:52 bjz joined 11:03 pierre_ left 11:07 aries_liuxueyang left 11:13 aries_liuxueyang joined 11:17 pierre_ joined 11:18 Actualeyes left 11:22 rindolf left 11:24 zakharyas left 11:28 bjz left, domidumont left, pmurias joined, bjz joined 11:35 Actualeyes joined 11:43 Actualeyes left 11:52 itaipu joined 11:53 rindolf joined 11:57 pierre_ left 12:04 Actualeyes joined 12:05 domidumont joined 12:16 Dunearhp left 12:24 Xliff left
moritz so, any takes on why "documentation" is now "resources"? 12:27
hackedNODE moritz: because documentation link was changed to point to docs.perl6.org
moritz ah
the weird thing about "resources" is just that whole of perl6.org is pointers to resources 12:28
maybe I should try to come up with a better name myself
hackedNODE Go for it :) 12:29
dalek c: c0ca8fa | gfldex++ | doc/Language/list.pod6:
link to /type/Slip
c: 1b8bdce | gfldex++ | doc/Type/Slip.pod6:
fix typo
c: 08a77b9 | gfldex++ | doc/Type/Slip.pod6:
show the difference between |(1,2,3) and (1,2,3).Slip
moritz tromey.com/blog/?p=911 "Since the gcj days I’ve been searching for basically the same combination that kept me hacking on gcj all those years: cool technology, great social environment, and a worthwhile mission."
couldn't help but think of Perl 6 :-) 12:32
hackedNODE :)
vcv after finally attending my first YAPC in June, I concur whole heartedly 12:33
tbrowder ref new docs site (ab 12:36
reboot...
[Coke] yawns.
tbrowder ref new docs site (and other p6 sites): i've always thought it would be handy to make the upper-left Camelia always return to the main site. 12:38
make it a link, that is 12:39
break, break: i need help with a hash idiom. i want to make a hash of keywords with all the same values (any value) since all i want is to be able to test a key for existence. the best i can come with is: 12:44
12:45 crookbond joined
hackedNODE use a Set 12:46
tbrowder m: my @k = <a b>; my %k = map { $_ => 1}, @k; say %k.perl
camelia rakudo-moar 3a6cd8: OUTPUT«{:a(1), :b(1)}␤»
12:46 rgrinberg joined
hackedNODE m: my %k = set <a b>; say %k.perl 12:46
camelia rakudo-moar 3a6cd8: OUTPUT«{:a, :b}␤»
hackedNODE m: my %k = 'The quick brown fox jumped over the lazy dog'.comb; say %k.perl 12:47
camelia rakudo-moar 3a6cd8: OUTPUT«{" " => "d", :T("h"), :b("r"), :e(" "), :f("o"), :i("c"), :j("u"), :k(" "), :l("a"), :m("p"), :n(" "), :o("g"), :q("u"), :r(" "), :t("h"), :v("e"), :x(" "), :z("y")}␤»
hackedNODE m: my %k = 'The quick brown fox jumped over the lazy dog'.comb.Set; say %k.perl
camelia rakudo-moar 3a6cd8: OUTPUT«{" " => Bool::True, :T, :a, :b, :c, :d, :e, :f, :g, :h, :i, :j, :k, :l, :m, :n, :o, :p, :q, :r, :t, :u, :v, :w, :x, :y, :z}␤»
12:48 rgrinberg left, rgrinberg joined
tbrowder hackedNODE: thanks! forgot about that is in p6--used it in C++ all the time... 12:48
pmurias moritz: hopefully Perl 6 ends up more succefull than gcj 12:57
12:58 perlpilot_ is now known as perlpilot 13:04 mcmillhj joined 13:05 canopus left 13:13 itaipu left 13:14 canopus joined 13:18 finanalyst joined, MARTIMM left
finanalyst !Ook David B Coe - [The Case Files of Justis Fearsson 02] - His Father's Eyes (epub).rar 13:21
again. ignore#
13:22 finanalyst left 13:26 skids joined 13:27 averna joined 13:31 averna left 13:32 Averna joined 13:34 imcsk8 joined 13:40 mcmillhj left, itaipu joined 13:42 grondilu joined
grondilu m: sub { .say for @_ }(False || Nil) 13:42
camelia rakudo-moar 3a6cd8: OUTPUT«Nil␤»
grondilu m: sub { .say for @_ }(Nil) 13:43
camelia rakudo-moar 3a6cd8: OUTPUT«Nil␤»
grondilu m: sub { .say for @_ }()
camelia ( no output )
masak m: say Nil === ()
camelia rakudo-moar 3a6cd8: OUTPUT«False␤»
grondilu m: sub { .say for @_ }(())
camelia ( no output )
grondilu m: sub { .say for @_ }(False || ())
camelia ( no output )
grondilu ok
masak m: say Nil ~~ List 13:44
camelia rakudo-moar 3a6cd8: OUTPUT«False␤»
grondilu m: sub { .say for @_ }(False || (), "foo") 13:45
camelia rakudo-moar 3a6cd8: OUTPUT«foo␤»
grondilu (just a last tiny check, I'm good now) 13:46
masak no no, it's interesting 13:47
grondilu not quite related: a Pair is always True unless it is undefined, isn't it? 13:48
m: my $var; say ?:$var;
camelia rakudo-moar 3a6cd8: OUTPUT«True␤»
13:49 mcmillhj joined
grondilu because I wanted to pass a named argument to a sub, unless it is not defined. Ended up having to use a binary. 13:49
hackedNODE You ninja it in
foo |(:$arg if $arg) 13:50
grondilu oh I never use that, I shoudl.
masak grondilu: yes, I think it's always true. seems you're hitting Mu.Bool, which returns `self.defined`
grondilu sadly only now remembers he had this conversation before 13:51
tbrowder m: my %k = <a b>; say %.perl 14:02
camelia rakudo-moar 3a6cd8: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable %.perl used where no 'self' is available␤at <tmp>:1␤------> 3my %k = <a b>; say %.perl7⏏5<EOL>␤ expecting any of:␤ argument list␤ term␤»
masak m: my %k = <a b>; say %k.perl 14:03
camelia rakudo-moar 3a6cd8: OUTPUT«{:a("b")}␤»
tbrowder wow, camelia ca read my mind
masak the AI function is at early stages, but it's there. 14:06
lizmat
.oO( feels a bit ad interim )
14:07
masak .oO( ad homonunculus attack )
homunculus*
masak .oO( don't you dare bring my uncle into this! ) 14:08
14:09 spebern joined 14:13 itaipu left
grondilu can anyone remind the correct use of the words "argument" vs "parameter"? 14:14
sub ($parameter) {}($argument), right?
hackedNODE grondilu: parameters is what you receive in routines; arguments is what you give to routines
nine has never managed to get those two right either
14:14 mcmillhj left
hackedNODE grondilu: right 14:14
.oO( you argue with a sub by giving it arguments... )
14:15
grondilu hackedNODE++ neat mnemotechnic 14:16
14:16 mcmillhj joined
masak also worth noting that the "argument"/"parameter" subdivision is fairly Perl-centric 14:17
I seldom see it exactly that way in other communities
more CS-y communities seem to call them "parameter"/"formal parameter", for example
I don't have a mnemonic, I've just practiced and practiced getting it right ;) 14:18
but it helps to realize that a parameter is a kind of variable, whereas an argument is a kind of expression
(IMHO)
mst through my perl5 goggles it's "the argument list" in both places, the only place I regularly see us use 'parameter' is, well, Function::Parameters' package name 14:19
gfldex a routine will argue with you about it's arguments when you stick the wrong parameters in
masak mst: what about the new signature syntax? are those parameters?
gfldex: you stick arguments in. they emerge on the inside of the routine as parameters. 14:20
14:20 itaipu joined
mst masak: I dunno how it's documented-as, but that doesn't seem to've affected the language-as-used 14:21
then again, I could be wrong about the language-as-used and only actually describing -my- language-as-used
(also I'm on my first coffee here ;)
huf_ i bet the distinction exists in mauke's bavarian :) 14:22
hence the name of F::P
masak .oO( the Bavarian Naming Maneuver ) 14:23
timotimo . 14:24
hackedNODE :
14:24 seatek joined
masak 14:25
14:29 spebern left 14:31 perlawhirl joined 14:35 g4 left 14:39 Averna left, Averna joined 14:40 user9 left 14:41 stevieb joined 14:43 ptolemarch joined 14:47 AlexDaniel joined 14:49 pierrot left 14:53 vytas joined 14:57 khw joined 15:01 ponbiki left 15:03 Averna left, Averna joined
dalek c: 49217b9 | (Zoffix Znet)++ | doc/Type/Dateish.pod6:
Correct docs for Dateish.[days-in-month|is-leap-year]

The argument-taking candidates of the two methods were never part of the Perl 6 specification and have now been removed[^1] from Rakudo.
  [1] github.com/rakudo/rakudo/commit/6a...0a989b6edd
15:09
15:10 user9 joined 15:15 ponbiki joined, vytas left, ponbiki is now known as Guest9616
dalek c: 5ec3597 | (Zoffix Znet)++ | doc/Type/Dateish.pod6:
Document Dateish.IO
15:19
15:33 mempko joined 15:35 user9 left 15:36 MARTIMM joined
dalek c: 261e163 | gfldex++ | doc/Language/faq.pod6:
link to Signature
15:36
15:36 pierrot joined
harmil_wk hackedNODE: Re: the irclog.perlgeek.de/perl6/2016-09-29#i_13310847 discussion, I was really only talking about the text of the exception. The type is, I think, fine. But some clearer hint could be placed in the warning text. 15:37
15:37 pierrot is now known as Guest19330 15:38 vytas joined
hackedNODE m: multi foo ($x is rw) { }; foo(42) 15:39
camelia rakudo-moar 6c0732: OUTPUT«Cannot resolve caller foo(Int); none of these signatures match:␤ ($x is rw)␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE maybe there's a way to make the exception figure out that there is a match for non-rw candidate and suggest that maybe that's what the user meant 15:40
timotimo yes, there is
hackedNODE sweet 15:41
timotimo it can go as far "out" as Exception.pm in the message method
tailgate how does is rw change the function call? does the argument also have to be rw?
timotimo yes
if you don't give it something that can be written to, it won't be called
15:49 Guest9616 is now known as ponpon 15:50 domidumont left
hackedNODE m: multi foo ($x is rw) { }; X::Multi::NoMatch.new(:dispatcher(&foo.dispatcher), :capture(\(42))).throw; 15:57
camelia rakudo-moar 6c0732: OUTPUT«X::Multi::NoMatch exception produced no message␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE Why no message? :/
timotimo it might have exceptioned 15:58
hackedNODE Oh. It would help if I got the args right. 15:59
m: multi foo ($x is rw) { }; X::Multi::NoMatch.new(&foo.dispatcher,\(42)).throw;
camelia rakudo-moar 6c0732: OUTPUT«Cannot resolve caller new(X::Multi::NoMatch: Mu, Capture); none of these signatures match:␤ (Mu $: *%)␤ (Mu $:, *@, *%_)␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE Oh, wait, that's the wrong throwage ^_^
Programming is hard! Let's go shopping. 16:00
timotimo ah, you wanted positionals? 16:01
oh, no, you don't
hackedNODE m: multi foo ($x is rw) { }; X::Multi::NoMatch.new(:dispatcher(&foo.dispatcher),:capture(\(42))).message.say; 16:02
camelia rakudo-moar 6c0732: OUTPUT«No such method 'dispatchees' for invocant of type 'Mu'␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE Getting closer! :)
Which is weird, 'cause:
m: multi foo ($x is rw) { }; dd &foo.dispatcher.dispatchees
camelia rakudo-moar 6c0732: OUTPUT«No such method 'dispatchees' for invocant of type 'Mu'␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE huh
Oh, I get it now
m: multi foo ($x is rw) { }; X::Multi::NoMatch.new(:dispatcher(&foo),:capture(\(42))).message.say; 16:03
camelia rakudo-moar 6c0732: OUTPUT«Cannot resolve caller foo(Int); none of these signatures match:␤ ($x is rw)␤»
hackedNODE \o/
timotimo hah, you were meant to just give the sub, eh?
fun times
hackedNODE :)
16:07 crookbond left 16:10 Guest19330 left 16:12 pierrot joined 16:13 Averna left 16:20 itaipu left 16:22 rgrinberg left 16:27 itaipu joined 16:28 mcmillhj left, mempko left 16:30 cdg joined 16:34 mempko joined 16:36 mcmillhj joined 16:38 wamba joined, wamba left 16:39 wamba joined 16:40 isBEKaml joined
hackedNODE m: use nqp; my $sig = :($x); dd nqp::getattr($sig, Signature, '$!params'); 16:41
camelia rakudo-moar 6c0732: OUTPUT«P6opaque: no such attribute '$!params' in type Signature when trying to get a value␤ in block <unit> at <tmp> line 1␤␤»
hackedNODE How come it says no attribute, when it clearly exists: github.com/rakudo/rakudo/blob/nom/...ure.pm#L92
16:41 perlawhirl left
grondilu how can I store various versions of the same module in separate files? 16:42
like Foo:<0.1> in Foo-0.1.pm6 and so on? But that does not seem to work.
timotimo i think we currently expect the version distinction to be at the distribution level 16:43
grondilu so I suppose something like C<use Foo:<0.1>; unit module Foo:<0.2> is Foo:<0.1>;> could not work, could it? 16:44
sorry I meant that with classes
so I suppose something like C<use Foo:<0.1>; unit class Foo:<0.2> is Foo:<0.1>;> could not work, could it?
timotimo it could, but it'd have to be in two separate installables
we might want to loosen that restriction 16:45
grondilu and if it's done, I could store the source code of Foo:<0.n> in Foo-0.n.pm6, right? 16:47
timotimo i imagine so 16:48
grondilu granted, it would only be accessable if I compile it first, though.
timotimo Meta.json would have to have some way to tell which file supplies what version
grondilu oh yeah
16:48 setty1 joined
grondilu FYI it's for my miniPerl project. I was told using SI prefixes is silly and it's kind of true. 16:49
using versioning would make a lot of sense for this. 16:50
timotimo SI prefixes? i only know SI suffixes :o
16:50 cdg left
grondilu I don't know what SI suffixes are 16:51
en.wikipedia.org/wiki/Metric_prefix
16:51 cdg joined
geekosaur the prefixes are the kilo- mega- etc. 16:52
timotimo oh
haha, right
somehow i thought "100 kilograms" makes "kilograms" the SI-suffix
grondilu lol, weird 16:53
timotimo my brain is stupid sometimes
16:53 dakkar left
hackedNODE timotimo: when you said it's possible (for checking `is rw` stuff in NoMatch exception)... did you have an easy plan in mind or was it just a guess? :) 16:55
timotimo just a guess
like you could go through the list of incoming arguments, flip one of them into a container and try to match them against all potential signatures
hackedNODE Ah. I'm kinda stuck on trying to strip `is rw` from a Signature to see if it would ACCEPTS a capture
timotimo hah
do it the other way around
it's easier to create a container and put it into the capture
hackedNODE Ah :) ok, I'm gonna give that a shot 16:56
timotimo good luck!
17:01 BrassLantern joined 17:08 rgrinberg joined 17:13 cdg left 17:27 dha joined 17:29 Zero_Dogg joined
Zero_Dogg Hi, is there any way to store a reference to class in a variable, and then instantiate whatever class a variable is referencing? Ie. class A {}; my $ref = A; my $obj = $ref.new(); 17:31
timotimo of course
exactly like what you just wrote
psch m: class A {}; my $ref = A; my $obj = $ref.new(); 17:32
camelia ( no output )
Zero_Dogg really? I guess something else is buggy then
psch m: class A {}; my $ref = A; my $obj = $ref.new(); say $obj.WHAT
camelia rakudo-moar 6c0732: OUTPUT«(A)␤»
Zero_Dogg sigh, I had just been stupid, a conflict between a method and an attribute prevented it from working. Thanks 17:36
dha Removing stupidity from the equation solves many problems! :-) 17:38
hackedNODE m: my @a = <a b c d e f g>; my @b = <c f>; dd keys @a ∖ @b 17:39
camelia rakudo-moar 6c0732: OUTPUT«("a", "g", "b", "e", "d").Seq␤»
hackedNODE (Perl 6)++
17:43 girafe joined 17:44 ufobat joined 17:46 BrassLantern left 17:47 cdg joined
grondilu m: use Test; ok True, '\n' 17:47
camelia rakudo-moar 6c0732: OUTPUT«ok 1 - \\n␤»
grondilu is slightly annoyed by the double slash here
hackedNODE m: my @a = <a b c d e f g>; my @b = <c f>; dd (@a ∖ @b){*}:k 17:48
camelia rakudo-moar 6c0732: OUTPUT«("a", "g", "b", "e", "d")␤»
hackedNODE \o/
timotimo grondilu: you know that you're giving it a backslash and an n, though, right?
m: say '\n'.graphs
camelia rakudo-moar 6c0732: OUTPUT«No such method 'graphs' for invocant of type 'Str'␤ in block <unit> at <tmp> line 1␤␤»
psch m: say '\n'
camelia rakudo-moar 6c0732: OUTPUT«\n␤»
timotimo m: say '\n'.chars
camelia rakudo-moar 6c0732: OUTPUT«2␤»
psch doesn't see why Test.pm has to escape that \ 17:49
maybe it's in TAP though?
hackedNODE grondilu: it's to escape the backslash that might prevent escaping the # that would interfere with TODOs.
grondilu I have a bunch of strings in my tests that can contain newlines. I don't want to actually print newlines in the reports.
hackedNODE grondilu: so it greedily escapes all slashes. You may wish to try to submit a patch, but test performance, if you do.
psch grondilu: take ␤?
.u ␤ 17:50
yoleaux U+2424 SYMBOL FOR NEWLINE [So] (␤)
grondilu that does not show up on my terminal
psch update your fonts? :)
hackedNODE Time for upgrade :)
timotimo well, nqp::escape exists
grondilu is not sure he wants to dive into a font quest righ now
hackedNODE m: use MONKEY-GUTS; say nqp::escape('\#')
camelia rakudo-moar 6c0732: OUTPUT«\\#␤»
17:51 rgrinberg left
hackedNODE neat 17:51
grondilu I'm using putty on Windows 10. Any font you'd recommend? (And how to install it?)
17:51 sjoshi joined
hackedNODE *shrug* Whatever stock Windows 10 uses works for me in the browser and HexChat 17:52
grondilu unicode characters usually show up but not this one. 17:53
gfldex grondilu: we had this topic before :) irclog.perlgeek.de/perl6/2016-08-11#i_13004071 17:54
vcv Consolas should be a standard windows font and is pretty good 18:02
stmuk_ inconsola is a good one too 18:03
isBEKaml vcv: You should try "Deja Vu Sans Mono" or "Source Code Pro" :-)
vcv i use source code pro too. back and forth between it and consolas
i think i use the former because it has a bunch of stuff for vim-powerline
18:06 cdg left 18:11 rgrinberg joined, domidumont joined
grondilu m: say "\u{2424}" 18:11
camelia rakudo-moar 1e6c46: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized backslash sequence: '\u'␤at <tmp>:1␤------> 3say "\7⏏5u{2424}"␤ expecting any of:␤ argument list␤ double quotes␤ term␤»
grondilu I can never remember how to do this
m: say "U+2424" 18:12
camelia rakudo-moar 1e6c46: OUTPUT«U+2424␤»
harmil_wk m: say "\x{2424}" 18:13
camelia rakudo-moar 1e6c46: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of curlies around escape argument; in Perl 6 please use square brackets␤at <tmp>:1␤------> 3say "\x{7⏏052424}"␤»
harmil_wk I guess I can't either :)
m: say "\x2424"
camelia rakudo-moar 1e6c46: OUTPUT«␤␤»
18:13 raiph left
harmil_wk Going to stop "helping" now :) 18:13
18:13 isBEKaml left
hackedNODE m: say "\x[2424]" 18:15
camelia rakudo-moar 1e6c46: OUTPUT«␤␤»
hackedNODE {} is Perl 5's way
moritz m: say "\c[2424]"
camelia rakudo-moar 1e6c46: OUTPUT«ॸ␤»
hackedNODE Oh, it did tell you to use square brackets! :) You just didn't read the message :D
m: 42++ 18:16
camelia rakudo-moar 1e6c46: OUTPUT«Cannot resolve caller postfix:<++>(Int); arguments that are expected to be␤in writable containers do not have them, for these candidates:␤ (Mu:D $a is rw)␤ (Int:D $a is rw)␤␤These candidates are also available:␤ (Bool:D $a is rw)␤ …»
hackedNODE harmil_wk: ^ 18:17
harmil_wk hackedNODE: that's nice 18:31
hackedNODE \o/ 18:33
18:34 RabidGravy joined
TimToady the verbiage there could use some editing, but nice that it notices now 18:34
hackedNODE TimToady: what would be the better wording?
18:34 setty1 left
hackedNODE can fix it up while we still remember :) 18:34
18:35 wisti joined
timotimo "If you had passed a writable argument: " 18:36
maybe?
perlpilot just discovered Perl 6 is very permissive with multis ... 18:38
m: multi foo($) { }; multi foo($) { };
camelia ( no output )
perlpilot m: multi foo($) { }; multi foo($) { }; foo(1);
camelia rakudo-moar 1e6c46: OUTPUT«Ambiguous call to 'foo'; these signatures all match:␤:($)␤:($)␤ in block <unit> at <tmp> line 1␤␤»
TimToady the following match the type but require a mutable argument ... the following do not match on type either
or something like that
"are expected to be" is just too passive aggressive :) 18:39
and we don't really have to mention containers 18:40
the argument is either mutable or it isn't
the following candidates require a mutable argument: ... the following do not match for other reasons: 18:41
moritz that only works well for the one-argument case though 18:42
TimToady hasn't looked at the code in questoin
*tion
just suggesting the language is a bit stilted currently 18:43
hackedNODE The code stuffs all arguments into writable containers and tries to find a candidate that would take it
TimToady LTA isn't evil, it's just...LTA
perlpilot moritz: "the following candidates match, but require the $x, $y and $z arguments to be mutable:"? (little bit of work to get this though) 18:44
TimToady it would be nice if the binder (or some proxy for the binder) could return a reason that each candidate was rejected 18:45
anyway, when I see progress, I get greedy :)
18:48 dha left
hackedNODE perlpilot: what's the permissiveness? That they get checked for ambiguity only at runtime? Some type checks can only be done at runtime 19:01
m: subset FunOne where rand > .5; multi foo (FunOne) {"yey"}; multi foo ($) { "w00t"}; say foo $ for ^5
camelia rakudo-moar f4bda3: OUTPUT«w00t␤w00t␤w00t␤w00t␤yey␤»
RabidGravy I tried to write some C# for the first time in ages today, it was a struggle
perlpilot hackedNODE: Aye, some can only be checked at runtime, but others can still be checked at compile time. 19:03
hackedNODE ¯\_(ツ)_/¯ it'd be extra work to check them at compile time, just to have to re-check them all again during runtime. 19:06
perlpilot yeah ... I think I sometimes expect Perl to be übermagical :) 19:08
hackedNODE :)
19:22 setty2 joined, sjoshi left 19:25 ptolemarch left 19:29 domidumont left, ptolemarch joined 19:31 MARTIMM left 19:33 labster joined, girafe left 19:38 iH2O joined, iH2O left, iH2O joined 19:48 khw left
grondilu vocabulary question : given a grammar $G and a class action $actions, how would you name $G.parse($string) as opposed to $G.parse($string, :$actions) ? 19:50
both do parsing, but the latter does a bit more, yet it's not quite "compiling", is it? 19:51
19:52 iH2O left
TimToady Idunno, intrinsically decorated vs extrinsicly decorated? 19:55
you can still have action blocks embedded in the grammar, so you can decorate there too
oh goodness, how'd it get to be almost past lunchtime already? 19:56
grondilu basically adding an action class does not change the nature of what is being done (parsing), right? It's still parsing, but done more specifically? 19:57
19:58 ufobat left
grondilu I'm asking that because I'm considering doing : grammar MyGrammar { class MyActions {...}; rule TOP {...}; our sub parse($string) { ::?CLASS.parse($string, :actions(MyActions)); } } 19:59
so that there will by two ways to parse a string for the user: MyGrammar::parse($string) and MyGrammar.parse($string), and I'm wondering if that can be confusing. 20:00
meh, I guess I'm making a big deal out of nothing 20:01
psch grondilu: is the Grammar useful without the .made?
grondilu not sure 20:02
psch grondilu: i'm asking because if not, and people want to use the Match objects .make most of the time anyway i'd just inline the &make calls
grondilu I tried inlining the make calls but that uglifies things quite a lot 20:03
20:04 TEttinger joined 20:11 eliasr joined 20:16 rgrinberg left 20:19 mcmillhj left 20:20 khw joined 20:21 mcmillhj joined 20:23 ptolemarch left 20:24 mohae_ joined 20:26 mohae left 20:38 itaipu left 20:39 itaipu joined 20:47 rgrinberg joined 20:49 khw left 20:51 ens joined
ens hi camelia 20:51
& others 20:52
dogbert17 o/ ens
ens so, i was pondering what the official name of perl6 is? 20:53
does one call it perl6 or something else?
20:53 FROGGS left
dogbert17 I believe Perl6 is the name to use (will probably be corrected :-) 20:54
ens ok because otherwise i wanted to suggest Perly McPerlface 20:55
El_Che with a space
dogbert17 dunno if that name was ever considered
.seen timotimo 20:56
yoleaux I saw timotimo 18:36Z in #perl6: <timotimo> maybe?
dogbert17 timotimo: is it correct that array accesses haven't been optimized yet? 20:57
[Coke] ens: there's Perl 6, the language specification, there's the Rakudo Perl 6 Compiler, the Rakudo Star Perl 6 Distribution… 20:58
the executable is typically ./perl6 20:59
21:00 cyphase left, bjz left 21:01 skids left 21:02 mcmillhj left, khw joined 21:05 cyphase joined
timotimo dogbert17: multidimensional array accesses haven't been optimized 21:06
dogbert17 timotimo: what about the single dimension case? 21:07
timotimo not sure
probably not as much as possible ;)
ens ah rakudo means 'way of the camel' in japanese 21:08
dogbert17 doodling with a project euler problem, takes 130 sec on my machine, the same in p5 takes seven and it 'feels' like it's the array accesses
ens that's pretty nice actually
dogbert17 timotimo: or should we be at that difference at this point in time? 21:09
ens 駱駝道
21:09 pecastro left
timotimo dogbert17: give me the code and i'll have a look maybe 21:10
did you try --profile yet? 21:11
dogbert17 timotimo: gist.github.com/dogbert17/6cdf8214...c64a2d58a7
I'll try a profile 21:12
timotimo: original problem here: projecteuler.net/problem=14 21:14
timotimo i know this, that's the hailstone sequence 21:17
dogbert17 cool
timotimo dogbert17: if you use native ints, you'll have about a 3x increase in speed 21:22
dogbert17 timotimo: that sounds very good
profile still running ... 21:23
timotimo 94816.85ms -> 29727.32ms
m: say 29727.32 / 94816.85
camelia rakudo-moar 01321c: OUTPUT«0.31352360␤»
timotimo even faster than 3x 21:24
dogbert17 very good
21:24 labster left, rindolf left, labster joined, labster left 21:25 labster joined
masak ens: "rakudado" would mean "way of the camel" 21:25
DrForr I'm going to do a more elaborate posting later, but github.com/drforr/perl6-Template-Toolkit might be of some interest. The actual working bits are still to be put in place, but there's a rather primitive grammar that covers 80%+ of the original Perl 5 Template Toolkit directives. 21:26
masak ens: "rakudo" is kind of a contraction of that. one of its meanings is "paradise"
(lit. "easy soil") 21:27
in retrospect, "easy soil" sounds like a wonderful description of having the setting and much of the compiler stack be written in Perl 6 :D 21:28
21:30 wamba left
dogbert17 timotimo: the profile completed, 60_000_000 Int's allocated 21:34
timotimo yeah 21:35
the faster one allocates 12_400_570 Int and 22_852_542 IntLexRef
and another 2_180_949 IntPosRef
dogbert17 so an Int will be allocated if I do a ++ on a scalar? 21:36
timotimo Int is immutable
dogbert17 gah, I'm a moron
timotimo don't worry about it
dogbert17 :-)
timotimo quick-dying objects are cheap 21:37
dogbert17 452 GC's
timotimo 2.71% (804.82ms) 21:38
time spent in the GC
dogbert17 yeah, that's fast
timotimo fast enough anyway
21:39 bjz joined
dogbert17 what does OSR mean? 21:39
timotimo on-stack-replacement is when we replace code with optimized code as it's running 21:40
dogbert17 ah, cool
timotimo otherwise we could only use optimized code when entering a routine
but loops don't "enter" their loop body in that same way
that's why OSR had to be put in, so that for and while loops can get properly optimized when they are hot 21:41
you can disable OSR with an env var i think
dogbert17 interesting, thanks for the explanation 21:42
timotimo moar --help tells you more about that 21:43
dogbert17 excellent stuff 21:45
so there was nothing goin on with the profile which struck you as 'suspicious' 21:46
timotimo i'm not sure
almost all time spent is in the loop that starts in line 6 21:47
i wonder if replacing ++ with += or completely written out makes it any better, but time spent in ++ is only 6%
dogbert17 yes, I noticed that, couldn't really get the numbers to add up
harmil_wk m: class Singleton { multi method new() { state $singleton = self.bless; $singleton } }; my $s1 = Singleton.new; my $s2 = Singleton.new; say $s1 === $s2 21:49
camelia rakudo-moar 01321c: OUTPUT«True␤»
harmil_wk Is that unreasonable?
I mean for me to do, not so much for Perl 6 to accept.
21:52 bjz left
timotimo BBL 21:52
dogbert17 timotimo: thx for the help 21:53
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/10/03/...toberfest/
dogbert17 lizmat++ weekly 21:56
harmil_wk Weekly's are a really important part of the community. I'm so glad they exist! 22:04
22:05 itaipu left
masak lizmat++ 22:10
22:18 labster left 22:24 _slade_ joined 22:25 RabidGravy left 22:33 khw left 22:41 skids joined 22:50 pmurias left 22:53 TEttinger left 22:54 mcmillhj joined
MasterDuke dogbert17: i got a little speedup in your script by pre-filling @cache (my int @cache = 0 xx 75001) instead of using default(0) 22:54
22:58 mcmillhj left 23:04 adu joined
timotimo MasterDuke: how big is it? 23:13
MasterDuke well, i reduced the iterations just to make the timing faster, but it went from avg 2.3s to avg 1.9s 23:15
oh, and that had ints where possible
m: my int @cache = 0 xx 10 23:17
camelia ( no output )
MasterDuke m: my int @cache is default(0)
camelia rakudo-moar 01321c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can't use trait 'is default' on a native array[int].␤at <tmp>:1␤------> 3my int @cache is default(0)7⏏5<EOL>␤ expecting any of:␤ constraint␤»
MasterDuke ^^^ has that been decided upon, or just NYI 23:18
pre-filling @cache got rid of AT-POS-CONTAINER, which was in third place ordering by exclusive time in my profile 23:19
23:22 mcmillhj joined, ocbtec left 23:24 TEttinger joined
timotimo i threw "is dfeault" out and made it an int array as the first order of business 23:26
23:26 mcmillhj left
timotimo not only because 0 is already the default of native int arrays 23:30
MasterDuke huh, switching "$num % 2 == 0" to "$num %% 2" doubles runtime 23:33
timotimo doubles? huh 23:34
i did that switch just for fun and it was part of my "3x faster"
so yours ought to be 6x faster?
MasterDuke well, 2s with "$num % 2 == 0", 4s with "$num %% 2" 23:35
timotimo oh
OK
MasterDuke and only looping up to 100_000
with %% the 2nd and 3rd entries in my profile are infix:<%> and infix:<%%>, 529587 entries each 23:37
sorted by exclusive time
timotimo how about +& 2? 23:39
skids $num +| 1 ?
MasterDuke huh, infix:<%> doesn't even show up at all in a profile with % == 0
timotimo no, +& 1
skids right.
:-)
timotimo skids: it's potentially statically inlined
skids maybe. Hopefully. 23:40
MasterDuke wait, which should i try?
timotimo when we inline stuff dynamically, it ends up in the profile
$num +& 2 should be the same as %% 2
er, why did i say +& 1? of course it has to be +& 2 23:41
MasterDuke that's even worse
took an extra second
timotimo wow 23:42
skids no, +& 1 :-)
MasterDuke infix:<+&> second place in profile by exclusive time, 1636036 entries
skids damn backscroll.
timotimo er, yeah, you're right
+& 1 is the correct one. and it's the opposite of %% 2
23:43 tushar joined
MasterDuke changed it to !($num +& 1), just about as fast as % == 0 23:44
timotimo i think the ! might actually cost a lot there
in this case you can just flip the then and else branches
MasterDuke 31ms
prefix:<!> was 13th in profile
timotimo it could have had ripple effects 23:45
preventing inlines, causing additional callframes, stuff like that
MasterDuke about the same 23:46
timotimo OK, good
avuserow if I remove the size limit of 75000 on the cache, it gets way faster for me 23:47
~2x as fast
uses about 7MB more memory
timotimo that's clearly worth it 23:48
also not having to check the number every time :)
MasterDuke same time for me making it 200000
timotimo because we all know checking an int against another int is one of the most expensive operations a processor can do
MasterDuke my int @cache = 0 xx 200000
timotimo no need to do that 23:50
just @cache[20_000_000] = 0
23:52 wisti left
MasterDuke 6x slower for me doing "my int @cache[200000] = 0" vs "my int @cache = 0 xx 200000" 23:53
eh, maybe close to 4x
23:54 mcmillhj joined
MasterDuke wtf? 0 xx 200000 is twice as slow if i just time that alone vs my int @cache[200000] = 0 23:55
23:55 matthewsellers joined 23:56 matthewsellers left, khw joined
timotimo it surprises me that 0 xx * is so fast 23:56
23:57 Dunearhp joined
skids can we build-depends on native OS packages yet? 23:58
MasterDuke ok, so if i profile with my int @cache[200000] = 0, top of the exclusive list is type_check (gen/moar/m-Metamodel.nqp:1187) with 911922 entries and 3.7s
timotimo skids: no 23:59
how many percents is that?
MasterDuke oh, i think i have a moar built with --debug
24%