»ö« 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 m: say 1.*hey 15:25
camelia rakudo-moar 459c63: OUTPUT«␤»
timotimo m: say 1.hey
camelia rakudo-moar 459c63: OUTPUT«No such method 'hey' for invocant of type 'Int'␤ in block <unit> at /tmp/Add5uCOL9s:1␤␤»
timotimo m: say 1.?hey
camelia rakudo-moar 459c63: OUTPUT«Nil␤»
timotimo calls all candidates, i think?
smls m: say 5.*Str
camelia rakudo-moar 459c63: OUTPUT«5 Int<140207678599584>␤»
smls looks like
timotimo ah, Str was a good idea 15:27
m: say 5.*perl
camelia rakudo-moar 459c63: OUTPUT«5 Int.new()␤»
timotimo m: say 5.0.*perl
camelia rakudo-moar 459c63: OUTPUT«5.0 Rat.new(numerator => 5, denominator => 1)␤»
timotimo m: say 5.0e0.*perl
camelia rakudo-moar 459c63: OUTPUT«5e0 Num.new()␤»
15:28 fhelmberger left 15:34 silug left
jnthn flight & 15:34
15:44 skids joined 15:49 silug joined
timotimo you've gotta flight 15:50
for your right
to paaaaaaar-tay
FROGGS_ I remember a code listing in my Amiga ROM Kernel Reference Manual showing: "RUN DMC" 15:53
15:55 spider-mario left
colomon Hmmm, lots of tests started failing today: smoke.perl6.org/report 15:56
ugexe colomon: i sent out a lot of bogus ones. for whatever reason panda isnt installing on JVM, and my smoke test script just kept moving along, running panda under moar which was trying to run with perl-j (which obv didnt exist) 16:06
fwiw the last 2 days panda has been failing a dies_ok test on jvm. the result does infact return a 'not ok' value, but it also crashes out of the panda install 16:08
unless those are all your results :) 16:09
timotimo Error while compiling lib/Hinges/Markup.pm
Attribute $!source not declared in class Hinges::MarkupTemplate
how does something like this just start failing out of the blue?
oh 16:10
this module has been failing for a long time
colomon ugexe: all those results on the web page are purely generated on rakudo-moar. No jvm involved.
ugexe colomon: ok. im still trying to setup my smokers so if you see anything unusual from /home/smoke, you can probably ignore them 16:11
16:13 eli-se left
Ulti 4 16:16
erk
masak no no, if you <3 something, it can't be 4 :) 16:20
ugexe m: use Test; plan 1; dies_ok { use Fakey }, "died ok" 16:21
camelia rakudo-moar 459c63: OUTPUT«===SORRY!===␤Could not find Fakey in any of: /home/camelia/rakudo-inst-2/languages/perl6/lib, /home/camelia/rakudo-inst-2/languages/perl6␤»
ugexe is that how dies_ok always behaved? 16:22
Ulti nine_ I have some funtime code for generating colours blog.mattoates.co.uk/2012/01/genera...tinct.html
ugexe m: use Test; plan 1; dies_ok { require Fakey }, "died ok"
camelia rakudo-moar 459c63: OUTPUT«1..1␤ok 1 - died ok␤»
16:23 raiph joined
Ulti nine_ I have an improved version which I can port to a P6 module 16:23
masak I just missed off the 2 :P 16:26
16:27 kaare_ left 16:30 raiph left 16:31 yqt joined, kjs_ left 16:40 kjs_ joined
skids Ulti: you may want to check out www.sron.nl/~pault/colourschemes.pdf 16:43
16:49 espadrine_ joined 16:52 espadrine left
Ulti I really dont :P since that's more effort 16:52
regardless of being colour blind once you get up to using ~100 colours things have gone wrong
which that code does at the moment but with a modified algorithm which spirals through into darker and more pastel colours 16:53
skids Heh. Yeah. It is the best document I have found on the subject, is all.
Ulti skids I have a friend who essentially doesnt have colour vision
I never really noticed which is kind of impressive 16:54
another hard constraint is BnW printing of a colour figure 16:56
nine_ Ulti: wow, that's exactly what I need!
17:00 BenGoldberg joined
skids Ulti: Yeah that doc addresses that as well as the difference between displaying on black vs white backgrounds, but it only provides a print-optimized palette for 4 colors. 17:03
Ulti skids it is a nice doc thanks for linking, I doubt I would ever have found it otherwise! 17:06
timotimo m: my @sites; multi gen($path, &code) is export { say "test" }; gen '/site', @sites, sub($s) { return $s } 17:10
camelia rakudo-moar 459c63: OUTPUT«5===SORRY!5=== Error while compiling /tmp/F5NltumMpq␤Variable '$s' is not declared␤at /tmp/F5NltumMpq:1␤------> 3ay "test" }; gen '/site', @sites, sub($s7⏏5) { return $s }␤ expecting any of:␤ postfix␤»
timotimo m: my @sites; multi gen($path, &code) is export { say "test" }; gen '/site', @sites, sub ($s) { return $s }
camelia rakudo-moar 459c63: OUTPUT«Cannot call 'gen'; none of these signatures match:␤:(Any $path, &code)␤ in sub gen at /tmp/fiCQzY62hN:1␤ in block <unit> at /tmp/fiCQzY62hN:1␤␤»
timotimo m: my @sites; multi gen($path, @args, &code) is export { say "test" }; gen '/site', @sites, sub ($s) { return $s } 17:11
camelia rakudo-moar 459c63: OUTPUT«test␤»
timotimo i don't understand why hinges fails
17:13 mohij left
timotimo erm, not hinges 17:15
i meant breakdancer
testers.p6c.org/reports/21882.html - it's a kind of parse error that doesn't seem obvious to me at all
i can make it pass by adding ; after the }, but since they also have newlines after the } already, that shouldn't change anything 17:16
17:21 kjs_ left 17:26 yqt left 17:27 mohij joined 17:33 BenGoldberg left
dpuu m: say %(:a(1), :b(2)) == %(:b(2), :a(1)) 17:44
camelia rakudo-moar 459c63: OUTPUT«True␤»
dpuu m: use Test; is %(:a(1), :b(2)), %(:b(2), :a(1))
camelia rakudo-moar 459c63: OUTPUT«not ok 1 - ␤␤# Failed test at lib/Test.pm line 110␤# expected: 'b 2 a 1'␤# got: 'a 1 b 2'␤»
timotimo == will turn both arguments into numbers 17:47
m: say +%(:a(1), :b(2))
camelia rakudo-moar 459c63: OUTPUT«2␤»
timotimo m: say +%(:b(2), :a(1))
camelia rakudo-moar 459c63: OUTPUT«2␤»
dpuu Ah. But should'd "is" compare hashes as unordered?
timotimo you want eqv, probably
colomon “is” tests to see if two strings are equal 17:48
not hashes or numbers or whatnot.
dpuu m: use Test; is_deeply %(:a(1), :b(2)), %(:b(2), :a(1)) 17:49
camelia rakudo-moar 459c63: OUTPUT«ok 1 - ␤»
timotimo don't we have something like "is_deeply"? or is that in Test::More?
lizmat m: use Test; is_deeply {}, {} 17:50
camelia rakudo-moar 459c63: OUTPUT«ok 1 - ␤»
lizmat should probably be called "is-deeply", but that is another issue :-) 17:51
17:53 Ugator left 17:55 smls left 17:56 Ugator joined 18:05 raiph joined 18:06 zakharyas left
xfix I have a question 18:15
eev.ee/blog/2015/02/28/sylph-the-pr...1882478235 - what is Slang::Snake?
lizmat a Python clone in Perl 6 18:16
?
xfix I cannot find it.
But it feels like a real thing, because other mentioned slang, Slang::Tuxic does exist.
lizmat Slang::Piers also, no?
m: my $b = <a b>.Bag; $b<a> := my $a; $a = 42; say $b # this shouldn't fail silently, I would think 18:17
camelia rakudo-moar 459c63: OUTPUT«bag(a, b)␤»
xfix github.com/FROGGS/p6-Slang-Piersing
Yep, this is Ruby-like, I assume.
lizmat yeah, it was about allowing ? and ! at the end of identifiers, afaik
m: my $b = <a b>.BagHash; $b<a> := my $a; $a = 42; say $b # and this shouldn't silently not do the right thing 18:19
camelia rakudo-moar 459c63: OUTPUT«BagHash.new(a, b)␤»
xfix I would like to code Perl 6 code without semicolons at end of lines.
(just like I do in JavaScript)
lizmat perhaps Slang:;Tuxic/Piersing provide the right inspiration ? 18:20
I would suggest Slang::Xfixing as name :-)
18:20 rurban left 18:21 perturbation joined
xfix Semicolons are actually one of these things I dislike in Perl 6, but I understand it's part of Perl 6 design. 18:21
But at the same time, there are programmable grammars, so I should be able to remove semicolons... 18:22
timotimo um, are you sure snake is a slang?
i thought slang was just a compiler based on NQP and HLL::Compiler
xfix I don't know, the comment I linked to refers to Slang::Snake.
"You could even try creating it in Perl 6 with a slang ( see Slang::Snake and Slang::Tuxic )."
b2gills: Can you tell me what is Slang::Snake? 18:23
18:23 Ugator left
[Tux] xfix, Slang::Tuxic is about Tux.nl/style.html - I do not expect you to agree 18:24
xfix okay, wat 18:25
18:26 b2gills left
xfix Uhm, okay. 18:26
18:26 b2gills joined, kjs_ joined
timotimo github.com/arnsholt/snake/ - the only snake i know 18:26
xfix Hm, that may as well be that, even if not Slang::Snake. 18:27
Tuxic style is quite odd, but at the same time, I see internal consistency.
If it works for its author, it's fine.
[Tux] it works for the author (me), so it *is* fine :) 18:28
b2gills maybe I combined Slang::SQL and Snake in my mind
xfix Eh, happens. So there is no Slang::Snake for no semicolons style. 18:29
18:30 molaf joined 18:31 perl6_newbee joined
xfix In JavaScript, I usually use Stroustrup style without semicolons. 18:35
[Tux]: I'm not saying your style is bad (there is no correct answer to code style). I dislike particular elements, like space before function call, but I can see it working in practice if you are used to it :-). But that's just me. 18:36
dalek ast: 33d5415 | lizmat++ | S (4 files):
Remove rakudo implementation specific tests
18:37
[Tux] well, that space is the most important part of Slang::Tuxic, and I refuse to program in any language that inhibits that space
xfix I see. 18:38
I should make a slang for myself with no semicolons.
masak I used to believe style was mostly subjective, but I don't anymore. there's at least a very large objective component, shadowed by lots of opinions. 18:47
xfix: for example, I believe that by omitting semicolons in your JavaScript, you *provably* open yourself up to a certain class of bugs that you would otherwise be safe from. 18:48
xfix Eh, not really.
One of issues is that you cannot start lines with open paren.
I usually do ;( in this case.
masak I rest my case.
xfix But other than that, it's quite safe.
(you also cannot start lines with some other syntax elements, but why you would start a line with regular expression) 18:49
masak TimToady: thank you for not making semicolons optional in Perl ;) 18:50
18:50 tinyblak left
osfameron haskell's optional semicolons are fine, otoh, as the layout rules are just sugar and are consistent and easy to reason about 18:51
18:52 zakharyas joined 18:58 eli-se joined
masak m: say (foo => 42).antipair 18:59
camelia rakudo-moar 459c63: OUTPUT«42 => foo␤»
masak how about that.
masak is catching up with recent doc changes 19:00
ugexe thats p cool 19:03
19:05 kjs_ left, zakharyas left 19:07 spider-mario joined 19:11 sisar joined 19:12 mr-foobar left
sisar "Parallel Processing with Promises" queue.acm.org/detail.cfm?id=2742696 19:12
19:16 perl6_newbee left 19:17 mohij left 19:20 rindolf left 19:23 perturbation left 19:25 mjreed left 19:28 sisar left 19:29 bcode left 19:30 bcode joined 19:32 yqt joined
FROGGS_ C:\rakudo>perl6-m -e "say 'dumpbin /exports foo.dll'.IO" 19:33
"C:\rakudo\dumpbin \exports foo.dll".IO
jnthn schiesse! 19:34
FROGGS_ lizmat: does the slash conversion happen in IO::Spec::Windows?
jnthn: almost :o)
jnthn Though if you're saying .IO I think it is reasonable for it to treat it as a path
lizmat slash conversion is still only in newio
:-(
FROGGS_ jnthn: pipe($path) calls $path.IO 19:35
jnthn oops
I suspect it maybe should not od that ;)
*do
FROGGS_ but the IO::Handle.open shall not expect to have an IO-thingy in its $!path
then* 19:36
lizmat jnthn: could you try removing the .IO in sub pipe ?
I'm in the middle of something else
FROGGS_ lizmat: I did that already
I can make my test case work and then gist the diff + spectest fallout 19:37
jnthn lizmat: I'm in the middle of 2 other things, alas... :( Seems FROGGS_++ is on it...
lizmat FROGGS_++
FROGGS_ m: say nqp::istype('foo'.IO, IO) 19:38
camelia rakudo-moar 459c63: OUTPUT«0␤»
lizmat IO.Path is Cool, does not does IO 19:39
at least, before newio
19:51 eli-se left
FROGGS_ omg, we are turning forward slash to backslash in moarvm's MVM_file_openpipe >.< 19:58
lizmat why o why if win supports forward slashes ? 19:59
FROGGS_ lizmat: I'm not sure
20:01 atweiden left
FROGGS_ hmmmm, I added it when I implemented openpipe (together with hoelzro++) 20:02
nice, I do not need to touch rakudo at all it seems 20:05
lizmat is there a plan to add UInt as a default type in the core ? 20:07
FROGGS_ ahh, I took that piece of code from MVM_proc_shell
lizmat: I dont know of any
lizmat I could use it for Bags 20:08
20:13 atweiden joined
raydiak good now() #perl6 20:14
raydiak notices parens don't work on now 20:16
anyway, anyone have thoughts about irclog.perlgeek.de/perl6/2015-03-08#i_10242099 ?
xfix Threads are so neat... when you do them in functional style. 20:18
masak raydiak: `now` is a term, not a sub.
dalek kudo/nom: fb3f1d5 | lizmat++ | src/core/Int.pm:
Implement UInt (naively, I might add)
20:21
TimToady thinks we need to look at everything that has got into Cool and kick about half of them out 20:22
dalek ast: 8935b10 | lizmat++ | S02-types/WHICH.t:
Add check for UInt
masak TimToady: +1
lizmat tell me which half, and I will kick :-) 20:23
TimToady what is the numeric value of an IO.Path?
masak "no".
vendethiel :D 20:24
TimToady Cool is mostly just for number vs string interchange
lizmat /foo/bar/42 would give 42
/foo/bar/baz would give an error
TimToady that's not cool
lizmat fwiw, I've used epoch as filenames extensively at former $work 20:25
it makes a lot of things a lot easier
20:26 zakharyas joined
masak that's fair enough, but even for epoch-as-filename, I'd prefer to see that being written out as code. 20:27
something like +$path.filename is not at all unreasonable.
lizmat m: say 42.IO + 23
20:27 Rounin left
camelia rakudo-moar 459c63: OUTPUT«65␤» 20:27
TimToady there are bits of the API that are stringy, and those are cool 20:28
lizmat m: say "/foo/42".IO + 23 # would be nice if that were /foo/65
camelia rakudo-moar 459c63: OUTPUT«65␤»
TimToady and we can certainly provide direct conversion for string contexty things, but going through Cool seems overkill
lizmat fair enough :-)
TimToady and the whole point of having paths is that even strings are a feyl 20:31
(unless you know exactly what OS you're on) 20:32
TimToady is crabby today, and should go take a geezer nap... 20:35
zzz &
osfameron would never have imagined TimToady referring to self as a geezer :-) 20:37
masak it's not the first time 20:38
raydiak r: say ({},:{})».of # everyone++ seems busy so I'll just put this here where it'll get seen and move forward with my day :) 20:39
camelia rakudo-moar 459c63: OUTPUT«(Mu) (Any)␤»
20:45 kjs_ joined
flussence I have a minor concern about «is cached»: it only supports one expiry mechanism, and that's having the OS wipe out the process entirely. While that's the sort of thing I'd find fun to code around, not everyone might. 20:45
lizmat flussence: anybody can create an other "is cached" mechanism 20:46
flussence oh, problem solved then!
lizmat well, the synopses are a bit slushy on that matter :-)
20:46 kjs_ left
lizmat S06:2108 for the interested 20:47
synopsebot Link: design.perl6.org/S06.html#line_2108
FROGGS_ raydiak: I just dont have an answer, 's all :o) 20:49
flussence (I was imagining a use case where I'd stick caching on DB calls in a webapp, then I realised that sort of code needs to be crash-tolerant anyway so it doesn't matter) 20:50
lizmat FROGGS_ raydiak will fix in a mo
raydiak lizmat: so it's unintentional? which way are you fixing it? to Mu or Any? Array.of also defaults to Mu like default-param hash, while %hash{...} for any value of ... always defaults to Any 20:52
dalek kudo/cpp: 05ec0ca | FROGGS++ | t/04-nativecall/1 (4 files):
make C++ tests windows friendly and skip if we cant compile
20:53
masak 'night, #perl6
raydiak gnight masak 20:54
lizmat good niight, masak
raydiak thanks for taking a look FROGGS_
lizmat spectesting fix now
dalek kudo/cpp: 9169f3a | FROGGS++ | t/04-nativecall/ (11 files):
use more portable _WIN32 define instead of WIN32
20:56
lizmat $ 6 '({},:{})>>.of.say' 21:00
(Any) (Any)
raydiak: ^^
raydiak lizmat++: cool thanks! you sure have a quick turnaround for issues raised on IRC lately :) Array too?
dalek kudo/nom: 5122bcf | lizmat++ | src/core/Cool.pm:
Implement .UInt coercer

