🦋 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
guifa left
|
|||
wayland76 | Hi! I'm asking for a backtrace, and it's correct, except all the filenames are the originally-called filename. Has anyone seen anything like that before? | 00:15 | |
It's inside a docker container | 00:21 | ||
00:38
MasterDuke joined
00:49
guifa joined
|
|||
antononcube | Sorry, can't help... | 01:06 | |
wayland76 | No worries -- just wanted to see if it was a known thing. | 01:16 | |
01:22
eseyman left
01:24
eseyman joined
01:29
hulk joined,
kylese left
01:31
guifa left
|
|||
wayland76 | Hi all! I'm trying to have a variable that can be one or more named flags. My first instinct was to set up a role BitMaskEnumeration (as per the docs), and then, with "enum InitActions does BitmaskEnumeration { InitNone => 0b000, InitCreate => 0b001, InitAlter => 0b010 }" I tried making a variable of type InitActions. Should this allow me to set "create" and "alter" independently, or do I need to use junctions or something for that? | 01:33 | |
ie. what's the best way to do a flag variable that can be a combination of named flags, but the flags have to be predeclared -- not just making them up like Assoc keys | 01:34 | ||
The Bitmask enum seems to work alright when I want to compare values, but when I want to set the Alter value independently of the other values that might already be in the flag variable, I'm not getting anything useful. | 01:37 | ||
01:40
guifa joined
|
|||
wayland76 | Oh, or should I be using a Set? | 02:02 | |
No, sets aren't right either. | 02:08 | ||
02:15
hulk left
02:16
kylese joined
|
|||
avuserow_ | wayland76: a class with a bunch of Bool attributes and then a to-bitmask method? | 02:27 | |
02:30
kylese left
02:34
kylese joined
02:38
guifa left
02:59
jpn joined
|
|||
wayland76 | avuserow_: Could end up being my least bad option. | 03:09 | |
03:10
jpn left
03:14
kst`` is now known as kst
03:24
wayland joined
03:25
wayland76 left
03:33
jpn joined
|
|||
wayland | If I have a variable $x, how do I declare a new variable $y to have the same type as $x? | 03:48 | |
04:26
defaultxr joined
05:46
[Coke] left
05:47
[Coke] joined
05:48
kst`` joined
05:52
kst left
06:55
kylese left,
Sgeo left
06:57
kylese joined
07:20
jpn left
08:22
dawids_ joined
08:23
dawids_ left
08:34
sena_kun joined
08:48
abraxxa-home joined
|
|||
lizmat | wayland: I don't know of any way in core to do that, but perhaps this: | 09:00 | |
m: sub same(::T $a) is raw { my T $ }; my Int $x; my $y := same($x); dd $y | |||
camelia | Int $ = Int | ||
lizmat | m: sub same(::T $a) is raw { my T $ }; my Int $x; my $y := same($x); $y = 42; dd $y | 09:01 | |
camelia | Int $ = 42 | ||
lizmat | m: sub same(::T $a) is raw { my T $ }; my Int $x; my $y := same($x); $y = "foo"; dd $y | ||
camelia | Type check failed in assignment; expected Int but got Str ("foo") in block <unit> at <tmp> line 1 |
||
09:02
abraxxa-home left
|
|||
librasteve | nice! | 09:17 | |
lizmat | you actually don't need to have a variable | 09:33 | |
m: sub same(::T $a) is raw { my T $ }; my $y := same(666); $y = 42; dd $y | |||
camelia | Int $ = 42 | ||
10:08
synthmeat left
10:10
synthmeat joined
11:52
Chanakan joined
12:08
jpn joined
12:13
jpn left
14:26
Tirifto left
14:27
Tirifto joined
14:55
jpn joined
15:00
jpn left
|
|||
librasteve | hi - I have a long standing test that goes my \ν = c / λ⏏; but in latest raku 2024.05, I get | 15:32 | |
Unrecognized regex metacharacter ; (must be quoted to match literally) at /Users/stephenroe/Library/CloudStorage/Dropbox/GitWorld/raku-Physics-Constants/t/01-tst.rakutest:16 ------> my \ν = c / λ⏏; Unable to parse regex; couldn't find final '/' at /Users/stephenroe/Library/CloudStorage/Dropbox/GitWorld/raku-Physics-Constants/t/01-tst.rakutest:16 ------> my \ν = c / λ;⏏ | |||
yes, I am importing c (speed of light) and λ (wavelength) into the namespace along with an overloaded divide '/' | 15:33 | ||
anyway I'll make an issue | 15:34 | ||
[Coke] | latest is 2024.06, btw. | 15:39 | |
15:40
leah2 left
|
|||
librasteve | not for me (of you want to be pedantic) ;-) | 15:44 | |
(soz) | |||
github.com/rakudo/rakudo/issues/5601 | 15:54 | ||
[Coke] | I mention it on the off chance the bug was already fixed. | 16:11 | |
lizmat | fwiw, I can't reproduce on 2024.06 | 16:13 | |
16:22
soverysour joined,
soverysour left,
soverysour joined
|
|||
[Coke] | lizmat: looks like you installed "Physics::Unit", not "Physics::Constant" | 16:27 | |
? | |||
lizmat | Oops | ||
[Coke] | er, "Constants" | 16:32 | |
I was able to install Physics::Constants on 2024.06 on mac no issues | 16:37 | ||
16:38
leah2 joined
|
|||
lizmat as well, and have updated the comment [Coke]++ | 16:38 | ||
[Coke] | The test failures happens only with the last two commits applied in your own repo. | 16:50 | |
installing the published v1.0.3 is fine, testing the v1.0.3 tag in your repo is fine. Noted on ticket, probably safe to close. | 16:51 | ||
You should not be using use lib "../lib" in your tests. | 16:54 | ||
Also: is the new infix / coming from Physics::Measure, which had a 2.0.0 release a week ago? | 16:58 | ||
17:02
leah2 left
|
|||
[Coke] | (Shouldn't matter since reverting the commits in ::Constants avoids the test failure, but maybe there's an interaction there that wouldn't have been triggered with an older version of ::Measure | 17:14 | |
tested with 2024.04 on my mac - git HEAD on your repo still fails. | 17:30 | ||
closed ticket | |||
17:32
soverysour left
17:34
soverysour joined
|
|||
librasteve | thanks for all the rapid help - I can confirm that 2024.06 works ok on my machine | 17:41 | |
17:47
leah2 joined
17:48
soverysour left,
wayland left
17:52
wayland joined
17:55
Sgeo joined
18:11
jpn joined
18:33
jpn left
18:38
jpn joined
18:41
soverysour joined
19:02
jpn left
19:07
soverysour left
19:09
soverysour joined
|
|||
ingy | librasteve: ++ on the TPRC reply :) | 19:20 | |
19:21
lain` joined
19:23
soverysour left
19:38
soverysour joined
19:40
jpn joined
19:52
jpn left
|
|||
librasteve | yw | 19:53 | |
20:09
librasteve_ joined
|
|||
librasteve_ | crag of the day … `crag '$v^=^([1,2,3],"m/s"); $m=4kg; $p^=$m*$v^; say "p^=$p^”’` | 20:10 | |
`p⃗=^(4, 8, 12)kg m/s` | 20:11 | ||
librasteve | ^^ adding vectors, vector notation and speed | 20:12 | |
20:55
guifa joined
|
|||
vendethiel | I like ^=^ | 21:08 | |
21:18
vrurg joined
21:32
soverysour left
22:24
sena_kun left
22:59
librasteve_ left
23:25
wayland76 joined,
wayland left
23:45
guifa left
|