🦋 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
[Coke] xliff: missing closing ) near arbitrary list ? 00:12
tellable6 [Coke], I'll pass your message to Xliff
00:35 euandreh left 00:37 euandreh joined 01:03 xinming left 01:05 xinming joined 01:45 xinming left 01:47 xinming joined 02:11 guifa joined
guifa o/ 02:11
tellable6 2023-06-04T13:39:10Z #raku-dev <finanalyst> guifa codesections suggested I contact you about internationalisations.
guifa .tell finanalyst yeah, I'm actually currently doing a ground-up rewrite of my port of Fluent which will make stuff crazy easy to do 02:12
tellable6 guifa, I'll pass your message to finanalyst
02:40 teatwo joined 02:44 tea3po left
tonyo uzl[m]: merged, ty++ 02:53
03:12 teatwo left 03:13 teatwo joined
Voldenet SmokeMachine: Yes, visit instead of multiple match methods should work, I'm not a fan of find-nodes because it always produces whole collection and I think that Seq returned from `gather visit({ … })` is going to be more flexible 04:11
04:13 evalable6 left, linkable6 left 04:14 evalable6 joined 04:15 linkable6 joined 05:15 tellable6 left, reportable6 left, quotable6 left, benchable6 left, nativecallable6 left, bisectable6 left, coverable6 left, releasable6 left, committable6 left, bloatable6 left, unicodable6 left, notable6 left, greppable6 left, squashable6 left, sourceable6 left, linkable6 left, shareable6 left, statisfiable6 left, evalable6 left
leont Good * 05:15
05:15 squashable6 joined 05:16 statisfiable6 joined, quotable6 joined, committable6 joined, coverable6 joined, benchable6 joined, reportable6 joined, releasable6 joined, tellable6 joined, bloatable6 joined, bisectable6 joined 05:17 sourceable6 joined, notable6 joined, linkable6 joined, nativecallable6 joined, shareable6 joined 05:18 evalable6 joined, unicodable6 joined, greppable6 joined 05:19 derpydoo left 05:39 derpydoo joined 06:00 reportable6 left 06:02 reportable6 joined 06:26 xinming left 06:28 xinming joined 07:20 abraxxa joined 07:21 jpn joined 07:24 arch left 07:25 arch joined 07:26 jpn left 07:40 sena_kun joined 07:48 Sgeo left 07:52 dakkar joined 08:06 japhb joined, codesections joined
librasteve weekly: rakujourney.wordpress.com/2023/06/...accessors/ 08:11
gfldex librasteve Things that don't got names have a hard time to leak. 08:16
m: $++ for .?the-win;
camelia ( no output )
gfldex Why .[$++] works is a nice rabbit hole tho. :-> 08:17
08:39 jpn joined
Nemokosch what does it mean for it to "work"? 08:41
08:47 jargan is now known as jast 09:04 jpn left 09:05 jpn joined
leont tonyo: I would really like to add fez to repology, but that requires it to expose an API to give me all modules, their versions and a URL to download them (repology.org/docs/requirements). Could you add such a target to the fez server? 09:13
Current index.json gives all versions instead of latest, that's a bit unfortunate for their purposes I believe 09:15
Geth planet.raku.org: 7b81fd13da | (Elizabeth Mattijsen)++ | perlanetrc
Follow rename of Steve Roe's website
09:18
09:23 buffet left
leont I guess I'd also need a way to fetch the META6.json for any package. 09:24
09:25 buffet joined
librasteve gfldx: thanks for the feedback ... sadly I do not know what you mean 09:43
i am a bear of small brain 09:44
09:57 lichtkind joined
SmokeMachine Voldenet: Yes, I plan on using visit-children for that, but anyway I'll need a few multi match()es for comparing things that are not nodes, RakuAST::IntLiteral's value, for example, right? 09:57
10:16 zara joined 10:23 zara left 10:28 derpydoo left 10:31 zara joined
lizmat PSA: there will not be a Rakudo Weekly today 10:59
11:00 dakkar left 11:05 xinming left 11:07 xinming joined
Voldenet I hate accidentally pulling master instead of main, creating a build out of it just to realise that it's 6 months old (`Д´)ノ︵ ┻━┻ 11:11
11:31 codesections left
Voldenet SmokeMachine: true, but complexity can be reduced to handling significantly fewer cases, since things like ArgList get visited 11:32
SmokeMachine Voldenet: yes! Sure! I was doing that way mostly for trying if that would work… 11:33
Voldenet: thank you for the advice! :) 11:34
Voldenet btw, matching on RakuAST::Literal is enough, the subtypes exist only for qast 11:35
SmokeMachine Voldenet: good to know! Thanks! 11:39
11:44 xinming left 11:47 xinming joined
lizmat yeah, and you even don't have to separate values on creation anymore 11:48
RakuAST::Literal.new(42) would create an IntLiteral, and R::Literal.new("foo") would create a StrLiteral
SmokeMachine Voldenet ^^ 11:49
m: use v6.*; say RakuAST.Literal.new(42)
camelia No such method 'Literal' for invocant of type 'RakuAST'
in block <unit> at <tmp> line 1
SmokeMachine lizmat: Also good to know! Thanks! 11:50
lizmat m: use v6.*; say RakuAST::Literal.new(42)
camelia RakuAST::IntLiteral.new(42)
SmokeMachine lizmat: have you seen my plan for my next suggestion for rak?
lizmat yes, I have: please make an issue for that in App::Rak so it doesn't fall through the cracks 11:51
SmokeMachine lizmat: I'm planing on doing the real suggestion once my PoC is more robust and I'm sure what I want is possible... 11:52
lizmat ++SmokeMachine 11:53
12:00 reportable6 left
Voldenet m: use v6.*; say "42".ast 12:01
camelia No such method 'ast' for invocant of type 'Str'. Did you mean 'AST'?
in block <unit> at <tmp> line 1
Voldenet m: use v6.*; say "42".AST
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::IntLiteral.new(42)
)
)
12:02 reportable6 joined
SmokeMachine Voldenet, lizmat: so, for now, the nodes I can think of (I don't know many nodes) would be RakuAST::Literal and for operators (RakuAST::Infix, RakuAST::Prefix, RakuAST::Postfix, etc).. is there a way to handle all the ops in a unified way (as RakuAST::Literal does for all literals)? 12:03
m: "1 + 2 - 3 * 4 / 5".AST.say 12:04
camelia RakuAST::StatementList.new(
RakuAST::Statement::Expression.new(
expression => RakuAST::ApplyInfix.new(
left => RakuAST::ApplyInfix.new(
left => RakuAST::IntLiteral.new(1),
infix => RakuAST::Infix.new("+"),
SmokeMachine m: "[+] !(1 + 2)[1..2] ".AST.grep({ .^name.ends-with: "fix" }).say 12:06
camelia ===SORRY!===
No such method 'IMPL-CURRIED' for invocant of type
'RakuAST::Postcircumfix::ArrayIndex'. Did you mean 'IMPL-CURRIES'?
12:08 ProperNoun joined
SmokeMachine m: "[+] !(1 + 2)".AST.map(*.^name).grep({ .ends-with("fix") && !/Apply/}).say 12:16
camelia (RakuAST::Infix RakuAST::Prefix RakuAST::Infix)
12:16 dakkar joined 12:19 jpn left 12:26 jpn joined 12:27 dakkar left 12:30 jpn left 12:37 squashable6 left 12:39 squashable6 joined
leont m: use Test; fails-like { fail "HERE" }, X::AdHoc; 12:49
camelia # Subtest: did we fails-like X::AdHoc?
1..2
not ok 1 - expected code to fail but it threw X::AdHoc instead
# Failed test 'expected code to fail but it threw X::AdHoc instead'
# at SETTING::src/core.c/Mu.pm6 line 1112
ok 2…
leont That looks very very wrong to me
(and it's used in three dozen spec test files, so it really should be working correctly) 12:53
12:55 codesections joined 13:00 jpn joined 13:05 jpn left 13:11 ProperN[out] joined 13:13 ProperNoun left
leont (of course, it turns out I completely misunderstood fail) 13:26
13:39 jpn joined 14:13 codesections left 14:15 jpn left 14:17 jpn joined 14:21 tea3po joined 14:24 teatwo left 14:34 euandreh left, euandreh joined 14:35 tea3po left 14:36 tea3po joined 14:39 tea3po left, tea3po joined 14:40 tea3po left, tea3po joined 14:41 Sgeo joined
tbrowder__ hi, i'm trying to use raku code to write a couple of functions described in 'Introduction to Algorithms', third edition, where the authors use a python-like pseudo code to describe them. one thing they use is a set of 1-indexed arrays which i am trying to emulate by unshifting a -1 for each, but i have a bug and am still still debugging. 14:47
however, isn't there a clever way to create such an array in raku?
i guess i could fake with a class... 14:49
*fake it 14:50
that should work, but not very elegant 14:51
anyone having trouble with google chrome? seems to stall--maybe too much AI 14:53
firefox much better
14:54 abraxxa left 14:56 abraxxa joined 15:06 codesections joined 15:29 vrurg_ joined 15:32 vrurg left 15:46 xinming left 15:48 xinming joined
librasteve tbrowder: hi ... can you share the text of the python/pseudo code maybe in a gist and we can take a look? 15:51
tonyo leont: you should be able to get that from the index of 360.zef.pm 16:11
16:15 abraxxa left 16:34 japhb left 16:39 zara left 16:41 dakkar joined 16:42 codesections left 16:46 xinming left 16:48 xinming joined 17:10 dakkar left 17:26 xinming left 17:28 xinming joined 17:52 sena_kun left 17:53 gugod left 17:55 sena_kun joined 18:00 reportable6 left 18:02 reportable6 joined 18:03 gugod joined 18:10 jpn left
tbrowder__ librasteve: thanks. i think i'll wait a bit till i try some more to check for errors. also, i want to look at augmenting a class or just creating one. 18:29
18:46 TieUpYourCamel left 19:02 jpn joined
librasteve yeah sure, no problem 19:07
19:13 jpn left 19:14 jpn joined 19:17 lichtkind_ joined 19:19 lichtkind left 20:07 jpn left 20:12 RandalSchwartz joined, RandalSchwartz left 20:13 RandalSchwartz joined, RandalSchwartz left 20:26 vrurg_ is now known as vrurg 20:45 kst left 20:46 kst joined 20:52 jpn joined 21:05 jpn left
uzl[m] .tell tonyo I think you forgot to merge it haha. And sure, np! 21:27
tellable6 uzl[m], I'll pass your message to tonyo
21:29 v_m_v joined
Anton Antonov I have an idea for a "brilliant" new package that allows parsers to be constructed in a Functional Programming (FP) manner. Basically, using parser combinators and transformers. What would be a good name for it? I am aware of similar Perl package named "Parser::Combinators" and Haskell package "Parsec". I prefer to call that new package "FunctionalParsers", but may be there is some suitable namespace to use as a 21:36
prefix.
moritz Parser::Functional? 21:43
21:43 v_m_v left
moritz lots of Parser:: things on metacpan 21:43
21:45 lichtkind_ left
Anton Antonov Hmm... I only checked raku.land. 21:54
22:09 sena_kun left 22:35 euandreh left, euandreh joined 22:43 euandreh left, euandreh joined 22:45 deoac left 22:50 lizmat left 23:01 jpn joined 23:05 jpn left 23:10 lizmat joined 23:15 euandreh left, euandreh joined