»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
Set by jnthn on 28 February 2015.
dalek kudo/nom: 9e79064 | Mouq++ | src/Perl6/ (2 files):
Revert "Make `method postcircumfix:<* *>` and `method <sigil>` obsolete"

This reverts commit b57f1358abfe6a6d899747eccd720f750f5b0285. It seemed to be causing too many ecosystem issues.
00:00
00:02 hobbs left 00:05 gfldex left 00:17 virtualsue joined 00:28 djanatyn left, djanatyn joined 00:29 cognominal left 00:44 mreed left 00:57 spider-mario left 01:14 virtualsue left 01:20 aborazmeh joined, aborazmeh left, aborazmeh joined
dalek kudo/nom: 7759845 | TimToady++ | src/ (2 files):
catch P5ish use of $/
01:21
ast: 1ea2e48 | TimToady++ | S (3 files):
deal with $/ = "\n\n" error
01:22
01:23 beastd left 01:56 telex left
TimToady m: $/ = '.' 01:56
camelia rakudo-moar 775984: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A4GNzdOhWh␤Unsupported use of $/ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/A4GNzdOhWh:1␤------> 3$/7⏏5 = '.'␤»
01:57 pecastro joined
TimToady m: $/=split ".",get;say ($0+($1+$2/(9 x$2.chars||1))/10**$1.chars).nude 01:57
camelia rakudo-moar 775984: OUTPUT«use of uninitialized value of type Nil in numeric context in block <unit> at /tmp/O1G4yuEzUN:1␤␤use of uninitialized value of type Nil in numeric context in block <unit> at /tmp/O1G4yuEzUN:1␤␤Cannot convert string to number: base-10 number must b…»
TimToady that's still allowed though
01:58 telex joined
ShimmerFairy I don't suppose there's an easy/efficient way of emitting a warning when $/ is assigned a Str? (Assuming P5 $/ only ever took strings, that is) 02:06
b2gills $/ also took refs to IVs 02:14
02:29 colomon left, colomon joined 02:32 mr-foobar joined 02:56 BenGoldberg_ joined 02:57 davido__ left 02:58 davido__ joined 03:01 Ben_Goldberg left 03:09 colomon left, colomon joined 03:18 Psyche^ joined 03:22 zby_home joined, Patterner left 03:27 noganex joined 03:30 noganex_ left
TimToady given how often $/ is assigned, I don't think we want to check there 03:42
b2gills I think that it will catch the vast majority of p5isms involving $/ ( even if it doesn't catch `$/ = q""` ) 03:45
TimToady m: $/ = "foo"; 03:46
camelia rakudo-moar 775984: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ans6pJ33eP␤Unsupported use of $/ variable; in Perl 6 please use the filehandle's .nl attribute␤at /tmp/Ans6pJ33eP:1␤------> 3$/7⏏5 = "foo";␤»
TimToady currently just checks for " and '
and would be the wrong message for \ anyway 03:47
b2gills m: sub ι ( Int $i where * > 0 ){ 1..$i }; say [+] reverse ι 100; # about the same as ` +/ι100 ` in APL ( reading www.vaxman.de/publications/apl_slides.pdf ) 03:52
camelia rakudo-moar 775984: OUTPUT«5050␤»
03:57 BenGoldberg joined 04:00 BenGoldberg_ left
TimToady why the reverse? 04:00
04:01 FROGGS_ joined 04:03 Sqirrel left
b2gills APL works from right to left ( although it doesn't really matter in this example ) 04:03
TimToady I think that's only syntactic, not order of vector ops 04:04
but it's been a long time... 04:05
b2gills that was according to the slides I linked to
04:05 FROGGS left 04:19 zby_home left 04:53 hobbs joined 04:57 Ben_Goldberg joined 05:01 BenGoldberg left 05:10 Sqirrel joined
Ben_Goldberg . o O (sub tmesis:<fnording> { ... }; sub absolutely { ... }; say abso-fnording-lutely()) 05:40
05:57 BenGoldberg joined 06:01 Ben_Goldberg left 06:09 TN joined 06:13 TN left 06:15 BenGoldberg left, aborazmeh left 06:20 rindolf joined 06:27 aborazmeh joined, aborazmeh left, aborazmeh joined 06:36 esaym153 left, aborazmeh left 06:37 esaym153 joined 06:49 kaare__ is now known as kaare_
raydiak r: say ({},:{})».of # /me wonders why these are different 06:54
camelia rakudo-moar 775984: OUTPUT«(Mu) (Any)␤»
06:59 rindolf left 07:03 prime left
ShimmerFairy raydiak: IIRC, :{} is an object hash 07:05
r: say {1 => 2, 3 => 4}.perl; say :{1 => 2, 3 => 4}.perl
camelia rakudo-moar 775984: OUTPUT«{"1" => 2, "3" => 4}␤:{3 => 4, 1 => 2}␤»
07:08 zby_home joined, aborazmeh joined, aborazmeh left, aborazmeh joined
raydiak ShimmerFairy: yes it is, but why is the *value* constraint different? the difference is supposed to be only the keys, unless I missed a memo (which also happens all the time) 07:09
ShimmerFairy r: say {}.kv.perl;
camelia rakudo-moar 775984: OUTPUT«().list␤»
ShimmerFairy r: say :{}.kv.perl;
camelia rakudo-moar 775984: OUTPUT«Nil␤»
ShimmerFairy huh 07:10
raydiak I am not at all convinced that is intentional behavior
ShimmerFairy I imagine that any differences between the two are differences in how :{} was implemented vs. {}
(except of course the reason why :{} exists in the first place :P) 07:11
07:11 prime joined
raydiak well yes, if there are observable behavioral differences, I agree that they are in the implementation on one level or another :) 07:13
ShimmerFairy wonders if it's more right for an empty hash's value type to be Mu or Any...
raydiak the generally theory is that they are supposed to just be different parameterizations of Hash, or at least that's my understanding
ShimmerFairy yeah, I understand :{} as a way of making hashes with non-Str keys in an easy way. 07:14
raydiak effectively :{} is Hash[Any,Any], and {} is Hash[Mu,Str] 07:15
ShimmerFairy the question is, should it be Hash[Mu,Mu] for :{}, or Hash[Any,Str] for {} ?
raydiak yes that's basically my question...I am hoping someone familir with their respective origin stories will backlog to this and illuminate the issue :) 07:16
there may very well be reasons that are just not clear from where I'm sitting
ShimmerFairy One the one hand, Mu would let you store anything as keys/values (of course), on the other hand I don't think you'll often want to put Junctions in a hash, nor be using objects that don't inherit from Any. 07:18
raydiak why would you want to explicitly disallow it? perhaps something to do with autothreading behavior in one context or another? 07:20
07:21 gfldex joined 07:23 MadcapJake left
ShimmerFairy Whoever wrote :{} has a good reason, apparently :) 07:23
raydiak iirc TimToady++ added the :{} sugar himself not too long ago
r: (my %h{Any}).WHAT.say 07:28
camelia rakudo-moar 775984: OUTPUT«(Hash[Any,Any])␤»
raydiak r: (my %h{Str}).WHAT.say
camelia rakudo-moar 775984: OUTPUT«(Hash[Any,Str])␤»
07:29 yeahnoob joined 07:38 busnello joined
raydiak bed for me...good night 07:51
07:55 busnello left 07:57 xfix joined 08:05 rurban joined 08:12 zby_home left 08:14 darutoko joined 08:17 Ugator joined 08:27 revdiablo left 08:33 WAASL5X joined 08:44 zby_home_ joined 08:45 zby_home_ left, mraynham joined 08:57 raiph left 09:04 wicope joined 09:05 smls joined
smls good $*time-of-day 09:06
lizmat++ # uppercase names for special compiler-facing methods
jnthn++ # thinking about a cleaner solution for invocation vs coercion 09:07
09:09 virtualsue joined
nine_ Ulti: not yet, would be interesting though :) I guess some more sophisticated color distribution will be in order for that. 09:13
moritz m: sub f is DEPRECATED('g') { 42 }; say f; 09:14
camelia rakudo-moar 775984: OUTPUT«42␤Saw 1 call to deprecated code during execution.␤================================================================================␤Sub f (from GLOBAL) called at:␤ /tmp/MwzCzBguzK, line 1␤Please use g instead.␤---------------------------------…»
dalek c: 394fc0b | moritz++ | lib/Type/Routine.pod:
Routine: document is DEPRECATED
09:21
09:21 Rounin joined 09:35 rindolf joined 09:36 spider-mario joined 09:38 espadrine joined
nine_ .tell jnthn with NQP 2015.02-60-ga01002f I could bisect the performance regression down to 12cfe28 Code-gen native lexical/attr access as ref-taking. 09:53
yoleaux nine_: I'll pass your message to jnthn.
09:59 aborazmeh left
nine_ .tell jnthn Profile before the regression: niner.name/profile-1425808785.84535.html and after: niner.name/profile-1425808872.44399.html shows a marked increase in interpreted frames 10:08
yoleaux nine_: I'll pass your message to jnthn.
jnthn nine_: Is the second profile from latest? 10:09
yoleaux 09:53Z <nine_> jnthn: with NQP 2015.02-60-ga01002f I could bisect the performance regression down to 12cfe28 Code-gen native lexical/attr access as ref-taking.
10:08Z <nine_> jnthn: Profile before the regression: niner.name/profile-1425808785.84535.html and after: niner.name/profile-1425808872.44399.html shows a marked increase in interpreted frames
nine_ jnthn: no the second profile is with commit 12cfe28 and NQP 2015.02-60-ga01002f. Currently building rakudo nom 10:10
jnthn nine_: OK, becuase the JIT of various things missing at the point that NQP commit was made came later 10:11
nine_ jnthn: niner.name/profile-1425809564.57976.html is with current nom 10:15
jnthn nine_: I'm a little confused; 1425808785.84535 is the before, but claims to run for longer than current? 10:16
"The profiled code ran for 13117.05ms." before, but "The profiled code ran for 12162.18ms." in latest?
10:17 rindolf left
nine_ jnthn: indeed. Though benchmarking with cat hello.csv | time perl6 -I/home/nine/Inline-Perl5/lib/ csv-ip5xs.pl gives me about 9.5 seconds before and ~ 13 seconds after the change up to current nom. 10:18
Which is consistent with |Tux|++' measurements comparing rakudo 2015-02-23 and 2015-03-05 10:20
jnthn 1425808872.44399 runs in about 9.5s; did you swap before/after? 10:21
nine_ Could be. I'll re-run to make sure 10:23
I'm sitting in my mum's kitchen and not 100 % concentrated :) 10:25
jnthn nine_: :) 10:26
nine_: Looking at the profile from latest, I have some idea what's going on.
nine_ jnthn: niner.name/profile-1425810450.55483.html is with rakudo 84f0b1a which takes 9.5 seconds. 10:28
jnthn Thanks. 10:31
FROGGS_ good morning #perl6 10:33
10:35 eli-se joined
eli-se hi 10:35
jnthn o/ FROGGS_, eli-se 10:36
vendethiel hi eli-se 10:54
dalek pan style="color: #395be5">perl6-examples: 1ccc074 | paultcochrane++ | htmlify.pl:
Remove debugging output
10:56
pan style="color: #395be5">perl6-examples: 46e307f | paultcochrane++ | categories/best-of-rosettacode/ (12 files):
[rosettacode] use TITLE instead of head1

