»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 eliasr left 00:05 mcmillhj joined, labster joined 00:06 itaipu joined, MorayJ left 00:09 mcmillhj left 00:17 mcmillhj joined 00:20 aries_liuxueyang joined 00:21 pierre_ joined 00:22 mcmillhj left 00:31 mcmillhj joined, BenGoldberg joined 00:36 mcmillhj left 00:42 mcmillhj joined, mempko left 00:46 mcmillhj left 00:48 lambd0x left
ugexe .tell pmurias re: `zef clone Foo::Bar` question from last week - this mostly exists already using either `zef fetch Foo::Bar` or `zef look Foo::Bar`. If it happens that Foo::Bar resolves to a .tar.gz (like from cpan) and not a git uri it will extract it for you as well 00:51
yoleaux ugexe: I'll pass your message to pmurias.
00:55 mcmillhj joined 00:59 mcmillhj left
bstamour /? 01:01
01:06 mcmillhj joined
ugexe ?$/ 01:06
01:10 mcmillhj left 01:17 mcmillhj joined 01:18 pierre_ left 01:20 itaipu left, itaipu joined 01:21 mcmillhj left 01:25 pierre_ joined 01:30 pierre_ left 01:31 pierre_ joined 01:36 mcmillhj joined 01:39 sufrostico left 01:41 mcmillhj left 01:49 pierre_ left, bob777 joined
gfldex m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say [&&] @tests; 01:50
camelia rakudo-moar d2b115: OUTPUT«2␤3␤True␤»
gfldex i would expect the first block to be executed as well 01:51
01:51 mcmillhj joined
gfldex and it's return value to be taken into consideration 01:51
01:54 pierre_ joined 01:56 mcmillhj left
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; @tests.say 02:06
camelia rakudo-moar d2b115: OUTPUT«[-> ;; $_? is raw { #`(Block|80637344) ... } -> ;; $_? is raw { #`(Block|80637416) ... } -> ;; $_? is raw { #`(Block|80637488) ... }]␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; so $_ for @tests;
camelia rakudo-moar d2b115: OUTPUT«WARNINGS for <tmp>:␤Useless use of "so " in expression "so $_" in sink context (line 1)␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; $_() for @tests; 02:07
camelia rakudo-moar d2b115: OUTPUT«1␤2␤3␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say all(@tests);
camelia rakudo-moar d2b115: OUTPUT«all(-> ;; $_? is raw { #`(Block|69009920) ... }, -> ;; $_? is raw { #`(Block|69009992) ... }, -> ;; $_? is raw { #`(Block|69010064) ... })␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say so all(@tests);
camelia rakudo-moar d2b115: OUTPUT«True␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say [&&] @tests;
camelia rakudo-moar d2b115: OUTPUT«2␤3␤True␤»
02:08 mempko joined
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say [&&] !@tests; 02:08
camelia rakudo-moar d2b115: OUTPUT«False␤»
BenGoldberg m: my @tests = { say 1; False }, { say 2; True }, { say 3; True }; say [&&] |@tests;
camelia rakudo-moar d2b115: OUTPUT«2␤3␤True␤»
BenGoldberg I don't understand why any of those are getting called.
02:08 canopus left
gfldex m: say Regex ~~ Callable; 02:09
camelia rakudo-moar d2b115: OUTPUT«True␤»
BenGoldberg Is it a bug?
gfldex that could be the reason
BenGoldberg ?
02:09 mcmillhj joined
BenGoldberg doesn't get it. 02:09
gfldex my guess is there is a ~~ somewhere and that is getting the Block called 02:12
m: my @tests = { say 1; True }, { say 2; True }, { say 3; True }; multi sub tester(&test){ test() }; multi sub tester([]){ True }; multi sub tester([&test, *@rest]) { test() && tester(@rest) }; say so tester(@tests);
camelia rakudo-moar d2b115: OUTPUT«1␤2␤3␤True␤»
gfldex that works as a short circuiting && 02:13
it's a bit long tho
02:14 canopus joined, Nelsen joined
Nelsen Good evening, mates 02:14
I was wondering if there was a "Codecademy"-like site to learn Perl?
02:15 mcmillhj left 02:18 BenGoldberg left 02:24 Nelsen left 02:25 mcmillhj joined 02:30 mcmillhj left 02:31 itaipu left 02:32 itaipu joined 02:38 noganex_ joined, mcmillhj joined 02:39 canopus left 02:41 noganex left
zostay m: say "test.foo".trans('.' => '::'); 02:42
camelia rakudo-moar d2b115: OUTPUT«test:foo␤»
zostay m: say "test.foo".trans(['.'] => ['::']);
camelia rakudo-moar d2b115: OUTPUT«test::foo␤»
zostay that seems like a bug
02:43 mcmillhj left
MasterDuke zostay: i got bit by that too, but it's in the docs 02:44
zostay then the docs are too subtle for me, i don't read that in the docs at all 02:46
MasterDuke well, it's not really spelled out here ( docs.perl6.org/routine/trans ), but it's shown in the examples 02:48
02:48 canopus joined
zostay which example? 02:49
gfldex examples ain't no roast 02:50
it's a bug
MasterDuke $str.=trans( [ '<' , '>' , '&' ] => [ '&lt;', '&gt;', '&amp;' ]);
gfldex the examples got it because they are meant to work with rakudo
zostay: please rakudobug
zostay that does not say that $str.=trans('<' => '&lt;', '>' => '&gt;'); shouldn't work...thx, gfldex 02:51
MasterDuke github.com/perl6/roast/blob/master...rans.t#L55 02:52
(not that i like the current behavior, just playing devil's advocate here) 02:53
02:53 tala joined
zostay at the very least, the docs are incomplete... but i think there's an opportunity to call this a bug still ;) 02:53
gfldex it should either work or complain if it got a multi char replacement. Silently dropping stuff is LTA. 02:55
MasterDuke doesn't that match Perl 5's behavior? 02:57
02:57 gfldex left
zostay gfldex, that's what i just suggested on the bug i posted... either warn and fix docs or make the behavior consistent (with my personal vote being for the latter) 03:00
i don't think there's an analogous function to .trans in perl5, tr/// does not have comparable calling conventions at all 03:01
.trans() is awesome as a multiple string find and replace at the same time thing
03:07 tala left 03:08 canopus left, rodarmor left 03:13 canopus joined 03:18 canopus left 03:22 mcmillhj joined 03:24 canopus joined 03:26 mcmillhj left 03:27 djbkd joined 03:31 canopus left 03:39 canopus joined 03:40 pierre_ left 03:43 pierre_ joined 03:46 skids left 03:49 rodarmor joined 03:50 cpage_ left, mcmillhj joined 03:52 canopus left 03:55 mcmillhj left 03:57 mempko left, canopus joined 04:00 pierre_ left 04:02 itaipu left 04:05 AndyBotwin left, labster left 04:06 AndyBotwin joined 04:07 MasterDuke left 04:09 pierre_ joined, labster joined, mempko joined 04:13 pierre_ left 04:18 canopus left 04:22 mcmillhj joined, pierre_ joined 04:23 canopus joined 04:26 mcmillhj left 04:27 pierre_ left, khw left, pierre_ joined 04:29 pierre_ left
TimToady R3b0zak. 04:34
so much for that password :) 04:35
grondilu lol 04:36
04:36 pierre_ joined
grondilu hey TimToady did you have a look at github.com/perl6/roast/issues/147 ? 04:37
04:39 mcmillhj joined 04:41 pierre_ left
TimToady I don't see how to allow that, offhand, given the list is evaluated before anything is declared 04:41
something fiddly like that probably wants to use constants anyway
grondilu then it wouldn't be a list but a syntactic construct. Like in C I suppose. 04:42
04:42 cpage_ joined
TimToady in p6 it's just a general list, which you could generate from any compile-time values 04:42
grondilu then allow a syntax that differ from the syntax that uses a list. 04:43
TimToady it seems like kind of a rare thing to want
grondilu :/
that may be true. 04:44
04:44 mcmillhj left
TimToady bein's you're the first person to ask for it in 15 years... 04:44
grondilu yet it bothered me badly that as I was looking at a C header I realized I could not make a straightforward translation.
(well, "bothered me badly" that was maybe strong an expression) 04:46
it was frustrating though.
04:47 nadim joined
grondilu also, it's not as if NativeCall has existed for 15 years, is it? 04:47
04:52 mcmillhj joined 04:53 ItayAlmog2805 joined 04:54 goldfax joined 04:57 ItayAlmog left, mcmillhj left 05:01 ItayAlmog2805 left 05:09 bob777 left 05:17 nadim left 05:22 wamba joined 05:26 mcmillhj joined 05:31 mcmillhj left 05:49 Woodi joined 05:50 brrt joined 05:56 mcmillhj joined 06:00 mcmillhj left 06:05 woolfy left 06:07 lizmat left 06:13 dami joined 06:17 firstdayonthejob joined 06:26 brrt left
ShimmerFairy fwiw I ran into the same issue once when using enums in P6. The use case is typically to define "synonyms" for some reason or another. 06:28
I'd also like to tell enums not to pollute the namespace with unqualified names, while we're at it. 06:29
06:29 pierre_ joined
moritz ShimmerFairy: you might be able to do that with anonymous enums 06:32
06:33 jjido joined
moritz constant EnumName = enum <a b c>; 06:33
or something like that
haven't tested it
06:39 jjido left 06:40 domidumont joined 06:41 mcmillhj joined, jjido joined
grondilu is not sure about what difference there is between constant EnumName = enum <a b c> and enum EnumName <a b c> 06:41
06:42 firstdayonthejob left
grondilu m: constant FooBar = enum <Foo Bar> 06:42
camelia ( no output )
grondilu m: constant FooBar = enum <Foo Bar>; say FooBar.WHAT
camelia rakudo-moar d2b115: OUTPUT«(Map)␤»
grondilu m: enum FooBar <Foo Bar>
camelia ( no output )
grondilu m: enum FooBar <Foo Bar>; say FooBar.WHAT
camelia rakudo-moar d2b115: OUTPUT«(FooBar)␤»
06:43 jjido left, domidumont left 06:44 domidumont joined 06:45 lizmat joined, mcmillhj left 06:48 jjido joined
ShimmerFairy moritz: not synonyms to the enum, but synonyms for its values. In C++, something like e.g. enum class Feature { Off, OneChoice, TwoChoice, On = OneChoice }; for a feature that used to be binary. 06:51
06:52 ribasushi left 06:54 shinobicl_ joined
shinobicl_ m: sub postcircumfix:<' '>($it, $arg, :$double) { say $double ?? 2 * $it * $arg !! $it * $arg }; 2'3'; 2'3':double 06:54
camelia rakudo-moar d2b115: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in postcircumfix:sym<' '>; couldn't find final $stopper ␤at <tmp>:1␤------> 3 ?? 2 * $it * $arg !! $it * $arg }; 2'3'7⏏5; 2'3':double␤»
06:55 ribasushi joined 06:56 jjido left, mcmillhj joined
moritz ShimmerFairy: I wasn't talking about the synonyms aspects, rather about not polluting your namespace with short names 06:56
06:56 jjido joined
ShimmerFairy ah 06:57
06:58 jjido left 07:00 mcmillhj left 07:02 zengargoyle joined 07:03 labster left
masak morning, #perl6 07:05
moritz \o masak
masak m: enum Feature <Off OneChoice TwoChoice>; constant On = OneChoice; say On 07:06
camelia rakudo-moar d2b115: OUTPUT«OneChoice␤»
07:06 ItayAlmog joined
ShimmerFairy m: enum Feature <Off OneChoice TwoChoice>; constant On = OneChoice; say Feature::On # if you, like me, don't much care for the namespace pollution of 'traditional' enums 07:08
camelia rakudo-moar d2b115: OUTPUT«Could not find symbol '&On'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
masak you defined `On`, not `Feature::On` 07:10
there's nothing magical going on with that `constant` statement. it's just a name binding. 07:11
ShimmerFairy masak: right, I'm just pointing out that I'd _like_ to be defining Feature::On instead :)
masak m: enum Feature (Off => 0, OneChoice => 1, TwoChoice => 2, On => 1); say Feature::On 07:12
camelia rakudo-moar d2b115: OUTPUT«On␤»
ShimmerFairy The issue with that though is that it's not semantically correct, and that it requires remembering that you have to keep the two options in sync. 07:13
07:16 leont joined
masak you *almost* sound like you have a spec patch coming up :) 07:17
07:20 djbkd left
moritz and a roast and rakudo patch :-) 07:20
masak and lots of good feedback on the respective PRs \o/ 07:21
ShimmerFairy fwiw, <TimToady> I don't see how to allow that, offhand, given the list is evaluated before anything is declared 07:22
and there's already a roast issue here :P github.com/perl6/roast/issues/147
masak so, you're saying what you want to do is only impossible once? :P
07:24 djbkd joined
masak fwiw, grondilu's `enum ("foo", bar => foo);` can't work -- "foo" is just a string, and so there is no `foo` identifier declared when using it as a pair value 07:24
guess this is exactly what TimToady is pointing out
ShimmerFairy nah, I personally think that enums don't necessarily need to keep that behavior :) . In fact I think it would be nice if they worked like function signatures: sub foo($a, $b = $a) { ... }
I can see why that example in particular doesn't work, though. 07:25
masak that `("foo", bar => foo)` thing is literally a list expression. much less magical than a parameter list. 07:26
enums currently ride on the fact that it gets lists in various forms.
ShimmerFairy right, but considering it's a 'package'-style thing to declare, maybe they could stand to be more magical?
masak: I ultimately think that Perl 6's enums are poorly designed. Sure they have type safety, and EnumClass($out-of-range) won't produce a valid defined object (like it does in C++), but they don't really feel worthwhile to me otherwise. 07:28
07:28 djbkd left
masak that opinion is fine. 07:28
I disagree, though. 07:29
you should have seen back when they *were* badly designed :P
07:30 Juerd left
ShimmerFairy masak: In C++ land, I always use 'enum class' over 'enum', where my only sticking point is that doing that kind of conversion I mentioned will live perfectly fine. But otherwise I like them :) 07:30
07:30 Juerd joined 07:32 djbkd joined
masak ShimmerFairy: maybe macros will be able to help you in the future. 07:33
I love being able to *say* that with enough confidence nowadays! :D
07:33 labster joined
leont ShimmerFairy: yeah, enum class is quite awesome :-) 07:35
ShimmerFairy masak: maybe so, as long as it's easy to fix broken-to-me language aspects, there's not much reason to complain :)
leont: agreed, the only issues I have are of the kind that you get for a low-level language: "type conversion doesn't check if the int is in range!" "why won't you give me a postfix:<++> that DWIMs!?" 07:36
(and even on the latter one, I personally don't see it as a really big issue)
leont The main thing I miss is methods on enum classes ;-) 07:37
ShimmerFairy Well, introspection is a separate issue :P 07:38
(imagine if C++ had Signature and Namespace types :P)
07:39 stigo joined
leont Signatures can be largely done at compile-time, actually 07:39
ShimmerFairy Honestly, I find C++ to be just as interesting as Perl 6, but coming from the opposite direction on the low-level/high-level ladder 07:42
leont The interesting thing about C++ is how much it is still in development 07:45
C++11 like Perl6 took way too long, but it worth it
07:45 shinobicl_ left
leont At least with the new versions they're iterative now. C++14 was a nice minor update and C++17 will bring new awesomeness 07:45
ShimmerFairy leont: and C++11 taught them to maintain their current faster release cycle too, so that's good :)
07:46 mcmillhj joined 07:51 mcmillhj left, mohae_ joined 07:53 llfourn joined 07:54 mohae left 08:00 mcmillhj joined 08:05 mcmillhj left 08:09 leont left, mempko left 08:10 zakharyas joined 08:13 fridim___ joined 08:16 pmurias joined 08:24 bjz joined 08:32 mcmillhj joined, rindolf joined 08:37 mcmillhj left 08:38 bjz left 08:41 bobv joined 08:44 pierre_ left 08:46 mcmillhj joined 08:51 mcmillhj left 08:53 pierre_ joined 08:54 bjz joined 08:56 pierre_ left 08:57 pierre_ joined 08:59 bjz_ joined 09:01 bjz left 09:04 mcmillhj joined 09:09 mcmillhj left 09:13 balajips joined 09:14 balajips left 09:28 eliasr joined 09:37 RabidGravy joined 09:48 mcmillhj joined
El_Che wut? C++17? What shall I do with my 1996 book? 09:52
09:53 pmurias left 09:54 mcmillhj left 09:57 MorayJ joined, labster left
DrForr Burn it, of course. Everything magically corresponds to the new spec. 10:01
10:07 mcmillhj joined 10:10 fridim___ left 10:12 mcmillhj left, TheLemonMan joined 10:17 user9 left, user9 joined 10:18 mcmillhj joined 10:23 mcmillhj left 10:26 fridim___ joined 10:29 lizmat left 10:31 lizmat joined 10:34 lizmat left 10:35 mcmillhj joined 10:36 pierre_ left, rurban joined 10:37 rurban left 10:40 mcmillhj left 10:42 kaare__ joined 10:50 pierre_ joined, woolfy joined 10:53 pierre_ left 11:02 dustinm`_ joined, MilkmanD1n joined 11:07 sakuya joined, djbkd left, MilkmanDan left, dustinm` left, eyck left, jervo left, nine left, imcsk8 left, Ulti left, hanekomu left, mtj_ left, jdv79 left, broquaint left, shadowpaste left, xdbr left, TheDir_ left, jeek left, gypsydave5 left, jast left 11:08 TEttinger left 11:09 mcmillhj joined, eyck joined, nine joined, imcsk8 joined, Ulti joined, hanekomu joined, mtj_ joined, jdv79 joined, broquaint joined, shadowpaste joined, xdbr joined, TheDir_ joined, jeek joined, gypsydave5 joined, jast joined 11:10 mtj__ joined, mtj__ left, mtj_ left, jervo joined 11:11 xinming left, mtj_ joined, xinming joined 11:14 mcmillhj left 11:17 ItayAlmog left 11:19 xinming_ joined, mcmillhj joined 11:22 xinming left, andreoss joined, lizmat joined 11:24 mcmillhj left 11:25 iH2O joined
andreoss m: multi MAIN() { die $?USAGE }; multi MAIN(Str :$option) { say "hi "}; 11:29
camelia rakudo-moar d2b115: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$?USAGE' is not declared␤at <tmp>:1␤------> 3multi MAIN() { die 7⏏5$?USAGE }; multi MAIN(Str :$option) { sa␤»
andreoss m: multi MAIN() { die &?USAGE }; multi MAIN(Str :$option) { say "hi "};
camelia rakudo-moar d2b115: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ ?USAGE used at line 1␤␤»
andreoss m: multi MAIN() { die $*USAGE }; multi MAIN(Str :$option) { say "hi "}; 11:31
camelia rakudo-moar d2b115: OUTPUT«hi ␤»
andreoss m: multi MAIN() { die $*USAGE }; multi MAIN(Str :$option) { say $option.perl }; 11:32
camelia rakudo-moar d2b115: OUTPUT«Str␤»
andreoss m: multi MAIN() { die $*USAGE }; multi MAIN(Str:D :$option) { say $option };
camelia rakudo-moar d2b115: OUTPUT«Dynamic variable $*USAGE not found␤ in sub MAIN at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
andreoss how do i get this usage message? 11:33
11:35 woolfy left 11:36 iH2O left, fridim___ left 11:39 woolfy joined 11:40 Fleurety left, nwc10 joined 11:47 telex left 11:48 telex joined 11:49 _4d47 joined 11:52 fridim___ joined
_4d47 mm how can this method gets called ? github.com/rakudo/rakudo/blob/nom/...ay.pm#L419 11:52
11:53 mcmillhj joined
TheLemonMan _4d47, Array.new(VV, :shape(NN)) 11:55
11:57 MasterDuke joined, lizmat left 11:58 mcmillhj left
_4d47 TheLemonMan: aww thanks, my eyes where reading Mu:D: instead of Mu:D 11:59
11:59 nwc10 left
MasterDuke andreoss: $?USAGE isn't implemented yet 11:59
and i believe MAIN will just call USAGE() if it can't dispatch. there's an autogenerated one, but if you create your own sub USAGE it will get called instead
12:01 lizmat joined 12:04 woolfy left 12:06 mcmillhj joined 12:10 elohmrow joined 12:11 mcmillhj left 12:14 woolfy joined 12:15 fridim___ left 12:20 woolfy left 12:22 sufrostico joined 12:23 _4d47 left
RabidGravy boom 12:27
MasterDuke big bada boom? 12:28
RabidGravy it's amazing how shutting down all those spreadsheet instances frees up memory
anyhow reboot
12:29 ab6tract joined, RabidGravy left
ab6tract clickbaits blogs.perl.org/users/ab5tract/2016/...print.html 12:30
12:32 AndyBotwin left 12:35 faubi left 12:37 lizmat left 12:38 lizmat joined
TimToady bl 20 12:44
12:45 Actualeyes left
Xliff \o 12:49
Morning all.
^ halp!
12:49 pierre_ joined
Xliff Oh. Lemme update that a sec. Because it's a weird edge case. 12:51
OK. Updated 12:53
nine Xliff: looks terrible (the error message) 12:55
Xliff: you could try package TheTest { ... }; sub EXPORT(+@a) { ... } 12:56
i.e. make sure TheTest is defined before you refer to it 12:57
ab6tract shouldn't EXPORT be inside the respective package? 12:58
12:58 mcmillhj joined
nine It belongs to the compilation unit and has to be in the top level. 12:58
Xliff nine: OK, one sec. 12:59
12:59 mcmillhj left, smls joined
ab6tract One day I'm going to have to learn me some of the distinctions between a compilation unit vs a file vs a 'unit module' 13:00
Xliff nine: No change.
ab6tract nine: so then if i do a 'unit class', the EXPORT will work because that's the top level of the compunit?
Xliff ab6tract: The original draft of the code had it that way, but that wouldn't parse.
El_Che ab6tract: looks empty 13:01
Xliff ab6tract: Or gave strange errors, depending.
ab6tract El_Che: the blog post?
El_Che ab6tract: yes
ab6tract El_Che: try a refresh please
that was my fault 13:02
El_Che better :)
Xliff nine: Another weird thing... if I drop the signature from EXPORT, it still fails in the same manner.
For all 3 cases.
ab6tract thanks for pointing it out :)
Xliff Another odd thing: If I return an empty map from EXPORT, the error message goes away for all cases. 13:04
Should I RT?
ab6tract Xliff: I am using EXPORT::DEFAULT like this github.com/ab5tract/Terminal-Print...t.pm6#L324
and it seems to be working so far
Xliff ab6tract: Yes, but is that a map definition or a sub? 13:05
13:06 mcmillhj joined
Xliff On first glance, looked like a map. I will try. 13:06
ab6tract it is neither, AFAICT :)
it seems to be autotriggered on import
i'm just doing some binding into the OUR:: namespace there 13:07
Xliff SSDD 13:08
(still getting the error)
13:09 woolfy joined 13:12 RabidGravy joined
ab6tract Xliff: have you updated the gist? 13:13
13:15 cdg joined
Xliff About to. I think I found a work around. 13:15
13:16 maerciba5 joined, maerciba5 left
Xliff Updated. 13:17
Yup! Workaround applied to original code and is working! \o/ 13:20
13:23 mr-foobar joined 13:25 elohmrow left, skids joined 13:26 Actualeyes joined 13:28 sakuya left
ab6tract Xliff++ 13:28
Xliff The more I write in P6, the more I find that the block notation is more reliable than using "unit ..." 13:29
mst hmm 13:30
this sort of sounds like maybe a case for finding all the tests using block notation and making sure there's a unit version
13:30 MilkmanD1n left
Xliff ¯\_(ツ)_/¯ 13:31
Well, after this I get to move to nqp.... 13:32
13:32 MilkmanDan joined
Xliff Still worried that's a bit over my head at this point, but hey... 13:33
TimToady sounds to me more like problems with how EXPORT works; 'unit' is conceptually very simple
unit should probably be disallowing those declarations before it, however, since the point of unit is to wrap the entire file as if it were a block declaration 13:37
jnthn Does unit sneakily introduce a lexical scope? 13:39
TimToady probably
jnthn That could be surprising in that a sub EXPORT is meant to be located in UNIT 13:40
TimToady it might be assuming wrongly that it's just about the first thing in the file
jnthn So folks doing `unit class Foo; sub EXPORT() { ... }` could get caught out
TimToady 'tis possible
would have to glare at the code some time after I wake up :) 13:41
RabidGravy heads up to anyone using chrome on FC24 (I think timotimo does,) if it offers an update of it, you are better just uninstalling and re-installing first
Xliff My original version of the module this popped up in had EXPORT located after the "unit" declaration. 13:51
I could never get that to work and the error messages were less than helpful when trying to figure out a solution. 13:52
Should I RT this issue?
Here's is a writeup, with solution... gist.github.com/Xliff/fceb9354193e...68b991d6ec
13:53 bjz_ left
skids There is RT#127305 13:55
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127305
skids Lots of metaish modules already forgo the unit form. 13:56
TimToady there is precisely one test of 'sub EXPORT', and it doesn't involve 'unit'
it pulls in a file that reads:
class Foo {}
sub EXPORT(|){ { 'Bar' => Foo } }
which seems...a bit rudimentary 13:57
RabidGravy not exhaustive for sure 14:00
14:05 zacts joined
TimToady jnthn: yes, it calls <.newpad>, which it should probably avoid for a 'unit' declaration 14:10
TimToady experiments with the simple fix first to see how much stuff blows up 14:13
14:13 mcmillhj left, mcmillhj joined, khw joined
.oO(phase one bug trials)
oh, heh, if I refrain from pushing a lexpad, I should also refrain from popping it... 14:16
timotimo RabidGravy: can you explain that a bit more? the chrome thing? 14:17
also, they no longer call it "Fedora Core" ;)
14:18 acrussell joined
TimToady Fedora Not-So-Core? 14:18
14:19 bstamour left
timotimo fedora shell? 14:19
fedora fruit?
RabidGravy timotimo, the upgrade seems to mess up the chain of links for the "alternatives" resulting in it disappearing completely
timotimo hah, that's fun 14:21
TimToady well, simple fix is not simple, insofar as it blows up tools/build/install-core-dist.pl 14:22
timotimo :|
TimToady maybe a 'make clean' issue
but if there's code that depends on a unit's OUTER meaning UNIT, we have a problem 14:23
we have a problem 14:27
getting a push on an NQPMu, probably something assuming OUTER gets to UNIT somewhere, I'm guessing 14:28
14:28 Actualeyes left
TimToady well, this will take at last another cuppa 14:29
14:29 Actualeyes joined 14:32 canopus left
mspo ugh alternatives 14:33
timotimo with alternatives it seems like i'm always getting a 32bit wine binary but a 64bit wineserver binary served, or the other way around 14:35
every single time i want to run a windows program i have to shuffle the two around
it's hilariously bad
but perhaps it's because i get at least one wine update between two events of wanting to run any windows program
14:35 nwc10 joined 14:36 canopus joined 14:40 MetaZoffix joined
andreoss m: my $x = { $_++ }; $_ = 10 ;$x();$x();say $_; 14:40
camelia rakudo-moar 6dab6b: OUTPUT«12␤»
andreoss m: my $x = sub { $_++ }; $_ = 10 ;$x();$x();say $_;
camelia rakudo-moar 6dab6b: OUTPUT«10␤»
timotimo yeah, bare blocks don't get their own $_ 14:41
m: my $x = -> { $_++ }; $_ = 10 ;$x();$x();say $_;
camelia rakudo-moar 6dab6b: OUTPUT«12␤»
timotimo like pointy blocks
TimToady well, fixed the NQPMu.push, but now install-core-dist merely runs forever 14:45
14:46 zacts left 14:47 pmurias joined
nwc10 lizmat: domm is down to 5 minutes, so would be useful if your workshop could get ready to return 14:47
(he's still speaking - not yet time to invade the room)
lizmat ok, I put out the message 14:48
pmurias ab5tract: using 'no precompilation' seems horrible 14:49
yoleaux 00:51Z <ugexe> pmurias: re: `zef clone Foo::Bar` question from last week - this mostly exists already using either `zef fetch Foo::Bar` or `zef look Foo::Bar`. If it happens that Foo::Bar resolves to a .tar.gz (like from cpan) and not a git uri it will extract it for you as well
14:51 lizmat left
pmurias is also slightly upset people are using Terminal:: instead of the traditional Term:: 14:51
TimToady I carped about that at the time, but nothing changed 14:52
timotimo pmurias: i think we "recently" got someone ranting about how Term collides with the term "term"
though i think if you had a term, you'd term it P6::Term or something, that'd be a better term for term
TimToady Term vs term is not even the same case, if people are worried about grammar collisions 14:53
"term" is such a generic term that I don't see any collision with people wanting to use that for a name root 14:54
timotimo what, modules are case sensitive? why can't i install ACME::MEOW :(
14:54 wamba left
TimToady and Term has a long history of meaning "terminal" at the root of the namespace 14:55
next thing you know, we'll all be starting our programs with "IDENTIFICATION DIVISION" or so, just because longer is always clearer... 14:56
14:57 woolfy left
TimToady and PERFORM is obviously better than DO, and COMPUTE is obviously better than, well, nothing 14:57
14:57 sufrostico left
timotimo every mathematical expression needs to start with COMPUTE 14:58
timotimo afkbbl
TimToady anyway, I agree with pmurias++ here
14:58 lizmat joined
ugexe just use the sha1 as the module name 14:59
pmurias ugexe: unfortunately the modules end up as sha1 in stacktraces anyways 15:02
ab5tract: the only thing 'no precompilation' in Terminal::Print::Dimensions seems to be doing is wasting CPU time 15:04
15:05 nwc10 left 15:07 canopus left 15:09 grondilu left
MetaZoffix m: class Meow { has $!s = Supplier.new; has $.sup = $!s.Supply; method do-things { $!s.emit: $_ for <a b c>; } }; react { with Meow.new { whenever .sup { $^m.say }; .do-things; }; done } 15:11
camelia rakudo-moar e8d0d0: OUTPUT«a␤b␤c␤»
MetaZoffix Any idea why this isn't printing the stuff with whenevers in my code even tho it works in the example above? I got my react block github.com/zoffixznet/na/blob/mast...nner.p6#L6 and my Meow class that emits messages github.com/zoffixznet/na/blob/mast...er.pm6#L33 15:12
And in the output I do get output from `say "Got stuff: $mes";` that's a line above the emits, but the whenevers don't react and don't print anything 15:13
15:13 Actualeyes1 joined
[Coke] tries to figure out his bailador/start problem now that the latest crisis is over 15:13
15:14 Actualeyes left, canopus joined
MetaZoffix And even if I put $!shell-messenger.emit: "built stuff!!!!!"; above this `given` I get the message received :S weird github.com/zoffixznet/na/blob/mast...er.pm6#L19 15:17
15:17 domidumont left
smls m: say (1..*).rotor(1..*)[^5]; # Floyd's triangle 15:18
camelia rakudo-moar e8d0d0: OUTPUT«((1) (2 3) (4 5 6) (7 8 9 10) (11 12 13 14 15))␤»
smls m: say (1..*).rotor(1...*)[^5]; # Floyd's triangle
15:18 domidumont joined
smls ^^ Why does it work with a Range argument but not a Seq? 15:19
camelia rakudo-moar e8d0d0: OUTPUT«(timeout)»
smls Does it have to do with how parameters are passed to routines, or does `rotor` mishandle it?
MetaZoffix s: (1..*), "rotor", \(1...*) 15:20
SourceBaby MetaZoffix, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|70743856>} (Method+{<anon|7074385...)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤ in block <unit> at -e li
MetaZoffix s: (1..*), "rotor", \(1..*)
SourceBaby MetaZoffix, Something's wrong: ␤ERR: Unhandled exception: While looking for '/home/zoffix/services/sourceable/building-perl6/perl6.moarvm': no such file or directory␤
MetaZoffix great
s: (1..*), "rotor", \(1..*)
SourceBaby MetaZoffix, Something's wrong: ␤ERR: Unhandled exception: Missing or wrong version of dependency 'src/Perl6/Grammar.nqp' (from 'gen/moar/m-main.nqp')␤ at <unknown>:1 (/home/zoffix/services/sourceable/building-perl6/perl6.moarvm:<dependencies+deserialize>)␤
15:20 domidumont left 15:21 domidumont joined
Xliff smls: WAG - Eager vs lazy? 15:21
MetaZoffix m: my $w = 1...*; say $w.list[^5]
there's yo problem
camelia rakudo-moar e8d0d0: OUTPUT«(timeout)»
Xliff m: my $w = 1..%; say $w.list[^5]
camelia rakudo-moar e8d0d0: OUTPUT«(Nil Nil Nil Nil Nil)␤» 15:22
[Coke] m: my $w := 1...*; say $w.list[^5]
camelia rakudo-moar e8d0d0: OUTPUT«(1 2 3 4 5)␤»
Xliff m: my $w = 1..*; say $w.list[^5]
camelia rakudo-moar e8d0d0: OUTPUT«(1 2 3 4 5)␤»
MetaZoffix smls: rotor takes a List:D, so for Seqs it goes through Any, which calls .list which loses laziness
Xliff \o/
My WAG was right!?
MetaZoffix smls: it may or may not be an LTA :) feel free to rakudobug
smls m: say (1..*).^find_method("rotor").signature 15:23
camelia rakudo-moar e8d0d0: OUTPUT«($: |c is raw)␤»
timotimo "WAG"?
Xliff Wild Assed Guess
timotimo oh
smls MetaZoffix: Where does it say it takes a List:D?
Xliff =)
MetaZoffix s: (1..*), "rotor", \(1..*) 15:24
SourceBaby MetaZoffix, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Method+{<anon|73357248>} (Method+{<anon|7335724...)␤ in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤ in block <unit> at -e li
MetaZoffix I hate that bug
smls: in the source code: github.com/rakudo/rakudo/blob/nom/...t.pm#L1152
smls m: my $w = (1...*); say $w.list[^5] 15:25
MetaZoffix smls: oh, wait, I'm even looking at the wrong thing. It's the divisors that are the problem >_<
camelia rakudo-moar e8d0d0: OUTPUT«(1 2 3 4 5)␤»
smls ^^ MetaZoffix: Your timeout earlier was because missing parens
MetaZoffix right
15:26 lostinfog joined
MetaZoffix m: sub foo ( *@what ) { say @what[^5] }( 1...* ) 15:26
camelia rakudo-moar e8d0d0: OUTPUT«(1 2 3 4 5)␤»
MetaZoffix m: sub foo ( *@what ) { say @what.is-lazy }( 1...* )
:/ 15:27
camelia rakudo-moar e8d0d0: OUTPUT«(timeout)»
MetaZoffix m: sub foo ( *@what ) { say @what.is-lazy }( 1...* )
timotimo potentially only works with +@?
camelia rakudo-moar e8d0d0: OUTPUT«(timeout)»
smls That one seems related to RT #128201
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128201
MetaZoffix m: sub foo ( +@what ) { say @what.is-lazy }( 1...* ) 15:28
camelia rakudo-moar e8d0d0: OUTPUT«True␤»