🦋 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:53
itaipu left
01:07
itaipu joined
01:43
kylese left
01:44
kylese joined
02:15
kylese left,
kylese joined
02:26
Aedil joined
03:04
itaipu left
03:22
itaipu joined
03:56
xelxebar_ left,
ben_m joined
03:58
xelxebar joined
|
|||
ben_m | Hello, is there a way to overwrite an operator's associativity? I'm looking for the best way to do something like `[\+] <1 2 3> #=> (1 + 2 + 3, 2 + 3, 3)` without either defining a new + operator or reversing twice. | 04:03 | |
04:18
ben_m left
05:13
Aedil left
05:30
Sgeo left
06:39
Aedil joined
06:50
itaipu left
08:56
kst left
|
|||
lizmat | m: BEGIN trait_mod:<is>(&[+], :tighter(&[*])); say 1 + 3 * 4 # doesn't appear to work | 10:12 | |
camelia | 13 | ||
11:51
ben_m joined
|
|||
librasteve | m: sub infix:<+r>($a, $b) is assoc<right> { $a + $b }; say [+r] <1 2 3>; | 12:31 | |
evalable6 | (exit code 1) 4===SORRY!4=== Er… | ||
Raku eval | (3 5 6) | ||
evalable6 | librasteve, Full output: gist.github.com/87c206e83baf2c5461...4b27b5cc4b | ||
librasteve | ben_m: this is close, but doesn't quite give what you asked for since the first result is the rightmost item | 12:34 | |
[oh and on the Discord bridge its dropping the backslash should be say [\+r] <1 2 3>; | 12:36 | ||
] | |||
12:59
xinming joined
|
|||
lizmat | PSA: raku.org and a bunch of other sites are currently offline, the infra team is investigating | 13:17 | |
13:19
itaipu joined
|
|||
antononcube | Damn! Now we have only LLMs to rely upon for Raku inquiries... | 13:21 | |
andinus | docs.raku.org/ is up currently | 13:25 | |
13:25
itaipu left
|
|||
antononcube | 💯 | 13:25 | |
andinus Hmmm... that halts my LLM promotion. (For now...) | 13:26 | ||
13:26
itaipu joined
13:29
Xliff joined
|
|||
Xliff | Hello! Does anyone here use Blender? | 13:29 | |
I'm interested in seeing if we can bring the Blender API to Raku. | |||
antononcube | Here is a conspiracy theory instead -- > A certain recent DDOS attack spilled over to raku.org. Maybe not completely by accident, some of the attackers might not like Raku. | 13:30 | |
Especially, after seeing attempts to use Blender from Raku. | 13:31 | ||
lizmat | antononcube I assume you use docs.raku.org mostly no? that's still online | 13:35 | |
antononcube | Yes, it is -- I verified earlier. | 13:40 | |
lizmat | yeah, that's hosted in Germany... seems we lost all servers hosted in Finlandd | 13:41 | |
13:58
itaipu left
|
|||
ben_m | librasteve: Interesting, I thought defining a new operator would work and I was trying to avoid doing that, but not even that gets the exact results. | 13:59 | |
[Coke] | (finland) huh | 14:07 | |
antononcube | Did Trump talk to Musk from Finland? Or the other way around? | 14:09 | |
14:15
itaipu joined
|
|||
lizmat | PSA: a temporary server is being set up by the infra team | 14:26 | |
14:41
evalable6 left,
evalable6 joined,
benchable6 left,
benchable6 joined
|
|||
lizmat clickbaits rakudoweekly.blog/2024/08/12/2024-...6c-ending/ | 15:45 | ||
15:55
[Coke] left
15:56
[Coke] joined
|
|||
[Coke] | OK, I have failed as a father. one of the kids just unplugged the router and didn't warn anyone. | 15:56 | |
(while I was on a work zoom, even.) | |||
Xliff | <antononcube> Especially, after seeing attempts to use Blender from Raku. # Anton, was this a slight dig at the question I just asked? | 16:02 | |
16:04
leah2 left
|
|||
lizmat | raku.org is up again, andinus++ | 16:06 | |
as is rakudo.org | 16:10 | ||
16:18
leah2 joined
|
|||
Xliff | <antoncube> I think using IPC via protlib (courtwright.org/protlib/) would work. | 16:25 | |
We'd need a wire->python->blender bridge and a raku->wire bridge | 16:26 | ||
Bonus points for a python->wire bridge | |||
Think about it like this: Blender networked renderers taking orders from a central blender server for Renders. | 16:27 | ||
16:41
leah2 left
|
|||
antononcube | @Xliff I think we discussed this before -- I remember looking at Python's API for Blender, and proposing to feed it to an LLM, or five. | 16:51 | |
16:54
leah2 joined
|
|||
Xliff | Heh! OK! | 17:00 | |
17:03
sena_kun left
17:05
sena_kun joined
17:32
gabiruh joined
18:14
euandreh joined
18:18
euandreh left
18:21
sena_kun left
18:22
sena_kun joined
18:25
xinming left
18:27
xinming joined
18:32
euandreh joined
18:36
xinming left
18:38
xinming joined
18:41
abraxxa-home joined
18:58
xinming left
19:00
xinming joined
19:01
Aedil left
19:18
abraxxa-home left
19:59
ben_m left
20:20
euandreh left
20:30
sena_kun left
21:06
dustinm` left
21:12
dustinm` joined
21:42
MasterDuke joined
22:02
guifa joined
22:35
Sgeo joined
|
|||
guifa | Can I safely pass %?RESOURCES<foo>.absolute to a native call to read a file? I know file names get mangled when installed by zef | 22:38 | |
ab5tract | guifa: you might be able to get the actual file descriptor by poking at the object with nqp | 22:49 | |
(after calling IO on it) | |||
guifa | it's a load once thing so passing an absolute path is good enough (plus the Obj-C method I'm calling wants a path) | 22:50 | |
ab5tract | Have to say that I don’t totally love the difficulty of interacting with resources | ||
For some reason I have this feeling that .absolute was removed recently.. | 22:51 | ||
But if you can .absolute.IO.open then I would expect the path to be sufficient for native call as well | 22:52 | ||
22:53
tbrowder left
22:54
skaji__ left
22:55
pony left,
tbrowder joined
22:58
pony joined,
skaji__ joined
|
|||
guifa | I'm almost ready to show off my little canvas-y project, at least an extreme basic version of it | 23:05 | |
ugexe | yeah you generally should not expect things to have a path to the file system, see github.com/ugexe/Raku-CompUnit--Re...ry--Github | 23:06 | |
technically you are probably ok getting the path off of %?RESOURCES although we don't actually support doing that for the reason I mentioned | |||
23:06
mort1 joined
23:07
mort left,
mort1 is now known as mort
|
|||
ugexe | what I've usually done is copy a file from %?RESOURCES to a known file system location, and then use that file path | 23:07 | |
guifa | is there a good cross-platform temp file location to use? | 23:08 | |
ugexe | i use $*TMPDIR.add('my-app') | ||
guifa | aaaaaah totally did not realize there was a $*TMPDIR | 23:09 | |
so copy on a Distribution::Resource would be considered safe?, e.g., `copy %?RESOURCES<foo>, $*TMPDIR.add('foo')` | 23:11 | ||
ugexe | my $source = %?RESOURCES<foo>.slurp; $*HOME.add('my-app').spurt($source); # is how i would do it | 23:14 | |
evalable6 | Use of uninitialized value $source of type Any in string context. Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at /tmp/MQNfo3M10A line 1 |
||
ugexe | which also note i use $*HOME instead of $*TMPDIR usually | ||
github.com/sergot/openssl/blob/fd6...akumod#L34 (although here is an actual example where i used $*TMPDIR so 🤷) | 23:17 | ||
guifa | alright noted | 23:18 | |
actually while we're on it | 23:30 | ||
what's the safest way to call an included library? I seem to recall we've had both /bin and /resources/library (or was it libraries) | 23:34 | ||
but my search foo failed miserably on docs.raku | |||
right now I'm doing Proc::Async(%?RESOURCES<foo>) but I'm willing to bet 100 that's not an ideal method | 23:35 | ||
ah it's in the nativecall not the modules one | 23:38 | ||
right now I'm using the stdin/stdout to pass messages, I guess if I switch to proper native call I'll need to pass in a pipe | 23:42 | ||
assuming obj-c .so works with NativeCall | 23:43 | ||
tbrowder | note when slurping and spurting you should add :bin if you have problems | 23:51 | |
lizmat: in yr getting rid of the old p6c stuff have you gotten to CompUnit::Util yet? it still has a bug that messes up installing Archive::SimpleZip | 23:55 |