🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:00 raku-bridge left
lembark pastebin.com/arrsha0K 00:00
tellable6 hey lembark, you have a message: gist.github.com/507c5ef7686bceea8d...f0994ecb24
00:01 raku-bridge1 is now known as raku-bridge
lembark Havn't seen the path recently, whatever it was must have been fixed. 00:02
Checking FindBin, Filesystem::Parent, FindBin::libs: all of them pass with 2020.05: pastebin.com/arrsha0K 00:03
If I'm missing a test or not testing something properly please warn me.
Thank you. 00:04
00:06 londoed left, londoed joined 00:20 konvertex left 00:41 KindTwo joined 00:42 KindOne left, tejr joined 00:45 KindTwo is now known as KindOne 01:05 ctilmes left 01:06 ctilmes joined 01:10 ctilmes left 01:19 brtastic left 01:35 ctilmes joined 01:39 ctilmes left 01:40 gnufr33dom joined 01:41 molaf_ left 01:53 molaf_ joined 01:59 poohman_1 joined
colomon_ err… if in some fit of over-organization I’ve nested a class in the method of another class, is there an easy/idomatic way to get at the outer method’s self object? 02:15
02:18 Doc_Holliwould left
timotimo colomon_: for that to work, classes would have to be closures, which i don't think they are? you could stash the self in a variable that's "is dynamic", though. or perhaps i'm mistaken and you can actually OUTER::OUTER::...::OUTER::<self> 02:30
colomon_ I’m trying stashing it in a variable of the outer method… though I got bogged down trying to sort out some tricky logic and haven’t tried compiling it with that change yet. 02:34
timotimo you can use role parameterization to hold on to the self 02:35
guifa even easier 02:36
for the inner method
02:36 Cabanossi left
guifa method inner(\parent: args...) { class Inner { ... } } 02:38
inside of the Inner class, you can use parent to refer to the outer class, and self to refer to the inner 02:39
02:39 Cabanossi joined
guifa m: class Outer { method foo(\parent: ) { class Inner { method bar { parent, self } }; Inner.new; } }; say Outer.new.foo.bar 02:40
camelia (Outer.new Outer::Inner.new)
guifa (sorry, indentation makes that code look MUCH cleaner)
02:41 ctilmes joined
colomon_ guifa++ # very interesting 02:42
guifa Most of the time people limit the method's invocant signature to just a Type or a :D :U definedness thing 02:43
But you can also specify the name too — there's nothing special about self, it's just the default name 02:44
timotimo double-check if it closurizes correctly 02:45
m: class Outer { has $.attr; method foo(\parent: ) { class Inner { method bar { parent, self } }; Inner.new; } }; (my $first-outer = Outer.new(:attr<one>)).foo.bar(); (my $second-outer = Outer.new(:attr<two>)).foo.bar(); $first-outer.foo.bar 02:47
camelia ( no output )
timotimo m: class Outer { has $.attr; method foo(\parent: ) { class Inner { method bar { parent, self } }; Inner.new; } }; say (my $first-outer = Outer.new(:attr<one>)).foo.bar(); say (my $second-outer = Outer.new(:attr<two>)).foo.bar(); say $first-outer.foo.bar
camelia (Outer.new(attr => "one") Outer::Inner.new)
(Outer.new(attr => "two") Outer::Inner.new)
(Outer.new(attr => "one") Outer::Inner.new)
timotimo am i testing what i think i'm testing?
i should be in bed %)
guifa It seems to work okay for me 02:48
tio.run/##XY7BCoMwEETv@Yo5CNWDOfZg...S9/P@xCOED
errr 02:49
no, it doesn't
Yeah, you'll just need to store a reference. Just use a Inner.new(parent => self ... ) 02:51
02:54 ctilmes left
guifa2 wonders why classes aren't closures. performance? 03:00
03:01 holyghost joined 03:04 poohman_1 left 03:05 poohman_1 joined 03:08 farcas1982regreg joined 03:10 stoned75_ left 03:11 londoed left 03:37 mowcat joined 03:42 mowcat left 04:14 xinming_ left, xinming_ joined 04:38 molaf_ left 04:57 zacts joined 05:01 stoned75 joined 05:09 poohman_1 left, poohmaan joined 05:36 poohman_1 joined 05:39 poohmaan left 05:40 sjm_uk joined 06:15 brtastic joined 06:20 jjmerelo joined, Itaipu left 06:23 abraxxa joined 06:27 abraxxa left 06:28 brtastic left
moritz closures can't be introspected 06:28
06:30 abraxxa joined 06:31 kensanata joined, poohman joined 06:34 poohman_1 left 07:00 Doc_Holliwould joined 07:02 brtastic joined
guifa moritz++ aah okay 07:02
07:10 jjmerelo left 07:23 PavelB joined 07:24 Manifest0 left 07:27 Manifest0 joined 07:28 stoned75 left 07:31 pecastro joined 07:33 dakkar joined 07:37 gnufr33dom left 07:39 jjmerelo joined 07:42 rindolf joined 07:58 Altai-man_ joined 08:09 benaiah` joined 08:11 Woodi_ joined 08:13 agentzh_ joined, agentzh_ left, agentzh_ joined 08:15 BucciaratiVEVO joined, spacebat1 joined, Bucciarati left, spacedbat left, tony-o left, benaiah left, benaiah` is now known as benaiah 08:16 camelia joined 08:17 mniip joined, sena_kun joined 08:18 Altai-man_ left
moritz classes have the whole meta object layer 08:24
code will get a meta layer with a user-exposed AST and macros
08:25 zacts left 08:26 zacts joined 08:34 BucciaratiVEVO is now known as Bucciarati 08:41 Itaipu joined 08:46 Itaipu left 08:53 bigwiz joined 08:54 bigwiz left
abraxxa is rakudo.org unmaintained? 08:54
it still lists 2020.02.1 in the Downloads section and @perl6org Twitter feed unter Community
or wasn't that renamed? 08:55
moritz it was
09:05 Itaipu joined
moritz I've pushed a commit to fix the twitter handle to the perl6/rakudo.org repo. No idea if that's still the primary source, and if it's updated automatically 09:15
09:22 stux|RC joined 09:23 jjmerelo left, Itaipu left 09:27 Itaipu joined 09:30 cpan-raku left, cpan-raku joined, cpan-raku left, cpan-raku joined, konvertex joined
moritz rba: do you know that? ^^ 09:32
09:32 PavelB left 09:34 zacts left 09:35 zacts joined 09:49 jjmerelo joined 09:52 farcas1982regreg left, natrys joined
rba moritz: "should" update automatically. Will check now why it doesn't. 09:53
tellable6 2020-05-08T10:05:47Z #raku-dev <AlexDaniel> rba colabti.org/irclogger/irclogger_lo...-05-08#l41
09:57 bazzaar joined
abraxxa moritz: thanks! 10:01
rba looks better now. In case autoupdate is stuck again, please let me know... 10:04
abraxxa the mailing list is still named 'perl6-users'? 10:05
moritz seems like
abraxxa alerts.perl6.org/ has an expired cert 10:06
linked under 'Issue Tracker'
10:09 rindolf left
bazzaar o/ raku 10:11
sena_kun bazzaar, o/ 10:13
10:16 Altai-man_ joined
bazzaar I just upgraded to the 2020.05.1 point release, expecting to have to re-install all the modules that I'd installed on top of 2020.05 (a few hours before), but zef list find them all so am I correct to assume they don't need to be re-installed? 10:17
Altai-man_ bazzaar, they don't need to be. They will be recompiled if necessary, though, so running some code for the first time might be unusually slower, but on the second time when precompilation is done it'll be faster. 10:18
10:19 sena_kun left
bazzaar Altai-man: thanks for your guidance 10:20
maybe on a related note, is anyone getting a build error installing Digest::SHA256::Native 10:21
10:23 aborazmeh joined, aborazmeh left, aborazmeh joined
Altai-man_ bazzaar, installed just fine on my linux box, can you provide a log please? 10:24
10:27 chloekek joined
bazzaar Altai-man: here's a gist of the zef --verbose install output (gist.github.com/bazzaar/c0d1a7c6bc...c2727e27b) is that sufficient? 10:42
I just updated the gist with the raku -v info 10:47
10:47 mowcat joined
Altai-man_ bazzaar, I'd create a bugreport about this for the module 10:47
bazzaar, created one - github.com/bduggan/p6-digest-sha25...e/issues/2 10:49
bazzaar, thanks for reporting!
bazzaar Altai-man:thanks, you beat me to it :-) my one finger typing is so slow :-) 10:51
10:51 ctilmes joined
timotimo abraxxa: looks like the entirety of alerts.perl6.org is down, and alerts.raku.org not set up yet 10:54
11:07 chloekek_ joined 11:11 chloekek left 11:14 rindolf joined 11:21 Benett left 11:23 Benett joined
abraxxa timotimo: thanks for checking! 11:25
timotimo i just removed the s from https :D 11:30
poohman m: grammar test { regex TOP {<key>\:<value>}; regex key {\V*};regex value {\V*};}; my $a = test1.parse("name:winnie");say $a<key>;my $c="key";say $a<$c>; 11:44
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
test1 used at line 1
poohman m: grammar test { regex TOP {<key>\:<value>}; regex key {\V*};regex value {\V*};}; my $a = test.parse("name:winnie");say $a<key>;my $c="key";say $a<$c>;
camelia 「name」
Nil
poohman hello all 11:45
what should I do to $c to get it working within <>?
jnthn The $c isn't the problem, it's that the <...> form is for literal keys. Use $a{$c} 11:50
poohman ok thanks jnthn 11:51
lizmat poohman: remember, curlies indicate there's code inside
< > indicate quoted words 11:52
poohman m: grammar test { regex TOP {<key>\:<value>}; regex key {\V*};regex value {\V*};}; my $a = test.parse("name:winnie");say $a<key>;my $c="key";say $a<$c>;say $a"key"; 11:53
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3ay $a<key>;my $c="key";say $a<$c>;say $a7⏏5"key";
expecting any of:
infix
infix stopper
postfix
statement e…
poohman m: grammar test { regex TOP {<key>\:<value>}; regex key {\V*};regex value {\V*};}; my $a = test.parse("name:winnie");say $a<key>;my $c="key";say $a<$c>;say $a{"key"};
camelia 「name」
Nil
「name」
poohman thanks 11:54
jjmerelo So 12:00
m: sub foo( $bar, :$n) { return "$bar and $n" }; foo( "Hey" ):n
camelia ( no output )
jjmerelo m: sub foo( $bar, :$n) { return "$bar and $n" }; say foo( "Hey" ):n
camelia Hey and True
jjmerelo Did everyone know this? That you can use named arguments _as adverbs_? 12:01
m: sub foo( $bar, :$n) { return "$bar and $n" }; say foo( "Hey", :n)
camelia Hey and True
jjmerelo m: sub foo( $bar, :$n) { return "$bar and $n" }; say foo( "Hey" ):!n 12:02
camelia Hey and False
12:05 Doc_Holliwould left
jnthn Adverbs are passed as named arguments in general, and postcircumfix:<( )> is a fancy postfix in the same way array indexing is. 12:06
That said, even though it's possible and makes sense that it would work for the sake of consistency, I've still not found a situation where I'd actually do this :) 12:07
jjmerelo It's used in Data::StaticTable
It needs to be documented, I guess. 12:08
I thought it was actually applying an adverb to the result of the method.
github.com/shinobi/Data-StaticTabl....t#L34-L40 12:09
jnthn Cute, I guess :) 12:11
12:13 aborazmeh left, natrys left 12:17 sena_kun joined 12:18 Altai-man_ left
[Coke] . 12:33
12:34 lembark left 12:35 ctilmes left
tigerpaws Good morning. I've been reading the advent calendars from the beginning; they are fascinating. Thanks to you all. 12:44
sena_kun \o/ 12:46
moritz tigerpaws: you're welcome :D 12:48
tigerpaws I see perlcabal mentioned several times in the advent calendars, but it no longer exists. Does anyone know where it's gone? 13:00
13:02 caterfxo left, jjmerelo left, farcas1982regreg joined
moritz hard to tell due to the different nicknames in the different media 13:04
tigerpaws What I saw at perlcabal.org/syn/ were mentions of the perl6 synopsis, which I understand are the detailed specs. 13:05
[Coke] cabal was a loose org of people. It is, so far as I know, no longer a thing. 13:06
13:09 telex left 13:10 telex joined
tigerpaws Thanks. I was just trying to follow some links in old (2010) advent calendar articles. 13:11
13:13 mahafyi joined
Geth doc: 0143a7cb90 | Coke++ | doc/Type/Mu.pod6
.perl to .raku
13:35
doc: ecfee5bcfa | Coke++ | xt/code.pws
new code example word
doc: 4a3569ebcf | Coke++ | doc/Language/regexes.pod6
typo
linkable6 Link: docs.raku.org/type/Mu
linkable6 Link: docs.raku.org/language/regexes
Geth doc: coke assigned to stoned Issue xt/routine-definitions.t failures github.com/Raku/doc/issues/3390
coke unassigned from stoned Issue xt/routine-definitions.t failures github.com/Raku/doc/issues/3390

