freenode/#lisp - IRC Chatlog
Search
5:33:26
krwq
How do you create an int and get pointer to it with cffi? I've tried this: (cffi:with-foreign-object (user-data :int) (setf user-data 123) (cffi:mem-aptr user-data :int 0)) but it gives me a value and not a pointer to that value
5:46:45
krwq
thanks pillton - so what does mem-aptr do then and why didn't it complain about type when setfing?
5:47:50
pillton
The value bound to user-data is a system area pointer i.e. it is an object representing an address in memory.
5:51:43
pillton
(cffi:mem-aptr user-data :int 1) <=> (cffi:inc-pointer user-data (* 1 (cffi:foreign-type-size :int)))
5:52:36
aeth
Could someone make a C->CL compiler in CL using CFFI? Or does CFFI not let you do everything that C can do?
5:55:29
aeth
Would it be more efficient than other C->CL approaches? Afaik, Mezzano (or was it another LispOS?) uses a C->CL compiler for Doom.
5:56:53
aeth
Ah, the Mezzano Doom port used an LLVM IR to CL compiler. https://news.ycombinator.com/item?id=14120802
5:58:37
aeth
k-hos: Programming as art is all about using things in cool ways they're not supposed to be used (as long as such ways are legal and ethical)
6:02:11
aeth
iqubic: Imo it's worthwhile to know enough assembly that you can read the output of #'disassemble
6:03:45
aeth
disassemble is implementation-specific (and can also be architecture specific, obviously)
10:01:36
Shinmera
iqubic: Learning ASM is worth it, though there's not just one assembly, and they can differ significantly in details.
10:02:10
Shinmera
iqubic: I'd recommend learning a very simple RISC-like first, and then learning x86. The former because it'll be easier to get started with and get an idea of what it's about, and the latter because it's actively useful.
12:50:36
jmercouris
borodust: Xach said that you apparently use quickdist to host your own quicklisp server?
12:54:54
AeroNotix
I'm sure I could google this but what if your dist provides a package that's in the base quicklisp dist?
12:56:15
jmercouris
Shinmera: Okay, so is it okay if I bounce off my idea off of you to make sure I understand this?
12:57:03
jmercouris
people can submit packages, whatever, each package contains it's own folder per the quickdist instructions
12:57:36
jmercouris
then, I can use quickdist to publish to my github io page at some url called like next-dist or whatever
12:58:09
jmercouris
when next first loads it will do: (ql-dist:install-dist "http://url-to-next-dist.github.io/quickdist.txt")
12:58:53
jmercouris
then of course theoretically, assuming I exported properly, they will be able to (ql:quickload "xyz-package-from-next-trusted-repository")
12:59:06
Shinmera
jmercouris: Is next supposed to be quickloadable or only available as a binary package?
12:59:34
Shinmera
In the former I heavily advise you not to mess with quicklisp without the user's explicit instructions to do so
12:59:48
Shinmera
In the latter I would do that before you ship a package so that it's already done.
13:00:02
AeroNotix
jmercouris: as Shinmera mentioned messing with the user's QL is no good. You can however isolate next's QL environment though
13:00:17
AeroNotix
e.g. if you install from binary and have a next-isolated QL install then everything is fair game.
13:00:40
AeroNotix
jmercouris: not sure about namespaced but in Lispkit I install QL into a local dir and use that instead.
13:00:44
Shinmera
jmercouris: You can have multiple QL installations, but only one active at a time in an image.
13:00:57
AeroNotix
look at lispkit's makefile. There's some rules which do something similar. Should give you an idea
13:01:56
jmercouris
but if they are quickloading next, then they can't exactly switch to another QL installation after having quickloaded it
13:03:44
jmercouris
AeroNotix: have you given the GTK version a spin perchance? I know you're super busy, jw
13:03:58
AeroNotix
jmercouris: no I haven't. Getting more time recently though. When I get a minute I'll run it
13:04:38
AeroNotix
but I am talking about users of binary distributions. Installing your own QL path and load plugins from that is better
13:04:50
jmercouris
because if they can QL next, they should be able to go ahead and add a new dist to install plugins etc
13:05:22
jmercouris
and at any rate, when they QL next, they can compile it, and install plugins that way as well
13:06:18
AeroNotix
https://github.com/AeroNotix/lispkit/blob/master/Makefile#L72-L84 here's what I did in lispkit. This was aimed at being able to build lispkit without needing many system dependencies but the idea remains
13:11:17
jmercouris
Also, I am trying to do split window, and I'm having a very unpleasant time trying to figure it out
13:11:40
jmercouris
on the surface it looks so deceptively simple, just a tree of views, with split horziontal and split vertical
13:11:41
AeroNotix
jmercouris: I just built the image for it and in the repo I had a PKGBUILD for archlinux
13:12:38
jmercouris
maybe that is what I should do, just include a shellscript that creates a binary
13:13:41
AeroNotix
jmercouris: https://github.com/AeroNotix/lispkit/blob/2482dbeabc79667407dabe7765dfbffc16584b08/Makefile#L96-L106
13:14:18
AeroNotix
https://github.com/AeroNotix/lispkit/blob/2482dbeabc79667407dabe7765dfbffc16584b08/make-image.lisp
13:16:25
AeroNotix
Right now I'm kind of focusing on IRL projects. I've got a couple of cars I am working on.
13:18:52
AeroNotix
https://photos.app.goo.gl/BTEuDXN3qx8olPf63 then someone used it for their wedding
13:19:57
AeroNotix
yeah it is, I love the size difference. It really does embody the different attitudes between English and American people
13:32:02
AeroNotix
wow I'm quite surprised that lispkit still builds with no issues. Guess the work in QL and my effort to automate it paid off!
13:44:53
AeroNotix
I do really like how with QL you depend on a distribution of systems rather than say a specific version of a system. It's like there's one version your application is pinned to, the whole dependency tree (all systems within QL)