This allows the html formatting to be more easily determined
11:00 xinming left
masak good noon, #perl6 11:00
nine_ masak: perfect timing :) 11:01
masak bows 11:02
smls moritz: In doc.perl6.org/type/Routine#trait_is_cached, what does "This makes only sense for routines that retrieve value types as arguments." mean? 11:03
Also, is "is cached" really guaranteed to only call the sub once for each set of arguments? Or is it just a hint for the compiler? 11:04
masak smls: a value type is the opposite of a reference type. Int is a value type. it's defined only by its value. two equal Ints are "the same".
smls: two distinct objects with identical contents are still not "the same". 11:05
masak looks into clarifying the wording
smls Still, what does that have to do with caching?
And what does it mean to "retireve" something "as arguments"?
masak smls: caching depends on things being immutable. value objects are immutable.
smls But Set/Bag/Mix can hash reference types just fine. 11:06
masak not really.
smls (by object identity)
11:06 xinming joined
masak I mean, they do. but the minute you change one of those objects, it falls off the map. literally. 11:07
that's not the behavior one would expect from a container.
and so it's better never to hash reference types.
Python actually makes it outright illegal for this reason.
jnthn Well, you're hashing the reference, not the value 11:09
That can be useful
masak I guess.
but it doesn't survive persisting stuff, when you get new object references.
jnthn Correct.
smls m: my $a = [2, 4]; my $b = Set.new($a); $a.push(6); say $b.perl;
camelia rakudo-moar 775984: OUTPUT«set([2, 4, 6])␤»
masak I guess nowadays it's resilient to the GC moving stuff, though.
jnthn As usual, you have to know what you're doing.
smls seems to work fine?
masak m: my $b = Set.new([2, 4]); say [2, 4] (elem) $b 11:10
camelia rakudo-moar 775984: OUTPUT«False␤»
masak smls: depends on your definition of "work fine" :)
jnthn m: my $a = [2,4]; my $b = [2]; my $s = Set.new($a, $b); say $s.perl; $b.push(4); say $s.perl;
camelia rakudo-moar 775984: OUTPUT«set([2, 4],[2])␤set([2, 4],[2, 4])␤»
jnthn So, what masak said :) 11:11
The uniqueness of those is all about them being different objects
masak which is not so useful, I think.
smls it could be
masak I mean, you use a Set or a hash in order for equal things to find each other.
11:11 rindolf joined
smls for custom classes where unique things get unique objects 11:11
masak I remain unconvinced until use case :) 11:12
smls well, why do Set/Bag/Mix use object identity then?
they could be using eqv instead
jnthn They use .WHICH
The default implementation of that is based on object identity. 11:13
smls ...which basically means === comparison
masak you basically get to choose between one problem or the other for reference types. either equivalent objects won't considered equal, *or* an object can change and not be found in the next lookup. 11:14
FROGGS_ jnthn: how can I print symbols of a windows dll?
smls masak: Or you forbid them. 11:15
FROGGS_ s/of a/exported by a/
masak smls: the assumption was that one tried (and succeeded) in hashing them in the first place. but yes. 11:16
jnthn FROGGS_: dumpbin /exports foo.dll 11:17
FROGGS_ ahh, thanks :o)
11:23 kjs_ joined 11:29 perl6_newbee joined
FROGGS_ jnthn: that does not list the exported symbols :o( 11:36
jnthn: how can I make it create an .exp file?
smls m: sub a ($x) is cached { say "first"; $x.perl }; say a([2, 4]) xx 3 11:39
camelia rakudo-moar 775984: OUTPUT«first␤[2, 4] [2, 4] [2, 4]␤»
11:39 mohij joined
smls masak: ^^ looks like is cached takes the opposite choice than Set/Bag/Mix 11:39
jnthn FROGGS_: Hmm, odd...I can use it on user32.dll, which doesn't seem to have an exp file 11:40
FROGGS_: And even if I delete moar.dll.exp, I still get all the moar.dll symbols
FROGGS_ jnthn: I want to print C++ symbols
jnthn Hmm 11:41
How are you exporting them?
masak smls: huh. that's... inconsistent. I wonder why that happens -- I thought both mechanisms worked using .WHICH 11:42
FROGGS_ jnthn: __declspec(dllexport) 11:43
smls It's incinsistent, but probably also useful
jnthn Hm, that should do it...
FROGGS_ jnthn: but I found a way... /FA
jnthn Ah, OK :)
FROGGS_ jnthn: now I got this, which is awesome: gist.github.com/FROGGS/690d9613d8ae0ee94c42
jnthn wow 11:45
:)
eli-se I like Go. 11:46
smls m: sub a is cached { [2, 4] }; my $x = a(); $x.push(6); say a().perl; 11:52
camelia rakudo-moar 775984: OUTPUT«[2, 4, 6]␤»
11:52 virtualsue left
smls masak: ^^ Nonetheless, the docs should probably tell users "Be careful whith subs that return reference types. because [...]" 11:53
FROGGS_ :o( # Cannot locate symbol '?SizeofDerived1@@YAHXZ' in native library './11-cpp.dll' 11:55
12:01 cognominal joined 12:03 aborazmeh joined, aborazmeh left, aborazmeh joined 12:04 aborazmeh left, cognominal left 12:11 coffee` joined 12:12 tinyblak joined
jnthn FROGGS_: Is that actually a ? or is it a replacement char for something else? 12:20
FROGGS_ it is a question mark 12:28
it seems __declspec(dllexport) is not compatible with LoadLibrary+GetProcAddress... but extern "C" seems to be used with LoadLibrary+GetProcAddress 12:29
so I need to find a way to do what __declspec(dllimport)
does
eli-se ooh C++ interop 12:36
hehe fun
colomon FROGGS_: stackoverflow.com/questions/7056461...rocaddress maybe?
eli-se Use libclang to import declarations. :P
colomon FROGGS_: (not the first answer, but the second) 12:37
12:39 eli-se left 12:42 sqirrel_ joined
dalek kudo/nom: 459c63c | lizmat++ | t/01-sanity/22-KEY.t:
Some more xx-KEY sanity tests
13:07
pan style="color: #395be5">perl6-examples: 8073bc3 | (Konrad Borowski)++ | categories/euler/prob005- (2 files):
Rename example with my old nick to my new nick
13:09
lizmat blogs.perl.org/users/shadowcat_mdk/...eader.html # thank you, Go Leader
yoleaux 7 Mar 2015 23:39Z <Mouq> lizmat: Fixed what was breaking the tests, but we may still want to revert… Inline::Perl5's t/precomp.t currently dies because of some internal mishandling of the postcircumfix:<( )> error, it seems
lizmat cycling, the weather is ultranice & 13:10
13:11 azawawi joined
azawawi hi 13:11
yoleaux 6 Jan 2015 18:13Z <tony-o> azawawi: that sounds more like a rakudo bug :-)
7 Mar 2015 07:28Z <moritz> azawawi: your modules ncurses and net-curl declare a dependency on NativeCall, but that is now shipped with rakudo. Please remove it from the deps
masak smls: started rewriting the doc in question. the original phrasing talks about *arguments* being reference types. your proposed fix talks about *return values* being reference types. 13:12
13:12 eli-se joined
eli-se ih 13:12
masak smls: seems the cached trait caches on the .gist of the argument. 13:13
<smls> masak: ^^ looks like is cached takes the opposite choice than Set/Bag/Mix
...which explains that.
as detailed here: github.com/rakudo/rakudo/commit/ee...ec7bbf8beb 13:14
(god, I love git. the killer feature if you ask me is that there's a public URI for each commit.) 13:15
but this only raises more questions: why is it .gist, why *was* it .perl, and why isn't it .WHICH ?
masak digs deeper
colomon isn’t it .gist on the parcel, rather than on each argument? 13:16
masak good point.
but parcels are immutable too, so .WHICH still isn't out of the question.
(and seems like the obvious choice to me)
colomon but you will get a different parcel each time you call, no?
masak but parcels are immutable
and have an overridden .WHICH that bases itself on the contents 13:17
aka "a value object"
ah! 13:18
also, "erm" :)
github.com/rakudo/rakudo/commit/07...96b8413bf4
"Suggested by masak++" indeed
colomon what a tangled web we weave 13:19
masak so, it seems we switched *away* from .WHICH
I now question the wisdom of this alleged past masak
don't know what he was thinking
masak hits le backlog
colomon rule should be, you cannot question his wisdom until you know what he was thinking.
masak haha 13:20
<TimToady> WHICH is just the wrong approach completely
irclog.perlgeek.de/perl6/2014-04-14#i_8582699
this is getting funnier by the minute
ok, insightful TimToady is insightful, as usual. 13:21
I wonder what prompted that response, though...
masak goes further back
day previous, lizmat says "Imma build 'is cached'" and "should I use .WHICH" 13:22
and jnthn says "yes, sounds like a sane approach"
lizmat: "but that'd mean two arrays with the same contents would not be considered equal. feels wrong to me" 13:23
(sorry for rough-quoting everyone -- trying to summarize the log)
azawawi .tell moritz RE "your modules ncurses and net-curl declare a dependency on NativeCall", it is now fixed. Thanks for the notification and sorry for the delay :) 13:24
yoleaux azawawi: I'll pass your message to moritz.
masak jnthn: "why?" (does example with === on camelia)
lizmat: "got ya -- so it means I can *not* use .WHICH as the key for 'is cached'" 13:25
jnthn: "no, it's just that if you pass two different arrays with the same contents, they cache diff'rently"
jnthn: "I don't think you can use 'is cached' in ignorance of the incoming argument types"
ok, and it's in light of all *that* one should read TimToady++'s comment 13:26
I'm not quite sure how we ended up with .gist from that -- maybe it's close enough to eqv semantics? 13:27
smls masak++ # digging
[Tux] # expected: $("1", "2")
# got: ("1", "2").list.item
is there an easy workaround to that? 13:28
masak anyway, interesting discussion. 'is cached' does some "snapshotting" of the incoming maybe-reference value, and it's that thing that's being eqv-compared with what's in the cache. (though right now it's being .gist-compared, which may or may not be goodenuf)
[Tux]: "wait for GLR and hope it solves the utter mess that we have currently"? :P 13:29
smls well, seeing how gist truncates lists/arrays, it seems a little unsafe
masak fsvo of "easy" and "workaround"...
smls: !!!
smls: yes, that's a *bug*
[Tux] is_deeply($c.x().map(~*),(1,2)) => is_deeply([$c.x().map(~*)],[1,2])
smls I wonder what lizmat and TimToady think *should* be the ideal semantics of "is cached" 13:30
masak actually, knowing that, using .gist in the first place is *wrong*, because the story for .gist is "string summary for human/screen consumption", not "exact eqv-like value for things like hashing"
smls yeah, as you said, it was probably used a quick workarouns in leu of a proper implementation 13:31
masak smls: please submit something about .gist summarizing and thus being unsuitable for 'is cached'
smls ok
masak then there's things like this, too:
m: say 5.gist; say 5.0.gist; say 5 eqv 5.0
camelia rakudo-moar 459c63: OUTPUT«5␤5␤False␤»
masak m: say 5.gist; say 5.0.gist; say 5.gist eq 5.0.gist; say 5 eqv 5.0 13:32
camelia rakudo-moar 459c63: OUTPUT«5␤5␤True␤False␤»
[Tux] I have a hard time understanding why a sub callback *expects* 0 arguments if no signature is passed. I'll try a gist 13:33
TimToady I think each immutable type should have a hash function of some sort, and mutable types a way to snapshot to eqv semantics
[Tux]: it tries to intuit from $_ and such, but sometimes gets it wrong 13:34
masak TimToady: that sounds good so far, but I think we need more than that. 13:35
TimToady m: my $x = { "no use of placeholders" }; say $x.arity
camelia rakudo-moar 459c63: OUTPUT«0␤»
TimToady masak: well, and a well-defined stragegy for combining hashes
masak TimToady: also, some things (like filehandles) probably don't have a good immutable/eqv representation.
TimToady: oh, combining is easy. just xor :) 13:36
or do the `a + 31 * b` trick
13:36 perl6_newbee left
dalek c: 28d7b8f | (Carl Masak)++ | lib/Type/Routine.pod:
rewrite the 'is cached' section

Based on feedback from smls++
13:37
[Tux] gist.github.com/Tux/86f2b3cab516be190631
masak reviews appreciated. ^^
TimToady for filehandles and VAR($x) hashing the WHICH is probably as good as we can do
masak TimToady: right. that has to be an allowable fallback.
TimToady but the use case is limited 13:38
masak [Tux]: I don't know why you're surprised by that outcome.
smls TimToady: What about the *return value*, should that maybe cache a .clone instead?
masak [Tux]: the anon sub on line 14 takes 0 arguments. read the error message :) 13:39
smls (otoh that would just move the problem one layer of nesting downwards, since clone is shallow)
[Tux] I was under the impression that a sub signature is optional, and that you define 0 arguments as ()
TimToady smls: eqv semantics are supposed to snapshot as deeply as serializing would do
13:40 yeahnoob left
[Tux] «sub () { }» takes no arguments, «sub { }» takes any arguments 13:40
smls TimToady: I was assuming you were discussing the incoming parameters that are being hashed
the return value of the "is cached" sub is a different matter, no?
masak [Tux]: no, that's not so. thankfully.
[Tux] hmm
masak [Tux]: `sub () {}` and `sub {}` are equivalent.
TimToady if you refer to @_, then it's "any"
masak [Tux]: however, what TimToady said.
m: say sub () {}.arity; say sub {}.arity; 13:41
camelia rakudo-moar 459c63: OUTPUT«0␤0␤»
TimToady but it's important for optimization to know 0-arg
masak m: say sub () {}.count; say sub {}.count;
camelia rakudo-moar 459c63: OUTPUT«0␤0␤»
[Tux] ok, I get it 13:42
TimToady m: my $x = { $_ }; say $x.arity
camelia rakudo-moar 459c63: OUTPUT«0␤»
TimToady m: my $x = { $_ }; say $x.count
camelia rakudo-moar 459c63: OUTPUT«1␤»
TimToady m: my $x = { @_ }; say $x.count
camelia rakudo-moar 459c63: OUTPUT«Inf␤»
masak INFINITE ARGUMENTS
TimToady m: my $x = { say @_ }; say $x(1,2,4...*) 13:43
camelia rakudo-moar 459c63: OUTPUT«1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912 1073741824 2147483648 4294967296 8589934592 17179869184 34359738368 68719476736…»
masak (and if you sum all of them, you get -1) 13:44
TimToady
.oO('is cached' is not terribly useful on an infinite list)
masak might be useful to a being with infinite patience/RAM 13:45
be glad it's only *countably* infinite!
TimToady aleph out loud
masak .oO( aleph zarro boogs found ) 13:46
FROGGS_ colomon: that does not seem to be it... I bet I do something (simple) wrong when compiling the dll 13:47
[Tux] FROGGS_, can you help me with gist.github.com/Tux/630df763184b5ff869f4 13:51
FROGGS_ [Tux]: try that (though, untested): github.com/FROGGS/p6-Slang-Tuxic/c...39b5f7e1dc 13:58
jnthn commute &
FROGGS_ AHHHHHHHHHHHHHHHHHHHHHHH! 14:07
masak m: class Foo:D {}; say Foo.new
camelia rakudo-moar 459c63: OUTPUT«Foo.new()␤»
masak submits rakudobug
FROGGS_ '#ifdef WIN32' was it! -.-
i.e., WIN32 is not defined
masak (the bug being that that `:D` is allowed on a class declaration)
FROGGS_ \o/ # ok 1 - sizeof(Derived1) 14:08
.tell jnthn We need to check for _WIN32 being defined instead of WIN32 in the nativecall tests 14:09
yoleaux FROGGS_: I'll pass your message to jnthn.
FROGGS_ bbl
14:10 isBEKaml joined
tadzik happy woman's day to everyone elligible :) 14:15
[Tux] :) 14:18
How *do* I define multi method new to do as expected in gist.github.com/Tux/623592360badd619dacf ?
14:19 virtualsue joined 14:21 skids left, isBEKaml left
TimToady What, they only get one day, and we get all the rest?!? 14:23
14:24 sqirrel_ left
masak here's hoping for a future where a special day to focus on women's rights seems a lot less necessary... 14:24
tadzik there is a man's day in september or so, but I think it's pretty recent 14:27
I like to think that March 8 was created to remind people about equality and stuff, while these days it's mostly taken for granted, and the day is just a "why not" reason for celebration 14:28
still, the "taking for granted" part is wrong more often than we'd like apparently, so the purpose is still valid
masak as a man, I'd be happy to donate some of the systemic advantage I'm getting (simply by virtue of being male) to women. easier said than done, though. 14:29
tadzik a nice result of the day is things like steamcommunity.com//games/236850/an...0049774312
14:30 eli-se left
masak that is nice, indeed. 14:31
tadzik makes everyone happier and raises awareness on things in question
well played (hrhr)
masak HR indeed 14:32
14:34 rurban left 14:42 azawawi left
[Tux] test-x 50000 35.666 35.445 <= first time under 36 14:46
masak [Tux]: does that mean things are getting faster?
if so, \o/
[Tux] yes
masak \o/
[Tux] How *do* I define multi method new to do as expected in gist.github.com/Tux/623592360badd619dacf ? (asked again)
moritz [Tux]: self.bless(s => $x) 14:49
yoleaux 13:24Z <azawawi> moritz: RE "your modules ncurses and net-curl declare a dependency on NativeCall", it is now fixed. Thanks for the notification and sorry for the delay :)
[Tux] and if the setter is a public method, like «multi method new (Str $str) { $str.defined and self.add($str); }» ? 14:51
14:54 telex left
moritz [Tux]: you'll have to create the object first, before you can call the accessor 14:54
[Tux] can I do so *inside* the new multi method? 14:55
moritz [Tux]: so something like method new($x) { my $new = self.bless; $new.add($x) if $x.defined; $new }
[Tux] Ahhh, thanks
14:55 rmgk_ joined, rmgk left, rmgk_ is now known as rmgk
moritz or if you want to dispatch to the parent classes new method, my $new = callwith(); 14:55
14:56 telex joined
[Tux] moritz++ 14:58
14:59 zakharyas joined, kjs_ left
moritz [Tux]: btw doc.perl6.org/language/objects#Obje...nstruction 15:00
[Tux] Str, Bool, Num, etc are single-values, as in perl5 scalars. Is there a type that restricts an argument to simple types?
15:00 rurban joined, eli-se joined, mraynham left
[Tux] method foo (Scalar $f) { $.s = $f.Str; } 15:00
15:01 kjs_ joined
moritz no 15:02
smls maybe: method foo ($f where { $_ !~~ Positional|Associative }) { ... } 15:04
[Tux] multi method new (Num $n) { return self.new ($n.Str); }
timotimo hum 15:07
15:09 MadcapJake joined
jnthn Depending what you mean by "simple types", could go with Cool 15:14
yoleaux 14:09Z <FROGGS_> jnthn: We need to check for _WIN32 being defined instead of WIN32 in the nativecall tests
jnthn .tell FROGGS_ Feel free to fix it... :)
yoleaux jnthn: I'll pass your message to FROGGS_.
jnthn wonders how we got away with that
FROGGS_ jnthn: I guess WIN32 is defined for C code but not for C++ 15:15
yoleaux 15:14Z <jnthn> FROGGS_: Feel free to fix it... :)
jnthn Ah
So long as vice versa is true... :) 15:16
FROGGS_ jnthn: yes, from my old P5 days I know that _WIN32 is the most portable thing
b2gills m: say .*keyof, ' => ', .*of for {}, :{} # I think this should be more like `(Str) => (Mu)␤(Any) => (Mu)` ( in Hash.pm *.of should probably be renamed *.keyof ) 15:21
camelia rakudo-moar 459c63: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NWEytc2svN␤Two terms in a row␤at /tmp/NWEytc2svN:2␤------> 3(Any) => (Mu)7⏏5` ( in Hash.pm *.of should probably be r␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
b2gills m: say .*keyof, ' => ', .*of for {}, :{} # I think this should be more like (Str) => (Mu)␤(Any) => (Mu) ( in Hash.pm *.of should probably be renamed *.keyof ) 15:22
camelia rakudo-moar 459c63: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8r0LS9sdLx␤Two terms in a row␤at /tmp/8r0LS9sdLx:2␤------> 3(Any) => (Mu)7⏏5 ( in Hash.pm *.of should probably be re␤ expecting any of:␤ infix stopper␤ infix or meta-infix␤ …»
b2gills m: say .*keyof, ' => ', .*of for {}, :{}
camelia rakudo-moar 459c63: OUTPUT«(Any) => (Mu) (Mu)␤(Any) (Any) => (Any) (Mu) (Mu)␤»
15:24 fhelmberger joined
smls what's this asterisk "method twigil"? 15:24
timotimo