🦋 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:03 reportable6 joined 00:58 ab5tract joined, razetime joined 01:16 teatwo left, teatime joined 01:50 bigdata joined 02:44 teatime left, teatime joined 02:49 jpn joined 02:53 jpn left 03:00 razetime left 03:12 razetime joined 03:23 oodani left 03:24 oodani joined 03:32 razetime left 03:47 razetime joined 03:52 bigdata left 04:44 jpn joined 04:49 jpn left 05:32 siavash joined
xinming Is there a existing script uses multi processes to manage Proc::Async? 05:46
Hmm, What I mean is, I want to script several Proc::Async, and wait for them to proceed, When one of Proc finished, I start another.
teatime doesn't sound very async :) 05:48
xinming Before I've written this kind of script once, But I had a disk failure, I lost it, So start to be clueless on how I need to sort this out again. :-(
teatime jk
xinming :-)
06:00 reportable6 left 06:03 reportable6 joined 06:20 razetime left 06:21 razetime joined 06:22 jpn joined 07:09 siavash2 joined 07:12 siavash left 07:20 razetime left
xinming Is there a statement where we can run the script, and break at some point, so I can test some vars? 07:25
07:30 siavash2 left 07:36 siavash joined 07:51 sena_kun joined 08:14 teatwo joined 08:17 teatime left 08:21 jpn left
xinming m: my @c = (0..3).map({Channel.new}); my $p = start { react whenever @c.map(*.receive) { .raku.say } }; @c[1].send("hello"); await $p; 08:25
In this example, with @c[0].send("hello"); it worked fine. 08:26
camelia (timeout)
xinming Is it possible to monitor an array of channel?
m: my @c = (0..3).map({Channel.new}); my $p = start { react { for @c { whenever .receive { .raku.say; } } }; @c[1].send("hello"); await $p; 08:27
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> y; } } }; @c[1].send("hello"); await $p;⏏<EOL>
xinming m: my @c = (0..3).map({Channel.new}); my $p = start { react do { for @c { whenever $_ { .raku.say } } } }; @c[3].send("hello"); await $p; # <--- This version worked as expected, But wish something more sweet, Something like, react whenever any(@c) { ... } 08:29
camelia (timeout)"hello"
08:38 MoC joined 09:06 teatwo left, teatwo joined 09:24 teatwo left, teatwo joined 09:27 jpn joined 09:54 NemokoschKiwi joined 09:58 NemokoschKiwi left 10:24 Sgeo left 10:29 jpn left 10:33 jpn joined 10:45 jpn left 11:11 ab5tract left 11:50 ab5tract joined 12:00 reportable6 left 12:02 reportable6 joined 12:08 sena_kun left 12:13 ab5tract left
antononcube @xinming I am not sure is this going to be an useful answer — if you use Comma you can put breakpoints in your Raku programs / scripts. 12:32
12:40 ab5tract joined
gfldex m: my $var = 42; for ^10000 { repl if $_ > 1000 }; 12:41
xinming: ^^^
12:41 jpn joined
camelia (timeout)You may want to `zef install Readline`, `zef install Linenoise`, or `zef install Terminal::LineEditor` or use rlwrap for a line editor

