freenode/lisp - IRC Chatlog
Search
13:12:13
myrkraverk
So if I start my sbcl sessions with (declare safety 3) -- at least while experimenting, I should be "safe" ?
13:25:22
Grue`
I'm getting a weird warning "Derived type of SB-C::NEW-VALUE is (VALUES EXTENDED-CHAR &OPTIONAL), conflicting with its asserted type BASE-CHAR."
13:25:42
Grue`
http://paste.lisp.org/display/339935 it happens at the line (setf (char geminated end) #\っ)
13:32:25
pjstirling
sbcl recently changed stuff to do with creating base-strings in some cases, when it can
13:36:12
|3b|
complains during compilation, but don't see anything it could validly assume about READING that would justify the warning
13:37:28
|3b|
reduced case is (defun foo (a) (setf (char (copy-seq a) 0)#\HIRAGANA_LETTER_SMALL_TU))
14:31:36
myrkraverk
http://www.myrkraverk.com/blog/2017/02/sbcl-with-timeout-is-a-nice-undocumented-feature/
14:40:01
beach
HAH! I wrote a "USE finder" that READs a file and returns all symbols that have no package prefix in the file and that have a different package from *PACKAGE* when the file is being read.
14:41:22
phoe
that's a very useful tool. you can import whole packages when developing, and find out what exactly you *need* to import when you refactor or prepare a release.
14:41:42
beach
It can't be used to automate the insertion of package prefixes, because a typical file has lexical variables for which the package does not matter, and for which one certainly would not want a package prefix.
14:42:37
beach
I plan to use it to take some of my old projects that have extensive USE clauses in defpackage, and attempt to remove those.
14:44:00
beach
The fact that such a tool was nontrivial to write says something about the difficulty a human maintainer has when reading code which :USEs many packages.
14:46:25
beach
Well, "nontrivial" should be put into perspective. I could program the SICL reader by changing how it handles symbols without any package markers in it. I just had to add a few lines in the default method, specialize it to a new stream class, and that was basically it.
14:49:13
beach
Aside from the duplicated code for token interpretation from the SICL reader, the entire thing is 50 lines or so of code.
14:52:17
malice
Hi! I tried quickloading caveman2 and I get compile-error during loading static-vectors.
15:04:28
pjb
Of course, to be garbage collected, you would have to remove all the methods and all the instances refering it
15:24:37
beach
dim: If you are in an infinite computation, you can press C-c C-c in SLIME and then use the debugger to look at the backtrace.
15:26:50
dim
or it's not done yet, or it's not handling an error properly and it's waiting for some interaction somewhere I can't see
15:29:53
phoe
there's a condition-wait somewhere, so basically, the thread is waiting for another thread to set a condition variable.
15:40:45
dim
https://github.com/dimitri/pgloader/blob/master/src/sources/common/db-methods.lisp#L316
15:40:50
dim
https://github.com/dimitri/pgloader/blob/master/src/sources/common/db-methods.lisp#L332
15:40:55
dim
https://github.com/dimitri/pgloader/blob/master/src/sources/common/db-methods.lisp#L362
15:44:27
dim
I am wondering again about the whole business of manually tracking finished tasks in a way that I can decide "table is done, continue with indexing now"
16:07:01
dim
I can't wait until the next time a colleague wants to know more about why I love Common Lisp and assert it's a modern proglang
16:07:10
fourier
after 8 years of occasional usage of cl I've finally read slime manual. it is not that bad! :) (I mainly use LW however)
16:22:23
dim
the fact that I hate auto-completion of object methods might be strongly correlated here of course...
16:47:04
dim
I'd rather read the docs from the classes and API that I am using than guesstimate which entry I might want to use
16:47:25
dim
if I don't already know the name of the method, I'm up for some reading and that's good
16:48:15
fourier
autocompletion is a way to explore what methods class have without leaving your development environment
16:54:07
dim
I'm just saying that if you don't know that, you might want to leave your dev env before it's too late ;-)
17:04:46
fourier
you can type say "(package:" and see all exported symbols from this package along with their documentation (strangely enough it doesn't show documentation for functions though)
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.