| wayland76 | How do I use an anonymous method? | 00:27 | |
| tellable6 | 2025-12-31T18:19:29Z #raku <arkiuat> wayland thanks for that tip on git worktrees 5 months ago; I couldn't absorb it then, but I tried them again recently and find them very helpful! | ||
| wayland76 | .tell arkiuat No worries. Was that the one in this channel (6th June, at 17:40 AEST from wayland76)? Let me follow up my own comment. I'm using cursor and spec-kitty together. I tend to use cursor (Agent mode) for the small stuff, spec-kitty for the medium-sized stuff, and either cursor or ChatGPT for the big stuff. So my process for something larger tends to go A) Spitball with ChatGPT or something, and capture the bits I want into a Markdown spec; | 00:37 | |
| tellable6 | wayland76, I'll pass your message to arkiuat | ||
| wayland76 | B) Use Cursor to whip the spec into shape a bit, and break it down into features C) Use spec-kitty to turn those features into tasks, then code (it'll include tests). I review each feature before it gets merged. D) Finally, testing and debugging in Cursor, to follow up the problematic items. | ||
|
00:41
guifa left
|
|||
| wayland76 | .tell lizmat the logging bot seems to be down. | 00:46 | |
| tellable6 | wayland76, I'll pass your message to lizmat | ||
| [Coke] | m: my &x = anon sub { $^a * 2 }; say &x(3) | 00:57 | |
| camelia | 6 | ||
| [Coke] | there's one way | ||
| wayland76 | [Coke]: That's a sub, not a method. I'm specifically interested in declaring a method without a name. It can be on a class. It's syntactically valid, but I can't find a way to get at it. It doesn't seem to show up in .^methods, for example. | 01:00 | |
| [Coke] | ... whoops. I misread as sub. | 01:46 | |
|
01:48
guifa joined
|
|||
| guifa | ack, got disconnected, wayland76 couldn't see from transcripts if you got an answer | 02:09 | |
| an anonymous method might as well be an anonymous sub that gives you access to self, basically | |||
| my &foo = anon method :: ($self: $a) { say "called :: on $self with arg $a" }; 'bar'.&foo(42); foo('xyx', 123) | 02:12 | ||
| evalable6 | called :: on bar with arg 42 called :: on xyx with arg 123 |
||
|
02:26
hulk joined,
kylese left
02:47
lichtkind_ left
03:15
hulk left,
kylese joined
03:37
guifa left
|
|||
| arkiuat | wayland76, uh no, it was July 19th in #raku-doc, but tellable6 isn't on that channel. | 03:48 | |
| tellable6 | hey arkiuat, you have a message: gist.github.com/2b430e73a8799135d1...a46721d574 | ||
| arkiuat | .tell wayland yeah sorry I don't know what any of that is. It was 19th July 23:45, on #raku-doc about git worktrees. I posted here because tellable6 wasn't hanging out on #raku-doc | 03:54 | |
| tellable6 | arkiuat, I'll pass your message to wayland76 | ||
| arkiuat | .tell wayland oh wait, I mean 18th July (converted from UT to AEST in my head, forgot to do the date too) | 03:57 | |
| tellable6 | arkiuat, I'll pass your message to wayland76 | ||
|
04:46
Aedil left
05:26
gugod left
06:19
guifa joined
07:28
arkiuat left
07:40
arkiuat joined
07:45
arkiuat left
07:59
gabiruh left,
gabiruh joined
08:10
guifa left
08:15
arkiuat joined
08:19
arkiuat left
08:38
gugod joined
08:45
arkiuat joined
08:50
arkiuat left
|
|||
| disbot8 | <melezhik.> Happy new year! ššš Have started a new ( Sparrow based ) project , check it out - doubletap.sparrowhub.io/ | 08:53 | |
| <melezhik.> Happy new year! ššš Have started a new ( Sparrow based ) project , check it out - doubletap.sparrowhub.io/ | 09:04 | ||
|
09:09
arkiuat joined
09:13
arkiuat left
09:41
arkiuat joined
09:46
arkiuat left
10:10
arkiuat joined
|
|||
| patrickb | what is that about? | 10:13 | |
|
10:15
arkiuat left
10:21
RakuIRCLogger left
10:44
arkiuat joined
10:48
arkiuat left
11:04
arkiuat joined
|
|||
| disbot8 | <melezhik.> āDouble TAP is lightweight testing framework where users write black box tests as rules checking output from tested "boxes". Boxes could be anything from http client, web server to messages in syslog. This universal approach allows to test anything with just dropping text rules describing system behavior in black box manner.ā | 11:06 | |
|
11:06
itaipu joined
|
|||
| lizmat | Everybody: best wishes for 2026, may it be a good one! | 11:14 | |
| tellable6 | 2026-01-01T00:46:17Z #raku <wayland76> lizmat the logging bot seems to be down. | ||
| lizmat | should be good again now | 11:17 | |
|
11:28
arkiuat joined
|
|||
| librasteve_ | weekly: rakuforprediction.wordpress.com/20...-examples/ | 11:28 | |
| notable6 | librasteve_, Noted! (weekly) | ||
| librasteve_ | weekly: rakuforprediction.wordpress.com/20...ata-scienc | ||
| notable6 | librasteve_, Noted! (weekly) | ||
| disbot8 | <librasteve> weekly bot is not working on Discord ATM ;-( | 11:29 | |
|
11:33
arkiuat left
|
|||
| disbot8 | <librasteve> happy new year! | 11:34 | |
|
11:38
itaipu left
11:45
arkiuat joined
11:47
lichtkind joined
11:53
arkiuat left
11:57
itaipu joined
12:07
arkiuat joined
12:11
arkiuat left
12:13
arkiuat joined
12:15
justache left
12:17
arkiuat left
12:19
justache joined
12:29
arkiuat joined
12:33
arkiuat left
12:45
arkiuat joined
12:49
arkiuat left
13:13
arkiuat joined
13:17
arkiuat left
13:44
annamalai left,
annamalai joined
13:47
arkiuat joined
13:53
arkiuat left
|
|||
| lizmat | new, updated! dev.to/lizmat/raku-2025-review-4m0l :-) | 14:03 | |
|
14:14
arkiuat joined
14:18
arkiuat left
14:29
arkiuat joined
|
|||
| disbot8 | <antononcube> Happy New Year! | 14:53 | |
|
16:22
Aedil joined
16:33
abraxxa joined
16:38
abraxxa left
16:39
abraxxa joined
16:43
arkiuat left
16:45
annamalai left
16:57
kaskal left,
kaskal joined
|
|||
| korvo | Has anybody figured out how to use a Raku grammar to constrain an LLM's output? llama.cpp and friends have a builtin BNF metalanguage for CFGs but I want something PEG-shaped. | 16:57 | |
|
17:22
annamalai joined
17:38
arkiuat joined
|
|||
| disbot8 | <aruniecrisps> Happy new year everyone! | 17:51 | |
| <aruniecrisps> @Voldenet @wayland76 I'm wondering if it's not worth it to make a community slang module that allows you to define new trait names like provides | 17:52 | ||
|
17:58
wayland76 left
17:59
wayland joined
18:13
abraxxa left
18:15
arkiuat left
18:16
abraxxa joined
|
|||
| disbot8 | <antononcube> @korvo Can be done via llm-synthesize and/or llm-function and/or "LLM::Graph". But those are more generic approaches than just specifying the grammar directly as filter for a particular LLM. (Like llamafile models.) | 18:26 | |
| <antononcube> Using grammars or regexes to filter or validate LLM results is mentioned in "Day 6 ā Robust code generation combining grammars and LLMs", raku-advent.blog/2025/12/06/day-6-...-and-llms/ . | 18:30 | ||
|
18:31
arkiuat joined
|
|||
| disbot8 | <antononcube> The first LLM graph example, "Parallel race", can be refitted to use a Raku grammar by the "judge" node. | 18:32 | |
| korvo | antononcube: Fun! FWIW specifying the grammar directly has the useful property that we *provably* generate valid texts, and that's what I use it for in my own harness. | 18:36 | |
|
18:37
arkiuat left
|
|||
| korvo | It's been nearly 3yrs since I pointed this out to simonw. They didn't understand, but a peer introduced github.com/1rgs/jsonformer and local-LLM generation has had perfect JSON ever since. | 18:37 | |
| I *could* find some way to negotiate between the typical local harness, written in Python 3, and Raku. It might be more useful to have Raku modules which natively call the LLM's inference routines instead. | 18:38 | ||
| antononcube: To give some idea of what local harnesses do, here is some distilled Python 3 which considers all of the possible tokens for an LLM and masks off any token which wouldn't be acceptable in a sanitized chat window. bpa.st/VZZA | 18:45 | ||
| So if there's some way to neatly invert a grammar, to feed it incrementally and ask it for a set of valid next characters, then it would be possible in principle to use Raku for these sorts of token-restricting harnesses. | 18:46 | ||
|
18:47
arkiuat joined
|
|||
| disbot8 | <antononcube> The package "WWW::LLaMA" can be made to use grammar spec. Right now it does not, but you can see here that it can pass a fair amount of arguments to LLaMA LLMs: github.com/antononcube/Raku-WWW-LL...ns.rakumod | 18:51 | |
|
18:51
arkiuat left
|
|||
| disbot8 | <antononcube> At the time I wrote "WWW::LLaMA" I did not consider passing grammar filters "universal" enough to include it in the signature. | 18:53 | |
| <antononcube> I assume "WWW::LLaMA" has to be revisited with the newest LLaMA models signatures. | 18:54 | ||
| <antononcube> TBH, currently my highest LLM-related development priority is making an Ollama client. | 18:55 | ||
| <antononcube> As for "generating JSON for sure" valid JSON code is produced fairly robustly by adding llm-prompt('JSON') to a llm-synthesize or llm-function specs. | 18:59 | ||
| <antononcube> @korvo "It might be more useful to have Raku modules which natively call the LLM's inference routines instead." -- I aggree. To large extend that is why I think it is better to have separate, dedicated LLM-service utilization packages ("WWW::OpenAI", "WWW::LLaMA", etc.) that a generic one. | 19:02 | ||
|
19:03
arkiuat joined
|
|||
| korvo | Yeah. BTW Ollama and llama.cpp can run various non-LLaMA models; there's been a bit of feature creep upstream. | 19:04 | |
| So that e.g. I'm working with RWKV, using rwkv.cpp, and I don't know what a Raku module might be called. Is "WWW::RWKV" too opaque? Does it matter that it's not a Web interface? | 19:05 | ||
| disbot8 | <antononcube> @korvo "WWW::RWKV" seems fine to me. It is a family of models, from what I see. | 19:12 | |
| <antononcube> Meaning "WWW::RNN-LLM", or something like that, might be more informative, but it is not concrete enough. | 19:13 | ||
| korvo | There's no WWW in it, I mean. My current harness opens librwkv.so and does FFI. | 19:14 | |
| disbot8 | <antononcube> Then "RWKV::Client" or "RWKV" might be good. | 19:15 | |
| <antononcube> I have similar dilemma naming modules that access H2O.ai or OR-Tools. | 19:16 | ||
| <antononcube> Here I use "H20::Client" : github.com/antononcube/Raku-H2O-Client | 19:17 | ||
| korvo | Some languages have namespaces for FFI bindings. I gather that that's not something the Raku community does, though. | 19:18 | |
|
19:22
Sgeo joined
|
|||
| disbot8 | <antononcube> I think the closest thing is ā::Nativeā to the package name. Or just use the name of the library or service. Like, āRWKVā or āH2Oā. | 19:23 | |
|
19:26
xinming joined
|
|||
| korvo | It's too bad that Grammars can't have inverted control or incremental parsing. It would be useful for many tasks, not just for LLMs. | 19:28 | |
| disbot8 | <antononcube> @korvo What do you mean by āgrammar inversionā? Generation of sentences using a grammar? | 19:54 | |
| korvo | Yes, precisely. Or, more generally, having a suspended parse with a set of acceptable characters. | ||
| disbot8 | <antononcube> Yes, that is very useful and use it often. I would say it is even a measure of maturity of the corresponding grammar systems. | 19:56 | |
| <antononcube> These three Raku packages provide random sentence generation: - Grammar::TokenProcessing - EBNF::Grammar - FunctionalParsers | 19:58 | ||
| <antononcube> The āsuspended parseā is a good idea! (If understand it correctlyā¦) | 19:59 | ||
| korvo | It's just how some parsers naturally work. Instead of taking an entire string, they take individual characters and return a new parser after each character. | 20:04 | |
| And an efficient encoding leads to each parser having a set of expected characters, in the sense that you could try feeding a parser every possible character and see which parsers generate errors. | 20:05 | ||
| disbot8 | <antononcube> I see. And yes, this how functional parsers can be also seen. | 20:08 | |
|
20:08
jmcgnh left
|
|||
| disbot8 | <antononcube> I was thinking that "suspended parse" can be (relatively) easily implemented using functional parsers. | 20:09 | |
| <melezhik.> I have brought some examples of TTAP protocol here -doubletap.sparrowhub.io/examples , including Raku inlines | 20:10 | ||
| korvo | FunctionalParsers definitely has the sort of API that I would want. | 20:11 | |
| disbot8 | <antononcube> I think what you are suggesting/wanting can be done by modifying the sequential parser sequence. | 20:23 | |
| <antononcube> An alternative, is replace each of the initial k-parts of a parser expression with the parser success or satisfy({True}). | 20:25 | ||
|
21:07
arkiuat left
21:12
arkiuat joined
21:17
arkiuat left
21:30
arkiuat joined
|
|||
| wayland | .tell arkiuat In that case, ignore what I said about AIs, but, you're welcome :). | 21:33 | |
| tellable6 | wayland, I'll pass your message to arkiuat | ||
|
21:34
arkiuat left
|
|||
| wayland | .tell aruniecrisps It might be, in that I would've used it. | 21:36 | |
| tellable6 | wayland, I'll pass your message to aruniecrisps | ||
|
21:50
arkiuat joined
21:54
Aedil left
21:56
arkiuat left
|
|||
| wayland | .tell guifa Maybe an example would be better. gist.github.com/wayland/8a52577055...6f4964c3c5 . It runs, but the anonymous method doesn't show up. It's not so much that I'm dead keen on anonymous methods, it's that it's possible to declare them, so I thought that, if there were a way to use them, I might have a use for it. | 21:57 | |
| tellable6 | wayland, I'll pass your message to guifa | ||
| wayland | [Coke]: ^^ | ||
| tellable6 | 2026-01-01T03:54:24Z #raku <arkiuat> wayland yeah sorry I don't know what any of that is. It was 19th July 23:45, on #raku-doc about git worktrees. I posted here because tellable6 wasn't hanging out on #raku-doc | ||
| 2026-01-01T03:57:19Z #raku <arkiuat> wayland oh wait, I mean 18th July (converted from UT to AEST in my head, forgot to do the date too) | |||
|
22:05
abraxxa left
22:17
arkiuat joined
22:26
arkiuat left
22:32
arkiuat joined
22:50
arkiuat left
22:56
itaipu left
|
|||
| lizmat | m: class A { }; BEGIN A.^add_method("foo", my method () { "foo" }); dd A.foo # use of anonymous method | 23:24 | |
| camelia | "foo" | ||
| wayland | lizmat: So the declaration that I had doesn't work then? | 23:27 | |
| lizmat | yeah, looks like anonymous methods are not getting added to the method table | 23:28 | |
| wayland | lizmat: OK, good to know. Does that count as a bug? | 23:29 | |
| lizmat | not sure: I guess it's somewhere between a DIHWIDT and maybe a warning / error at compile time | ||
| wayland | Hmm. OK. I'm not sure either :p | 23:31 | |