Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-29

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 psch not me, i'm still mostly segfaulting
00:01 skids When I was playing with librhash/libmhash there was no fast way -- it was a choke point.
00:01 raydiak my segfaults all come from concurrency or precomp :)
00:01 psch mine currently come from callbacks
00:01 psch although i did hit a few moar-internal NYIs
00:05 raydiak yep looks like it's my choke point too...I mean even just an empty loop takes dozens of seconds for the number of iterations I need
00:20 skids Also doesn't help that CArray[int] is a) signed and b) endian-sensitive and c) sizeof(int) sensitive.  But as I understand it help is on the way :-)
00:22 skids this was my attempt at the time: https://gist.github.com/skids/d5990725c9d611d924c9
00:23 pierrot joined #perl6
00:24 dalek doc/Edit-the-class-SetHash-page: 5b04517 | (Cole Keirsey)++ | lib/Type/SetHash.pod:
00:24 dalek doc/Edit-the-class-SetHash-page: Added example code and fixed a broken link
00:24 dalek doc/Edit-the-class-SetHash-page:
00:24 dalek doc/Edit-the-class-SetHash-page: I added the union operator to the example code at lines 68 and 74.  I (hopefully) fixed the broken link to the setbagmix page at line 77.
00:24 dalek doc/Edit-the-class-SetHash-page: review: https://github.com/perl6/doc/commit/5b045174ba
00:27 raydiak skids: oh also good to know; thanks
00:30 raydiak what about just initializing a CArray to a certain (large) number of zeroes?  is there a fast way to do that?  if so I guess I could switch from Blob to CArray in my app, and use Compress::Zlib::Raw instead of the wrapper
00:31 skids I imagine just setting a high index would cause a CArray to size out.
00:31 skids e.g. line 85 of the gist.
00:32 abraxxa1 joined #perl6
00:35 raydiak m: use NativeCall; my $buf = CArray[uint8].new; $buf[4] = 1; say $buf[$_] for ^5;
00:35 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Could not find NativeCall in any of: /home/camelia/rakudo-inst-1/languages/perl6/lib, /home/camelia/rakudo-inst-1/languages/perl6␤»
00:35 raydiak oh right, we wouldn't want that in restricted setting anyway
00:37 raydiak hm, it sizes but doesn't zero-fill
00:37 skids Heh.  Wonder what's in it.
00:38 raydiak idk...random deallocated memory stuffs?
00:38 skids The other problem I was wrestling with in the gist was how to make a module only optionally depend on NativeCall and also c-libs, with pure-perl fallback.
00:38 ribasushi joined #perl6
00:40 skids star: use NativeCall; my $buf = CArray[uint8].new; $buf[4] = 1; say $buf[$_] for ^5;
00:40 camelia star-p 2014.12: OUTPUT«-32␤-17␤90␤7␤1␤»
00:40 camelia ..star-m 2014.12: OUTPUT«120␤118␤-80␤-59␤1␤»
00:41 raydiak oh right...star has modules :)
00:43 DarthGandalf joined #perl6
00:45 raydiak couldn't you just call a relevant native function in a try block, and select the implementation to use based on success/failure?
00:46 kurahaupo joined #perl6
00:47 skids Yeah I think I tried that and the problem is that if you use e.g. a CArray type in the file it bombs, and there's no way to harmlessly stub the "CArray[int]" type name as it is peculiarly implemented.
00:48 skids Hmmm... I don't think I had CArray[uint8] available at my disposal when last I tried.
00:48 skids Though obviously it's just faking with CArray[int8] but anyway maybe I should give it another go.
00:53 lestrrat joined #perl6
00:59 raydiak yeah I think I'm pretty much at an impasse until I can either get a whole blob into a CArray at once, or iterate over the values in reasonable time, or at least even zero-fill a CArray quickly (though the 0-fill option is important to have, it would only provide a LTA workaround in my case)
01:04 skids Well, you could pass the CArray to a libc memset.
01:11 raydiak oh true...idk C much, would that be fairly portable?
01:12 skids I would imagine, if loading libc portably is possible.
01:12 skids I pretty much never test anything on Win, so I wouldn't know.
01:17 araujo joined #perl6
01:19 raydiak think I'll hold off for now and see if the things I'm using improve before I get back around to breaking down and building it out of fiddly native bits, given that the module's name ends with "::Portable" :P
01:22 japhb joined #perl6
01:22 raydiak thanks for the advice skids++, good to know where things stand...if you do work on it again and end up with a portable solution, let me know :)
01:30 lue joined #perl6
01:42 tadzik masak: possible; my readmes tend to be as descriptive as "polar bears are left-handed" or so
01:46 vendethiel are they? :op
01:47 colomon vendethiel: he said descriptive, not factually accurate.
01:47 colomon ;)
01:51 vendethiel *g*
01:51 tadzik I think they are though :)
01:52 tadzik otherwise all me readmes are wrong... :P
01:52 tadzik I went to bed at 20, to get good sleep and wake up early to get work done
01:52 tadzik woke up at 2 :|
01:52 tadzik (AM)
02:11 DarthGandalf joined #perl6
02:14 Peter_R tadzik, means you've got an extra few hours in your day :) </glass half full>
02:17 tadzik Peter_R: heh, I'm afraid I'll end up falling asleep again at 4 and being supertired when I wake up in the actual morning :)
02:17 tadzik but, we'll see
02:18 Peter_R coffee, nicotine, speed, cocaine, in that order, as needed
02:18 Peter_R Probably should put redbull in there somewhere
02:22 skids bah, never ruin a good speed run with caffeine.
02:23 pi314 joined #perl6
02:26 yeahnoob joined #perl6
02:36 adu joined #perl6
02:39 gtodd1 should there be a bit more info on meta/hyper/cross operators on the operators page of the main docs? http://doc.perl6.org/language/operators
02:42 gtodd1 a short summary with a link to another docs.perl6.org page more detail and few examples  ... i.e. something like:  http://rosettacode.org/wiki/Element-wise_operations#Perl_6 http://en.wikibooks.org/wiki/Perl_6_Programming/Meta_Operators
02:45 skids looks like metas like X mention they are metas along with the doc for the vanilla flavor.
02:45 gtodd yeah but I think it would be distracting to sprinkle *all* of them about in the list of main operators -- some sort of general statement about meta-ness with link to more details
02:45 gtodd might work better
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:54 colomon hrmm, whole batch of failures on the tests overnight.  http://smoke.perl6.org/report
02:56 vendethiel joined #perl6
03:02 skids Any way to see the fails?
03:03 colomon nothing other than trying to run them yourself
03:03 skids I'll be asleep before I can compile a daily :-)
03:04 skids hrm cpandatesters not respoding.
03:05 eternaleye_ joined #perl6
03:08 grep0r joined #perl6
03:19 Mso150 joined #perl6
03:30 noganex_ joined #perl6
03:37 Mso150_e joined #perl6
03:38 pierrot joined #perl6
03:39 vendethiel joined #perl6
03:39 Mso150 joined #perl6
03:42 kurahaupo joined #perl6
04:08 raiph joined #perl6
04:15 tony-o_ does cpandatesters have a git repo?
04:19 vendethiel joined #perl6
04:22 raiph tony-o_: https://github.com/perl6/cpandatesters.perl6.org ?
04:27 kaleem joined #perl6
04:29 raiph m: say (6;)
04:29 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
04:30 raiph m: say [6;]
04:30 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
04:30 raiph m: say (6 ;)
04:30 camelia rakudo-moar 166cd3: OUTPUT«6␤»
04:30 raiph m: say (6\ ;)
04:30 camelia rakudo-moar 166cd3: OUTPUT«6␤»
04:31 raiph m: say (66;)
04:31 camelia rakudo-moar 166cd3: OUTPUT«66␤»
04:31 raiph m: say ( 6;)
04:31 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'flat'␤»
04:34 asdf12z_ joined #perl6
04:34 telex joined #perl6
04:34 raiph m: say (2,3,4; 5,6,7; 8,9,0)
04:34 camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 8 9 0␤»
04:35 raiph m: say (2,3,4; 5,6,7; 6; 8,9,0) # add a lone 6; anywhere and boom
04:35 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Unknown QAST node type NQPMu␤»
04:36 asdf12z_ web framework in perl6?
04:39 grep0r joined #perl6
04:39 raiph asdf12z_: catalyst? :)
04:40 raiph m: (6;) # above bug, golfed, about to rakudobug
04:40 camelia rakudo-moar 166cd3: OUTPUT«===SORRY!===␤Cannot find method 'returns'␤»
04:41 raiph asdf12z_: there's bailador
04:43 PZt joined #perl6
04:44 vendethiel joined #perl6
04:46 bcode_ joined #perl6
04:47 gargamel joined #perl6
04:47 raiph m: say (2,3,4; 5,6,7; 5,6; 8,9,0) # 5,6; is fine
04:47 camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 5 6 8 9 0␤»
04:48 raiph m: say (2,3,4; 5,6,7; 5+1; 8,9,0) # 5+1; is fine
04:48 camelia rakudo-moar 166cd3: OUTPUT«2 3 4 5 6 7 6 8 9 0␤»
04:51 raiph is borked in my december R too
05:19 vendethiel joined #perl6
06:21 raydiak .tell skids thank you very much skids++, your help seems to have solved my problem: https://github.com/raydiak/Image-PNG-Portable/commit/89a900424c2ea85c78ead4bfaa544fc85471624d
06:21 yoleaux raydiak: I'll pass your message to skids.
06:21 yeahnoob joined #perl6
06:21 raydiak .oO( doublekarma )
06:34 raydiak does the no-longer-documented DESTROY still work? what should I use instead? I used malloc via nativecall and stored the pointer in an attribute, and need to ensure free gets called when the object is destroyed
06:52 kjs_ joined #perl6
06:59 virtualsue joined #perl6
07:13 bjz joined #perl6
07:18 yakudza Hello, #perl6!!!
07:18 yakudza can I run perl6 on android and draw some graphics ?
07:19 yakudza or just console utilites
07:25 darutoko joined #perl6
07:37 kaleem joined #perl6
07:39 raydiak yakudza: I don't think anyone has tried rakudo on android in a very long time, but I don't think it was ever done successfully
07:45 yakudza the time has come.
07:45 yakudza i'll try
07:45 yakudza (:
07:48 [Sno] joined #perl6
07:50 espadrine joined #perl6
07:50 dalek doc: 5b04517 | (Cole Keirsey)++ | lib/Type/SetHash.pod:
07:50 dalek doc: Added example code and fixed a broken link
07:50 dalek doc:
07:50 dalek doc: I added the union operator to the example code at lines 68 and 74.  I (hopefully) fixed the broken link to the setbagmix page at line 77.
07:50 dalek doc: review: https://github.com/perl6/doc/commit/5b045174ba
07:50 dalek doc: 2ab9f24 | FROGGS++ | lib/Type/SetHash.pod:
07:50 dalek doc: Merge pull request #44 from perl6/Edit-the-class-SetHash-page
07:50 dalek doc:
07:50 dalek doc: Added example code and fixed a broken link - fixes #43
07:50 dalek doc: review: https://github.com/perl6/doc/commit/2ab9f240d5
08:05 bjz joined #perl6
08:06 FROGGS joined #perl6
08:07 zakharyas joined #perl6
08:10 dalek ecosystem: d0f68d4 | Adrian++ | META.list:
08:10 dalek ecosystem: Add Webservice::Lastfm to ecosystem
08:10 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d0f68d453c
08:14 avuserow oh, I guess there's already a WebService:: module. If people like WebService instead of Webservice, then I'll rename this module.
08:17 Kristien joined #perl6
08:18 prime joined #perl6
08:19 fhelmberger joined #perl6
08:19 avuserow actually it looks like WebService is preferred on CPAN so I'll give it a rename tomorrow
08:20 * avuserow sleep &
08:20 jack_rabbit joined #perl6
08:23 danaj joined #perl6
08:27 TimToady I'm a little bit worried, perhaps unnecessarily so, that the recent change to coercers to take multiple arguments will result in enormous confusion between coercers and composers/constructors; for example the difference between coercion of set-like object to a set vs composing a set of its elements
08:28 TimToady it's one thing if the coercer recognizes a list that was generated because there was a comma, and knows how to coerce a List to the desired type
08:29 grondilu joined #perl6
08:29 TimToady it's another thing if people start writing Foo coercers that function like Foo.new with arbitrary arguments
08:29 TimToady this isn't Python, where we write Foo() to call a constructor
08:30 TimToady and I suspect that will be an attractive nuisance
08:33 Kristien m: say((1, 2, 3) === (1, 2, 3)); say((1, 2, 3) === Parcel([1, 2, 3]))
08:33 camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
08:33 Kristien hmm
08:34 raydiak yakudza: \o/ good luck, let us know how it goes...I think the last serious attempt failed due to memory constraints
08:34 moritz m: say Parcel([1,  2, 3]
08:34 camelia rakudo-moar 166cd3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/YkZTFmurLeâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/YkZTFmurLe:1â�¤------> [32msay Parcel([1,  2, 3][33mâ��[31m<EOL>[0mâ�¤Â»
08:34 moritz m: say Parcel([1,  2, 3]).elems
08:34 camelia rakudo-moar 166cd3: OUTPUT«3␤»
08:34 moritz m: say 42 for  Parcel([1,  2, 3])
08:34 camelia rakudo-moar 166cd3: OUTPUT«42␤42␤42␤»
08:34 moritz huh, it's a flat one
08:34 * moritz is slightly surprised
08:34 Kristien I think it doesn't copy the elements but stores a pointer to the array.
08:35 Kristien and then uses WHICH on the array for ===
08:35 moritz m: my $p = Parcel([1,  2, 3]); $p[1] = 42; say $p
08:35 camelia rakudo-moar 166cd3: OUTPUT«1 42 3␤»
08:35 Kristien huh I thought parcels were immutable
08:35 moritz Kristien: the difference is that [] constructs an array, and an array stores all its elements in containers
08:35 moritz Kristien: so the parcel created that way has containers
08:35 Kristien ooh I see
08:35 TimToady so it's making a parcel of the containers rather than teh values
08:36 moritz Kristien: yes, the parcel itself is immutable, but the things stored in there aren't
08:36 TimToady m: my $p = Parcel([1,  2, 3].values); $p[1] = 42; say $p
08:36 camelia rakudo-moar 166cd3: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method assign_pos at src/gen/m-CORE.setting:8531␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3281␤  in block <unit> at /tmp/jESOTC89Q_:1␤␤»
08:37 moritz that's a weird one
08:37 TimToady m: [1,  2, 3].values.WHAT
08:37 camelia rakudo-moar 166cd3: ( no output )
08:37 TimToady m: [1,  2, 3].values.WHAT.say
08:37 camelia rakudo-moar 166cd3: OUTPUT«(List)␤»
08:38 TimToady m: my $p = Parcel.new([1,  2, 3].values); $p[1] = 42; say $p
08:38 camelia rakudo-moar 166cd3: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in method assign_pos at src/gen/m-CORE.setting:8531␤  in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:3281␤  in block <unit> at /tmp/WYsmGp2rAM:1␤␤»
08:39 El_Che TimToady: how was the flight?
08:39 moritz m: my $p = Parcel.new([1,  2, 3].values); sau $p.elems
08:39 camelia rakudo-moar 166cd3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kwtpgmeHvKâ�¤Undeclared routine:â�¤    sau used at line 1. Did you mean 'say'?â�¤â�¤Â»
08:39 TimToady hoelzro: anyway, see discussion above for a potential problem with switching coercions to |args
08:39 moritz m: my $p = Parcel.new([1,  2, 3].values); say $p.elems
08:39 camelia rakudo-moar 166cd3: OUTPUT«1␤»
08:39 TimToady El_Che: fine
08:39 * moritz argues that this inconsistency is a bug
08:39 DieGraueEminenz joined #perl6
08:40 * TimToady argues that moritz is misunderstanding the difference between OO coercion and FP composition
08:41 moritz m: say Parcel.new([1, 2, 3]).elems; say Parcel.new([1, 2, 3].values).elems;
08:41 camelia rakudo-moar 166cd3: OUTPUT«1␤1␤»
08:41 moritz oh
08:41 moritz somehow I thought the first one said 3
08:42 xfix joined #perl6
08:42 moritz TimToady: you might be right, but I retract my point about it being inconsistent
08:43 TimToady I mean, OO does composition too, but it does so with constructors rather than via coercion
08:46 Kristien m: say .WHAT, .Parcel === (1, 2, 3) given [1, 2, 3].map({ $_ })
08:46 camelia rakudo-moar 166cd3: OUTPUT«(List)False␤»
08:46 TimToady and the reason we have a set composer is so that there's not a big discontinuity in semantics between Set($foo) and Set($foo,$bar), where the former is a direct 1-to-1 here's how you change a $foo into a Set, whereas the latter suddenly becomes a composer that doesn't "work right" in the degenerate case of a 1-element list
08:46 TimToady so we really need to keep those two usages distinct
08:47 dalek rakudo/newio: a7769c5 | lizmat++ | src/core/io_operators.pm:
08:47 dalek rakudo/newio: Implement move($from,$to)
08:47 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/a7769c5374
08:53 TimToady another very significant difference between Set.new() (aka set()) and Set() is that the composer/construct *must* make a new object, while Set() merely enforces that the result will match Set, and may be a no-op if it already matches Set.
08:54 TimToady and I don't know how we enforce the distinction if poeple start using the |args in coercers to function as constructors; this seems like a difficult thing to enforce culturally, and people will get themselves in trouble
08:55 TimToady or maybe people will just accept the complete semantic discontinuity at the presence of a comma, I dunno
08:56 TimToady maybe it's just a big DWIM with an only slightly smaller WAT
08:56 lizmat the reminds me of the whole Parcel mess:  It's a Parcel if there is a comma.  Or if it's an empty list.
08:56 lizmat fortunately, that will be going away
08:56 TimToady well, we just swept all that under the carpet of List instead
08:56 TimToady but the dirt is still there if you don't distinguish coercions from composers
08:57 lizmat indeed, my point  :-)
08:57 TimToady and we've tried to distinguish them syntactially up till now, but |args works against that
08:57 lizmat feels to me we need a colon somewhere  :-)
09:00 espadrine m: say Parcel.new(1,2,3) === Parcel(1,2,3), Parcel.new(1) === Parcel(1), Parcel.new(1,) === Parcel(1,);
09:00 camelia rakudo-moar 166cd3: OUTPUT«TrueFalseFalse␤»
09:01 espadrine how do we coerce a single element parcel?
09:02 lizmat .tell Mouq seems you're LoL patches broke t/spec/S02-types/multi_dimensional_array.t
09:02 yoleaux lizmat: I'll pass your message to Mouq.
09:02 vendethiel joined #perl6
09:03 espadrine m: say Parcel.new(1) === Parcel((1,));
09:04 camelia rakudo-moar 166cd3: OUTPUT«True␤»
09:04 espadrine I think
09:06 TimToady you're testing object identity with === there, which works for values on if they are considered immutable, and currently two different parcels might or might be considered the same value
09:06 TimToady m: say Parcel.new(1,2,3) eqv Parcel(1,2,3), Parcel.new(1) eqv Parcel(1), Parcel.new(1,) eqv Parcel(1,);
09:06 camelia rakudo-moar 166cd3: OUTPUT«TrueFalseFalse␤»
09:06 TimToady say Parcel(1).WHAT
09:07 TimToady m: say Parcel(1).WHAT
09:07 camelia rakudo-moar 166cd3: OUTPUT«(Parcel)␤»
09:07 TimToady m: say Parcel.new(1).WHAT
09:07 camelia rakudo-moar 166cd3: OUTPUT«(Parcel)␤»
09:07 abraxxa joined #perl6
09:07 TimToady those ought to be eqv anyway
09:07 TimToady m: say Parcel(1).perl
09:07 camelia rakudo-moar 166cd3: OUTPUT«(ListIter.new(),)␤»
09:07 TimToady m: say Parcel.new(1).perl
09:07 camelia rakudo-moar 166cd3: OUTPUT«(1,)␤»
09:09 TimToady m: say Parcel(1,2,3).perl
09:09 camelia rakudo-moar 166cd3: OUTPUT«(1, 2, 3)␤»
09:10 TimToady see, here's one of those discontinuities, though perhaps this one is bogus, since parcels are going away
09:11 JimmyZ m: say <2/6>.perl
09:11 camelia rakudo-moar 166cd3: OUTPUT«"2/6"␤»
09:11 JimmyZ should be <1/3>?
09:11 JimmyZ m: say <555555555555555555555555555555555555555555555/5>.perl
09:11 camelia rakudo-moar 166cd3: OUTPUT«"555555555555555555555555555555555555555555555/5"␤»
09:11 TimToady m: say <2/6>.WHAT
09:11 camelia rakudo-moar 166cd3: OUTPUT«(Str)␤»
09:11 TimToady that's the problem
09:12 espadrine adding parens for the 1-element parcel works, but it’s definitely a discontinuity in expectation
09:13 espadrine m: say Parcel((1,)).perl
09:13 camelia rakudo-moar 166cd3: OUTPUT«(1,)␤»
09:13 TimToady JimmyZ: rakudo doesn't do Rat or Complex literals yet, but relies on the string coercion to make up for it
09:13 JimmyZ S02:870
09:13 synopsebot Link: http://perlcabal.org/syn/S02.html#line_870
09:13 JimmyZ so bug or nyi?
09:13 TimToady nyi
09:14 TimToady RatStr and such are also not implemented yet
09:14 TimToady but <2/6> is supposed to turn into a Rat directly
09:14 wtw joined #perl6
09:14 TimToady because there's no whitespace
09:14 wtw left #perl6
09:15 TimToady it's one of those spots where niecza is still ahead of rakudo
09:16 TimToady but relaying on coercion rather than the correct literal interpretation means that rakudo will not multi-dispatch on <2/6> correctly yet
09:17 jnthn Is it supposed to do that by val(...), or a different parse rule?
09:17 TimToady n: say "here"
09:17 camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤  at <unknown> <0xffffffff>␤  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤  at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤  at string…»
09:18 lizmat afk for a few hours&
09:29 JimmyZ n: say <555555555555555555555555555555555555555555555/5>.perl
09:29 camelia niecza v24-109-g48a8de3: OUTPUT«(signal ABRT)Stacktrace:␤␤  at <unknown> <0xffffffff>␤  at (wrapper managed-to-native) object.__icall_wrapper_mono_gc_alloc_string (intptr,intptr,int) <0xffffffff>␤  at (wrapper alloc) object.AllocString (intptr,int) <0xffffffff>␤  at string…»
09:31 dakkar joined #perl6
09:32 molaf_ joined #perl6
09:33 konsolebox joined #perl6
09:39 rurban_ joined #perl6
09:42 kjs_ joined #perl6
10:00 kjs__ joined #perl6
10:03 masak good antenoon, #perl6
10:03 moritz good an, masak
10:04 TimToady CEST really before noon this time
10:05 jnthn TimToady: Already in Brussels?
10:05 sqirrel__ joined #perl6
10:05 TimToady yup, so I can put off doing my talk while jetlagged :)
10:06 * jnthn has been putting off his while being ill
10:06 jnthn :/
10:06 TimToady that seems suboptimal
10:07 tadzik heh, I went to sleep on 20 yesterday to get up earlier to get some work done
10:07 tadzik woke up on 2 am :|
10:09 masak to be fair, that *is* early. :P
10:11 tadzik heh, yeah, too same extent it worked, I guess :P
10:13 kjs_ joined #perl6
10:13 lea joined #perl6
10:13 El_Che jnthn: I hope you'll be well enough at the FOSDEM talk to contaminate the audience with your famous presenter stamina :)
10:14 jnthn El_Che: I'm pretty sure I'll be good for the talk, but I'll likely be giving the noisy, crowded, Friday evening beer thing a miss.
10:14 El_Che jnthn: I am not a fan of the Friday evening event myself.
10:14 El_Che jnthn: I *am* a fan of the one of saturday :)
10:15 espadrine joined #perl6
10:15 itz_ ah the fast efficient Belgium restaurent service ;)
10:16 El_Che for the restaurants defence: I reserved last time voor 20 persons ("maybe a little less, but 20 should do")
10:16 El_Che after 110 we stopped counting :)
10:18 bjz joined #perl6
10:20 Rounin joined #perl6
10:21 jnthn El_Che: Yeah, I'm hopeful I'll make the Sat/Sun dinners, and have the appetite to enjoy them... :)
10:28 rurban_ parrot is now at RELEASE_7_0_2 for the Visual C++ fixes
10:29 FROGGS jnthn: do you favour a dinner tomorrow instead? (at the hotel or nearby)
10:30 FROGGS rurban_++
10:32 virtualsue joined #perl6
10:33 jnthn FROGGS: Yes, some quiet dinner in/near the hotel with a few folks would be fine.
10:35 FROGGS awesome :o)
10:37 pecastro joined #perl6
10:43 masak part of me wishes I was there with you FOSDEMites. :/
10:44 chenryn joined #perl6
10:45 Otterpocket joined #perl6
10:45 itz_ El_Che: ah that explains it .. the food was good anyway :)
10:49 pecastro joined #perl6
10:50 bjz joined #perl6
10:55 chenryn_ joined #perl6
10:59 TimToady El_Che: do you happen to know offhand whether the big room's projector will prefer 4:3 or 16:9?
11:07 El_Che TimToady: I will enquire now
11:07 El_Che but probably 4:3
11:08 TimToady in my experience, big rooms tend to have...how shall we say...conservative projection systems :)
11:08 TimToady "legacy" says Glo
11:09 El_Che yeah, I am taking my hdmi -> vga convertor
11:09 El_Che :)
11:10 TimToady despite having a newish Lenovo Carbon, it still has a VGA dongle, thankfully
11:11 TimToady which seems to work out better for the video driver than the hdmi output, often, dunno why
11:11 TimToady I think the hdmi driver more DWIM, which in my case generates more WAT
11:12 El_Che TimToady: mail sent, I'll keep you posted (but I am pretty sure it's 4:3)
11:12 rindolf joined #perl6
11:12 TimToady thanks, sometimes it makes a difference in how I plan
11:13 vendethiel joined #perl6
11:17 El_Che TimToady: I got a tempative confirmation that the Jason room has 4:3, but I need to receive a second authorative mail (no kidding :) )
11:18 El_Che btw, the projector in the dev room is also 4:3
11:18 El_Che woolfy1: there?
11:20 ab5tract hdmi is DWIMIALM -- Do What I Mean If Authorities Let Me
11:20 ab5tract which is unfortunately becoming more and more the default for computing systems
11:20 ab5tract i imagine it would be more plug and play if it were not encumbered by DRM subsystems
11:20 woolfy1 El_Che: yep
11:20 yoleaux 7 Oct 2014 15:25Z <japhb> woolfy1: Haven't been able to reach you this morning.  Ping when you're back?
11:21 tadzik heh, during my scalar allocation experiments it turned out that creating an @array and pushing to it is 138 Scalar allocations :)
11:21 jnthn o.O
11:21 jnthn tadzik: Pushing how many things?
11:22 TimToady nice to know we still have room for improvement, I guess...
11:22 tadzik jnthn: http://feather.perl6.nl/~tjs/profile-1422530329.78364.html#/allocations code is https://gist.github.com/tadzik/e301f6aea294412dad89
11:22 tadzik tl;dr one thing
11:22 woolfy1 About restaurants: for Saturday I have 70 seats reserved in La Porteuse d'Eau, and now 45 are taken.  I have 50 reserved in La Becasse, and 31 are taken.  We can have some more people.
11:23 tadzik oh, to be fair, 135 of those is "say"
11:23 tadzik push itself is 3
11:23 tadzik so that's okay
11:23 tadzik so, false alarm
11:23 tadzik (kinda)
11:23 TimToady if you say so
11:24 jnthn Was gonna say, I just -e "my $a := []; $a.push(1)" and it came out with the 3
11:24 tadzik yeah, it's just say
11:24 jnthn What the heck in there hits a slow-path bind?!
11:25 jnthn Oh, it's not the say even
11:25 jnthn It's the .perl of the object
11:25 kjs_ joined #perl6
11:25 tadzik ah, that makes more sense inded
11:26 jnthn On the routines tab, .perl takes 83% of the time
11:26 pecastro joined #perl6
11:26 masak would it be possible/desirable to do some sort of "source mapping", showing where in the source code the various calls happen?
11:27 masak right now it feels like you're figuring that data out, but it should be in there somewhere, and visualizable.
11:27 tadzik the problem now, with allocations, is that you ask the profiler "where is this allocated?", and it says "why, in CORE.setting of course"
11:27 tadzik so there's a lot of guessing involved
11:28 TimToady file/line directives would be a good project for someone
11:29 TimToady or, contrariwise, some way to compose the setting from files that doesn't involve catting them all together
11:29 * masak can't bring himself to shout "well volunteered!" at TimToady :P
11:30 * TimToady has already volunteered too much, which is part of why his talk isn't done... :)
11:31 jnthn tadzik: fwiw, the data collected about allocations is actually detailed enough to work out the call paths
11:31 tadzik oh, it's just the UI?
11:32 jnthn It's just there isn't a visualization to show it
11:32 jnthn Yeah.
11:32 tadzik alright, I'll note that
11:33 arnsholt masak: I guess the social acceptability of "well volunteered" is inversely proportional to the amount of volunteering already done by the individual =)
11:47 TimToady arnsholt: otoh, it's common wisdom that: "If you actually want to get something done, ask someone who's already too busy."
11:52 Woodi joined #perl6
11:56 El_Che TimToady: the authorative source is not sure :( :" I should be able to, but I'm not... I'm certain that last year we used
11:56 El_Che 4:3, but I can't say for sure that the projector does not support 16:9.
11:56 El_Che Either way, I think 800x600 or 1024x768 in 4:3 aspect is the safest bet."
11:57 moritz not 640x480? SCNR
11:59 * masak has a soft spot in his heart for 320x200
12:05 bjz joined #perl6
12:08 vendethiel joined #perl6
12:14 Kristien joined #perl6
12:18 yeahnoob joined #perl6
12:19 El_Che TimToady: an other mail, 4:3 and 800x600 or 1024x768. Those are also the video output (streaming, recording) support
12:32 nwc10 I'm trying to remmeber exactly what Tim Bunce's comment was at APW2014
12:32 nwc10 something like "this is the first projector I've plugged the laptop into, where the screen got *bigger*"
12:33 nwc10 I doubt that it's on the videos
12:34 nwc10 we cannot promise the same awesomeness for APW2015, as we don't yet have a venue, let alone knowledge about its AV equipment
12:34 nwc10 but we hope we can deliver
12:34 konsolebox joined #perl6
12:38 rmgk_ joined #perl6
12:39 El_Che nwc10: you could provide a pantomime
12:39 El_Che :)
12:40 pecastro joined #perl6
12:46 Kristien is there a plan for some consistency on module names on modules.perl6.org?
12:46 Kristien e.g. there's DB::ORM::Quicky, but MongoDB isn't DB::MongoDB
12:46 moritz Kristien: not more than on CPAN itself :-)
12:47 kaleem joined #perl6
12:47 moritz Kristien: the best thing one can do is write some comprehensive guides to naming, and prominently link to them
12:48 moritz Kristien: if you write the guide (preferably in a community-editable location, like doc.perl6.org), I'll help you with the linking
12:48 masak the root problem isn't 100% name consistency anyway -- it's discoverability.
12:48 TuxCM http://www.xs4all.nl/~hmbrand/t.pl => P6opaque: no such attribute '$!pos'
12:48 TuxCM in method match at src/gen/m-CORE.setting:7267
12:48 Kristien moritz, OK!
12:49 moritz TuxCM: <Bool::> in a regex will be parsed as some sort of subrule call
12:50 moritz TuxCM: quote it, '<Bool::>'
12:50 TuxCM very intuitive :/
12:50 moritz well, <alpha> and <thingy> are quite common in p6 regexes
12:50 masak TuxCM: not critical in any way, but if you lower-case your class names like that (`foo`), then you make it easy for people to accidentally read inheritance (`is foo`) as applying a trait.
12:50 moritz TuxCM: also, if you want to do a type check, do a  ~~ Bool
12:50 sqirrel__ joined #perl6
12:51 TuxCM now *that* helps! Thanks
12:51 masak TuxCM: the rule with regexes is: *any* non-alnum has an operational meaning instead of a literal one. so if you want the literal meaning, you have to quote with \ or ''
12:51 TuxCM masak, it wa a shunken example from a larger code set
12:51 masak TuxCM: well, the point still stands.
12:51 moritz but the error message sucks
12:52 masak rakudobug?
12:52 moritz oh
12:52 moritz known one, I guess
12:52 masak ah.
12:52 moritz it probably calls the Bool method
12:52 moritz which isn't a regex
12:52 moritz niecza had the awesome 'method "foo" doesn't follow the regex calling convention' error message
12:53 spider-mario joined #perl6
12:53 FROGGS would be nice to check for that in signatures also...
12:54 FROGGS so that you write a multi candidate, and it will be picked if the object passed to it implements some methods
12:54 FROGGS on the other hand, that might be stupid :o)
12:55 moritz FROGGS: well, type-checking the return value would be useful
12:55 FROGGS yeah
12:55 El_Che got confirmation that the fosdem talks at the devroom will also ve live-streamed
12:56 moritz \o/
12:56 FROGGS \o/
12:57 andreoss joined #perl6
13:00 konsolebox joined #perl6
13:03 masak \o/
13:05 Kristien m: module A { class C { } }; module B { class C { } }; say A::C.new.WHICH; say B::C.new.WHICH
13:05 camelia rakudo-moar 166cd3: OUTPUT«C|67964688␤C|67964752␤»
13:07 moritz Kristien: it should really use the type address in the WHICH, not the type name
13:10 andreoss rakudo.org is still giving back 500 error code.
13:10 yoleaux 28 Jan 2015 16:48Z <japhb> andreoss: Do you still need help creating your perl6-bench test?
13:11 moritz andreoss: I think pmichaud is the only one who can fix it
13:14 andreoss i see it has pretty old rhel5 which might be affected by lately discovered GHOST vulnerability
13:15 moritz it seems to have started erroring before its public disclosure
13:16 moritz lots of reasons possible (disk full, for example)
13:23 hoelzro TimToady: it might be that I'm not understanding the deeper issue here, but is the issue that Type(...) can take > 1 argument, and thus can be abused for non 6-y purposes?
13:24 pmichaud checking on 500 error code
13:25 pmichaud fixed now
13:25 FROGGS pmichaud++
13:26 pmichaud Sorry about that.  The system was being attacked a couple of days ago, and apparently I messed up the .htaccess configuration without realizing it
13:26 pmichaud Apparently Apache doesn't recognize "Order deny, allow", it has to be "Order deny,allow"  (no space)
13:26 FROGGS pmichaud: well, it seemed secure during that time :o)
13:26 jnthn pmichaud: I noticed you have a FOSDEM talk...when're you arriving?
13:26 pmichaud 7am Fri
13:27 pmichaud I think.  I'm more interested in when I'm departing at this moment :)
13:27 jnthn ;-)
13:27 jnthn "Soon", surely :)
13:27 * jnthn lands at 1pm
13:27 FROGGS I land at 8:30am or so
13:27 pmichaud my flight is in about 4.5 hrs
13:28 pmichaud I land at 7:15a, it seems.
13:28 jnthn Quick! Pack! Airport! :D
13:28 * jnthn wonders if pmichaud has started writing his talk yet :)
13:28 pmichaud Packing is almost finished.  Airport is only 30min away from me, so that's not a problem.
13:28 jnthn Ah, nice :)
13:28 pmichaud I've outlined my talk, yes; slides -- not yet.
13:28 FROGGS hehe
13:28 jnthn Hah, same as me.
13:28 pmichaud Probably tomorrow in hotel room for that.
13:28 jnthn Yeah
13:28 jnthn Are you at the Louise hotel place also?
13:28 FROGGS I've 50 slides already /o/
13:28 pmichaud Yes.
13:29 jnthn Me too
13:29 FROGGS same
13:29 TimToady me zero
13:29 TimToady we're at the novotel in the older part of town
13:30 FROGGS :/
13:30 TimToady we like older parts of towns :)
13:31 FROGGS I'd enjoy any part right now in case it would not mean $dayjob
13:32 * FROGGS yawns
13:32 pmichaud I best finish packing and prepare to head to airport.  See many of you soon.
13:32 FROGGS have a good flight :o)
13:32 Kristien joined #perl6
13:32 Kristien m: say [+][]; say [*][];
13:32 jnthn pmichaud: Safe travels
13:32 camelia rakudo-moar 166cd3: OUTPUT«0␤1␤»
13:33 Kristien Neat.
13:33 jnthn :)
13:33 TimToady don't really need the [] there...
13:33 TimToady m: say [min];
13:33 camelia rakudo-moar 166cd3: OUTPUT«Inf␤»
13:33 jnthn Implementation of it is neat too - it's a zero-arity candidate on the operator
13:33 Kristien how does it know the identity elements?
13:34 Kristien Clojure's reduce does it by calling the function with zero arguments
13:34 TimToady same here
13:34 Kristien neat
13:34 TimToady it seems the obvious thing to do once you have multi dispatch
13:34 * jnthn wanders to do some shopping, so he can have lunch, so he finally has no excuses left not to write his talk slides...
13:35 TimToady oddly, you don't call the function at all when there's one arg, you just return it
13:35 sqirrel joined #perl6
13:36 TimToady m: say [*] "not a number"
13:36 camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏not a number' (indicated by ⏏)␤  in method gist at src/gen/m-CORE.setting:14570␤  in sub say at src/gen/m-CORE.setting:17327␤  in block <unit> at /tmp/D7Txy6…»
13:36 TimToady heh, I guess it checks that
13:36 dayangkun joined #perl6
13:39 * colomon doesn’t think that sounds quite right… why would the reduce-meta-op know that * takes numbers?
13:40 masak colomon: not sure it does.
13:40 masak colomon: but the 1-param case of infix:<*> surely does.
13:40 colomon masak: “TimToady: oddly, you don't call the function at all when there's one arg, you just return it”
13:40 TimToady well, apparently I was wrong about that
13:41 Kristien that'd be silly
13:41 TimToady being wrong? :)
13:41 masak feels like the consistent thing to do to call the function.
13:41 Kristien * makes no sense on say DB connections
13:41 masak otherwise, why do we define the 1-arg case?
13:41 Kristien making it the identity operation instead of a type error in that case seems wrong
13:41 masak agreed.
13:42 Kristien speaking of which
13:42 masak infix:<*> implies casting to numeric, even if you only have one operand.
13:42 Kristien m: say (+"Hello, world!")
13:42 camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏Hello, world!' (indicated by ⏏)␤  in method gist at src/gen/m-CORE.setting:14570␤  in sub say at src/gen/m-CORE.setting:17327␤  in block <unit> at /tmp/VGOrn…»
13:42 Kristien nice
13:43 rurban joined #perl6
13:52 vendethiel m: say infix:<*>("foo")
13:52 camelia rakudo-moar 166cd3: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤  in method gist at src/gen/m-CORE.setting:14570␤  in sub say at src/gen/m-CORE.setting:17327␤  in block <unit> at /tmp/P6ZDTq6TbP:1␤␤»
13:52 vendethiel right
14:00 FROGGS joined #perl6
14:01 skids joined #perl6
14:10 telex joined #perl6
14:11 rindolf joined #perl6
14:23 sven_123 joined #perl6
14:31 andreoss japhb: where the parameters from minibenchmark are described? like work, scale, scaling. I belive they are for plotting.
14:40 lestrrat joined #perl6
14:45 mr-foobar joined #perl6
14:53 ab5tract wait, i don't understand why infix:<*>[] returns 1
14:55 timotimo because 1 is the neutral element of multiplication
14:56 FROGGS ab5tract: it has to start with something... so when you reduce a one element list, you kinda do: elem * 1
14:56 virtualsue_ joined #perl6
14:56 vendethiel .oO( it's the monoid identity element )
14:56 ab5tract m: say "so {infix:<*>[]} multiplied by {infix:<+>[]} equals {infix:<*>[] * infix:<+>[]}??"
14:56 camelia rakudo-moar 166cd3: OUTPUT«so 1 multiplied by 0 equals 1??␤»
14:56 FROGGS ab5tract: no
14:56 FROGGS m: say 0 * 1
14:56 camelia rakudo-moar 166cd3: OUTPUT«0␤»
14:56 FROGGS :o)
14:56 vendethiel well, yeah..?
14:57 FROGGS *g*
14:57 ab5tract FROGGS: except that that is not the case in the expression i just showed
14:57 vendethiel ab5tract: 0 is +'s neutral number that won't change the computation result
14:58 ab5tract still do not grok how the expression infix:<*>[] * infix:<+>[] does not compute as 1 * 0
14:58 FROGGS m: say infix:<+>[].perl
14:58 camelia rakudo-moar 166cd3: OUTPUT«(0,).list␤»
14:58 FROGGS m: say +infix:<+>[]
14:58 camelia rakudo-moar 166cd3: OUTPUT«1␤»
14:58 FROGGS m: say infix:<+>[] + infix:<+>[] + infix:<+>[]
14:58 camelia rakudo-moar 166cd3: OUTPUT«3␤»
14:58 ab5tract because it is parcewlled?
14:58 vendethiel m: say 3[]
14:58 camelia rakudo-moar 166cd3: OUTPUT«3␤»
14:58 vendethiel m: say (3[]).perl
14:58 camelia rakudo-moar 166cd3: OUTPUT«(3,).list␤»
14:58 FROGGS ab5tract: you calc with its .elems, aye
14:59 vendethiel ab5tract: because you don't call something with []. that's then slice
14:59 vendethiel zen* Oo
14:59 FROGGS dem slice
14:59 vendethiel m: say "so {infix:<*>()} multiplied by {infix:<+>()} equals {infix:<*>() * infix:<+>()}??"
14:59 camelia rakudo-moar 166cd3: OUTPUT«so 1 multiplied by 0 equals 0??␤»
14:59 vendethiel *g*
15:00 ab5tract i dunno
15:00 ab5tract i mean, i accept that it is probably there for a good reason
15:00 ab5tract as it always is :)
15:01 FROGGS [] always is about an itemized list, and these do not flatten when you add them to something
15:01 vendethiel [] is used to interpolate a list
15:01 vendethiel m: my @a = ^10; say "hey @a, or if I may, @a[]"
15:01 camelia rakudo-moar 166cd3: OUTPUT«hey @a, or if I may, 0 1 2 3 4 5 6 7 8 9␤»
15:03 vendethiel I can't find zen slice in s01-04, but s05 uses it once
15:04 jnthn S09 may well be where it's spec
15:04 jnthn 'dc
15:05 vendethiel yes, s09 seems to talk about it :)
15:06 adu joined #perl6
15:07 vendethiel m: my @a = ^10; say "hey @a, or if I may, @a[*]"
15:07 camelia rakudo-moar 166cd3: OUTPUT«hey @a, or if I may, 0 1 2 3 4 5 6 7 8 9␤»
15:08 vendethiel m: my @a = ^10; say @a.WHAT.perl, @a[].WHAT.perl, @a[*].WHAT.perl
15:08 camelia rakudo-moar 166cd3: OUTPUT«ArrayArrayParcel␤»
15:08 raiph joined #perl6
15:08 vendethiel will this difference disappear with the GLR?
15:09 lizmat vendethiel: I think the last one will become a List
15:10 lizmat but it could well become an Array, come to think of it
15:11 Kristien joined #perl6
15:13 vendethiel well, maybe [*] vs [] deserve an explanation in S09, but I can't give one :)
15:18 regreg joined #perl6
15:19 lizmat with a LoL, you could have * in one dimension, but not in others
15:24 konsolebox joined #perl6
15:24 kyclark joined #perl6
15:26 konsolebox joined #perl6
15:26 regreg left #perl6
15:27 raiph left #perl6
15:27 raiph joined #perl6
15:30 adu joined #perl6
15:31 noganex joined #perl6
15:34 TuxCM m: class Foo{has Str $.s is rw="x";method xxx{$.s=Nil;};method yyy(*@s){$.s=@s[0];}};my$f=Foo.new;$f.s.say;$f.xxx;$f.s.say;$f.yyy("y");$f.s.say;$f.yyy(Nil);$f.s.say;
15:34 camelia rakudo-moar 166cd3: OUTPUT«x␤(Str)␤y␤Type check failed in assignment to '$!s'; expected 'Str' but got 'Any'␤  in method yyy at /tmp/f4v3qqL8hm:1␤  in block <unit> at /tmp/f4v3qqL8hm:1␤␤»
15:36 TuxCM that is the same bug as I reported recently: Nil is dropped from list
15:36 TuxCM @s in yyy is Array.new()
15:40 jnthn fwiw, Nil was originally spec'd to do exactly what's happening with it here (that is, disappears in flattening list context). And by the time the spec changed on that, a bunch of stuff relied on it being that way, meaning it's not a simple fix, sadly.
15:40 jsix joined #perl6
15:42 nine_ woolfy1: is there a seat available for Saturday's dinner? I'd like to bring a colleague if possible.
15:43 woolfy1 nine_: yes, I can add plenty of names still, please give me a name (I can write "friend of nine", should be enough)
15:44 nine_ woolfy1: his name is Gregor Pilz
15:45 woolfy1 nine: OK, noted
15:46 El_Che "friend of nine" is a little ambivalent :)
15:46 nine_ I hope to see many friends of mine there :)
15:47 El_Che 9 people like the guy, everyone else hates him :)
15:47 tadzik seven of nine :o
15:47 El_Che http://live.fosdem.org/
15:47 woolfy1 I consider myself a friend of nine
15:47 hoelzro o/ #perl6
15:48 vendethiel woolfy1: you're pretty lucky, if I might say :)
15:48 kjs_ joined #perl6
15:48 woolfy1 vendethiel: I agree
15:49 * nine_ blushes
15:49 TuxCM jnthn, any alternatives to using Nil (as in I want to mimic perl5's "undef")?
15:50 TuxCM in a list
15:50 nine_ TuxCM: Any should be the closest to undef.
15:50 * TuxCM starts experiments ...
15:51 nine_ TuxCM: though in your example a Str would probably be more appropriate and a little more type safe.
15:51 jnthn TuxCM: Any type object should do
15:51 jnthn m: undef
15:51 camelia rakudo-moar 166cd3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nYR46T6RP9â�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤     an undefined type object such as Any or Int,â�¤   :!defined as a matcher,â�¤        Any:U as a type constrai…»
15:51 jnthn The error for undef makes many suggestions :)
15:52 TuxCM that is what lead me to use Nil, which is quite near to what I actually mean
15:52 nine_ (all the people who write such awesome error messages)++
15:52 TuxCM but it disappears from list context :(
15:52 jnthn Then use one of the others that does not, for the time being.
15:52 * nine_ reads "Nil" as "not in list"
15:53 TuxCM is there a way to see a diff between Str and "" ?
15:53 vendethiel TuxCM: yes, one is a type object, the other is an empty string
15:54 FROGGS m: say Str; say ""
15:54 camelia rakudo-moar 166cd3: OUTPUT«(Str)␤␤»
15:55 FROGGS m: say Str.defined; say "".defined
15:55 camelia rakudo-moar 166cd3: OUTPUT«False␤True␤»
15:56 lestrrat joined #perl6
15:57 andreoss joined #perl6
16:04 bronco_creek joined #perl6
16:05 kjs_ joined #perl6
16:06 lestrrat joined #perl6
16:10 FROGGS_ joined #perl6
16:18 TuxCM m: class Foo{has $.xx is rw;};Foo.new.perl.say;Foo.new(xx=>1).say;Foo.new(yy=>2).say;
16:18 camelia rakudo-moar 166cd3: OUTPUT«Foo.new(xx => Any)␤Foo.new(xx => 1)␤Foo.new(xx => Any)␤»
16:18 TuxCM is there a way to catch uncaught named argument in new?
16:18 TuxCM what is happening with yy => 2 ?
16:19 Kristien joined #perl6
16:19 nine_ TuxCM: there is at least one way: a BUILD method may check these arguments. But there's probably a simpler way as well.
16:21 PerlJam TuxCM: ClassX::StrictConstructor ?
16:21 TuxCM :P
16:22 nine_ m: class Foo { has $.xx is rw; method BUILD(:$xx, *%args) { die %args if %args; }}; say Foo.new(xx => 1); say Foo.new(xx => 1, yy => 1);
16:22 camelia rakudo-moar 166cd3: OUTPUT«Foo.new(xx => Any)␤yy        1␤  in method BUILD at /tmp/Bp_i3zrf7j:1␤  in method BUILDALL at src/gen/m-CORE.setting:978␤  in method bless at src/gen/m-CORE.setting:960␤  in method new at src/gen/m-CORE.setting:946␤  in block <unit> at /tmp/Bp_i3zrf7j…»
16:24 konsolebox joined #perl6
16:24 PerlJam nine_: try that when your class has bunches of attributes  :)
16:25 TuxCM the reason I want it is to allow aliasses for named arguments: Foo.new(always_foo=>True) should do the same as Foo.new(foo_always=>1);
16:25 TuxCM what PerlJam said is also true
16:25 TimToady :always_foo(:$foo_always) as a parameter makes an alias
16:26 TimToady though we use them more for abbreviations: :sigspace(:$s)
16:26 lestrrat joined #perl6
16:27 TimToady so you don't really need to worry with unbound names, since we already have an aliasing mechanism
16:27 TuxCM on a single line?
16:27 PerlJam TuxCM: but then he *must* write a BUILD routine
16:27 PerlJam er, TimToady
16:27 TimToady well, you can do it in the new's sig as well
16:28 TuxCM so far I have no method new yet
16:28 PerlJam I bet he'd like to write    has $.always_foo is aliased-to('foo_always');  or something
16:28 TimToady or you can write a function as a constructor just as easily, and then it'll even tell you if there are unused arguments
16:29 TimToady but in any case, aliasing of named args is provided for already in the signature
16:29 TuxCM what I would also appreciate is a "signal" that named parameters to new() will *always* call the method (setter/getter) as I have defined one for each
16:30 TuxCM method always_quote          (*@s) { @s.elems == 1 and $!always_quote          = @s[0] ?? True !! False; return $!always_quote;          }
16:30 TuxCM method quote_always          (*@s) { @s.elems == 1 and $!always_quote          = @s[0] ?? True !! False; return $!always_quote;          }
16:30 TuxCM method sep          (*@s) { @s.elems == 1 and $!sep = @s[0]; return $!sep; }
16:30 TuxCM method sep_char     (*@s) { @s.elems == 1 and $!sep = @s[0]; return $!sep; }
16:31 TuxCM there the aliassing is done in duplicating the methods
16:31 jnthn That isn't what the default BUILD does, though
16:31 jnthn The default BUILD is assigning to the attributes
16:32 * TuxCM still has to learn A LOT
16:32 TuxCM I was only able to start when FROGGS made me happy
16:32 TuxCM a have a lot of catching-up to do
16:33 jnthn write a submethod BUILD(*%init) { for %init { self."{.key}"(.value) } }
16:33 jnthn Or so
16:34 El_Che https://volunteers.fosdem.org/task/225/
16:34 El_Che funny
16:35 jnthn hah :)
16:42 andreoss video recording are done by volunteers too?
16:43 gfldex joined #perl6
16:43 nine_ It is my understanding that all of FOSDEM is organized by volunteers.
16:44 andreoss volunteers can hire a professional to do recordings
16:45 andreoss fosdem videos i watched had terrible sound and video quality
16:45 nine_ But since there's no entrance fee, I guess their budget is quite limited.
16:46 PerlJam andreoss: are you volunteering to be a fosdem videographer?
16:47 Kristien joined #perl6
16:47 Kristien hi
16:47 vendethiel \o
16:48 woolfy1 andreoss: we were disappointed by the quality of video and sound of the videos that our volunteers made at FOSDEM.  But we had to make do with the equipment that FOSDEM supplied us with.
16:49 andreoss no. i just want perl related videos be more watchable, with good sound and embedded slides
16:49 woolfy1 andreoss: hiring professionals, so the volunteers don't have to do it?
16:49 woolfy1 andreoss: we all want that
16:50 PerlJam indeed
16:50 woolfy1 andreoss: FOSDEM is completely volunteer-driven, with 25 lecture rooms, and all rooms are run by volunteers from the communities
16:51 woolfy1 andreoss: I think our volunteers did a good job, but it is just oo bad that the quality of video and audio was not good enough for you
16:52 woolfy1 maybe next time I will hire Steven Spielberg or Peter Jackson.
16:52 andreoss https://www.youtube.com/watch?v=5kgUL_FfUZY video like this are done by people with level of expertise i believe
16:52 andreoss i never saw a video from yapc or fosdem like that.
16:53 nine_ andreoss: that's nice, but how do you propose to make such videos happen?
16:53 PerlJam woolfy1: for whatever it would cost to hire either of those two people, you could just get some really nice cameras/microphones and ship them to all of the Perl events and let volunteers do the videography with good equipment
16:53 andreoss how have ruby guyes ended up with video like that?
16:54 PerlJam andreoss: planning.  post-production.  people with some skill.
16:54 nine_ RAILSCONF Standrad Admission: $600.00. FOSDEM admission: $0.00. See a difference?
16:55 moritz m: say 0 / 600
16:55 camelia rakudo-moar 166cd3: OUTPUT«0␤»
16:56 nine_ On a side note: watching this guy give a keynote at an expensive conference like RAILSCONF, I'm suddenly much less nervous about my own talk...
16:56 woolfy1 andreoss: indeed, very nice video.  Maybe I will pay a professional video team out of my own pocket next year.  :-)
16:57 PerlJam nine_: excellent!  :)  (I look forward to seeing the video of your talk)
16:57 andreoss yapcs have admission fees, still no video like that
16:57 labster joined #perl6
16:57 osfameron they're very low fees...
16:57 itz_ the Debian Video Team are good but most programmers aren't Alfred Hitchcock
16:57 PerlJam andreoss: RAILSCONF Standrad Admission: $600.00  YAPC admission: ~$100  See a difference?  :)
16:57 vendethiel itz_: are most alfred hitchcocks programmers?
16:58 nine_ andreoss: YAPC::EU Regular Price: 120.00 EUR, RAILSCONF: $600.00.
16:58 PerlJam though this year's YAPC has a larger admission fee IIRC.
16:58 woolfy1 andreoss: we hire professional people for the Dutch Perl Workshop:  http://perltv.org/source/nlpw2014
16:59 Kristien m: class A { }; class B is A { }; sub f(A $x) { }; sub g(B $x) { f($x); }
16:59 camelia rakudo-moar 166cd3: ( no output )
16:59 woolfy1 andreoss: my company sponsored that money, and maybe we will sponsor it this year again.  It is quite a lot of money, though.
17:00 woolfy1 andreoss: doing that for FOSDEM is a bit different, because the organisation of FOSDEM hires professionals to set up the equipment, and these professionals also instruct our volunteers how to operate it.  Having our own professionals there, might lead to tensions that I am not ready yet to ponder...
17:00 woolfy1 andreoss: we know what happened last year, and we are going to try to avoid that this time.
17:01 itz_ with some video recordings poor audio is a feature not a bug .. like mst :)
17:01 woolfy1 itz_: that is not nice, I love that voice of mst! He may be loud sometimes, but he has good reasons for it.  Sometimes you need to be loud!
17:02 itz_ actually he is mellower than in the past
17:02 El_Che hi
17:03 woolfy1 El_Che \o/
17:04 El_Che I don't know what's up with ruby, but they don't have a full schedule: https://fosdem.org/2015/schedule/track/ruby/
17:05 El_Che (I have learnt some Ruby lately to extend Puppet)
17:06 muraiki ah man there's a smalltalk track
17:06 El_Che muraiki: sunday! so no conflict there
17:06 woolfy1 At least the ruby-conferences have nice videos
17:07 muraiki well, I can't make it to fosdem anyways :(
17:07 El_Che The oscon video's were nice, but they cost $1000
17:08 El_Che Hehe,this talks in the Lisp room is funny:
17:08 El_Che Puppet is a tool for configuration management and automation. It’s written in Ruby, and therefore its codebase contains a notable lack of parentheses. So, we set out to solve that problem and wrote Puppet Server: a new, open source implementation of the Puppet Master, written in Clojure.
17:09 moritz nice :-)
17:10 muraiki leet
17:10 itz_ the CCC and Debian confs have good video
17:10 moritz they have lots of experience, and some hardware-affine hackers, I guess
17:11 woolfy1 Let's just hope that this year the cables will be better taped to the floor, that attendees not constantly knock over the microphone and camera, not constantly kick against the cables in such a way that they are disconnected, and that the battery does not die on us.
17:12 itz_ fosdem is great but the numbers of people make many things hard .. I usually end up going to obscure rooms about hurd etc
17:12 itz_ docker was totally maxed out last year
17:15 vendethiel nine_: aaron patterson is amazing ;-)
17:17 lestrrat joined #perl6
17:18 nine_ vendethiel: yeah? I'm more and more convinced that I'm wasting my time watching this video... Well, I really am, since I really should be working on my own talk to not completely embarass myself.
17:18 vendethiel nine_: if I have very exactly no clue what this talk is about, I just had the opportunity to talk to the guy, and he's very fun and open
17:19 El_Che woolfy1: the micro is wireless and attached to the speaker
17:19 itz_ nine_: your talk went down well with people at the London Perl Workship
17:19 nine_ vendethiel: he certainly has a good number of laughs in the talk.
17:19 El_Che an entertainer!
17:19 El_Che :)
17:20 El_Che Ovid's slides look like fun as well
17:27 woolfy1 El_Che: is the wireless microphone not on a power adapter (it has its own battery?)
17:28 timotimo the c3voc makes super awesome conference recordings and they are also volunteers, except the C3 sponsored some good hardware once
17:30 El_Che woolfy1: this is what I have:
17:30 El_Che All rooms, including K.3.201 will be recorded and live streamed. FOSDEM
17:30 El_Che provides the needed hardware to do this:
17:30 El_Che * A screen capture device to capture what is being sent to the projector
17:30 El_Che * A wireless microphone to be worn by the speaker
17:30 El_Che * (optionally) an 3.5mm jack to record/stream computer audio.
17:30 woolfy1 OK, thanks
17:33 naptastic joined #perl6
17:34 naptastic Did dot-notation for access of hashref and object members get considered for Perl 6?
17:34 naptastic ( $self.member instead of $self->{'member'} )
17:35 naptastic And did "with" or something like it get considered? Example: http://paste.scsys.co.uk/460177
17:36 PerlJam naptastic: I just saw your text on #perl and tried loading that paste, but my browser is just spinning its wheels and not showing me anything.
17:36 PerlJam naptastic: Could you make a gist perhaps?
17:36 naptastic PerlJam, that's a bummer. URL for gist?
17:36 PerlJam naptastic: gist.github.com
17:36 naptastic nvm, found it
17:37 naptastic https://gist.github.com/naptastic/d1fcd55d171cea66fd01
17:39 PerlJam naptastic: anyhow ... the line between "hash" and "hashref" is blurred so that you can say $hashref{$key} and $hashref.{$key} and they both just work.
17:40 PerlJam (for a hash it would be %hash{$key} because of sigil invariance in P6)
17:40 jnthn And for object members, the underlying storage is not a hash, and there's a syntax for accessing them ($!attribute)
17:46 mephinet joined #perl6
17:46 PerlJam naptastic: wrt "with" ... we have given and for to set the topic, so in your last sugar example s/with/given/ and it just works.
17:47 Kristien joined #perl6
17:47 Kristien hi
17:55 naptastic Cool! :D
17:58 PerlJam naptastic: I don't think we'll ever do  $hashref.key or $hashref.$key   to get at elements if that's what you're after.  (your original question on #perl made me think you were after that kind of conflation that Templete::Toolkit does)
17:59 naptastic That is actually what I'm looking for, or something like it.
17:59 naptastic I grew up on QuickBasic, which has "type" access as thing.component = "value"
18:00 naptastic I know Ruby uses dot for basically all object member / method access; I also know that Perl != Ruby.
18:01 PerlJam You could do it in a module as long as none of your keys are actual methods on Hash.  (have a failed method lookup check the hash's keys)
18:01 PerlJam or, I suppose you could circumvent normal method dispatch with some shenanigans, but I wouldn't want to or have an idea how.
18:02 jnthn I heavily disrecommend doing this, but...
18:02 jnthn m: use MONKEY_TYPING; augment class Hash { method FALLBACK($name) { self{$name} } }; my %h = a => 42; say %h.a;
18:02 camelia rakudo-moar 166cd3: OUTPUT«42␤»
18:03 lizmat yuck  :-)
18:03 jnthn .oO( Future talk: questions I probably shouldn't have answered on #perl6 )
18:03 PerlJam m: use MONKEY_TYPING; augment class Hash { method FALLBACK($name) { self{$name} } }; my %h = name => "fred"; say %h.name;  #oops
18:03 camelia rakudo-moar 166cd3: OUTPUT«%h␤»
18:04 jnthn Yes, that's why I suggested not to do it :P
18:05 * jnthn is gradually assembling a talk, and figures he deserves some dinner by now :)
18:05 nine_ jnthn: same here :)
18:08 naptastic lawl
18:08 * naptastic looks up MONKEY_TYPING
18:10 PerlJam naptastic: If you're going to fiddle with the innards of a class after the fact, you need to declare LOUDLY that you really and truly intend to, thus MONKEY_TYPING   :)
18:11 naptastic PerlJam, about a month ago, I fixed a problem in our codebase where we implemented, incompletely, a tied filehandle glob to STDERR to a module with 1/7 of the required methods... so I definitely understand the dangers of mucking around with potentially-surprising behaviors :)
18:11 vendethiel .oO( or you can just not do it :P )
18:11 naptastic hahaha
18:12 b2gills It sounds to me like you want an object without it being a class
18:13 naptastic nah; I just want syntax for member / method access with fewer awkward characters. :)
18:13 naptastic "given" is a HUGE improvement though, and I will gladly and humbly thank whoever implemented it.
18:13 PerlJam naptastic: $hash<key>  # awkward?
18:14 naptastic PerlJam, $hashref->{'key'} # my employer requires the single-quotes
18:14 naptastic $object->method();
18:14 PerlJam naptastic: $hash<key> is equivalent to $hash{'key'}
18:14 naptastic $object.method(); # marginally easier to read and write
18:15 naptastic PerlJam, does it work with refs as well as hashes? (I'm still struggling to accept Perl 6's blurring of the distinction between hashes and hashrefs.)
18:15 PerlJam naptastic: yes.
18:15 naptastic Neat :D
18:16 naptastic (Of course, a lot of this is academic; I won't be able to use Perl 6 for some time, at least professionally. We *just* moved to 5.14, from 5.6 (!!!!) but we're going to 5.22 this year.)
18:16 moritz and 5.22 isn't even out yet!
18:17 b2gills m: multi sub infix:<`> (Hash:D \h,\key){h.{key}}; my %a = 5=>6; say %a`5
18:17 camelia rakudo-moar 166cd3: OUTPUT«6␤»
18:19 Mso150 joined #perl6
18:19 b2gills naptastic: you could do something like that ^ ( though you probably want to use some other character )
18:20 vendethiel b2gills: why sigilless?
18:20 b2gills I really don't know, I just started typing
18:21 naptastic rofl
18:21 b2gills and it worked, so I stopped typing
18:21 TimToady lmao
18:21 TimToady and my wife too
18:21 naptastic Anything to stop me from using <.> ?
18:22 TimToady in what context?
18:22 moritz naptastic: only confusion with method call
18:22 PerlJam naptastic: in general, with Perl 6, only your imagination stops you  :)
18:22 * naptastic suddenly remembers zombo.com
18:22 naptastic bbiaf; gotta go get some stuff out of the car.
18:23 TimToady there are two classes of people who will use Perl 6; those who admire the extension features but are quite comfy with the provided features, and those who admire the extension features and use them to make brain pretzels for everyone else :)
18:23 b2gills Well there are some who like doing both in different contexts
18:24 TimToady we need some kind of 'use MONKEY_BUSINESS;' to warn off people from the latter sorts of programs :)
18:25 TimToady well, the reason my wife is reading over my shoulder is because she's trying to get me to go to dinner :)
18:25 kjs_ joined #perl6
18:25 TimToady so if we can find the a's we lo'd we'll be afk &
18:25 b2gills 'use MONKEY_BUSINESS;' would eventually be like 'use strict; use warnings;' in Perl5 if that were the case
18:26 PerlJam b2gills: uh ... I hope not.
18:26 Kristien m: sort((8, 2, 6, 5, 2, 4, 6))
18:26 camelia rakudo-moar 166cd3: ( no output )
18:26 Kristien m: say sort((8, 2, 6, 5, 2, 4, 6))
18:26 camelia rakudo-moar 166cd3: OUTPUT«2 2 4 5 6 6 8␤»
18:26 Kristien m: say sort((8, 2, 6, 5, 2, 4, 6) | (3, 9, 2, 1, 4, 5, 9))
18:26 camelia rakudo-moar 166cd3: OUTPUT«any(8 2 6 5 2 4 6, 3 9 2 1 4 5 9)␤»
18:26 PerlJam stricture and warnings tend to push people towards better code, while MONKEY_WHATEVER tends to push people towards evil code.
18:27 Kristien m: say sort(1 | 4 | 2)
18:27 camelia rakudo-moar 166cd3: OUTPUT«any(1, 4, 2)␤»
18:27 Kristien Why does sort not autothread?
18:27 Kristien Oh wait, it treats the parcel as a one-element list.
18:27 lizmat m: say sort(42)  # same thing
18:27 camelia rakudo-moar 166cd3: OUTPUT«42␤»
18:27 TimToady people always expect flattening except when they don't...
18:28 TimToady rafk &
18:30 shlomif joined #perl6
18:37 Kristien Flattening is most confusing.
18:38 nine_ Flattening is also insanely useful.
18:47 Kristien I can't imagine a case where implicit flattening would be useful.
18:47 Kristien Or rather, more useful than explicit flattening.
18:49 [Sno] joined #perl6
18:53 japhb andreoss: re: http://irclog.perlgeek.de/perl6/2015-01-29#i_10025026 , those parameters are for determining how SCALE is initialized, and how it grows between benchmark runs as timeall tries to get the benchmark to run for long enough to produce stable data.
18:54 nine_ Kristien: for @foo -> $foo { ... }
18:55 japhb andreoss: Unfortunately, I have not documented all of the configuration stuff.  Would you open a GitHub Issue for the things you'd like to see documented (or more than one, if several independent things)?
18:55 nine_ Kristien: you usually mean for |@foo -> $foo { ... } with this and I guess people would be very surprised by a different behavior.
18:55 * japhb wonders if andreoss backlogs, or if he should have sent those with .tell ....
18:56 nine_ japhb: I'd .tell just to be sure
18:56 Kristien I guess people would be very surprised by map flattening ((1, 2, 3), (4, 5, 6)) to (1, 2, 3, 4, 5, 6).
18:56 PerlJam or just .tell him to backlog and give the link :)
18:56 PerlJam Kristien: P5 people wouldn't
18:59 BigBear joined #perl6
18:59 nine_ Kristien: but even accepting your assessment, we already got one place where implicit flattening may be just as surprising as missing flattening in another place.
19:10 Mso150 joined #perl6
19:11 bronco_creek joined #perl6
19:22 bronco_creek .tell moritz Thank you for the commit bit and the encouragement.  I did manage to update the documentation for SetHash.  I might suggest a way to use SetHash to improve XML::Writer.
19:22 yoleaux bronco_creek: I'll pass your message to moritz.
19:23 Rounin joined #perl6
19:24 ab5tract Kristien: to flatten or not is an interesting question. it can go both ways, and often does :)
19:26 spider-mario joined #perl6
19:27 rurban joined #perl6
19:30 mvuets joined #perl6
19:30 ab5tract i do have a certain trepidation about context coming to the forefront in perl 6 in a similar way as it does in perl 5. up until now i've only thought about 'sink' context and such a few times in my (admittedly short) time with p6
19:32 ab5tract otoh, i think a) having context implies having ruptures (aka WATs) because inevitably not all language use will fit together without some consideration, and b) having those ruptures is good precisely because it _does_ highlight the presence and importance of context
19:32 ab5tract (that comes from my experience as a perl 5 hacker)
19:33 raiph joined #perl6
19:33 Sqirrel joined #perl6
19:34 moritz bronco_creek++
19:34 yoleaux 19:22Z <bronco_creek> moritz: Thank you for the commit bit and the encouragement.  I did manage to update the documentation for SetHash.  I might suggest a way to use SetHash to improve XML::Writer.
19:35 masak bronco_creek++
19:38 b2gills src/core/Str.pm still has some code that checks if icu is available
19:38 moritz b2gills: feel free to patch it out
19:39 b2gills I don't know if it could be fixed by just removing the parrot specific ifdef
19:40 b2gills Actually it does look like that is the case
19:41 jnthn Looks like it to me too
19:41 jnthn If we're talking the one around line 522
19:41 b2gills yes
19:43 b2gills I don't have a commit bit, but I would do a pull request if no else gets to it first
19:44 b2gills I was trying to see how hard it would be to create IntStr et all, and was looking at the source of Str on GH
19:45 pochi joined #perl6
19:47 [particle] joined #perl6
19:47 ab5tract i am hoping some #perl6 veteran could (re)read some of the documentation at http://www.dlugosz.com/Perl6/ and let me know how up to date the docs are
19:48 ab5tract i'm hoping to get together a list of helpful/interesting links that aren't (too) misleading, such as masak suggested might be a nice resource to pass to newcomers post-FOSDEM
19:49 moritz ab5tract: perl6.org tries to be that resource
19:49 hoelzro ab5tract++ masak++
19:49 moritz ab5tract: if you find perl6.org not good enough, please consider improving it
19:49 nine joined #perl6
19:49 ab5tract moritz: for sure. and i would of course e honored to push the page to that
19:49 masak ab5tract: far as I remember, a lot at http://www.dlugosz.com/Perl6/ was interesting and nicely formal-ish, but largely unofficial speculation.
19:49 ab5tract moritz: but i need to learn and understand before i can teach. but Ovid has a whole blog post explaining red-black trees in perl 6
19:50 moritz project idea: port the code examples from Higher Order Perl to Perl 6
19:51 ab5tract and i also found that https://books.google.nl/books?id=xyuS3Ht4upAC&amp;pg=PA280 is not wholly out of date
19:51 ab5tract moritz: and you have lots of interesting posts on your own blog. strangelyconsistent.org is consistently mindblowing
19:51 pierrot__ joined #perl6
19:52 moritz ab5tract: that's masak++'s :-)
19:52 moritz ab5tract: mine is http://perlgeek.de/blog-en/
19:52 ab5tract moritz: i was mentioning both in the same sentence, ya perlgeek you ;)
19:52 stux|RC joined #perl6
19:52 moritz oh, wasn't sure if you were confusing them
19:52 vendethiel ab5tract: is it strangely mindblowing, or consistently strange :)
19:52 ab5tract and then there's the Power of the Advent :)
19:53 * masak is happy to be mindblowing
19:53 * moritz is mindblogging
19:53 * vendethiel is happy to see he's been mentioned in a 007 issue :p
19:53 moritz erm..
19:53 xfix joined #perl6
19:53 masak moritz: we should guest post more on each other's blogs, just to mess with people :P
19:53 cosimo joined #perl6
19:53 muraiki joined #perl6
19:53 vendethiel masak: fwiw, I'd really love to talk more about that "macro enclosing macro" a bit more with you
19:53 ab5tract moritz: no offense taken. my only point is that there are a lot of really great resources about a given topic out there
19:54 ab5tract so i am already compiling this kind of resource for myself, and it would be weird not to put it on the web somewhere
19:54 masak vendethiel: my brain feels like a flock of pidgeons lately, but I'm always ready to talk about macros ;)
19:54 lizmat b2gills jnthn : eradicating check for ICU on parrot now
19:54 b2gills I just did a PR
19:54 vendethiel masak: I'm actually writing my essay (due tomorrow) and I don't even have half of it yet.. So, a bit later :P
19:54 Woodi_ joined #perl6
19:54 * lizmat checks the PR
19:55 ab5tract and improving doc.perl6.org is definitely something i will do wherever i can, but i'm still getting my *-legs here ;)
19:55 dalek rakudo/nom: 13eb6ea | (Brad Gilbert)++ | src/core/Str.pm:
19:55 dalek rakudo/nom: Remove ICU check from Str
19:55 dalek rakudo/nom:
19:55 dalek rakudo/nom: ICU is now mandatory
19:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/13eb6eaa6f
19:55 dalek rakudo/nom: ac7ee64 | lizmat++ | src/core/Str.pm:
19:55 dalek rakudo/nom: Merge pull request #358 from b2gills/patch-2
19:55 dalek rakudo/nom:
19:55 dalek rakudo/nom: Remove ICU check from Str
19:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac7ee64525
19:55 rurban_ joined #perl6
19:55 lizmat b2gills++
19:56 vendethiel .oO( run for the gills ! )
19:56 telex joined #perl6
19:56 vendethiel .oO( run while the GIL runs )
19:56 Roonin joined #perl6
19:57 Kristien m: say Int === Int
19:57 camelia rakudo-moar 166cd3: OUTPUT«True␤»
19:57 * ab5tract is also trying to document all the code in Terminal::Print for a github.io page when it is released
19:57 b2gills I should have picked a better nick back in 90's. especially since my name only has one 'l' not 2
19:57 b2gills ( my last name I should say )
19:57 Kristien m: role A[::T] { }; say A[Int] === A[Int]; say A[Str] === A[Int]
19:57 camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
19:58 Kristien m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[43]
19:58 camelia rakudo-moar 166cd3: OUTPUT«True␤True␤»
19:58 lizmat m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[43.2]
19:58 camelia rakudo-moar 166cd3: OUTPUT«True␤False␤»
19:58 salv0 joined #perl6
19:58 Kristien m: role A[$x] { }; say A[42] === A[42]; say A[42] === A[Int]
19:58 camelia rakudo-moar 166cd3: OUTPUT«True␤True␤»
19:58 lizmat Kristien: it takes the type, not the value
19:59 Kristien I am disappoint.
19:59 jnthn I'm rather dubious about that behavior.
19:59 masak me too.
19:59 Mso150_t joined #perl6
19:59 Kristien Today I learned how quicksort works!
20:00 ab5tract hugme: hug b2gills # my 90's nick brother
20:00 * hugme hugs b2gills
20:00 ab5tract that's a YAPAE, front and center
20:00 Hor|zon joined #perl6
20:00 jnthn I dunno how it comes out with it :)
20:00 vendethiel YAPAE?
20:01 PerlJam S99:YAPAE
20:01 synopsebot Link: http://perlcabal.org/syn/S99.html#YAPAE
20:01 jnthn m: role A[$x] { }; say A[42].WHICH; say A[Int].WHICH
20:01 camelia rakudo-moar 166cd3: OUTPUT«A[Int]␤A[Int]␤»
20:01 jnthn Yeah, that's rather off.
20:01 vendethiel eh :P
20:01 * vendethiel is glad to see this is going to get fixed at some point
20:02 jnthn Yeah, it's rather closely related to the parametrics stuff I'm already doing :)
20:02 vendethiel I guess so
20:02 Kristien Also, why can classes not be parameterised?
20:03 jnthn Because they're mutable.
20:03 vendethiel m: role R[::T]{...}; role R[Int]{our sub ret{Str}}; role R[Str]{our sub ret{Int}}; {Int sub foo(::T $x --> R[T].ret){...} #jnthn: could that ever work?
20:03 camelia rakudo-moar 166cd3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RBhYmwNzUnâ�¤Two terms in a rowâ�¤at /tmp/RBhYmwNzUn:1â�¤------> [32m}}; role R[Str]{our sub ret{Int}}; {Int [33mâ��[31msub foo(::T $x --> R[T].ret){...} #jnthn[0mâ�¤    expecting any of:â�¤    â€¦Â»
20:03 masak mutable in the `augment` sense?
20:03 jnthn masak: Yes.
20:03 vendethiel m: role R[::T]{...}; role R[Int]{our sub ret{Str}}; role R[Str]{our sub ret{Int}}; sub foo(::T $x --> R[T].ret){...} #jnthn: could that ever work?
20:03 camelia rakudo-moar 166cd3: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/jJ6B7OKOdV�Missing block�at /tmp/jJ6B7OKOdV:1�------> [32mr sub ret{Int}}; sub foo(::T $x --> R[T][33m�[31m.ret){...} #jnthn: could that ever work?[0m�»
20:03 Kristien I see.
20:04 masak jnthn: I'm not sure I see the conflict -- could you spell it out for me?
20:04 jnthn vendethiel: I'm confused; you seem to be trying to call a sub using method syntax? Which not just method ret {Int} ?
20:05 vendethiel jnthn: I mostly use "method" when I want it to be an on instance, but I should be using ^foo here
20:05 vendethiel jnthn: considering what we spoke of last time, it seems to me `class A[::T]{sub x of T{}}` can't work because T doesn't exist, it that wrong?
20:05 vendethiel is that*
20:05 skids Kristien: I spent a while a few weeks ago mulling over what sort algs were easily parallel and also would allow outputing the front end of the list while the back was still being sorted without breaking the parrallelism.  Answer was "probably cubesort is worth a deep look versus status quo of mergesort"
20:05 yoleaux 06:21Z <raydiak> skids: thank you very much skids++, your help seems to have solved my problem: https://github.com/raydiak/Image-PNG-Portable/commit/89a900424c2ea85c78ead4bfaa544fc85471624d
20:06 Kristien skids I don't know anything about algorithms.
20:06 jnthn masak: Instantiating a generic thing means you copy it and "fill in" the type variables with the real types.
20:06 Kristien The only algorithms I know how to implement as of now are quicksort and linear search.
20:06 skids Heapsort is a bit mind twisting.
20:06 Kristien Whenever I try to implement binary search I end up with off-by-one errors and I give up and implement linear search instead.
20:07 * vendethiel considers monkey typing a misfeature, considering the number of hours he's lost trying to debug ruby, with stacks all over the place
20:07 masak Kristien: wow, then you have a treat in front of you!
20:07 masak Kristien: I'd look at BFS and DFS next -- they're pretty easy.
20:07 jnthn Kristien: Good news: if you want to implement SSA (which I think you mentioned the other day) you soon get to learn post-order traversal and how to compute dominance frontiers. ;)
20:08 Kristien what is a dominance frontier
20:08 vendethiel indeed!
20:08 Kristien Oh that.
20:08 Kristien I'll just use an existing library with graph algorithms
20:08 moritz how boring.
20:09 vendethiel *g*
20:09 Kristien Or hell even Neo4j if I have to.
20:09 vendethiel ewww
20:09 jnthn Kristien: See graph.c in the MoarVM source if you decide to implement it; it refs a couple of papers that you can nab good algos from. :)
20:09 Kristien Distributed Parallel Cloud Optimising Compiler™!
20:10 vendethiel Kristien: is it web scale?
20:10 Kristien C :(
20:10 * vendethiel tried another dive in moarvm's source lately, but was still a bit lost everywhere
20:10 profan joined #perl6
20:10 jnthn Kristien: Yeah, but you only have to read the comment at the top of the file to find the URLs of the PDFs it mentions :)
20:10 Kristien OK
20:11 Kristien Actually, I implemented SSA once, except without phi instructions.
20:11 Kristien Since I just compiled conditional expressions to function calls :P
20:12 espadrine joined #perl6
20:13 IllvilJa joined #perl6
20:13 masak Kristien: function calls? passing an expression and two blocks?
20:13 Kristien yeah :D
20:13 jnthn Cheating is technique... :P
20:14 raydiak good afternoon #perl6...to quickly build a 0-filled CArray, I malloc some memory, memset it, then nativecast to CArray...any reason any of that might be a bad idea?
20:14 Kristien loops were similar
20:14 BigBear joined #perl6
20:14 masak Kristien: that's cute.
20:14 Kristien and lambdas closed over everything in scope, even variables that were not used
20:15 japhb .tell andreoss See http://irclog.perlgeek.de/perl6/2015-01-29#i_10026518 and thereabouts.  Let me know if you have questions.
20:15 yoleaux japhb: I'll pass your message to andreoss.
20:15 Kristien but the compiler did generate correct Lua code that produced the correct result, so I was quite happy :D
20:17 Kristien IIRC it even did constant folding and elimination of some referentially transparent expressions
20:21 ab5tract m: my sub sum($n) { [+] ^$n }; say sum(41); # this one's still good, i believe http://www.dlugosz.com/Perl6/web/addn_romp.html
20:21 camelia rakudo-moar 166cd3: OUTPUT«820␤»
20:23 Kristien ab5tract: pfft, O(n) algorithm
20:23 nine raydiak: I guess you could use calloc instead ;)
20:24 raydiak okay different questions...when I nativecast the pointer from malloc to a CArray, is nativecall smart enough to know it shouldn't free that array itself? what happens when the array grows?
20:25 raydiak heh thanks nine++, that'd be smart...I'm not a C guy, mostly :)
20:25 ab5tract Kristien: i've always been more into concision than hotrodding, myself
20:25 ab5tract http://blogs.perl.org/users/ovid/2013/02/red-black-trees-in-perl-6-explained.html
20:26 moritz some of the #?if parrot blocks in BOOTSTRAP.nqp are truely frightening
20:26 ab5tract Kristien: you might be interested in that post
20:26 moritz which have unbalanced numbers of brackets, for example
20:27 nine raydiak: as far as I understand, rakudo will not free that array. It would if rakudo was the one to allocate it.
20:27 nine raydiak: inferring that from "By contrast, when a C library returns an array to you, then the memory can not be managed by Zavolaj"
20:27 timotimo aye, CArray and such are managed by our garbage collector
20:28 timotimo (... right?)
20:29 raydiak okay, thanks...I assume that should mean it also won't attempt to move it when I add elements (guessing)
20:30 Possum joined #perl6
20:31 timotimo how did that fix work that makes stuff like / $s / faster?
20:31 timotimo so that we don't have to check $s for changes again and again? or something like that?
20:32 raydiak is there something not rakudo-specific I should be using instead of DESTROY to call free() in? right now I just document "calling .write calls .free unless you ask it not to, in which case you have to call .free yourself", but that's less than optimal for a user-facing P6 API
20:33 nine raydiak: what's wrong with DESTROY?
20:33 raydiak nine: it doesn't exist in the synopses, for one...saw a commit message a while ago referring to it as a "fossil"
20:34 raydiak so I guessed it's not a part of P6 itself any more, but rakudo internals specifically
20:35 moritz raydiak: DESTROY is fine, we just need to spec it again
20:35 moritz raydiak: it was over-eagerly removed from the specs
20:35 lizmat I'm still not happy with the name
20:35 lizmat it gives the wrong idea to people coming from Perl 5
20:35 masak a lot of things have changed their meaning slightly (or not-so-slightly) compared to Perl 5.
20:35 masak `bless`, for example.
20:36 nine lizmat: but we also failed to find any better name so far.
20:36 raydiak ah wonderful, I'll use it for now then...not having a spec...is it method or submethod? anything else I need to know to use it?
20:36 masak DESTROY fills the same role in Perl 6, it's just the GC that works differently. which people will need to learn anyway.
20:36 nine raydiak: I use it as a method.
20:37 skids https://gist.github.com/skids/31ff6c7bfad1fe22b964 # Kristien mentioned maybe looking at module naming suggestions.  I never posted this way back when I did years ago, because I wasn't very happy with it, but food for thought I guess.
20:37 nine raydiak: DESTROY does exactly what you think it does. It's just that it's called at an unpredictable time.
20:37 masak raydiak: it's a submethod, like BUILD. it does not inherit.
20:37 dalek specs: 32d0ad7 | lizmat++ | S (2 files):
20:37 dalek specs: Revert "Get rid of DESTROY fossils"
20:37 dalek specs:
20:37 dalek specs: This reverts commit 56c5710c527cf6a0e9df71f9ed06930e594ea453.
20:37 dalek specs: review: https://github.com/perl6/specs/commit/32d0ad7ff6
20:37 raydiak nine: so it isn't like BUILD where a DESTROYALL calls each submethod DESTROY in most-to-least derived order or something, then?
20:38 Mso150 joined #perl6
20:38 raydiak thanks masak++
20:38 woolfy1 tadzik++ for general awesomeness (he knows what I mean)
20:38 jnthn Looking at the spec that just got put back in place, it looks like there should be a DESTROYALL
20:38 vendethiel tadzik++ :)
20:39 moritz woolfy1: I don't know the specific instance, but panda alone would warrant a tadzik++ for general awesomeness :-)
20:39 woolfy1 moritz++ for this nice comment, with which I completely agree
20:39 timotimo m: say nqp::istrue("")
20:39 camelia rakudo-moar ac7ee6: OUTPUT«0␤»
20:39 timotimo m: say nqp::istrue("a")
20:39 camelia rakudo-moar ac7ee6: OUTPUT«1␤»
20:39 timotimo m: say nqp::istrue(Str)
20:39 camelia rakudo-moar ac7ee6: OUTPUT«0␤»
20:40 timotimo nqp::istrue($a_string) should be equivalent to !(nqp::len($a_string) < 1), right?
20:40 lizmat I'm leaving changes to the DESTROY spec as an exercise
20:40 raydiak jnthn: how hard would it be for nativecall to support zero-filling a CArray (on creation or after doesn't matter in this case)
20:41 grondilu joined #perl6
20:41 tadzik :)
20:41 grondilu m: say "wtf" if 7 == (5 or 7);'
20:41 camelia rakudo-moar ac7ee6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0YOHt49_0_â�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/0YOHt49_0_:1â�¤------> [32msay "wtf" if 7 == (5 or 7);'[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤â€¦Â»
20:42 grondilu m: say "wtf" if 7 == (5 or 7);
20:42 camelia rakudo-moar ac7ee6: ( no output )
20:42 jnthn lizmat: Well, the exercise might also be changing the impl to match the spec ;)
20:42 masak raydiak: it doesn't inherit, because each class's DESTROY takes care of that class's own concerns. I haven't seen it stated as such, but submethods and the notion of "infrastructural methods" were basically created to make BUILD and DESTROY work as intended.
20:42 ab5tract m: say "wtf" if 7 ~~ (5 or 7);
20:42 camelia rakudo-moar ac7ee6: ( no output )
20:42 jnthn raydiak: Are you suggesting it as a defualt, or providing an option to do it?
20:43 jnthn raydiak: If the latter, I guess you can already do it with memset... ;)
20:43 lizmat jnthn: it might: I'll see it if/when it gets there  :-)
20:43 b2gills I wonder what the output of IntStr.^mro should be
20:43 skids m: say (5 or 7)
20:43 camelia rakudo-moar ac7ee6: OUTPUT«5␤»
20:43 lizmat b2gills: there, in a nutshell, is the reason we don't have IntStr yet, I think
20:43 jnthn m: class IntStr is Int is Str { }; say IntStr.^mro
20:43 camelia rakudo-moar ac7ee6: OUTPUT«(IntStr) (Int) (Str) (Cool) (Any) (Mu)␤»
20:43 moritz m: class IntStr is Int is Str { }; say IntStr.^mro
20:43 camelia rakudo-moar ac7ee6: OUTPUT«(IntStr) (Int) (Str) (Cool) (Any) (Mu)␤»
20:43 moritz jnthn++ # faster than me
20:44 jnthn Copycat!
20:44 ab5tract m: say "wtf" if 7 ~~ (5 | 7);
20:44 jnthn :P
20:44 camelia rakudo-moar ac7ee6: OUTPUT«wtf␤»
20:44 Mso150_f joined #perl6
20:44 b2gills I've been doing some tests for IntStr et all, that's why I'm asking
20:44 raydiak jnthn: is there a way to use memset directly on a carray then, instead of malloc -> memset -> cast?
20:44 masak m: say(5 or "I kid you not, I will drop an ant farm into the Sargasso Sea")
20:44 camelia rakudo-moar ac7ee6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VppzNMSfaiâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/VppzNMSfai:1â�¤------> [32msay(5 [33mâ��[31mor "I kid you not, I will drop an ant fa[0mâ�¤    expecti…»
20:44 masak huh. unexpected.
20:45 japhb raydiak: Wearing my paranoid hat, I'd say it should be actively difficult to allocate an uninitialized array, so a new CArray of a given size should be zeroed.  (You should be able to copy or reuse data from an existing memory block on purpose, of course.  It's just the allocation shouldn't get you the dregs of previous frees.)
20:45 b2gills m:  say 'wow' if 7 == 5 | 7
20:45 camelia rakudo-moar ac7ee6: OUTPUT«wow␤»
20:45 ab5tract m: say "wtf" if 7.so ~~ (5 or 7);
20:45 camelia rakudo-moar ac7ee6: ( no output )
20:45 masak I guess `or` has to be at statement level.
20:45 masak m: say (5 or "I kid you not, I will drop an ant farm into the Sargasso Sea")
20:45 camelia rakudo-moar ac7ee6: OUTPUT«5␤»
20:45 Kristien m: say (5 or 7)
20:45 camelia rakudo-moar ac7ee6: OUTPUT«5␤»
20:45 raydiak jnthn: b/c having to build it myself w/malloc just b/c I can't cast the CArray to an OpaquePointer to pass to memset seems goofy
20:46 raydiak japhb: aye I kinda expected it to be default, but it ain't
20:46 jnthn raydiak: I thought we could cast CArray to OpaquePointer these days?
20:46 jnthn japhb: Well, CArray does suggest C semantics. ;) But mebbe we shouldn't take that quite so literally :)
20:46 raydiak star: use NativeCall; nativecast OpaquePointer, CArray.new
20:46 camelia star-p 2014.12: OUTPUT«CArray representation expects an 'of' method, specifying the element type␤  in method bless at gen/parrot/CORE.setting:935␤  in method new at gen/parrot/CORE.setting:925␤  in method new at gen/parrot/CORE.setting:923␤  in block <unit> at /tmp/tmpfile:1…»
20:46 camelia ..star-m 2014.12: OUTPUT«Native call cast expected object with CPointer or CStruct representation, but got something else␤  in sub nativecast at /home/camelia/rakudo-star-2014.12/install/languages/perl6/lib/NativeCall.pm6:346␤  in block <unit> at /tmp/tmpfile:1␤␤»
20:46 b2gills I think there should be an option to have CArray not initialize it's contents for speed, but by default to the safe thing
20:47 raydiak star: use NativeCall; nativecast OpaquePointer, CArray[uint8].new
20:47 camelia star-m 2014.12: OUTPUT«Native call cast expected object with CPointer or CStruct representation, but got something else␤  in sub nativecast at /home/camelia/rakudo-star-2014.12/install/languages/perl6/lib/NativeCall.pm6:346␤  in block <unit> at /tmp/tmpfile:1␤␤»
20:47 camelia ..star-p 2014.12: OUTPUT«Native call expected object with CPointer representation, but got something else␤  in sub nativecast at /home/camelia/rakudo-star-2014.12/install/lib/parrot/6.10.0/languages/perl6/lib/NativeCall.pm6:348␤  in block <unit> at /tmp/tmpfile:1␤␤»
20:48 japhb jnthn: What b2gills said.  We should flip some C defaults for general "good security practices" behavior.
20:48 b2gills ( on OpenBSD they always initialize memory if you use malloc )
20:48 raydiak if I could do that, I wouldn't need malloc or free or exposing my users to manual memory management (though I have BUILD now, so that one is solved)
20:49 jnthn OK, then file a ticket (or a patch ;))
20:50 japhb b2gills: As is proper.  :-)
20:50 raydiak well I considered a patch, thus the "how hard would it be..." that I started with :)
20:51 jnthn raydiak: I suspect it's a matter of patching src/6model/reprs/CArray.c in MoarVM, and on JVM it may be in a similar place.
20:51 b2gills I would also like to see Capsicum https://duckduckgo.com/?q=capsicum+freebsd implemented ( it's mostly a few ifdefs from what I here )
20:51 japhb There's another reason for having "allocate zero-filled" as an easily-accessed primitive: There are optimizations all the way down the stack to the hardware on some platforms for that operation.
20:53 b2gills Capsicum is a way of telling the OS that "I no longer want the ability to do X"
20:53 raydiak thanks jnthn, I'll look it over and see if it's not over my head :)
20:54 bjz joined #perl6
20:54 Mso150 joined #perl6
20:55 raydiak btw this is all to work around the fact that you just *can't* quickly turn a large blob into a CArray or vice versa from P6 code yet, so I just use a CArray directly all over now, to avoid the conversion
20:57 raydiak now if it just didn't segfault when precompiled...but tracking that down is on today's list
20:59 timotimo it's something we're hoping to get with native/shaped array, right?
20:59 FROGGS_ I think so
21:00 jnthn Yeah, it's in that space.
21:00 jnthn I'll be digging into natives stuff most likley next week.
21:01 jnthn *likely
21:02 timotimo having that will also make OpenGL bindings much more comfortable than what we could do right now
21:02 timotimo not that i know of anybody working on any ogl bindings actively
21:03 xfix joined #perl6
21:04 muraiki has anyone tried p6 on openbsd?
21:05 adu shaped?
21:05 pmurias joined #perl6
21:06 bartolin muraiki: I did last september. at least I built rakudo.moar and rakudo.parrot and had clean spectests for both
21:06 muraiki bartolin: thanks!
21:07 japhb timotimo: If you had talked to me half a decade ago ....
21:08 timotimo that's when you were less busy? :)
21:08 itz_ No such method 'ast' for invocant of type 'Any' in sub from-json at lib/JSON/Tiny.pm:51
21:08 timotimo itz_: match failed with a very bad error message
21:09 itz_ hmm maybe if I blow everything away
21:14 FROGGS_ m: say from-json 'hurz'
21:14 camelia rakudo-moar ac7ee6: OUTPUT«No such method 'ast' for invocant of type 'Any'␤  in sub from-json at src/gen/m-CORE.setting:24554␤  in block <unit> at /tmp/R1k64CXUvk:1␤␤»
21:15 moritz star-m: say from-json 'hurz'
21:15 camelia star-m 2014.12: OUTPUT«No such method 'ast' for invocant of type 'Any'␤  in sub from-json at src/gen/m-CORE.setting:23726␤  in block <unit> at /tmp/hZFJscwxQc:1␤␤»
21:15 jnthn .oO( that error reporting megahurz... )
21:16 jnthn Mebbe the grammar wants a || <.panic: ...> at the end of its TOP or something :)
21:17 b2gills IntStr test https://gist.github.com/b2gills/8f942741303f7758c6ed
21:18 b2gills I don't think it can be made workable without cheating
21:18 b2gills ( The only winning strategy is not to play )
21:19 dalek specs/newio: 98f9b49 | lizmat++ | S32-setting-library/IO.pod:
21:19 dalek specs/newio: Some more work on S32/IO, WIP
21:19 dalek specs/newio: review: https://github.com/perl6/specs/commit/98f9b49e32
21:19 bartolin I looked at RT #123597 and wondered how subst-mutate is supposed to work with scalars of type Int (or Numeric). should numerics be stringified before subst-mutate is applied or should subst-mutate give an error with non-strings?
21:19 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123597
21:20 jnthn b2gills: Hmm, that looks curious...
21:21 bartolin in case someone wants to take a closer look: would those tests make sense: https://gist.github.com/usev6/19baafe3390a274d87d0
21:21 jnthn b2gills: I think the IntStr and so on instances need assembling using nqp ops, but they already should have a Int and a Str field
21:22 b2gills I think the biggest hurdle is trying to have them do the right thing in multi methods/subs
21:22 dalek rakudo/newio: f1ad4e5 | lizmat++ | src/core/IO.pm:
21:22 dalek rakudo/newio: MOVE-PATH should only attempt to move files
21:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/f1ad4e5a14
21:22 dalek rakudo/newio: 8787cc4 | lizmat++ | src/core/IO/Pathy.pm:
21:22 dalek rakudo/newio: Fix deprecation in .gist
21:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8787cc4460
21:22 dalek rakudo/newio: fa4be3e | lizmat++ | src/core/io_operators.pm:
21:22 dalek rakudo/newio: Bring some io ops up to spec
21:22 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/fa4be3e600
21:23 dalek rakudo/newio: 13eb6ea | (Brad Gilbert)++ | src/core/Str.pm:
21:23 dalek rakudo/newio: Remove ICU check from Str
21:23 dalek rakudo/newio:
21:23 dalek rakudo/newio: ICU is now mandatory
21:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/13eb6eaa6f
21:23 dalek rakudo/newio: ac7ee64 | lizmat++ | src/core/Str.pm:
21:23 dalek rakudo/newio: Merge pull request #358 from b2gills/patch-2
21:23 dalek rakudo/newio:
21:23 dalek rakudo/newio: Remove ICU check from Str
21:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/ac7ee64525
21:23 dalek rakudo/newio: db622c9 | lizmat++ | src/core/Str.pm:
21:23 dalek rakudo/newio: Merge branch 'nom' into newio
21:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/db622c9eaf
21:26 lizmat b2gills: wouldn't it make more sense to create a Val role ?
21:27 TimToady I don't see how that would help anything; if Int precedes Str in the mro it should do the right thing most of the time
21:29 bjz joined #perl6
21:29 TimToady we might usefully think about versions of Int and Str that compose nicely under MI though
21:33 TimToady in other words, what would it take to let "class IntStr is Int is Str {}" actually work, and can it be done without sacrificing the efficiency of the current semi-native representations
21:33 b2gills lizmat: I tried that in an earlier attempt, but it might be possible
21:34 mvuets joined #perl6
21:35 raydiak \o/ hooray, this precomp problem gave itself up easily...looks like subtypes with a where clause segfault on assignment (guess the where clause doesn't get serialized)
21:37 jnthn TimToady: There's no deep reason why that can't work, as far as I know.
21:38 jnthn TimToady: If it doesn't already, it's a matter of debugging rather than something inherent in 6model design getting in the way.
21:38 TimToady though perhaps 'is Int is Str' is not sufficient to make MD pick Int over Str
21:38 jnthn No, that may be an issue
21:38 TimToady niecza had it further away via an extra role, iirc
21:38 TimToady (the Str part)
21:38 TimToady but same idea
21:40 TimToady I think was a DualVar role in there to make an appropriate constructor, since that could be problematic unless we guarantee all our value accessors have different names
21:41 TimToady *there was
21:41 TimToady anyway, just something to bear in mind with all the other 6pe thingies
21:41 Mouq joined #perl6
21:41 jnthn I think it's mostly orthogonal.
21:42 jnthn I already made it so nqp::unbox_[ins] can all work on the same object.
21:42 jnthn It's not like you have to pick one native you can unbox to.
21:42 TimToady we're supposed to be able to send different value sets to different parent constuctors anyway, though I don't think we implement that yet
21:42 Mouq .tell masak I took a minute to comment on https://github.com/masak/007/issues/13
21:42 yoleaux 28 Jan 2015 20:24Z <lizmat> Mouq: re your [0;0] autoviv patches: didn't you lose all adverb handling on there by accident?
21:42 yoleaux Mouq: I'll pass your message to masak.
21:42 yoleaux 09:02Z <lizmat> Mouq: seems you're LoL patches broke t/spec/S02-types/multi_dimensional_array.t
21:42 Mouq Oh no
21:42 jnthn Yeah, that bit is NYI
21:43 Mouq Weird, I was sure spectested those patches too..
21:43 jnthn Partly pending a re-work of BUILDALL, 'cus the current interpret-y approach is, while better than the previous introspecty approach, still sucking performance wise...
21:44 TimToady nod
21:44 raydiak m: my Any where {True} $foo; # is this supposed to work? the error is LTA either way
21:44 camelia rakudo-moar ac7ee6: OUTPUT«[31m===[0mSORRY![31m===[0m�Type 'Any' is not declared�at /tmp/MsmwwAkK1G:1�------> [32mmy Any [33m�[31mwhere {True} $foo; # is this supposed to[0m�Malformed my�at /tmp/MsmwwAkK1G:1�------> [32mmy Any [33m�[31mwhere {True} $foo; #…»
21:45 TimToady that message is LTA
21:45 jnthn I'd think the trait'd have to go after the variable
21:45 jnthn std: my Any where {True} $foo;
21:45 camelia std f9b7f55: OUTPUT«[31m===[0mSORRY![31m===[0m�Multiple prefix constraints not yet supported at /tmp/ZNyZBUbr2T line 1:�------> [32mmy Any [33m�[31mwhere {True} $foo;[0m�Malformed my at /tmp/ZNyZBUbr2T line 1:�------> [32mmy Any [33m�[31mwhere {True} $foo;[0m…»
21:45 jnthn Hm, STD gets it better there.
21:46 * raydiak is collecting bugs to report today, seems like
21:46 Mouq std: my Any $foo where {True}
21:46 camelia std f9b7f55: OUTPUT«ok 00:00 138m␤»
21:47 raydiak m: my Any $foo where True
21:47 camelia rakudo-moar ac7ee6: ( no output )
21:48 raydiak m: my Any $foo where ^3; $foo = 0; say $foo; $foo = 42; say $foo;
21:48 camelia rakudo-moar ac7ee6: OUTPUT«0␤42␤»
21:48 TimToady ignored
21:49 TimToady m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo;
21:49 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
21:50 kaare__ joined #perl6
21:50 TimToady cute
21:50 raydiak m: my Any $foo where 0 <= * < 3; $foo = 0; say $foo; $foo = 42; say $foo;
21:50 camelia rakudo-moar ac7ee6: OUTPUT«0␤42␤»
21:51 jnthn wtf...
21:51 jnthn m: subset Tiny of Any where ^3;
21:51 camelia rakudo-moar ac7ee6: ( no output )
21:51 raydiak m: subset Tiny where 0 <= * < 3; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo;
21:51 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
21:51 jnthn m: subset Tiny of Any where ^3; my Tiny $foo;
21:51 camelia rakudo-moar ac7ee6: ( no output )
21:51 jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0;
21:51 camelia rakudo-moar ac7ee6: ( no output )
21:51 jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo; $foo = 42;
21:51 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
21:51 jnthn m: subset Tiny of Any where ^3; my Tiny $foo; $foo = 0; say $foo;
21:51 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤No such method 'name' for invocant of type 'NQPMu'␤»
21:52 jnthn o.O
21:52 jnthn m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; $foo = 0; say $foo; }
21:52 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
21:52 raydiak btw it turns out my latest precomp problem is with any subset, not just ones with a where clause
21:52 jnthn m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; $foo = 0; }
21:52 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Null, cs = 0)␤»
21:53 jnthn m: subset Tiny of Any where ^3; BEGIN { my Tiny $foo; }
21:53 camelia rakudo-moar ac7ee6: ( no output )
21:53 jnthn Yeah, something's up there.
21:54 Mouq m: subset Tiny of Any where {$_ ~~ ^3}; my Tiny $foo; $foo = 0; say $foo; $foo = 42; say $foo;
21:54 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot look up attributes in a type object␤»
21:55 raydiak m: subset Tiny of Any where {say $_; $_ ~~ ^3}; my Tiny $foo; $foo = 0;
21:55 camelia rakudo-moar ac7ee6: OUTPUT«0␤»
21:55 raydiak ah, another heisenbug
21:56 TimToady he didn't try to say it
21:56 TimToady well, outside
21:57 TimToady m: subset Tiny of Any where {say $_; $_ ~~ ^3}; my Tiny $foo; $foo = 0; say $foo
21:57 camelia rakudo-moar ac7ee6: OUTPUT«(Obsolete)␤===SORRY!===␤Cannot look up attributes in a type object␤»
21:57 raydiak o i c
21:57 TimToady so the say inside doesn't really disable the bug
21:59 raydiak ... (Obsolete) ?
22:00 jnthn Uh...yes, what on *earth*...
22:00 TimToady ooh, it's a klew
22:01 jnthn Please RT this. I really need to pack stuff so I can sleep enough before the flight... :)
22:01 raydiak absolutely, will do
22:02 jnthn raydiak++
22:02 raydiak (and I'll hold off on the precomp bugreport, b/c it's likely this same issue)
22:06 FROGGS_ joined #perl6
22:12 dolmen joined #perl6
22:14 masak as part of writing pie-in-the-sky issues today for 007, I came up with the keyword `defer`, which I'd like to share here.
22:14 yoleaux 21:42Z <Mouq> masak: I took a minute to comment on https://github.com/masak/007/issues/13
22:14 masak (disclaimer: I am not proposing we spec anything.)
22:14 masak Mouq++ # just saw it -- will read it in a moment
22:15 masak (this one is about another issue)
22:16 masak `defer` has the following semantics: you've defined `&foo` in an outer scope and then shadowed it in an inner scope. `defer` in the inner scope's `&foo` will shut down the ongoing call to the inner `&foo` and call the outer `&foo` instead.
22:16 masak (I stipulated this because it would help 007 to partially override syntax)
22:17 masak think of it as a `callsame` but it works purely on the lexical lookup chain.
22:17 * masak reads Mouq++'s comment
22:18 masak Mouq: first off, `amb` taking a statementlist is a very good idea.
22:20 masak Mouq: second -- yes, it's pretty clear to me too that `x` has to be added at parse time. that's how the rest of the compiler works. we should probably provide a very convenient "declare this thing" compiler hook for macro writers.
22:21 * masak finds Mouq's comment intriguing and wants to subscribe to Mouq's newsletter
22:23 masak Mouq: I'll have to mull over your whole comment. I'll be sure to write up a reply once I have.
22:24 Mouq :) I'm glad it was thought-provoking. Awesome, thanks! I'm can't really talk much right now anyway
22:28 Kristien joined #perl6
22:31 masak me neither ;)
22:34 broquaint joined #perl6
22:37 Kristien m: any(any(1, 2), any(3, 4), 5).perl.say
22:37 camelia rakudo-moar ac7ee6: OUTPUT«any(any(1, 2), any(3, 4), 5)␤»
22:37 Kristien good.
22:38 Kristien m: say so any(any(1, 2), any(3, 4), 5)
22:38 camelia rakudo-moar ac7ee6: OUTPUT«True␤»
22:38 Kristien Duh.
22:38 Kristien m: say 2 * any(any(1, 2), any(3, 4), 5)
22:38 camelia rakudo-moar ac7ee6: OUTPUT«any(any(2, 4), any(6, 8), 10)␤»
22:38 Kristien Awesome.
22:42 Kristien m: multi sub nth-fib(Int $x where * == 0 | 1) { 1 }; multi sub nth-fib(Int $x) { nth-fib($x - 2) + nth-fib($x - 1) }; (0..10).map(&nth-fib).say
22:42 camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
22:44 Kristien Absolutely fascinating.
22:45 jnthn yeah but such a waste of chars... (1, 1, *+* ... *)[^11] :P
22:46 jercos m: sub nth-fib(Int $x) {my \phi = (1 + 5.sqrt)/2;(phi ** $x - (1-phi) ** $x)/5.sqrt}; (0^..11).map(&nth-fib).say
22:46 camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
22:47 Kristien I want Vim to autocomplete \phi to φ
22:48 masak Kristien: define a keybinding.
22:48 Kristien Not just for \phi
22:48 masak define some more.
22:48 Kristien But for many more LaTeX things.
22:48 Kristien I don't like &&, gimme \wedge already!
22:48 masak go crazy with keybindings. they're great.
22:49 Kristien I can turn Perl into APL!
22:50 * masak .oO( I may not agree with your desire to turn Perl into APL, but I will defend to the death your right to do so. -- Voltaire )
22:53 vendethiel .oO( Please don't it, though, a quote from the internet is telling you not to - Winston Churchill )
22:56 dalek rakudo-star-daily: 7d0b57c | coke++ | log/ (9 files):
22:56 dalek rakudo-star-daily: today (automated commit)
22:56 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/7d0b57cc75
22:56 dalek perl6-roast-data: 4601fb1 | coke++ | / (5 files):
22:56 dalek perl6-roast-data: today (automated commit)
22:56 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4601fb146b
22:57 raydiak Kristien: if you're interested in latex input beyond vim, there is a latex table available for the ibus table IME (ibus-table-latex in my distro)
22:58 Kristien :v
22:58 Kristien Do I have to recompile my kernel for that?
22:58 jercos m: sub nth-fib(Int $x) {my \phi=5.sqrt.succ/2;([-] phi,1-phi X**$x)/5.sqrt}; (0^..11).map(&nth-fib).say
22:58 camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55 89␤»
22:58 Kristien Since I lost my kernel configuration.
22:58 jercos now even confusinger :D
22:59 raydiak Kristien: likely not, but idk...for me it was just apt-get
22:59 Kristien My favourite ways of getting the nth fibonacci number: use Math; say Math::Fibonacci[$n]
22:59 Kristien s/F/f/
22:59 Kristien maybe ( ) instead of [ ]
23:03 * Kristien never actually had to use fibonacci numbers
23:04 * Kristien should implement Fibonacci search
23:04 raydiak m: my @f = 1, 1, *+* ... *; say @f[^10]; # I know most of us have seen this one before, but I still haven't gotten over the sheer awesomeness :)
23:04 camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
23:06 raydiak oh I see...nth
23:06 jercos and now for an amusingly stupid trick...
23:06 jercos m: sub nth-fib(Int $x) {((5.sqrt.succ/2)**$x/5.sqrt+0.5).floor};sub fibth-n(Int $x) {($x * 5.sqrt + 0.5).log(5.sqrt.succ/2).floor};(0^..12).map(&nth-fib).map(&fibth-n).say
23:06 camelia rakudo-moar ac7ee6: OUTPUT«2 2 3 4 5 6 7 8 9 10 11 12␤»
23:06 masak \o/
23:08 japhb I find it interesting that the versions without rounding were getting exact results anyway.
23:09 jercos The version without rounding is an exact formula. the rounding version shaves a few characters off.
23:09 jercos Using floor in math sorta feels like cheating :p
23:09 japhb jercos: I mean because floating point
23:10 jercos Ah, I suppose so.
23:12 jercos m: (1.0, 1/*.succ ... *)[^10].map(*.nude[0])
23:12 camelia rakudo-moar ac7ee6: ( no output )
23:12 jercos m: (1.0, 1/*.succ ... *)[^10].map(*.nude[0]).say
23:12 camelia rakudo-moar ac7ee6: OUTPUT«1 1 2 3 5 8 13 21 34 55␤»
23:12 jercos amusing rational abuse, no? :)
23:15 jercos (that series converges to phi, so it's sort of the inverse of using phi to compute fibonacci numbers...)
23:19 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int $x) { (φ ** $x - (1-φ) ** $x)/√5 }; ^11.map(&nth-fib).say
23:19 camelia rakudo-moar ac7ee6: OUTPUT«89␤»
23:19 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int $x) { (φ ** $x - (1-φ) ** $x)/√5 }; (^11).map(&nth-fib).say
23:19 camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:20 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { (φ**x - (1-φ)**x)/√5 }; (^11).map(&nth-fib).say
23:20 camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:21 japhb Looking better ...
23:22 japhb Now I have an urge to superscript the x somehow
23:23 ab5tract japhb: nicely done :)
23:26 jercos well from the land of things that *don't* work...
23:26 jercos m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub postfix:<ⁱ>(Numeric $n) {$*i ** $n}; sub nth-fib(Int $*i) { (φⁱ - (1-φ)ⁱ)/√5 }; (^11).map(&nth-fib).say
23:26 camelia rakudo-moar ac7ee6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/l7EhJzw7wzâ�¤Undeclared routine:â�¤    Ï†â�± used at line 1â�¤â�¤Â»
23:27 jercos >.>
23:28 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { my &postfix:<ˣ> := * ** x; (φˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say
23:28 camelia rakudo-moar ac7ee6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ayP0DrVzjmâ�¤Undeclared routine:â�¤    Ï†Ë£ used at line 1â�¤â�¤Â»
23:28 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; sub nth-fib(Int \x) { my &postfix:<ˣ> := * ** x; (φ\ˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say
23:28 camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:30 japhb m: sub prefix:<√>(Numeric $n) { $n.sqrt }; constant φ = (1+√5)/2; my &postfix:<ˣ> := * ** $*x; sub nth-fib(Int $*x) { (φ\ˣ - (1-φ)ˣ)/√5 }; (^11).map(&nth-fib).say
23:30 camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:30 Alina-malina joined #perl6
23:30 japhb \o/
23:30 japhb Although yeah, probably i is better
23:30 jercos very nice :)
23:31 IllvilJa joined #perl6
23:32 raydiak m: sub root ($n, $r where * != 0) { $n ** (1/$r) }; say root 27, 3 # any reason we don't have something like this in core?
23:32 camelia rakudo-moar ac7ee6: OUTPUT«3␤»
23:33 dolmen m: :{ ^10 => 42 }.pairs[0].gist
23:33 camelia rakudo-moar ac7ee6: ( no output )
23:34 dolmen m: { 1 => 42 }.pairs[0].gist
23:34 camelia rakudo-moar ac7ee6: ( no output )
23:34 jercos japhb: I would note that the same trick can be used for √, my &prefix:<√> := *.sqrt; to save a few chars. That's getting somewhat silly though :)
23:34 raydiak I mean if you aren't a mathy person who knows the identity, you end up with $n.roots($r).first(!*.im).re.ARGH
23:34 dolmen m: say { 1 => 42 }.pairs[0].gist
23:34 camelia rakudo-moar ac7ee6: OUTPUT«1 => 42␤»
23:34 dolmen m: say :{ ^10 => 42 }.pairs[0].gist
23:34 camelia rakudo-moar ac7ee6: OUTPUT«0..^10 => 42␤»
23:35 jercos raydiak: perhaps much like .log($base), a .root($base) method?
23:35 japhb jercos: Yeah, though still fun
23:35 japhb :-)
23:35 raydiak jercos: yeah...something that works like roots but just gives you the one Real answer
23:36 raydiak m: say roots 27, 3
23:36 camelia rakudo-moar ac7ee6: OUTPUT«3+0i -1.5+2.59807621135332i -1.5-2.59807621135332i␤»
23:38 japhb m: my &prefix:<√> := *.sqrt; my &postfix:<ⁱ> := * ** $*i; constant φ = (1+√5)/2; sub nth-fib($*i) { (φ\ⁱ - (1-φ)ⁱ)/√5 }; (^11).map(&nth-fib).say
23:38 camelia rakudo-moar ac7ee6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤»
23:38 japhb Woah
23:39 kjs_ joined #perl6
23:40 masak quiz of the day: what do people use to end their heredocs?
23:40 masak I know 'EOF' is practically the standard.
23:40 masak I see some people use the "thing that describes the document": like 'HTML'
23:41 masak I've been known to use a full stop ('.') sometimes.
23:41 jercos masak: YALL_COME_BACK_NOW_YHEAR is fully functional
23:42 jercos But no yeah I like the full stop, especially for composing email bodies.
23:42 skids joined #perl6
23:42 masak right. it has some prior art in SMTP, I guess.
23:44 geekosaur and some other protocols of the same vintage that have mostly fallen by the wayside by now
23:44 jercos END, EOF, __DATA__ if I'm feeling like confusing perlfolk.
23:44 * raydiak uses bracket quoting more than heredocs...so "]]]" :)
23:45 * geekosaur does tend to use EOF for one-offs but for multiple here docs will generally give them meaningful names
23:45 geekosaur (in part because of habit from ancient shell bugs when you used the same heredoc terminator twice)
23:45 * japhb uses meaningful enders like HEADER, BLOCK, and FOOTER
23:46 japhb m: sub prefix:<√> { $^n.sqrt }; my &postfix:<ⁿ> := * ** $*n; constant φ = (1+√5)/2; sub nth-fib($*n) { (φ\ⁿ - (1-φ)ⁿ)/√5 }; (^11).map(&nth-fib).say
23:46 camelia rakudo-moar ac7ee6: OUTPUT«0 1 1 2 3 5 8 13 21 34 55␤»
23:46 japhb jercos: A little more magic
23:46 japhb ^^
23:46 jercos For something with no spaces, you can do a lot with <<"" in e.g., bash
23:46 jercos heredoc ends at the first empty line
23:46 jercos erm, no *vertical* spaces rather
23:46 japhb Strangely, it's the definition of the square root prefix using your method that blows up with the REPR: Uninstantiable error
23:46 jercos Which is to say, no empty lines
23:47 japhb I was able to use $^n though
23:48 jercos hrm
23:48 jercos m: my &prefix:<test> := *.say;test "Hello"
23:48 camelia rakudo-moar ac7ee6: OUTPUT«Hello␤»
23:48 * jercos shrugs
23:48 jercos That general form clearly isn't entirely broken.
23:49 raydiak .tell jnthn #123700
23:49 yoleaux raydiak: I'll pass your message to jnthn.
23:49 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123700
23:50 adu joined #perl6
23:50 japhb m: my &prefix:<√> := *.sqrt
23:50 camelia rakudo-moar ac7ee6: ( no output )
23:51 japhb m: my &prefix:<√> := *.sqrt; √5
23:51 camelia rakudo-moar ac7ee6: ( no output )
23:51 japhb m: my &prefix:<√> := *.sqrt; say √5
23:51 camelia rakudo-moar ac7ee6: OUTPUT«2.23606797749979␤»
23:51 japhb WTH?
23:51 jercos m: my &prefix:<√> := *.sqrt; say 1/√5
23:51 camelia rakudo-moar ac7ee6: OUTPUT«0.447213595499958␤»
23:52 jercos m: my &prefix:<√> := *.sqrt; sub test{ 1/√5 }; say test
23:52 camelia rakudo-moar ac7ee6: OUTPUT«0.447213595499958␤»
23:54 japhb It isn't just the *.sqrt form that is broken in the original line.  If you do my &prefix:<√> = { $^n.sqrt }; It still breaks.
23:54 japhb Something gets very confused.
23:54 jercos Yeah I mean... I'm not sure exactly what that error even means like that
23:54 jercos m: Numeric()
23:54 camelia rakudo-moar ac7ee6: OUTPUT«Cannot invoke this object (REPR: Uninstantiable, cs = 0)␤  in block <unit> at /tmp/PG6t4Mu0P_:1␤␤»
23:55 jercos But there's no ===SORRY!===, and there is a line number... So presumably this is actually invoking code elsewhere that's producing that issue?
23:58 japhb That's one heck of a golf, though

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

Perl 6 | Reference Documentation | Rakudo