»ö« 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:06 rindolf joined 00:17 finanalyst joined 00:24 rindolf left 00:32 cpage_ left, rindolf joined 00:33 cpage_ joined 00:39 Actualeyes joined 00:41 cpage_ left 01:03 ssotka left, Levine joined 01:04 Levine left 01:11 grassass left 01:23 adu left 01:25 kalkin-_ joined, kalkin- left 01:26 kid51 left, finanalyst left 01:28 molaf left 01:29 adu joined 01:33 finanalyst joined 01:41 molaf joined 01:42 ssotka joined 01:43 mr-foobar left 01:46 ilbot3 left
gfldex m: for <name file line arity count> -> $n { say (&printf)."$n"() } 01:48
camelia rakudo-moar 6bb23a: OUTPUT«printf␤gen/moar/m-CORE.setting␤7889␤1␤Inf␤»
01:48 ilbot3 joined
gfldex is there a shorter (or more elegant) way to calling many methods on the same object? 01:48
01:49 sortiz joined
geekosaur something like given $foo { .bar; .baz; } 01:50
?
gfldex m: given &printf { say .name, .file, .line }
camelia rakudo-moar 6bb23a: OUTPUT«printfgen/moar/m-CORE.setting7889␤»
sortiz \o #perl6 01:51
gfldex m: given &printf { say [.name, .file, .line] } 01:52
camelia rakudo-moar 6bb23a: OUTPUT«[printf gen/moar/m-CORE.setting 7889]␤»
gfldex :)
01:54 user9 left 01:55 sufrostico left 02:00 grassass joined 02:12 Zoffix joined
Zoffix gfldex, .foo, .bar, .ber given $obj; also works. printf "%s - %d, %d", .foo, .bar, .ber given $obj 02:13
gfldex we seam not to doc the trailing given form 02:14
Zoffix Well volunteered! :) 02:15
m: say .perl, .Str, .ACCEPTS: * given * 02:20
camelia rakudo-moar 6bb23a: OUTPUT«**True␤»
Zoffix ehehe
02:23 grondilu left 02:24 tardisx left 02:25 ribasushi left
gfldex m: printf "%s %02i.%02i.%i", <Mo Tu We Th Fr Sa Su>[.day-of-week], .day, .month, .year given DateTime.now; 02:26
camelia rakudo-moar 6bb23a: OUTPUT«Sa 03.06.2016»
rindolf Zoffix: hi, sup?
Zoffix \o
02:26 tardisx joined 02:33 ribasushi joined
dalek c: 2cd8cd1 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
link from given/when to signature literals
02:41
c: 0ea5cd8 | (Wenzel P. P. Peppmeyer)++ | doc/Language/control.pod:
doc statement form of given
02:41 noganex joined 02:43 noganex_ left 02:49 tardisx left
gfldex i just hit the print preview button on the one big page version of the docs. Firefox kindly crashed after a while. 02:58
rindolf gfldex: heh, heh. 02:59
gfldex 470 pages with Chrome 03:00
03:01 |meta left
gfldex The Perl 6 Book might get fairly thick. 03:01
03:02 yqt left 03:08 pierre_ left 03:14 pierre_ joined 03:16 titsuki left 03:19 pierre_ left 03:21 BenGoldberg joined 03:28 pierre_ joined, tardisx joined 03:30 jimbobby joined 03:36 ribasushi left
jimbobby will Larry's recent OSCON talk be available for free at any point? 03:36
I know u can pay on O' reilly at some point 03:37
03:37 finanalyst left 03:40 ribasushi joined 03:41 labster left 03:46 cpage_ joined 03:50 jimbobby left 03:51 john51 left 03:52 adu left 03:53 john51 joined 03:57 tardisx left 03:59 ribasushi left
Xliff .seen RabidGravy 04:00
yoleaux I saw RabidGravy 2 Jun 2016 22:01Z in #perl6: <RabidGravy> dogbert17, yes, or could be created by supply { } or from-list or something
Xliff RabidGravy: Any word on that OAuth2 stuff? 04:01
04:05 tardisx joined 04:07 adu joined 04:08 ribasushi joined, adu left 04:18 skids left 04:20 ribasushi left 04:22 labster joined 04:25 Cabanossi left, ribasushi joined 04:26 pierre_ left 04:28 Cabanossi joined 04:32 pierre_ joined 04:36 Levine joined 04:37 pierre_ left, Levine left 04:47 kurahaupo left 04:57 khw left 05:00 tardisx left 05:01 tardisx joined 05:05 grassass left, adu joined 05:10 tardisx left 05:11 tardisx joined 05:33 pierre_ joined
stevieb9 camelia: help 05:35
camelia stevieb9: Usage: <(prof-m|star-j|debug-cat|rakudo-moar|niecza|nqp-parrot|star-m|p5-to-p6|nqp-js|nqp-jvm|nqp-moarvm|rakudo-jvm|rakudo-MOAR|std|pugs|rnP|sj|nPr|nqp-j|rPn|r-m|rj|nr|Prn|m|nqp-mvm|j|Pnr|nrP|p56|r|nom|nqp-m|P|nqp|perl6|rm|M|rn|p6|n|nqp-p|r-jvm|sm|nqp-q|rakudo|star|r-j)(?^::\s(?!OUTPUT))
..$perl6_program>
stevieb9 camelia: help m 05:36
camelia stevieb9: Usage: <(prof-m|star-j|debug-cat|rakudo-moar|niecza|nqp-parrot|star-m|p5-to-p6|nqp-js|nqp-jvm|nqp-moarvm|rakudo-jvm|rakudo-MOAR|std|pugs|rnP|sj|nPr|nqp-j|rPn|r-m|rj|nr|Prn|m|nqp-mvm|j|Pnr|nrP|p56|r|nom|nqp-m|P|nqp|perl6|rm|M|rn|p6|n|nqp-p|r-jvm|sm|nqp-q|rakudo|star|r-j)(?^::\s(?!OUTPUT))
..$perl6_program>
05:38 pierre_ left 05:39 grassass joined 05:46 baest left, slobo joined 05:47 adu left, tardisx left 05:48 pierre_ joined 05:52 wamba joined 05:54 adu joined 05:59 tardisx joined
slobo nativecall q: how does one refer to a pointer to a struct? eg `typedef struct Elt {}; typedef struct List { int num; Elt* elts }` - i tried `Pointer[Elt]` and worked to get me the first element, but I can't index past 0; I tried `CArray[Elt]`, but i get null for [0] and SEGV for [1], I also tried Pointer[CArray[Elt]], and $b.elts[0].deref[0] is null too 06:01
06:04 BenGoldberg left 06:09 matiaslina left 06:15 _mg_ joined 06:22 jack_rabbit joined 06:31 ssotka left 06:33 maybekoo2 joined, ribasushi left, sno left 06:35 sortiz left 06:36 sno joined 06:37 adu left 06:39 ribasushi joined 06:48 ribasushi left 06:51 ribasushi joined 06:52 sno left 06:56 Zero_Dogg left, Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
slobo i think my question is actually how to specify CArray[CStruct] where it's not pointers inside the CArray, but CStructs are packed one after another. 07:01
07:05 ribasushi left 07:12 ribasushi joined 07:14 darutoko joined 07:22 jack_rabbit left
masak good morning, #perl6 07:22
07:22 slobo left
moritz \o 07:26
07:29 brrt joined 07:30 slobo joined 07:31 nadim joined 07:41 _nadim joined 07:43 nadim left 07:46 abraxxa joined 07:47 sno joined 07:49 wamba left 07:50 tardisx left 07:51 brrt left 07:54 ufobat joined 07:55 zakharyas joined 07:56 g4 joined 07:59 nadim joined 08:03 _nadim left, ocbtec joined 08:05 nadim left 08:06 nadim joined
ufobat hoi 08:10
08:11 RabidGravy joined 08:16 ribasushi left 08:28 donaldh joined
masak \o 08:28
08:34 ggoebel116 joined 08:35 jevin_ joined 08:36 clkao_ joined, donaldh_ joined
RabidGravy harr! 08:36
08:37 parisba_ joined, nine_ joined 08:38 notostraca joined, ribasushi joined, psch_ joined, cosimo_ joined, Juerd_ joined, broquain1 joined 08:39 clkao left, donaldh left, TEttinger left, inokenty left, ggoebel115 left, mrsolo left, parisba left, cosimo left, b2gills left, Juerd left, broquaint left, psch left, jevin left, geekosaur left, Juerd_ is now known as Juerd, donaldh_ is now known as donaldh, geekosaur joined, mrsolo joined
RabidGravy OooOOOooh 08:39
08:40 parisba_ is now known as parisba, ssm joined, clkao_ is now known as clkao, parisba is now known as Guest87843, inokenty joined 08:43 notostraca is now known as TEttinger 08:44 wamba joined 08:51 b2gills joined 08:54 Humdai joined 08:56 AlexDaniel joined 09:00 vendethiel joined 09:03 user9 joined 09:06 cosimo_ left 09:13 brrt joined 09:29 slobo left 09:39 wamba left 09:46 bjz left 09:57 yx_ joined 10:00 yx_ is now known as xnrand, bjz joined 10:01 as left, Bucciarati left 10:02 camelia left, Gothmog_ joined 10:03 nine joined 10:04 camelia joined 10:05 nine_ left, ChanServ sets mode: +v camelia, jevin_ left 10:06 Bucciarati joined
RabidGravy brane struggling to wake up this morning 10:15
is there a neater way of doing:
m: my %f = ( B => 1, D => 2, A => 3, C => 4); for %f.pairs.sort(-> $p { $p.key }) -> $v { say $v.key, " => ", $v.value }
camelia rakudo-moar affe02: OUTPUT«A => 3␤B => 1␤C => 4␤D => 2␤»
DrForr I've barely gotten to work. Too much sh*t going on today. 10:16
10:16 Khisanth left, richi235 left, mls left
RabidGravy that is get the key/value sorted by key? 10:16
timotimo m: my %f = ( B => 1, D => 2, A => 3, C => 4); say %f.pairs.sort( *.key )
camelia rakudo-moar affe02: OUTPUT«(A => 3 B => 1 C => 4 D => 2)␤»
timotimo no need to be so wordy in the middle part there
DrForr Also, just so I have some confirmation, is the phrase "beginning perl 5 programmer" or "beginner perl 5 programmer" more awkward? My feeling is the latter. 10:17
masak are you aiming for more awkward? :P
RabidGravy there is one less indirection of meaning in the latter 10:18
so I would use the latter as it more directly forms a noun-like thingy than the former 10:19
DrForr Asking which is more awkward. I'm being interviewed for builtinerl.com and I used the former "beginning Perl 5 programmer" in the interview, but apparently I also have an editor who feels it's more awkward than "beginner perl 5 programmer". 10:20
I don't give sufficient sh*t to fight the issue, however. 10:21
RabidGravy I think it does very much depend on the entire context 10:22
timotimo unfortunately, "the entire context" of a given event expands outwards at the speed of light 10:23
RabidGravy but if it's an interviiew then it should respect your idiom
timotimo so good luck with figuring that out!
10:23 pierre_ left 10:24 xiaomiao left
gregf_ RabidGravy: are you looking for something similar to sort_by 10:28
DrForr Shrug. It is an interview, but I'm guessing I've already spent more time mentioning it than anyone will ever spend reading that word. 10:29
timotimo %)
10:30 xiaomiao joined
RabidGravy gregf_, don't know what "sort_by" is so I don't know, but timotimo's Whatever point works fine 10:30
timotimo if you wanted more complicated instead of less, you could also: 10:31
m: my %f = ( B => 1, D => 2, A => 3, C => 4); say %f{ %f.keys.sort }:pair 10:32
camelia rakudo-moar affe02: OUTPUT«Unexpected named parameter 'pair' passed␤ in block <unit> at /tmp/2WBNhgQGlQ line 1␤␤»
timotimo m: my %f = ( B => 1, D => 2, A => 3, C => 4); say %f{ %f.keys.sort }:p
camelia rakudo-moar affe02: OUTPUT«(A => 3 B => 1 C => 4 D => 2)␤»
10:33 domm joined
timotimo turns out that's a bit shorter, but just a tiny bit 10:33
RabidGravy yeah, but that is less clear IMO, it's more to find a clear idiom for the common P5 "foreach my $ky (sort keys %foo) { print $ky, " => ", %foo{$ky} }" 10:34
10:36 labster left
gregf_ RabidGravy: something similar to this: my %f = ( B => 1, D => 2, A => 3, C => 4); %f.kv.sort_by: ->$k,$v { $k } 10:36
btw, i'm not able to understand how these 3 are the same
m: my %f = ( B => 1, D => 2, A => 3, C => 4); my %f1 = [ B => 1, D => 2, A => 3, C => 4 ]; my $f2 = { B => 1, D => 2, A => 3, C => 4 }; [%f, %f1, $f2].map(*.^name.say);
camelia rakudo-moar affe02: OUTPUT«Hash␤Hash␤Hash␤»
10:36 Actualeyes left
timotimo when you're assigning into a % container, that plops the values of whatever's on the RHS into the hash 10:38
RabidGravy it would come out longer
timotimo when you assign a { foo => bar } literal, you get a hash object on the RHS, and assigning that into a scalar variable just stores the object in question
m: my %f = :1B, :2D, :3A, :4C; say %f.kv.perl 10:39
camelia rakudo-moar affe02: OUTPUT«("A", 3, "B", 1, "D", 2, "C", 4).Seq␤»
timotimo gregf_: you can't just sort a list in bunches of two without a rotor or something in between
gregf_ timotimo: when you say container, is it like some sort of a pool, like a servicemanager or somesuch?
timotimo ... service manager? 10:40
gregf_ when does the container come into the picture. or is it for GC?
timotimo no, it's a language semantics thing
m: my %foo; say %foo.WHAT
camelia rakudo-moar affe02: OUTPUT«(Hash)␤»
timotimo m: my @foo; say @foo.WHAT 10:41
camelia rakudo-moar affe02: OUTPUT«(Array)␤»
timotimo m: my $foo; say $foo.WHAT; say $foo.VAR.WHAT
camelia rakudo-moar affe02: OUTPUT«(Any)␤(Scalar)␤»
gregf_ m: my $h = { foo => 1}; say $h.WHAT
camelia rakudo-moar affe02: OUTPUT«(Hash)␤»
timotimo that's basically equivalent to having $h = Hash.new(...) 10:42
10:42 TEttinger left
gregf_ right, and is that any different from my %h = { foo => 1 } or ( foo => 1 ) or [ foo => 1 ]? 10:43
timotimo yes, quite
gregf_ or is Hash.new immutable or bound or whatever?
timotimo no, it's about what %h.STORE does
it'll hashify things
that's also why you can't just "my %foo = SetHash.new(...)" 10:44
gregf_ oh - so theres different implementations of STORE for each of those?
timotimo it'll take the pairs from your SetHash and put them info %foo one-by-one, and you end up with a regular Hash instead of the SetHash
yes
gregf_ or they've all got a base class which implements it for all?
ok
so then, one final question *forgive me for asking so many questions* :) 10:45
theres just too many ways to do the same thing. but, do they differ in performance?
10:45 kid51 joined
timotimo probably, but of course that's muddied by things like compile-time-evaluation and such 10:45
gregf_ ah - i see
10:46 jevin joined
gregf_ timotimo: thanks for clarifying! 10:47
*wonders how complex the parser for Perl6 would be*
timotimo and if one of those variants is particularly expensive, we may put in an extra optimization, or just improve the code of STORE or whatever
enh. it's okay
you can look at it in Perl6/Grammar.nqp 10:48
Zoffix huh. DrForr you specified yourself as beginer Perl 5 programmer? :S
I thought you were an expert
gregf_ timotimo: sure, thanks
10:48 wamba joined
timotimo however, during parsing it also juggles a bunch of state and data structures; all definitions are managed by World.nqp, for example 10:49
10:49 jervo joined, Khisanth joined, richi235 joined, mls joined 10:50 as joined 10:51 Actualeyes joined 10:57 kaare_ joined 10:58 ilmari joined 11:00 maybekoo2 left
gregf_ gist.github.com/anonymous/289fe4c6...6b9d811501 <== works but swiftmai 11:01
oops :/ sorry wrong chat 11:02
11:03 avalenn joined 11:04 ribasushi left 11:09 ribasushi joined 11:15 jjido joined 11:18 brrt left 11:21 user9 left 11:28 myfree joined
RabidGravy has anyone written an article about sorting in P6? If not then it may need to happen, though I'm fairly sure I'm not the person to do it 11:28
11:28 myfree left 11:29 iH2O joined 11:31 kid51 left 11:33 grondilu joined 11:34 pierre_ joined 11:39 donaldh left, pierre_ left 11:47 jjido left
llfourn m: say ("a" cmp "a").^name 11:50
camelia rakudo-moar 03a403: OUTPUT«Order␤»
11:53 iH2O left
RabidGravy Order! Order! 11:53
llfourn m: say (3 <=> 2).^name 11:54
camelia rakudo-moar e403c1: OUTPUT«Order␤»
11:59 ribasushi left 12:01 aries_liuxueyang left
lizmat m: say Order 12:02
camelia rakudo-moar e403c1: OUTPUT«(Order)␤»
lizmat m: say Less.WHAT
camelia rakudo-moar e403c1: OUTPUT«(Order)␤»
gregf_ m: my $arr = qw|zero -ve +ve|;say [ [100, 2, 10, 0, -100].map: ->$i { $arr[$i <=> 0] }] 12:04
camelia rakudo-moar e403c1: OUTPUT«Index out of range. Is: -1, should be in 0..Inf␤ in block <unit> at /tmp/c9Iez5Vg1D line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/c9Iez5Vg1D line 1␤␤»
grondilu m: sub f {...}; our @a = map { f() }, ^Inf; sub f { rand }; say @a[^3]
camelia rakudo-moar e403c1: OUTPUT«(0.238678272330166 0.613512876716002 0.246485367891319)␤»
grondilu m: sub f {...}; our constant @a = map { f() }, ^Inf; sub f { rand }; say @a[^3]
camelia rakudo-moar e403c1: OUTPUT«Stub code executed␤ in sub f at /tmp/lgOado1quc line 1␤ in block at /tmp/lgOado1quc line 1␤ in block <unit> at /tmp/lgOado1quc line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/lgOado1quc line 1␤␤»
grondilu ^not sure that's OK
12:06 ribasushi joined
llfourn that's what I expect. constant LHS is evaluated at compile time. 12:06
RHS*
I guess an argument could be made that it should be evaluated just after compile time... If people think the added complexity is worth it. 12:08
or just after BEGIN time rather
jnthn We expect to be able to use constants while compiling though, so they really do need evaluating at BEGIN time 12:12
12:13 pierre_ joined
jnthn It is curious that we end up not updating the code to point to the finally compiled version of f afterwards 12:13
I'm really curious if it gets the other answer (as in, "works") if you precomp :) 12:14
llfourn maybe if lazy was there it would work like that?
jnthn I don't think it'd make a difference
llfourn m: sub f {...}; our constant @a = lazy map { f() }, ^Inf; sub f { rand }; say @a[^3]
camelia rakudo-moar dfbf1e: OUTPUT«Stub code executed␤ in sub f at /tmp/Mut_oohvx4 line 1␤ in block at /tmp/Mut_oohvx4 line 1␤ in block <unit> at /tmp/Mut_oohvx4 line 1␤␤Actually thrown at:␤ in block <unit> at /tmp/Mut_oohvx4 line 1␤␤»
llfourn hermph
jnthn It's not an issue of it evaluating the thing at the wrong time
It's about it capturing an "out of date" f
12:14 pmurias joined
pmurias hi 12:14
yoleaux 2 Jun 2016 20:53Z <lizmat> pmurias: this could be of interest ? zeit.co/blog/async-and-await
jnthn Or rather, an f that comes to be
Oh... 12:15
I wonder what re-defining a stub actually does
It may well be that it installs a replacement
Rather than takes over the stub
Which would also explain it nicely
12:15 jjido joined
llfourn yes. 12:16
jnthn That is, the symbol f is *rebound*, but the fake environment used for the constant won't be updated as part of that rebinding.
llfourn yes it still points to the stub 12:17
jnthn It's an interesting issue, anyway. I *think* it can be made to work, but there's multiple possible paths there and I don't immediately know which is the right one :)
I have for a while wondered if we might be able to make a better job of how we expose the "environment" to BEGIN-time evaluated things.
Because right now it's quite a costly thing to do
I suspect CORE.setting compilation spends some about of time building up those "shadow" contexts every time we run code at BEGIN time 12:18
pmurias lizmat: I can use async/await to implement gather/take, not sure how much faster it will work compared to the current method (it's something that will have to be benchmarked)
lizmat pmurias: it was just an idea that it might make life easier on you, as it would maybe take care of compatibility issues between javascript engines 12:19
this wasn't really about speed, as far as I'm concerned 12:20
pmurias you mean emitting code that will then get preprocessed by babel? 12:21
llfourn jnthn: is this in reference to those "can't call blah" when a closure is created inside a BEGIN or whatever and is called at runtime?
pmurias (babel being the javascript of the future to the current one converter)
jnthn llfourn: I thought I fixed that once... :)
llfourn looks for the ticket 12:22
lizmat pmurias: I'm not sure... I don't know enough about it
I just wanted to make sure that you were aware of that article / feature set
llfourn jnthn: from memory you were able to fix a few instances of it but not the general case 12:23
RT #125634. I thought this is what you were referring to just now :) 12:24
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125634
12:25 jjido left
jnthn Hmm 12:26
pmurias lizmat: thanks for keeping me aware about that, it's likely once it's available in browser it will give us a huge speedup for gather/take using code 12:27
llfourn grondilu: RT #128314 :) 12:29
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128314
[Coke] yawns. 12:30
12:40 donaldh joined
grondilu I guess it could have been golfed better. 12:41
12:41 rindolf left
grondilu m: sub f {...}; constant $ = f(); sub f { rand } 12:41
camelia ( no output )
grondilu m: sub f {...}; constant $x = f(); sub f { rand }; say $x
camelia rakudo-moar dfbf1e: OUTPUT«===SORRY!===␤Stub code executed␤»
grondilu m: sub f {...}; BEGIN say f(); sub f { rand }; 12:42
camelia rakudo-moar dfbf1e: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uM2yigYRP1␤An exception occurred while evaluating a BEGIN␤at /tmp/uM2yigYRP1:1␤Exception details:␤ Stub code executed␤ in sub f at /tmp/uM2yigYRP1 line 1␤ in any f at src/Perl6/World.nqp line…»
12:42 Sgeo left
llfourn grondilu: but that one is fine 12:42
jnthn Both of those are correct.
Because you call f while the BEGIN or constant is being evaluated. 12:43
The other one was interesting precisely because f was called later
grondilu oh I c
12:43 rindolf joined
llfourn the issue is that Seq stores the closure to produce subsequent values when you do .map 12:43
12:43 krakan left
llfourn but that closure is still pointing to the stub 12:43
12:50 girafe joined 12:52 abraxxa left 12:53 abraxxa joined 12:54 abraxxa left 12:55 jjido joined
grondilu well frankly I find it LTA. I mean, it's an easy mistake to make, isn't it? 12:55
[Coke] I wouldn't call anything that used a stub sub an "easy" mistake. 12:57
llfourn usually you don't use stub subs yeah...
12:57 jjido left 12:58 Humdai left
grondilu stub subs would be a natural thing to write for a C programmer, I suspect. 12:58
llfourn but if you do and you don't know how contant works I can see how this could happen :\
I guess most people assume "constant" is a way of doing read-only but it's more than that 12:59
[Coke] Can you suggest an improved error message? 13:00
13:01 krakan joined
llfourn I think the hard part is telling when to use the error message 13:01
13:02 grondilu left
llfourn how can you know at BEGIN that the sub is going to be declared properly later 13:02
13:02 grondilu joined 13:06 silug left 13:07 Ven joined, ribasushi left 13:09 sufrostico joined 13:14 ocbtec left 13:15 pierre_ left, patrickz joined 13:17 silug joined
gtodd hoelzro: I was reading your "language of the month" blogs ... I thought I'd find a mapping from there to Inline::<language of month> but ... 13:18
13:22 skids joined, pierre_ joined 13:23 stevieb9 left 13:24 nicqbot joined 13:25 Ven left 13:29 iH2O joined 13:39 ribasushi joined
dogbert17 o/ #perl6 13:39
iH2O hi Dagobert 13:40
dogbert17 hi iH20
m: my $s = Supply.from-list(1, 2, 3); $s.tap(&say); $s.done; # from doc.perl6.org/type/Supply 13:41
camelia rakudo-moar b2f8ba: OUTPUT«1␤2␤3␤Method 'done' not found for invocant of class 'Supply'␤ in block <unit> at /tmp/HiEr8BWyUT line 1␤␤»
13:43 stevieb left, stevieb joined
RabidGravy dogbert17, this is correct, Supplier has a done 13:43
13:44 Guest87843 is now known as parisba
dogbert17 RabidGravy, should the call $s.done be removed from the axample? 13:44
RabidGravy in the case of an on-demand Supply as from-list it doesn't even make sense
yes
dogbert17 RabidGravy: many thanks, I'll fix it
13:50 ribasushi left 13:53 pat_js joined
dalek c: 645ed55 | (Jan-Olof Hendig)++ | doc/Type/Supply.pod:
Fixed a couple of errors in the examples. RabidGravy++
13:54
13:56 pmurias left 13:57 g4 left 13:58 daxim joined 14:01 pmurias joined
nicqbot RabidGravy: So if Supplier has a 'done' method, why would this error? 14:02
RabidGravy why would what error?
jnthn Because $s is a Supply, not a Supplier
RabidGravy ah that, yes 14:03
14:03 ZoffixW joined
nicqbot Oh, ok. 14:03
ZoffixW Does Inline::Perl5 support passing command line switches to Perl 5 stuff? 14:05
Try to do this but the message displayed suggests `daemon` did not reach whatever is looking for it: perl6 -e 'use Mojolicious::Lite:from<Perl5>; app.start' daemon
dogbert17 do the methods 'can' and 'does' still do what's described in design.perl6.org/S32/Basics.html#Any even though they have now moved to Mu? 14:07
14:08 pmurias left, iH2O left
RabidGravy m: role F { method b() { } }; class C does F {}; say C.can("b"); say C.does(F) 14:10
camelia rakudo-moar b2f8ba: OUTPUT«(b)␤True␤»
RabidGravy so rougnhly yes, though 'can' returns the method itself, and does only checks for applied roles 14:11
dogbert17 RabidGravy: thanks again, i'll whip up some text about this then :) 14:12
RabidGravy if one wanted to do what "does" is described a smart match against a type object is probably better
as it gets both the superclasses and roles 14:13
14:14 ribasushi joined
dogbert17 so does as it is implemented is not as good as ~~ 14:14
RabidGravy actually no, belay that, I was under a misapprehension 14:17
14:18 ptolemarch joined
RabidGravy m: role F { method b() { } }; class G {}; class C is G does F {}; say C.can("b"); say C.does(F); say C.does(G) 14:18
camelia rakudo-moar b2f8ba: OUTPUT«(b)␤True␤True␤»
14:18 pierre_ left 14:20 pierre_ joined
RabidGravy though probably the smart match is favoured because it DTRT in nearly all cases 14:20
14:20 pmurias joined
stevieb zoffix: it doesn't look like the args get passed through: perl6 -e 'use Getopt::Long:from<Perl5>;say @*ARGS.perl; my $o; GetOptions("option"=>\$o); say $o' --option 14:21
dogbert17 RabidGravy; so if I 'steal' the docs for does and put it in Mu.pod it wouldn't be wrong? 14:22
RabidGravy it would be fine yes
stevieb btw, is it possible to give camilla a one-liner that requires args and have it processed like a normal statement?
dogbert17 RabidGravy: then I'll do it 14:23
14:23 ribasushi left
ugexe stevieb: well you can do `BEGIN @*ARGS = 1, 2, 3` 14:32
stevieb that makes sense. on another note, I apologize for spelling Camelia wrong... s/camilla/camelia/. sigh 14:36
timotimo does that really get into the perl5 stuff?
14:36 ZoffixMobile joined
gregf_ camilla is fine too *sounds feminine* 14:37
14:37 cdg joined
ugexe it should handle his question on passing args to a camilla one-liner 14:37
ZoffixMobile ugexe, won't @*ARGS contain command line args anyway? why is it needed in a BEGIN
never mind, I missed a comment 14:38
14:38 azawawi joined
azawawi .. 14:38
...
hi
raiph hi #perl6 14:39
o/ azawawi
azawawi jamesfriend.com.au/pce-js/ # PCE.js Mac Plus emulator running Mac OS System 7 :)
dogbert17 RabidGravy: how about gist.github.com/dogbert17/b3f0aae6...92d3bc40c2 14:40
ugexe not necessarily needed. but depending on where you put it and when MAIN_HELPER gets called its easier to just use BEGIN to do what they probably wanted instead of explain further
azawawi rebuilds his 2016.05 after a .precomp corruption
14:41 ZoffixMobile left, ribasushi joined
RabidGravy dogbert17, that looks fine 14:45
dogbert17 RabidGravy: commit is on its way :) 14:46
raiph Is a hack admin around? Is it reasonable to install gui stuff, specifically GTK::Simple, for the shared rakudo per github.com/perl6/infrastructure-do...akudobrew? 14:48
dalek c: bcf70e6 | (Jan-Olof Hendig)++ | doc/Type/Mu.pod:
Added docs for Mu.does. RabidGravy++
14:50
dogbert17 suddenly finds a hot cup of coffee 14:51
profan it's super effective! 14:52
azawawi RabidGravy: the .precomp folder corruption is so bad in 2016.05... i hate it :)
14:55 wamba left
RabidGravy boo! 14:55
tony-o azawawi: but can it run dinopark tycoon? 14:56
azawawi tony-o: PCE.js? 14:58
14:58 adu joined 15:04 nicqbot left 15:09 pierre_ left
dalek c: 2727eab | (Jan-Olof Hendig)++ | doc/Type/Mu.pod:
Forgot a C<>
15:12
15:13 ssotka joined 15:15 aries_liuxueyang joined, Levine joined 15:16 Levine left, jjido joined
dogbert17 m: say v1.0.1 ~~ v.1.*; # from doc.perl6.org/type/Version 15:16
camelia rakudo-moar b2f8ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7FBKjRZhzd␤Malformed postfix call␤at /tmp/7FBKjRZhzd:1␤------> 3say v1.0.1 ~~ v.7⏏051.*; # from doc.perl6.org/type/V␤»
timotimo oh, shouldn't put a . after the v in that doc 15:17
azawawi gist.github.com/azawawi/49822a3f8e...ce5550d981 # line 3055... cant install GTK::Simple... precomp corruption?
15:17 _mg_ left
dogbert17 m: say v1.0.1 ~~ v1.*; # from doc.perl6.org/type/Version 15:17
camelia rakudo-moar b2f8ba: OUTPUT«True␤»
dogbert17 timotimo++
ZoffixW azawawi, try with zef? 15:18
15:18 jjido left
azawawi same 15:19
zef uninstall and install... also same
ZoffixW weird
azawawi cleared ~/.perl6 also and precomp folders... same
only a nuke/build makes it work for the first time
15:22 Zero_Dogg left
b2gills m: my %f = ( B => 1, D => 2, A => 3, C => 4); .say for %f.sort # RabidGravy: no need for .pairs or to give sort a Callable ( The default sorting for pairs is already smarter than just *.key ) 15:22
camelia rakudo-moar b2f8ba: OUTPUT«A => 3␤B => 1␤C => 4␤D => 2␤»
15:23 Zero_Dogg joined, Zero_Dogg left, Zero_Dogg joined
dalek c: a595d1e | (Jan-Olof Hendig)++ | doc/Type/Version.pod:
Fixed another broken example. timotimo++
15:23
b2gills m: my $f = ( B => 2, B => 1, D => 2, A => 3, C => 4); .say for $f.sort # note that B=>2 always comes after B=>1
camelia rakudo-moar b2f8ba: OUTPUT«A => 3␤B => 1␤B => 2␤C => 4␤D => 2␤»
RabidGravy too late :-p 15:24
15:28 sjn left, sjn joined
b2gills I think I'm just used to taking out parts of code until it breaks, because most of my code goes up on CodeGolf. 15:29
15:31 ufobat left, flaviusb left
dogbert17 m: class Area { has $.size; submethod BUILD(:$x, :$y, $z) { $!size = $x * $y * $z; }} # doc.perl6.org/type/Submethod 15:36
camelia rakudo-moar b2f8ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1z3pF8eeAg␤Cannot put required parameter $z after variadic parameters␤at /tmp/1z3pF8eeAg:1␤------> 3has $.size; submethod BUILD(:$x, :$y, $z7⏏5) { $!size = $x * $y * $z; }} # d␤ expectin…» 15:37
eiro j'étais fatigué ... iritable... c'était nul
soorry
dogbert17 should I just put a : before $z in the BUILD signature? 15:38
perlpilot perl 6 is just so cool sometimes. I needed to transpose a matrix. How do I do this? my @t = ([ @m[*;$_] ] for ^@m[0]); That's just ... awesome
dogbert17: yes 15:39
15:42 flaviusb joined 15:43 setty1 joined
ZoffixW dogbert17++ # fixing all the docs 15:44
dogbert17 ZoffixW: a bit here and a bit there :)
15:45 bjz_ joined
dalek c: b3bdaa0 | (Jan-Olof Hendig)++ | doc/Type/Submethod.pod:
Fixed typo in code example
15:45
15:46 bjz left
dogbert17 since I'm on a roll atm, has any of you heard of a string like type called 'Cat'? 15:49
Common role for string types (such as Str) and types that can act as strings (such as Cat). # doc.perl6.org/type/Stringy
timotimo Cat are specced to be lazy strings 15:50
we don't have them in any implementation yet
dogbert17 timotimo: that explains it
gfldex dogbert17: see github.com/rakudo/rakudo/blob/411e...ngy.pm#L23 15:51
ZoffixW 🎺🎺🎺 FWIW: I wrote down contributing instructions for perl6.party, if anyone is itching to write Perl 6 blogs but has no place to host them: github.com/zoffixznet/perl6.party/...IBUTING.md 15:52
dogbert17 gfldex: thx 15:53
tony-o azawawi: yes PCE.js - was joking about dinopark tycoon. pretty cool 15:54
ZoffixW So we have Rats and Cats? :D
ZoffixW wonders if there's a FatCat
timotimo that'd be for Big Data applications, obviously
perlpilot dogbert17: There's more info on Cat at S03:3991
synopsebot6 Link: design.perl6.org/S03.html#3991
15:55 zakharyas left
dogbert17 perlpilot: will check it out, thx 15:55
[Coke] (Cat) I would remove Cat from the docs; it's not part of any spec yet. 16:02
ZoffixW +1 16:03
16:06 pmurias left
dogbert17 can do :) 16:10
dalek c: 187aef3 | (Jan-Olof Hendig)++ | doc/Type/Stringy.pod:
Removed reference to type Cat since it's NYI
16:13
ZoffixW dogbert17++
16:13 ZoffixW left
[Coke] more than NYI, not yet spec'd. 16:13
dogbert17 oops 16:14
mst meow?
ilmari "nys", which is norwegian for sneeze 16:15
[Coke] hurm. I suppose it's -partially- spec'd, but this goes to the discussion on the quote blocker doc ticket. "if it's in 6.c-errata, but it's skipped or todo'd, is it really 6.c?" I think the answer to that is an implicit no. 6.c-errata was a snapshot in time just before the release because we didn't have time or cycles to vet every single test in roast.
I don't think it's worth changing the 6.c files directly, but we need to plan extra time before a 6.d release to clean -that- spec version up 16:16
16:19 titsuki joined
titsuki Hi all. I have a question. Does anyone know how to call new in the following cases ? 16:22
m: class Foo { has @.array; submethod BUILD(Str :@!array!) {}; }; Foo.new(:array(["a"])).say;
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @!array; expected Positional[Str] but got Array ($["a"])␤ in submethod BUILD at /tmp/BGl3WycmXm line 1␤ in block <unit> at /tmp/BGl3WycmXm line 1␤␤»
titsuki m: class Foo { has @.array; submethod BUILD(Str :@!array!) {}; }; Foo.new(:array("a")).say;
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @!array; expected Positional[Str] but got Str ("a")␤ in submethod BUILD at /tmp/TkdrckcG9Y line 1␤ in block <unit> at /tmp/TkdrckcG9Y line 1␤␤»
titsuki I couldn't use the constructor.
m: class Foo { has @.array; submethod BUILD(Str :@!array!) {}; }; Foo.new(array => ["a"]).say; 16:23
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @!array; expected Positional[Str] but got Array ($["a"])␤ in submethod BUILD at /tmp/TSWUnRIgvV line 1␤ in block <unit> at /tmp/TSWUnRIgvV line 1␤␤»
perlpilot titsuki: why put a type constraing in BUILD, but not the has declaration? 16:25
*constraint
titsuki m: class Foo { has Str @.array; submethod BUILD(Str :@!array!) {}; }; Foo.new(array => ["a"]).say;
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @!array; expected Positional[Str] but got Array ($["a"])␤ in submethod BUILD at /tmp/8PSh6rSPCM line 1␤ in block <unit> at /tmp/8PSh6rSPCM line 1␤␤»
perlpilot Sorry, that wasn't an answer, just curiosity 16:26
titsuki perlpilot: hmm, I see.
perlpilot m: class Foo { has @.array; submethod BUILD(Str :@!array!) {}; }; Foo.new :array(Array[Str].new("x") )
camelia ( no output )
perlpilot more of an answer there
titsuki Why Array 16:27
sorry
jnthn m: class Foo { has Str @.array; submethod BUILD(:@!array!) {} }; Foo.new: array => ["x"] # note that this works OK 16:28
camelia ( no output )
jnthn Because a @!foo parameter actually is assignment rather than binding. 16:29
And assignment is copying, and type checks element by element, as they are copied
titsuki hmm
jnthn Whereas if you put a submethod BUILD(Str :@!array) { } then you constraint that the thing already passed to the sub must already have a type Positional[Str] 16:30
*constrain
That is, a declared type
titsuki jnthn: I see. Thanks ! 16:31
jnthn sub foo(Str @a) { }; foo(["a", "b"]) # that's just an untyped array
my @a = "a", "b"; sub foo(Str @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a) 16:32
Imagine that `Str @a` did work by checking the values. Then after the call bar() you now have something in @a that isn't actually promised to contain only Str :) 16:33
16:34 ribasushi left, cdg left
titsuki m: my @a = "a", "b"; sub foo(Str @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a).say; 16:35
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @a; expected Positional[Str] but got Array ($["a", "b"])␤ in sub foo at /tmp/kiB6XVjqn5 line 1␤ in block <unit> at /tmp/kiB6XVjqn5 line 1␤␤»
titsuki m: my @a = "a", "b"; sub foo(Int @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a).say;
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @a; expected Positional[Int] but got Array ($["a", "b"])␤ in sub foo at /tmp/CHNjXQYc9t line 1␤ in block <unit> at /tmp/CHNjXQYc9t line 1␤␤»
jnthn m: my @a = "a", "b"; sub foo(Str @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a)
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in binding @a; expected Positional[Str] but got Array ($["a", "b"])␤ in sub foo at /tmp/D11yC01IZP line 1␤ in block <unit> at /tmp/D11yC01IZP line 1␤␤»
jnthn m: my Str @a = "a", "b"; sub foo(Str @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a)
camelia rakudo-moar b2f8ba: OUTPUT«Type check failed in assignment to @a; expected Str but got Int (42)␤ in sub bar at /tmp/5cKRhualdX line 1␤ in sub foo at /tmp/5cKRhualdX line 1␤ in block <unit> at /tmp/5cKRhualdX line 1␤␤»
jnthn Note how foo accepts it, and bar is not allowed to shove a non-Str into the array, so it's still safe :) 16:36
16:37 sno left
titsuki m: my Str @a = "a", "b"; sub foo(Str @a) { bar(); }; sub bar() { @a.push("42") }; foo(@a) 16:38
camelia ( no output )
dalek c: 91eaf67 | (Jan-Olof Hendig)++ | doc/Type/Str.pod:
Tidied up some code examples a bit
titsuki m: my Int @a = 1, 2; sub foo(Int @a) { bar(); }; sub bar() { @a.push(42) }; foo(@a)
camelia ( no output ) 16:39
titsuki jnthn: Thanks ! I understand.
jnthn :) 16:40
16:41 slobo joined 16:42 Xliff left
azawawi RabidGravy: github.com/azawawi/gtk-simple/blob...oolbar.pl6 # Initial toolbar example 16:45
16:45 rurban joined 16:46 rurban left
azawawi pasteboard.co/1pxC81hw.png # screenshot of GTK::Toolbar example 16:47
timotimo that doesn't look enterprisy 16:48
RabidGravy nice
jnthn azawawi: Nice! :) Guess next comes the supplies for the events <3
azawawi jnthn: sure :) 16:50
gfldex m: sub f(|c){ given c { when :(Int, Int) { dd $_ }; when :(Str, Int) { dd $_ } } }; f(10,10); f("ten", 10); 16:54
camelia rakudo-moar b2f8ba: OUTPUT«\(10, 10)␤\("ten", 10)␤»
gfldex did I just invent semi-multidispatch? 16:55
perlpilot looks more like manual-multidispatch to me 16:57
slobo nativecall q: how to specify CArray[CStruct] where it's not pointers inside the CArray, but CStructs are packed continuously? 16:58
arnsholt slobo: You implement the feature in the backend and expose it in NativeCall.pm6 16:59
Sorry =)
timotimo perlpilot: not quite manual :)
perlpilot manual-ish then 17:01
What would be the point? Doing some extra stuff "in between" the dispatch?
slobo arnsholt: thanks, i feel better I couldn't find a way :) 17:02
i even tried github.com/salortiz/NativeHelpers-Blob, but couldn't quite figure it out that way either
17:02 firstdayonthejob joined
slobo (they provide 'LinearArray', but seems to be only able to create new CStruct arrays from perl side, but doesn't ingest existing ones) 17:03
17:03 sortiz joined
sortiz \o #perl6 17:03
tony-o dependency counts for modules on module.zef.pm are corrected - 17:05
sortiz slobo, See the example at github.com/salortiz/NativeHelpers-...-cstruct.t 17:06
slobo sortiz, i was looking at that, but i need something like `@elts = LinearArray[Point3D].new($pointer, $numelements)` 17:08
sortiz Ah, you need to create one from a given Pointer! Umm 17:09
slobo and i also tried blob-from-pointer(..., Blob[MyCStruct]) but that bailed with 'nativesize' not found in Perl....HOW or something 17:10
(was thinking i could rube-goldberg it via `carray-from-blob(blob-from-pointer(...` ) 17:11
gregf_ m: my Str @a = "foo";say @a.^name 17:20
camelia rakudo-moar b2f8ba: OUTPUT«Array[Str]␤»
gregf_ m: my Str $a = "foo";say @a.^name
camelia rakudo-moar b2f8ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bxdQLASy9q␤Variable '@a' is not declared. Did you mean '$a'?␤at /tmp/bxdQLASy9q:1␤------> 3my Str $a = "foo";say 7⏏5@a.^name␤»
gregf_ m: my Str $a = "foo";say $a.^name
camelia rakudo-moar b2f8ba: OUTPUT«Str␤»
gregf_ m: class Foo { has $.bar is rw;}; my Foo @foos = (^5).map({ Foo.new(bar => $_) });; say @foos 17:22
camelia rakudo-moar b2f8ba: OUTPUT«[Foo.new(bar => 0) Foo.new(bar => 1) Foo.new(bar => 2) Foo.new(bar => 3) Foo.new(bar => 4)]␤»
gregf_ Perl6++ :)
timotimo m: class Foo { has $.bar is rw }; my Foo @foos = Foo.new xx 5; @foos>>.bar Z= ^5; say @foos 17:23
camelia rakudo-moar b2f8ba: OUTPUT«[Foo.new(bar => 0) Foo.new(bar => 1) Foo.new(bar => 2) Foo.new(bar => 3) Foo.new(bar => 4)]␤»
timotimo put that in your pipe and smoke it :D
17:25 Emeric joined
sortiz slobo, NativeHelpers::Pointer implements pointer arithmetic, so if you use Pointer[Foo] $ptr, you can do $ptr++ to get a pointer to the next Foo. 17:26
timotimo don't we have that in core nativecall, too? 17:27
sortiz timotimo, sure.
timotimo so it should be thrown out in NativeHelpers::Pointer? 17:28
tony-o i'm curious too, so you'd use nativecast + nativesize + pointer arithmetic to consume an array of contiguous structs? 17:29
slobo Method 'succ' not found for invocant of class 'NativeCall::Types::Pointer[X11::Xlib::Raw::Screen]' 17:30
timotimo hm, same for "+ 1"?
slobo it casts it to int 17:31
Method 'deref' not found for invocant of class 'Int'
timotimo er, of course
i really thought we had put in pointer arithmetic some time ago
17:31 Actualeyes left
sortiz slobo, You 'use NativeHelpers::Pointer' first? 17:31
tony-o you have to nativecast the pointer position to the cstruct class you defined
slobo this was witshout NativeHelpers::Pointer, let me try with it 17:32
timotimo don't forget you have to "panda install" that
17:32 ZoffixWin joined 17:33 ribasushi joined
sortiz timotimo, my plan is to PR well tested parts of NH into NC. 17:34
timotimo good!
17:34 ZoffixWin is now known as sexy-coder-girl 17:35 donaldh left
azawawi github.com/azawawi/gtk-simple/blob...oolbar.pl6 # G:S:Toolbar Enterprisy version with events :) 17:36
pasteboard.co/1pAS24jL.png 17:37
slobo `STable conflict detected during deserialization.`
17:37 wooy left
sortiz In particular, pointer arithmetic seems to works well, but right now the only "success histories" are the indirect ones from DBIish use. 17:37
slobo, Never seen that before :( 17:38
slobo happens when i put it in the unit module, but not in the main program 17:39
sortiz That smells that a precomp bug. 17:40
slobo i tried removing the precomp dir 17:41
azawawi github.com/perl6/gtk-simple/pull/41 # feedback appreciated 17:42
slobo anyways, even if I paste in NativeCall::Pointer stuff in my units, it still doesn't pickup the 'succ'
this is my definition of the struct poiinter in a struct: github.com/slobo/Six11/blob/master...w.pm6#L146 17:43
and i'm trying this: my $scr_ptr = $display.screens; say $scr_ptr.deref; $scr_ptr++; say $scr_ptr.deref; 17:44
17:45 sexy-coder-girl left
slobo first deref succeeds and shows good looking data, so i think i got the struct correct 17:46
17:46 jjido joined 17:47 FROGGS joined
sortiz slobo, Right now I'm at $work, I'll check at detail tonight. 17:48
slobo cool, thanks! 17:49
17:51 jjido left, jjido joined
FROGGS o/ 17:51
RabidGravy harr 17:52
sortiz FROGGS o/ #nice to see you again!
FROGGS :o) 17:53
17:58 Emeric1 joined
AlexDaniel Zoffix: how is it going? 17:59
17:59 Emeric left, Emeric1 is now known as Emeric 18:00 wamba joined 18:01 sexy-coder-girl joined
RabidGravy azawawi, fancy moving that "show-all" method from ::App to ::Widget - it's useful there 18:02
azawawi sure
18:05 jjido left
dalek c: 57e3a6a | (Jan-Olof Hendig)++ | doc/Type/Rational.pod:
Fixed typo in code example
18:05
azawawi RabidGravy: done :) 18:10
RabidGravy cool, you a star :) 18:11
18:11 sexy-coder-girl left 18:12 sexy-coder-girl joined
RabidGravy gah, the travis takes so long 18:12
screw it
18:12 _mg_ joined
dalek k-simple: 02df3a0 | azawawi++ | lib/GTK/Simple/NativeLib.pm6:
Fix missed module name in refactor
18:13
k-simple: f325241 | azawawi++ | lib/GTK/Simple/GDK.pm6:
Add missing module name