Implemented in Cool, as .Int also lives in Cool. Should probably live in Any.
21:01
kudo/nom: a595b97 | lizmat++ | src/core/Hash.pm:
Give {}.of/default/dynamic more sensible values
lizmat raydiak: in a mo 21:02
21:02 darutoko left
timotimo i wonder why XML fails in some reports and not in others (== mine) 21:02
raydiak knows how to change many of these things hisself, but hesitates to do so without some discussion as to why it ought to be one way or another, especially for such fundamental and prolific building blocks 21:04
lizmat raydiak: I implemented those at the time, I seem to recall 21:05
and wasn't as versed in rakudo then as I am now (it's gotten better :-) 21:06
the problem with {} and [] is that they internally did not allocate a Hash / Array yet
so there are no attributes to query yet
dalek kudo/nom: 0813412 | lizmat++ | src/core/Array.pm:
Give [].of/default/dynamic more sensible values
21:07
colomon m: say ‘™’ ~~ /<[\xA0..\xD8FF \xE000..\xFFFD]>{}/ 21:08
camelia rakudo-moar fb3f1d: OUTPUT«「™」␤»
colomon m: if ‘™’ ~~ /<[\xA0..\xD8FF \xE000..\xFFFD]>{}/ { say $/.ord }
camelia rakudo-moar fb3f1d: OUTPUT«8482␤»
colomon m: say “this is a test™”.trans(/<[\xA0..\xD8FF \xE000..\xFFFD]>{}/ => { '&#' ~ $/.ord ~ ';' }) 21:09
camelia rakudo-moar fb3f1d: OUTPUT«this is a test&#8482;␤»
raydiak lizmat: ah I see 21:12
raydiak needs to collect some less obnoxiously repetitve words for gratitude other than thanks and ++ over and over :) 21:13
.oO( though at least there's that... '++'++ )
21:14
mst raydiak: person++ is pretty much accepted on IRC as being idiomatic and therefore not vulnerable to being classed as obnoxiously repetitive 21:15
lizmat mst++ :-)
mst :D 21:16
mst hugs lizmat
lizmat blushes
colomon huh. the ≂̸ symbol in HTML::Entity breaks my text editor
timotimo oh, angular 2 is supposed to give a gigantic performance improvement, maybe our profiler could be rewritten to use that at a point in the future 21:17
21:18 zakharyas left
raydiak mst: that's probably true, hadn't considered it...if only I shared the same invulnerability :) 21:18
21:19 perigrin left
colomon Mouq: just sent you a pull request for HTML::Entity 21:21
21:23 skids left
Mouq colomon++ 21:27
FROGGS_ hmmm, how do I re-export symbols? 21:33
21:33 xfix left
Mouq m: module Bar { our sub foo is export { 42 } }; module Baz { import Bar; our &foo is export = &Bar::foo }; import Baz; say foo 21:37
camelia rakudo-moar 081341: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oClozuY62c␤A symbol '&foo' has already been exported␤at /tmp/oClozuY62c:1␤------> ␤»
Mouq (I'm thinking that's a bug…) 21:38
m: module Bar { our sub foo is export { 42 } }; module Baz { import Bar; our &newfoo is export = &Bar::foo }; import Baz; say newfoo 21:39
camelia rakudo-moar 081341: OUTPUT«42␤»
Mouq m: module Bar { our sub foo { 42 } }; module Baz { import Bar; our &foo is export = &Bar::foo }; import Baz; say foo 21:40
camelia rakudo-moar 081341: OUTPUT«42␤»
FROGGS_ Mouq++ 21:42
got it
21:42 kaare_ joined 21:45 skids joined 21:46 bayprogrammer joined 21:54 atweiden left 21:56 coffee` left
dalek kudo/cpp: 5090c1b | FROGGS++ | / (3 files):
implement C++ name mangling for Windows/MSVC
21:58
22:02 cognominal joined
dalek kudo/cpp: e231ede | FROGGS++ | lib/NativeCall/ (3 files):
add new NativeCall submodules
22:05
ast: 8daa895 | lizmat++ | S32-array/perl.t:
Fix breakage caused by [].of returning Any now
22:07 BenGoldberg joined
raydiak FROGGS++ # fixes for 90% of the world's PCs (and a quarter of the servers) 22:10
I seem to be momentarily incapable of locating the part of Moar which actually builds the profiler's HTML output; can anyone point me in the right direction?
jnthn raydiak: It's actually in NQP 22:12
Under src/vm/moar/ somewhere
FROGGS_ raydiak: nqp/src/vm/moar/HLL/Backend.nqp:52: method dump_profile_data($data, $filename) {
jnthn Moar hands back a data structure
I did it this way in hope that I would make it easy/possible for somebody who wanted to build a better/different UI to be able to do so without having to do any moar guts hackery. 22:13
raydiak ah, jnthn++ FROGGS_++...guess I know why I couldn't find it :)
and yeah that was probably wise...wasn't looking forward to working with C for HTML generation 22:14
FROGGS_ yeah
jnthn: would be nice if you could take a look at the cpp branches in MoarVM/rakudo... I am at a point where I consider merging it 22:15
jnthn FROGGS_: OK. I'm afraid it's going to be Thursday before I can really concentrate much on stuff here :( 22:23
FROGGS_ jnthn: no problem 22:24
raydiak jnthn: probably not the main slowness, but any reason it uses JSON.parse? seems potentially spurrious if we're just inserting our own output into the template and writing the static result...I guess someone could look for an escaping failure in that nqp to_json implementation and try to craft a script with malicious --profile output? 22:29
of course, if they found such a hole, nothing stops them from getting out of the JSON.parse, too 22:30
jnthn raydiak: Yes, depressingly there is a reason.
raydiak: I did just shove the thing as a huge literal originally 22:31
And the result was...a stack overflow error?! 22:32
Apparently, a sufficiently deeply nested literal can get you this o.O
raydiak heh nice :P
ah well, it might even be faster than parsing as full JS these days anyway 22:33
jnthn Very possibly.
I don't think thta's where the slow is, tbh.
It's the addiction to angularjs list bindings probably 22:34
22:34 gfldex left 22:35 mohij joined
raydiak alright, I'll go read up on that; haven't used angular myself 22:35
jnthn Dunno if you know the story, but: I put the whole profiler stuff together in quite a hurry (O(couple of days)). The MoarVM bit was no issue; I know the codebase, and knew I could use the bytecode specialization infrastructure to insert all of the instrumentation. On the web bit, I asked one of the $dayjob folks who teaches web stuff (masak++) what the fastest way to a web-based UI was these days, and he suggested Angular. And he was right, you can 22:36
Unfortunately, the thing you put together might not work darn fats. :) 22:37
*fast
Timbus angularjs fires events on data being changed, but it constantly polls data structures to see if any changes have been made 22:38
22:38 vendethiel left
Timbus the advantage being that you dont need to rig up special getter/setters and watchable objects and the like. the disadvantage being it eats cpu 22:39
jnthn Hm. And we have a rather large data structure. :)
Yeah, that fits. Makes for very fast "make it work".
22:39 cognominal left 22:40 mr-foobar joined
raydiak hmmm...wondering how much I should put into it now, vs waiting for all the performance improvements in angular 2 which timotimo++ was talking about, vs just writing something custom (which, for better or for worse, is often my go-to move esp wrt web stuff) 22:40
Timbus i tried to make a similar thing for perl 6 actually. watchable objects. its very messy with all the proxies and stuff :/
jnthn raydiak: Not sure what the best path is; I don't do huge amounts of web stuff these days. 22:45
22:45 telex left
raydiak me neither which is...never thought I'd say it...kinda sad 22:45
is there anything preventing us from having independent profiler modules in the ecosystem like p5 Devel::*Prof? 22:46
22:46 telex joined
FROGGS_ m: my int $foo = 42; $foo++; say $foo 22:46
camelia rakudo-moar 081341: OUTPUT«43␤»
FROGGS_ this might be done: github.com/rakudo/rakudo/blob/nom/...OADMAP#L39 22:47
jnthn raydiak: Sort of in that they'd be fairly backend specific
raydiak: Also, I'm not sure Moar's public API exposes the needed stuff sufficiently yet
FROGGS_: It is :) 22:48
FROGGS_ L51 could be considered done too
L67 too
jnthn I'm not sure what the missing bits of enums are :)
FROGGS_ and L69 and L84 22:49
jnthn: me neither :o)
jnthn Given Inline::Perl5, perhaps L64 :)
FROGGS_ that's why I consider enums 'done'... they do all I every wanted :o)
aye
I remove all I mentioned... 22:50
raydiak jnthn: I guess that is a problem...was thinking maybe you could shim counters in dynamically in a mostly-implementation-agnostic way, but suppose that's likely to have a drastic effect on performance 22:51
e.g. just .wrap everything...though you'd lose all the GC and JIT stats and stuff like that too 22:52
dalek kudo/nom: 4e8cd3a | FROGGS++ | docs/ROADMAP:
remove items that I consider done, and prioritize NFG
22:53
jnthn raydiak: Yeah, it's one of those things I think really wants doing at VM level 22:55
raydiak: I can kinda see Moar some day allowing userland implementations of instrumentation
A kind of "meta-interpreter protocol" if you like :)
But it's not high on the todo list. 22:56
22:56 kjs_ joined
raydiak reads "meta-interpreter" and stops there, head floating away in spinny metaidea circles :) 22:57
FROGGS_ gnith 22:59
gnight*
22:59 FROGGS_ left 23:00 wicope left 23:02 Ben_Goldberg joined 23:05 BenGoldberg left
jnthn takes an early night...teaching tomorrow :) 23:10
&
raydiak o/ 23:11
lizmat good night jnthn 23:12
23:13 kjs_ left
dalek kudo/nom: cd7c31c | lizmat++ | src/core/ (9 files):
Streamline Set/Bag/Mix(Hashes)
23:15
lizmat and on that note, also getting some sleep& 23:16
raydiak good night lizmat
so, maybe nobody who knows is left, but...NFG is the only first-priority item on the ROADMAP; should there be additions wrt our current major blockers, or maybe adjustments to the subjective interpretation of the scale? 23:17
also wondering if there is a hand-culled list of the big important bugs (as opposed to features like the roadmap) e.g. diamond composition failure, async instability, really obvious non-corner stuff like that 23:20
23:32 mohij left
Mouq raydiak: I don't think there is a list like that; that's probably what ROADMAP should be, if we updated it more often 23:33
raydiak or at least another section in the roadmap maybe 23:34
23:37 spider-mario left 23:39 espadrine_ left
raydiak rt provides prioritization but we don't use it, so it's like this giant morass of corner cases and opinions and maybe-fixed-a-few-months-ago, punctuated by the occasional "wait, really!?" glaring failure which is all too easy to overlook 23:40
(and if we did use it I do not see a way to sort or filter by priority anyway, but maybe you have to log in for that or something) 23:43
raydiak wonders how many of those bug reports should fall away with parrot support 23:47
23:50 vendethiel joined