🦋 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:02 reportable6 joined 00:26 goblin joined
leont I tend to start with SQLite and then upgrade to PostgreSQL when needed. Turns out SQLite can get one pretty damn far. 01:09
01:10 hexology- is now known as hexology, razetime joined 01:11 guifa joined
japhb True! 01:24
01:34 tejr left 01:38 willthechill joined 01:39 tejr joined
SmokeMachine Red make it easy to use the json capabilities from both SQLite and Postgres… :) 02:25
02:30 teatwo left, teatwo joined, razetime left 02:31 razetime joined 03:01 teatwo left, teatwo joined 03:32 camelia left, m_athias left, nine_ joined, nine left 03:35 m_athias joined 03:38 camelia joined 04:36 jpn joined 04:40 jpn left 05:16 siavash joined 05:22 willthechill left 05:26 swaggboi left 05:39 swaggboi joined 05:42 teatwo left 05:51 jpn joined
guifa I think something is off on heredocs in the current version of rakudo 05:59
06:00 reportable6 left 06:01 reportable6 joined 06:53 jpn left 07:05 RakuIRCLogger__ joined, Geth left 07:06 lizmat joined, jpn joined
guifa Cannot find method 'specialize' on object of type Perl6::Metamodel::GrammarHOW 07:07
any ideas?
Having a bug right before a conference talk is ... less than ideal :(
07:07 lizmat_ left, RakuIRCLogger left 07:11 jpn left
guifa nm got it 07:14
07:25 abraxxa joined 07:31 guifa left 07:32 Woodi_ is now known as Woodi 07:48 sena_kun joined 07:53 siavash left 07:56 siavash joined 08:10 dakkar joined 08:15 melezhik joined
melezhik could someone recommend template engine (not web oriented ) ? 08:15
08:23 melezhik left, Geth joined 08:24 razetime left 08:31 rf left 08:32 rf joined, jpn joined 08:36 rf left 08:37 rf joined 08:47 razetime joined 09:07 uzl[m] left 09:08 Sgeo left 09:09 razetime left 09:11 razetime joined 09:29 jpn left 09:34 sena_kun left 09:37 jpn joined 09:38 sena_kun joined 09:41 lizmat_ joined 09:44 lizmat left 10:11 siavash left
nemokosch I don't think any template engine for Raku is actively web-oriented 10:55
11:07 razetime left 11:08 razetime joined 11:09 razetime left
librasteve every time I use $ for multiple things I get surprised, I am also surprised by how hard it is to consistently use @ since raku functions are, errr, quite functional (& lazy) and want to give me back a .Seq ... 11:09
^^^ my usual MO when I get this kind of confusion is to post a blog since generally writing the longer story helps me to deconfuse myself ... and hopefully others 11:10
11:53 euandreh joined 12:00 reportable6 left 12:02 reportable6 joined 12:03 euandreh left 12:04 euandreh joined 12:08 euandreh left 12:11 euandreh joined 12:29 guifa joined 12:43 guifa left 12:48 guifa joined
antononcube Well, I am currently working a template engine that is definitely not web oriented. 🙂 12:56
guifa raku.land/zef:guifa/Polyglot::Brainfuck 13:20
a preview to my talk coming up in just a few minutes
13:23 melezhik joined
melezhik how can I override object stringification method for my class? 13:23
13:26 Maylay left
guifa method Str { ... } 13:26
can also be useful to make a different one for type objects and concrete objects 13:27
multi method Str (:U:) { ... }
melezhik thanks
guifa and :D: for concrete
melezhik m: class Foo { method Str () { say "OK" } } ;  my $a = Foo.new; say "$a"; 13:31
camelia OK
True
nemokosch There is also gist for the lolz 13:37
14:15 euandreh left 14:16 melezhik left 14:18 euandreh joined 14:22 euandreh left
guifa and don't forget about .raku! 14:22
14:23 guifa left 14:25 euandreh joined 14:39 euandreh left, euandreh joined 15:09 Sgeo joined 15:12 abraxxa left 15:25 euandreh left 15:26 euandreh joined 15:53 jpn left, euandreh left 15:57 euandreh joined 16:01 euandreh left 16:07 euandreh joined
tbrowder__ ref using SQLite for personal data, is Red ready for other module use instead of a hash? 16:26
SmokeMachine tbrowder_: sorry, I didn’t get it, what do you mean? 16:28
gfldex_ m: my $s = 'a b c d e'; say $s ~~ m:nth(*)/\w/; 16:29
camelia 「e」
gfldex_ `nth(*)` looks like an ENODOC 16:30
16:31 gfldex_ is now known as gfldex
gfldex it is specced in S05-modifier/counted.t tho 16:31
SmokeMachine What I meant about red and json was this: github.com/FCO/Red/blob/master/t/36-json.t 16:36
tbrowder__: ^^ 16:37
16:37 dakkar left 16:45 razetime joined 16:50 razetime left 16:51 razetime joined, squashable6 left 16:53 euandreh left 16:54 euandreh joined, squashable6 joined 17:00 razetime left, razetime joined
nemokosch :nth is documented under the match method 17:13
17:44 razetime left 17:46 razetime joined 17:47 slu joined 17:51 razetime left 17:53 razetime joined 17:58 euandreh left 18:00 euandreh joined, reportable6 left 18:02 reportable6 joined 18:06 razetime_ joined, razetime left 18:11 razetime_ left 18:12 razetime joined
xinming_ What are the differences between Array.push and Array.append please? 18:19
jast the difference is described in the docs for append: docs.raku.org/type/Array#method_append 18:21
in short: append tends to flatten things
xinming_ jast: thanks 18:25
18:26 guifa joined 18:33 Altai-man joined 18:34 RonaldR34g4m joined, atweedie_ joined, patrickb_ joined 18:35 tobs` joined 18:36 razetime left 18:37 sivoais_ joined 18:42 sena_kun left, Vyrus left, sivoais left, tobs left, patrickb left, atweedie left, tobs` is now known as tobs, patrickb_ is now known as patrickb, atweedie_ is now known as atweedie 19:17 guifa left 19:47 euandreh left 19:49 guifa joined 19:51 guifa left 19:55 euandreh joined 20:32 guifa joined 20:39 rml joined 20:40 rml left 20:44 Altai-man left 21:33 guifa left 21:36 lizmat_ left, lizmat joined 22:28 Xliff_ joined
Xliff_ . 22:28
vrurg: You around?
vrurg Xliff_: kind of. A little busy. 22:29
22:31 deoac joined 22:35 squashable6 left 22:38 squashable6 joined
Xliff_ vrurg: OK. I think I have a handle on what I want. If I .^add_method to a class, what's the proper way to recompose? <CLASS>.^compose? 22:42
vrurg: Next question - are roles composed into a type before or after candidates are determined and added to the proto method? 22:50
vrurg: Please answer when time allows. 22:51
vrurg: Thanks in advance.
vrurg Xliff_: Yes, .^compose. 23:32
Xliff_ vrurg: Thanks. Didn't work. It appears Method::Also can .^add_method without the need for .^compose. 23:33
vrurg Xliff_: Before. And don't forget that the proto itself has to be determined too as sometimes it's not immediately available.
Xliff_ vrurg: It isn't determined at all during RoleToClass.apply
vrurg You may need to recompose for non-moar backends to update method cache. 23:34
Xliff_ This is moar.
Give it a think when you have some time.
Thanks, again.
vrurg: If I were going to copy @!candidates from one class to another, what would be the nqp to do that? 23:35
Er... one method to another.
vrurg Have you tried intercepting add_multi_method and, say, add a candidate twice, with the original and aliased name?
Xliff_ Tried using a role and it didn't work. 23:36
I may need a base class.
23:38 linkable6 left, evalable6 left 23:39 linkable6 joined, evalable6 joined
Xliff_ Class.add_multi_method does not fire. 23:41
vrurg: <Role>.add_multi_method doesn't work either
vrurg Xliff_: then you do something wrong. 23:54
Xliff_ vrurg: method add_multi_method { ... } ? 23:55
Or do I need to override a HOW?
vrurg HOW, of course.
Xliff_ How can I override a HOW?
vrurg I'm about to pose a snippet in the issue.
Xliff_ Ah, thanks!
vrurg s/pose/post/
But take into account: it only works for a proto. 23:56
Xliff_ Can you include the nqp example I asked for?
Or at least point me to an example in the existing source tree... 23:57
vrurg Forget about nqp. You do it all in Raku, even though playing with the metamodel. 23:59