»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Geth doc: 4dfc34001c | cfa++ | 2 files
Spelling.
00:42
cpan-p6 New module released to CPAN! (0.0.2) by 03HYTHM 01:19
hythm '0.0.2' module name above is a typo ( the tar.gz file name was missing the name of the module), I removed it from cpan and uploaded the correct one 01:49
yoleaux 26 Feb 2019 01:16Z <MasterDuke> hythm: github.com/rakudo/rakudo/blob/mast...Array.pm6, github.com/rakudo/rakudo/blob/mast...Array.pm6, ... would probably be a good place to start
cpan-p6 New module released to CPAN! Grid (0.0.2) by 03HYTHM 02:05
jmerelo squashable6: status 07:14
squashable6 jmerelo, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈6 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo, Log and stats: gist.github.com/9119e176832050edd8...25c574c939
jmerelo releasable6: status
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 319 out of 336 commits logged
jmerelo, Details: gist.github.com/17fdd3c4982580debb...0f5f059d28
jmerelo m: say $; 07:16
camelia (Any)
jmerelo m: say "\$; is $;"
camelia 5===SORRY!5=== Error while compiling <tmp>
Non-variable $ must be backslashed
at <tmp>:1
------> 3say "\$; is 7⏏5$;"
expecting any of:
argument list
double quotes
prefix
term
jmerelo m: say "\$; is ", $;
camelia $; is (Any)
squashable6 🍕 JJ++ wrote a comment on “Document $;”: github.com/perl6/doc/issues/2642#i...-468996481 07:20
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 07:34
🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 07:35
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 07:51
Geth doc: 29d0a6a45b | (JJ Merelo)++ | doc/Type/Cool.pod6
Revs EVAL refs #2632
07:52
doc: 4872685f65 | (JJ Merelo)++ | doc/Language/typesystem.pod6
Adds reason for is required, refs #2632
synopsebot Link: doc.perl6.org/type/Cool
Link: doc.perl6.org/language/typesystem
squashable6 🍕 JJ++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 08:17
Geth doc: 2196fe5582 | (JJ Merelo)++ | doc/Type/IO/Socket/Async.pod6
Adds binding to port 0, refs #2632
08:18
synopsebot Link: doc.perl6.org/type/IO::Socket::Async
squashable6 🍕 Altai-man++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-469003272 09:09
🍕🍕🍕 First contribution by Altai-man++! ♥
squashable6 🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 09:21
squashable6 🍕 Altai-man++ opened issue “Collation type is not documented”: github.com/perl6/doc/issues/2644 09:29
🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 09:31
squashable6 🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 09:35
Geth doc/document-two-dynamic-vars: 33ab4430e0 | Altai-man++ | doc/Language/variables.pod6
Document $*USAGE and $*COLLATE
09:37
doc: Altai-man++ created pull request #2645:
Document $*USAGE and $*COLLATE
09:39
squashable6 🍕 Altai-man++ opened pull request “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645
🍕 Altai-man++ wrote a comment on “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645#iss...-469005498
sena_kun bisectable6_, help 09:41
bisectable6_ sena_kun, Like this: bisectable6_: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable
sena_kun bisectable6_, old=2015.12 new=2018.12 :(Str $x).params[0].perl 09:42
bisectable6_ sena_kun, On both starting points (old=2015.12 new=2018.12) the exit code is 0 and the output is identical as well
sena_kun, Output on both points: «»
sena_kun bisectable6_, old=2015.12 new=2018.12 :(Str $x).params[0].perl.say
bisectable6_ sena_kun, On both starting points (old=2015.12 new=2018.12) the exit code is 0 and the output is identical as well 09:43
sena_kun, Output on both points: «Str $x␤»
sena_kun hmm...
sena_kun bisectable6_, old=2015.12 new=2018.12 my %a = 0 => 'z', 1 => 'a'; %a.min.say; 09:46
bisectable6_ sena_kun, Bisecting by exit code (old=2015.12 new=2018.12). Old exit code: 1
sena_kun, bisect log: gist.github.com/1427d0ffb0db177bc3...79eef8df77
sena_kun, (2016-07-30) github.com/rakudo/rakudo/commit/10...6f6dfae592
sena_kun committable6, help 09:48
committable6 sena_kun, Like this: committable6: f583f22,HEAD say ‘hello’; say ‘world’ # See wiki for more examples: github.com/perl6/whateverable/wiki/Committable
sena_kun committable6, 6c: my %a = 0 => "z", 1 => "a"; %a.min.say;
committable6 sena_kun, ¦6c:: «Cannot find this revision (did you mean “v6.c”?)»
sena_kun 6c: my %a = 0 => "z", 1 => "a"; %a.min.say; 09:49
committable6 sena_kun, gist.github.com/fde00ba4613368a294...d0f8c121d3
sena_kun 6c: my %a = 0 => "z", 1 => "a"; %a.max.say; 09:50
committable6 sena_kun, gist.github.com/46764d8eb084bf4d62...50f55c6c51
sena_kun 6c: my %a = 0 => 'z', 1 => 'a'; say max %a; 09:52
committable6 sena_kun, ¦6c (36 commits): «1 => a␤»
squashable6 🍕 Altai-man++ wrote a comment on “Checklist for 6.d”: github.com/perl6/doc/issues/2632#i...-469006681 09:55
sena_kun 6c: my %a = one => 1; my %o = inner => %a; %o<inner><one>:exists.say; 09:57
committable6 sena_kun, ¦6c (36 commits): «True␤»
sena_kun 6c: say UInt ~~ Int; 09:58
committable6 sena_kun, ¦6c (36 commits): «True␤»
Geth doc: 92172698e3 | Altai-man++ | doc/Type/UInt.pod6
Add explicit mention of UInt ~~ Int
10:01
synopsebot Link: doc.perl6.org/type/UInt
squashable6 🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632
sena_kun 6c: " ".Int.say 10:02
committable6 sena_kun, ¦6c (36 commits): «0␤»
squashable6 🍕 JJ++ wrote a comment on “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645#iss...-469007209
🍕 Altai-man++ wrote a comment on “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645#iss...-469007388 10:04
Geth doc: 33ab4430e0 | Altai-man++ | doc/Language/variables.pod6
Document $*USAGE and $*COLLATE
10:23
doc: dfcf1de969 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/variables.pod6
Merge pull request #2645 from perl6/document-two-dynamic-vars