Add missing shebang
18:13 dalek left
RabidGravy poor dalek 18:13
18:13 dalek joined, ChanServ sets mode: +v dalek
RabidGravy sorry dalek, you've just got to suck it up 18:14
18:14 nebuchadnezzar joined
azawawi RabidGravy: i missed a shebang :) github.com/perl6/gtk-simple/pull/43/commits 18:17
RabidGravy: do you think the second commit is correct or not?
18:18 shadowpaste joined
RabidGravy It'll be fine 18:19
let me test that
works great! 18:22
18:22 user9 joined
RabidGravy azawawi++ # making stuff 18:23
18:23 cdg joined
k-simple: b6eb1eb | azawawi++ | /:
Merge remote-tracking branch 'upstream/master'
k-simple: a15aee1 | azawawi++ | examples/09-toolbar.pl6:
Merge pull request #43 from azawawi/master

Missing shebang for example
18:24 shadowpaste left
timotimo m: say ("foo" => [ { a => 1, b => 2 } ]).perl; 18:25
camelia rakudo-moar b2f8ba: OUTPUT«:foo([:a(1), :b(2)])␤»
timotimo m: say ("foo" => [ { a => 1, b => 2 }, ]).perl; 18:26
camelia rakudo-moar b2f8ba: OUTPUT«:foo([{:a(1), :b(2)},])␤»
18:29 shadowpaste joined, Emeric left, _mg_ left 18:30 Emeric joined
kalkin-_ What does <.foo> means? 18:30
(When used in a grammar)
I know that <foo> is a token, but what does the dot mean?
FROGGS non capturing subrule 'foo'
timotimo F
froggs!
kalkin-_ ahh ic. thanks
FROGGS hi timotimo :o) 18:31
timotimo glad to see you!
FROGGS yes, it is nice to be back
18:32 Emeric1 joined, matiaslina joined
FROGGS I probably wont have time to hack much on Perl 6 but I'll at least hang out every evening again 18:34
18:34 Emeric left, Emeric1 is now known as Emeric
timotimo OK! :) 18:34
18:35 _mg_ joined
sortiz FROGGS, Any plan about p6-XML-LibXML? 18:36
FROGGS sortiz: it is more a problem about time than about plant :/
plans*
but yeah, that wants finishing
I'll work on it as soon as I can 18:37
sortiz Do you accepts PRs? ;-)
FROGGS of course 18:39
hmm, I've got unpushed stuff locally 18:40
18:40 shadowpaste left 18:42 maybekoo2 joined 18:44 jjido joined
sortiz FROGGS, I'll have a few spare tuits and that's a project that specially interest me. 18:45
FROGGS yeah, me too (of course) 18:46
18:48 shadowpaste joined 18:55 adu left 18:59 jjido left 19:03 pat_js left 19:05 maybekoo2 left
azawawi RabidGravy: ping 19:06
RabidGravy boom
azawawi caught a nasty bug travis-ci.org/perl6/gtk-simple/job...1419#L1321
github.com/perl6/gtk-simple/blob/m...Simple.pm6 # added toolbar, which uses menuitembutton, somehow ::App gets deleted 19:07
RabidGravy it works fine locally 19:10
azawawi github.com/perl6/gtk-simple/blob/m...le.pm6#L31 and github.com/perl6/gtk-simple/blob/m...bar.pm6#L6
it is a bug that happens on MacOSx after adding ::Toolbar and ::MenuItemButton to GTK::Simple 19:11
19:11 TEttinger joined
azawawi weird also ... travis-ci.org/perl6/gtk-simple/builds/135090818 19:12
19:16 sherwool joined 19:18 labster joined
sherwool Is Johnathan well? Been over a month since he reported in on 6guts. 19:19
er, Jonathan
Emeric .seen jnthn
yoleaux I saw jnthn 16:48Z in #perl6: <jnthn> azawawi: Nice! :) Guess next comes the supplies for the events <3
moritz sherwool: yes, active in another channel just two hours ago
sherwool wow- thanks moritz 19:20
mst sherwool: there may've been fewer blog posts but there's plenty of commit history
DON'T PANIC
sherwool not panicked, but concerned .... maybe just nosey 19:21
sexy-coder-girl sherwool: 95 commits in the past month, 75 of which are for MoarVM (Perl 6's primary VM): github.com/jnthn?tab=contributions...od=monthly
sherwool thx sexy, guess that would be a better place to check :>) 19:22
19:22 toto joined 19:23 toto left 19:26 Jim_ joined, |meta joined
gtodd hoelzro: looked at elm (one of those "compile to JavaScript" languages you mention) ... of course there's a difference between something that is language in its own rite versus a advanced "DSL" that *compiles* to JavaScript/ES (c.f. chromatic's funny piece about DSL), but still, perl6 seems like a language that one day could use grammars, slangs, macros, Inline etc. to facilitate writing "frontends" GUIs for data analysis or user interface th 19:30
oops
argh /msg
19:31 Zero_Dogg left, Zero_Dogg joined
dalek c: 8eaa110 | (Jan-Olof Hendig)++ | doc/Type/Parameter.pod:
Fixed a broken code snippet
19:32
19:36 adu joined
jnthn sherwool: I got into a pattern of writing my blog posts on weekends about what I'd done in the week or two prior...which worked well until I had a few weekends in a row where I was exhausted or distracted. :-) Got the next post partly drafted, so with luck this weekend there'll be something... :-) 19:37
19:38 darutoko left
azawawi is 'use Module' lexically scoped? 19:39
jnthn azawawi: Anything marked "is export" is lexically imported by use, yes. Any global packages are merged into the wider set of globals. 19:41
sherwool Double Wow, jnhtn! watch the exhaustion, listen to your body, recalled you saying last year you had not be feeling well .... I learned recently I had "sub-clinical hypothyroidism" which in due course may turn clinical 19:42
azawawi github.com/azawawi/gtk-simple/comm...60dedf0852 # weird fix
19:44 jjido joined 19:49 gtodd left
jnthn sherwool: Yeah, I did a lot too much last year and it did me no good... :S Taking rest a good bit more seriously these days. 19:51
19:52 jjido_ joined, jjido left 19:54 stevieb9 joined 19:56 jjido_ left
stevieb9 is it a standard in p6 to use a dash instead of underscore everywhere, even in variables? I see it all over the docs particularly in methods, and I'm wondering if long-time p6 programmers consider this an idiom across the board or not. 19:58
FROGGS stevieb: I'd call it idiomatic, yes
and is easier to type too
sortiz: I pushed some stuff so at least some tests pass again 19:59
sortiz: and I gave you push access
[Coke] yes. a concerted effort was made to try to make sure everything "normal" in the spec used dashes, not underscores 20:00
it's expected that user code would follow too. (but you can do what you want, we're not your parents.)
stevieb9 FROGGS: thanks. If I'm going to learn the language, I want to start off properly by using the same semantics as those who have been writing it for a long period.
20:01 adu left 20:03 Laurent_R joined
[Coke] stevieb9: well, the first official release was in December, so you're still ahead of the curve. 20:04
20:04 Laurent_R is now known as lolo78 20:05 lolo78_ joined, ribasushi left
stevieb9 Coke: I did a short stint in 2k12 with p6, wrote a brief blog post about some of the neat differences I found between it an p5, but due to life constraints, abandoned it. Now I'm back and I hope to get as proficient with p6 as I am with p5 ;) 20:05
sortiz FROGGS, thank you!
20:06 sufrostico left, kent\n left
azawawi travis-ci.org/azawawi/gtk-simple/j...8898#L1201 # Failure to install GTK::Simple from local directory after a successful test run... the 3055 line error :) 20:07
20:08 jjido joined, jjido left 20:10 kent\n joined, kent\n left, kent\n joined 20:12 azawawi left
FROGGS stevieb9: is b9 the opposite of p6? 20:16
teatime no, that'd be 9d
FROGGS I see 20:17
stevieb9 m: 'b9' eq '6p'
camelia rakudo-moar b2f8ba: OUTPUT«WARNINGS for /tmp/EHMoYtjONO:␤Useless use of "eq" in expression "'b9' eq '6p'" in sink context (line 1)␤»
stevieb9 lol
m: 'b9' ~~ '6p'
camelia ( no output )
20:17 sherwool left
FROGGS you need to 'say' it 20:18
stevieb9 m: say 'b9' eq '6p'
camelia rakudo-moar b2f8ba: OUTPUT«False␤»
stevieb9 there :)
had to try camelia at some point
FROGGS m: say 'b9' leg '6p'
camelia rakudo-moar b2f8ba: OUTPUT«More␤»
lolo78 Hi folks, I have been trying to use SVG and SVG::Plot lately, but did not succeed to get proper SVG files. I found a talk by jnthn in which he used it. So I copied the code and tried it, but it still does not seem to work. This is one of many attempts: 20:19
my @means = (1929 => 7, 1930 => 6, 1931 => 5, 1932 => 8, 1933 => 2, 1934 => 3);
say SVG.serialize(SVG::Plot.new(
width => 600,
height => 350,
x => @means.map(*.key),
values => [[@means.map(*.value)]],
title => "TEST TEMP"
).plot(:xy-lines));
Output:
<svg xmlns="www.w3.org/2000/svg" xmlns:svg="www.w3.org/2000/svg" xmlns:xlink="www.w3.org/1999/xlink" width="600
" height="350" />
In other words, the data is not there. When I don't use the serialize method (but only SVG::Plot), it seems to produce quite a bit of data which I believe to be some form of SVG, but I can't do anything with is as it is without the serialize method. Can any one tell me what I am doing wrong? Or point me to some documentation?
FROGGS ufff
dont paste in here please
use a paste service
lolo78 Oops, sorry for the bad formatting.
FROGGS: what is a pasting service? 20:20
FROGGS lolo78: nopaste.me/
stevieb9 FROGGS: when I'm learning a new language, I like to go off on tangents. leg(), which I've never heard of, led me to strangelyconsistent.org/blog/6-buil...you-needed ... new things to learn! 20:21
[Coke] gist.github.com
FROGGS stevieb: yes, there is nice stuff out there :o)
stevieb9 I can't remember who (maybe Zoffix) posted yesterday a really interesting way to chain calls (haven't tested it yet). something like `.sort, .map, .reverse given obj;`. I'm noticing that there are so many ways to do things, completely trumping perl 5 20:23
20:26 raydiak joined
mst you can do more of those things in perl5 than you think, even if they're usually idioms rather than features 20:26
I mean, I agree with your positive estimate of perl6, but I doubt you know what perl5 is capable of to the extent that you think :) 20:27
20:27 rindolf left
FROGGS lolo78: is it perhaps related to this? github.com/moritz/svg-plot/issues/8 20:31
lolo78: are you using rakudo star 2016.01? 20:32
stevieb9 oh, I'm very clear on that. There's a lot I don't know about perl5, but there's a lot I do use that you don't see often. That said, I'm by no means an expert. There are many things I come across that I just give up on trying to figure out what its supposed to do. I'm just finding this perl6 thing like a new Christmas toy I suppose :)
lolo78 FROGGS: Yes, it seems to be exactly the same problem.
Using: This is Rakudo version 2016.04 built on MoarVM version 2016.04 implementing Perl 6.c. 20:33
20:33 ribasushi joined
FROGGS lolo78: you might want to try upgrading SVG::Plot and see if it helps... 20:33
lolo78 OK, FROOGS, thanks, I'll try that. 20:34
perlpilot stevieb9: Have you looked at rosettacode much? Lots of good Perl 6 stuff there. 20:35
FROGGS gnight
20:36 FROGGS left
stevieb9 I have not. I'll look it up and put it into a tab for later review. Thanks! 20:36
20:36 patrickz left, sno joined
stevieb9 one thing that I did wrong while using perl5 for years was not hanging around the IRC channels. In 3-4 days here, I've learned a heck of a lot. 20:36
AlexDaniel sexy-coder-girl: why would you pick this nickname? :/ 20:38
perlpilot AlexDaniel: humor
AlexDaniel sexy-coder-girl: better tell me how your IRC client thingy is going, I NEED IT 20:39
:)
perlpilot stevieb9: yeah, hanging out on IRC helps. Especially for Perl 6 as most of the major players are active on #perl6
stevieb9 I see that. It works for me, because I love to help others, but I'm the type who takes criticism well, and can take being told "you're wrong". I also am keen to change my opinions/beliefs if something better comes along. I think I'll be happy here 20:41
mst same goes for perl5 though
the community's significantly co-ordinated via IRC
stevieb9 yeah, I've been hanging around perl5 IRC lately too. fwiw, perl5 is still, by far, my favourite lang
perlpilot mst: yeah, that's true ... you just have to pick the *right* #perl for Perl 5 ;)
stevieb9 perlpilot: which is the 'right' #perl5?
erm, #perl 20:42
mst well there's #perl on here, plus all of irc.perl.org
20:42 _mg_ left
stevieb9 I'm on irc.perl.org. Not the one here. will be now though 20:42
perlpilot stevieb9: I'm pretty sure the EFnet #perl isn't very useful these days though it still exists. 20:44
:)
stevieb9 perlpilot: thanks
20:45 sufrostico joined
dalek k-simple: ab0cccd | azawawi++ | t/01-sanity.t:
Run tests on windows
20:48
k-simple: 2205667 | azawawi++ | lib/GTK/Simple/ (2 files):
unit classization
k-simple: fc5c3b6 | azawawi++ | lib/GTK/Simple/Toolbar.pm6:
Weird fix but it makes it work :)
k-simple: d2f5aa8 | RabidGravy++ | / (3 files):
Merge pull request #44 from azawawi/master

