š¦ 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
00:01
reportable6 joined
00:45
Voldenet left,
Voldenet joined
00:46
nort left
01:02
Manifest0 left
01:04
xinming left,
guifa joined
01:05
xinming joined
01:15
deoac joined
01:51
deoac left
02:23
vrurg_ joined,
vrurg left
02:29
deoac joined
02:35
deoac left
03:14
razetime joined
03:51
razetime left
04:19
derpydoo joined
04:22
rf left
04:24
rf joined
04:38
razetime joined
04:42
rf left,
rf joined
04:51
jcb28 joined
04:53
razetime1 joined
04:54
razetime left,
razetime1 is now known as razetime
05:47
jcb28 left
06:00
reportable6 left
06:01
reportable6 joined
06:31
Sgeo left
06:47
teatwo joined
06:50
teatime left
07:03
abraxxa joined
07:53
Sussysham joined
08:06
Sussysham left
08:11
razetime left
08:32
razetime joined
08:54
dakkar joined
09:16
grondilu joined
|
|||
grondilu | LAST allows to execute code at the last iteration of the loop, but is there a way to execute code at each iteration BUT the last one? | 09:17 | |
tellable6 | 2023-03-07T22:47:24Z #raku <guifa> grondilu: in fact, I'm working on a code tidier that's based on RakuAST nodes. It's still very basic now, but while core should only provide rudimentary node to string capabilities, moduels are a great place to do even more | ||
Nemokosch | well, how do you know (more accurately, when do you know) that an iteration is the last one? | 09:18 | |
09:19
BabyLoveWoodrose joined
|
|||
grondilu | "I don't know" (with screen-rant tone) | 09:20 | |
(or rather pitch meeting) | |||
Anyway, looking at the doc, NEXT might do the job | 09:21 | ||
Nemokosch | idk what they are | ||
grondilu tries it | |||
Nemokosch: nevermind I was trying to be quirky | |||
09:21
BabyLoveWoodrose left
|
|||
tellable6 | grondilu, I'll pass your message to Nemokosch | 09:21 | |
09:22
BabyLoveWoodrose joined,
BabyLoveWoodrose left
|
|||
grondilu | hum, nope. NEXT will also run at the last iteration. | 09:22 | |
dakkar | grondilu: do you need your code to run at the beginning of each iteration, or at the end? | 09:23 | |
Nemokosch | that's what I kinda tried to approach - you wouldn't know what the last iteration was in general, without trying to start over | ||
grondilu | I want the code to run at each iteration but the last one. | 09:24 | |
dakkar | "at" is not precise enoughā¦ | 09:25 | |
grondilu | I mean LAST knows what the last iteration is, so why can't I define "not LAST" or something? | ||
dakkar: oh sorry I see what you mean now. | |||
Nemokosch | but like, do you understand the theoretical limits? | ||
dakkar | m: for 1..1 { say "loop"; LAST say "last" } | ||
camelia | loop last |
09:26 | |
09:26
Vyrus joined
|
|||
dakkar | it can't do "last" before running the block for the last time | 09:26 | |
Nemokosch | that you need to at least attempt to start the next iteration to know that the previous one was the last one? | ||
dakkar | (of course it could in this very trivial example, but in general it can't) | ||
I guess `for ā¦ { ā¦; LAST { something } }` is pretty much `do { for ā¦ { ā¦ }; LEAVE { something } }` | 09:28 | ||
or just `{ for ā¦ { ā¦ }; something }` | |||
(with different names visible, of course) | |||
grondilu | I think using a phaser was a bad idea. I'll do something like `for @array { do-this; do-that unless ++$ == @array; }` | 09:32 | |
not very elegant but oh well. | 09:33 | ||
Nemokosch | it sounds kinda interesting that you need to do something like that at all | ||
Anton Antonov | weekly: rakuforprediction.wordpress.com/20...nd-onions/ | ||
Nemokosch | won't work through discord :c | 09:34 | |
grondilu | Nemokosch: if you're curious, I'm trying to display an image on the terminal using kitty's protocol. I have to split the image data in chunks, and print it with a specific code for each chunks but the last one. | 09:35 | |
tellable6 | grondilu, I'll pass your message to Nemokosch | ||
lizmat | grondilu: LAST does *not* know it's the last iteration. | 09:36 | |
the LAST phaser gets run *after* the iterator was exhausted, but still inside the scope of the loop body | |||
Nemokosch | hm, perhaps I'd use an oldschool while, after constructing the first line individually | 09:37 | |
dakkar | grondilu: a more "obviously can't work" example would be something like `while ($buffer.bytes < $limit) { read-more-into-buffer($buffer) }` | ||
Nemokosch | assuming that the specific code comes after the data | ||
09:39
jpn joined
09:49
Vyrus left,
Vyrus joined
|
|||
grondilu | m: gist.github.com/grondilu/c1a1e1e3d...2d15d206c9 | 09:52 | |
camelia | _Ga=T,f=100,m=1;iVBORw0KGgoAAAANSUhEUgAAAQUAAADzCAYAAACPKgMhAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAPYQAAD2EBqD+naQAAAAd0SU1FB9kHEQMHOihr+oEAAAAadEVYdENvbW1lbnQAQ3JlYXRlZCBieSBTdS1TaGVlVsN9NAAAAAZiS0dEAP8A/wD/oL2nkwAA4FtJREFUeNrsXQd4FNXa3pJegQBJIPTeSejSpAmoCCā¦ | ||
grondilu | ah, too bad. | ||
grondilu was kind of hoping this would pop the camelia logo even through IRC | 09:53 | ||
grondilu swears it's not to spam pictures lol | |||
10:49
linkable6 left,
evalable6 left,
linkable6 joined
10:50
evalable6 joined
11:17
grondilu left
12:00
reportable6 left,
reportable6 joined
|
|||
Geth | ecosystem/main: 61a151586a | (Elizabeth Mattijsen)++ | META.list Remove Digest::SHA1::Native It lives on CPAN as well |
12:19 | |
12:20
razetime left
12:35
euandreh left
|
|||
lizmat | sanity check: does this link work for anybody? s.thenautilus.net/notes/9c23tku1am | 12:38 | |
I would hate to put it in the weekly if it doesn't work on its own | 12:39 | ||
Nemokosch | seems to work | 12:49 | |
looks like a kind of sidebar twitter | |||
lizmat | ok, so it's a Mojave / Safari issue | 12:53 | |
that *I* seem to have :-) | 12:59 | ||
13:27
xinming left
13:29
xinming joined
13:38
skaji_ left
13:39
skaji_ joined
13:52
euandreh joined
13:57
grondilu joined
|
|||
grondilu | Anybody has an idea of how the palette in rosettacode.org/wiki/Mandelbrot_set#Raku was generated? Is there a formula somewhere? | 13:57 | |
Anton Antonov | @grondilu Interesting. I probably have to demonstrate how to do that with "JavaScripdt::D3" and/or "Text::Plot". | 14:04 | |
rf | Morning folks | 14:06 | |
grondilu | Anton Antonov: you're referring to displaying images in a terminal? | 14:11 | |
Anton Antonov | @grondilu Well, I was talking about making Mandelbrot plots with Raku, but, yes, "Text::Plot" can be used in a terminal. | 14:24 | |
14:29
Sgeo joined
15:15
razetime joined
15:28
razetime1 joined
15:29
razetime left,
razetime1 is now known as razetime
|
|||
grondilu | .seen raydiak | 15:47 | |
tellable6 | grondilu, I saw raydiak 2021-10-16T17:14:00Z in #raku: <raydiak> fair enough :) | ||
16:22
razetime1 joined
16:23
razetime left,
razetime1 is now known as razetime
16:25
saint- joined
16:42
deoac joined
|
|||
tonyo | think i finally have the globber working like git ignore | 16:48 | |
anyone that's having trouble with it available to test? | |||
Voldenet | grondilu: the palette there resembles simple hue color circle with various darkness levels | 17:13 | |
17:14
deoac left
|
|||
Voldenet | more obvious when you align it properly i.imgur.com/bV2qzFE.png | 17:15 | |
grondilu forked Image::PNG::Portable and added kitty protocol support: github.com/grondilu/Image-PNG-Portable | 17:18 | ||
17:19
razetime left
|
|||
grondilu | ^that seems to work. The example is mandelbrot and the gist method includes the kitty escape sequences. | 17:19 | |
17:25
squashable6 left
17:26
squashable6 joined,
abraxxa left
17:39
dakkar left
17:57
discord-raku-bot left
17:58
discord-raku-bot joined
18:00
reportable6 left
18:03
reportable6 joined
18:06
TieUpYourCamel left
18:08
Xliff joined
|
|||
Xliff | \o | 18:08 | |
18:17
Xliff left
|
|||
tonyo | vrurg_: can you point me to your repo with the .gitignore and i can true up git ls-files to my globber? | 18:19 | |
18:31
jpn left
18:38
jpn joined
18:48
tea3po joined
18:49
tea3po left
18:50
tea3po joined
18:51
teatwo left
18:54
grondilu left
19:51
jpn left
19:56
Maylay left
20:15
jpn joined
|
|||
tonyo | nvm, i think i got this trued up to what .gitignore does. doesn't handle cascading yet though | 20:23 | |
20:27
jpn left
20:39
Xliff joined
|
|||
Xliff | \o | 20:39 | |
Can submethod BUILD be multi? | |||
m: class A { multi submethod BUILD ( :$a is required ) { say "A" }; multi submethod BUILD ( :$b is required ) { say "B" }; }; A.new( :a ); A.new( :b ) | 20:42 | ||
camelia | A B |
||
Xliff | Oooohhh... the chaos! | ||
20:42
jpn joined
20:55
jpn left
21:20
derpydoo left
21:23
ab5tract left
21:38
simcop2387 left,
perlbot left
21:39
simcop2387 joined
21:40
perlbot joined
|
|||
tonyo | bisectable6: class A { has $!a; submethod BUILD ($!a) { } }; A.new(5); | 21:41 | |
bisectable6 | tonyo, Will bisect the whole range automagically because no endpoints were provided, hang tight | ||
tonyo, Ā¦6c (67 commits): Ā«Default constructor for 'A' only takes named argumentsā¤ in block <unit> at /tmp/j04vvASDaj line 1ā¤ā¤ Ā«exit code = 1Ā»Ā» | |||
tonyo, Nothing to bisect! | |||
22:05
squashable6 left,
squashable6 joined
22:15
jpn joined
22:21
jpn left
22:26
perlbot left,
perlbot joined
22:31
perlbot left
22:33
simcop2387 left
22:38
simcop2387 joined
22:41
perlbot joined
23:11
saint- left
23:25
derpydoo joined
|