Document $*USAGE and $*COLLATE
synopsebot Link: doc.perl6.org/language/variables
squashable6 🍕 JJ++ merged pull request “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645
squashable6 🍕 JJ++ wrote a comment on “Document $*USAGE and $*COLLATE”: github.com/perl6/doc/pull/2645#iss...-469009047
🍕 JJ++ wrote a comment on “Collation type is not documented”: github.com/perl6/doc/issues/2644#i...-469009091 10:24
🍕 JJ++ labeled issue “Collation type is not documented” (docs): github.com/perl6/doc/issues/2644
🍕 JJ++ labeled issue “Collation type is not documented” (new): github.com/perl6/doc/issues/2644
rindolf squashable6: status 10:25
squashable6 rindolf, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈3 hours. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
rindolf, Log and stats: gist.github.com/077f145e6816911563...1de845dab0
daxim rakudo.org/ website is wrong 10:36
timotimo daxim: i i think it's a DNS issue with the quad A entry; should work over ipv4 at the moment, right? 10:43
daxim curl -4 …… does work 10:44
timotimo the rakudo domain recently changed ownership, i'm not sure but i think jonathan got it? 10:45
sena_kun he did 10:49
timotimo let's see when he becomes available during his travel and work to fix it up 11:03
jmerelo squashable6: status 12:32
squashable6 jmerelo, 🍕🍕 SQUASHathon is in progress! The end of the event in ≈1 hour. See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
jmerelo, Log and stats: gist.github.com/0237603fdb458c1676...bac6e4553c
squashable6 🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 13:20
sena_kun 6c: say Complex.new 13:21
committable6 sena_kun, gist.github.com/629780c15d841c7610...ddc84bd86f 13:22
squashable6 🍕 Altai-man++ edited issue “Checklist for 6.d”: github.com/perl6/doc/issues/2632 13:28
Geth doc/complex-new-method-addition: 8dbc66be7e | Altai-man++ | doc/Type/Complex.pod6
Note arg-less Complex.new call
13:29
Geth doc: Altai-man++ created pull request #2646:
Note arg-less Complex.new call
13:30
squashable6 🍕 Altai-man++ opened pull request “Note arg-less Complex.new call”: github.com/perl6/doc/pull/2646
cpan-p6 New module released to CPAN! Random-Choice (0.0.1) by 03TITSUKI 15:54
shinobi_cl hello all :) So, whats the deal about 6.d and 6.c? The recommended version in 2018.10 is 6.c, when is the official transition to 6.d happening? 15:58
sena_kun it is already done, I think 16:02
c: say $*PERL
committable6 sena_kun, Seems like you forgot to specify a revision (will use “v6.c” instead of “say”)
Geth doc: 5cb674b0db | cfa++ | 2 files
Remove trailing whitespace.
16:03
sena_kun um, I suddenly forgot how to do this thing...
committable6 sena_kun, gist.github.com/affb4b0ecff9ff500c...9c8d7697d7
sena_kun m: say $*PERL
camelia Perl 6 (6.d)
sena_kun shinobi_cl, v6.d is used by default since 2018.11, if I recall correctly. Nonetheless, you can enforce usage of v6.c with `use v6.c`. 16:04
sena_kun change log is available at github.com/perl6/roast/blob/master...nce/6.d.md 16:04
sena_kun however, not that those were changed to the language specification, some of them are e.g. clarifications/documenting existing behavior, not changes. But some are behavior changes, of course. 16:05
sena_kun *note that those were 16:08
jmerelo squashable6: log 2019-03-02 16:20
squashable6 jmerelo, Log and stats: gist.github.com/fd42ad595be016297e...7c62cb8283
cpan-p6 New module released to CPAN! Random-Choice (0.0.2) by 03TITSUKI 16:25
jmerelo releasable6: status 17:11
releasable6 jmerelo, Next release will happen when it's ready. 2 blockers. 319 out of 337 commits logged
jmerelo, Details: gist.github.com/218fad0fa752f579ed...cd61332262
jmerelo And the winner of the plush Camelia for the documents squashathon is... 17:12
... drumroll ....
AlexDaniel \o/ \o/ \o/
jmerelo ... by a single contribution ...
... I think I've got their nick right ...
AlexDaniel wait why single
there were at least 2 prs by someone 17:13
are you sure? :)
jmerelo AlexDaniel: I count everything
And you are interrupting.
Let's start over again
The winner is....
... unless someone objects ... 17:14
sena_kun: you're the winner, with 21 contributions! github.com/JJ/p6-app-squashathons/...r-2019.csv
guifa objects.
Oops too late :P
sena_kun jmerelo, how comes, if you are the winner? :)
jmerelo you can post-object
sena_kun: I'm not eligible
guifa BEGIN object
jmerelo guifa: :-) 17:15
AlexDaniel sena_kun: “OK, I'm organizing this squashathon… aaaand… I WIN!!” :) 17:15
jmerelo sena_kun: congratulations! You need to email lizmat with your coordinates to have a plush camelia sent to you
AlexDaniel: I would do that. But I already have the plush camelia.
AlexDaniel xD 17:16
it's fair
sena_kun well, I just wanted to do some other stuff on my weekend after a hellish week with Comma (though the results are extra nice)...
and I have a Camelia already. ;) But I am pretty surprised and happy right now, so won't resist further. :)
\o/
AlexDaniel jmerelo: no objections, your table is pretty great actually
jmerelo sena_kun: thanks! Now it would be great if you continued at least for some time... there's a lot of stuff to do in fact 17:17
AlexDaniel jmerelo: I was just confused a bit with “by a single conttribution”
sena_kun well, the second place is 20, me is 21.
so to beat it only 1(2, technically) bits were necessary. 17:18
jmerelo AlexDaniel: and related to that, I think we should do something like that issue for every single release.
AlexDaniel: since you collect every single functional change in every release, I think we should move that to an issue and at least try to keep up to date with documentation.
It's going to be pretty nigh impossible, but at least we will know what we miss, it's not like in 2020.11 we find we haven't documented something we should have in 2019.09 17:19
AlexDaniel: what do you think?
AlexDaniel jmerelo: sure, I'm OK with that, but you should ask the release manager 17:20
when we finally have one
so this release is going to be called 2018.03, no other release this month
jmerelo It's a bit delayed :-) 17:21
guifa 2018? ;-)
AlexDaniel 2019*…
jmerelo AlexDaniel: ^^^^
AlexDaniel 2019.03, and it's ahead of time!
jmerelo AlexDaniel: of course :-)
AlexDaniel I'm not going to do 2019.04, I don't have enough time for that
jmerelo AlexDaniel: you could delay it until April 1st and call it 6.þ 17:22
AlexDaniel and my hope is that we finally find a new release manager by 2019.05
jmerelo AlexDaniel: so you're on for 2019.04
AlexDaniel well, if we find one before 2019.04, then they're free to cut 2019.04 too :)
lucasb I was expecting releases to be named 2019.02
AlexDaniel lucasb: me too, but if we're releasing it on 4th or 5th of this month, might as well call it .03 :) 17:23
jmerelo AlexDaniel: would you say "fixes" and "additions" would imply some revision and changes in documentation? Or just additions? Generally bugs are not documented...
AlexDaniel jmerelo: actually, speaking of your idea
jmerelo AlexDaniel: only additions, I guess... 17:24
lucasb I know 2019.03 might not happen, but if it did it would happen on the third saturday, not now
jmerelo lucasb: it's going to happen, 2019.01 and 2019.02 will be skipped...
AlexDaniel jmerelo: most additions/removals generally should not be documented at all… these are changes to rakudo, and we tend to only document language changes
jmerelo lucasb: let's call it 2019.01.02.we're.almost.up.to.03
AlexDaniel lucasb: I mean, you're right, but it's a great chance to make a release ahead of time :D 17:25
guifa Release on March 15 and call it 2019.🏛🗡️?
jmerelo AlexDaniel: the thing is, they are... documented
guifa: or on 3.15 and call it 2019.pi
sorry, that would be 3.14 and 2019.π 17:26
AlexDaniel lucasb: and also a great chance to skip questions like “where's 2019.03?” :)
though the same question will probably be asked about .01 and .02… but oh well. The dev team was really busy fixing stuff 17:27
jdv79 wow, compile time for a moderately complex app is still kinda slow:(
14s for this particular app 17:28
jdv79 starting to feel like java. is that still the grammar and all opti stuff that nobody is working on? 17:29
AlexDaniel jdv79: what about moving the code into a module?
rindolf jdv79: with what?
jdv79 it is in a module - but once i edit it it invalidates 17:29
timotimo doesn't help make development much faster :(
jdv79 yeah, a pre-comp startup is instantaneous
but deving loses that completely
rindolf: compiler speed
AlexDaniel jdv79: use inotify to precompile ahead of time before you even attempt to run it? :) 17:30
rindolf jdv79: in rakudo?
jdv79 i'm editting and running in a tight loop
so that's pointless
rindolf: yes
AlexDaniel jdv79: sorry :)
rindolf jdv79: ah
jdv79 maybe a gsoc project could be part of that... 17:31
AlexDaniel jdv79: yes, but also maybe we need a good way to benchmark it
jdv79 also, comin back to p6 dev from being away for a while - having to slip on a for loop seems very unintuitive
just saying
shinobi_cl Hi AlexDaniel... a question
jdv79 AlexDaniel: its not hard - just compile something:) 17:32
AlexDaniel jdv79: for example, if we had a benchmark, we could run it across releases and stuff. If there was some commit that made things slower, then we'd be able to revert it, for example. That's not very common however, but we can try our luck to maybe save a % or two
shinobi_cl The automated tests that runs against the modules in perl6 modules site. Are 6.c or 6.d?
jdv79 my lame regex heavy module is kinda a canary but its not as bad as this app for sure
AlexDaniel shinobi_cl: you mean ecosystem-unbitrot? That is done with the latest rakudo version on master
shinobi_cl: and that defaults to v6.d 17:33
shinobi_cl: of course the the module can always `use v6.c;` to get v6.c behavior
shinobi_cl: or do you mean travis? Travis will do different things depending on the configuration in the module repo… and everyone does something different 17:34
sena_kun just noting that based on 6guts.wordpress.com/2019/01/02/my-...-for-2019/ decreasing startup/compile time is on jnthn's list of work. So if one can't become a core hacker itself, but still wants to make rakudo faster, it is still possible to donate to Perl Foundation so grants can be funded, I think. 17:36
AlexDaniel anyone can also do a gsoc project on that topic, I think: twitter.com/jnthnwrthngtn/status/1...4172324864 17:37
Geth doc: 8dbc66be7e | Altai-man++ | doc/Type/Complex.pod6
Note arg-less Complex.new call
17:38
synopsebot Link: doc.perl6.org/type/Complex
doc: 7153fcbec9 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/Complex.pod6
Merge pull request #2646 from perl6/complex-new-method-addition

