freenode/#lisp - IRC Chatlog
Search
10:14:49
no-defun-allowed
minion: memo to heisig: I'm not sure if I'll be awake when you come online but happy third birthday to Petalisp!
18:11:42
gaze___
hey folks, I'm getting back into lisp after a long hiatus and I've hit a bit of a snag. I have a directory with a file called main.lisp and a file called foo.asd... foo.asd contains (asdf:defsystem foo ...). I open emacs, I open main.lisp, I M-x sly, and then I M-x load-system foo, and I get an ASDF/FIND-SYSTEM:MISSING-COMPONENT
18:13:58
Xach
gaze___: or there must be some way it can find the foo.asd file through its various ways
18:14:08
Acru
hey, I am having a problem with compiling a lisp program: when running it, I include "split-sequence" via (ql:quickload "split-sequence"), but when I complile it i get the error *** - READ from #<INPUT BUFFERED FILE-STREAM CHARACTER #P"/home/antono/Projects/codenchill/median.lisp" @15>: there is no package with name "SPLIT-SEQUENCE", and when I declare (asdf:load-system "split-sequence") I still get the error
18:15:35
Xach
Acru: the call to ql:quickload does not happen in time for it to make the package name available for reading in the same file.
18:16:21
Xach
katco: one way is to push the symbol 'cl:*default-pathname-defaults* to asdf:*central-registry*
18:16:46
Xach
Acru: one option is to wrap the quickload form in (eval-when (:compile-toplevel :load-toplevel :execute) ...)
18:17:01
Xach
Acru: another option is to use a system definition that sets up all the things to load before loading your code.
18:17:28
gaze___
Xach: let's suppose I add a (pushnew "~/path-to-project/root/" asdf:*central-registry* :test #'equal) to my .sbclrc... does that mean that it'll find ~/path-to-project/root/project1/project1.asd, ~/path-to-project/root/project2/project2.asd?, etc.?
18:17:40
Xach
gaze___: i use quicklisp so i usually stick projects in ~/quicklisp/local-projects/ - those are found automagically
18:18:00
katco
ACTION sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/orfeuFcrDhIHhGtpgCxpKdFb >
18:19:27
katco
Acru: https://www.common-lisp.net/project/asdf/asdf.html#Controlling-where-ASDF-searches-for-systems
18:19:53
gaze___
just to be clear, when you start new projects, you just put them in local-projects?
18:20:53
katco
gaze___: they just need to be under the root of one of the places asdf knows to search for projects. if you're using quicklisp, `local-projects` is one such place
18:21:19
katco
i used to put my projects where i liked them to reside and then symlink them to `local-projects`, but i like the conf file solution better
18:21:34
Xach
https://xach.com/tmp/quickstart.html has a self-contained simple project with a system definition.
18:28:07
jackdaniel
another kind of chart for polyclot (wip integration with cl-bench): https://files.mastodon.social/media_attachments/files/014/697/322/original/c1c1e5a45dbd4a25.png
18:29:48
jackdaniel
putting there clisp results would make two things happen: charts would be less readable and ecl would look much better in comparison ,)
19:00:41
gaze___
okay, maybe a goofy question but what's the recommended way to patch additional functionality into a library? pzmq for instance doesn't have the encryption functions implemented. Suppose I don't yet want to submit a pull request, I just sorta want to hack the functionality in place for testing and I don't want to edit pzmq itself
19:03:03
Bike
for temporary patching that kind of thing is fine. it gets dicey when you try to maintain it, though.
20:12:00
asdf_asdf_asdf
Hi. How get signature callback (function) in SBCL (Common Lisp)? I try: (* func), not working. I defined callback, it: (define-alien-callback ...).
20:14:54
gaze___
maybe a bit of a contentious question, but is there a way to strip symbol names from SBCL when doing save and die?
20:15:19
gaze___
I know it's impossible to fully stop reverse engineering, but it'd be nice to slow it down a bit.
20:15:46
gaze___
and if not with SBCL, is it possible with CCL, CMUCL, one of the more major implementations
20:18:47
asdf_asdf_asdf
gaze___, looks for it: https://koji-kojiro.github.io/sb-docs/build/html/index.html
20:20:32
Bike
https://bugs.launchpad.net/sbcl/+bug/310108 i think stripping an sbcl binary will be problematic.
20:21:58
asdf_asdf_asdf
(define-alien-type nil (struct WNDCLASS (lpfnWndProc 'WindowProc))) How pass signature function to type struct?
20:22:30
Bike
asdf_asdf_asdf: can you just use cffi, as several people have now suggested? it's more common and documented.
20:22:33
anamorphic
gaze___: maybe you can define your own perverted defun and friends to hash the friendy names
20:24:29
gaze___
I'm not entirely sure why the names have to be retained to begin with... isn't SBCL ultimately a compiler?
20:25:08
gaze___
well okay... I guess that functionality is retained so you have to go out of your way to break it.
20:25:08
whartung
…in an ostensibly interactive environment. where meta data and debug information is always valuable.
20:27:41
Bike
sbcl is public domain so you can do whatever with it, but it's common to share sources (e.g., quicklisp)
20:28:33
gaze___
ah well, employers don't always want the details of the architecture of their hardware being broadcast to the world... so if I'm developing a compiler or something
20:28:37
whartung
it would not surprise me if Franz or Harlquins lisp had more aggressive stripping utilities.
20:29:06
Bike
i'm not judging you, i'm just saying what you're doing is not how sbcl is usually used, so it's unlikely to be supported particularly, you know?
20:29:52
Bike
they do stuff like avoid distributing the compiler for the sake of their own IP, stripping doesn't seem far off from that
20:31:33
whartung
just check the pacakge of the symbol so you don’t mung CLUSER etc. That would probably be Bad.
20:32:51
grewal
Change your application design/business model so they never have the executable on a computer they own
20:34:04
whartung
Mind I’m a terrible person to talk to about this, as I don’t grok the fear management is feeling.
20:34:24
gaze___
I mean if even to keep customers from going "ooh there's a lisp interpreter in here" and introducing bugs and complaining to support
20:35:04
gaze___
I don't so much mind people having a whack at reverse engineering... it's always, always possible. A bit of friction might be good tho.
20:36:01
Bike
well, like i said, distributed lispworks programs don't have an interpreter or compiler or anything available.
20:37:50
gaze___
trying to figure out how to strip this information might not be a bad way to learn a bit about SBCL's internals... which, ya know hey, if you wanna master a language, master the compiler.
20:39:31
Bike
also, a tree shaker is kind of different, no? if anything, having a bunch of useless things in the image would make it harder to figure out.
20:39:40
whartung
I honestly off the top of my head don’t know how to lookup a symbol given the text of it.
20:41:39
Bike
eliminating certain things might be problematic. for example, sbcl uses jit compiles for make-instance, so if you're not careful removing the compiler could wreck CLOS.
20:50:39
gaze___
seems like what I wanna do is somehow deep inside sbcl/src/code/target-package.lisp
20:59:25
anamorphic
gaze___: what industry are you in where your binary needs to be scrubbed like this? (curious, if you don't mind)
21:07:58
gaze___
yeah ok, there's someone called nuke-symbol in there that could probably be used as a reference
21:10:24
whartung
symbols are, at a base level, made of two components: the package and the symbol text.
21:14:59
anamorphic
gaze___: I long time ago juho snellman (I think) posted a snippet on github gist somewhere that did a pretty good tree shake. I don't recall what it did with symbols though and I'm having trouble finding it
21:17:09
anamorphic
Huh 17 days ago though... I think there was an earlier attemp that was quite comprehensive too