|
This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
|
00:02
deoac joined
01:33
razetime joined
01:58
deoac left
02:40
razetime left
02:53
habere-et-disper left
03:29
MasterDuke joined
03:45
Kaipei joined
04:49
codesections left
04:57
frost joined
05:34
Heptite left
06:04
frost left
06:05
frost joined
08:09
frost left
09:00
andrea[m] left
09:26
razetime joined
09:47
Kaipei left
09:50
razetime left
10:16
frost joined
10:51
habere-et-disper joined
10:53
Kaipei joined
|
|||
| habere-et-disper | m: say '⑩'.uniname.words.tail.lc | 10:54 | |
| camelia | ten | ||
| habere-et-disper | m: say ('①'..'⑩').map: *.uniname.words.tail.lc | ||
| camelia | (one two three four five six seven eight nine ten) | ||
| habere-et-disper | m: say (①..⑩).map: *.Str.uniname.words.tail.lc | ||
| camelia | (one two three four five six seven eight nine one) | ||
| habere-et-disper | WHY? | 10:55 | |
| lizmat | why what ? | ||
| habere-et-disper | Why does the last range give one in the tail instead of ten? | ||
| m: say (①..⑩).map: *.Str.uniname.words.tail.lc | 10:56 | ||
| camelia | (one two three four five six seven eight nine one) | ||
| Nemokosch | indeed lol | ||
| oh okay, I have an idea | 10:57 | ||
| 10.uniname might not be such a good idea to call | |||
| and that's essentially what happened | |||
| docs.raku.org/routine/uniname | 10:58 | ||
| habere-et-disper | Okay -- thanks! | ||
| Nemokosch | > Interprets the invocant or first argument as a Str, and returns the Unicode codepoint name of the first codepoint of the first character. | ||
|
10:59
Nemokosch joined
|
|||
| Nemokosch | say (①..⑩).map: *.Str.uninames.words | 11:00 | |
| m: say (①..⑩).map: *.Str.uninames.words | |||
| camelia | ((DIGIT ONE) (DIGIT TWO) (DIGIT THREE) (DIGIT FOUR) (DIGIT FIVE) (DIGIT SIX) (DIGIT SEVEN) (DIGIT EIGHT) (DIGIT NINE) (DIGIT ONE DIGIT ZERO)) | ||
|
11:01
Nemokosch left
|
|||
| habere-et-disper | (It's the Str which undoes the unicode.) | 11:01 | |
| Fair enough. | |||
| Nemokosch | no, it's not, I think | ||
| ①..⑩ itself just returns 1..10 | 11:02 | ||
| these are legitimate numbers | |||
| lizmat | right, they're *numbers*, not *digits* | 11:03 | |
| habere-et-disper | Is this a bug then? | 11:05 | |
| lizmat | no, it's behaviour defined by the Unicode standard | 11:07 | |
| habere-et-disper | Okay, whew! :-) | 11:08 | |
| Nemokosch | I think if there is anything that can confuse you, it's that numbers may be entered in several ways in Raku (one of them being ⑩) - but they can only have one .Str representation and that's always gonna be the good old Arabic | 11:10 | |
| so the moment you entered ⑩ as a number, you lost it as a string | |||
| lizmat | m: say ⑩.^name | ||
| camelia | Int | ||
| habere-et-disper | Thank you for clarifying @Nemokosch! Helpful. | 11:12 | |
| Nemokosch | if you need it as a string, well, keep it in a string rather than a numeric literal 😛 | ||
| 🍬 | |||
| lizmat: is there possibly a way to specify what representation of a number you'd like to get? | 11:14 | ||
| lizmat | coerce it? | ||
| m: dd ⑩.Num | 11:15 | ||
| camelia | 10e0 | ||
| Nemokosch | I mean non-arabic systems and possibly these funky unicodes | 11:16 | |
| my gut feeling is that this is more up to modules | 11:18 | ||
| lizmat | ah, like that... hhmm... definitely module space | 11:29 | |
| probably in the I18N:: namespace ? | |||
| Nemokosch | hm, could be, I don't know one | 11:57 | |
|
12:29
frost left
12:37
habere-et-disper left
12:58
frost joined
13:23
frost left
|
|||
| guifa_ | Intl::Format::Number | 14:01 | |
| an module which I am actually updating *as we speak* | |||
| lol | |||
|
14:09
frost joined
|
|||
| guifa_ | (trying to add support for "compact numbers". So `format-number 12345, :length<short>` will produce "12 K" and :length<long> will produce "12 thousand". I don't find those as useful, both if I'm doing all the work to update for RakuAST, might as well go ahead and do the standard to a T | 15:01 | |
|
15:11
Heptite joined
15:48
guifa_ left
16:49
guifa joined
17:26
Kaipei left
17:28
Kaipei joined
|
|||
| Nemokosch | this module fails to install for me due to test errors | 18:45 | |
| Anton Antonov | How can I get the body of a function? Or regex. | 18:47 | |
| lizmat | you mean the source? | 18:48 | |
| Anton Antonov | Yes, the source. It looks like I can use .gist ... | 18:51 | |
| lizmat | that would surprise me | 18:53 | |
| Anton Antonov | Hm... I can use .gist on regexes in grammar classes. | ||
| lizmat | yeah, but normally the source of a code block is *not* kept | ||
| Anton Antonov | @lizmat Yeah, I was wrong. | ||
| lizmat | you could do find out the filename and line number | 18:54 | |
| and read the file and lines and look for the end of the code block, I guess | |||
| Anton Antonov | @lizmat Ok, that is doable. | 18:55 | |
| lizmat | raku.land/zef:lizmat/Backtrace::Files has a sub "normalize-backtrace-filename" that could be of use | 18:56 | |
| Anton Antonov | @lizmat Thank you! | 19:05 | |
| guifa | Nemokosch: which one? Mine? | 19:29 | |
| it's possible, I haven't touched it in a while. What's it erroring on? If it's something simple I can maybe fix it real fast. Current update I'm working on will take a few days | 19:30 | ||
| oh yeah, that's a fairly easy fix, it's due to a small change I made in Intl::CLDR. I'll see if I can do it tonight | 19:48 | ||
| Nemokosch | TAP problems | 21:20 | |
| perhaps it's not good marketing that whenever something goes wrong with a test, some nebulous message referring to TAP shows up 😅 | 21:22 | ||
|
21:55
bigfondue left
22:03
MasterDuke left
22:27
bigfondue joined
22:46
habere-et-disper joined
23:32
Nemokosch joined
23:35
Nemokosch left
23:45
jaguart joined
23:49
Kaipei left
|
|||