Note arg-less Complex.new call
sena_kun oh yeah, that'd be awesome too. :)
jmerelo sena_kun: can you way how far away is the Comma community edition?
AlexDaniel jdv79: RT#127330 17:39
synopsebot RT#127330 [rejected]: rt.perl.org/Ticket/Display.html?id=127330 [SLOW] 10_000 lines with 「say ‘a’;」 take 16 seconds to run
AlexDaniel haha there's a graph rt.perl.org/Ticket/Attachment/1385...prints.png
sena_kun jmerelo, I wonder how many details I can share, but it is closer than it may seem now. _winks_ 17:40
jmerelo sena_kun++ 17:41
jdv79 AlexDaniel: nice 17:43
lucasb sena_kun: let me know if it needs beta testers :-) 17:45
sena_kun I think there will be an announcement in the Weekly. 17:47
lucasb cool, thanks 17:48
jmerelo m: say $:.perl 17:49
camelia 5===SORRY!5=== Error while compiling <tmp>
Confused
at <tmp>:1
------> 3say $:7⏏5.perl
expecting any of:
colon pair
jmerelo m: say $;.perl 17:50
camelia (Any)
jmerelo m: say ($;).perl
camelia Any
jmerelo m: say ($,).perl 17:52
camelia (Any,)
xinming m: sub wrap_code (&code) { my $wrapped = &code.wrap: -> $arg { "wrap-begin:\n$arg\nwrap-end\n"; nextsame; }; }; wrap_code(-> $str { "Hello $str" });
camelia WARNINGS for <tmp>:
Useless use of "wrap-begin:\\n$arg\\nwrap-end\\n" in expression "wrap-begin:\\n$arg\\nwrap-end\\n" in sink context (line 1)
No such method 'wrap' for invocant of type 'Block'. Did you mean any of these?
Map
grep
xinming So, Block can't be wrapped, right?
jmerelo xinming: that seems to be the case 17:56
sena_kun it can't. routine can, though, so you can use anonymous one if you like. 17:56
jmerelo xinming: wrap is a Routine method, as a matter of fact. github.com/rakudo/rakudo/blob/mast...outine.pm6 17:57
xinming jmerelo, sena_kun Thanks, I thought Block can do that too. i'm wrong. 17:59
jmerelo xinming: sure :-) 17:59
sena_kun I suspect the reason is that one has to call wrapped routine as unwrapped one.
cwilson1 sigh. learning new things, one always feels dense for awhile. 18:00
sena_kun like, f('normal'); f.wrap(magic happens here); f('wrapped one is called'); f.unwrap. f('normal is again here'); 18:00
jmerelo cwilson: ah, but the joy of learning. The accumulations of TILs. The bliss of Doing New Stuff. 18:01
sena_kun m: sub wrap_code (&code) { &code.wrap(-> $arg { say "wrap-begin:\n$arg\nwrap-end\n"; &code; }) }; my &f; my $handle = wrap_code(&f = sub ($str) { say "Hello $str" }); f("sena_kun"); $handle.restore; f("sena_kun"); 18:04
camelia wrap-begin:
sena_kun
wrap-end

