freenode/#lisp - IRC Chatlog
Search
7:08:55
mfiano
Basically, get used to calling ql:register-local-projects if you have a symlink in local-projects, or you create new systems in a sub-directory.
7:10:00
beach
It's just that the technique I used before, i.e. putting symlinks in .cache didn't require any action other than restarting SBCL after I create a new system.
10:46:19
hjudt
a question about good practice: alexandria is considered pretty stable. can i rely on this by simply using this lib, or is it better to import selected symbols of it, or take the safe way and use alexandria:symbol in my code so one sees immediately where the symbol comes from?
10:49:24
pjb
hjudt: in general, lisp software is stable. We don't have enough resources to change it every other day.
10:49:52
pjb
hjudt: the fastest CL software is sbcl which issues an new release each month. (You don't have to upgrade each month).
11:04:31
beach
hjudt: I still recommend using explicit package prefixes. It makes it more obvious where the symbols come from to the person reading the code.
11:06:22
flip214
beach: that's good advice -- though I'm not sure whether for such well-known things like alexandria the line length lost isn't a higher cost.
11:10:31
Xach
beach: My practice was to put things directly at the top-level always, whether directories, symlinks to single projects, or symlinks to .asd file. So the thing I made initially always worked. But later I realized that I add new .asd files in subdirectories sometimes, and the magic would fail, so I made a way to scan deeper manually.
11:12:47
beach
Xach: OK, but when I use ASDF directly and I put symbolic links in .share, ASDF picks up new, deeply nested .asd file as soon as I start a new session. Are you using a different mechanism from that of ASDF then?
11:23:16
pjb
hjudt: beach: in any case, for released software, you would freeze the versions of your dependencies. So it doesn't matter if stuff is added o not.
11:23:22
aeth
Personally, I use :use only in two cases: (1) my own packages and (2) if the package is heavily tied to something else. (A bar/foo package that deals with the cl-foo bindings to foo might :use foo)
11:23:44
aeth
Although you could argue that in case #2 you're *more* likely to have name conflicts, not less
11:36:18
Xach
beach: The algorithm is this: if there is a valid system index file in the local-projects directory, look inside it for the system with the given name and return the result. a system index file is valid if it exists and is newer than the timestamp of the directory in which it lives.
11:36:46
Xach
those rules mean that new files that don't affect the directory timestamp will not be found automatically.
13:37:26
beach
So if I implement the memory manager in Common Lisp, let's say on x86-64, and I create functions that read and write memory using 64-bit addresses, I don't take any great risk by assuming that such addresses will always be fixnums. On a typical existing operating system, I just restrict addresses to the lower half of the available 48-bit address space, and I am far from the fixnum limit.
13:43:17
TMA
beach: for the foreseeable future the full 64 bit address space will not be used, except maybe on supercomputer clusters
13:46:29
beach
For a while there I was worried about how to avoid bignums in the memory allocator. I thought perhaps I needed to inline the memory-access functions so that the compiler could elide the box/unbox pairs. But it won't be necessary for some time.
14:29:58
pjb
beach: I would have assumed that an OS could use the 64-bit for virtual addresses, but it looks like the x86-64 PMMU ignores the first 16 bits, and that in any case at most 52-bits can be used. Furthermore, the upper bound of the total deployed RAM on the planet seems to be barely 2^67 or 2^68, so unless your system allow you to address all the computers of the world, 64 bits are definitely too many. So yes, it's safe to assume
14:31:21
pjb
beach: I mean, I can see a lot of applications for a 72-bit memory space, at sites, like the GAFAs or the NSA…
14:33:54
beach
pjb: Yes, definitely in LispOS, the disk is going to be THE address space. RAM will just be a cache.
14:34:36
beach
But with a bit of luck, they will increase the number of address bits by a few by the time I need that much disk.
15:19:17
Xach
phoe: there are a few issues i can avoid or work around to put out a new release by tuesday.
15:22:47
Xach
I really want to progress to debian 9 and the latest sbcl, but that breaks a lot of stuff.
17:34:49
skidd0
Tdata/tutorial.lisp file only says that (2) user-defined object syste,s need to register their own
17:45:37
mood
skidd0: Looks like custom encoding/decoding happens using the generic functions encode-object and decode-object, on which you can define methods
17:47:53
skidd0
so I have a LOCAL-TIME time stamp that needs to be encoded. I would make a defmethod specialized on the timestamp
17:48:23
skidd0
so encoding it might jsut be as easy as sending the 2018-07-#### to a binary format?
17:49:54
mood
I'm looking at the code in src/data/encoding.lisp and src/data/object.lisp here: https://github.com/hanshuebner/bknr-datastore
18:39:08
phoe
Is there a function that splits a sequence into two lists based on whether they satisfy a predicate or not?
18:49:37
pjb
There's: (com.informatimago.common-lisp.cesarum.list:equivalence-classes '(1 2 3 4 5 6 7 8 9) :test (lambda (a b) (eq (not (oddp a)) (not (oddp b))))) #| --> ((8 6 4 2) (9 7 5 3 1)) |#
18:55:11
aeth
phoe: When I've had to do that I think I determined that the easiest way was a loop with two collects
18:57:14
pjb
Why limit yourself to 2 classe? (com.informatimago.common-lisp.cesarum.list:equivalence-classes '(1 2 3 4 5 6 7 8 9) :test (lambda (a b) (zerop (mod (- a b) 3)))) #| --> ((9 6 3) (8 5 2) (7 4 1)) |#
19:03:34
aeth
(loop for item in (alexandria:iota 10) if (evenp item) collect item into evens else collect item into odds finally (return (values evens odds)))