|
🦋 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:41
rakufan1 left
00:46
yewscion joined
00:49
yewscion left
01:03
abraxxa-home left
|
|||
| tbrowder | yo, my early Christmas present was using @jnthn's module 'OO::Monitors' which solved my thread problem which was locking up my multicore computer. | 01:11 | |
| thnx lizmat for putting it in zef with community modules | 01:12 | ||
|
01:33
elcaro joined
01:41
Manifest0 left
01:46
yewscion joined
01:48
yewscion left
02:04
yewscion joined
02:07
yewscion left
02:23
hulk joined
02:24
kylese left
02:47
yewscion joined
02:50
yewscion left
03:01
Aedil joined
03:10
tjr left,
kjp left,
thowe left,
greppable6 left,
unicodable6 left,
bloatable6 left,
sourceable6 left,
tellable6 left,
coverable6 left,
corwin left,
mst left,
broquaint left,
popebob left,
lucs left
03:15
hulk left
03:19
lucs joined,
broquaint joined,
mst joined,
popebob joined,
popebob left,
popebob joined
03:20
thowe joined,
kjp joined,
corwin joined
03:48
yewscion joined
03:51
yewscion left
03:55
eseyman left
04:18
Aedil left
04:30
Aedil joined
04:43
yewscion joined
04:46
yewscion left
05:15
yewscion joined
05:18
yewscion left
05:33
yewscion joined
05:36
yewscion left
06:27
yewscion joined
06:29
yewscion left
07:26
yewscion joined
07:30
yewscion left
07:54
seamusb joined
08:12
seamusb left
08:27
yewscion joined
08:30
yewscion left
08:34
eseyman joined
08:49
Sgeo left
|
|||
| lizmat | weekly: raku-advent.blog/2024/12/06/day-19...i-capsule/ | 09:06 | |
| notable6 | lizmat, Noted! (weekly) | ||
|
09:14
Manifest0 joined
09:31
yewscion joined
09:35
yewscion left
09:51
nine left
09:52
nine joined
10:23
sena_kun joined
10:34
sena_kun left
10:44
sena_kun joined
10:46
sena_kun left,
yewscion joined
10:51
yewscion left
11:55
yewscion joined
11:58
yewscion left
12:51
dano left
12:56
yewscion joined
13:01
yewscion left
13:02
MyNetAz left
13:10
dano joined
13:17
MyNetAz joined
13:46
yewscion joined
13:49
yewscion left
14:09
donaldh left
14:39
Sgeo joined
15:29
yewscion joined
16:39
yewscion left
17:02
ggoebel joined
|
|||
| antononcube | weekly: rakuforprediction.wordpress.com/20...aku-set-2/ | 17:22 | |
| notable6 | antononcube, Noted! (weekly) | ||
|
17:25
nine left,
nine joined
17:26
yewscion joined
|
|||
| roguerakudev | I was wondering if anyone has a pointer to documentation or a starting point for reading the code related to "repossession" in Rakudo | 18:27 | |
| re. this issue comment: github.com/rakudo/rakudo/issues/56...2437094425 | |||
| niner identified the general area of the issue, but it seems like no one picked up the fix so I was hoping to do it myself, but I have done very little poking through rakudo so far | 18:28 | ||
| lizmat | rakking through MoarVM and NQP code, there's quite a few references to them in comments, but no actual documentation :-( | 18:34 | |
| antononcube | @lizmat Thanks for posting my post on Reddit! | 18:35 | |
| lizmat | yw :-) | ||
|
18:43
finanalyst joined
18:49
ggoebel left
|
|||
| ab5tract | roguerakudev: scratching a personal itch is a great way to get started on hacking Rakudo! | 18:50 | |
| However, that specific issue is likely to be fairly intricate and thorny | 18:51 | ||
| It may be worth it to scan the open issues for something else that suits your taste to serve as a starter issue | 18:52 | ||
| But of course jumping into the deep end also has its merits! | |||
| roguerakudev | I'm assuming it's best to work on the RakuAST branch these days, assuming it's an actual Rakudo issue rather than Moar | 18:54 | |
| or is that not a separate branch now | 18:55 | ||
| I'm open to recommendations on a "starter issue" if anyone has itches | 19:00 | ||
|
19:08
sena_kun joined
19:24
sena_kun left,
sena_kun joined
19:32
Aedil left
|
|||
| lizmat | roguerakudev RakuAST is now in main, activate by running with RAKUDO_RAKUAST=1 | 19:39 | |
| [Coke] | I have a grammar that has a JUNK regex that is a single . - all other regex are interesting, and longer than a single character. if I have a TOP that is ( <THING> | <OTHER> | <JUNK>)*} - shouldn't the JUNK only match if nothing else does at that point? running it through the debugger, it seems to be preferring the JUNK rule, even when it could match a longer item at that point | 19:40 | |
| ugexe | m: grammar Foo { token TOP { (<thing> | <junk>)* }; token thing { "aa" }; token junk { . }; }; my $g = Foo.new; my $m = $g.parse("aa"); say $m | 20:00 | |
| camelia | 「aa」 0 => 「aa」 thing => 「aa」 |
||
| ugexe | that example does not choose JUNK | ||
| [Coke] | yes. for simple examples works fine. for my example, it's skipping most of the content in favor of junk | 20:01 | |
| I'm trying to golf. | |||
| Looks like a nested rule is part of the issue. | 20:08 | ||
| roguerakudev | interesting, there is seemingly a regression on rakudo:main since release 2024.09 related to exporting enums? | 20:09 | |
| consider Logging/Level.rakumod with use v6.d; unit enum Logging::Level is export < DBG INF WRN ERR FTL >; | 20:10 | ||
| then use Logging::Level; sub foo(Logging::Level $level) { say $level } | 20:11 | ||
| this works as expected on release but on latest main it gives Invalid typename 'Logging::Level' in parameter declaration | 20:12 | ||
| even though make spectest passes completely | |||
| works fine if you do Level instead of the FQN | |||
| lizmat | could you golf that into an issue ? | 20:13 | |
| [Coke] | m: grammar A { regex N { \d ** 1..3 }; regex FOO { 'foo(' <N> ',' <N> ')' }; regex JUNK { . }; regex TOP { (<FOO> | <JUNK>)+ } }; say A.parse("foo(371,776)"); | ||
| camelia | 「foo(371,776)」 0 => 「f」 JUNK => 「f」 0 => 「o」 JUNK => 「o」 0 => 「o」 JUNK => 「o」 0 => 「(」 JUNK => 「(」 0 => 「3」 JUNK => 「3」 0 => 「7」 JUNK => 「7」 0 => 「1」… |
||
| roguerakudev | yep, can do | ||
| ugexe | changing to `regex N { \d+ }` appears to get the desired results, so maybe related to that \d ** 1..3 | 20:16 | |
| [Coke] | or \d | \d\d | \d\d\d | 20:27 | |
| ugexe++ | 20:28 | ||
| roguerakudev | As I'm golfing this it's getting stranger and stranger | ||
| it only happens when my CWD is the root of the rakudo project lol | 20:31 | ||
| it's not ideal for sure, but highly unlikely to be an issue for 99% of users | 20:34 | ||
| aruniecrisps | i made an issue on Definitely: github.com/masukomi/Definitely/issues/4 | 20:37 | |
| i'm curious as to what monad syntax could look like in Raku | |||
| [Coke] | do you have a RAKULIB set, perhaps? | 20:38 | |
| Geth | advent/main: cd28b53d65 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | raku-advent-2024/authors.md 23 -> 10, 10 -> 19 |
20:39 | |
| aruniecrisps | @librasteve thoughts? | 20:42 | |
| librasteve | lemme see | 20:44 | |
| tx! | |||
|
20:44
yewscion left
|
|||
| so, tbh I am not sure that that module (which is very small and very opinionated) is a good place to have a discussion about "better ways to do Monad in Raku" | 20:52 | ||
| [Coke] opens github.com/rakudo/rakudo/issues/5722 | 20:55 | ||
| librasteve | raku core support for "Monad" is return type smileys sub fn() returns Int:D {} so matsukomi module is a small rebellion that leans on raku is a self modifying language idea - but it is not really a robust idea more a template for if you really wanna do Monads that you can warp raku that way | 20:56 | |
| roguerakudev | [Coke] no RAKULIB set | ||
| [Coke] | ok. (a relative dir in there might explain behavior changing in different dirs0 | 20:57 | |
| aruniecrisps | @librasteve i'll get rid of the issue then | 21:25 | |
| oh nvm you closed it | |||
| librasteve | sorry - I'm right on the edge of my knowledge with Monads so not really able to understand your main idea / proposal | 21:30 | |
| aruniecrisps | how familiar are you with the concept of do-notation? | 21:31 | |
| librasteve | never heard of it | ||
| (my bad) | 21:32 | ||
| aruniecrisps | So Haskell, F#, Scala, Ocaml and a lot of these functional languages have syntax that is meant to replicate a procedural style of coding, but underneath the hood it desugars to a bunch of bind calls | ||
| so in Haskell if i were to write something like this: haskell result :: Maybe Int result = do x <- Just 2 y <- Just 0 Just $ x + y this ultimately desugars to 2 >>= \x -> (3 >>= \y -> Just x + y)), where the <- basically desugars to a bind call | 21:35 | ||
| this gets way more useful when you're dealing with types like Either/Result, Async, etc | 21:36 | ||
| this pattern is so useful that JS/TS, Python, and Rust have it baked into the language specifically for asynchronous programming, ans JS also has it for generators | 21:37 | ||
| the idea behind having such a syntax is that it's applicable in many different places | 21:39 | ||
| I feel I could try and write a Slang for this to see how it would work | |||
| librasteve | serokell.io/blog/haskell-to-core << just had a look at this - there is much for me to learn | 21:41 | |
| appreciate the general idea - I think it is interesting to see how raku can be "warped / slanged" to be (even?) more amenable to functional needs - you are welcome to fork Definitely or to make something from a new angle... | 21:46 | ||
| must sleep | 21:51 | ||
| aruniecrisps | i'll do some investigation | 21:55 | |
| thanks! | |||
|
22:03
yewscion joined
22:06
yewscion left
|
|||
| guifa | even though it feels weird to use .kv on lists, man it's useful to do $text.lines.kv -> $line-no, $text { ... } | 23:00 | |
| antononcube | Well, either .kv or a special function / method to do map with indexing, e.g. map-indexed. | 23:10 | |
|
23:23
sena_kun left
23:24
finanalyst left
|
|||
| BTW, Mathematica has MapIndexed : reference.wolfram.com/language/ref...ed.html.en | 23:25 | ||
|
23:59
yewscion joined
|
|||