🦋 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
yewscion left
00:59
xinming left
01:00
xinming joined
01:01
yewscion joined
01:04
yewscion left
01:18
yewscion joined
01:20
yewscion left
01:37
yewscion joined
01:39
yewscion left
01:58
yewscion joined
02:02
yewscion left
02:10
hulk joined
02:11
kylese left
02:52
yewscion joined
|
|||
[Coke] updates his sudokuhelper so you can get sandwich combos on a 6x6 | 02:52 | ||
02:56
yewscion left
|
|||
[Coke] | (if that sentence means anything to you, you may want that module. :) | 02:59 | |
03:15
hulk left,
kylese joined
03:30
yewscion joined
03:33
yewscion left
03:59
yewscion joined
04:02
yewscion left
04:06
Xliff joined
|
|||
Xliff | Hello! | 04:06 | |
tellable6 | 2025-02-08T17:56:05Z #raku <librasteve> Xliff: here's what I found out from the docs | ||
2025-02-08T17:59:43Z #raku <librasteve> Xliff: (ii) cro.raku.org/docs/reference/cro-htt..._responses describes (with an example) of how to roll your own Cro middleware cache | |||
2025-02-08T18:00:35Z #raku <librasteve> Xliff: (iii) Cro::WebApp::Templates are held in a repository and are precompiled and cached when the server is started. | |||
2025-02-08T18:07:42Z #raku <librasteve> Xliff: while this module raku.land/github:scmorrison/Web::Cache was built for Bailador, it would probably be quite easy to cut and shunt this together with the Cro middleware example | |||
hey Xliff, you have a message: gist.github.com/0a64386617fe592d8f...5b9ce2bdd2 | |||
Xliff | librasteve: Hey, thanks for the info! | 04:07 | |
.landyacht. | Using the latest release (2024.3-beta.6) of the Comma 2.0 IDEA plugin, I'm getting an error that the plugin wants an older version of IntelliJ :( | ||
Plugin 'Comma Community Edition (Raku Language Support)' (version '2023.07.0') is not compatible with the current version of the IDE, because it requires build 223.* or older but the current build is IC-243.23654.189 | |||
the README specifies "2024.2 or later" | |||
I'm wondering if it's truly incompatible or just a misconfiguration | 04:08 | ||
04:33
nine left,
nine_ joined,
camelia left
04:40
camelia joined
04:42
guifa left
05:00
yewscion joined
05:03
yewscion left
05:36
yewscion joined
05:39
yewscion left
06:02
yewscion joined
06:04
yewscion left
06:13
Aedil joined,
Aedil left
06:20
Aedil joined
06:21
Xliff left,
Xliff joined
06:55
yewscion joined
06:59
yewscion left
07:10
yewscion joined
07:13
yewscion left
07:27
jpn joined
07:35
ACfromTX left,
jpn left
07:38
jpn joined
07:47
jpn left
07:49
ACfromTX joined
07:54
ACfromTX left
08:03
yewscion joined
08:05
yewscion left
08:06
ACfromTX joined
08:09
jpn joined
08:26
tgt joined
08:29
jpn left
|
|||
ab5tract | I am guessing that you are using 2025.1 of IntelliJ? | 08:31 | |
08:45
Sgeo left
09:00
dakkar joined
09:13
apac joined
09:17
yewscion joined
09:19
yewscion left
09:34
yewscion joined
09:37
yewscion left
09:39
sena_kun joined
09:43
apac left
09:50
tib left
10:20
jpn joined
10:21
patrickb left,
thatonelutenist left,
greenfork left
10:22
atweedie left
10:34
librasteve_ left
10:47
yewscion joined
10:48
ryoskzypu left,
ryoskzypu joined
10:51
yewscion left
10:56
ryoskzypu left
10:58
ryoskzypu joined
11:18
human-blip left,
eseyman left
11:20
human-blip joined
11:26
ryoskzypu left
11:28
ryoskzypu joined
11:32
jpn left
11:35
atweedie joined,
thatonelutenist joined,
greenfork joined,
patrickb joined
11:36
jpn joined
11:41
yewscion joined
11:44
yewscion left
12:00
nine_ is now known as nine
12:14
melezhik joined
12:15
melezhik left
12:17
jpn left
|
|||
grondilu | Hello. `unit module Foo; our constant %TREE = do { my %tree; do-some-stuff(%tree); %tree }` <-- shoudn't %TREE be calculated only once? | 12:18 | |
lizmat | it should, doesn't it ? | 12:19 | |
grondilu | doesn't seem so. To be clear I meant once after the first "compilation". | 12:20 | |
or execution of the program. | 12:21 | ||
in a nutshell `do-some-stuff` here takes about two hours so I'd like to store the result in the compilation unit. | |||
lizmat | ah... you mean that installing appears to be doing it again ? | 12:22 | |
or that *after* installing, it appears to be doing it again once | |||
grondilu | I haven't tried installing it. Just executing twice. | ||
lizmat | are you running with -I. ? | ||
grondilu | yes | 12:23 | |
lizmat | so, if you didn't change your code, and load the module twice with -I., it would execute it twice ? | ||
grondilu | it does | ||
lizmat | how do you load the module? -Mfoo ? | 12:24 | |
grondilu | well, not really loading the module, just executing it. | ||
let me try loading | |||
lizmat | yeah, that's the difference | ||
just loading the module won't precomp | |||
grondilu | not sure what I'm missing, but I got "cannot find Foo in:" Yet I've named the file Foo.rakumod, it's in the current directory and I used -I. | 12:28 | |
lizmat | is it correctly defined in the "provides" section of the META6.json file ? | 12:29 | |
grondilu | yeah that's the issue. | ||
grondilu didn't pay attention to the relevant line in the error message | 12:30 | ||
I can now confirm loading the module twice does not execute the building code twice. | 12:31 | ||
lizmat | *phew* | ||
still, you will see it getting re-precompiled once after installation | |||
grondilu | that's ok | ||
12:31
jpn joined
|
|||
lizmat | that's because the repo chain from installation is different from the default repo-chain | 12:32 | |
grondilu | However now I wonder if zef will complain about a module that takes about two hours to compile... | ||
lizmat | an alternate solution might be to generate a file that can be easily read at module INIT time | ||
so you wouldn't have to wait every time you make a change to the source of the module | 12:33 | ||
grondilu | that makes sense. In JSON for instance? | ||
lizmat | well, you want a hash in the end, right? | ||
grondilu | yes | ||
lizmat | and parsing the hash would be fast, yes ? | ||
grondilu | yes | ||
lizmat | you could generate the source code into your module using special markers | 12:34 | |
that approach is used in the setting in a few places | |||
see e.g. github.com/rakudo/rakudo/blob/main...ARRAY.raku | 12:35 | ||
it reads a source file, looking for a start marker, then absorbs everything until an end marker, then generates new info, and then passes everything through again | 12:36 | ||
grondilu | lol that seems to hacky for me | ||
12:36
jpn left
|
|||
grondilu | I'll just use JSON | 12:37 | |
lizmat | perhaps a better example; github.com/lizmat/Text-Emoji/blob/...mojis.raku | ||
the advantage to this approach is that you won't have any runtime overhead of interpreting JSON | 12:38 | ||
it *would* just be a precomped hash in your code | |||
the would be the result: github.com/lizmat/Text-Emoji/blob/...ji.rakumod | 12:39 | ||
grondilu | I'll look into it | ||
lizmat | perhaps I should abstract this logic into a module :-) | 12:42 | |
12:52
jpn joined
12:53
ACfromTX left
13:01
jpn left
13:02
jpn joined
13:35
tgt left
13:38
explorer joined
13:56
sorenson left,
sorenson joined
13:58
yewscion joined
14:00
yewscion left
14:30
yewscion joined
14:33
yewscion left
14:41
yewscion joined
|
|||
librasteve | hi! | 14:51 | |
I am trying to dynamically add methods via the MOP like self.^add_method($method-name, &new-method); ... but I also want to apply a custom trait is routable ... ChatGPT is failing me - can anyone help me out please? | 14:52 | ||
14:53
nine left,
nine joined
|
|||
antononcube | Try DeepSeek. (I helped.) | 15:01 | |
librasteve | i tried ... deepseek also not on the ball here | 15:12 | |
[Coke] | I don't see an obvious way in MethodContainer's add_method to include a trait, nor do I see an add_trait anywhere. | 15:18 | |
librasteve | okaay - need a rethink then | 15:19 | |
tx! | |||
antononcube | @librasteve What LLM persona prompt(s) do you use for your LLM-Raku questions? | 15:30 | |
melezhik. | I put a proposal on using Sparrow/Raku for internal alpine Linux development, let’s see how it goes - gitlab.alpinelinux.org/alpine/alpi...sues/10608 … | 16:15 | |
16:24
manu_ joined
16:31
yewscion left
16:38
dawids joined
|
|||
lizmat | librasteve you can execute a trait just like a subroutine on a Method object | 16:46 | |
sub trait_mod:<is>(Method:D $m, :$routable!) { ... }; trait_mod:<is>(&new-method) | 16:48 | ||
sub trait_mod:<is>(Method:D $m, :$routable!) { ... }; trait_mod:<is>(&new-method, :foo) | |||
timo | well, :routable probably :P | ||
lizmat | sub trait_mod:<is>(Method:D $m, :$routable!) { ... }; trait_mod:<is>(&new-method, :routable) | ||
yeah, | |||
16:57
yewscion joined
17:04
sena_kun left
17:06
jpn left
17:16
nil78 left
17:18
nil78 joined
17:27
apac joined
17:45
dawids left
17:58
dakkar left
18:10
yewscion left
18:19
jpn joined
18:27
ryoskzypu left
18:29
ryoskzypu joined,
ryoskzypu left
18:34
jpn left
18:42
jpn joined
18:46
apac left
18:47
jpn left
19:00
yewscion joined
19:09
ryoskzypu joined
19:23
zetaaaa joined
19:45
yewscion left
20:05
yewscion joined
20:16
Aedil left
20:17
guifa joined
20:42
jaguart left
20:43
yewscion left
21:37
jpn joined
21:39
yewscion joined
21:44
yewscion left
21:54
sena_kun joined
22:01
jpn left
|
|||
librasteve | ah … lemme try that tomorrow - sounds good | 22:30 | |
23:07
sena_kun left,
sena_kun joined
23:19
jpn joined
23:22
sena_kun left
23:30
nil78 left
23:32
nil78 joined
23:39
explorer left
|
|||
[Coke] | paulbutler.org/2025/smuggling-arbi...-an-emoji/ - I think our string handling scrubs this trick of using variation selectors to embed extra info in your string | 23:42 |