🦋 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
00:09
jpn joined
00:13
jpn left
01:13
linkable6 left,
squashable6 left,
sourceable6 left,
benchable6 left,
coverable6 left,
bisectable6 left,
nativecallable6 left,
quotable6 left,
releasable6 left,
notable6 left,
greppable6 left
01:14
greppable6 joined,
squashable6 joined,
linkable6 joined,
notable6 joined
01:15
benchable6 joined,
releasable6 joined,
coverable6 joined,
sourceable6 joined,
bisectable6 joined
01:16
quotable6 joined,
nativecallable6 joined
01:51
jpn joined
01:56
jpn left
02:20
teatwo joined
02:23
tea3po left
02:24
jdv_ is now known as jdv
03:24
linkable6 left,
evalable6 left
03:25
linkable6 joined
03:27
evalable6 joined
03:39
jpn joined
03:44
jpn left
04:31
squashable6 left
04:33
squashable6 joined
05:02
jpn joined
05:07
jpn left
06:00
reportable6 left
06:02
reportable6 joined
06:27
jpn joined
06:32
jpn left
06:50
codesections left
06:53
jpn joined
06:54
codesections joined
07:05
jpn left
07:16
codesections left,
codesections1 joined
07:18
codesections1 is now known as codesections
07:27
abraxxa joined
07:33
Xliff left
07:36
codesections1 joined
07:37
codesections left,
codesections1 is now known as codesections
07:39
abraxxa left
07:48
dakkar joined
08:10
Sgeo left
08:51
abraxxa joined
09:19
jpn joined
09:39
jast left,
jast joined
10:37
jpn left
10:39
derpydoo left
10:40
zara joined
11:03
ab5tract joined
11:22
codesections left
11:34
jpn joined
11:42
jpn left
12:00
reportable6 left
12:01
abraxxa left,
reportable6 joined
|
|||
lizmat | heh, Raku on HackerNews frontpage: news.ycombinator.com | 12:07 | |
news.ycombinator.com/item?id=36118913 | 12:08 | ||
12:10
jpn joined
12:15
jpn left
12:19
human_blip left
12:26
abraxxa joined
12:44
jpn joined
|
|||
lizmat clickbaits rakudoweekly.blog/2023/05/29/2023-...t-rolling/ | 12:58 | ||
13:17
m_athias left,
m_athias joined
14:13
Sgeo joined
14:20
tea3po joined
14:22
abraxxa left
14:23
teatwo left
15:23
evalable6 left,
linkable6 left
15:24
evalable6 joined
15:26
linkable6 joined
15:27
xinming left
15:29
xinming joined
15:43
zara left
15:54
gfldex left
16:02
jpn left
16:26
sena_kun joined
16:35
dakkar left
|
|||
Tirifto | While using Inline::Perl5, has anyone had to pass a variable to a function, for a value to be stored inside it? It seems like a Perl function wants me to do that, but the value I’m trying to pass is effectively read-only. | 17:15 | |
17:25
xinming left
17:26
xinming joined
17:37
gfldex joined
|
|||
Tirifto | (At least passing a scalar has Raku tell me it’s read only, and making it into a capture first doesn’t seem to do the trick…) | 17:49 | |
[Coke] | add "is copy" ? | 17:55 | |
or "is rw" | |||
18:00
reportable6 left
18:01
reportable6 joined
|
|||
Tirifto | [Coke], wouldn’t I have to do that in the function/signature declaration? The function comes from Perl 5, though. | 18:07 | |
[Coke] | oops, yes | 18:10 | |
how do you call this from p5? | 18:14 | ||
Tirifto | I am trying to use the Curses library. <metacpan.org/pod/Curses> I import it with ‘use Curses:from<Perl5>;’, then I call ‘initscr;’ to create a window, and then I want to call ‘getyx’ to get the coordinates at which the window starts. | 18:23 | |
Apparently ‘getyx’ should take three arguments: the window, a variable into which the y-coordinate will go, and a variable into which the x-coordinate will go. | 18:24 | ||
I get the window by calling ‘stdscr()’ (which gets imported), and then I’m not sure how to pass the two variables next to that. | 18:25 | ||
If I create them with ‘my ($y, $x)’ first, none of these approaches seem to work: 1: ‘getyx(stdscr(), $y, $x);’, 2: ‘getyx(\(stdscr(), $y, $x))’, 3: ‘my $arg = \($x, $y); getyx(stdscr(), |$arg);’, 4: ‘my $arg = \($x, $y); getyx(stdscr(), $arg);’ | 18:28 | ||
Well, approach 4 doesn’t throw and error, but I also leaves the variables $x and $y empty. | 18:30 | ||
Sorry if this is a bit too specific and/or convoluted. x) | |||
[Coke] | nine: any thoughts on this? | 19:06 | |
19:13
sena_kun left
|
|||
nine | According to the README it should be getyx(stdscr(), \($y), \($x)) | 19:34 | |
But I fear that won't do either, as that function doesn't seem to require references. The C code seems to modify those SVs in place. | 19:35 | ||
This may require a perl wrapper for functions that do such dirty tricks. | 19:38 | ||
19:47
jpn joined
|
|||
Tirifto | nine, so I could do something like write a Perl function which takes a reference and then dereferences it before passing the variables to the actual function I wanted to call, right? :o | 19:52 | |
nine | I'd just create a sub getyx_res { my ($scr) = @_; my ($y, $x); getyx($std, $y, $x); return ($y, $x) } | 19:53 | |
19:57
jpn left
|
|||
tonyo | should that be scr rather than std? | 20:04 | |
20:22
codesections joined
20:24
coleman left
|
|||
nine | ah, yes | 20:27 | |
20:28
coleman joined
20:45
coleman_ joined
|
|||
lizmat | the final installment of RakuAST for Early Adopters: dev.to/lizmat/shaking-the-rakuast-tree-307 | 20:46 | |
20:49
coleman_ left
21:05
user___ left
21:06
dogbert11 joined,
Archenoth joined
21:07
jargan joined
21:08
tobs` joined,
kaskal joined,
jrjsmrtn_ joined
21:09
simcop2387_ joined,
phogg` joined
21:11
peder_ joined,
phogg` left,
phogg` joined,
phogg left,
phogg` is now known as phogg,
El_Che_ joined,
ismustachio_ joined,
kjp_ joined
21:12
Maylay_ joined,
Tirifto_ joined
21:16
jast left,
Tirifto left,
jrjsmrtn left,
kaskal- left,
kjp left,
peder left,
tobs left,
Maylay left,
dogbert17 left,
El_Che left,
simcop2387 left,
ismustachio left,
tobs` is now known as tobs,
peder_ is now known as peder,
simcop2387_ is now known as simcop2387,
Archenoth is now known as arch
|
|||
tbrowder__ | where/when is the raku core conf? remote access available? | 21:36 | |
22:15
jpn joined
22:20
jpn left
|
|||
elcaro | Tirifto_: maybe a loaded question, but any reason stopping you from using NCurses lib (raku.land/github:azawawi/NCurses)? | 22:32 | |
kawaii | I keep getting told that `No such method 'basename' for invocant of type 'Str'` - but I've double checked this about 4 times now and I'm almost certain that `.IO` is being used correctly here to convert the strings to an `IO::Path` object, no? www.irccloud.com/pastebin/GhfQRC0E/ | 22:45 | |
elcaro | Yeah, it looks correct. Maybe check what `$file.^name` says, and whats in `$file.^methods`. | 23:03 | |
maybe don't shadow `$file` on that inner loop ? | 23:05 | ||
You declare `my $file`, then later... `for $archive.files -> $file` | 23:06 | ||
kawaii | ah yeah the shadowing is not ideal, but you pointed me in the right place, `.dirname` is returning a Str :^) | 23:16 | |
thanks elcaro | |||
elcaro | oh, I didn't even see that `.basename` :) | 23:17 | |
was just looking at the first one | |||
maybe you want `.parent` (which returns an IO) instead of `.dirname` | 23:18 | ||
23:20
evalable6 left,
linkable6 left
23:21
evalable6 joined
23:22
linkable6 joined
|