Type 'exit' to leave
[0] > ===SORRY!=== Error while compiling <tmp>
Missing infix inside hyp…
12:41
12:46 jpn left
xinming gfldex: Thanks. repl is what I want. 12:57
I'll search doc for what repl mean.
antononcube, will check Comma module anyway. 12:58
antononcube @xinming Comma is an Integrated Development Environment (IDE) based on IntelliJ. There is a payed version and (free) community version. There are also Comma plugins for IntelliJ. I am not sure do the community versions allow debugging. (I think that is integral part of IntelliJ, but I have not verified it…) 13:01
13:03 ab5tract left
xinming antononcube, Ok, then I'll stick with vim. :-) 13:16
antononcube Agh — another vim-er!!! 13:17
xinming old emacs'er
antononcube Who? 🙂
I am old enough, I guess, and fan of Emacs, so I qualify, 13:18
xinming I used call myself emacs'er, I just realized I haven't use emacs for over 5+ years.
m: my $a = "world"; my @a = |<<hello $a>>; @a.raku.say; 13:23
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix
at <tmp>:1
------> my $a = "world"; my @a = |<<hello $a>>⏏; @a.raku.say;
expecting any of:
postfix
xinming Is this a bug?
|<a b> works, But |<<a $b>> fails
antononcube Currently, I only use Emacs with/for Org-mode. I rarely use it for anything else. Org-mode, though, is a “killer feature” and integrates well with Babel. That is why “Text::CodeProcessing” can be used over Org-mode files. I.e. we can do Literate programming with Raku via Org-mode (and Babel) files. 13:27
I have been trying to figure out how to get and use ZMQ in Emacs. Using ZMQ interactive Raku with Org-mode (and Babel) we can have an Emacs “notebook solution” similar to “Jupyter::Kernel” and “RakuMode” (in Mathematica.) 13:30
13:35 razetime joined
* […] ”Using ZMQ to interact Raku with Org-mode …” 13:39
14:10 siavash left 14:18 jpn joined
nemokosch the error message is horrible for sure 14:20
tells you exactly nothing, besides vaguely hinting that a syntax error happened
14:23 jpn left
anyway, it seems that it parses as |<<hello (hyper operator applied to whatever hello resolves to), followed by $a>> where an operator should finish the hyper operator up 14:26
the same problem doesn't arise with |< which has no operator-like meaning
$<foo bar> bothers me more tbh 14:27
m: dd $[0, 1]; dd $<foo bar>; 14:28
Raku eval $[0, 1] (Nil, Nil)
nemokosch because it performed key lookup on the match variable $/
I for one would ban these dangling abstractions and mandate parens 14:29
it's impossible to know what the user meant so do-what-i-mean will be half of the time do-something-i-didn't-even-have-in-mind 14:30
xinming m: my @a = |<a b>; @a.raku.say; 14:48
camelia ["a", "b"]
xinming m: my @a = |<<a b>>; @a.raku.say;
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix
at <tmp>:1
------> my @a = |<<a b>>⏏; @a.raku.say;
expecting any of:
argument list
postfix
xinming I think we have some bugs in parsers to deal with << >> 14:49
nemokosch I explained the situation, didn't I? 14:51
xinming nemokosch, You do :-) 14:55
15:17 razetime left
nemokosch I wonder 15:42
can we drop the "archive" part of raku.org? 15:43
raku.org/archive
github.com/Raku/raku.org/tree/mast...ce/archive there are loads of files here but where do they even appear?
if you write the paths explicitly, you will hit some pages eventually, but much more broken links 15:44
Geth raku.org: 4d4884e120 | (Elizabeth Mattijsen)++ | 2478 files
Moved the archive to a non-accessible place
15:51
lizmat nemokosch ^^
15:55 eseyman left 15:56 manu_ joined 15:57 manu_ is now known as eseyman
nemokosch great, thank you, less things to (un)break 15:58
lizmat yup
git mv is your friend :-)
16:05 jpn joined 16:11 jpn left 16:29 PolarBearXL joined
PolarBearXL How to get 0.37 without using EVAL?    raku -e 'say "㊲".comb(/<:N>+/).EVAL/100 ' 16:31
ugexe m: say ㊲.Int 16:35
camelia 37
ugexe m: say ㊲.Int / 100 16:36
camelia 0.37
ugexe m: say ㊲ / 100
camelia 0.37
lizmat m: say ㊲.^name 16:37
camelia Int
lizmat m: dd ㊲.Str
camelia "37"
lizmat hmmm.. wonder if we should make allomorphs of these
ugexe m: say unival("㊲") / 100 16:38
camelia 0.37
lizmat so they'd stringify back to ㊲
ugexe I dunno if making anything else allmorphs is good or not
PolarBearXL   .unival  (!)   thanks! 16:45
nemokosch I dunno if anything about allomorphs is good or not 😛 16:46
m: my Int() $not-five = <5>; say $not-five.Int === $not-five; 16:47
Raku eval False
nemokosch oh right, Int() is probably not even needed 16:48
m: my Int $not-five = <5>; say $not-five.Int === $not-five;
Raku eval False
nemokosch dang
gfldex lolibloggedalittle: gfldex.wordpress.com/2023/08/06/parenthood/ 17:15
PolarBearXL m: "③ ③ bottles" ~~ m:g/<:N>+/
camelia ( no output )
PolarBearXL m: say "③ ③ bottles" ~~ m:g/<:N>+/
camelia (「③」 「③」)
PolarBearXL m: say "33 bottles" ~~ m:g/<:N>+/ 17:16
camelia (「33」)
17:18 jpn joined 17:23 jpn left
PolarBearXL m: say "③③ bottles" ~~ m:g/<:N>+/ 17:24
camelia (「③③」)
17:26 PolarBearXL left
ugexe m: say "③" ~~ m:g/\d+/ 17:32
camelia ()
ugexe m: say ③ ~~ m:g/\d+/
camelia (「3」)
ugexe that seems kind of odd
m: say ③.Str ~~ m:g/\d+/ 17:33
camelia (「3」)
ugexe i wonder why the first and third example differ
17:36 Sgeo joined
lizmat strange indeed 17:43
18:00 reportable6 left 18:03 reportable6 joined 18:12 sena_kun joined
nemokosch is \d for Nd? 18:19
in that case, it's another "Unicode bug" 18:20
m: '③'.uniprops.say 18:21
Raku eval (No)
nemokosch it's not Nd
18:50 jpn joined 18:55 jpn left 19:18 jpn joined 19:19 AntonOks joined 19:26 Tirifto left 19:27 jpn left 19:28 Tirifto joined 19:53 AntonOks left
gfldex m: say ‘③’.succ; 20:03
camelia
gfldex m: say ‘⓪’.succ; 20:04
camelia
gfldex m: say ‘①’.pred;
camelia Decrement out of range
in block <unit> at <tmp> line 1
gfldex Is this a Unicodebug or Rakudobug? 20:05
m: say (‘①’ .. ‘㊿’).join; 20:10
camelia ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲…
gfldex :-/
20:14 tea3po joined 20:18 teatwo left 20:24 teatwo joined
nemokosch hmmm 20:25
m: ‘⓪’.Int.say
Raku eval Exit code: 1 Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏⓪' (indicated by ⏏) in block <unit> at main.raku line 1
nemokosch dammit
m: say ‘①’.Int.say;
Raku eval Exit code: 1 Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏①' (indicated by ⏏) in block <unit> at main.raku line 1
nemokosch clueless 20:26
20:27 tea3po left 20:28 teatime joined 20:30 teatwo left 20:48 MoC left 20:56 jpn joined 21:04 jpn left
xinming: maybe | <<Hello $asd>> would work, with the space? 21:26
lizmat m: say ‘①’.pred; # this is not a rakudo bug, but a rakudo feature 21:33
camelia Decrement out of range
in block <unit> at <tmp> line 1
lizmat gfldex: github.com/rakudo/rakudo/blob/main...1512-L1530 21:35
aka: github.com/rakudo/rakudo/blob/main...C_DEC.raku 21:36
nemokosch makeMAGIC 21:38
21:40 euandreh joined
antononcube @Nemokosh I am making some LLM magic right now. 😎 21:49
nemokosch why don't you visit us in the Raku-study meeting? 😛 21:54
21:55 jpn joined 21:59 jpn left
antononcube Agh... I forget about it ! When I see the announcements for it I always have the intentions to attend (or troll...) 22:02
weekly:rakuforprediction.wordpress.com/20...s-chatgpt/ 22:03
nemokosch still doesn't work via the bridge I think 22:05
antononcube Damn! (And thanks for pointing it out.) 22:06
nemokosch you can still check some weekly challenges 😂 ^^ 22:13
antononcube That is good idea, maybe. But that seems "waste of time" for me. (Since, I have a fair amount of packages to develop and document.) 22:17
I realize it is somewhat myopic point of view.
nemokosch It's okay 22:18
I think the early stages might be more interesting for you anyway
22:28 jgaz left 22:30 jgaz joined
antononcube I see. 22:30
22:32 ab5tract joined 22:37 sena_kun left 23:00 jpn joined 23:05 jpn left