freenode/lisp - IRC Chatlog
Search
12:31:23
eigenhombre
Complete newbie question here, still trying to get my head around how packages/systems/ASDF/Quicklisp works. I'm using SBCL + Emacs for my environment. When I use a library from Quicklisp, say `cl-ppcre`, is it expected that I would have to add, say, `(ql:quickload :cl-ppcre)` in my `.sbclrc`? I'm finding that otherwise, when I start my SLIME REPL in Emacs, my code doesn't know where `cl-ppcre` is even if it's in my
12:33:49
beach
eigenhombre: The typical way is to write your application code using an ASDF system definition.
12:36:44
jmercouris
just a point of clarification: You don't have to quickload cl-ppcre in your sbclrc, you can just quickload your project
12:37:42
thijso
So, put a symlink to your own project's asd file in ~/quicklisp/local-projects, the in slime do (ql:quickload :your-project) and it should pick up the libraries from quicklisp like cl-ppcre and others.
12:37:50
beach
eigenhombre: It looks like you are getting plenty of help, so I'll be quiet. Others know better than I do.
12:38:10
eigenhombre
I do have the symlink, but that's for libraries I make, right, not Quicklisp dependencies? Ah, I'll try `quickload`ing my project...
12:38:37
Bike
i mean if you don't actually load your project the asd has nothing to do with your system.
12:40:10
eigenhombre
Got it. Do Emacs people do a separate `ql:quickload` of the current system (that they're developing on) at the REPL then, whenever they make changes to e.g. dependencies?
12:48:58
eigenhombre
yes, it's `slime-repl-set-package` - I have that working now for a minimal project w/ no deps. lemme try adding a dependency...
12:49:17
ralt
I'm surprised dim hasn't written pllisp, similar to https://www.postgresql.org/docs/9.5/plpython.html
12:50:06
Bike
just to make sure you're clear on this... adding something to the file will not itself change anything in lisp. lisp doesn't continually poll your files or anything. you have to go through and tell lisp to load something
12:51:23
thijso
ACTION thinks maybe he shoud figure out how to get swank running in his app on the phone, so he doesn't have a >1.5 minute roundtrip to debug it
12:52:26
eigenhombre
Bike: I get that -- thank you. I'm trying to figure out the best workflow. I got `slime-repl-set-package` to work on a brand new ASDF project (created with `cl-project:makeproject`). However, when I add e.g. `"arrow-macros"` to `depends-on` in the ASD file, it does not find the dependency yet (e.g. when I `slime-set-package` again). Still trying to figure that out.
12:53:17
Bike
there's a distinction between packages and systems. systems are collections of code in file and etc. packages are just namespaces for symbols.
12:54:22
Bike
setting the package just means telling lisp that it should understand unqualified symbol names to be in such and such package/namespace.
13:05:06
eigenhombre
Everyone, I was just able to clean up my dependencies on a multi-file project and get that all working smoothly, thanks to your suggestions ... thanks again.
15:39:21
drmeister
What do folks usually do when they want to write a function that returns a shallow copy of instances of a class?
15:40:07
drmeister
I'm implementing a genetic algorithm to mutate a complex object and it's going to be useful to make shallow copies of instances of a class. If I change the class I want the shallow copier to keep up to date.
15:41:11
drmeister
Every one of those lipid molecules is represented by an instance of a class called ga-lipid. I want to shallow copy the slots of ga-lipid.
15:42:05
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=d703f907 will be valid until 15:45 UTC.
15:42:10
drmeister
https://stackoverflow.com/questions/11067899/is-there-a-generic-method-for-cloning-clos-objects
15:53:05
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=9eebcba6 will be valid until 16:00 UTC.
16:26:58
ralt
drmeister: I'm not sure it's relevant, but IME it's easier to have immutable-ish objects and do CoW
16:33:07
jmercouris
I believe that *may* be referred to as a shallow copy, it definitely is in the java world
16:41:16
ralt
some sort of setf that returns a new instance with only the new slot being reinstantiated while all the other slots are references to the older instance's slots?
16:43:33
aeth
structs have a copy-foo function automatically generated, but there is no copy method in widespread usage for standard-objects afaik
16:43:41
drmeister
I profiled the copying function I did write and it allowed me to copy 4444 membranes/second.
16:44:01
drmeister
Then I profiled it with our tools and made a few changes and got it up to more than 16,000/second.
16:47:13
aeth
drmeister: Well, yes, but a default shallow copy is the topic, right? Obviously not an ideal copy...
16:48:21
drmeister
Right - but more happened between me asking and now - I accidentally switched to a different IRC window and started describing my progress in finding code to do this there - thinking I was here.
16:48:47
drmeister
I found a generic MOP based shallow instance copier. It was a bit slow - so I wrote some specific code.
17:21:42
sjl_
is clhs.lisp.se returning Content-Type: application/octet-stream for anyone else? Which makes firefox try to download the hyperspec pages instead of displaying them as HTML
17:25:08
Xach
Shinmera: FYI http://report.quicklisp.org/2019-09-17/failure-report/uax-9.html#uax-9-test
17:26:30
ck_
Xach: is there a mechanism or report to check the most recent time quicklisp has checked some repository for updates?
17:27:32
Xach
ck_: no. i would like to add that info, so you could find out detailed provenance for a project, including when it was retrieved. but that is not there yet.
17:27:55
Xach
ck_: projects are generally checked daily, so the date of the check is the date of the quicklisp dist update.
17:31:12
ck_
I see thank you. The specific reason I asked is that I was waiting for the newest version of float-features (also by Shinmera), and I wasn't sure whether projects on github.io used some other method
18:02:57
Shinmera
Xach: That was fixed a long time ago already :) https://github.com/Shinmera/uax-9/commit/1bd98c75b601f025c9d7fc2930f2f79db5d17831
18:30:31
dlowe
Xach: I also had to stop working on my one thing :) Maybe someday I can get back and rough it up some
21:17:37
thijso
Anybody familiar with android architecture? It's apparently a little different from normal linux (despite a lot of appearances), in that calling bt:join-thread just completely locks up your app. Nothing will ever happen after you call that, it seems. Or maybe I'm just doing something wrong.
21:18:12
thijso
But a long time debugging, and I've narrowed it down to that call. On ECL, that just does an mp:join-process under the hood. And then everything grinds to a halt...
21:22:45
thijso
Not really, no. It's one thread, and that finished pretty quickly. Exact same code runs without trouble on regular linux with ECL.
21:24:00
thijso
Yeah, no, as that is very hard to do running on my current setup. I'll have to look into getting swank running again. It's not as simple, because you need a specialized form of quicklisp and swank.
21:28:33
thijso
Not exactly sure what the function does, but it includes this comment: ;; replace interpreted function with precompiled one from DEFLATE
21:50:49
thijso
Hhmmm... might have spoken too soon. Had a bunch of code commented out in my 'working' version. Looks like the thread is actually dying in there somewhere...
21:53:40
Xach
asdf_asdf_asdf: because it has determined that the code cannot be reached and it does not need to be included in the compiled code
21:54:35
Xach
asdf_asdf_asdf: it is deleting the last form because your case always returns before the final form is reached.
21:56:00
Xach
asdf_asdf_asdf: your unconventional indentation makes it hard to see the control flow quickly.
22:04:23
thijso
Hmmm... does ECL do something different with vectors? Looks like (incf (size-of queue)) is dying.
22:09:59
thijso
Although, maybe it's dying on subsequent iterations. It's very irritating, as all my debugging output gets lost when it dies. So I can only figure out stuff when it *doesn't* die. Pain in the you-know-what...
22:37:10
gilberth__
asdf_asdf_asdf: Perhaps you first learn some Common Lisp and stop using it like you would use C.
22:37:56
Xach
asdf_asdf_asdf: there is no way for the control of the program to proceed past your CASE form. every outcome of the form results in control returning to somewhere else. no forms after it are reachable.
22:38:29
Xach
it is not an error to have unreachable code. but it is usually a sign of misunderstanding.
22:43:01
gilberth__
Or to put it otherwise, if you don't mind, Xach, in CL there is no need to RETURN-FROM a function make it yield a value.
22:47:36
gilberth__
ACTION is hacking in Lisp for over 30 years now and almost never uses RETURN-FROM.
22:50:11
Xach
asdf_asdf_asdf: no. but it is essential to understand how it works and how it affects control flow and why it might lead to unreachable code.
22:54:51
gilberth__
asdf_asdf_asdf: The one thing you really must get is, that Lisp does not distinguish between statements and expressions like most other languages do.
23:11:52
gilberth__
Xach: BTW I am not _that_ olde, CLtL1 was published as I was 10yo which was about the time I came into contact with Lisp.
23:15:59
gilberth__
But, yes, I wonder when was BLOCK/RETURN-FROM invented? I bet Zeta Lisp has that, too.
23:18:44
Bike
the other day i looked at the lisp 1.5 manual, and it has return, and prog has a block. no naming or dynamic extent or anything though
23:21:59
gilberth__
Standard Lisp is funny. It allows RETURN and GO in a tail position only. Calls for LABELS.
23:38:24
Bike
if i read it correctly it was even worse, like i don't think you could GO from a nested if
23:43:13
gilberth__
BTW, I often use "[x]" for quoting, since I simply cannot remember what to quote and what not.
23:44:12
gilberth__
And it's different in [POSIX] basic regular expression versus extended regular expressions.
0:06:19
minion
The URL https://gitlab.common-lisp.net/users/sign_in?secret=487355e5 will be valid until 00:15 UTC.