🦋 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:15
swaggboi left
00:17
swaggboi joined
00:22
lichtkind left
01:08
dg joined
01:27
kylese left,
kylese joined
02:15
kylese left,
kylese joined
|
|||
Voldenet | librasteve: maybe exclude line numbers in the end of the article, because it's a bit tough to copy the code from it :P | 03:27 | |
04:02
guifa left
04:30
kylese left
04:34
kylese joined
05:03
abraxxa-home joined
05:30
kylese left
05:32
kylese joined
05:42
stanrifkin joined
06:04
merp left
06:20
abraxxa-home left
06:21
abraxxa-home joined
06:27
abraxxa-home left
06:28
abraxxa-home joined,
abraxxa-home left
06:32
Sgeo left
|
|||
librasteve | voldemort: good advice .. tx! … should be ok now | 07:17 | |
lizmat | that is a weird autocomplete librasteve :-) | 07:21 | |
07:54
melezhik joined
07:55
melezhik left
|
|||
Voldenet | it makes me feel more powerful, so I appreciate the typo :> | 08:10 | |
08:11
sena_kun joined
08:30
Aedil joined
08:32
lichtkind joined
08:41
Aedil left
08:44
Aedil joined
09:05
bdju left,
jpn joined
09:07
bdju joined,
sena_kun left
|
|||
timo | unfortunately you don't have a nose any more :( | 09:54 | |
librasteve | i blame it on my small checker | ||
10:44
mirHalel joined
10:47
mirHalel left
10:55
guifa joined
|
|||
Voldenet | oh no : ( | 11:05 | |
now I get why the code smell stopped bothering me | |||
11:39
jpn left
|
|||
Voldenet | are those two pieces of code equivalent? I suspect they aren't: | 11:47 | |
m: my $x = ^10; my @y := $x; .say for @y; | |||
camelia | 0 1 2 3 4 5 6 7 8 9 |
||
Voldenet | m: my $x = ^10; say @$x; | ||
camelia | (0 1 2 3 4 5 6 7 8 9) | ||
Voldenet | erm | ||
m: my $x = ^10; .say for @$x; | |||
camelia | 0 1 2 3 4 5 6 7 8 9 |
||
11:49
apac left
|
|||
Voldenet | but I can't find docs for syntax on `@$x` | 11:49 | |
11:52
jpn joined
|
|||
timo | @$foo is like @($foo) is like $foo.list | 11:55 | |
Voldenet | Makes sense, I found docs for it docs.raku.org/type/Any#index-entry...extualizer | ||
11:56
apac joined
11:59
guifa left
12:18
apac left
12:22
apac joined
12:23
bbkr joined
|
|||
bbkr | m: "foo/../foo/file01.txt".IO.succ.say; | 12:24 | |
camelia | "foo/../foo/file01.txt".IO | ||
bbkr | m: "foo/../foo/file01.txt".IO.basename.succ.say; | 12:25 | |
camelia | file02.txt | ||
bbkr | ^ bug? happens only when path backtracks, basename is not bumped +1 despite being properly recognized. | 12:26 | |
Voldenet | m: "x01".succ.say | 12:29 | |
camelia | x02 | ||
Voldenet | m: ".x01".succ.say | ||
camelia | .x01 | ||
Voldenet | this looks deliberate | ||
bbkr | Why? Looks inconsistent with: | 12:30 | |
m: "foo/file01.txt".IO.succ.say; | |||
camelia | "foo/file02.txt".IO | ||
Voldenet | eh, I'm not sure in which context it'd make sense | 12:31 | |
but it smells like bugfix for some special case | 12:32 | ||
bbkr | succ() behavior on IO::Path is explicitly documented as "Returns a new IO::Path constructed from the invocant, with .basename changed by calling Str.succ on it.". So I'd expect foo/../foo/file01.txt successor to be foo/../foo/file02.txt. | 12:33 | |
There is no exception in documentation that path cannot contain backtracking. I just discovered this by locking production code in infinite loop because directory in which code was looking for next free file name was relocated to backtracked path and suddenly succ() was no longer returning successor. | 12:36 | ||
12:38
merp joined
|
|||
bbkr | I've created github.com/rakudo/rakudo/issues/5842 | 12:39 | |
timo | sourceable6: "foo/../foo/file01.txt".IO.succ | 12:52 | |
sourceable6 | timo, No build for revision “7f0474c” | ||
timo | sourceable6: 2025.03 "foo/../foo/file01.txt".IO.succ | 12:53 | |
sourceable6 | timo, No build for revision “316ddd2” | ||
timo | linkable6: github.com/rakudo/rakudo/commit/30...a718ab1951 | ||
"Make IO::Path use its own .succ / .pred logic" "So it no longer depends on the Str.succ / .pred logic" | 12:54 | ||
well, that might not actually matter | |||
ah, right, so the .. somewhere else in the path confusing it is the bug i think | 12:57 | ||
that really wants to have logic in it that properly resolves what part of the string is where the basename begins, and not look for any "." before that | 13:01 | ||
I don't think I'm the best candidate to attempt to fixt his | 13:06 | ||
m: say "/foo/bar/hi.01.bla/test01.txt".IO.succ # probably also not what you want or expect | 13:13 | ||
camelia | "/foo/bar/hj.01.bla/test01.txt".IO | ||
timo | m: say "/foo/bar/hi01.bla/test01.txt".IO.succ # it just uses the first dot it finds in the whole path, which is not what the docs say it should do | ||
camelia | "/foo/bar/hi02.bla/test01.txt".IO | ||
timo | i also put it in the ticket, apparently at the exact same time as oyu | 13:16 | |
bbkr | I've added this discovery of "first dot logic" to GH issue. | ||
:) | |||
13:16
JimmyZhuo joined
|
|||
timo | in any case, "next free file name" is not a great thing to be doing for a few reasons | 13:17 | |
bbkr | agree. however in my use case with guaranteed single instance and controlled directory sizes this is justified - I get benefit of having sequential files without any race confitions or slowdown risks. | 13:25 | |
timo | any benefit over just counting the number of files in the dir to get the next number? there could be holes in the sequence? | 13:27 | |
i guess it's nicely compact to write like ""file01.txt".IO ... !*.IO.d" | |||
bbkr | in this tool user can refer to files using negative notation (--file-index=-1) because in this particular case this is super convenient. | 13:28 | |
I've tripped on counting files once because stupid macOS filesystem added .DS_Store junk. So I'm leaning towards succ() method. | 13:29 | ||
13:30
lichtkind left
|
|||
timo | right, you'd want dir() with a test that regexes only the filenames you're interested in | 13:31 | |
m: "test99.txt".IO.succ.say | |||
camelia | "tesu00.txt".IO | ||
timo | ^- another thing that's probably not what you want | 13:32 | |
m: "test_99.txt".IO.succ.say | |||
camelia | "test_100.txt".IO | ||
bbkr | True. i'm aware of it and it is already under control. However I think this quirk with "a99" vs "a_99" should be better documented n IO::Path. It's explainable but not DWIMy. | 13:36 | |
To be fair it is documented in Str.succ, but from my experience users don't like to drill documentation if they think they already understood something from examples. | 13:39 | ||
github.com/Raku/doc/issues/4566 ^ this | 13:48 | ||
13:50
JimmyZhuo left
|
|||
timo | good | 14:01 | |
14:10
bbkr left
14:30
ACfromTX left
14:43
ACfromTX joined
|
|||
lizmat | PSA: this week's Rakudo Weekly News will most likely be published tomorrow | 14:49 | |
14:50
jpn left
|
|||
[Coke] | lizmat++ | 14:51 | |
14:55
jpn joined
15:22
apac left
15:26
apac joined
15:34
jpn left
|
|||
[Coke] | Any idea how to satisfy this requirement on mac? | 15:35 | |
"pq:from<native>:ver<5>" | |||
apparently not with `brew install postgresql@15` | |||
(libpq?) | 15:36 | ||
nope. | |||
15:37
apa_c joined
15:38
apac left,
lichtkind joined
|
|||
holmdunc | libpq is apparently "keg-only" docs.brew.sh/FAQ#what-does-keg-only-mean | 15:41 | |
[Coke] | I tried running the zef command after that with an updated LDFLAGS, adding the path to .zshrc, etc. | 15:42 | |
(tried all the env vars in the brew info notes) | 15:43 | ||
... I'll do the testing on ubuntu, I guess. | |||
16:20
apa_c left
16:26
jpn joined
|
|||
jdv | linux is the way | 16:27 | |
well, the easier way:) | |||
librasteve | [Coke]: I found a way to get it to work and documented here github.com/raku-community-modules/...issues/242 | 18:35 | |
18:36
MoC joined
|
|||
[Coke] | thanks | 18:37 | |
librasteve | yw | ||
I didnt test adding the specific location to one of PATH, LD_LIBRARY_PATH, DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH - which maybe easier, and clearer to explain... | 18:39 | ||
19:05
Guest53 joined
19:07
Guest53 left
19:31
jpn left
19:51
abraxxa-home joined
20:17
jpn joined
20:21
jpn left
20:47
MoC left
20:51
Guest28 joined,
Guest28 left
20:52
jpn joined
20:57
guifa joined
21:44
abraxxa-home left
21:47
jpn left
21:58
stanrifkin left
22:13
sena_kun joined
22:14
Sgeo joined
22:18
jpn joined
22:22
jpn left
22:23
stanrifkin joined
22:52
sena_kun left
23:01
Guest92 joined
23:03
Guest92 left
23:43
jpn joined
23:48
jpn left
23:56
lichtkind left
23:57
dgl joined,
dgl left
|