Hello sena_kun
cwilson jmerelo: Yeeeah. all that yak fur. Anyhow, I'm trynig to pull together a little perl6 ditty to do some sys admin, and i've clearly dorked up somewhere, slapping together example code from SSH::LibSSH with some Config::INI parsing. Why isn't my Config::INI::parse(@array.Str) working as I think it should here? pastebin.com/SyXYPrWS 18:05
jmerelo cwilson: let's have a look. Anyway, you can also use StackOverflow. We're aiming at the 1k questions... Let's see those yaks... 18:06
cwilson: you probably need to golf that down a bit... It does not seem to have anything to do with the ssh stuff. Just the stdout thing and config::ini should do. 18:07
sena_kun m: sub wrap_code (&code) { &code.wrap(-> $arg { say "wrap-begin:\n$arg\nwrap-end"; callsame; }) }; my &f; my $handle = wrap_code(&f = sub ($str) { say "Hello $str" }); f("sena_kun"); $handle.restore; f("sena_kun");
camelia wrap-begin:
sena_kun
wrap-end
Hello sena_kun
Hello sena_kun
cwilson jmerelo: yea just including it incase i did something stupid in runCommand(). 18:08
cwilson goes off to browse stackoverflow as well 18:10
AlexDaniel weekly: Squashathon winner: @Altai-man github.com/rakudo/rakudo/wiki/Mont...-Day#dates 18:19
notable6 AlexDaniel, Noted!
sena_kun can someone tell me what's the idea behind most wanted modules squashathon? 18:22
AlexDaniel jmerelo: ↑ 18:25
sena_kun it doesn't look to me like it may be just "find if the module exists and remove from the list if yes", but creating a module needs some time investment, as it is not a one-time thing, but something with a maintainence ahead.
jmerelo sena_kun: correct. Some modules need to be done. At least focus on one module, or to, and work during the weekend. 18:32
guifa Hrm it looks like one of the modules that’s asked for I’ve already done a decent bit of work towards 18:40
cpan-p6 New module released to CPAN! HTML-Canvas-To-PDF (0.0.3) by 03WARRINGD 18:42
guifa Also is there a need for Unicode-Tussle to be ported? Most of it is in P6 natively 18:43
timotimo it could be interesting to have the exact same API 18:45
like the cpan butterfly project
jmerelo guifa: please say there's some WIP there. About Tussle, who knows. Adding a comment won't hurt also. 18:52
guifa Well, it’s one of those “my work kinda fulfills it but is separated out differently” so I’m not sure if I should mark as WIP. Maybe adding a comment to say “look here for 90% of the work” or something? 18:53
jmerelo guifa: that would be nice.
guifa I want to get a full implementation of ICU, but that’s a rather monstrous beast and has a lot of fairly opaque ways of encoding data 18:57
xinming m: class T { has %.items handles (:add-item<HASH-SET-KEY>, :item<HASH-GET-BY-KEY>); }; my $obj = T.new; T.add-item("xxx", $object); <--- 19:14
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$object' is not declared
at <tmp>:1
------> 3; }; my $obj = T.new; T.add-item("xxx", 7⏏5$object); <---
xinming In this example, How do we create delegation methods for Hash attribute like this? I read the docs.perl6.org/type/Hash#(Map)_method_gist 19:15
But still not much clue about it.
push method is not that I want.
I know I can write simple helpers for this purpose.
timotimo Hash::Agnostic is perhaps a place to look for inspiration 19:20
perhaps not at all, on second thought
sena_kun I don't think 'handles' can help in this situation... But I cannot think of anything else. I have another feeling though.... 19:23
m: class T is Hash { method add-item($key, $new) { self.ASSIGN-KEY($key, $new) }; method item($key) { self.AT-KEY($key) }; }; my $obj = T.new; $obj.add-item("xxx", 3); say $obj.item("xxx") 19:25
camelia 3
sena_kun I am not sure what is required though, maybe such inheritance is undesired though. 19:26
sena_kun s/ though// 19:26
timotimo i mean, handles is supposed to take a Role as argument 19:27
and Do The Right Thing
xinming sena_kun:Actually, ASSIGN-KEY AT-KEY is what I want. 19:30
m: class T { has %.items handles (:add-item<ASSIGN-KEY>, :item<AT-KEY>); }; my $obj = T.new; $obj.add-item("xxx", "yy"); $obj.items.perl.say;
camelia {:xxx("yy")}
sena_kun ah, cool then.
:)
I thought those were just examples and that `handles` didn't work. 19:31
docs.perl6.org/type/Associative <- took it from here.
guifa “…and the final subtag may be a date in the format YYYY, YYYYMM, or YYYYMMDD”, ooh that’s easy. Oh, WAIT. It said “may be a **valid** date”. F$%& 19:32
guifa googles how to calculate leap years. Wait, is that valid historically? DATES SUCK
sena_kun guifa, you can check if a date is valid out of the box with Perl 6. 19:33
guifa oooh? Yeah? :D :D :D
sena_kun m: DateTime.new(year => 2012, month => 2, day => 29).say;
camelia 2012-02-29T00:00:00Z
sena_kun m: DateTime.new(year => 201, month => 2, day => 29).say;
camelia Day out of range. Is: 29, should be in 1..28
in block <unit> at <tmp> line 1
sena_kun m: DateTime.new(year => 2019, month => 2, day => 29).say;
camelia Day out of range. Is: 29, should be in 1..28
in block <unit> at <tmp> line 1
sena_kun so it knows about leap years and so on. ;)
guifa Nice! 19:34
guifa ’s curiosity is peaked.
sena_kun m: DateTime.new(year => 2016, month => 2, day => 29).say;
camelia 2016-02-29T00:00:00Z
guifa How fine grained does the built in go?
xinming guifa: perl6 is the language with CPAN built-in
sena_kun guifa, what do you mean?
xinming the core perl5 cpan is built-in into perl6 itself.
I think we need a javascript grammer in perl6. Then, We can write js in perl6 directly. 19:36
guifa I’m reaching way back in my memory and there may be already libraries that have generalized it but I remember reading an article ages ago that Sun’s Calendar class for Java handled the most stuff — that is leap years, dates that time zones started/ended, even down to the differences in calendar dates between say Spain and England of the 1600s (when they were a few days off). 19:37
sena_kun well, as far as I know, it handles time zones, leap years, leap seconds, don't know about England and Spain though, it needs some examples so we could try it out in Perl 6 and see how it'll go. 19:38
guifa The only date I know off the top of my head that’s same-date-different-day is April 22/23rd, 1616, which is Cervantes/Shakespeare’s date of death (Shakespeare’s is assumed, so some just say they died on the same day for poetic-ness) but they were more than a week apart at the time 19:41
sena_kun and how the test will look like? 19:42
pmurias xinming: wouldn't a javascript grammar in Perl 6 allow reading js rather the writting it from Perl 6?
guifa sena_kun You’d input a date for one area and the other and check an 19:52
guifa if they’re equal. Although actually now that I’m looking at it in more detail (it’s not something I deal with despite being a medievalist) it’s just that England was on the Julian calendar longer 19:53
sena_kun m: DateTime.new(year => 1616, month => 4, day => 22).say; 19:53
camelia 1616-04-22T00:00:00Z
sena_kun and then you probably want to play with time zones. 19:54
guifa I think P6 only does Gregorian ATM, but if we implemented ICU I believe it can handle converting between Gregorian and Julian types 19:57
(and ethiopic, hebrew, etc)
Admittedly fairly low on the list of priorities
cpan-p6 New module released to CPAN! XDG-BaseDirectory (0.0.10) by 03JSTOWE 20:29
adu nice 20:48
Geth perl6-most-wanted: alabamenhu++ created pull request #45:
reference extant work
22:18
Xliff_ \o 23:01
SmokeMachine m: use NativeCall; class Msg is repr<CStruct> { has uint16 $.bla }; "./bla".IO.open(:bin).write: nativecast(Str, Msg.new: :bla(179)).encode: "ascii" 23:11
camelia Malformed UTF-8 at line 1 col 1
in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 685
in block <unit> at <tmp> line 1
SmokeMachine how an I do this? ^^ 23:12
*can
SmokeMachine m: use NativeCall; class Msg is repr<CStruct> { has uint16 $.bla }; say nativecast(Str, Msg.new: :bla(179)) 23:13
camelia Malformed UTF-8 at line 1 col 1
in sub nativecast at /home/camelia/rakudo-m-inst-2/share/perl6/sources/947BDAB9F96E0E5FCCB383124F923A6BF6F8D76B (NativeCall) line 685
in block <unit> at <tmp> line 1
SmokeMachine m: use NativeHelpers::Blob; use NativeCall; class Msg is repr<CStruct> { has uint16 $.bla }; say blob-from-pointer Msg.new(:179bla), :type(Blob[int8]) 23:21
camelia ===SORRY!===
Could not find NativeHelpers::Blob at line 1 in:
inst#/home/camelia/.perl6
inst#/home/camelia/rakudo-m-inst-2/share/perl6/site
inst#/home/camelia/rakudo-m-inst-2/share/perl6/vendor
inst#/home/camelia/rakudo-m-ins…
Xliff SmokeMachine: What are you trying to do? 23:25
yoleaux 2 Mar 2019 14:48Z <timotimo> Xliff: is there anything much missing to getting gtk_widget_get_window and GDK_WINDOW_XID working in GTKPlus?
SmokeMachine Im trying to write binary data from a class... 23:26
Xliff .tell yoleax timotimo: If you are having problems with GTK::Widget.get_window and GDK_WINDOW_XID, can you file an issue. I have not tested that routine sufficiently enough to know if there are any problems.
yoleaux Xliff: I'll pass your message to yoleax.
Xliff .tell timotimo\ If you are having problems with GTK::Widget.get_window and GDK_WINDOW_XID, can you file an issue. I have not tested that routine sufficiently enough to know if there are any problems.
yoleaux Xliff: I'll pass your message to timotimo\.
Xliff .tell timotimo If you are having problems with GTK::Widget.get_window and GDK_WINDOW_XID, can you file an issue. I have not tested that routine sufficiently enough to know if there are any problems. 23:27
yoleaux Xliff: I'll pass your message to timotimo.
Xliff Yeesh.
SmokeMachine Xliff: I have a class is repr<CStruct>, and want to write it on a file
Xliff Ohhh..
I don't know if binary serialization is yet a thing.
SmokeMachine Xliff: so, you think Ill need to write a C code to do that? 23:28
Xliff SmokeMachine: Yeah. That's probably for the best. 23:29
SmokeMachine :(
Xliff SmokeMachine: Yeah. Feel you there. 23:58
Adding something like that to NativeCall (or even another module) might not be a bad idea.
Something as simple as writestruct(void *Struct, size_t size) and the corresponsing readstruct shouldn't be that hard. 23:59