Windows test fixes + tidy code + weird fix :)
stevieb9 I especially like the very high level of knowledge most folks here have of the language. As I move forward, that'll both help keep me in check, and get an understanding of who likes focusing on what 20:49
the experienced/newb ratio appears very high. I feel like I jumped in at the perfect time 20:51
20:52 kid51 joined
stevieb9 I note though that perl5 has just as many people willing to help (and I'm not complaining about newbies, particularly because I am one), but it's great knowing there's a place where you're pretty well immediately going to get great feedback instantaneously 20:52
RabidGravy well sometimes :) 20:53
stevieb9 lol
perlpilot stevieb9: you may also notice that some of the people on #perl6 are also on #perl. This is not an accident ;) 20:54
20:54 yqt joined
stevieb9 perlpilot: I'm well aware of that, and I most definitely recognize names ;) 20:54
perlpilot though .... I'm pretty sure #perl never gave out hugs as freely as #perl6 20:56
stevieb9 perlpilot: some handles are different than what outside of here I'd recognize, but undoubtedly there are some people here where I've submitted perl5 patches/PRs to
20:56 dolmen joined 20:57 skids left
RabidGravy I'd hardly used irc for ten years before I got in here 20:59
stevieb9 so, besides everything else I've picked up here in the brief checkins, I've learned that people here prefer perl5/perl6 as opposed to shortened forms, and that #perl6 gives out free hugs ;)
RabidGravy: same here
21:00 mr-foobar joined
stevieb9 RabidGravy: it's a handy resource. right down to seeing the commits going in 21:01
AlexDaniel huggable: hug stevieb9 21:02
huggable hugs stevieb9
stevieb9 LOL :D
AlexDaniel bisectable: bisect stevieb9
perlpilot stevieb9: you want to see something neat that I used today?
AlexDaniel :) 21:03
stevieb9 perlpilot: of course!
perlpilot m: my @mat = <a b c>, (1,2,3); my @tran = (@mat[*;$_] for ^@mat[0]); say @tran.perl;
camelia rakudo-moar b2f8ba: OUTPUT«[("a", 1), ("b", 2), ("c", 3)]␤»
stevieb9 I took off of work early today using banked hours. Now I'm at home playing some vids and learning things on this IRC channel 21:04
moritz perlpilot: are you reinventing zip? :-)
m: say zip(<a b c>, (1,2,3))
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3))␤»
perlpilot huh. I'd not thought of transposition as zip 21:07
So ... I guess I did :)
stevieb9 looks like something map()py... creating a list of lists. I don't know what the * means quite yet, but I'll play with this later, and it'll lead me to docs
perlpilot But ... that's the beauty of Perl (5 or 6) ... TMTOWTDI! :)
stevieb9 can tell already that I'm going to enjoy learning perl6 21:08
AlexDaniel m: say <a b c> »,« (1,2,3)
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3))␤»
AlexDaniel m: say <a b c> «,» (1,2,3) 21:10
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3))␤»
AlexDaniel and only now I've realized that there's a difference
m: say <a b c> »,« (1,2,3,4)
camelia rakudo-moar b2f8ba: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:<,> are not of the same length␤left: 3 elements, right: 4 elements␤ in block <unit> at /tmp/FfkvMIp9Cy line 1␤␤»
AlexDaniel m: say <a b c> «,» (1,2,3,4)
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3) (a 4))␤» 21:11
stevieb9 AlexDaniel: that's very interesting! are the '<<' and '>>', or are those double-quotes? 21:12
are they *operators*... 21:13
AlexDaniel stevieb9: you can use >> or »
m: say <a b c> <<,>> (1,2,3,4)
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3) (a 4))␤»
perlpilot stevieb9: they are hyperops
stevieb9 ok, that's what I thought... I didn't come across the backwards one yet though in the docs
perlpilot backwards one?
stevieb9 sorry.... I've only seen >> as the hyper op 21:14
AlexDaniel ehhh, is it documented?
stevieb9 I haven't seen an example where it was used << like
...yet
AlexDaniel stevieb9: which example did you see where » was used?
perlpilot stevieb9: yeah, they're symmetric. You generally want the pointy end towards the smaller list and the fat end towards the bigger list.
RabidGravy It's also a bit more typing than 21:15
m: say <a b c> Z (1,2,3)
camelia rakudo-moar b2f8ba: OUTPUT«((a 1) (b 2) (c 3))␤»
AlexDaniel sure 21:16
stevieb9 it may have been in the intro... ...yep. sorry. it wasn't the official docs I saw it in. It is there: doc.perl6.org/language/operators#H..._Operators
just hadn't got to that part of the official docs yet
21:16 matiaslina left
AlexDaniel ok, great, it is documented 21:16
stevieb9 yep
21:18 jjido joined
perlpilot m: my @mat = <a b c>, (1,2,3), <x y z>; say [Z] @mat; # for me, I already had @mat and just needed to rotate it 90 degrees 21:18
camelia rakudo-moar b2f8ba: OUTPUT«((a 1 x) (b 2 y) (c 3 z))␤»
RabidGravy cool 21:19
perlpilot But it's always nice to use a dimensional slice when you can :) 21:20
stevieb9 I saw an example the other day here regarding chaining calls and have a question. Here's a dumbed down version: '.reverse, .sort given obj'. Now, this works: 'perl6 -e 'my @a = .sort given (3,1,2); say @a', but this: 'perl6 -e '.say, .sort given (3,1,2)' does not. Can someone please explain what the process flow here is? 21:22
21:22 Emeric left
perlpilot stevieb9: sure it wasn't .sort.say given (3,1,2); #? 21:23
geekosaur stevieb, both methods are applied to the object in order. they are not chained (and if they were, they'd be in the wrong order). also .sort does not mutate. so you'd get the original value say-d, then it would be sorted (the result in sink context, uselessly) 21:24
perlpilot, I'm thinking they saw discussion yesterday about how to shorten foo.x; foo.y; foo.z by using given
anyway: `.say, .sort given (3,1,2)` does: (3,1,2).say; (3,1,2).sort; # the latter should warn because the result is not used 21:26
stevieb9 geekosaur: ahhh *right*! I forgot sort() is non-mutating. Thanks :)
21:26 ptolemarch left
Zoffix AlexDaniel, anything specific? :) RE <AlexDaniel> Zoffix: how is it going? 21:32
AlexDaniel Zoffix: yes
Zoffix: IRC CLIENT
Zoffix stevieb9, yeah, it was me. And it's no surprise, given Perl 6 is [partially] an attempt to fix annoying things in Perl 5 :P 21:33
AlexDaniel, yesterday, I figured out how to use Perl 5's PoCo::IRC::Server to launch an IRC server that I'll use to write tests. Hoping to do some good work this weekend, unless I find a very interesting game to play :P 21:34
AlexDaniel Zoffix: oh, tests! Great!
Zoffix++
21:36 patrickz joined
stevieb9 geekosaur: thanks for the explanation. Zoffix: sorry to pick apart your example, but I found it intriguing :) 21:37
Zoffix It's fine :) 21:38
Hoping you'll send a PR to document it (I recall you said it wasn't) :)
21:39 setty1 left 21:40 jjido left
stevieb9 don't know yet. I've just been bouncing around the docs randomly... I read/test something, then I find something quasi-related to what I'm playing with, then jump off on a tangent. I tend to learn quicker that way. I do promise to create PRs for anything missing/incorrect in the docs though (much like the issue with IO::Handle I was having on PerlMonks that you verified/patched). Of course, I'll come here first to get verification 21:41
...at least until I feel more confident after gaining more experienced, then I'll do so without someone hand-holding 21:42
21:49 perlpilot left 21:58 wamba left
literal aw, I was disappointed to find out that this doesn't work: $foo.bar($^a, $^b) for %baz.kv; 21:58
since $^a and $^b will be associated with the surrounding block 21:59
I suppose I'll have to make do with for %baz.kv { $foo.bar($^a, $^b) } 22:00
ugexe m: class Foo { method bar($a, $b) { say $a; say $b; }; }; my %baz = a => 1, b => 2; my $foo = Foo.new; $foo.bar(.key,.value) for %baz;
camelia rakudo-moar b2f8ba: OUTPUT«a␤1␤b␤2␤»
22:01 rurban joined, Sgeo joined
literal oh, forgot I could just do that 22:03
grondilu yeah that's a common idiom 22:04
22:04 rurban left 22:08 juantelez joined
AlexDaniel m: class Foo { method bar($a, $b) { say “$a↔$b”; }; }; my %baz = a => 1, b => 2; my $foo = Foo.new; for %baz.kv { $foo.bar($^a, $^b); } 22:09
camelia rakudo-moar b2f8ba: OUTPUT«a↔1␤b↔2␤»
AlexDaniel this is not too bad too
22:10 patrickz left 22:14 cpage_ left
Zoffix m: class Foo { method bar($a, $b) { say “$a↔$b”; }; }; my %baz = a => 1, b => 2; my $foo = Foo.new; $foo.bar: |.kv for %baz 22:18
camelia rakudo-moar 56cc3a: OUTPUT«a↔1␤b↔2␤»
22:28 ribasushi left, skids joined 22:29 lolo78 left 22:30 lolo78_ left
TimToady m: class Foo { method bar($a, $b) { say “$a↔$b”; }; }; my %baz = a => 1, b => 2; my $foo = Foo.new; {$foo.bar($^a,$^b)} for %baz.kv 22:34
camelia rakudo-moar 48fe6a: OUTPUT«a↔1␤b↔2␤»
TimToady you can write it with a modifier if you use explicit curlies 22:35
22:39 pecastro left 22:41 pecastro joined 22:42 ribasushi joined
stevieb9 m: say "friday: \x1f37a" 22:43
camelia rakudo-moar 48fe6a: OUTPUT«friday: 🍺␤»
Zoffix TimToady, just curious, did you see my question about is-approx tolerance? Unsure if you don't have time/ideas for an answer or just missed it, 'cause you had toothwork and stuff. 22:44
This: <Zoffix> TimToady: would you have time to offer a ruling on what the default tolerance to is-approx in Test.pm6 should be? Is it relative or absolute, and what value? My ideal choice would be to go with absolute at 1e-5. The specs/docs use absolute at 1e-5. And current impl uses relative at 1e-6. The ≅ uses relative at 1e-15. My more detailed plan for rewrite of is-approx: github.com/zoffixznet/debu​g/blob/...-rework.md
and both relative/absolute methods will still be available via :rel-tol<>/:abs-tol<> 22:45
m: say "Friday: \x[1F3AE]" 22:46
camelia rakudo-moar 48fe6a: OUTPUT«Friday: 🎮␤»
stevieb9 :)
Zoffix: why the '[]'?
Zoffix Just for clarity 22:47
stevieb9 I'll remember that. It does stand out more prominently with the '\x'
AlexDaniel m: say “Friday: \x[1F6CC]” 22:48
camelia rakudo-moar 48fe6a: OUTPUT«Friday: 🛌␤»
Zoffix I'd say so.
AlexDaniel huggable: friday :is: 🛌🎮🍺 22:49
huggable AlexDaniel, Added friday as 🛌🎮🍺
Zoffix huggable, drinking is bad for you! 22:50
huggable Zoffix, nothing found
22:51 rurban1 joined
AlexDaniel Zoffix: sometimes gaming is worse ;) 22:53
stevieb9 m: say 'use Cannabis;'
camelia rakudo-moar 48fe6a: OUTPUT«use Cannabis;␤»
22:59 kaare_ left
sortiz .tell slobo I push a new version of NativeHelpers::CStruct that allows you to create an "unmanaged" LinearArray from a Pointer (typed or not) and a count, hope that helps you. 23:00
yoleaux sortiz: I'll pass your message to slobo.
23:01 firstdayonthejob left 23:02 matiaslina joined 23:03 RabidGravy left 23:07 Zoffix left 23:08 dolmen left
slobo thanks sortiz, i'll check it out hopefully tonigth! 23:09
yoleaux 23:00Z <sortiz> slobo: I push a new version of NativeHelpers::CStruct that allows you to create an "unmanaged" LinearArray from a Pointer (typed or not) and a count, hope that helps you.
23:09 rurban1 left
stevieb9 in the following, what would I need to do before/in say() to print out the conversion of the codepoint back to the character? perl6 -e '"🍺".NFC.say'. I've tried a few random things, including $_, which clearly doesn't work. 23:12
23:12 cdg left
stevieb9 I'm curious how to go from string character to codepoint, back to string char and then print 23:13
23:13 cdg joined
sortiz slobo, One important thing: be sure that the P6's reported 'nativesizeof' must be equal to C's sizeof of your structs. 23:14
timotimo stevieb9: you'll want to encode it to utf8 or something
23:15 Zoffix joined 23:16 adu joined
stevieb9 timotimo: ahhh, of course :) this perl6 venture has me very interested in Unicode, where I've previously not had to deal with it (barely) 23:17
same with dealing with IO in :bin mode 23:18
just from what I've learned so far (which is almost nil) has me already seeing potential improvements in my perl5 work 23:19
timotimo right, it can bend your brain a bit
with the many different representations that are available and useful for different situations
stevieb9 it's like perl5 references though... once you get it, you just get it (I hope ;)
timotimo i haven't had to deal with perl5 references yet :) 23:20
stevieb9 it's a time and dedication thing. just like I'm sure many things in perl6 are 23:21
timotimo mhm 23:22
on top of that, i haven't written more than one or two lines of perl5 code
stevieb9 I can only assume that everything in perl6 is by default passed by reference, yes?
timotimo yup
stevieb9 re: your perl5, I remember you saying you haven't coded there before
for many people, (at times myself), it seems mysterious that there are perl6 writers who haven't written perl5. however, the distinction is so significant, that it makes sense. I'm glad I decided to give perl6 a new look 23:24
timotimo ah, i already told you, then
yeah, i came from python :) 23:25
sortiz m: say "$_ {.chr()}" for "🛌🎮🍺".NFC; # btw, as NFC returns a list, you can use .chr to get the character back.
camelia rakudo-moar 48fe6a: OUTPUT«128716 🛌␤127918 🎮␤127866 🍺␤»
stevieb9 yep, I remember you recommending pypy ;)
Zoffix I'm sure there are lots of Perl 5 coders who never wrote any Perl 4 :P
TimToady Zoffix: I don't really care much what is-approx does; I didn't write that, I only wrote ≅, which I made relative unless you're very close to 0 23:26
there's not much point in making $x ≅ 0 relative :) 23:27
stevieb9 zoffix: yes, there are :) there are also a lot of people who to this day use perl4 syntax. perhaps because they copy/pasted code from 15+ years ago
23:28 cdg left
Zoffix Which reminds me 23:28
m: $*TOLERANCE = 0; say 2 ≅ 2
camelia rakudo-moar 48fe6a: OUTPUT«Cannot modify an immutable Num␤ in block <unit> at /tmp/vz3vIlZci5 line 1␤␤»
Zoffix m: my $*TOLERANCE = 0; say 2 ≅ 2
camelia rakudo-moar 48fe6a: OUTPUT«False␤»
stevieb9 timotimo: you're experienced in python and perl6. may I ask which you prefer, and why, or is that too flamey here? 23:29
TimToady doesn't believe in "zero tolerance" :)
Zoffix Eh, Python is just a dialect of Perl 6, why would it be flamey? 😜
stevieb9 a dialect... I like that lol 23:30
Zoffix With slangs, it more than just a poetical statement :) You could make Perl 6 have Python's syntax, if you really wanted to :P
stevieb9 zoffix: honestly, the more I read/play, the more I notice that these things are possible 23:31
23:32 adu left
Zoffix m: sub infix:<⁢> {$^a+$^b}; say 2⁢22 23:34
camelia rakudo-moar 48fe6a: OUTPUT«24␤»
stevieb9 one big complaint I hear about perl6 is that there's no CPAN, and that people cite the recent leftpad fiasco while they say the current perl6 module ecosystem has the same faults (being on github et-al). Is there an official source for where this is moving to?
Zoffix stevieb9, well, those people are welcome to help build a better system :) 23:35
stevieb9, the direction is listed here: docs.perl6.org/language/modules#The..._Ecosystem (The Future of Ecosystem section)
Though there's a severe shortage of hands to do the work.
23:38 sufrostico left
timotimo stevieb9: i haven't done anything productive in python for a long time, tbh. i pretty much switched to p6 full-time for my hobby stuff. on the other hand, i started concentrating on perl6 core development relatively quickly 23:38
23:40 bjz_ left
stevieb9 Zoffix: thank you for that. I will definitely have a look. Out of curiosity, do you (perl6 core people) get any feedback etc. from the perl5 CPAN people to create symmetry? 23:40
timotimo: thanks for the feedback. what was it that grabbed you about perl6?
Zoffix ¯\_(ツ)_/¯ I'm not core people. I just talk a lot :P 23:41
mst might know more on that. He's a real bridge between the two communities
stevieb9 I apologize for the very general questions. I just see an opportunity to get information from very informative people, so I'm jumping ;)
TimToady is glad he no longer has to control the narrative, except when he does... 23:42
stevieb9 Zoffix: perhaps you're not core, but you're very helpful anywhere I've seen you. You jump in and provide quality info, even if someone thinks you haven't looked in a direction in a long time
next time I see Matt online, I'll ask again about any cooperation 23:44
23:44 sufrostico joined 23:54 robinsmidsrod left
jdv79 Zoffix: i either forgot or didn't know that was documented 23:56
nice to know in any case
23:59 robinsmidsrod joined