00:12
morte_ has joined #racket
00:14
morte_ is now known as morte
00:27
Origin has quit [Quit: Leaving]
00:33
Achylles has quit [Remote host closed the connection]
00:37
CodeSpelunker has joined #racket
01:13
morte has quit [Remote host closed the connection]
01:43
CodeSpelunker has quit [Ping timeout: 256 seconds]
01:55
lucasta has quit [Remote host closed the connection]
02:13
CodeSpelunker has joined #racket
02:34
morte_ has joined #racket
03:38
morte_ has quit [Ping timeout: 240 seconds]
03:44
CodeSpelunker has quit [Quit: CodeSpelunker]
03:56
skapata has quit [Ping timeout: 265 seconds]
03:58
skapata has joined #racket
04:42
shawnw has joined #racket
06:26
ormaaaj has quit [Ping timeout: 240 seconds]
06:28
ormaaaj has joined #racket
07:04
ormaaaj has quit [Ping timeout: 248 seconds]
07:06
ormaaaj has joined #racket
07:41
sleepy_mecha has joined #racket
07:46
skapata has quit [Remote host closed the connection]
07:53
avocadoist has quit [Quit: Konversation terminated!]
07:54
avocadoist has joined #racket
08:01
avocadoist has quit [Quit: Konversation terminated!]
08:02
avocadoist has joined #racket
08:02
avocadoist has quit [Read error: Connection reset by peer]
08:02
avocadoist has joined #racket
08:13
avocadoist has quit [Quit: Konversation terminated!]
08:13
avocadoist has joined #racket
08:13
avocadoist has quit [Client Quit]
08:15
avocadoist has joined #racket
08:16
avocadoist has quit [Client Quit]
08:16
avocadoist has joined #racket
08:18
avocadoist has quit [Client Quit]
08:18
avocadoist has joined #racket
08:18
avocadoist has quit [Client Quit]
08:20
avocadoist has joined #racket
08:21
avocadoist has quit [Client Quit]
08:22
avocadoist has joined #racket
08:23
avocadoist has quit [Client Quit]
08:24
avocadoist has joined #racket
08:24
avocadoist has quit [Client Quit]
08:25
avocadoist has joined #racket
08:25
avocadoist has quit [Client Quit]
08:26
avocadoist has joined #racket
08:26
avocadoist has quit [Client Quit]
08:27
avocadoist has joined #racket
08:27
avocadoist has quit [Client Quit]
08:28
avocadoist has joined #racket
08:28
avocadoist has quit [Client Quit]
08:29
avocadoist has joined #racket
08:29
avocadoist has quit [Client Quit]
08:29
avocadoist has joined #racket
08:30
avocadoist has quit [Read error: Connection reset by peer]
08:30
avocadoist has joined #racket
08:30
avocadoist has quit [Client Quit]
08:31
avocadoist has joined #racket
08:33
avocadoist has quit [Client Quit]
08:33
avocadoist has joined #racket
08:34
avocadoist has quit [Client Quit]
08:34
avocadoist has joined #racket
08:35
avocadoist has quit [Client Quit]
08:35
avocadoist has joined #racket
08:35
avocadoist has quit [Client Quit]
08:36
avocadoist has joined #racket
08:43
avocadoist has quit [Read error: Connection reset by peer]
08:43
avocadoist has joined #racket
08:44
avocadoist has quit [Client Quit]
08:44
avocadoist has joined #racket
08:46
avocadoist has quit [Client Quit]
08:46
avocadoist has joined #racket
08:47
avocadoist has quit [Client Quit]
08:48
avocadoist has joined #racket
08:49
avocadoist has quit [Client Quit]
08:50
avocadoist has joined #racket
08:50
avocadoist has quit [Client Quit]
08:51
avocadoist has joined #racket
08:51
avocadoist has quit [Client Quit]
08:52
avocadoist has joined #racket
08:52
avocadoist has joined #racket
08:54
avocadoist has quit [Client Quit]
08:56
avocadoist has joined #racket
08:56
avocadoist has quit [Client Quit]
08:57
avocadoist has joined #racket
08:58
avocadoist has quit [Client Quit]
08:58
avocadoist has joined #racket
09:00
avocadoist has quit [Client Quit]
09:00
avocadoist has joined #racket
09:46
mwnaylor has joined #racket
09:53
runrin has quit [Ping timeout: 250 seconds]
10:04
jeosol has quit [Quit: Client closed]
10:25
mwnaylor has quit [Ping timeout: 240 seconds]
13:28
micro has quit [Remote host closed the connection]
13:40
micro has joined #racket
14:09
lucasta has joined #racket
15:48
Inst has joined #racket
15:51
skapata has joined #racket
15:54
jeosol has joined #racket
16:00
undltd has quit [Quit: You have been kicked for being idle]
16:43
morte_ has joined #racket
17:03
Tuplanolla has joined #racket
17:15
jeosol has quit [Quit: Client closed]
18:10
lowak has joined #racket
19:19
sleepy_mecha has quit [Quit: Leaving]
19:29
morte_ has quit [Ping timeout: 260 seconds]
19:35
cwebber has quit [Remote host closed the connection]
19:52
scubagear has quit [Read error: Connection reset by peer]
19:58
skapata has quit [Quit: Bonan tageron kaj ĝis la.]
20:02
morte_ has joined #racket
20:04
cwebber has joined #racket
20:06
mwnaylor has joined #racket
20:29
scubagear has joined #racket
20:33
<
mwnaylor >
If I have path value, how can I test it to see if it is a file or directory?
20:36
<
samth >
mwnaylor: `directory-exists?`
20:44
<
mwnaylor >
Seems like there is a weakness there. (map directory-exists? (directory-list "..")) yields a list of all #f, not a #t there.
20:45
<
mwnaylor >
I think there should be at least one #t, since the current directory is contained by the parent directory.
20:46
<
samth >
mwnaylor: `directory-list` does not produce `.` and `..` in that example
20:47
<
samth >
sorry, that's not what you asked
20:47
<
samth >
the problem there is that there's a confusion about current directories -- `directory-list` does not produce absolute paths
20:51
<
Tuplanolla >
You have a race condition on your hands if you ever find yourself asking that question.
20:52
<
Tuplanolla >
Try to read the path as a file or as a directory, and handle the failure if it occurs.
20:55
<
mwnaylor >
How does the race condition occur?
20:58
<
mwnaylor >
(directory-exists? (path->complete-path "~")) -> #f
21:02
<
samth >
mwnaylor: ~ expansion is something your shell does
21:08
<
Tuplanolla >
The directory may vanish between asking whether it exists (or whether it is a directory) and accessing it.
21:09
<
mwnaylor >
samth: I figured that out. Still, after retrieving the contents of a directory with directory list on an absolute path, directory-exists? returns #f for every item, including the subdirectories.
21:11
<
samth >
mwnaylor: you're still getting confused about the current directory
21:11
<
samth >
mwnaylor: you want (map directory-exists? (map path->complete-path (map (lambda (e) (build-path ".." e)) (directory-list ".."))))
21:22
<
mwnaylor >
(directory-exists? "/home/mwnaylor")
21:23
scubagear has left #racket [#racket]
21:23
<
mwnaylor >
That returns #t. But (map directory-exists? (directory-list "/home/mwnaylor")) yields #f for every item.
21:26
<
samth >
mwnaylor: right, because `directory-list` does not produce absolute paths
21:26
<
samth >
and your current directory is not `/home/mwnaylor`
22:00
morte_ has quit [Remote host closed the connection]
22:43
lucasta has quit [Remote host closed the connection]
23:06
<
mwnaylor >
Thanks for the help. Seems a bit clumsy to need the build-path step to get the absolute, but now I know it's a requiered step.
23:08
<
mwnaylor >
BTw, is there a directory-tree function? Something like directory-list, but would recurse into subdirectories?
23:14
<
mwnaylor >
I should have been using this form: (directory-list <path-or-string> #:build? #t)
23:19
cwebber has quit [Remote host closed the connection]
23:31
Tuplanolla has quit [Quit: Leaving.]