🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:01 swaggboi left 00:13 swaggboi joined 00:18 zacts joined 00:52 zacts left
SmokeMachine kawaii_: say [42] ~~ Array[Int] 00:57
m: say [42] ~~ Array[Int]
camelia False
kawaii_ Ah I see, yes :) 00:58
Juerd m: subset IntArray of Array where .all ~~ Int; say [42] ~~ IntArray; 01:02
camelia True
01:09 atweiden_air- joined
atweiden_air- why does one file lib/A.rakumod containing `role A['a'] {}; role A['b'];` pose no issue with downstream usage whereas splitting this file into lib/Aa.rakumod containing `unit role A['a'] {}` and lib/Ab.rakumod containing `unit role A['b'] {}` throw P6M Merging GLOBAL symbols failed: duplicate definition of symbol Replace 01:11
s/Replace/A 01:12
golfed github.com/atweiden/golf 01:26
01:32 japhb left 01:35 japhb joined
atweiden_air- Is the only workaround not parameterizing the unit roles? 01:46
02:01 nine left, m_athias left 02:02 nine joined, m_athias joined 02:58 xinming left 02:59 xinming joined 03:35 guifa joined 04:11 perlbot left, simcop2387 left 04:19 zacts joined 04:26 lockywolf left 04:33 lockywolf joined
atweiden_air- solved github.com/atweiden/golf/commit/5c...9c3b3f1162 04:40
04:45 atweiden_air- left 04:49 zacts left
Geth doc: 9930cf5d20 | (Patrick Böker)++ (committed using GitHub Web editor) | doc/Language/modules.pod6
Give the more obvious answer to "Where are bin/ scipts installed?" (#4046)
05:30
06:05 mexen joined 06:18 perlbot joined 06:21 simcop2387 joined 06:30 abraxxa joined 06:35 abraxxa left 06:36 jmcgnh left, abraxxa joined 06:39 kjp_ left 06:41 jmcgnh joined 06:42 Sgeo left 06:55 kjp joined 08:03 dakkar joined 08:07 jmcgnh left 08:09 jmcgnh joined
patrickb melezhik: I think one possible route is to move over to DB::MySQL which maintains a connection pool. 08:23
08:57 solitario left 08:59 jjido joined 09:00 MitarashiDango[m left, jjido left 09:09 _________ left 09:12 Oshawott left
Altreus japhb: meh, this is for me, and the maths is easier if the week starts at 1 09:12
And the maths was weirdly not very easy
09:22 jjido joined 09:42 ggoebel left 10:18 solitario joined 10:36 jjido left 11:02 ggoebel joined 11:11 archenoth joined 11:22 ggoebel left 11:30 razetime joined 11:31 ggoebel joined 11:47 simcop2387 left 11:48 simcop2387 joined 12:03 synthmeat left 12:13 ggoebel left 12:23 synthmeat joined 12:55 ggoebel joined 13:00 jjido joined
Altreus Where are raku's own options documented? Equivalent of perldoc perlrun? 13:12
I tried rakurun :D
lizmat raku --help ? 13:17
Altreus o, I tried man raku and gave up :D
forgot about basic functions -_-
in repeat/while, can the condition see variables lexical to the repeat block? 13:39
lizmat I think so? 13:40
Altreus TIAS
ugexe m: while my $x = 42 { last; }; say $x
camelia 42
ugexe oops i guess thats the exact opposite 13:41
Altreus m: repeat { my $x = 42 } while $x > 50;
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$x' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> repeat { my $x = 42 } while ⏏$x > 50;
Altreus :(
leaky scope
that's OK, the outer scope is small here
13:57 jjido left
Altreus Hmm, the .? methodop doesn't work if it's an attribute on a type object 14:09
lizmat example? 14:13
Altreus m: DateTime.?day 14:16
camelia Cannot look up attributes in a DateTime type object. Did you forget a '.new'?
in block <unit> at <tmp> line 1
Altreus m: Nil.?day
camelia ( no output )
Altreus Seems like "I would have this if I were instantiated" overrides "maybe you don't have this" 14:17
lizmat m: DateTime.day
camelia Cannot look up attributes in a DateTime type object. Did you forget a '.new'?
in block <unit> at <tmp> line 1
lizmat m: class A { has $.a }; A.a 14:19
camelia Cannot look up attributes in a A type object. Did you forget a '.new'?
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
lizmat the underlying issue, to an extent
not sure why the accessor is not generated with a :D check on the invocant
m: class A { has $.a }; dd A.^find_method("a") # hmmm... the signature says it is? 14:20
camelia Method a = method a (A:D: *%_) { #`(Method|5973966464984) ... }
lizmat m: class A { has $.a; method a(A:D:) { 42 } }; dd A.a # signature does not match reality 14:21
camelia Invocant of method 'a' must be an object instance of type 'A', not a
type object of type 'A'. Did you forget a '.new'?
in method a at <tmp> line 1
in block <unit> at <tmp> line 1
14:57 stanrifkin joined
stanrifkin is there something similar to perl's Math::Prime::Util in raku? 14:57
14:59 Sgeo joined
lizmat not that I know of 14:59
shouldn't be too hard to port metacpan.org/pod/Math::Prime::Util::PP to Raku :-) 15:00
especially since a lot of the bigint / bigfloat handling is built into Raku :-) 15:01
stanrifkin lizmat: but not gmp or?
lizmat: can't i simply use that perl module in raku? never done that 15:02
lizmat possibly... there's even a MoarVM branch to use libgmp internally, which would make things even simpler
stanrifkin: that you can do also: raku.land/cpan:NINE/Inline::Perl5
15:02 discord-raku-bot left
lizmat
.oO( another plan thwarted to get a module ported :-)
15:03
15:03 discord-raku-bot joined 15:07 morte_ joined 15:08 lichtkind joined 15:13 djerius left 15:15 djerius joined
stanrifkin get an error when installing Inline::Perl5 15:16
relocation R_X86_64_PC32 against symbol `PL_opargs' can not be used when making a shared object; recompile with -fPIC 15:17
something wrong with the newest perl5.34.1 and raku distributions?
i use perlbrew and it seems that the archive libperl.a is not compiled with -fPIC 15:18
drakonis github.com/rakudo/rakudo/issues/4835 huh well. 15:23
stanrifkin nothing to do with tail call optimization. I didn't realize raku doesn't have that. 15:25
ok perl has no TCO either... i see 15:26
lizmat still fails to understand why some people seem to dismiss a language because it does not appear to have tail call optimizations 15:27
whereas Raku has a more general automatic inlining of hot code
ugexe i wonder how many people who proclaim such a desire for TCO have actually blown a stack before 15:29
dont get me wrong, having TCO would be awesome
stanrifkin lizmat: some problems are recursive naturally and hard or not possible iterative. but that doesn't mean someone "dismiss" a language because of the lack of TCO 15:31
Altreus Is this normal? In month-as-table, if I do it this way, all weeks are the same; presumably the assignment to @week is done by reference and the @month array therefore gets changed --> gist.github.com/Altreus/8d797886a3...8d6719c899 15:32
El_Che doesn't perl stops you at 100 recursive loop?
stanrifkin lizmat: but when i think about it. TCO possible problems should be no recursive either.
Altreus But if I use gather/take, it works as expected (gist updated) 15:33
I didn't expect any reference behaviour here at all
ugexe did you mean to use append? 15:34
i guess not
Altreus no I want an AoA
I mean, I do prefer gather/take!
15:37 _________ joined
drakonis oops, i derailed the topic 15:37
i've seen someone dismiss raku over no tco 15:38
stanrifkin drakonis: and used instead?
drakonis hmm, this person used python at the time 15:39
which doesn't have tco either
stanrifkin darkonis: says it all :) 15:40
ugexe I wanted atomics in raku, so I paid someone to implement them
drakonis hmm, time to pay someone for tco
ugexe exactly >:)
15:41 p6steve left
[Coke] I would chip in a few bucks for that. (if anyone has a plan, could submit a grant to YAS also) 15:43
15:44 committable6 joined, bisectable6 joined, sourceable6 joined
drakonis YAS? 15:44
15:44 bisectable6 left 15:45 quotable6 joined, coverable6 joined, linkable6 joined
[Coke] www.perlfoundation.org/ 15:45
I was avoiding the "perl" name variant, but it's the one most people know.
15:46 notable6 joined
[Coke] e.g. news.perlfoundation.org/post/grant...march_2022 15:46
15:46 nativecallable6 joined, releasable6 joined, bloatable6 joined 15:47 reportable6 joined, bisectable6 joined 15:52 Guest3345 joined 15:54 Guest3345 left 15:57 Papercombo joined
drakonis oh i see 16:00
16:01 Papercombo left
stanrifkin someone have got an working Inline::Perl5 module? 16:09
16:10 jgaz joined 16:11 linkable6 left
stanrifkin got it working with the default installed perl but not with the newest perlbrew perl-5.34.1 16:13
16:14 linkable6 joined
Altreus japhb: I made this; dunno if it helps you any gist.github.com/Altreus/17359580fb...2e05741324 16:14
japhb Altreus: Thank you. 16:29
16:29 jjido joined 16:43 razetime left
jdv anarchy in the uk? 16:45
wrong chan:( 16:46
Altreus wrong japh 16:47
16:50 dakkar left 16:56 melezhik joined
melezhik . 16:56
Hi. let me know if someone is interested in trying out sparkyci 16:57
Altreus qué 16:59
17:01 melezhik left 17:02 mexen left
Altreus Now I just need to figure out how to output that table in such a way that I can put fields next to each date and navigate to those fields in the terminal! 17:06
Maybe Terminal::UI 17:08
17:20 melezhik joined 17:21 melezhik left 17:25 melezhik joined
stanrifkin Altreus: and output it to an CVS file? Terminal only? 17:28
17:29 melezhik left
Altreus Currently I'm just outputting the result to the terminal... With Terminal::UI, I could feasibly just output it to another pane 17:29
17:35 melezhik joined 17:39 melezhik left, jgaz left 17:51 melezhik joined 17:53 melezhik left 18:05 melezhik joined 18:06 abraxxa left 18:08 melezhik left 18:10 guifa left 18:16 reportable6 left 18:17 reportable6 joined 18:20 casaca joined 18:35 p6steve joined 18:38 n1to joined 18:43 guifa joined
p6steve lichtkind: I see this lichtkind.de/vortrag but not the Plotten mit raku deck - kanst du bitte mitteilen? 18:44
18:45 melezhik joined 18:49 melezhik left
lichtkind p6steve: yes it developed into pure perl talk partially becasue the big modules on rakku org are wrapper for same libs but most of talk is dataprep theory math and design anyway 18:52
and becasue raku is missing some the math i needed
which is in smaller part my fault 18:53
18:53 melezhik joined
stanrifkin lichtkind: do you use this kephra editor? 18:53
lichtkind im the author but i use it too
stanrifkin nice website. i'll take a look at these wx tutorials. 18:55
lichtkind you mean lichtkind.de? 18:56
stanrifkin yes
lichtkind its like a buisnesscard :) not much design, but thanks for compliment 18:57
stanrifkin content matters right?
lichtkind exactly 18:58
stanrifkin did some c++ wxwidget stuff. but experimenting things out with perl seems like a good idea. can than implement it later in c++. 19:00
lichtkind then you look into xrc
you c++ app loads same xrc file and looks same
also helps with i18n
stanrifkin ok i see. 19:01
19:04 melezhik left 19:09 melezhik joined
melezhik . 19:09
19:13 melezhik left 19:18 melezhik joined 19:20 melezhik left 20:00 statisfiable6 joined 20:01 bisectable6 left 20:02 bisectable6 joined 20:03 benchable6 joined, squashable6 joined, unicodable6 joined 20:04 evalable6 joined, evalable6 left, benchable6 left, bisectable6 left, squashable6 left, statisfiable6 left, releasable6 left, linkable6 left, coverable6 left, quotable6 left, bloatable6 left, notable6 left, unicodable6 left, sourceable6 left, nativecallable6 left, reportable6 left, committable6 left, linkable6 joined, sourceable6 joined, squashable6 joined, greppable6 joined 20:05 reportable6 joined, statisfiable6 joined, shareable6 joined, notable6 joined, coverable6 joined, evalable6 joined 20:06 committable6 joined, unicodable6 joined, nativecallable6 joined, squashable6 left 20:07 quotable6 joined, bloatable6 joined, benchable6 joined, bisectable6 joined, releasable6 joined
lucs Hmm... Took me a while to figure out: 20:51
for ^42 { foo(); bar(); } # foo() is evaluated in sink context, but bar() is not, not sure why...
Nemokosch is it the last statement of your function? 20:58
idk how exactly it works but bar() is not in sink context probably because it's the last statement in some scope
therefore its return value is propagated
lucs Yeah, that's kind of what I suspected, but I'm not sure where exactly the value is propagated to. 20:59
21:00 melezhik joined
lucs (It doesn't sink when it's the last statement in the block here.) 21:01
21:02 melezhik left, melezhik joined
melezhik patrickb I've created a prototype for sparkyci - sparrowhub.io:2222 so you can check it out and see the idea - please let me know if you have any thoughts ... 21:03
I think what else besides test coverage would be interesting to add as CI part for a regular Raku project?
maybe license checks? not sure 🤔 if it fits opensource projects requirements ... 21:04
another though - check pod syntax linter , but maybe not everyone uses pod now, many docs - just markdown ... 21:05
code security vulnerabilities checks?
21:13 melezhik left
lucs Yucky, but I can make sure bar() gets evaluated in sink context (because it may generate a Failure whose exception I want to be thrown) by doing: 21:17
for ^42 { foo(); bar(); next; }
guifa you can also force sink context by just prefixing with sink
for ^42 { foo(); sink bar(); }
lucs Aha! I knew there must have been a better way :)
Thanks. 21:18
21:23 lichtkind left
patrickb melezhik: This looks really nice. 21:33
melezhik: I'd focus on usability.
Getting it up and running as simple as possible. 21:34
GitHub / GitLab / SourceHut integration.
Simple configuration
patrickb is off to bed now.
21:36 jjido left 21:40 melezhik joined 21:45 melezhik left 22:10 n1to left 22:28 zacts joined 22:34 tejr left 22:36 jgaz joined, tejr joined 22:38 discord-raku-bot left, discord-raku-bot joined, gfldex left 22:41 gfldex joined 22:44 discord-raku-bot left
gfldex m: my $result = do for ^1 { 42 }; dd $result; 22:45
camelia List $result = $(42,)
22:45 discord-raku-bot joined 22:55 zacts left 23:01 morte_ left 23:05 jgaz left 23:26 epony joined 23:42 melezhik joined 23:44 melezhik left
lucs gfldex: Ah, gotcha, thanks. 23:50
moon-child m: my $x = gather for ^1 { take 42 }; dd $x 23:51
camelia Seq $x = $((42,).Seq)
moon-child m: my $x = eager gather for ^1 { take 42 }; dd $x 23:52
camelia List $x = $(42,)