🦋 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:49
jpn joined
00:50
MasterDuke joined
00:54
jpn left
00:59
Maylay left
01:19
kylese left,
kylese joined
01:20
jpn joined
01:25
jpn left
01:27
Maylay joined
01:39
Maylay left
01:49
Maylay joined
01:50
jpn joined
01:55
jpn left
02:15
kylese left,
kylese joined
02:17
lain` left
02:20
lain` joined
02:22
jpn joined
02:26
jpn left
02:33
Aedil left
02:38
Aedil joined
02:51
jpn joined
02:56
jpn left
03:52
jpn joined
03:57
jpn left
04:31
jpn joined
04:36
jpn left
04:53
jpn joined
04:58
jpn left
05:25
[Coke]_ joined
05:27
[Coke] left
05:30
Sgeo left
05:54
jpn joined
05:59
jpn left
06:13
jpn joined
06:17
jpn left
06:19
Voldenet left
06:20
Voldenet joined
07:00
xelxebar left
07:02
thaewrapt left
07:08
hvxgr left,
hvxgr joined
07:09
thaewrapt joined
07:14
thaewrap1 joined
07:16
thaewrapt left
07:17
xelxebar joined
07:20
swaggboi left
07:24
xelxebar left
07:25
xelxebar joined
07:32
sena_kun joined
07:33
xelxebar left
07:34
xelxebar joined,
swaggboi joined
07:37
jpn joined
07:41
jpn left
08:00
sena_kun left
08:01
merp left
08:18
dakkar joined
|
|||
lizmat | m: say (1,2.2,3e0,4i).are | 08:19 | |
camelia | (Numeric) | ||
lizmat | m: say (1,2.2,3e0,4i,"foo").are | ||
camelia | (Cool) | ||
lizmat | m: say (1,2.2,3e0,4i,"foo",now).are | 08:20 | |
camelia | (Cool) | ||
lizmat | m: say (1,2.2,3e0,4i,"foo",Date.today).are | ||
camelia | (Any) | ||
lizmat | wayland: ^^^ | ||
tellable6 | lizmat, I'll pass your message to wayland | ||
09:07
wayland joined
|
|||
wayland | m: my int8 $a = 42; say $a.WHAT | 09:09 | |
camelia | (Int) | ||
tellable6 | 2024-07-16T08:20:45Z #raku <lizmat> wayland: ^^^ | ||
wayland | Anyone know how to print out the native type (int8)? | ||
lizmat: Great! That's definitely going to save me from reimplementing it poorly :D | 09:14 | ||
lizmat | wayland: more recently there's also .are(type) which will return a Bool indicating whether all types match the given type | 09:15 | |
wayland | Oh, nice! | ||
lizmat | re: my int8 $a, there's currently no way to find out other than to dive deep into nqp land | 09:16 | |
int8 is not a HLL type itself, so it will upgrade all accesses to Int and that's what you're seeing | |||
wayland | Oh, that's a pity. I was going to use it to create eg. fields in Postgres that had the relevant types. But if it's not easily implemented, then I'll stick to more general types for now, and implement that later. | 09:17 | |
Hmm. The search for this channel won't do dates after 2024-06-13. | 09:20 | ||
09:21
jpn joined
|
|||
wayland | Oh. But then it ignores the date and searches to today anyway. | 09:21 | |
Oh, my bad, I just needed to click refresh. Soz. | 09:22 | ||
lizmat | yeah, one of the buglets that I need to fix one of these days | 09:23 | |
09:30
thaewrap1 left
09:32
thaewrapt joined
|
|||
wayland | Another question: Where do I go to read about the ::T syntax? I had a skim through some of the doco, but didn't see anything that looked useful. | 09:33 | |
lizmat | good question: I hoped to find something under generics... but alas... | 09:39 | |
please make a doc issue for this | |||
wayland: vrurg.github.io/2020/11/16/Report-...-Coercions | 09:40 | ||
and vrurg.github.io/2020/11/30/Report-...ons-Part-2 | 09:41 | ||
wayland | lizmat: docs.raku.org/language/signatures#Type_captures maybe? | 09:44 | |
lizmat | heh... yes | 09:45 | |
internally they're called generics ... been spending too much time on internals this year :-) | |||
wayland | m: my ::T = Str; say ::T; | 09:46 | |
camelia | ===SORRY!=== Error while compiling <tmp> Malformed my at <tmp>:1 ------> my ::T⏏ = Str; say ::T; |
||
wayland | I'm essentially trying to store a type in a variable again. | 09:47 | |
lizmat | m: sub a(::T $a) { dd $a }; a Str | ||
camelia | Str | ||
lizmat | but if it's just about storing a type: | 09:48 | |
09:48
jpn left
|
|||
lizmat | m: my $a = Str; say $a | 09:48 | |
camelia | (Str) | ||
wayland | Yes, I'm aware that it can be done via a signature, but I want to store it in an attribute of an object. Essentially I have an object that represents a field in a DB. But maybe I should just go with Parameter.new() and put that in the attribute. | ||
Oh, yeah, that's easier :). | 09:49 | ||
lizmat | if you want to make sure that only types can be stored, you could use the Any:U constraint | 09:50 | |
m: 'my Any:U $a = Str; say $a | |||
camelia | ===SORRY!=== Error while compiling <tmp> Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at <tmp>:1 ------> 'my Any:U $a = Str; say $a⏏<EOL> expecting any of: … |
||
lizmat | m: my Any:U $a = Str; say $a | 09:51 | |
camelia | (Str) | ||
lizmat | m: my Any:U $a = "foo"; say $a | ||
camelia | Type check failed in assignment to $a; expected Any:U but got Str ("foo") in block <unit> at <tmp> line 1 |
||
09:52
jpn joined
|
|||
wayland | Oh, nice! Thanks! | 09:52 | |
lizmat: Done! github.com/Raku/doc/issues/4499 | 09:56 | ||
lizmat: Should I put in a bug requesting a way to identify native types, or is that covered somewhere already? | 09:57 | ||
lizmat | yeah, that feels like a good idea :-) | 09:58 | |
wayland | lizmat: Does it go on github.com/rakudo/star ? | 10:01 | |
lizmat | no, /rakudo/rakudo please | ||
wayland | OK, thanks! | ||
10:02
jpn left
|
|||
lizmat | m: my int8 $a; dd $a.VAR.HOW.native_type.^name # getting closer | 10:03 | |
camelia | "int" | ||
lizmat | it *is* somewhere in the bowels :-) | 10:04 | |
wayland | lizmat: OK, created one for that too: github.com/rakudo/rakudo/issues/5605 :) | 10:11 | |
10:11
lucerne left
|
|||
lizmat | thanks! | 10:11 | |
10:12
lucerne joined
10:36
Sevalecan left
10:37
Sevalecan joined
10:45
jpn joined
10:50
jpn left
11:19
guifa joined
11:24
guifa left
11:58
jpn joined
12:03
jpn left
12:08
gordonfish left,
gordonfish joined
12:50
vrurg left,
vrurg joined
12:55
vrurg left
12:58
jpn joined
13:00
vrurg joined,
vrurg left
13:01
vrurg joined
13:07
vrurg left,
vrurg joined
13:20
[Coke] joined
13:22
[Coke]_ left
13:26
jgaz joined
|
|||
tbrowder | and alias to “native-type”? | 13:35 | |
15:14
MasterDuke left
15:37
Maylay left
15:40
Maylay joined
15:50
Maylay left
16:02
Maylay joined
16:06
elcaro left,
elcaro joined
16:11
Maylay left
16:16
Maylay joined
16:21
jpn left
16:28
Maylay left
16:37
dakkar left
16:39
Maylay joined
16:44
snonux left,
snonux joined
16:47
Maylay left
16:51
phogg left
16:52
phogg joined,
Maylay joined
17:06
Maylay left
17:15
[Coke] left,
[Coke] joined
|
|||
[Coke] | TIL about "/layout save" on irssi. nice | 17:16 | |
That only took me 20 years. | 17:22 | ||
17:24
Maylay joined
17:34
Maylay left
17:40
Maylay joined
17:52
Maylay left
17:57
Maylay joined
18:05
vrurg left,
vrurg joined
18:06
Maylay left
18:08
sena_kun joined
18:19
Maylay joined
18:26
Maylay left
|
|||
jdv | took me about that long to learn about the esc-# to select channels | 18:30 | |
hitting ctrl-p and ctrl-n via connectbot on android was such a pain | 18:31 | ||
[Coke] | Anyone here have a 3d printer? | 18:46 | |
18:46
Maylay joined
19:01
Maylay left
19:02
jpn joined
19:10
jpn left
19:12
jpn joined
19:20
jpn left
|
|||
[Coke] | makerworld lets you turn a png into a keychain fob, so I made a 4-color camelia (not as nice as the default 6-color, but easy to print on my rig.) | 19:24 | |
19:29
Maylay joined
19:37
Maylay left
19:52
Maylay joined
19:58
Maylay left
20:00
JRaspass left,
JRaspass joined
|
|||
[Coke] | getting a "too many open files" in a raku/doc xt test after adding in calls via HTTP::Tiny. Any suggestions on how to track down what files are being kept open? | 20:05 | |
(I'm assuming it's really HTTP::Tiny items not getting closed) | 20:06 | ||
20:07
jpn joined
|
|||
ugexe | It’s almost certainly socket handles and the way that module handles it | 20:17 | |
You can probably manually close the connections yourself instead of relying on the module to handle it automatically | 20:18 | ||
[Coke] | The handle in HTTP::Tiny is a private attribute, unfortunately. | 20:27 | |
will poke around. | |||
Cro::HTTP::Client seems more robust, unsurprisingly. | 20:38 | ||
20:41
mtj left,
mtj joined
|
|||
[Coke] | (And faster) | 20:43 | |
20:55
jgaz left
21:05
Maylay joined
|
|||
[Coke] | so easy to handle 429 errors with cro & raku. woot | 21:12 | |
21:13
Maylay left
21:19
Maylay joined
21:24
ACfromTX left
|
|||
[Coke] | # X::Cro::HTTP2::GoAway+{X::Await::Died} | 21:26 | |
Getting that on occasional runs of the link checker. | 21:27 | ||
Looking at old cro logs, looks like maybe I should just retry when I get one. | 21:29 | ||
21:37
ACfromTX joined
21:44
thaewrapt left
21:50
thaewrapt joined
21:53
[Coke] left
21:56
[Coke] joined
22:06
Maylay left,
sena_kun left
22:11
Maylay joined
22:15
Maylay left
22:17
Sgeo joined
22:27
jpn left
22:31
Maylay joined
22:40
Maylay left
22:44
Maylay joined
|
|||
wayland | tell tbrowder tbrowder do you mean that we have a shorter version than what lizmat wrote above? | 22:51 | |
.tell tbrowder tbrowder do you mean that we have a shorter version than what lizmat wrote above? | 22:52 | ||
tellable6 | wayland, I'll pass your message to tbrowder | ||
23:06
jpn joined,
camelia left
23:10
MasterDuke joined,
wayland left
23:12
jpn left
23:30
Maylay left
23:31
sjn left,
sjn joined
23:36
Maylay joined
23:43
Maylay left
23:48
Maylay joined
|