🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
NemokoschKiwi m: -1 .succ.say 00:22
camelia 0
NemokoschKiwi he? :D
Nemokosch oops... 00:23
tonyo . 01:45
Homer_Simpson wanted feature (plz): 07:34
my $rawchr = `a`;
my @rawarray = `abc`; say($rawchr+2); #c
say(@rawarray[1]+5); #f
hmm my irc client removed my grave accents
basically you can do '`a`'; for a constant literal char and "`a`"; for an array of chars 07:37
you just have to escape the `` to print literally ``a`` rather than a 07:39
or the `` `` can go on the outsides of ' ' or " " 07:40
Homer_Simpson they are only null terminated if used with " " or ' ' or if its more than one character in the `` `` 07:43
Homer_Simpson grave accent is standard ascii so its on just about every keyboard 07:44
Homer_Simpson my @`buf for array, or $`chr for variable (scalar) or %`hash 07:51
oops: my @``buf for array, or $``chr for variable (scalar) or %``hash 07:52
close enough :(
Homer_Simpson oh great `` means multiline comment when used with # 08:06
well its really #` not `` or @`` or $` or %`` 08:09
I hate this fuckin irc client
Geth ecosystem/main: 85582b5baa | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Adopted and migrated to zef
08:39
Geth ecosystem/main: b23c3d88d3 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list
Last one to go

Thanks @antonio
09:18
guifa Homer_Simpson: you can write your own operator to that. It's extremely easy if you're okay with including a quote mark, a bit more complicated if you want just the grave accent and nothing more 20:51
tellable6 guifa, I'll pass your message to Homer_Simpson
Xliff just hit his 900,116th line of Raku! 23:24
guifa nice 23:26
Xliff :) 23:37
guifa: Can you read .ods files? 23:39
guifa by hand? no. But LibreOffice can lol 23:40
Xliff Heheh~! 23:41
OK, one sec.
guifa If you're looking to write a module 23:42
standards.iso.org/ittf/PubliclyAva...1_2015.zip
zip link takes you to an HTML download
page
Xliff Here's a breakdown by project... github.com/Xliff/p6-GLib/blob/main...Counts.ods
Geth ecosystem/main: d4c3619cf9 | thundergnat++ (committed using GitHub Web editor) | META.list
Migrate module to fez ecosystem
23:43
Xliff guifa: Ha! Useful that. Maybe sometime in the next couple of years. 23:45
guifa started reviewing number formatting and forgot how much of a pain in the butt the patterns are.
Xliff Unless I can get some folks to work with to do it. Tired of being a solo act.
guifa I'm not sure if there's a way to single pass parse them :-(
Xliff guifa: What? ODS sheets?
guifa No, for CLDR stuff 23:46
guifa it's going to be my first involved RakuAST project 23:46
Xliff Ah. Not well versed on those.
Ooh! Sounds fun. Now THAT I could sink my teeth into.
What spec are you working from?
guifa unicode.org/reports/tr35/tr35-numb...t_Patterns 23:47
They seem deceptively easy. And then they just throw in these things that sound like edge cases that someone came up with and they tried to shoehorn them into the standard
Xliff LOL. 23:48
guifa like they made two grouping sizes for commas, because some languages like Hindi will do 12,34,567
Xliff OK. I think I can see what you are talking about.
Um... ew.
guifa but then you read the spec and they're like "oh, but NIST requires grouping the fractional part too"
so actually there are THREE grouping sizes 23:49
Xliff So make grouping depend on the reverse position of the comma. 23:50
guifa so #,##,##0.####,# would mean group the hundred/tens/ones together, and for higher ones, group by two digits (thousand/myriad, lakh/million, ten/hundred million)
Xliff Right... so lookit. 23:50
guifa and then every fourth fractional
BUT
if you get
#,#,#,#,##,##0
you ignore all the initial commas
oh but there's a difference beteween # and 0 (0 controls for required digits, but it's undefined in the spec what #0# might mean, unless it's scientific, in which case it is, but you can't know that until you've found an E, which is a literal E unless followed by a number and… yeah 23:51
Xliff "#,####.0##,##,#", you count the #, and then if you get a "," -- you push 10 ** <count> into @groups. You can never fail.
So if you get a group of one, you have to ignore everything! 23:52
So your grouping can't be 10 * <tail>
Ah... such is life with ambiguous specs. 23:53
I used to be a business analyst. Tried it, since I couldn't find a coding job.
Hated it, but picked up some valuable skills.
guifa oh and then if the number isn't 0… it controls for required digits AND rounding lol
Xliff Yeah. Read that one. Confused me a bit.
So if the number is larger than the specified digit, you round up?
So #1 means a "12" would turn into "20" 23:54
guifa #1 would round to the nearest multiple of 1
Xliff Oh!
guifa #10 would round to the nearest multiple of 10 23:55
Xliff So #2 means a "13" would turn into "14"
guifa correct, but since it uses half even rounding… "15" would also round to 14
Xliff Yikes!
My brain says "Flea!" but that might be due to the last of the 'nog. 23:56
guifa yeah it's a mess lol. I want to use grammars to parse it but the information density I'm afraid may be too much
Xliff Grammars with code blocks are your only hope, padawan.
( Or maybe s/padawan/sensei/ ? )
guifa yeah, grammars with embedded actions would work quite nicely 23:57
because I could set values during the parse phase
Xliff Yep.
guifa unfortunately, I can't set a dynamic in token TOP and have it available in method TOP
Xliff Use a dummy rule then./
guifa hmm 23:58
I forgot about those
Xliff Set your dynamics up in TOP, then call <REALTOP>
guifa wow 23:59