Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-08

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 dalek rakudo/nom: 9e79064 | Mouq++ | src/Perl6/ (2 files):
00:00 dalek rakudo/nom: Revert "Make `method postcircumfix:<* *>` and `method <sigil>` obsolete"
00:00 dalek rakudo/nom:
00:00 dalek rakudo/nom: This reverts commit b57f1358abfe6a6d899747eccd720f750f5b0285.
00:00 dalek rakudo/nom: It seemed to be causing too many ecosystem issues.
00:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9e7906485d
00:17 virtualsue joined #perl6
00:28 djanatyn joined #perl6
01:20 aborazmeh joined #perl6
01:20 aborazmeh joined #perl6
01:21 dalek rakudo/nom: 7759845 | TimToady++ | src/ (2 files):
01:21 dalek rakudo/nom: catch P5ish use of $/
01:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7759845fcd
01:22 dalek roast: 1ea2e48 | TimToady++ | S (3 files):
01:22 dalek roast: deal with $/ = "\n\n" error
01:22 dalek roast: review: https://github.com/perl6/roast/commit/1ea2e4840f
01:56 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 #perl6
01:57 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…»
01:57 TimToady that's still allowed though
01:58 telex joined #perl6
02:06 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:14 b2gills $/ also took refs to IVs
02:29 colomon joined #perl6
02:32 mr-foobar joined #perl6
02:56 BenGoldberg_ joined #perl6
02:58 davido__ joined #perl6
03:09 colomon joined #perl6
03:18 Psyche^ joined #perl6
03:22 zby_home joined #perl6
03:27 noganex joined #perl6
03:42 TimToady given how often $/ is assigned, I don't think we want to check there
03:45 b2gills I think that it will catch the vast majority of p5isms involving $/ ( even if it doesn't catch `$/ = q""` )
03:46 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";␤»
03:46 TimToady currently just checks for " and '
03:47 TimToady and would be the wrong message for \ anyway
03:52 b2gills m: sub ι ( Int $i where * >  0 ){ 1..$i }; say [+] reverse ι 100; # about the same as ` +/ι100 ` in APL ( reading http://www.vaxman.de/publications/apl_slides.pdf )
03:52 camelia rakudo-moar 775984: OUTPUT«5050␤»
03:57 BenGoldberg joined #perl6
04:00 TimToady why the reverse?
04:01 FROGGS_ joined #perl6
04:03 b2gills APL works from right to left ( although it doesn't really matter in this example )
04:04 TimToady I think that's only syntactic, not order of vector ops
04:05 TimToady but it's been a long time...
04:05 b2gills that was according to the slides I linked to
04:53 hobbs joined #perl6
04:57 Ben_Goldberg joined #perl6
05:09 Sqirrel joined #perl6
05:40 Ben_Goldberg . o O (sub tmesis:<fnording> { ... }; sub absolutely { ... }; say abso-fnording-lutely())
05:57 BenGoldberg joined #perl6
06:09 TN joined #perl6
06:19 rindolf joined #perl6
06:27 aborazmeh joined #perl6
06:27 aborazmeh joined #perl6
06:37 esaym153 joined #perl6
06:54 raydiak r: say ({},:{})».of # /me wonders why these are different
06:54 camelia rakudo-moar 775984: OUTPUT«(Mu) (Any)␤»
07:05 ShimmerFairy raydiak: IIRC, :{} is an object hash
07:05 ShimmerFairy r: say {1 => 2, 3 => 4}.perl; say :{1 => 2, 3 => 4}.perl
07:05 camelia rakudo-moar 775984: OUTPUT«{"1" => 2, "3" => 4}␤:{3 => 4, 1 => 2}␤»
07:08 zby_home joined #perl6
07:08 aborazmeh joined #perl6
07:08 aborazmeh joined #perl6
07:09 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;
07:09 camelia rakudo-moar 775984: OUTPUT«().list␤»
07:09 ShimmerFairy r: say :{}.kv.perl;
07:09 camelia rakudo-moar 775984: OUTPUT«Nil␤»
07:10 ShimmerFairy huh
07:10 raydiak I am not at all convinced that is intentional behavior
07:10 ShimmerFairy I imagine that any differences between the two are differences in how :{} was implemented vs. {}
07:11 ShimmerFairy (except of course the reason why :{} exists in the first place :P)
07:11 prime joined #perl6
07:13 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...
07:13 raydiak the generally theory is that they are supposed to just be different parameterizations of Hash, or at least that's my understanding
07:14 ShimmerFairy yeah, I understand :{} as a way of making hashes with non-Str keys in an easy way.
07:15 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 {} ?
07:16 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 raydiak there may very well be reasons that are just not clear from where I'm sitting
07:18 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:20 raydiak why would you want to explicitly disallow it?  perhaps something to do with autothreading behavior in one context or another?
07:21 gfldex joined #perl6
07:23 ShimmerFairy Whoever wrote :{} has a good reason, apparently :)
07:23 raydiak iirc TimToady++ added the :{} sugar himself not too long ago
07:28 raydiak r: (my %h{Any}).WHAT.say
07:28 camelia rakudo-moar 775984: OUTPUT«(Hash[Any,Any])␤»
07:28 raydiak r: (my %h{Str}).WHAT.say
07:28 camelia rakudo-moar 775984: OUTPUT«(Hash[Any,Str])␤»
07:29 yeahnoob joined #perl6
07:38 busnello joined #perl6
07:51 raydiak bed for me...good night
07:57 xfix joined #perl6
08:05 rurban joined #perl6
08:14 darutoko joined #perl6
08:17 Ugator joined #perl6
08:33 20WAASL5X joined #perl6
08:44 zby_home_ joined #perl6
08:45 mraynham joined #perl6
09:04 wicope joined #perl6
09:05 smls joined #perl6
09:05 smls good $*time-of-day
09:06 smls lizmat++  # uppercase names for special compiler-facing methods
09:07 smls jnthn++  # thinking about a cleaner solution for invocation vs coercion
09:09 virtualsue joined #perl6
09:13 nine_ Ulti: not yet, would be interesting though :) I guess some more sophisticated color distribution will be in order for that.
09:14 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.␤---------------------------------…»
09:21 dalek doc: 394fc0b | moritz++ | lib/Type/Routine.pod:
09:21 dalek doc: Routine: document is DEPRECATED
09:21 dalek doc: review: https://github.com/perl6/doc/commit/394fc0b900
09:21 Rounin joined #perl6
09:35 rindolf joined #perl6
09:36 spider-mario joined #perl6
09:38 espadrine joined #perl6
09:53 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.
10:08 nine_ .tell jnthn Profile before the regression: http://niner.name/profile-1425808785.84535.html and after: http://niner.name/profile-1425808872.44399.html shows a marked increase in interpreted frames
10:08 yoleaux nine_: I'll pass your message to jnthn.
10:09 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:09 yoleaux 10:08Z <nine_> jnthn: Profile before the regression: http://niner.name/profile-1425808785.84535.html and after: http://niner.name/profile-1425808872.44399.html shows a marked increase in interpreted frames
10:10 nine_ jnthn: no the second profile is with commit 12cfe28 and NQP 2015.02-60-ga01002f. Currently building rakudo nom
10:11 jnthn nine_: OK, becuase the JIT of various things missing at the point that NQP commit was made came later
10:14 nine_ jnthn: http://niner.name/profile-1425809564.57976.html is with current nom
10:16 jnthn nine_: I'm a little confused; 1425808785.84535 is the before, but claims to run for longer than current?
10:16 jnthn "The profiled code ran for 13117.05ms." before, but "The profiled code ran for 12162.18ms." in latest?
10:18 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:20 nine_ Which is consistent with |Tux|++' measurements comparing rakudo 2015-02-23 and 2015-03-05
10:21 jnthn 1425808872.44399 runs in about 9.5s; did you swap before/after?
10:23 nine_ Could be. I'll re-run to make sure
10:25 nine_ I'm sitting in my mum's kitchen and not 100 % concentrated :)
10:26 jnthn nine_: :)
10:26 jnthn nine_: Looking at the profile from latest, I have some idea what's going on.
10:28 nine_ jnthn: http://niner.name/profile-1425810450.55483.html is with rakudo 84f0b1a which takes 9.5 seconds.
10:31 jnthn Thanks.
10:33 FROGGS_ good morning #perl6
10:35 eli-se joined #perl6
10:35 eli-se hi
10:36 jnthn o/ FROGGS_, eli-se
10:54 vendethiel hi eli-se
10:56 dalek perl6-examples: 1ccc074 | paultcochrane++ | htmlify.pl:
10:56 dalek perl6-examples: Remove debugging output
10:56 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/1ccc074a29
10:56 dalek perl6-examples: 46e307f | paultcochrane++ | categories/best-of-rosettacode/ (12 files):
10:56 dalek perl6-examples: [rosettacode] use TITLE instead of head1
10:56 dalek perl6-examples:
10:56 dalek perl6-examples: This allows the html formatting to be more easily determined
10:56 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/46e307fc49
11:00 masak good noon, #perl6
11:01 nine_ masak: perfect timing :)
11:02 * masak bows
11:03 smls moritz: In http://doc.perl6.org/type/Routine#trait_is_cached, what does "This makes only sense for routines that retrieve value types as arguments." mean?
11:04 smls 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".
11:05 masak smls: two distinct objects with identical contents are still not "the same".
11:05 * masak looks into clarifying the wording
11:05 smls Still, what does that have to do with caching?
11:05 smls And what does it mean to "retireve" something "as arguments"?
11:05 masak smls: caching depends on things being immutable. value objects are immutable.
11:06 smls But Set/Bag/Mix can hash reference types just fine.
11:06 masak not really.
11:06 smls (by object identity)
11:06 xinming joined #perl6
11:06 masak I mean, they do. but the minute you change one of those objects, it falls off the map. literally.
11:07 masak that's not the behavior one would expect from a container.
11:07 masak and so it's better never to hash reference types.
11:07 masak Python actually makes it outright illegal for this reason.
11:08 jnthn Well, you're hashing the reference, not the value
11:09 jnthn That can be useful
11:09 masak I guess.
11:09 masak but it doesn't survive persisting stuff, when you get new object references.
11:09 jnthn Correct.
11:09 smls m: my $a = [2, 4]; my $b = Set.new($a); $a.push(6); say $b.perl;
11:09 camelia rakudo-moar 775984: OUTPUT«set([2, 4, 6])␤»
11:09 masak I guess nowadays it's resilient to the GC moving stuff, though.
11:09 jnthn As usual, you have to know what you're doing.
11:09 smls seems to work fine?
11:10 masak m: my $b = Set.new([2, 4]); say [2, 4] (elem) $b
11:10 camelia rakudo-moar 775984: OUTPUT«False␤»
11:10 masak smls: depends on your definition of "work fine" :)
11:10 jnthn m: my $a = [2,4]; my $b = [2]; my $s = Set.new($a, $b); say $s.perl; $b.push(4); say $s.perl;
11:10 camelia rakudo-moar 775984: OUTPUT«set([2, 4],[2])␤set([2, 4],[2, 4])␤»
11:11 jnthn So, what masak said :)
11:11 jnthn The uniqueness of those is all about them being different objects
11:11 masak which is not so useful, I think.
11:11 smls it could be
11:11 masak I mean, you use a Set or a hash in order for equal things to find each other.
11:11 rindolf joined #perl6
11:11 smls for custom classes where unique things get unique objects
11:12 masak I remain unconvinced until use case :)
11:12 smls well, why do Set/Bag/Mix use object identity then?
11:12 smls they could be using  eqv  instead
11:12 jnthn They use .WHICH
11:13 jnthn The default implementation of that is based on object identity.
11:13 smls ...which basically means  ===  comparison
11:14 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?
11:14 smls masak: Or you forbid them.
11:15 FROGGS_ s/of a/exported by a/
11:16 masak smls: the assumption was that one tried (and succeeded) in hashing them in the first place. but yes.
11:17 jnthn FROGGS_: dumpbin /exports foo.dll
11:17 FROGGS_ ahh, thanks :o)
11:23 kjs_ joined #perl6
11:29 perl6_newbee joined #perl6
11:36 FROGGS_ jnthn: that does not list the exported symbols :o(
11:36 FROGGS_ jnthn: how can I make it create an .exp file?
11:39 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 #perl6
11:39 smls masak: ^^ looks like is cached takes the opposite choice than Set/Bag/Mix
11:40 jnthn FROGGS_: Hmm, odd...I can use it on user32.dll, which doesn't seem to have an exp file
11:40 jnthn FROGGS_: And even if I delete moar.dll.exp, I still get all the moar.dll symbols
11:40 FROGGS_ jnthn: I want to print C++ symbols
11:41 jnthn Hmm
11:41 jnthn How are you exporting them?
11:42 masak smls: huh. that's... inconsistent. I wonder why that happens -- I thought both mechanisms worked using .WHICH
11:43 FROGGS_ jnthn: __declspec(dllexport)
11:43 smls It's incinsistent, but probably also useful
11:43 jnthn Hm, that should do it...
11:43 FROGGS_ jnthn: but I found a way... /FA
11:43 jnthn Ah, OK :)
11:43 FROGGS_ jnthn: now I got this, which is awesome: https://gist.github.com/FR​OGGS/690d9613d8ae0ee94c42
11:45 jnthn wow
11:45 jnthn :)
11:46 eli-se I like Go.
11:52 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:53 smls masak: ^^ Nonetheless, the docs should probably tell users "Be careful whith subs that return reference types. because [...]"
11:55 FROGGS_ :o( # Cannot locate symbol '?SizeofDerived1@@YAHXZ' in native library './11-cpp.dll'
12:01 cognominal joined #perl6
12:03 aborazmeh joined #perl6
12:03 aborazmeh joined #perl6
12:11 coffee` joined #perl6
12:12 tinyblak joined #perl6
12:20 jnthn FROGGS_: Is that actually a ? or is it a replacement char for something else?
12:28 FROGGS_ it is a question mark
12:29 FROGGS_ it seems __declspec(dllexport) is not compatible with LoadLibrary+GetProcAddress... but extern "C" seems to be used with LoadLibrary+GetProcAddress
12:29 FROGGS_ so I need to find a way to do what __declspec(dllimport)
12:29 FROGGS_ does
12:36 eli-se ooh C++ interop
12:36 eli-se hehe fun
12:36 colomon FROGGS_: http://stackoverflow.com/questions​/7056461/unable-to-load-some-funct​ions-from-dll-with-getprocaddress maybe?
12:36 eli-se Use libclang to import declarations. :P
12:37 colomon FROGGS_: (not the first answer, but the second)
12:42 sqirrel_ joined #perl6
13:07 dalek rakudo/nom: 459c63c | lizmat++ | t/01-sanity/22-KEY.t:
13:07 dalek rakudo/nom: Some more xx-KEY sanity tests
13:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/459c63cde6
13:09 dalek perl6-examples: 8073bc3 | (Konrad Borowski)++ | categories/euler/prob005- (2 files):
13:09 dalek perl6-examples: Rename example with my old nick to my new nick
13:09 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/8073bc3374
13:09 lizmat http://blogs.perl.org/users/shadowcat_mdk/​2015/03/the-company-culture-go-leader.html  # thank you, Go Leader
13:09 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
13:10 lizmat cycling, the weather is ultranice &
13:11 azawawi joined #perl6
13:11 azawawi hi
13:11 yoleaux 6 Jan 2015 18:13Z <tony-o> azawawi: that sounds more like a rakudo bug :-)
13:11 yoleaux 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
13:12 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 eli-se joined #perl6
13:12 eli-se ih
13:13 masak smls: seems the cached trait caches on the .gist of the argument.
13:13 masak <smls> masak: ^^ looks like is cached takes the opposite choice than Set/Bag/Mix
13:13 masak ...which explains that.
13:14 masak as detailed here: https://github.com/rakudo/rakudo/commit/​eea1867dfae98fa1df4a058bb12aaeec7bbf8beb
13:15 masak (god, I love git. the killer feature if you ask me is that there's a public URI for each commit.)
13:15 masak but this only raises more questions: why is it .gist, why *was* it .perl, and why isn't it .WHICH ?
13:15 * masak digs deeper
13:16 colomon isn’t it .gist on the parcel, rather than on each argument?
13:16 masak good point.
13:16 masak but parcels are immutable too, so .WHICH still isn't out of the question.
13:16 masak (and seems like the obvious choice to me)
13:16 colomon but you will get a different parcel each time you call, no?
13:16 masak but parcels are immutable
13:17 masak and have an overridden .WHICH that bases itself on the contents
13:17 masak aka "a value object"
13:18 masak ah!
13:18 masak also, "erm" :)
13:18 masak https://github.com/rakudo/rakudo/commit/​07dcb22d6c3a611ac71441a0be4abe96b8413bf4
13:18 masak "Suggested by masak++" indeed
13:19 colomon what a tangled web we weave
13:19 masak so, it seems we switched *away* from .WHICH
13:19 masak I now question the wisdom of this alleged past masak
13:19 masak don't know what he was thinking
13:19 * masak hits le backlog
13:19 colomon rule should be, you cannot question his wisdom until you know what he was thinking.
13:20 masak haha
13:20 masak <TimToady> WHICH is just the wrong approach completely
13:20 masak http://irclog.perlgeek.de/​perl6/2014-04-14#i_8582699
13:20 masak this is getting funnier by the minute
13:21 masak ok, insightful TimToady is insightful, as usual.
13:21 masak I wonder what prompted that response, though...
13:21 * masak goes further back
13:22 masak day previous, lizmat says "Imma build 'is cached'" and "should I use .WHICH"
13:22 masak and jnthn says "yes, sounds like a sane approach"
13:23 masak lizmat: "but that'd mean two arrays with the same contents would not be considered equal. feels wrong to me"
13:23 masak (sorry for rough-quoting everyone -- trying to summarize the log)
13:24 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.
13:24 masak jnthn: "why?" (does example with === on camelia)
13:25 masak lizmat: "got ya -- so it means I can *not* use .WHICH as the key for 'is cached'"
13:25 masak jnthn: "no, it's just that if you pass two different arrays with the same contents, they cache diff'rently"
13:25 masak jnthn: "I don't think you can use 'is cached' in ignorance of the incoming argument types"
13:26 masak ok, and it's in light of all *that* one should read TimToady++'s comment
13:27 masak 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
13:27 [Tux] # expected: $("1", "2")
13:27 [Tux] #      got: ("1", "2").list.item
13:28 [Tux] 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)
13:29 masak [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
13:29 masak fsvo of "easy" and "workaround"...
13:29 masak smls: !!!
13:29 masak smls: yes, that's a *bug*
13:29 [Tux] is_deeply($c.x().map(~*),(1,2)) => is_deeply([$c.x().map(~*)],[1,2])
13:30 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"
13:31 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'
13:31 smls ok
13:31 masak then there's things like this, too:
13:31 masak m: say 5.gist; say 5.0.gist; say 5 eqv 5.0
13:31 camelia rakudo-moar 459c63: OUTPUT«5␤5␤False␤»
13:31 masak m: say 5.gist; say 5.0.gist; say 5.gist eq 5.0.gist; say 5 eqv 5.0
13:31 camelia rakudo-moar 459c63: OUTPUT«5␤5␤True␤False␤»
13:33 [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
13:34 TimToady [Tux]: it tries to intuit from $_ and such, but sometimes gets it wrong
13:35 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
13:35 camelia rakudo-moar 459c63: OUTPUT«0␤»
13:35 TimToady masak: well, and a well-defined stragegy for combining hashes
13:35 masak TimToady: also, some things (like filehandles) probably don't have a good immutable/eqv representation.
13:36 masak TimToady: oh, combining is easy. just xor :)
13:36 masak or do the `a + 31 * b` trick
13:37 dalek doc: 28d7b8f | (Carl Masak)++ | lib/Type/Routine.pod:
13:37 dalek doc: rewrite the 'is cached' section
13:37 dalek doc:
13:37 dalek doc: Based on feedback from smls++
13:37 dalek doc: review: https://github.com/perl6/doc/commit/28d7b8fd17
13:37 [Tux] https://gist.github.com/Tux/86f2b3cab516be190631
13:37 masak reviews appreciated. ^^
13:37 TimToady for filehandles and VAR($x) hashing the WHICH is probably as good as we can do
13:37 masak TimToady: right. that has to be an allowable fallback.
13:38 TimToady but the use case is limited
13:38 masak [Tux]: I don't know why you're surprised by that outcome.
13:38 smls TimToady: What about the *return value*, should that maybe cache a .clone instead?
13:39 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)
13:39 [Tux] I was under the impression that a sub signature is optional, and that you define 0 arguments as ()
13:39 TimToady smls: eqv semantics are supposed to snapshot as deeply as serializing would do
13:40 [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
13:40 smls the return value of the "is cached" sub is a different matter, no?
13:40 masak [Tux]: no, that's not so. thankfully.
13:40 [Tux] hmm
13:40 masak [Tux]: `sub () {}` and `sub {}` are equivalent.
13:40 TimToady if you refer to @_, then it's "any"
13:40 masak [Tux]: however, what TimToady said.
13:41 masak m: say sub () {}.arity; say sub {}.arity;
13:41 camelia rakudo-moar 459c63: OUTPUT«0␤0␤»
13:41 TimToady but it's important for optimization to know 0-arg
13:41 masak m: say sub () {}.count; say sub {}.count;
13:41 camelia rakudo-moar 459c63: OUTPUT«0␤0␤»
13:42 [Tux] ok, I get it
13:42 TimToady m: my $x = { $_ }; say $x.arity
13:42 camelia rakudo-moar 459c63: OUTPUT«0␤»
13:42 TimToady m: my $x = { $_ }; say $x.count
13:42 camelia rakudo-moar 459c63: OUTPUT«1␤»
13:42 TimToady m: my $x = { @_ }; say $x.count
13:42 camelia rakudo-moar 459c63: OUTPUT«Inf␤»
13:42 masak INFINITE ARGUMENTS
13:43 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…»
13:44 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)
13:45 masak might be useful to a being with infinite patience/RAM
13:45 masak be glad it's only *countably* infinite!
13:45 TimToady aleph out loud
13:46 * masak .oO( aleph zarro boogs found )
13:47 FROGGS_ colomon: that does not seem to be it... I bet I do something (simple) wrong when compiling the dll
13:51 [Tux] FROGGS_, can you help me with https://gist.github.com/Tux/630df763184b5ff869f4
13:57 FROGGS_ [Tux]: try that (though, untested): https://github.com/FROGGS/p6-Slang-Tuxic/com​mit/a4b160294d8de8c104a633fc2ade7a39b5f7e1dc
13:58 jnthn commute &
14:07 FROGGS_ AHHHHHHHHHHHHHHHHHHHHHHH!
14:07 masak m: class Foo:D {}; say Foo.new
14:07 camelia rakudo-moar 459c63: OUTPUT«Foo.new()␤»
14:07 * masak submits rakudobug
14:07 FROGGS_ '#ifdef WIN32' was it! -.-
14:07 FROGGS_ i.e., WIN32 is not defined
14:07 masak (the bug being that that `:D` is allowed on a class declaration)
14:08 FROGGS_ \o/ # ok 1 - sizeof(Derived1)
14:09 FROGGS_ .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.
14:09 FROGGS_ bbl
14:10 isBEKaml joined #perl6
14:15 tadzik happy woman's day to everyone elligible :)
14:18 [Tux] :)
14:18 [Tux] How *do* I define multi method new to do as expected in https://gist.github.com/Tux/623592360badd619dacf ?
14:19 virtualsue joined #perl6
14:23 TimToady What, they only get one day, and we get all the rest?!?
14:24 masak here's hoping for a future where a special day to focus on women's rights seems a lot less necessary...
14:27 tadzik there is a man's day in september or so, but I think it's pretty recent
14:28 tadzik 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 tadzik still, the "taking for granted" part is wrong more often than we'd like apparently, so the purpose is still valid
14:29 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 http://steamcommunity.com//games/236850/​announcements/detail/204124240049774312
14:30 masak that is nice, indeed.
14:31 tadzik makes everyone happier and raises awareness on things in question
14:31 tadzik well played (hrhr)
14:31 masak HR indeed
14:46 [Tux] test-x           50000    35.666    35.445  <= first time under 36
14:46 masak [Tux]: does that mean things are getting faster?
14:46 masak if so, \o/
14:46 [Tux] yes
14:46 masak \o/
14:46 [Tux] How *do* I define multi method new to do as expected in https://gist.github.com/Tux/623592360badd619dacf ? (asked again)
14:49 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 :)
14:51 [Tux] and if the setter is a public method, like «multi method new (Str $str) { $str.defined and self.add($str); }» ?
14:54 moritz [Tux]: you'll have to create the object first, before you can call the accessor
14:55 [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 }
14:55 [Tux] Ahhh, thanks
14:55 rmgk_ joined #perl6
14:55 moritz or if you want to dispatch to the parent classes new method,   my $new = callwith();
14:56 telex joined #perl6
14:58 [Tux] moritz++
14:59 zakharyas joined #perl6
15:00 moritz [Tux]: btw http://doc.perl6.org/language​/objects#Object_Construction
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 #perl6
15:00 eli-se joined #perl6
15:00 mraynham left #perl6
15:00 [Tux] method foo (Scalar $f) { $.s = $f.Str; }
15:01 kjs_ joined #perl6
15:02 moritz no
15:04 smls maybe:  method foo ($f where { $_ !~~ Positional|Associative }) { ... }
15:04 [Tux] multi method new (Num $n) { return self.new ($n.Str); }
15:07 timotimo hum
15:09 MadcapJake joined #perl6
15:14 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
15:14 jnthn .tell FROGGS_ Feel free to fix it... :)
15:14 yoleaux jnthn: I'll pass your message to FROGGS_.
15:14 * jnthn wonders how we got away with that
15:15 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... :)
15:15 jnthn Ah
15:16 jnthn 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
15:21 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␤ …»
15:22 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␤ …»
15:22 b2gills m: say .*keyof, ' => ', .*of for {}, :{}
15:22 camelia rakudo-moar 459c63: OUTPUT«(Any) => (Mu) (Mu)␤(Any) (Any) => (Any) (Mu) (Mu)␤»
15:24 fhelmberger joined #perl6
15:24 smls what's this asterisk "method twigil"?
15:25 timotimo m: say 1.*hey
15:25 camelia rakudo-moar 459c63: OUTPUT«␤»
15:25 timotimo m: say 1.hey
15:25 camelia rakudo-moar 459c63: OUTPUT«No such method 'hey' for invocant of type 'Int'␤  in block <unit> at /tmp/Add5uCOL9s:1␤␤»
15:25 timotimo m: say 1.?hey
15:25 camelia rakudo-moar 459c63: OUTPUT«Nil␤»
15:25 timotimo calls all candidates, i think?
15:25 smls m: say 5.*Str
15:25 camelia rakudo-moar 459c63: OUTPUT«5 Int<140207678599584>␤»
15:25 smls looks like
15:27 timotimo ah, Str was a good idea
15:27 timotimo m: say 5.*perl
15:27 camelia rakudo-moar 459c63: OUTPUT«5 Int.new()␤»
15:27 timotimo m: say 5.0.*perl
15:27 camelia rakudo-moar 459c63: OUTPUT«5.0 Rat.new(numerator => 5, denominator => 1)␤»
15:27 timotimo m: say 5.0e0.*perl
15:27 camelia rakudo-moar 459c63: OUTPUT«5e0 Num.new()␤»
15:34 jnthn flight &
15:44 skids joined #perl6
15:49 silug joined #perl6
15:50 timotimo you've gotta flight
15:50 timotimo for your right
15:50 timotimo to paaaaaaar-tay
15:53 FROGGS_ I remember a code listing in my Amiga ROM Kernel Reference Manual showing: "RUN DMC"
15:56 colomon Hmmm, lots of tests started failing today: http://smoke.perl6.org/report
16:06 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:08 ugexe 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:09 ugexe unless those are all your results :)
16:09 timotimo Error while compiling lib/Hinges/Markup.pm
16:09 timotimo Attribute $!source not declared in class Hinges::MarkupTemplate
16:09 timotimo how does something like this just start failing out of the blue?
16:10 timotimo oh
16:10 timotimo this module has been failing for a long time
16:10 colomon ugexe: all those results on the web page are purely generated on rakudo-moar.  No jvm involved.
16:11 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:16 * Ulti 4
16:16 Ulti erk
16:20 masak no no, if you <3 something, it can't be 4 :)
16:21 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␤»
16:22 ugexe is that how dies_ok always behaved?
16:22 Ulti nine_ I have some funtime code for generating colours http://blog.mattoates.co.uk/2012/01/g​enerating-perceptually-distinct.html
16:22 ugexe m: use Test; plan 1; dies_ok { require Fakey }, "died ok"
16:22 camelia rakudo-moar 459c63: OUTPUT«1..1␤ok 1 - died ok␤»
16:23 raiph joined #perl6
16:23 Ulti nine_ I have an improved version which I can port to a P6 module
16:25 Ulti masak I just missed off the 2 :P
16:31 yqt joined #perl6
16:40 kjs_ joined #perl6
16:43 skids Ulti: you may want to check out http://www.sron.nl/~pault/colourschemes.pdf
16:49 espadrine_ joined #perl6
16:52 Ulti I really dont :P since that's more effort
16:52 Ulti regardless of being colour blind once you get up to using ~100 colours things have gone wrong
16:52 Ulti 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.
16:53 Ulti skids I have a friend who essentially doesnt have colour vision
16:54 Ulti I never really noticed which is kind of impressive
16:56 Ulti 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 #perl6
17:03 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:06 Ulti skids it is a nice doc thanks for linking, I doubt I would ever have found it otherwise!
17:10 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␤»
17:10 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«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␤␤»
17:11 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␤»
17:11 timotimo i don't understand why hinges fails
17:15 timotimo erm, not hinges
17:15 timotimo i meant breakdancer
17:15 timotimo http://testers.p6c.org/reports/21882.html - it's a kind of parse error that doesn't seem obvious to me at all
17:16 timotimo i can make it pass by adding ; after the }, but since they also have newlines after the } already, that shouldn't change anything
17:27 mohij joined #perl6
17:44 dpuu m: say %(:a(1), :b(2)) == %(:b(2), :a(1))
17:44 camelia rakudo-moar 459c63: OUTPUT«True␤»
17:44 dpuu m: use Test; is %(:a(1), :b(2)), %(:b(2), :a(1))
17:44 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'␤»
17:47 timotimo == will turn both arguments into numbers
17:47 timotimo m: say +%(:a(1), :b(2))
17:47 camelia rakudo-moar 459c63: OUTPUT«2␤»
17:47 timotimo m: say +%(:b(2), :a(1))
17:47 camelia rakudo-moar 459c63: OUTPUT«2␤»
17:47 dpuu Ah. But should'd "is" compare hashes as unordered?
17:47 timotimo you want eqv, probably
17:48 colomon “is” tests to see if two strings are equal
17:48 colomon not hashes or numbers or whatnot.
17:49 dpuu m: use Test; is_deeply %(:a(1), :b(2)), %(:b(2), :a(1))
17:49 camelia rakudo-moar 459c63: OUTPUT«ok 1 - ␤»
17:49 timotimo don't we have something like "is_deeply"? or is that in Test::More?
17:50 lizmat m: use Test; is_deeply {}, {}
17:50 camelia rakudo-moar 459c63: OUTPUT«ok 1 - ␤»
17:51 lizmat should probably be called "is-deeply", but that is another issue  :-)
17:56 Ugator joined #perl6
18:05 raiph joined #perl6
18:15 xfix I have a question
18:15 xfix http://eev.ee/blog/2015/02/28/sylph-the-prog​ramming-language-i-want/#comment-1882478235 - what is Slang::Snake?
18:16 lizmat a Python clone in Perl 6
18:16 lizmat ?
18:16 xfix I cannot find it.
18:16 xfix But it feels like a real thing, because other mentioned slang, Slang::Tuxic does exist.
18:16 lizmat Slang::Piers also, no?
18:17 lizmat 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)␤»
18:17 xfix https://github.com/FROGGS/p6-Slang-Piersing
18:17 xfix Yep, this is Ruby-like, I assume.
18:17 lizmat yeah, it was about allowing ? and ! at the end of identifiers, afaik
18:19 lizmat 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)␤»
18:19 xfix I would like to code Perl 6 code without semicolons at end of lines.
18:19 xfix (just like I do in JavaScript)
18:20 lizmat perhaps Slang:;Tuxic/Piersing provide the right inspiration ?
18:20 lizmat I would suggest Slang::Xfixing as name  :-)
18:21 perturbation joined #perl6
18:21 xfix Semicolons are actually one of these things I dislike in Perl 6, but I understand it's part of Perl 6 design.
18:22 xfix 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?
18:22 timotimo i thought slang was just a compiler based on NQP and HLL::Compiler
18:22 xfix I don't know, the comment I linked to refers to Slang::Snake.
18:22 xfix "You could even try creating it in Perl 6 with a slang ( see Slang::Snake and Slang::Tuxic )."
18:23 xfix b2gills: Can you tell me what is Slang::Snake?
18:24 [Tux] xfix, Slang::Tuxic is about http://Tux.nl/style.html - I do not expect you to agree
18:25 xfix okay, wat
18:26 b2gills left #perl6
18:26 xfix Uhm, okay.
18:26 b2gills joined #perl6
18:26 kjs_ joined #perl6
18:26 timotimo https://github.com/arnsholt/snake/ - the only snake i know
18:27 xfix Hm, that may as well be that, even if not Slang::Snake.
18:27 xfix Tuxic style is quite odd, but at the same time, I see internal consistency.
18:27 xfix If it works for its author, it's fine.
18:28 [Tux] it works for the author (me), so it *is* fine :)
18:28 b2gills maybe I combined Slang::SQL and Snake in my mind
18:29 xfix Eh, happens. So there is no Slang::Snake for no semicolons style.
18:30 molaf joined #perl6
18:31 perl6_newbee joined #perl6
18:35 xfix In JavaScript, I usually use Stroustrup style without semicolons.
18:36 xfix [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:37 dalek roast: 33d5415 | lizmat++ | S (4 files):
18:37 dalek roast: Remove rakudo implementation specific tests
18:37 dalek roast: review: https://github.com/perl6/roast/commit/33d5415548
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
18:38 xfix I see.
18:38 xfix I should make a slang for myself with no semicolons.
18:47 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 masak 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.
18:48 xfix One of issues is that you cannot start lines with open paren.
18:48 xfix I usually do ;( in this case.
18:48 masak I rest my case.
18:48 xfix But other than that, it's quite safe.
18:49 xfix (you also cannot start lines with some other syntax elements, but why you would start a line with regular expression)
18:50 masak TimToady: thank you for not making semicolons optional in Perl ;)
18:51 osfameron haskell's optional semicolons are fine, otoh, as the layout rules are just sugar and are consistent and easy to reason about
18:52 zakharyas joined #perl6
18:58 eli-se joined #perl6
18:59 masak m: say (foo => 42).antipair
18:59 camelia rakudo-moar 459c63: OUTPUT«42 => foo␤»
18:59 masak how about that.
18:59 * masak is catching up with recent doc changes
19:03 ugexe thats p cool
19:07 spider-mario joined #perl6
19:11 sisar joined #perl6
19:12 sisar "Parallel Processing with Promises" https://queue.acm.org/detail.cfm?id=2742696
19:30 bcode joined #perl6
19:32 yqt joined #perl6
19:33 FROGGS_ C:\rakudo>perl6-m -e "say 'dumpbin /exports foo.dll'.IO"
19:33 FROGGS_ "C:\rakudo\dumpbin \exports foo.dll".IO
19:34 jnthn schiesse!
19:34 FROGGS_ lizmat: does the slash conversion happen in IO::Spec::Windows?
19:34 FROGGS_ jnthn: almost :o)
19:34 jnthn Though if you're saying .IO I think it is reasonable for it to treat it as a path
19:34 lizmat slash conversion is still only in newio
19:34 lizmat :-(
19:34 FROGGS_ jnthn: pipe($path) calls $path.IO
19:35 jnthn oops
19:35 jnthn I suspect it maybe should not od that ;)
19:35 jnthn *do
19:35 FROGGS_ but the IO::Handle.open shall not expect to have an IO-thingy in its $!path
19:35 FROGGS_ then*
19:36 lizmat jnthn: could you try removing the .IO in sub pipe ?
19:36 lizmat I'm in the middle of something else
19:36 FROGGS_ lizmat: I did that already
19:37 FROGGS_ 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...
19:37 lizmat FROGGS_++
19:38 FROGGS_ m: say nqp::istype('foo'.IO, IO)
19:38 camelia rakudo-moar 459c63: OUTPUT«0␤»
19:39 lizmat IO.Path is Cool, does not does IO
19:39 lizmat at least, before newio
19:58 FROGGS_ omg, we are turning forward slash to backslash in moarvm's MVM_file_openpipe >.<
19:59 lizmat why o why if win supports forward slashes ?
19:59 FROGGS_ lizmat: I'm not sure
20:02 FROGGS_ hmmmm, I added it when I implemented openpipe (together with hoelzro++)
20:05 FROGGS_ nice, I do not need to touch rakudo at all it seems
20:06 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
20:07 FROGGS_ lizmat: I dont know of any
20:08 lizmat I could use it for Bags
20:13 atweiden joined #perl6
20:14 raydiak good now() #perl6
20:16 * raydiak notices parens don't work on now
20:16 raydiak anyway, anyone have thoughts about http://irclog.perlgeek.de/p​erl6/2015-03-08#i_10242099 ?
20:18 xfix Threads are so neat... when you do them in functional style.
20:18 masak raydiak: `now` is a term, not a sub.
20:21 dalek rakudo/nom: fb3f1d5 | lizmat++ | src/core/Int.pm:
20:21 dalek rakudo/nom: Implement UInt (naively, I might add)
20:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fb3f1d55d8
20:22 * TimToady thinks we need to look at everything that has got into Cool and kick about half of them out
20:22 dalek roast: 8935b10 | lizmat++ | S02-types/WHICH.t:
20:22 dalek roast: Add check for UInt
20:22 dalek roast: review: https://github.com/perl6/roast/commit/8935b10f4f
20:22 masak TimToady: +1
20:23 lizmat tell me which half, and I will kick  :-)
20:23 TimToady what is the numeric value of an IO.Path?
20:23 masak "no".
20:24 vendethiel :D
20:24 TimToady Cool is mostly just for number vs string interchange
20:24 lizmat /foo/bar/42  would give 42
20:24 lizmat /foo/bar/baz  would give an error
20:24 TimToady that's not cool
20:25 lizmat fwiw, I've used epoch as filenames extensively at former $work
20:25 lizmat it makes a lot of things a lot easier
20:26 zakharyas joined #perl6
20:27 masak that's fair enough, but even for epoch-as-filename, I'd prefer to see that being written out as code.
20:27 masak something like +$path.filename is not at all unreasonable.
20:27 lizmat m: say 42.IO + 23
20:27 camelia rakudo-moar 459c63: OUTPUT«65␤»
20:28 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
20:28 camelia rakudo-moar 459c63: OUTPUT«65␤»
20:28 TimToady and we can certainly provide direct conversion for string contexty things, but going through Cool seems overkill
20:28 lizmat fair enough  :-)
20:31 TimToady and the whole point of having paths is that even strings are a feyl
20:32 TimToady (unless you know exactly what OS you're on)
20:35 * TimToady is crabby today, and should go take a geezer nap...
20:35 TimToady zzz &
20:37 * osfameron would never have imagined TimToady referring to self as a geezer :-)
20:38 masak it's not the first time
20:39 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 #perl6
20:45 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:46 lizmat flussence: anybody can create an other "is cached" mechanism
20:46 flussence oh, problem solved then!
20:46 lizmat well, the synopses are a bit slushy on that matter  :-)
20:47 lizmat S06:2108 for the interested
20:47 synopsebot Link: http://design.perl6.org/S06.html#line_2108
20:48 FROGGS_ raydiak: I just dont have an answer, 's all :o)
20:50 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
20:52 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:53 dalek rakudo/cpp: 05ec0ca | FROGGS++ | t/04-nativecall/1 (4 files):
20:53 dalek rakudo/cpp: make C++ tests windows friendly and skip if we cant compile
20:53 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/05ec0cadbf
20:53 masak 'night, #perl6
20:54 raydiak gnight masak
20:54 lizmat good niight, masak
20:54 raydiak thanks for taking a look FROGGS_
20:54 lizmat spectesting fix now
20:56 dalek rakudo/cpp: 9169f3a | FROGGS++ | t/04-nativecall/ (11 files):
20:56 dalek rakudo/cpp: use more portable _WIN32 define instead of WIN32
20:56 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/9169f3a134
21:00 lizmat $ 6 '({},:{})>>.of.say'
21:00 lizmat (Any) (Any)
21:00 lizmat raydiak:  ^^
21:00 raydiak lizmat++: cool thanks!  you sure have a quick turnaround for issues raised on IRC lately :)  Array too?
21:01 dalek rakudo/nom: 5122bcf | lizmat++ | src/core/Cool.pm:
21:01 dalek rakudo/nom: Implement .UInt coercer
21:01 dalek rakudo/nom:
21:01 dalek rakudo/nom: Implemented in Cool, as .Int also lives in Cool.  Should probably live in Any.
21:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5122bcfc6d
21:01 dalek rakudo/nom: a595b97 | lizmat++ | src/core/Hash.pm:
21:01 dalek rakudo/nom: Give {}.of/default/dynamic more sensible values
21:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a595b9718d
21:02 lizmat raydiak: in a mo
21:02 timotimo i wonder why XML fails in some reports and not in others (== mine)
21:04 * 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:05 lizmat raydiak: I implemented those at the time, I seem to recall
21:05 lizmat and wasn't as versed in rakudo then as I am now  (it's gotten better :-)
21:06 lizmat the problem with {} and [] is that they internally did not allocate a Hash / Array yet
21:06 lizmat so there are no attributes to query yet
21:07 dalek rakudo/nom: 0813412 | lizmat++ | src/core/Array.pm:
21:07 dalek rakudo/nom: Give [].of/default/dynamic more sensible values
21:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/08134123e0
21:08 colomon m: say ‘™’   ~~ /<[\xA0..\xD8FF \xE000..\xFFFD]>{}/
21:08 camelia rakudo-moar fb3f1d: OUTPUT«「™」␤»
21:08 colomon m: if  ‘™’   ~~ /<[\xA0..\xD8FF \xE000..\xFFFD]>{}/ { say $/.ord }
21:08 camelia rakudo-moar fb3f1d: OUTPUT«8482␤»
21:09 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;␤»
21:12 raydiak lizmat: ah I see
21:13 * raydiak needs to collect some less obnoxiously repetitve words for gratitude other than thanks and ++ over and over :)
21:14 raydiak .oO( though at least there's that... '++'++ )
21:15 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++  :-)
21:16 mst :D
21:16 * mst hugs lizmat
21:16 * lizmat blushes
21:16 colomon huh.  the ≂̸ symbol in HTML::Entity breaks my text editor
21:17 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:18 raydiak mst: that's probably true, hadn't considered it...if only I shared the same invulnerability :)
21:19 perigrin left #perl6
21:21 colomon Mouq: just sent you a pull request for HTML::Entity
21:27 Mouq colomon++
21:33 FROGGS_ hmmm, how do I re-export symbols?
21:37 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␤------> ␤»
21:38 Mouq (I'm thinking that's a bug…)
21:39 Mouq 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␤»
21:40 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␤»
21:42 FROGGS_ Mouq++
21:42 FROGGS_ got it
21:42 kaare_ joined #perl6
21:45 skids joined #perl6
21:46 bayprogrammer joined #perl6
21:58 dalek rakudo/cpp: 5090c1b | FROGGS++ | / (3 files):
21:58 dalek rakudo/cpp: implement C++ name mangling for Windows/MSVC
21:58 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/5090c1bcf4
22:02 cognominal joined #perl6
22:05 dalek rakudo/cpp: e231ede | FROGGS++ | lib/NativeCall/ (3 files):
22:05 dalek rakudo/cpp: add new NativeCall submodules
22:05 dalek rakudo/cpp: review: https://github.com/rakudo/rakudo/commit/e231ede92b
22:05 dalek roast: 8daa895 | lizmat++ | S32-array/perl.t:
22:05 dalek roast: Fix breakage caused by [].of returning Any now
22:05 dalek roast: review: https://github.com/perl6/roast/commit/8daa8958db
22:07 BenGoldberg joined #perl6
22:10 raydiak FROGGS++ # fixes for 90% of the world's PCs (and a quarter of the servers)
22:10 raydiak 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?
22:12 jnthn raydiak: It's actually in NQP
22:12 jnthn Under src/vm/moar/ somewhere
22:12 FROGGS_ raydiak: nqp/src/vm/moar/HLL/Backend.nqp:52:    method dump_profile_data($data, $filename) {
22:12 jnthn Moar hands back a data structure
22:13 jnthn 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 :)
22:13 raydiak and yeah that was probably wise...wasn't looking forward to working with C for HTML generation
22:14 FROGGS_ yeah
22:15 FROGGS_ 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:23 jnthn FROGGS_: OK. I'm afraid it's going to be Thursday before I can really concentrate much on stuff here :(
22:24 FROGGS_ jnthn: no problem
22:29 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:30 raydiak 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.
22:31 jnthn raydiak: I did just shove the thing as a huge literal originally
22:31 jnthn And the result was...a stack overflow error?!
22:32 jnthn Apparently, a sufficiently deeply nested literal can get you this o.O
22:32 raydiak heh nice :P
22:33 raydiak ah well, it might even be faster than parsing as full JS these days anyway
22:33 jnthn Very possibly.
22:33 jnthn I don't think thta's where the slow is, tbh.
22:34 jnthn It's the addiction to angularjs list bindings probably
22:35 mohij joined #perl6
22:35 raydiak alright, I'll go read up on that; haven't used angular myself
22:36 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 ca
22:37 jnthn Unfortunately, the thing you put together might not work darn fats. :)
22:37 jnthn *fast
22:38 Timbus angularjs fires events on data being changed, but it constantly polls data structures to see if any changes have been made
22:39 jnthn Hm. And we have a rather large data structure. :)
22:39 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 Yeah, that fits. Makes for very fast "make it work".
22:40 mr-foobar joined #perl6
22:40 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 :/
22:45 jnthn raydiak: Not sure what the best path is; I don't do huge amounts of web stuff these days.
22:45 raydiak me neither which is...never thought I'd say it...kinda sad
22:46 raydiak is there anything preventing us from having independent profiler modules in the ecosystem like p5 Devel::*Prof?
22:46 telex joined #perl6
22:46 FROGGS_ m: my int $foo = 42; $foo++; say $foo
22:46 camelia rakudo-moar 081341: OUTPUT«43␤»
22:47 FROGGS_ this might be done: https://github.com/rakudo/rak​udo/blob/nom/docs/ROADMAP#L39
22:47 jnthn raydiak: Sort of in that they'd be fairly backend specific
22:47 jnthn raydiak: Also, I'm not sure Moar's public API exposes the needed stuff sufficiently yet
22:47 jnthn FROGGS_: It is :)
22:48 FROGGS_ L51 could be considered done too
22:48 FROGGS_ L67 too
22:48 jnthn I'm not sure what the missing bits of enums are :)
22:49 FROGGS_ and L69 and L84
22:49 FROGGS_ jnthn: me neither :o)
22:49 jnthn Given Inline::Perl5, perhaps L64 :)
22:49 FROGGS_ that's why I consider enums 'done'... they do all I every wanted :o)
22:49 FROGGS_ aye
22:50 FROGGS_ I remove all I mentioned...
22:51 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:52 raydiak e.g. just .wrap everything...though you'd lose all the GC and JIT stats and stuff like that too
22:53 dalek rakudo/nom: 4e8cd3a | FROGGS++ | docs/ROADMAP:
22:53 dalek rakudo/nom: remove items that I consider done, and prioritize NFG
22:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4e8cd3a163
22:55 jnthn raydiak: Yeah, it's one of those things I think really wants doing at VM level
22:55 jnthn raydiak: I can kinda see Moar some day allowing userland implementations of instrumentation
22:55 jnthn A kind of "meta-interpreter protocol" if you like :)
22:55 jnthn But it's not high on the todo list.
22:56 kjs_ joined #perl6
22:57 * raydiak reads "meta-interpreter" and stops there, head floating away in spinny metaidea circles :)
22:59 FROGGS_ gnith
22:59 FROGGS_ gnight*
23:02 Ben_Goldberg joined #perl6
23:10 * jnthn takes an early night...teaching tomorrow :)
23:10 jnthn &
23:11 raydiak o/
23:12 lizmat good night jnthn
23:15 dalek rakudo/nom: cd7c31c | lizmat++ | src/core/ (9 files):
23:15 dalek rakudo/nom: Streamline Set/Bag/Mix(Hashes)
23:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd7c31c6b5
23:16 lizmat and on that note, also getting some sleep&
23:16 raydiak good night lizmat
23:17 raydiak 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:20 raydiak 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:33 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:34 raydiak or at least another section in the roadmap maybe
23:40 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:43 raydiak (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:47 * raydiak wonders how many of those bug reports should fall away with parrot support
23:50 vendethiel joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo