freenode/#lisp - IRC Chatlog
Search
11:20:18
ecm
It's not indenting sub-functions under a function like it would with let or some other built-in function
11:33:37
ck_
like I predicted ;) your emacs is set to indent using tabs, that's the issue you need to address first
11:40:57
beach
So, how exactly did you create this code? How did you start emacs, SLIME, and how did you create the buffer?
11:41:55
ecm
I opened the file as normal, I've added a slime-company hook for the file, I then started slime, loaded croatoan, compiled the file and did a C-M-q expecting to indent properly
11:45:27
ck_
what's wrong with cmq? "C-M-q (translated from <escape> C-q) runs the command indent-sexp"
14:23:52
puchacz
hi, to play with ecl (I am interested in android), I need to sudo apt get ecl first, to get any version, then compile the newest one and follow some tutorials?
14:29:07
spoeplau
I'm trying to do (defctype foo :pointer) with several types '(foo bar baz), and I'm looking for a way to do something like (dolist (name '(foo bar baz)) (defctype name :pointer)). It doesn't quite work like this because "name" isn't evaluated, and the best I've been able to come up with so far is to define my own macro and then call it just once. Is there a better way?
14:37:38
spoeplau
_death: I have some more complex cases too, that one was just to illustrate what I'm trying to do
14:39:51
_death
spoeplau: you can define a META macro, something like (defmacro meta (form) (let ((generate (gensym))) `(macrolet ((,generate () ,form)) (,generate))))
14:40:31
_death
then (meta `(progn ,@(mapcar (lambda (name) `(defctype ,name :pointer)) '(foo bar baz))))
14:42:47
_death
some years ago discussion here resulted in a METALIST operator as well, https://github.com/death/gnusdumps/blob/master/driver/main.lisp#L121
14:47:30
_death
with METALIST it would be (metalist (name) "Define a foreign pointer type alias for NAME." `(defctype ,name :pointer) ((foo) (bar) (baz)))
14:52:02
_death
ralt: I remember you had some pull requests.. nice to hear that it worked for you, I wrote it for a thing that became irrelevant t me a year or two later.. the publish part is still broken design
16:43:02
flip214
Is there a library that can translate a SVG to an CL-PDF form, like a macro? translating a SVG to a PDF via eg. inkscape is relatively costly (in CPU terms), so directly writing a PDF would be much better
16:46:28
flip214
frodef: I can read a PDF in inkscape, and save as SVG. SVG is text-only and very similar to PS and PDF, so the typical 99% should be an easy AST => AST translation.
16:47:09
flip214
If I can get the SVG => CL-PDF transformation, I can "easily" get a PDF and write "compatible" data from CL.
16:48:37
frodef
flip214: To my knowledge, SVG is a substantial vector-graphics DOM, and "translating" to PDF I suspect is infeasible, beyond rendering to a raster image. Except perhaps a carefully selected subset of SVG.
16:52:53
flip214
and cl-pdf as well as svg have primitives like matrix-transform, text, choose font, etc. so a translation seems feasible.
17:20:41
Xach
It's not automatic, you would need to parse the paths in the SVG. But the drawing part after that is not too tricky.
17:21:12
Xach
And I'm defining "simple SVGs" as "ones the Vecto image model could support" to make it easy