»ö« 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.
ipatrol AlexDaniel: can you amend the commit to link to my github page? 00:05
github.com/ipatrol
raschipi Soon Zoffix will get you to work for him. 00:10
ipatrol lol 00:14
Anyway, is there a way to have one hash partially overwrite another, similar to push(), but without the array semantics? 00:15
raschipi Yes 00:16
ipatrol raschipi: which is...? 00:18
raschipi No idea.; I just remember there is a simple way.
It's common for people to ask in the channel. I don't remember what the solution is, though. 00:19
ipatrol raschipi: python has dict.update(), I can only presume P6 has something similar
raschipi Let me think about it for one minute more. 00:20
00:20 Guest23973 left, Guest23973 joined, Guest23973 left, Guest23973 joined 00:21 Guest23973 is now known as scott
grondilu Is there a simple way to "negate" an Order? 00:21
lol nevermind I can just reverse the arguments
:P
(silly thing is : that's what I did, but I forgot I did it :/) 00:22
00:22 headcase left
raschipi ipatrol: Maybe %h{%g.keys} = %g.values ? 00:23
grondilu can you rely on them being in the same order? 00:24
raschipi Yes, it will call sort beforehand.
timotimo not sure if .keys and .values are always guaranteed to be in sync? 00:25
grondilu you may need a prefix:<|> though
raschipi Worked for me without the slip
ipatrol m: %h = 'a'=>'b','c'=>'d'; %g = 'f'=>'g','c'=>'e'; %h{%g.keys} = %g.values; say %h;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%h' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%h = 'a'=>'b','c'=>'d'; %g = 'f'=>'g','c
timotimo my at the very beginning
ipatrol m: my %h = 'a'=>'b','c'=>'d'; my %g = 'f'=>'g','c'=>'e'; %h{%g.keys} = %g.values; say %h;
camelia {a => b, c => e, f => g}
raschipi how do I ask the bot to link source? Most compli9cated bot ever that one
ipatrol m: my %h = 'a'=>'b','c'=>'d'; my %g = 'f'=>'g','c'=>'e'; %h.push(%g); say %h; 00:26
camelia {a => b, c => [d e], f => g}
grondilu evalable6: help
evalable6 grondilu, Like this: evalable6: say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Evalable
raschipi SourceBaby: help
SourceBaby raschipi, Use s: trigger with args to give to sourcery sub. e.g. s: Int, 'base'. See modules.perl6.org/dist/CoreHackers::Sourcery
grondilu lol I found the evalbot help on first try :)
00:27 headcase joined
ipatrol raschipi: at any rate, it seems like something that ought to exist as a method. Perhaps a feature request is in order? 00:27
timotimo m: my %h = :1a, :1c; my %g = :2a, :3g; my %comb = %h, %g; say %comb
camelia {a => 2, c => 1, g => 3}
timotimo this is probably more correct
raschipi ipatrol: It does exist, I just don't remember what it is.
ipatrol timotimo: that would be a non-destructive way to do it, apparently 00:28
timotimo well, you can also %h ,= %g 00:29
m: my %h = :1a, :1c; my %g = :2a, :3g; %h ,= %g; say %h
camelia {a => 2, c => 1, g => 3}
timotimo ^- there you go
raschipi there it is, told you ipatrol
thanks timotimo 00:30
ipatrol so the comma operator joins hashes?
raschipi ope, comma operator builds lists 00:31
nope*
ipatrol raschipi: normally, but I take it in hash context it will join hashes?
or more precisely, it turns both hashes to lists of pairs, makes a list of each of them, and when one then assigns that nested list to a hash container, it is then flattened? 00:33
timotimo that's how i assume it goes, yeah
raschipi Not the comma operator
The asignement to the hash does that
ipatrol m: my %h = :1a, :1c; my %g = :2a, :3g; say %h, %g; 00:34
camelia {a => 1, c => 1}{a => 2, g => 3}
timotimo yes, the list assignment part is the important bit
00:35 headcase left
raschipi m: my %h = :1a, :1c; my %g = :2a, :3g; dd (%h, %g); 00:36
camelia ({:a(1), :c(1)}, {:a(2), :g(3)})
00:36 Cabanossi left
ipatrol would love a debug mode that will tell you what is the canonical equivalent, in terms of explicit function calls, of whatever was just executed 00:37
raschipi Not everything can be done with function calls
00:38 Cabanossi joined
raschipi OPerators don't need to map to function calls. Some are even special cased in the compiler and there would be no way of doing what the do with function calls. 00:38
timotimo a desugar module would be nice
i'd say it'd be fine to "bottom out" in those cases without making it any simpler 00:39
ipatrol right, what timotimo said
grondilu what's the syntax to make a unicode character from its english description?
00:40 headcase joined
ipatrol \c[NAME] 00:40
grondilu oh yeah, thanks
timotimo there's also a function for that 00:41
ipatrol \c[YOU ARE WELCOME]
MasterDuke ipatrol: it's not quite exactly what you said. but if you use MVM_COVERAGE_LOG=<something> and MVM_COVERAGE_CONTROL=1, you could put an nqp::coveragecontrol(1) right before the part you're interested in and nqp::coveragecontrol(0) right after 00:45
ipatrol MasterDuke: I have no idea how one would even go about doing that
are those pragmas or something? 00:46
MasterDuke and the log would show you what lines in the rakudo source are being executed
environment variables
AlexDaniel ipatrol: aw yeah, should've use “@ipatrol” to link it automatically. I guess it's too late now, but will do next time :)
ipatrol AlexDaniel: I know you can amend commits in git
AlexDaniel last commit yeah, two commits deep requires some kind of rebase magic 00:47
I have a better solution, hold on
raschipi Not when they are merged upstream
In local only commits, that's possible.
AlexDaniel raschipi: you can still force-push it, not that big of a deal for small repos like whateverable 00:48
timotimo git rebase -i origin/master will let you change a "pick" to "reword" and then it'll let you rewrite the commit message and you'll still end up with all commits you had in the same order
if you have already pushed it, you can use a different commit from origin/master, like HEAD~4 or so
raschipi Right, it's only a problem is a fork pulls it.
grondilu say I have two types Foo and Bar and I defined multi infix:<leg>(Foo $, Bar $). I shouldn't have to define multi infix:<leg>(Bar $, Foo $), shoud I? I mean, can't I use the antisymmetricity or something?
raschipi if a fork*
MasterDuke `MVM_COVERAGE_LOG=<something> MVM_COVERAGE_CONTROL=1 perl6 -e 'use nqp; my %h = :1a, :1c; my %g = :2a, :3g; nqp::coveragecontrol(1); my %i = %h, %g; nqp::coveragecontrol(0); say %i'`
something like that ^^^
timotimo grondilu: it won't do that for you, i don't think 00:49
grondilu well, that's LTA
00:49 headcase left
grondilu can't someone write a "is antisymmetric" trait or something? 00:49
no seriously it's LTA. If there is a candidate for foo leg bar, but none for bar leg foo, it should fall back on the former to define the latter. 00:52
ipatrol m: %h = :a(1), :b(2), :c(4); %h = %h , %h.invert; say %h;
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%h' is not declared
at <tmp>:1
------> 3<BOL>7⏏5%h = :a(1), :b(2), :c(4); %h = %h , %h.i
grondilu because duplicating the declarations feels very dumb.
ipatrol m: my %h = :a(1), :b(2), :c(4); %h = %h , %h.invert; say %h;
camelia Odd number of elements found where hash initializer expected:
Found 7 (implicit) elements:
Last element seen: $((1 => "a", 4 => "c", 2 => "b").Seq)
in block <unit> at <tmp> line 1
timotimo probably have to |%h.invert that
timotimo goes to bed
ipatrol m: my %h = :a(1), :b(2), :c(4); %h = %h , |%h.invert; say %h;
camelia {1 => a, 2 => b, 4 => c, a => 1, b => 2, c => 4}
ipatrol m: my %h = :a(1), :b(2), :c(4); say %h, %h.invert; 00:53
camelia {a => 1, b => 2, c => 4}(1 => a 4 => c 2 => b)
00:54 headcase joined
ipatrol m: my %h = :a(1), :b(2), :c(4); %h = %h , %h.invert.Hash; say %h; 00:54
camelia {1 => a, 2 => b, 4 => c, a => 1, b => 2, c => 4}
raschipi m: my %h = :a(1), :b(2), :c(4), :d('d'); %h = %h , |%h.invert; say %h;
camelia {1 => a, 2 => b, 4 => c, a => 1, b => 2, c => 4, d => d}
raschipi Now which is mine and which is yours?
00:55 piojo joined
raschipi The second one is mine because of the d 00:55
ipatrol actually, it should use antipairs to avoid array expansion
AlexDaniel ipatrol: here github.com/perl6/whateverable/wiki...-detection
ipatrol m: my %h = :a(1), :b(2), :c(4); %h = %h , %(%h.antipairs); say %h; 00:56
camelia {1 => a, 2 => b, 4 => c, a => 1, b => 2, c => 4}
ipatrol AlexDaniel: thank you
And next time, please ask me before including my quips into some random project.
AlexDaniel ipatrol: you are right
ipatrol: I didn't quite think it through, sorry :) 00:57
ipatrol $ipatrol.ACCEPTS($AlexDaniel::apology) 00:59
;-)
raschipi ipatrol: That's better written as '$AlexDaniel::apology ~~ $ipatrol' 01:00
ipatrol ordinarily, but sometimes, explicit is better than implicit :-P 01:01
raschipi I think I know what you guys wanted above, a way for the debbuger to print which functions are being called?
ipatrol raschipi: some kind of desugaring apparatus
raschipi so, to know $AlexDaniel::apology ~~ $ipatrol calls $ipatrol.ACCEPTS($AlexDaniel::apology), you'd want thew debugger to go into it... 01:02
ipatrol something like that 01:03
01:04 itaipu left 01:05 headcase left
raschipi There's also a bot around that can tell you things like that. 01:08
AlexDaniel m: say 42 01:09
camelia 42
01:10 headcase joined 01:11 itaipu joined
ipatrol why does using packages cause these two statements to compile differently? 01:12
m: my @Characters::Hiragana = ("\x3040".."\x3050").list; my @Characters::Katakana = ("\x30A0".."\x30AA").list; say %({ my %h = @Characters::Hiragana Z=> @Characters::Katakana; %(%h , |%h.antipairs)}());
camelia {぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ => (゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ), ゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ => ぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ}
ipatrol m: my @Hiragana = ("\x3040".."\x3050").list; my @Katakana = ("\x30A0".."\x30AA").list; say %({ my %h = @Hiragana Z=> @Katakana; %h , |%h.antipairs}()); 01:14
camelia {぀ => ゠, ぁ => ァ, あ => ア, ぃ => ィ, い => イ, ぅ => ゥ, う => ウ, ぇ => ェ, え => エ, ぉ => ォ, お => オ, ゠ => ぀, ァ => ぁ, ア => あ, ィ => ぃ, イ => い, ゥ => ぅ, ウ => う, ェ => ぇ, エ => え, ォ => ぉ, …
01:14 headcase left 01:15 headcase joined
ipatrol m: my @Characters::Hiragana = ("\x3040".."\x3050").list; my @Characters::Katakana = ("\x30A0".."\x30AA").list; dd %({ my %h = @Characters::Hiragana Z=> @Characters::Katakana; %(%h , |%h.antipairs)}()); 01:15
camelia Hash % = {"぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ" => $("゠", "ァ", "ア", "ィ", "イ", "ゥ", "ウ", "ェ", "エ", "ォ", "オ"), "゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ" => "぀ ぁ あ ぃ い ぅ う ぇ え ぉ …
ipatrol m: my @Characters::Hiragana = ("\x3040".."\x3050").list; my @Characters::Katakana = ("\x30A0".."\x30AA").list; dd { my %h = @Characters::Hiragana Z=> @Characters::Katakana; %(%h , |%h.antipairs)}(); 01:16
camelia Hash % = {"぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ" => $("゠", "ァ", "ア", "ィ", "イ", "ゥ", "ウ", "ェ", "エ", "ォ", "オ"), "゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ" => "぀ ぁ あ ぃ い ぅ う ぇ え ぉ …
ipatrol m: my @Characters::Hiragana = ("\x3040".."\x3050").list; my @Characters::Katakana = ("\x30A0".."\x30AA").list; dd { @Characters::Hiragana }(); 01:17
camelia List $v = $("぀", "ぁ", "あ", "ぃ", "い", "ぅ", "う", "ぇ", "え", "ぉ", "お", "か", "が", "き", "ぎ", "く", "ぐ")
ipatrol m: my @Hiragana = ("\x3040".."\x3050").list; my @Characters::Katakana = ("\x30A0".."\x30AA").list; dd { @Hiragana }();
camelia Array @Hiragana = ["぀", "ぁ", "あ", "ぃ", "い", "ぅ", "う", "ぇ", "え", "ぉ", "お", "か", "が", "き", "ぎ", "く", "ぐ"]
ipatrol list versus array
but why? 01:18
01:19 headcase left
ipatrol m: my @Characters::Hiragana = ("\x3040".."\x3050").Array; my @Characters::Katakana = ("\x30A0".."\x30AA").Array; dd { @Characters::Hiragana }(); 01:20
camelia Array $v = $["぀", "ぁ", "あ", "ぃ", "い", "ぅ", "う", "ぇ", "え", "ぉ", "お", "か", "が", "き", "ぎ", "く", "ぐ"]
ipatrol m: my @Characters::Hiragana = ("\x3040".."\x3050").Array; my @Characters::Katakana = ("\x30A0".."\x30AA").Array; dd %({ my %h = @Characters::Hiragana Z=> @Characters::Katakana; %(%h , |%h.antipairs)}()); 01:21
camelia Hash % = {"぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ" => $["゠", "ァ", "ア", "ィ", "イ", "ゥ", "ウ", "ェ", "エ", "ォ", "オ"], "゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ" => "぀ ぁ あ ぃ い ぅ う ぇ え ぉ …
01:21 Cabanossi left
ipatrol no, still not right 01:21
m: my @Characters::Hiragana = ("\x3040".."\x3050").Array; my @Characters::Katakana = ("\x30A0".."\x30AA").Array; dd %({ my %h = (@Characters::Hiragana Z=> @Characters::Katakana).Array; %(%h , |%h.antipairs)}()); 01:22
camelia Hash % = {"぀ ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ" => $["゠", "ァ", "ア", "ィ", "イ", "ゥ", "ウ", "ェ", "エ", "ォ", "オ"], "゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ" => "぀ ぁ あ ぃ い ぅ う ぇ え ぉ …
AlexDaniel m: my @A::B = (0..5); my @C = (0..5); dd @A::B; dd @C 01:23
camelia Range $v = 0..5
Array @C = [0, 1, 2, 3, 4, 5]
AlexDaniel what a wonderful question :)
01:23 Cabanossi joined
MasterDuke ?! 01:24
ipatrol AlexDaniel: that's never a good thing to hear in a programming language chat room
AlexDaniel MasterDuke: why is it different?
MasterDuke tiny elves
ipatrol ha 01:25
the module form stores it as an object, but the regular form stores it as an unrolled array
AlexDaniel fwiw that's not some new behavior, we had it like this at least since 2014.10 01:26
ipatrol AlexDaniel: how can you tell? 01:27
AlexDaniel committable6: all my @A::B = (0..5); my @C = (0..5); dd @A::B; dd @C
ipatrol ?
committable6 AlexDaniel, gist.github.com/a1d7f902c1e25317c7...3e0cc7e10d
AlexDaniel ipatrol: ^
ipatrol ok 01:29
01:29 headcase joined
ipatrol i0.kym-cdn.com/entries/icons/origin...NlQWRM.jpg 01:29
AlexDaniel timotimo: maybe you know? 01:30
01:33 headcase left 01:35 BenGoldberg joined 01:36 piojo left
ipatrol AlexDaniel: lacking a convincing explanation, I'd go ahead and say that the behavior is wrong, since is appears to violate the specifications for both hashes and packages. 01:42
As well as for ranges
AlexDaniel ipatrol: feel free to create a ticket. At this time of the day most people are asleep, and I am not knowledgable enough to give a proper answer :( 01:43
huggable: rakudobug
huggable AlexDaniel, Report bugs by emailing to [email@hidden.address] See also: github.com/rakudo/rakudo/wiki/rt-introduction
01:44 ilbot3 left
ipatrol m: my @C = 0..5; dd @C; 01:46
camelia Array @C = [0, 1, 2, 3, 4, 5]
raschipi ipatrol: You can get around it by using binding instead of asignement
ipatrol m: my @C = 0..65535**65535; dd @C; 01:47
camelia (timeout)
ipatrol See? That violates the lazy behavior that ranges are supposed to have
m: my @C := 0..65535**65535; say @C.gist; 01:48
camelia (timeout)
AlexDaniel it's getting stuck on 65535**65535 I think 01:49
ipatrol yeah, just realized that, trying again
m: my @C := 0..2**65535; say @C.gist;
camelia 0..10017649652034232324895361757801278752239127377848757096325084868554470297781557265447530654404666740505191171714536315909114746910594063344347531823807735145825209359581757939831736097214654639910421545524279952850796594798197624316861836015014584847…
ipatrol m: my @C = 0..2**65535; say @C.gist;
01:49 headcase joined
camelia (timeout) 01:49
01:54 ilbot3 joined, ChanServ sets mode: +v ilbot3, headcase left
raschipi ipatrol: You really like redudancy... 01:56
ipatrol raschipi: no, what makes you say that?
raschipi say calls .gist 01:57
ipatrol raschipi: being explicit in order to rule out any other edge cases 01:58
raschipi Well, that looks like the opposite to me, because it will call .gist twice... 01:59
It will call .gist on the result of .gist
ipatrol raschipi: I don't know what the bot does though 02:00
02:00 headcase joined
raschipi Why would you suppose it's different? 02:00
ipatrol raschipi: I don't know if it rebinds it to send the output to the channel instead of stdout 02:01
raschipi redirection? why would it matter...
ipatrol Don't know if it does other formatting things instead of gist 02:04
02:05 headcase left
raschipi Well, call 'put $var.gist' so it do what you're asking for. 02:05
02:05 kaare__ left 02:06 kaare__ joined
ipatrol or I can check it in my console, which I know is stock 02:06
02:06 noganex joined 02:07 Cabanossi left 02:08 Cabanossi joined 02:09 noganex_ left 02:10 headcase joined
ipatrol AlexDaniel: another thing: the Z metaop apparently doesn't treat iterables properly that it gets through package references, instead wrapping them like scalar values 02:12
m: my @A::B = (1..8); my @A::C = ('A'..'H'); say @A::B Z @A::C; say @(@A::B) Z @(@A::C); 02:15
camelia ((1..8 "A".."H"))
((1 A) (2 B) (3 C) (4 D) (5 E) (6 F) (7 G) (8 H))
ipatrol bbl 02:18
mst lizmat:
bah, paste error, ignore me
ipatrol m: my @A::B = [1,2,3,4]; my @A::C = [5,6,7,8]; say @A::B Z @A::C; say @(@A::B) Z @(@A::C); 02:26
camelia (([1 2 3 4] [5 6 7 8]))
((1 5) (2 6) (3 7) (4 8))
ipatrol m: my @A::B = (1,2,3,4); my @A::C = (5,6,7,8); say @A::B Z @A::C; say @(@A::B) Z @(@A::C);
camelia (((1 2 3 4) (5 6 7 8)))
((1 5) (2 6) (3 7) (4 8))
02:31 headcase_ joined 02:33 headcase left 02:43 itaipu left 02:50 Actualeyes joined 02:55 itaipu joined 02:58 headcase_ left 03:01 headcase joined 03:05 headcase left 03:06 headcase joined 03:07 headcase_ joined 03:11 headcase left, aborazmeh joined, aborazmeh left, aborazmeh joined 03:22 Cabanossi left 03:23 Cabanossi joined 03:34 Cabanossi left 03:37 Cabanossi joined 03:42 raschipi left 03:43 simonm joined 03:59 simonm left, BenGoldberg left 04:03 zakame joined, zakame left 04:06 Cabanossi left 04:07 Cabanossi joined 04:11 headcase_ left 04:14 headcase joined 04:21 itaipu left 04:26 skids joined 04:31 wander4096 joined
wander4096 doc writes 04:32
multi sub perl(Mu --> Str)
but
m: perl 42
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
perl used at line 1
wander4096 m: perl("String")
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
perl used at line 1
wander4096 so what does this line in doc mean?
also it says that `multi method Str(--> Str)` 04:34
and `method self(--> Mu)`
m: Str(42:)
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in argument list; couldn't find final ')'
at <tmp>:1
------> 3Str(42:7⏏5)
expecting any of:
colon pair
wander4096 m: self(42:)
camelia ( no output )
wander4096 m: say self(42:)
camelia 42
wander4096 what happens? 04:35
04:41 headcase left 04:46 khw left
grondilu m: proto f($? --> Int) {*}; multi f() { rand }; f() 05:08
camelia ( no output )
grondilu what's the point of having a return type in the proto signature if it has no impact on the multis?? 05:09
I mean come on 05:10
Geth doc: 2e8bfea37f | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Mu.pod6
We don't have sub form of `perl`
05:14
05:16 headcase joined 05:20 headcase left 05:28 Lasse_ joined 05:40 headcase joined 05:41 aborazmeh left 05:44 headcase left
geekosaur m: proto f($? --> Int) {*}; multi f() { rand }; say f() 05:47
camelia 0.966105556137982
u-ou what does proto do? 05:48
05:50 headcase joined
geekosaur sets up for what C++/Java call overloading (multiple definitions distinguished and dispatched based on different signatures) 05:52
without that you get a multiple definition error
05:55 headcase left
u-ou ah 05:58
geekosaur actually that is multi, not sure how proto fits in with that (actually the combination seems slightly odd tbh)
u-ou but you can't have one without the other? 05:59
geekosaur that is what is confusing me. proto is something I think fo as being in the declaration for each impl because that;s how they're dispatched
05:59 headcase joined
geekosaur so a single common proto seems contradictory to me as it implies no way to dispatch on proto 05:59
geekosaur is poking at docs... 06:00
well, the doc I just read implies what I said was right... 06:01
ah, it allows abstracting out a common core
including common code, apparently, by providing a body with {*} where dispatch to the specific candidate should happen 06:02
06:04 headcase left
geekosaur so, given that, brings me to what I was thinking of about it: it was degtermined that letting the return type specification be obeyed at all implies return type polymorphism (a la Haskell typeclasses), which has been rejected 06:04
but in that case it should probably at least warn
also the docs say nothing whatsoever about the return type, but: "It acts as a wrapper that can validate but not modify arguments." 06:05
implying it doesn't act as a normal declarator at all
so, might be worth a LTA bug (although I am not sure if it should error or warn) 06:07
06:09 headcase joined 06:13 headcase left 06:20 Cabanossi left 06:22 Cabanossi joined 06:25 ruoso___ left 06:28 piojo joined 06:34 piojo left 06:35 piojo_ joined 06:36 nadim joined 06:39 ufobat___ joined 06:43 entonian joined 06:46 entonian left 06:51 setty1 joined 07:03 konsolebox left 07:09 konsolebox joined 07:10 ufobat_ joined 07:14 pecastro left, ufobat___ left 07:15 orac1e_ joined 07:20 darutoko joined 07:23 rindolf joined, piojo joined, headcase joined 07:24 ufobat_ left 07:26 piojo_ left 07:28 headcase left 07:32 headcase joined 07:33 headcase left 07:38 headcase joined 07:39 domidumont joined 07:43 domidumont left 07:44 domidumont joined 07:47 domidumont left 07:49 headcase left 07:53 headcase joined 07:58 headcase left 08:01 piojo left 08:02 LanceW joined 08:03 skids left 08:04 Cabanossi left 08:07 Cabanossi joined 08:10 headcase joined 08:12 Rawriful joined
LanceW Hi all, I have been experimenting with Perl6 on a Windows 10 laptop (using berrybrew for perl5 and then rakudobrew for perl6). So far all good... at least until I tried to use zef to install Bailador, DBIish etc. I get and error about "No such method 'subst' for invocant of type 'Any'" anyone got some ideas. Googling turned up rt.perl.org/Public/Bug/Display.html?id=131815 but even after reinstall same issue. I have a gist of full 08:13
error: gist.github.com/lancew/f1d5d4af517...c81c992601 ANy assistance appreciated.
08:14 headcase left 08:15 ipatrol left 08:17 okl joined 08:19 headcase joined 08:21 zakharyas joined 08:28 headcase left 08:33 headcase joined 08:37 headcase left
gfldex LanceW: we dont got recent binaries for windows. So you would have to build rakudo by hand. 08:37
08:38 orac1e_ left
LanceW gfldex, building with rakudobrew is not sufficient? 08:40
08:41 zakharyas left 08:45 HoboWithAShotgun joined 08:47 headcase joined
HoboWithAShotgun good localtime you wonderful people 08:47
08:48 pecastro joined
HoboWithAShotgun what a lovely day this is 08:50
08:51 headcase left
HoboWithAShotgun nothing beats sitting on your desk with a huge weekend joint and a cold german beer, after a wakeup bj and a rich breakfast 08:51
08:56 headcase joined
gfldex LanceW: we are at This is Rakudo version 2017.08-155-gc3a71acb3 built on MoarVM version 2017.08.1-171-gcf95892e6 08:56
implementing Perl 6.c.
08:57 konsolebox left
stmuk LanceW: I can try in an hour or so 09:00
09:00 headcase left 09:02 TEttinger left 09:03 konsolebox joined 09:05 headcase joined, Cabanossi left 09:07 Cabanossi joined
LanceW thanks stmuk 09:07
09:09 headcase left 09:14 headcase joined 09:15 piojo joined 09:16 Actualeyes left 09:24 wander4096 left 09:28 headcase left 09:29 headcase joined 09:33 headcase left 09:41 jcallen left, jcallen joined 09:42 headcase joined 09:44 pecastro left 09:47 headcase left, pecastro joined
piojo perlpilot: are you around? 09:48
09:52 headcase joined 09:56 headcase left 09:57 headcase joined
Geth doc: W4anD0eR96++ created pull request #1562:
It seems we have sub form of `Str`
09:58
piojo On the topic of doc changes, I really think "regexes" should also be indexed as "Regular Expressions". Can I PR this change, or is there a reason it's not searchable that way? 10:00
I'd like to change that, if nobody has serious objections
10:05 headcase left 10:11 pecastro left, pecastro joined
moritz please go ahead 10:14
10:20 headcase joined
piojo thanks moritz. Will do after `make html` finishes 10:22
10:23 headcase left 10:27 eliasr joined 10:34 pecastro left 10:38 margeas joined 10:39 pecastro joined 10:44 headcase joined 10:46 Skarsnik joined 10:48 piojo left 10:49 headcase left 10:58 pmurias joined, piojo joined 11:00 ShalokShalom left 11:01 ShalokShalom joined
Geth doc: lefth++ created pull request #1563:
Make the "Regexes" page also searchable as "Regular Expressions".
11:02
11:03 zura joined 11:05 zura left
stmuk LanceW: I had the same error as you but following the fix at the bottom of rt.perl.org/Public/Bug/Display.html?id=131815 fixed it 11:11
its basically the windows version of rm -rf ~/.zef and ~/.perl6
LanceW stmuk, I tried that and had no success 11:20
stmuk, I shall do again
Tried that again.. same issue with No such method 'subst' for invocant of type 'Any' 11:23
11:25 orac1e_ joined
nine Pretty off topic, but just hilarious and with good lessons: www.pentestpartners.com/security-b...es-really/ 11:27
11:29 headcase joined 11:33 headcase left
timotimo IoT: Not Even Once 11:39
11:44 Skarsnik_ joined, headcase joined 11:47 Skarsnik left 11:52 ShalokShalom_ joined 11:54 Skarsnik_ is now known as Skarsnik 11:55 ShalokShalom left 11:58 headcase left
stmuk LanceW: you could also try "zef nuke" with various options and also checking the directories are being removed with "dir" 12:01
LanceW Shall do. :-)
hmmm.... "zef nuke site" zapped everything including zef. So I then ran rakudobrew build zef, followed by zef install Bailador. Same error ( No such method 'subst' for invocant of type 'Any' ) in in method ver at C:\Users\akage\rakudobrew\moar-2017.07\install\share\perl6\site\sources\138DF35FA08A8D5EDA4A76A105D44F4FFBEDB983 (Zef::Distribution) line 127 12:06
timotimo hm, is there some distribution that doesn't have a version field set? 12:08
Skarsnik most of my module have * as version x) 12:09
LanceW I don't seem to be able to install any modules. All with same error. 12:10
gist.github.com/lancew/169b27599a0...35f02055f2 <- Here is me trying to install JSON::Fast 12:12
12:17 BenGoldberg joined
timotimo i'm trying to install Bailador, too. so many dependencies %) 12:18
anything when you "zef update"? 12:19
piojo LanceW: you're not using cygwin, are you? 12:20
LanceW Not installed it. BUT... I have been using chocolatey to install various things so could be installed as a dependency perhaps? 12:22
timotimo you'd probably notice if you were using cygwin 12:23
12:23 headcase joined
LanceW using CMDer, but typing cyg TAB TAB does seem to come up with a couple of cyg tools.cygcheck.exe cygpath.exe cygwin-console.helper.exe 12:23
12:28 headcase left 12:31 okl left 12:32 nattefrost joined 12:38 headcase joined 12:47 headcase left 12:49 headcase joined 12:53 headcase left
pmurias timotimo: aren't technically the "sane" devices like laptops and smartphones parts of the IoT? 12:57
12:58 wander4096 joined
timotimo not in the way the IoT buzzword is used 12:58
LanceW Hmmm so deleted rakudobrew, installed via the MSI. Same error. Some presume the cygwin issue needs resolving. /me goes off to work out what installed cygwin 13:00
13:04 headcase joined
piojo LanceW: does it work in cmd.exe? 13:05
If not, then I think the fact that cygwin is installed isn't part of the problem. Unrelated. 13:06
wander4096 m: my $c = class Foo { has $.foo = 42; }.new.Capture; say $c{"foo"}; say $c.does(Associative); 13:07
camelia 42
False
wander4096 `class Capture does Positional does Associative { }` 13:08
13:08 headcase left
wander4096 m: my $c = class Foo { has $.foo = 42; }.new.Capture; say $c[0]; say $c.does(Positional); 13:08
camelia Nil
False
Geth doc: titsuki++ created pull request #1564:
Quoting adverbs
piojo m: say class { has $.foo }.new 13:09
camelia <anon|56789568>.new(foo => Any)
piojo woo hoo, anonymous classes
didn't know we had those.
wander4096 m: say Capture.does(Associative) 13:11
camelia False
wander4096 m: say Capture.does(Positional)
camelia False
13:12 espadrine joined
LanceW no it does not work in cmd.exe either 13:13
piojo thanks for testing--that closes one can of worms. 13:14
LanceW Here is output in cmd.exe: gist.github.com/lancew/9ce4ec6cc20...f575d4770c 13:15
13:16 llfourn joined 13:20 headcase joined
piojo could someone try running this: 13:20
touch module.pm6; perl6 -I. -Mmodule -e ''
It gave me a funny warning message 13:21
timotimo ti works here
piojo timotimo: huh. thanks.
ghost in the machine. It's not happening anymore. (must have been a warning only during compilation to bytecode) 13:22
timotimo in that case delete the .precomp folder and try again 13:23
13:24 headcase left
piojo timotimo: thanks for that tip, I've wanted to know that before. But really can't reproduce. oh, well 13:29
13:30 nadim left 13:34 headcase joined 13:35 orac1e_ left, wander4096 left
Geth doc/master: 4 commits pushed by titsuki++, (Itsuki Toyota)++ 13:36
13:39 headcase left 13:40 wamba left
titsuki .tell piojo2 Thanks for your kindly reminder. I closed github.com/perl6/doc/issues/1102 13:40
yoleaux titsuki: I'll pass your message to piojo2.
13:42 headcase joined, ShalokShalom_ is now known as ShalokShalom
piojo titsuki: I think that note was the grand total of my contribution to the doc hackathon :P 13:43
fortunately, I started making other small changes where possible 13:44
like the Android sale that marked a bunch of apps at US$0.10 -- basically no profit, but it helped start a habit
timotimo squashable6: info
squashable6 timotimo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable
timotimo squashable6: status 13:45
squashable6 timotimo, Next SQUASHathon in 18 days and ≈20 hours (2017-10-07 UTC-12⌁UTC+14)
piojo is there a topic yet?
timotimo rakudo tickets, seems like 13:46
moritz I have no idea, but I'd hope "testneeded" tickets
titsuki piojo: oh, that's good to hear :) 13:49
piojo Has anybody seen this error when loading a module for the first time?: 13:51
Use of uninitialized value $repo-id of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
I can't reproduce, but I've seen it twice in the past half hour
timotimo do you have a backtrace to go with it? 13:52
piojo *warning, not error
timotimo: no, it just prints twice, then continues with the correct program output
timotimo OK
13:55 nadim joined, Zoffix joined 13:59 robertle joined 14:01 dogbert2 joined 14:06 Cabanossi left 14:07 Cabanossi joined
LanceW Hmm... removed Gow (which removed cygwin exes) same issue. :-( 14:14
piojo I noticed we have 3 pages about OOP, which come at the problem from different angles. Typesystem, Object Orientation, and 'Classes and Objects' 14:15
Can we add a "See Also" section to the bottom of these pages so they can reference each other?
One might think perfect organization would negate the need for "see also", but if you type "object orient...", you'll find yourself on one page, and typing "OOP" will land you on another. 14:17
This seems like a minor stylistic change, but I think it would be useful 14:18
14:18 nadim left 14:19 yht joined 14:23 headcase left 14:28 headcase joined 14:29 HoboWithAShotgun left 14:30 grondilu left
huf the mysterious object orient... the famous explorer marco sweepo travelled there 14:33
14:34 grondilu joined
grondilu m: say Set().Mix{Set()} 14:34
camelia 1
piojo huf: haha
grondilu m: say Set.new..Mix{Set.new}
camelia 5===SORRY!5=== Error while compiling <tmp>
Autovivifying object closures not yet implemented. Sorry.
at <tmp>:1
------> 3say Set.new..Mix{Set.new}7⏏5<EOL>
14:35 Skarsnik_ joined
grondilu m: say Set.new.Mix{Set.new} 14:35
camelia 0
grondilu m: say Set.new.Mix{Set.new} == Set().Mix{Set()}
camelia False
grondilu ^weird
timotimo huf: aah the pun! :)
grondilu m: Set() == Set.new
camelia WARNINGS for <tmp>:
Useless use of "==" in expression "Set() == Set.new" in sink context (line 1)
Use of uninitialized value of type Set(Any) in numeric context
in block <unit> at <tmp> line 1
grondilu m: say Set() == Set.new
camelia Use of uninitialized value of type Set(Any) in numeric context
True
in block <unit> at <tmp> line 1
grondilu m: say Set() === Set.new 14:36
camelia False
timotimo well, == gives you numeric equivalence?
and Set.new is empty and Set() is also empty
huf and anyway, i think object orientalism is frowned upon these days :) 14:37
14:37 headcase left 14:38 Skarsnik left 14:40 cgfbee left 14:43 headcase joined
lizmat m: dd Set() 14:43
camelia Set(Any)
lizmat Set() is a coercion type, not a Set
m: dd Set().^name
camelia "Set(Any)"
lizmat m: dd Set().HOW.name
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
lizmat m: dd Set().HOW
camelia No such method 'dispatch:<.?>' for invocant of type 'Perl6::Metamodel::CoercionHOW'
in block <unit> at <tmp> line 1
lizmat m: dd Set().HOW.name 14:44
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
lizmat m: dd Set().HOW.name(Set())
camelia "Set(Any)"
lizmat hmmm
m: dd set().HOW.name
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
lizmat m: dd set().^name
camelia "Set"
lizmat m: dd set().HOW
camelia Perl6::Metamodel::ClassHOW.new
lizmat m: use nqp; dd nqp::istype(Set(),Set) # perhaps more clearly: Set() is *not* a Set 14:46
camelia 0
14:47 headcase left
jnthn Indeed, it's the coercion type from Any -> Set 14:49
grondilu m: say Set() ~~ Set
camelia No such method 'does' for invocant of type 'Perl6::Metamodel::CoercionHOW'
in block <unit> at <tmp> line 1
grondilu that's weird. I have a Mix of Set and I wanted to retrieve the mix value of the empty set. 'Set()' worked, 'Set.new' didn't. 14:51
14:51 Skarsnik_ is now known as Skarsnik
grondilu But if Set() is not a Set, I would have expected Set.new to work instead of Set() 14:51
14:52 headcase joined
grondilu realizes there is also the option of "set()" 14:52
'set()' actually workds
m: say set().Mix{set()} 14:53
camelia 0
grondilu hum :/
I though it worked
Zoffix set() is empty set
not a set with an empty set
14:54 leont joined
Zoffix Oh, and yeah, it coerceres its contents to Mix, not itself 14:54
m: say set(∅).Mix{∅}
camelia 1
14:54 headcase_ joined
Zoffix grondilu: as for return type in protos you mentioned yesterday. I suspect it's just NYI. 14:55
grondilu m: say (set().Mix){set()}
camelia 0
grondilu Zoffix: noted
14:56 headcase left
grondilu doesn't understand why his code work while the above line doesn't 14:56
grondilu tries to golf it
Zoffix (set().Mix){set()} => (mix()){set()} => "find an an object (empty Set) in an empty Mix" => 0 14:57
grondilu: ensure your rakudo version is recent-enough. There were some nail-downings of Set/Mix/Bag stuff a couple of months ago. 14:58
grondilu well my rakudo is rarely more than a few days old
though today !?Configure returns nothing, so I guess I haven't compiled rakudo for a while 15:00
15:01 HoboWithAShotgun joined 15:02 yht left 15:03 Sgeo_ joined
grondilu Zoffix: shouldn't set().Mix return a Mix with a single empty set in it? 15:03
m: say set().Mix 15:04
camelia Mix()
grondilu oh wait
m: say (set(),).Mix
camelia Mix(set())
grondilu I see, makes sense
15:04 Sgeo left
grondilu m: say set(set()).Mix 15:04
camelia Mix(set())
Zoffix That happens only for type objects. Set:D coerces its contents, not itself. 15:06
m: dd Set.Mix
camelia (Set).Mix
15:06 headcase_ left, nadim joined 15:09 Sgeo_ left 15:15 skids joined
grondilu if you're curious about what I'm doing with those Mix of sets, check out my Polynomial class in the symbolic branch of my Clifford module: github.com/grondilu/clifford/blob/...nomial.pm6 15:15
I'm implementing monomials as bags, and polynomials as Mix of monomials 15:16
I found the idea quite elegant.
and now I'm trying to do the same for MultiVectors as Mix of Sets of basisvectors 15:17
now that I think about it, I should consider the constant as the empty bag 15:18
15:19 vike left
grondilu my ultimate goal is to do algebra with things like 1 + x²*y + y²*e0 - x*e1∧e2 15:20
Zoffix neat 15:21
grondilu I'm hoping that if Polynomials implements Real, I will be able to consistently use them as value in Mix 15:25
15:25 headcase joined, vike joined
grondilu m: class MInt does Real { has Int $.n; method Bridge { $n % 13 } }; say ('foo' xx 12). 15:29
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$n' is not declared. Did you mean '$!n'?
at <tmp>:1
------> 3oes Real { has Int $.n; method Bridge { 7⏏5$n % 13 } }; say ('foo' xx 12).
grondilu oops sorry
m: class MInt does Real { has Int $.n; method Bridge { $n % 3 } }; say ('foo' => MInt.new(:n(2))).Mix 15:30
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$n' is not declared. Did you mean '$!n'?
at <tmp>:1
------> 3oes Real { has Int $.n; method Bridge { 7⏏5$n % 3 } }; say ('foo' => MInt.new(:n(2)
grondilu m: class MInt does Real { has Int $.n; method Bridge { $!n % 3 } }; say ('foo' => MInt.new(:n(2))).Mix
camelia Mix(foo(2))
15:31 nadim left, Sgeo joined
grondilu m: class MInt does Real { has Int $.n; method Bridge { $!n % 3 } }; constant two = MInt.new(:n(2)); say ("foo" => two, "foo" => two).Mix 15:31
camelia Mix(foo(4))
grondilu hum, not what I was hoping
grondilu was hoping Mix(foo(1)) 15:32
m: class MInt does Real { has Int $.n; method Bridge { $!n % 3 } }; constant two = MInt.new(:n(2)); say ("foo" => two, "foo" => two).Mix<foo>.WHAT 15:33
camelia (Int)
grondilu m: class MInt does Real { has Int $.n; method Bridge { $!n % 3 } }; constant two = MInt.new(:n(2)); say ("foo" => two).Mix<foo>.WHAT
camelia (MInt)
Zoffix m: class MInt does Real { has Int $.n; method Bridge { $!n % 3 } }; constant two = MInt.new(:n(2)); say (2 + two).^name 15:34
camelia Num
Zoffix Same problem basically.
Methods/ops don't carry over the types
15:35 headcase_ joined, headcase left
Zoffix m: class MInt is Int { has Int $.n; method Bridge { $!n % 3 } }; constant two = MInt.new(:n(2)); say (2 + two).^name # better example 15:35
camelia Int
grondilu except I did not introduce a Int
15:35 wamba joined
grondilu I only added two and two (or thought I did) 15:35
I don't see why a Int should show up 15:36
15:36 Cabanossi left
grondilu oh wait 15:36
hang on
Zoffix The mix added the weights together
grondilu m: class MInt does Real { has Int $.n; method Bridge { self.new: n => ($!n % 3) } }; constant two = MInt.new(:n(2)); say ("foo" => two, "foo" => two).Mix 15:37
lol
camelia (timeout)
Zoffix That's the dispatch infiniloop I mentioned the other day
15:37 Cabanossi joined
grondilu m: role MInt does Real { has Int $.n; method Bridge { ($!n % 3) but MInt } }; constant two = MInt.new(:n(2)); say ("foo" => two, "foo" => two).Mix 15:37
camelia Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'?
in method Bridge at <tmp> line 1
in block <unit> at <tmp> line 1
Zoffix You keep giving it a thing it doesn't know how to handle and it loops calling .Bridge
grondilu I guess I could make it work if instead of just providing a Bridge I implement enough arithmetics operators 15:38
and make sure they return a MInt 15:39
15:39 headcase_ left
Zoffix That might not make ().Mix work. Not only your custom ops will not be in its lexical scope, I don't think it uses them at all. 15:39
grondilu Mix is supposed to accept Real as values. It should be agnostic about what actual class is implementing it 15:40
Zoffix Maybe in a perfect world.
Currently, that'd make them like 100+ times slower, To satisfy an edge case 15:41
grondilu :/
Zoffix All part of this ticket, I'd guess: rt.perl.org/Ticket/Display.html?id...et-history 15:42
grondilu worst case scenario I'll write my own Mix :/ 15:43
it'd be LTA, though
15:45 headcase joined
lizmat grondilu: perhaps an approach such as with Date.new would help 15:47
15:49 okl joined 15:51 domidumont joined 15:52 andrzejku joined
grondilu doesn't know about tha 15:53
t
15:57 geekosaur left, LanceW left, headcase left
lizmat afk& 15:58
16:03 geekosaur joined 16:05 headcase joined
HoboWithAShotgun what do i have to add to my class so I can do the equality check? 16:06
16:06 Cabanossi left 16:07 Cabanossi joined
Zoffix HoboWithAShotgun: what sort of equality? 16:07
(numeric, stringy, object)
16:08 khw joined
HoboWithAShotgun for my angle class. when i say $alpha = 45°; $beta = 45°; say $alpha == $beta; i get a cannot resolve caller ... 16:09
oh. also override ==
*facepalm
16:09 headcase left, headcase joined
Zoffix m: sub postfix:<°> { class Deg { has $.d; method Numeric { $!d } }.new: :$^d }; my $alpha = 45°; my $beta = 45°; say $alpha == $beta 16:11
camelia True
Zoffix m: sub postfix:<°> { class Deg { has $.d; method Numeric { $!d } }.new: :$^d }; my $alpha = 45°; my $beta = 35°; say $alpha == $beta
camelia False
Zoffix You could also add a multi for `==`, but keep in mind it'd have to be available in lexical scope for it to work (so if you pass your custom class objects somewhere else, and do comparison there, it won't work right) 16:12
HoboWithAShotgun this is the error i get with my actual class 16:15
Cannot resolve caller Numeric(Math::Angle: ); none of these signatures match: (Mu:U \v: *%_)
16:15 bobv joined
Zoffix HoboWithAShotgun: right, add method Numeric {} to Math::Angle that returns some core numeric 16:15
16:16 nadim joined
HoboWithAShotgun yup, that did it 16:17
take my dearest gratidude good sir
16:19 headcase left
Zoffix takes it 16:19
16:21 andrzejku left
HoboWithAShotgun allright. next textcase fails ok 45° > 30°. cannot resolve caller Real 16:24
i mean i got it fixed but why does it need a Real to a larger than? 16:25
16:27 headcase joined 16:29 awwaiid joined
Zoffix HoboWithAShotgun: because that operator works with numbers and only Real numbers can be compared 16:31
16:31 headcase left
Zoffix m: sub postfix:<°> { class Deg { has $.d; method Real { $!d }; method Numeric { $!d } }.new: :$^d }; my $alpha = 45°; my $beta = 45°; say $alpha == $beta; say $alpha > $beta 16:32
camelia True
False
Zoffix m: say 42i > 70i
camelia Cannot convert 0+42i to Real: imaginary part not zero
in block <unit> at <tmp> line 1
Zoffix New blog post: "The Rakudo Book Project": rakudo.party/post/The-Rakudo-Book-Project
moritz Zoffix++ 16:36
Zoffix: I'll be happy to proof-read for you :-)
Zoffix :)
16:37 Cabanossi left, headcase joined, Cabanossi joined 16:38 pecastro left 16:41 headcase left, headcase joined 16:44 pecastro joined 16:45 headcase_ joined 16:46 headcase left 16:48 dogbert2 left 16:49 headcase_ left, headcase joined 16:53 headcase left 16:58 pecastro left
moritz Zoffix: I don't know if you are open to such ideas, but one thing you could do is self-publish, and come up with a rule like selling the books for the first one or two years, and then making them freely available 17:01
17:03 headcase joined
moritz I made about $870 off the first book before going to Apress, and about $400 selling the second one 17:04
and both didn't even have a proper launch at that time (so they were never advertised as "finished" and on sale at the same time)
17:05 Cabanossi left
moritz so I think with a proper launch, it's not unreasonable to expect to make betwee 2k und 3k USD per book (at least the beginner books; I expect the more advanced ones to sell less) 17:06
17:07 Cabanossi joined 17:09 robertle_ joined 17:12 headcase left 17:13 robertle left 17:14 headcase joined 17:16 robertle joined
moritz maybe more with good marketing 17:16
17:18 robertle_ left 17:20 okl left 17:22 robertle left 17:24 headcase left 17:28 dogbert2 joined 17:29 robertle joined 17:35 headcase joined 17:36 BenGoldberg left
Zoffix Nah. The primary goal is to have good information for Rakudo users, hence the freeness. Rakudo Core Fundraisers are just a cherry on top. 17:38
17:39 headcase left
mspo hey is there an 09 release? 17:41
timotimo mspo: almost!
mspo timotimo: new/stable CURI stuff in there? 17:42
timotimo: also how long is almost? :) 17:43
timotimo could still happen today 17:46
i'm not sure about the CURI situation in general, it's not something i've worked on at all 17:48
mspo that would be nice 17:49
17:57 headcase joined
Skarsnik releasable6, status 17:58
releasable6 Skarsnik, Next release will happen when it's ready. 1 blocker. 154 out of 167 commits logged
Skarsnik, Details: gist.github.com/b563d635b0e1774034...f9123334a2
18:01 headcase left 18:02 pecastro joined 18:04 rindolf left, shlomif joined 18:05 headcase joined, Cabanossi left 18:07 Cabanossi joined 18:09 headcase left 18:10 vendethiel- left 18:15 shlomif is now known as rindolf 18:25 headcase joined 18:26 piojo left 18:33 headcase left 18:44 headcase joined 18:49 headcase left 18:55 headcase joined, pecastro left, darutoko left 18:56 pecastro joined 18:58 emeric joined
tyil is there some matrix showing all elements of unicode and a bunch of popular languages, where you can easily look up which langs support which parts of the unicode spec? 19:00
(and if there isn't, would it be an idea to make one to showcase perl 6's support for it?) 19:01
leont I remember Tom Christiansen doing a presentation on this a few years ago (comparing perl5 to other languages), focussing on regexes in articular. Haven't seen such a thing in perl6 context. 19:02
19:03 kaare__ left
tyil maybe someone with a lot of unicode experience ( samcv ?) could distill the spec into implementable parts and make a list of it, but we'd need some good info on what other langs support as well 19:06
19:08 headcase left
leont www.azabani.com/pages/gbu/ 19:10
tyil interesting 19:12
thanks leont
(wonder if its still up to date)
leont I should warn you though if you plan on emailing TomC about this, he has a tendency to write 10000 word emails :-p 19:13
19:13 domidumont left 19:14 dj_goku left, headcase joined
tyil I have the bandwidth :p 19:14
leont "For example, this talk originally included a bunch of pain about Unicode in Python v2.7, but I deleted all the v2.7 material to get past the profanity filters." :-D 19:15
tyil lol 19:17
19:18 headcase left, Jurgen joined
timotimo :D 19:19
well, python 2.7 isn't in use any more, so ... :P
19:19 headcase joined
tyil timotimo: we wish 19:20
py2.7 still seems to be more popular than the 3 series from what i've seen at meetups
19:23 Jurgen left, headcase left 19:24 pecastro left 19:26 headcase joined 19:28 BenGoldberg joined
leont Yeah, that's also my impression 19:31
timotimo not a problem 19:36
19:44 emeric left 19:45 _28_ria left, kyan joined 19:46 _28_ria joined 19:55 _28_ria left 19:56 _28_ria joined, pecastro joined 19:57 pmurias left 19:59 kaare__ joined, TEttinger joined 20:00 pmurias joined
pmurias Zoffix: what makes writing books more fun the writing reference docs for docs.perl6.org? 20:02
20:03 telex left, headcase_ joined 20:04 Skarsnik left, telex joined 20:07 headcase left 20:16 tabv left 20:21 Cabanossi left 20:22 Cabanossi joined 20:24 Cabanossi left 20:25 Cabanossi joined 20:30 telex left 20:32 telex joined
lizmat Zoffix: re rakudo.party/post/The-Rakudo-Book-Project , I would argue that the Green Book already exists: it's called "Think Perl 6" 20:32
20:34 pmurias left
lizmat oh, and by the way, Zoffix++ # excellent ide and blog post 20:34
*idea rather :-)
20:35 Lasse_ left 20:37 Aaronepower joined
MasterDuke
.oO(Zoffix is writing a Perl 6 IDE, woot!)
20:38
can only dream, but the books are a great endeavor also 20:39
20:39 robertle left
Zoffix pmurias: not having 100 others users bikeshedding your every decision. 20:39
[Coke] Zoffix++ 20:41
20:44 pmurias joined
skids m: say so rx/foo/; # Root reason behind test failure of RT#124527 spectest 20:49
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=124527
camelia False
skids But I cannot edit that ticket. 20:50
20:52 orac1e_ joined 20:53 headcase_ left
Aaronepower Is there any shorter way of saying `if $<match>.Bool { $result = 1 }`? 20:54
[Coke] ?$<match>
? 20:55
Aaronepower [Coke]: Where do I put `$result = 1`?
[Coke] $result = 1 if ?$<match>;
skids if you don't care if result gets set to 0, $result = +?$<match> 20:56
Aaronepower [Coke]: That works for me. thanks!
skids: I'm doing something more complex than setting something to zero or one. So I couldn't golf it that far. What does the + do in that context? 20:58
skids converts the Bool to an Int
Aaronepower [Coke]: Can you add an else to an inline if? 21:02
timotimo you can also $result ||= +?$<match>
Aaronepower timotimo: What's `||=`?
BooK where do you people find all the time?
timotimo well, it'll only set $result to 1 if it was falsy before
it's the same as writing $result = $result || +?$<match>
21:03 nadim left
skids Well, you could ?$<match> ?? dostuff !! dootherstuff 21:03
21:03 orac1e_ left 21:10 _28_ria left 21:12 _28_ria joined 21:13 _28_ria left
Geth doc: 7f12deab88 | Coke++ | doc/Language/testing.pod6
simplify phrasing
21:13
21:14 _28_ria joined 21:16 _28_ria left 21:17 travis-ci joined
travis-ci Doc build errored. Coke 'simplify phrasing' 21:17
travis-ci.org/perl6/doc/builds/276617419 github.com/perl6/doc/compare/9f6da...12deab88ac
21:17 travis-ci left
buggable [travis build above] ☠ Did not recognize some failures. Check results manually. 21:17
21:19 _28_ria joined, _28_ria left 21:21 _28_ria joined 21:24 _28_ria left 21:25 _28_ria joined
Aaronepower Is there a way to substitute where the substitution generates a new value? 21:26
timotimo yes
use S/// instead of s/// or the .subst method
21:27 okl joined
leont didn't know S/// :-o 21:28
21:29 _28_ria left 21:30 _28_ria joined 21:31 _28_ria left 21:32 _28_ria joined 21:33 _28_ria left
Aaronepower timotimo: My code is `make (join ' ', $/.list) ~~ S/'(' .* ')'//` which gives me the same `Cannot assign to read-only value` and says `Smartmatch with S/// is not useful` 21:34
21:35 _28_ria joined
BenGoldberg In perl5, the way to make s/// (or tr///) generate a new value is by passing a /r flag at the end. 21:35
BenGoldberg wonders whether it would be useful to have s:r/// do the same ;) 21:36
21:37 _28_ria left 21:38 Rawriful left
geekosaur Aaronepower, in perl 5 ~~ temporarily binds something to $_. in perl 6 it is *always* a smartmatch, and it would be smartmatching against the *reslt* of the S/// 21:38
use 'given' instead of ~~
21:38 okl left, BenGoldberg left
skids Aaronepower: S/// works on the topic. Instead S/'(' .* ')'// given $/.list.join(' ') 21:38
Aaronepower geekosaur: The compiler said that too. I just assumed given was part of the error message, not an operator. 21:39
21:41 _28_ria joined
Aaronepower skids: That gives me `Cannot assign to a readonly variable ($/) or a value` 21:44
21:50 Cabanossi left 21:52 Cabanossi joined
skids Hrm I suspect some issues with $/ due to the rx-inside-rx. 21:53
m: "f,g,h,i" ~~ /([<alpha>])+ % "," { say "nay"; make "foo"} /; $/.made.perl.say
camelia nay
"foo"
skids m: "f,g,h,i" ~~ /([<alpha>])+ % "," { say my $a = S/./y/ given "nay"; make "foo"} /; $/.made.perl.say
camelia yay
Nil
skids That seems broken to me at first glance. 21:54
21:55 LanceW joined
Aaronepower skids: Mine is in a Action object for a Grammar I don't know if that makes it different? 21:59
skids Maybe.
Hrm well maybe not so broken on second thought 22:00
m: perl6 -e '"f,g,h,i" ~~ /([<alpha>])+ % "," { my $slash = $/; say my $a = S/./y/ given "nay"; $slash.make("foo")} /; $/.made.perl.say' 22:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3perl6 -e7⏏5 '"f,g,h,i" ~~ /([<alpha>])+ % "," { my
expecting any of:
infix
infix stopper
postfix
statement en…
skids m: "f,g,h,i" ~~ /([<alpha>])+ % "," { my $slash = $/; say my $a = S/./y/ given "nay"; $slash.make("foo")} /; $/.made.perl.say 22:03
camelia yay
"foo"
skids Maybe try routing around your $/ getting clobbered like that.
Aaronepower skids: I tried `method items($/) { my $a = $/; make S/'(' .* ')'// given $a.list.join(' ') }` no such luck. 22:05
skids You have to do the make on the $a. 22:06
Aaronepower skids: I don't know what you mean by that. 22:07
skids $a.make. not just "make". 22:08
because make works on $/ and after the S/// your $/ is the match from that, not yout current cursor in the grammar.
("method items($a)" might shorten that fist part up.) 22:11
Aaronepower skids: Tried this. same readonly error. paste.rs/zmG
Zoffix Aaronepower: just don't use $/ as the parameter 22:12
skids Try "method items($a)" maybe? Might work, might not. 22:13
Aaronepower skids, Zoffix: Yes that worked thanks! 22:14
Zoffix Aaronepower: I also find .subst() easier to use than S/// 22:15
method items($m) { make .list.subst: /'(' .* ')'/ with $m } # if I understand your original code correctly
method items($m) { .make .list.subst: /'(' .* ')'/ with $m } # if I understand your original code correctly
method items($_) { .make .list.subst: /'(' .* ')'/ } # if I understand your original code correctly
22:15 headcase joined
Zoffix ^_^ 22:15
Aaronepower Zoffix: There's a join missing, but that looks good! 22:16
skids List.Str is reliably .join(' '), no? 22:17
Zoffix I think so, which is why I left it out
Aaronepower I never knew that.
22:17 pecastro left
Aaronepower Zoffix: I tried that code, "Too few positionals passed" 22:18
skids Yeah S02-types/list.t:is (5, 7, 8).Str, '5 7 8', '.Str on a List';. Should very likely never change. Aside from that, lots of tests would break. 22:19
Zoffix Aaronepower: ah right, I forgot the replacement part 22:20
method items($_) { .make .list.subst: /'(' .* ')'/, '' } # if I understand your original code correctly
Aaronepower Zoffix: Hah, nope same error. :p
Zoffix method items($_) { .make: .list.subst: /'(' .* ')'/, '' } # if I understand your original code correctly 22:21
Can't type at all :)
5th time a charm, eh/
22:25 kaare__ left
Aaronepower Is there any easy way to remove Hash keys which have a value of Nil? 22:25
22:25 kaare__ joined
Zoffix m: my %h = :a42, :b70, :c(Nil), :d(Nil); %h .= grep: *.value.defined; dd %h 22:26
camelia Cannot allocate memory
Zoffix m: my %h = :a42, :b70, :c(Nil), :d(Nil); %h .= grep: *.value.defined; dd %h
camelia Cannot allocate memory
Zoffix m: my %h = :a42, :b70, :c(Nil), :d(Nil); %h .= grep: *.value.defined; dd %h
camelia Cannot allocate memory
Zoffix :/ 22:27
c: HEAD my %h = :a42, :b70, :c(Nil), :d(Nil); %h .= grep: *.value.defined; dd %h
committable6 Zoffix, ¦HEAD(213c3e3): «Hash %h = {:a42, :b70}»
Zoffix c: HEAD my %h = :a42, :b70, :c(Nil), :d(Nil); dd %h».defined 22:28
committable6 Zoffix, ¦HEAD(213c3e3): «Hash % = {:a42, :b70, :!c, :!d}»
Zoffix doesn't get that result....
AlexDaniel Zoffix: what do you get?
Zoffix s/get/understand/;
AlexDaniel ah
skids m: my $a := :{ "ak" => "av" }; $a.say; $a{Nil}++; $a.say; $a{Nil}:delete.say; $a.say; 22:29
camelia {ak => av}
Use of Nil in string context
{Nil => 1, ak => av}
1
{ak => av}
in block <unit> at <tmp> line 1
skids Funny it warns on the string context, then works.
22:31 espadrine left
skids Oh it must be warning inside the say" 22:31
22:33 rindolf left 22:36 leont left 22:38 headcase_ joined 22:42 headcase left 22:46 headcase_ left 22:50 LanceW left
Zoffix lizmat: thanks. I'll try to give Think Perl 6 a more thorough read before writing the Green Book (which will likely be a year or more from now). Just flipped through some of it right now and I think I'm aiming for a much more informal and practical approach. Something Average Joe could pick up and get a new skill to do small one-scripts, rather than necessarily "thinking like a computer scientist". Just today 22:51
I was reading about #include's in my C book and I remember how much of a deal the teacher made about them in college, despite them being so trivial to learn. So that's my goal, leave the science well-hidden.
22:55 pecastro joined, headcase joined 23:07 bobv left 23:28 azawawi joined
azawawi hi 23:28
azawawi waves
23:29 pmurias left
azawawi AlexDaniel: ping 23:36
AlexDaniel hello
23:36 Cabanossi left
azawawi AlexDaniel: sorry for the latest reply for github.com/azawawi/perl6-ncurses/issues/16 23:36
23:37 Cabanossi joined
azawawi AlexDaniel: but i cant replicate it on my system somehow 23:37
AlexDaniel azawawi: oh
maybe I fixed it
azawawi AlexDaniel: can you try it now? 23:38
AlexDaniel sure
azawawi cool
azawawi is waiting for travis-ci.org/azawawi/perl6-ncurse.../272484221 to finish 23:39
first one is working on rakudo latest... waiting for macos ci 23:41
23:41 pilne joined
AlexDaniel azawawi: yes gist.github.com/Whateverable/87fef...58f001455e 23:42
23:42 headcase left
azawawi so how did you fix it? :) 23:43
AlexDaniel azawawi: so basically we now disable buffering if you use Test
azawawi: so we get old behavior in this particular case
azawawi aha ok 23:44
AlexDaniel azawawi: buffering had to be disabled for RT #132108
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=132108
azawawi travis-ci.org/azawawi/perl6-ncurse.../272484217 # PASS on all supported platforms :) 23:45
AlexDaniel azawawi: note, however, that the test in your module is probably wrong 23:46
but I couldn't find a way to improve it because newterm is NYI
azawawi SCREEN * newterm(const char *,FILE *,FILE *) # ? 23:47
AlexDaniel yea 23:48
azawawi how do you get a FILE pointer from a perl6 IO handle... temporary files? 23:49
AlexDaniel nativecallable6: void newterm(const char *,FILE *,FILE *); 23:50
nativecallable6 AlexDaniel, gist.github.com/ed59f2eeb308100d49...b449dfcc19
AlexDaniel nativecallable6: #include <stdio.h>; void newterm(const char *,FILE *,FILE *); 23:51
nativecallable6 AlexDaniel, gist.github.com/e95ec65f0b9bd40b11...95cedf9ba1
AlexDaniel haha. Well I was just curios as to what it's going to give
u
azawawi: I don't know :) 23:52
azawawi we can ofcourse native fopen the file and pass it to it 23:53
geekosaur hm, yuck. terminfo is easier, it's a fd. forgot curses does the C thing 23:58
er, stdio thing
which actually complicates the buffering issue...
azawawi like i thought... github.com/seanohalpin/ffi-ncurses...erm.rb#L34 # :)