🦋 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.
00:00 reportable6 left
tbrowder__ *arg, ignore all AFTER the WITHOUT 00:00
00:01 reportable6 joined 00:06 Manifest0 left 00:22 deoac left
[Coke] what version of rakudo do you have? 00:52
I'm guessing you either have a very old version or you have more stuff in the code that we're not seeing. (The @a loop works fine here on the command line) 00:54
01:04 xinming left 01:05 xinming joined 01:36 derpydoo joined 01:48 swaggboi left
tbrowder__ yep, i'm still looking, very ugly stuff... 02:03
02:13 teatime joined 02:15 tea3po left, teatwo left, teatwo joined 02:17 swaggboi joined 02:30 MasterDuke left 03:00 derpydoo left, jpn joined 03:05 jpn left 03:46 derpydoo joined 03:58 RonaldR34g4m joined, Vyrus left 04:58 linkable6 left, nativecallable6 left, evalable6 left, greppable6 left, bisectable6 left, statisfiable6 left, squashable6 left, benchable6 left, releasable6 left, notable6 left, tellable6 left, sourceable6 left, bloatable6 left, unicodable6 left, quotable6 left, committable6 left, reportable6 left, shareable6 left, bloatable6 joined, committable6 joined 04:59 shareable6 joined, reportable6 joined, quotable6 joined, benchable6 joined, unicodable6 joined, nativecallable6 joined 05:00 notable6 joined, squashable6 joined, sourceable6 joined, evalable6 joined, statisfiable6 joined, bisectable6 joined 05:01 releasable6 joined, linkable6 joined, greppable6 joined 05:16 tellable6 joined 05:55 squashable6 left, squashable6 joined 06:00 reportable6 left 06:02 reportable6 joined 06:56 jpn joined 07:01 jpn left 07:04 kjp left 07:12 kjp joined, jpn joined 08:12 linkable6 left 08:15 linkable6 joined 08:42 RonaldR34g4m left, Vyrus joined 09:05 sena_kun joined 09:37 jpn left 09:48 Manifest0 joined 10:02 Sgeo left 10:06 jpn joined 10:11 jpn left 10:57 derpydoo left
tbrowder__ a eureka moment: spaces around the elipsis generator causes problems 11:00
m: say 0,3...10 11:01
camelia (0 3 6 9)
tbrowder__ m: say 0,3 ... 10
camelia (0 3 6 9)
tbrowder__ hm
m: say 0, 3 ... 10 11:02
camelia (0 3 6 9)
11:02 jpn joined
tbrowder__ wow, my host is hosed!!!! 11:03
Nemokosch lol
tbrowder__ m: say 0,128...^512 11:05
camelia (0 128 256 384)
tbrowder__ m: say 0, 128 ... ^512
camelia (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86…
Nemokosch gotcha!
tbrowder__ aha, that's what i've been seeing 11:06
11:06 jpn left
Nemokosch m: 0, 128 ... ^512 andthen .say 11:06
Raku eval (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...)
11:07 xinming left
Nemokosch oh right, I remember 11:07
goddamnit
tbrowder__ m: say 0,128 ...^512
camelia (0 128 256 384)
Nemokosch ... ^number is NOT the same as ...^ number 11:08
tbrowder__ m: say 0, 128 ...^ 512
camelia (0 128 256 384)
Nemokosch ^512 is a range on its own that expands to 0, 1, 2, ...., 511
and this sequence will be used asthe "endpoint" of the whole sequence 11:09
tbrowder__ so, keep the caret attached to the ellipsis
11:09 xinming joined
tbrowder__ looks like a candidate dor docs traps to avoid 11:10
Nemokosch: good analyis
Nemokosch github.com/rakudo/rakudo/issues/3881
tellable6 tbrowder__, Sorry kid, that's not my department.
Nemokosch 🤣
anyway, I have seen this issue recently 11:11
and this is among the issues that I'm convinced could be just solved, rather than a) explained away b) dumped into the "traps" section 11:13
i.e no, the right handside should not collapse into a sequence of values 11:14
tbrowder__ nevertheless, the immediate fix should be doc trap note imho 11:15
back to using sequence "the right way" for now :-D (but i DO LOVE RAKU) 11:16
Nemokosch well, I for one don't like when something that feels wrong gets documented either way. It's like a justification of a mistake. 11:17
this is not to say that a language can be both useful and without traps 11:18
but the traps should obviously be a shorter list than the useful use cases 11:19
11:20 jpn joined
tbrowder__ no argument from me kiddo 11:22
but i would 11:23
Nemokosch so yeah, just as much as "nobody prevents me" from finding a better way
I don't prevent anybody from adding it to the traps - as long as later on it can be eliminated
tbrowder__ was gonna say i would give up ^6 as a range, i always thought it just means 5 11:24
Nemokosch m: (^*)(10).say 11:25
Raku eval ^10
tbrowder__ well, gotta run and raku on; ta ta, all
Nemokosch thank you for the descriptive representation 😄
m: (^*)(10).list.say
Raku eval (0 1 2 3 4 5 6 7 8 9)
Nemokosch the curse of doing "too clever" stuff 11:26
like it makes sense that ^10 is a range, and frankly that's a common paradigm by now
but I can also see your point that ^ usually just means "right before" when you read ..^ or ...^ 11:27
tbrowder__ couldn't resist a visit back. i'm a simple man and can't immediately imagine a personal need for the ^10 as a range. however, part of the beauty of raku is its power to do what you mean (and need), so i'm all for "fixing"/ 11:47
*fixing it if possible
fixing the ... ^ issue that is 11:48
11:49 jpn left 12:00 reportable6 left 12:02 reportable6 joined 13:02 linkable6 left, evalable6 left 13:04 linkable6 joined 13:05 evalable6 joined 13:21 jpn joined 13:26 jpn left 14:11 teatwo left, teatime left, teatwo joined, teatime joined 14:15 MasterDuke joined 15:01 ProperNoun joined 15:05 deoac joined 15:10 jpn joined
guifa So it looks like the main stumbling block for me on speed of doing localized formatting (based on DateTime.Str which isn't passed off to lower levels) is that it's done in NQP, because my code for an ISO formatted string ends up being nearly identical 15:13
probably combination of that and of accessing attributes of DateTime objects (where the .Str method can directly access them via $!foo)
15:15 jpn left 15:37 nort left
guifa just had his first real-world use of andthen 15:47
Nemokosch how come? xD 15:58
16:10 abraxxa-home joined
jdv has never 16:10
16:16 euandreh left
guifa Assigning a callable to a hash key and then returning the called valuee 16:54
%foo<bar> = generate-callable(…) andthen .(…)
(as the last line of a sub, otherwise, `andthen return .(…)` ) 16:55
16:58 jpn joined 17:03 jpn left
Nemokosch this one could be seen as a trap as well, I'd say 😄 17:14
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P.gist 17:16
camelia (P)
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P.[0]
camelia (Any)
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P[0] 17:17
camelia ===SORRY!=== Error while compiling <tmp>
P cannot be parameterized
at <tmp>:1
------> enum P << :A4[0,0,595,842]>>; say P[0]⏏<EOL>
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P::A4
camelia A4
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P::A4.raku
camelia P::A4
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P::A4.gist
camelia A4
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P::A4 17:20
camelia A4
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P::A4.raku
camelia P::A4
17:20 jpn joined 17:30 euandreh joined, euandreh left, euandreh joined
guifa Nemokosch: and what's the trap? the alternative is "%foo<bar> = generate-callable; return %foo<bar>(…)", or even .(…) with %foo<bar> = generate-callable (minus the tiny difference between with and if) 17:46
tellable6 guifa, Sorry kid, that's not my department.
guifa wait wot
18:00 reportable6 left 18:01 reportable6 joined
tbrowder__ the array of enums is deep inside PDF::Document. i can get the data aout manually but how does one access the value for A4 in this code: my Array enum PageSizes << :A4[0,0,595,842]>>; 18:10
s/aout/out/ 18:11
guifa tbrowder: PageSizes.enums<A4> 18:13
m: my Array enum PageSizes << :A4[0,0,595,842]>>; PageSizes.enums<A4>.say
camelia [0 0 595 842]
tbrowder__ m: my Array enum P << :A4[0,0,595,842]>>; say P.enums<A4> 18:14
camelia [0 0 595 842]
tbrowder__ excellent! thnx, guifa!
Nemokosch guifa: the trap is that most of the time it makes no sense for something that transforms a value to have lower precedence than the assignment 18:18
this is something I more often didn't want than wanted 18:19
18:38 cm left 18:40 cm joined 18:41 vrurg left, vrurg joined 18:48 Sgeo joined 18:50 jpn left 18:57 cm left, notna joined 19:07 abraxxa-home left 19:08 abraxxa-home joined 19:09 vrurg left 19:10 vrurg joined 19:12 cm joined 19:15 jpn joined
Anton Antonov @guifa I think you should continue learning Bulgarian. 19:18
guifa Anton: not going to lie, if I did a Slavic language it'd probably be Bulgarian. No cases = equally 19:26
Anton: not going to lie, if I did a Slavic language it'd probably be Bulgarian. No cases = equally 19:27
Anton Antonov @guifa I think Bulgarian has three cases. Also, Bulgarian is classified as Slavic because of the vocabulary, but it is an analytic language -- very different from the rest of the Slavic languages. (They are synthetic.) 19:32
@guifa My advice to you above is more of a reminder for me to go back learning Portuguese. 19:33
19:58 jpn left 19:59 cm left 20:03 abraxxa-home left 20:16 cm joined 20:19 notna left 20:38 cm left 20:44 xinming left 20:46 xinming joined
[Coke] knows only diado koleda from the little bulgarian he studied. (and also that it has a lot of loan words like ciao) 21:06
Anton Antonov LOL 🙂 🙂 21:07
Yes, Дядо Коледа !
[Coke] And I only know that because I also am a Coleda. :) 21:08
Anton Antonov Right -- I noticed that some time ago... (From your GitHub.) 21:10
@Coke Do you play sudoku often? Meaning, do you use Raku to help your sudoku playing? 21:14
[Coke] Yes, I follow "cracking the cryptic" and do a lot of the puzzles they present; often variants where you need to fill killer cages, etc. 21:15
(which is why that module)
Anton Antonov I see. I like doing Combinatorial Optimization (CO). So Sudoku puzzles can be solved doing CO. Now, in order to do CO with Raku a fair amount of module work has to be done. So, next best thing -- I think -- is to do Raku for CO, (instead of CO with Raku.) 21:19
So, I am curious, do you use some non-Raku math or "crypto" systems? 21:20
[Coke] no, I'm only using raku to do simple things like "if I have 4 distinct digits that need to add to 19, what could they be?" I'm not doing anything particularly mathy. 21:33
basically, letting the module do the annoying stuff so I can do the fun stuff?
21:44 cm joined 21:45 deoac left 21:46 deoac joined 21:55 jpn joined 21:59 sena_kun left 22:00 jpn left 22:01 cm left 22:07 deoac left 22:35 cm joined 22:54 cm left
Anton Antonov @Coke Yes, something like that. Using natural language, and/or some easy to write DSL. 22:54
23:25 cm joined 23:29 cm left 23:39 cm joined 23:55 cm_ joined 23:56 cm left, cm_ is now known as cm