freenode/lisp - IRC Chatlog
Search
21:18:09
shrdlu68
What's going on with static-vectors? I can't quickload any packages that have it as a dependency.
21:31:15
Bike
when i saw this in july they had ubuntu's cl-asdf package, which somehow result in an asdf 3.0.3 that reported itself as a later version
21:32:14
shrdlu68
I don't think so. I had originally installed the packaged sbcl, but I removed it in favor of getting the source myself and compiling from the github repo.
21:33:05
Bike
can you M-. uiop:with-temporary-file? do you get a similar error to the one on load if you try to evaluate my form there?
21:35:09
Bike
the error is saying with-temporary-file doesn't know what :suffix is. that keyword was added in 2013 https://github.com/fare/asdf/commit/9beaabb5290f274fc7e1d33fa8dd496bf0ebbff7#diff-78efddae3fbece9fa0028be6b5a15589
21:38:39
Bike
and, similarly, you get an error about not knowing what :suffix is even though you can evaluate a form with :suffix just fine
21:39:03
Bike
some weird shit is happening, but i'd try a clean reinstall if it's not too burdensome
22:47:40
shrdlu68
Well, I deleted all sbcl files in /usr/, cloned the current release, and built it using ccl. Didn't work.
22:52:43
Xach
shrdlu68: Well, as a short-term fix, you can simply delete that directory. Longer-term better would be to find out who owns that location and uninstall thoroughly.
22:53:23
drmeister
How do Common Lisp programmers deal with *default-pathname-defaults*? Do you set it to whatever directory you are working in before you do any work with files? I'm still a little confused about how it works with the unix current directory.
22:54:05
Xach
drmeister: I very, very occasionally bind it to some directory where I want to work with a number of relatively addressed files.
22:54:33
Xach
drmeister: as late as a couple years ago, scieneer cl did not properly merge every file operation with *default-pathname-defaults*.
22:54:46
Xach
behavior inherited, i think, from cmucl, which was fixed only a few years prior to that
22:56:03
Xach
drmeister: It is not good to take too much meaning from the initial value of *default-pathname-defaults*. if you want to refer to resources relative to some directory, it can be better to get values of *load-truename*/*compile-file-truename* or asdf:system-relative-pathname.
22:56:21
Xach
drmeister: or (user-homedir-pathname), or some special variable that a user customizes
23:00:44
drmeister
I'm setting up a "friendlier" environment where file operations would start in the users home directory and they could tell the system to switch to other directories relative to their home directory. So (cd "/some/directory") puts them in $HOME/some/directory/
23:03:44
phoe
if you want to restrict all operations to a /foo/bar/ directory, you could bind some *chroot* var to "/foo/bar" and then you can go (cd "/baz/quux")
23:04:04
drmeister
That's kind of what it is. It's running within a docker container. The docker container has access to their home directory.
23:07:02
drmeister
(chroot "/foo/bar") *default-pathname-defaults* -> "/src/foo/bar" which maps to $HOME/foo/bar ?
23:08:40
phoe
a chroot basically grabs a directory and forces it to become the new root of your filesystem.
23:08:51
phoe
I don't know. I'd need to have more information about what you have and what you need.
23:09:50
drmeister
I wanted to give them something to change the current directory, so that they don't have to explicitly state it every time.
23:10:28
phoe
You might want to contact Fare on the specifics - he's the person I'd ask about any pathname stuff.
23:10:36
drmeister
This isn't clasp. It's Cando, a computational chemistry environment where the user has access to everything under their home directory but nothing outside.
23:11:52
drmeister
I'm running Cando within Docker - that lets me map a directory on the users system to a docker directory (I use /src). So every file access that the user does is relative to /src/... and that maps to $HOME/...
23:14:58
drmeister
It's what it is. I'm trying to figure out the semantics of a straightforward command that would let them move around their user directory hierarchy. /src/** --> $HOME/**
0:01:09
drmeister
phoe: What I'm not telling you is I also want whatever command I end up with to set *default-pathname-defaults* properly on a normal inferior-lisp/slime session.
0:07:01
phoe
drmeister: this looks like something you can solve with a mixture of unix utils and some lines of Common Lisp code.
0:07:03
drmeister
What I really want? Is something like (set-current-directory "$HOME/foo/bar") that when running in Docker translates to /src/foo/bar and when running locally translates to /Users/meister/foo/bar.
0:08:54
drmeister
I never understood (setf (logical-pathname-translations xxx) ...) enough to make it do what I want. Could that do this?
0:09:00
phoe
But the naïve approach for me is, make a function that finds out whether the Lisp image is running in a Docker container.
0:09:57
phoe
So, er. Dunno. Set your default pathname to a different value, depending on whether you have a :docker feature.
2:29:01
Bike
when they tell you must take it / and you think hell no / got a bad feeling and can't shake it / hits so low / lord of the game
2:48:29
drmeister
I'd love a slime command that evaluated the sexp at point and pasted the result after the form in #| ... |# commented form so that it won't be evaluated if the entire file is evaluated.
3:15:05
Bike
i have something that sort of works but it has a pause for asynchronousness and i don't know enough about slime to remove it.
6:30:46
krwq
hello, how do you check if your code is being run as compiled executable? i have some problems with paths, when i run my app under slime i prefer to use paths relative to package while when app is compiled the package folder doesnt exist so i'd like to use current working directory
6:31:10
krwq
the only idea i have is to set some variable whe saving the image but i'm wondering if there is some better way
6:32:51
BusFactor1
Here's some experiemental sounds from the Common Lisp audio synthesizer I'm writing: http://dropclickpaste.com/#CwdmCYGMBNwNgIYE4AMkDMm4rgVgKYIAc4AjCiqetJEgEa7DrB3ojRA
6:33:03
Bike
Becuase when you dump an image you specify a start function. You could have that function set a compiled-image-p variable to true.
6:34:24
krwq
Bike: that's what I was thinking but I was wondering if there is some already predefined macro or something for that
6:35:41
BusFactor1
Each synth is defined like this: (player (generate-sine :frequencyr (sine-1 100 100) :volumer 4000 :filter 15 :clip 7000 :samples 88200) 4.1) and generated at run time.
6:37:02
BusFactor1
That can be composed at run time. Sort of a syntax for dynamic runtime generated variables.
6:37:09
krwq
Bike: actually i think better solution is to give a switch for each function which would change logic which means id have to set it explicitly
6:39:30
BusFactor1
to use a 'typer' variable, you wrap it in something like a cast, like (floatr x) to get the float value of a typer x
6:40:06
krwq
BusFactor1: i used to have similar concept when i was playing with html5 drawing in javascript
6:40:59
BusFactor1
with every variable being a function called at runtime...it allows for easy composibilty in the synth
6:41:04
krwq
BusFactor1: it gets quite cumbersome after a while while in lisp the symbol macrolets will shorten and clarify what's going on
6:41:35
BusFactor1
i find my method of wrapping the variable in a cast like structure is actually quite natural and compact
6:41:57
krwq
BusFactor1: but you're right there's no point of prematurely doing too much, you can write a simple macro in the end to fix that
6:42:44
BusFactor1
i'm planning on releasing my next album with full source code for the generation of it
6:45:49
Bike
hm, slime-macroexpand doesn't bind *print-readably* true, i'm not sure if that's good or bad
6:47:17
Bike
but if people mostly use it for inspection, and printing readably makes it ugly enough...
7:19:22
slark
hi, why '(quote foo) or the equivalent (list 'quote 'foo) evaluate to 'foo on my repl ? i tought that '(quote foo) should return (quote foo) on my repl, like '(+ 1 1) returns (+ 1 1)
7:23:31
beach
The printer uses that syntax because when 'foo is seen by READ, then the list (QUOTE FOO) is returned.
7:27:20
reepca`
evaluating 'foo just produces FOO the symbol, though. When we talk about what some string representation "is" I assume we mean what it gets read in as, right?
7:28:26
edgar-rft
beach: sorry, better attempt, I agree that 'foo is read as (quote foo), but why then does (litp 'foo) return NIL?
7:28:46
slark
edgar-rft: well understand that 'foo is (quote foo) literatly if you want to pass it to listp you have to (listp '(quote foo)), (listp (quote foo)) is not what we need
7:29:00
beach
edgar-rft: Because LISTP is a function, so the argument gets evaluated before the function is applied.
8:07:02
beach
My USE finder is working out quite well. It would be even better to have that functionality in Second Climacs, though. At the moment, all symbols in a file that are imported from a different package are returned. In Second Climacs, I could (once I implement that functionality) avoid returning lexical variables.
8:12:28
BusFactor1
Here's another track from my synth: http://dropclickpaste.com/#AwRgrCBGAmIEwDYAsBjJB2Md1wJwA50Rw8AzUgQ3QujDHwFMRpcHgg
8:29:48
BusFactor1
Sorry about that. Maybe it 's the site. Here's another direct link: http://busfactor1.ca/kruhft%20-%20new%20synth%207%20-%202017.mp3