freenode/#lisp - IRC Chatlog
Search
19:48:28
skidd0
so say i have a lisp package that does some cool thing. on SBCL i can (sb-ext:save0lisp-and-die ..) to create a binary and handle command line args [with unix-opts]. If I want to share that program, will each user need to install sbcl and then run the save-lisp-and-die stuff? Is there an easier way to share the binary?
19:49:03
skidd0
I haven't ever made a program to be distributed before, so please be understanding of any ignorance
19:54:57
skidd0
but (again, i'm ignorant and ill-informed here), that binary is only good for other 64bit Arch distros?
19:55:27
skidd0
so i'd have probably want to save-lisp-and-die on a Windows and a Mac, and provide build instructions for linux?
19:58:48
dim
the binary depends on the platform, much like a binary compiled with a C compiler does, you can build a binary per platform (architecture) and have users download it, and save-lisp-and-die is a good way to do that
19:59:24
dim
for instance I use that in the pgloader build system and we package the resulting binary for debian, debian users then apt-get install pgloader and it works for them, they don't even have to know the software is written in CL
19:59:46
dim
there's also a wrapper in uiop (that comes with asdf) that provides a portable facility around save-lisp-and-die
20:00:12
dim
(setf uiop::*image-entry-point* #'appdev::main) (uiop:dump-image *appdev-bin* :executable t #+sbcl :compression #+sbcl t)
20:00:53
dim
it might be that the binary that debian hosts would work on CentOS, but I don't know about that, really
20:03:55
dim
education is more about culture than practical craftmanship, in my opinion... see, you knew how to ask the right questions
20:03:57
dlowe
architecture covers "can this my code execute?" (i.e. CPU) and "does this use the same hardware access protocol that my code expects" (i.e. OS)
20:30:54
HighMemoryDaemon
Can I pass one variable to "format" and do replacements in multiple places?
20:40:44
jasom
windows is actually much easier than linux for this because if you depend on any DLLs you can just put them in the same directory (as that is in the default DLL search path)
20:43:54
jasom
as far as linux portability... the linux kernel has a very stable API, *but* the runtime will invariably depend on some dynamically linked shared objects, and possibly some dynamically loaded shared objects as well. This can pin executables to a very narrow set distributions (and a narrow set of versions within the distribution).
20:47:03
aeth
jasom: That's nonsense. In practice, if you get a Linux application outside of a distro (or third party repositories that are intended for a certain distro) you're not going to depend on the distro's libraries.
20:47:27
aeth
And such applications from 15 years ago can still run even if you don't recompile them.
20:48:10
jasom
Applications from 15 years ago will almost certainly not run due to glibc changes if nothing else.
20:49:10
jasom
oh, you are talking about applications with bundled libraries (or statically linked libraries)?
20:49:18
aeth
A properly written third party application that is neither source distributed nor distributed via a third party repository will bundle everything.
20:50:37
jasom
most binary applications I've seen assume $TODAYS_POPULAR_LINUX_DISTRO e.g. Ubuntu today, redhat a while back.
20:52:17
aeth
Well, the ones that assume Ubuntu are probably increasingly using Snappy, whose only problem is that it's an Ubuntu-first NIH reinvention of something that exists not once but twice: AppImage and Flatpak.
20:54:36
aeth
jasom: Anyway, I think the vast majority of proprietary software written for Linux at this point are Steam games that are written for the Steam for Linux runtime (or whatever it's called).
22:57:27
jfrancis_
Technically a slime question, not a CL question, but still relevant. Slime is getting angry because I'm getting a returned string containing non-UTF-8 characters. Specifically, I'm getting the error "Invalid protocol message: Error during string-to-utf8: Unable to encode character 55357 as :UTF-8.". That's all true and accurate. But I don't care. Is there any way to tell slime to show me anyway, and just go ahead and munge 55357 on my screen i
23:00:15
jfrancis_
Mmm... You mean patch the slime source with an (ignore-errors ...) around the display code? I was hoping for something a bit less brute-force.
23:43:05
jasom
skidd0: you can do shadowing-import-from; uiop also defines its own version of defpackage where you can do imports of packages with no conflicts order matters)
23:46:34
skidd0
jasom: so shadowing-import-from explicitly defines which symbol to use, avoiding the name conflict, right?
2:24:25
stacksmith
G'morn... Has anyone experinced SBCL all of a sudden no longer saving lambda-lists - but only for some code? And recompiling does not help...
3:21:45
skidd0
so coming from Flask and Python, I've used SQLAlchemy as an ORM for a database. With CL, does an ORM provide as much of a benefit to the programmer?
3:22:32
skidd0
by that i mean, ORMs help make querying through database logic faster/easier to write (compared to SQL queries).
3:44:10
aeth
skidd0: The CL solution is often a linguistic solution instead of a directly OOP solution. e.g. for Postmodern (postgresql), http://marijnhaverbeke.nl/postmodern/s-sql.html
4:15:38
sabrac
skidd0: I cannot offer ORM recommendations pro or con as I use straight SQL (or s-sql) but you might look at mito and see if it works for you.
4:29:01
sabrac
skidd0: It really depends on what you want an ORM to do for you and the complexity of your data relationships and how well you understand them. I write functions with embedded s-sql calls that probably do the same thing you would do with an ORM.
4:49:38
skidd0
and my intuition was the, due to lisp's "power", ORMs are less of an improvement compared to other offerings
4:51:23
sabrac
skidd0: obligatory disclaimer - I am the maintainer for Postmodern (and thus s-sql). It is again under active development so if there is something you want, set up an issue on the github https://github.com/marijnh/Postmodern
5:01:04
panji
I finally satisfied with project i made for learning common lisp (https://github.com/epanji/decision-tree). if anyone here willing to give advice or criticize it, please do. but, please don't be so harsh to make me break down. :-)
5:09:05
sabrac
panji: I do not have time to review the code tonight, but I certainly want to congratulate you for documenting, testing and even a youtube video demo!