learn new code snippet
14:01
14:03 zacts left 14:06 gnufr33dom joined 14:16 Altai-man_ joined, gnufr33dom left 14:19 sena_kun left 14:25 gnufr33dom joined
poohman hello - if a variable has nil value, then I can check using defined. Can "any" also be checked with defined? 14:30
timotimo assigning Nil to a variable will reset it to its default value, which for variables without a given type will be "Any", i.e. the any type object 14:31
Any will have .defined be False
poohman thanks timotimo 14:32
robertle I am confused about the JS backend: is it meant to run in a browser eventually, or is it meant to be like the moar and java backends for actual computers, just using a JS engine? 14:33
poohman but sometimes for example when a Grammar has not match - I can see Nil printed - is Nil the default value for grammars?
moritz the default value for failed matches
timotimo robertle: the js backend already runs in a browser, as well as node
[Coke] It is runnable in a browser today (there's a URL somewhere that showcases this). if you want to run it locally on top of node, I recommend using the npm package to install it rather than trying to build it from the repo
robertle ok, great. I somehow missed the browser part and could only see the node part. browser is what I am after... 14:34
poohman thanks 14:35
timotimo perl6.github.io/6pad/ 14:37
surprisingly hard to find, haha
loading rakudo.js takes a little while, though when you first hit execute 14:38
14:39 cpan-raku left
robertle hehe, yeah. on this machine: almost forever :) 14:40
14:40 cpan-raku joined, cpan-raku left, cpan-raku joined
tadzik for me it loaded for ages, but then even the first run was fast:) 14:40
about as fast as my moar CLI, at least in eye-seconds 14:41
[Coke] can someone add that URL to the rakudo readme or someplace in the docs?
(the 6pad one) 14:42
m: say 6^..^9, 6^...^9 14:43
camelia (6 7 8)
[Coke] m: say 6^...^9
camelia (7 8)
[Coke] m: say [+] 6^...^9
camelia 15
[Coke] ^^ that last one is failing in the 6pad site.
(ah, [+] is not needed)
14:54 brtastic left 14:59 thundergnat joined
thundergnat tigerpaws: The synopsis (used to be perlcabal) are still available: design.raku.org/ Be aware, they are out-of -date and are mostly of historical interest. 15:01
15:01 thundergnat left 15:20 brtastic joined 15:23 molaf joined 15:26 __jrjsmrtn__ joined, _jrjsmrtn left 15:29 caterfxo joined
lizmat yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2020/05/11/2020-...e-release/ 15:36
tigerpaws thundergnat: Thanks, I'll have a look, with the understanding they are out of date. 15:41
tellable6 tigerpaws, I'll pass your message to thundergnat
15:48 sour joined
[Coke] .tell vrurg - there a several cases in Test::Async where it's and its usage needs to be updated - it looks like the docs are duplicated in two places in the repo. Where should a PR focus on? 15:52
tellable6 [Coke], I'll pass your message to vrurg
16:02 farcas1982regreg left 16:04 farcas1982regreg joined 16:10 girafe2 left 16:13 melezhik joined 16:16 patrickb joined 16:17 sena_kun joined 16:18 xinming_ left, Altai-man_ left 16:20 xinming_ joined
vrurg [Coke]: sorry, what do you mean with 'focus'? 16:22
tellable6 2020-05-11T15:52:24Z #raku <[Coke]> vrurg - there a several cases in Test::Async where it's and its usage needs to be updated - it looks like the docs are duplicated in two places in the repo. Where should a PR focus on?
SmokeMachine m: multi trait_mod:<is>(Attribute $attr, :&bla!) {say 42}; role :: { has $.a is bla{;} } 16:23
camelia ===SORRY!===
Cannot invoke this object (REPR: Null; VMNull)
[Coke] vrurg: where do I make the changes? I assume you are generating the .md or the .rakudoc files, but I don't know which 16:24
I hestitate to make the same changes blindly in both 16:25
vrurg [Coke]: rakudoc is the source.
[Coke] also, the README has "testing testing" which could be correct but reads like a duplicate word.
vrurg: ok.
tigerpaws m: say 6^...^9
camelia (7 8)
16:27 mowcat left, chloekek_ left, jjmerelo joined
vrurg [Coke]: right, 'testing testing' and then 'tested' later... Frankly saying, I wrote it in write-only mode, without proofreading due to lack of time. 16:27
[Coke]: and thank you!
jjmerelo Did I hear rakudoc?
vrurg jjmerelo: don't worry, it was about file extension :) 16:29
jjmerelo goes back to cave
vrurg jjmerelo: BTW, I saw notifications. Will look into is-run vs. is_run later today. I used is_run in a test or two, so it's usable.
vrurg is afk for a while 16:30
jjmerelo vrurg I know, but it's probably not worth the trouble to port the current code to it. We can simply call it some other way, since it's got a different signature and all. 16:31
tigerpaws @[Coke]: why is 6^...^9 working here but not in 6pad or my own copy of rakudo 6.d: ===SORRY!=== Error while compiling: 16:32
Malformed postfix call
------> say 6^...^⏏9;
I've tried with or without spaces around the ^. No dice. 16:33
MasterDuke i think ^...^ was just recently implemented
committable6: all say 6^...^9 16:34
16:34 dakkar left
committable6 MasterDuke, gist.github.com/dd6a89167e1e60ce02...5c9f21d3a6 16:34
MasterDuke introduced after 2020.02.1 16:35
tigerpaws Ah. That makes sense. No wonder. Thanks. So the rakudo running here is basically the raw latest commits? 16:36
Very cool!
timotimo you can run any version that successfully compiled using committable6 16:38
MasterDuke usually, it mentions the commit hash in its response
tigerpaws I see. I noticed the hash id, but hadn't figured out what it refers to. I learn so much lurking in this channel. 16:39
16:46 lembark joined 16:59 chloekek joined 17:04 patrickz joined 17:05 patrickb left 17:10 farcas1982regreg left, guifa left 17:20 Itaipu left 17:21 farcas1982regreg joined 17:23 kensanata left 17:28 girafe joined 17:40 sour left 17:44 sour joined 17:45 sour left
konvertex Do we have a short equivalent to ruby's enumerable#cycle in the stdlib? Something that repeats elems of a seq forever/up to n times? [1,2].cycle => 1,2,1,2,... 17:55
17:55 Dwarf joined
[Coke] m: say [1,2] x Inf 17:56
camelia Cat object not yet implemented. Sorry.
in block <unit> at <tmp> line 1
17:56 Itaipu joined
Dwarf Hello, I'm venturing into the world of raku and decided to start with a simple dice roll parser to learn grammars. I want to say I've come decently far except for the fact that it doesn't actually match anything. Any pointers are welcome: p.bcome.nl/?33b5ba5828cde1da#xxv2Q...Drxtm+0gM= 17:57
jnthn m: say [1,2] xx Inf
camelia (...)
jnthn m: say ([1,2] xx Inf)[^10]
camelia ([1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2] [1 2])
jnthn m: say (|[1,2] xx Inf)[^10]
camelia (1 2 1 2 1 2 1 2 1 2)
konvertex Sweet, thanks a lot!
[Coke] jnthn++ 17:58
lizmat m: slip(1,2) xx * # perhaps better readable 18:02
m: dd slip(1,2) xx * # perhaps better readable
camelia (timeout)
(1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2…
[Coke] lizmat++ 18:03
18:04 Doc_Holliwould joined 18:08 ctilmes joined
ctilmes I know I'm a bit over my head here, but I'm trying to use nqp to do stuff I know I'm not supposed to. I can define a native 'str' in a CStruct, then nqp::bindattr_s() a string into it and that works fine. 18:10
But how do I make it a NULL pointer? I can't bind a type object into it
18:12 jjmerelo left
jnthn ctilmes: Maybe bind nqp::null_s 18:13
lizmat ctilmes: you may also find github.com/Raku/nqp/blob/master/do...s.markdown enlighting 18:14
[Coke]++ for keeping that up-to-date
cpan-raku New module released to CPAN! Date::Calendar::FrenchRevolutionary (0.0.5) by 03JFORGET 18:15
New module released to CPAN! Cro::HTTP::Session::Pg (0.1) by 03JNTHN
18:16 Altai-man_ joined
timotimo `use I::Solemny::Swear::I::Am::Up::To::No::Good;` 18:17
ctilmes jnthn, lizmat: Thanks -- that's perfect, it works the way I want it to. 18:18
[Coke] lizmat: oh, only barely. so much left. :)
18:18 sena_kun left
konvertex lizmat: thanks for the that slip variant, but (|@freqs xx Inf).produce(* + *)... is fine. Doing advent of code atm and simply wanted to match d's freqs.cycle.cumulativeFold!"a+b"... 18:21
18:22 sauvin left 18:23 abraxxa left 18:24 abraxxa joined 18:31 cognomin_ joined 18:33 cognominal left 18:34 cognomin_ left 18:35 cognominal joined 18:37 robertle left 18:38 robertle joined
jdv79 anyone know why the currency "symbol" for the uae dirham copies backwards? 18:38
is that some sort of unicode left vs right read thing?
18:52 patrickz left, rindolf left 18:53 daxim joined 19:12 holyghost left, holyghost joined 19:14 veesh left 19:15 veesh joined 19:17 veesh left 19:19 veesh joined, TeamBlast joined 19:20 ToddAndMargo joined
jdv79 should it be easy to call strfmon_l() with NativeCall? 19:20
ToddAndMargo Anyone on newbie duty? Is there a module for Windows that would allow me to create a fill in form? City, state, etc, you fill in the blanks? 19:22
19:27 mowcat joined 19:31 stoned75 joined 19:42 lichtkind joined 19:45 sjm_uk left 19:53 Marcool joined
Marcool Hi all! 19:54
github user alabamenhu isn't here by any chance are you?
MasterDuke Marcool: i believe that's guifa2 19:55
guifa2 That's me 19:56
Marcool oh hi!
ctilmes jdv79: possibly -- if you need variadic, it is more complicated. If you need multiple architectures it is more complicated.
Marcool I posted an issue on github for LanguageTag the other day
Mark
guifa2 grumbles about someone having taken 'guifa' on github
Marcool :D
ctilmes jdv79: if you just hard code the specific list of args/types you are calling it isn't bad
Marcool I'm still trying to get Fluent to work and just can't get my head around this one test failure I'm seeing 19:57
guifa2 Marcool : I can take a look at it in a min for you 19:58
what's the error it's giving?
guifa2 hasn't worked on Fluent in a while, sadly 19:59
Marcool well it's related to the signature of plural-count
tbrowder hi, all
Marcool which is a sub exported by Intl::CLDR
we're talking about test 2 of t/03-Selectors.t (in Fluent) 20:00
tbrowder any idea why DateTime.local shows the TZ offset?
Marcool guifa2: I'll post a pastebin gime a sec 20:02
tbrowder it should show "local" time, e.g.: yyyy-mm-ddThh:mm:ss.ss
guifa2 tbrowder that's the default .Str for all DateTime objects
.local just returns another DateTime object with the timezone set differently 20:03
Marcool guifa2: here it is: framabin.org/p/?f9eb8e00b8a333da#B...GDHaNFJUY=
tbrowder hm, in my prog with no formatter i'm getting an offset...but let me double check again...back in a mo 20:04
20:06 konvertex left
tbrowder nope. with the latest raku, i get the tz offset 20:07
in either case, local or not
m: say DateTime.now 20:08
camelia 2020-05-11T22:08:06.372000+02:00
tbrowder m: say DateTime.now.local
camelia 2020-05-11T22:08:32.021644+02:00
tbrowder makes no sense to me 20:09
MasterDuke committable6: 2020.02.1 say DateTime.now; say DateTime.now.local
committable6 MasterDuke, ¦2020.02.1: «2020-05-11T22:09:05.512677+02:00␤2020-05-11T22:09:05.515432+02:00␤»
guifa2 Marcool hmm, I probably just need to adjust either Fluent or Intl::Plurals to coerce to an Int it seems like.
MasterDuke committable6: 2020.01 say DateTime.now; say DateTime.now.local
committable6 MasterDuke, ¦2020.01: «2020-05-11T22:09:47.518958+02:00␤2020-05-11T22:09:47.524534+02:00␤»
guifa2 Once I'm done with lunch I should be able to fix it fairly quickly
Marcool guifa2: oh it's the Int is it? I was trying to fix it and though it had to do with the Str/LanguageTag part… 20:10
guifa2: please, eat your lunch :)
20:11 konvertex joined
guifa2 but also, I haven't touched Fluent in a while and have made a lot more changes to the Intl:: library since then, so there may bee some interfacing disconnect there 20:11
tbrowder i want to file an issue but not if i'm misunderstanding local
tobs tbrowder: dealing with datetimes is prone to misunderstandings everywhere :-) 20:13
guifa2 tbrowder: a DateTime is naturally created with the timezone set to $*TZ
20:13 tomaw left, tomaw joined
guifa2 .local converts a DateTime to give the equivalent time using $*TZ 20:14
which might make you think that .local is useless and for most users it probably is
tbrowder yes, but at least i should have an adverb to chop off the offset. i shouldn't have to write a formatter
guifa2 you really should use a formatter for it, though. And even better, use Intl::Format::DateTime so it's localized 20:16
20:17 sena_kun joined
tbrowder i use :truncate-to and that doesn't chop it either 20:18
ay, yr module is it? i wasn't aware of it
20:18 Altai-man_ left
guifa2 again, it hasn't been touched in a bit but that's what I was working on the most before I had to pause back in Nov or Dec, but the date formatting for gregorian dates should be okay (slash, bug report if they're not) 20:20
tbrowder i'll check it out. thnx
20:26 brtastic left
tbrowder guifa: haven't found the module yet. not in modules, not on yr github acct, i must be blind 20:32
20:33 chloekek left 20:34 stoned75 left
tbrowder ok, given i have to live with the offset, is there 20:34
forget that ff, pls ^^^ 20:35
20:35 Marcool left 20:37 Marcool joined 20:40 farcas1982regreg left
tbrowder i've learned to live with the offset now...thnx 20:41
rypervenche What would be the best way to do a search and replace on all values in a Hash? I know I could write a loop to do a substr on each key, but is there a more efficient way to do this?
20:48 guifa joined
guifa Alright, on main computer, let's see what's going on 20:48
guifa2 tbrowder: it's a sub module in Intl::CLDR, sorry I should have mentioned that
I actually started out making Intl::CLDR so that I could handle plurals in Fluent, the project ballooned a bit and I'm working on reorganizing stuff slowly but surely 20:50
Marcool guifa2: I'm happy to help, honestly I've tried to figure out where that test failure is coming from but the code base is a bit too wide for me to get exactly what's doing what in a few hours 20:54
guifa2: (oh sorry, you were talking about the DateTime issue…)
Geth doc: 8e14dfb9b1 | Coke++ | 3 files
.raku to .perl

  (mark it ok where it is)
Part of #3309
21:02
linkable6 DOC#3309 [open]: github.com/Raku/doc/issues/3309 [docs][update] Change .perl to .raku in examples
21:02 ToddAndMargo left 21:06 melezhik left
guifa Marcool I am working on it, just realized I've got a buggy CLDR install, fixing that first 21:08
21:11 lumin left 21:12 lumin joined
guifa . o O ( this is why I hate having to take a sudden break from coding ) 21:13
21:25 natKAT joined
guifa Hrm, the only thing I can think of right now is that when I renamed stuff from Intl::BCP47 to Intl::LanguageTag for some reason it's catching it as being two distinct classes 21:27
21:27 natKAT left
guifa So the issue was in CLDR, not in Fluent 21:27
Marcool check out the newest version of CLDR on github, I think that should work 21:34
21:43 mowcat left
[Coke] if I wanted to do something with a GUI that had a prayer of working on win/mac/linux in raku, any pointers? 21:44
... (rakudo.js, probably? :)
or Cro. hurm.
timotimo yeah, cro, or be bold and Inline::Python into Qt 21:45
[Coke] webapp might be the way to go. :|
Grinnz always webapp :) 21:46
tadzik I've had good recent experiences with Gtk for cross-platformness recently, though not in Raku 21:47
Grinnz i have two driving reasons to never bother with any desktop toolkits - i already know how to throw bootstrap in my web apps, and i can be reasonably certain it will still look right in windows and on phones 21:49
and decent even, not just "right"
the other reasons are mostly selfish :) 21:50
timotimo well, we do have GTK::Simple and Simpler i think
and we did build some DLLs for windows
nothing for macos, though
guifa adds rakudo.js to his list of things to learn this summer 22:01
22:06 girafe left 22:09 bazzaar left
Marcool guifa: looks like you're got a stray "use lib ../../../" in Intl::CLDR file lib/Format/DateTime.pm6 22:12
22:15 girafe joined
guifa Marcool was it still able to compile? If not, I'll reupdate 22:16
22:16 Altai-man_ joined
Marcool guifa: the same plural-count error is showing up in the 04-Functions.t test now, first test… 22:16
22:16 vike1 joined
timotimo huh, when you include that file, it'll go off of the PWD, won't it? 22:16
Marcool guifa: framabin.org/p/?10239ba64a894852#p...erlQYW7x4= 22:17
timotimo so if you are in /home/marcool and -I ThatFolder -MIntl::CLDR, it'll go off and read out the entirety of your filesystems to build a hash
Marcool timotimo: I removed that line from guifa's code :) 22:18
22:19 sena_kun left, vike left
Marcool (I meant to write "looks like you'Ve got"…) 22:21
guifa Marcool ah crap. I think at one point in time the plural-count() function defaulted to the current user language
weird that that error iddn't point up when I tried to do a zef install
didn't pop*
Marcool right that makes sense 22:23
not sure how the tests passed though :/
I get tripped up when I'm messing with modules between what's installed and what's in cwd sometimes when running tests
I suppose one should "zef uninstall .; zef install ." 22:24
guifa Yeah I'm guilty of the same 22:25
Marcool you sure have a sence of aesthetics in your code, I love it, example : github.com/alabamenhu/Intl-CLDR/bl...ime.pm6#L7 22:27
:
:D
guifa so for some reason it's not getting the number pattern correctly for AS. Let me see if I can figure out what's going on 22:29
Definitely an issue in CLDR and not Fluent — the same callworks okay with EN or AR 22:30
Yup. Confirmed. It's a problem it seems in the fallback code. 22:32
So you should be okay testing it for now with EN/AR/ES etc but I'll try to track down the CLDR fallback issue 22:33
22:33 Kaiepi left 22:34 Kaiepi joined 22:35 Kaiepi left, Kaiepi joined 22:36 xinming_ left 22:37 xinming_ joined, Benett left, Benett joined
guifa Bingo found it 22:43
In META6.json for some reason all of the language alias data files weren't present
And root.data is ahem, kind of the most important
Marcool guifa: ahah
I've force-test installed it, and now have this on first call to localized():
Use of uninitialized value %result{'resources/localization/en.ftl'} of type Any in string context.
have I messed up the resource file thing somehow? 22:44
that file definitely exists…
(from cwd, I'm just testing from a plain raku prompt, use Fluent; add-localization-basepath('localization/', :resource); add-localization-languages('en', 'fr'); say(localized 'example' ); 22:45
guifa Ah
don't use :resource
that's for modules only
Marcool okay!
works :D
guifa (you access module resource files differently from disk files, so I had to add the option)
Marcool that makes sense 22:46
I had it there 'cos I'm trying to write this as a module
guifa All these CLDR data files are autogenerated, I think I should finally write a META6.json autogenerator lol
Marcool it's a lot of great work anyhow thanks for taking the time to debug as I asked! 22:47
22:48 Altai-man_ left
guifa No, seriously, thanks for kicking my but in gear to fix this stuff. I'm supposed to present on this in June for the P&R CitC so.... needs to be updated and functioning :-) 22:50
Marcool I'm sure it will be :-) thanks for all the work 22:52
guifa I need to do a pretty heavy overhaul of the Fluent code, btw. They've updated the standard a little bit, although they've done good at keeping syntax changes up to date. 22:53
and no breaking
non*
Marcool there are a few "deprecation" warning in the tests too, but you seem to have coded them so not sure what they're about... about the .type method that should be a .valid ? 22:56
guifa Yeah. LanguageTag has also been in a state of overhaul :-)
I'm probably going to focus on finishing that one out, since it's kind of the most important of the modules since everyone things else depends (literally and figuratively) on it 22:57
Marcool ok I need to sleep some now! have a good (rest of your) day all! 23:01
cheers guifa!
23:02 Marcool left
Geth ¦ doc: tbrowder self-assigned Better document use of '$' in forma github.com/Raku/doc/issues/3394 23:06
23:11 MasterDuke left 23:27 pecastro left 23:32 ctilmes left, lichtkind left 23:36 mahafyi left, lembark left 23:40 farcas1982regreg joined