Search
Tuesday, 3rd of December 2019, 3:35:19 UTC
3:39:51
mister_m
I have a user-entered pathname that I've invoked (uiop:ensure-directory-pathame ...) on. I want to use that base directory and then join it with another "relative namestring" to make a full pathname to a file. If my pathname is #P"/home/x/y/z/", and i want to join on "testing/a/path.txt" to it to make in total #P"/home/x/y/z/testing/a/path.txt", how can I do that? Trying uiop:merge-pathnames* gives me #P"/home/x/y/z/path.txt". I'm
3:39:51
mister_m
realizing I really don't understand how pathnames work.
3:53:58
mister_m
oh my god i flipped the arguments
3:54:07
mister_m
to uiop:merge-pathnames*
3:59:07
markasoftware_
ok we're good
5:12:00
Lord_of_Life_
** NICK Lord_of_Life
5:26:18
beach
Good morning everyone!
7:14:32
no-defun-allowed
Random question, is it specified if #+FOO will intern FOO in the package KEYWORD?
7:16:40
specbot
Sharpsign Plus: http://www.lispworks.com/reference/HyperSpec/Body/02_dhq.htm
7:16:51
Shinmera
"#+ operates by first reading the feature expression and then skipping over the form if the feature expression fails. While reading the test, the current package is the KEYWORD package. "
7:16:53
no-defun-allowed
Thanks Shinmera
8:01:06
no-defun-allowed
Hello phoe
8:02:04
phoe
hey setf-fdefinition-permitted
8:12:31
ck_
no no I think those are function symbols
8:13:31
ck_
https://www.mindprod.com/jgloss/unmaintricks.html -> search for 'lisp
8:13:46
ck_
without the quote, sorry
8:22:20
easye
Roedy Green, of Mind Products. A figure I haven't thought about for a while.
8:22:26
edgar-rft
first (defun -_- nil 'zzZZ) now you can do (-_-) => zzZZ
8:29:36
ck_
edgar-rft: graphical programming is the future [tm]
8:35:52
jackdaniel
(with-graphical-context () (-_-)) ; => graphical zzZZ
9:21:06
saturn2
** NICK |endoftext|
9:22:48
|endoftext|
** NICK saturn2
9:58:59
phoe
I have an EQUAL hash table with cons keys.
9:59:17
phoe
What happens if I mutate the conses elsewhere? Is that behaviour defined?
10:00:34
specbot
Modifying Hash Table Keys: http://www.lispworks.com/reference/HyperSpec/Body/18_ab.htm
11:06:35
flip214
defined to be undefined
11:09:29
phoe
much better that is undefined to be undefined
12:38:29
phoe
ACTION gives norserob a slash
12:46:00
flip214
there's a backslash coming
15:23:27
flip214
Is there some function that can convert a number to some indirectly specified type?
15:23:59
flip214
I'd like an average to be of the same type as the input (integers, floats, ratios), but (coerce (/ sum count) (type-of (first input))) doesn't work
15:24:35
flip214
sbcl says that this ratio can't be converted to (INTEGER 0 ...)
15:24:59
flip214
and doing typecase here feels _very_ unclean, in a dynamic programming language ;)
15:25:22
shka__
you can't convert ratio to integer
15:25:53
shka__
yes, but floor does not convert
15:26:02
flip214
I would like to avoid doing that "by hand" ...
15:26:13
flip214
ain't there some REALLY-COERCE function or so?
15:26:31
loke`
flip214: What do you want such function to do?
15:26:42
shka__
what you are doing is not coercing though
15:27:20
flip214
well, it's not casting either, is it?
15:27:50
flip214
loke`: I'd like a lossy change from one number to the type of another
15:28:25
shka__
flip214: you will have to write your own function
15:28:39
flip214
loke`: converting a ratio to an integer
15:28:47
flip214
shka__: Yeah, I put a TYPECASE in now
15:29:11
loke`
flip214: That would be TRUNCATE, no?
15:29:54
loke`
I mean, when do you really need a coerce function where the type is variable?
15:30:03
shka__
there is no generic function for this because it wouldn't be usefull for general use
15:30:59
flip214
loke`: when the inputs are integer, I'd like the average to be an integer as well
15:31:49
loke`
flip214: That sounds like a rather odd requirement.
15:32:05
loke`
I'm sure you have a use case, but it's not really generic.
15:32:06
Bike
but if they're ratios and the average is a ratio you want that ratio?
15:32:49
nirved
the average of ratios can be integer
15:34:30
Bike
that's why i said "and the average is a ratio", yeah
15:34:41
pjb
flip214: use a hash-table, or a vector.
15:35:06
Bike
i'm with loke in not understanding why you want this. you'll have to apply these rules yourself by checking the classes of the arguments.
Tuesday, 3rd of December 2019, 15:35:19 UTC