libera/#commonlisp - IRC Chatlog
Search
23:41:19
harovali
does anyone know of some current tutorial or documentation to cl-pdf and cl-typesetting?
23:42:24
stylewarning
phoe: I have created the perfect overengineered macro for you: https://github.com/stylewarning/lisp-random/blob/master/associate.lisp
23:42:31
harovali
i'm reading https://github.com/mbattyani/cl-typesetting/blob/master/documentation/cl-pdf-doc.pdf which might be outdated
23:44:12
Xach
phoe: it is because of how i implemented portability. i would do it differently today.
23:45:12
Xach
mfiano: were the pngload-fast changes freshly pushed today also, even though the commits are old?
23:49:01
Xach
Ok. Well, I'm not sure how to account for what I'm seeing, but the missing pngload system breaks a bunch of stuff.
0:12:06
mfiano
Xach: The worst part is this same thing happened the last time you pinged me about it. I had this repository hard reset to a specific commit, and pushing a minor change fast-forwarded it. This is what I get for not paying attention.
0:15:55
mfiano
Repairing this is above my head right now, because I can't rebase or revert with merge commits in the tree
0:20:05
mfiano
I guess I can revert just my working tree and then make another commit. Simple enough idea. Let's see how it plays out
2:09:27
Xach
well, here are a bunch of update failures: https://gist.github.com/quicklisp/97e9df796326da8d0c75af75b91400d9
3:48:39
smokeink
(in clisp): (list :); => (:||) , is there any way to make this work in sbcl as well? illegal terminating character after a colon: #\)
3:49:51
no-defun-allowed
Yeah, I think CLISP is being lenient and you have to at least put :|| there.
3:53:03
smokeink
https://www.reddit.com/r/lisp/comments/72n6gy/the_nest_macro_ported_from_common_lisp_to_scheme/ ": as a universally accepted token denoting a self-evaluating keyword would be handy."
4:06:17
harovali
is it possible to see the coorect glyph in CL-PDF's pdf:draw-text with characters like #\U+00CD ?
4:07:40
no-defun-allowed
From memory, CL-PDF has the kerning information for some Adobe fonts, but only for the ASCII character set.
4:10:03
harovali
I think I should render those unicode strings in another library and compose that in cl-pdf, right? Is cl-typesetting that sort of library? Are there other nice options?
4:16:43
pjb
p0a: :: means you don't care whether the symbol named "BAR" is exported from the package named "FOO" or not.
4:16:58
pjb
p0a: : means that you want to get an error signaled if the symbol named "BAR" is NOT exported from the package named "FOO".
4:17:41
pjb
p0a: so basically, you should always use : and if an error occurs, it means you're messing with the internals of the package, and you should correct and limit yourself to the public, exported API.
4:18:02
smokeink
p0a: they both refer to the symbol named "BAR" from the package named "FOO" . if you want to use foo:bar then first you have to export 'bar
4:23:57
p0a
actually there's no .fasl files I'm super confused. It complains about "/home/emacs/Pictures/foo" but that string does no longer exist in my main.lisp project. I restarted the lisp image too
4:26:45
pjb
p0a: the .fasl files are stored by asdf in ~/.cache/common-lisp/. In general, you don't need to bother with them.
4:27:22
smokeink
HUNCHENTOOT:CREATE-FOLDER-DISPATCHER-AND-HANDLER is trying to access that folder, perhaps
4:28:06
pjb
p0a: CL distinguishes PATHNAMEs designating directories from pathnames designating files. #P"/home/emacs/Pictures/foo" designates a file named foo. #P"/home/emacs/Pictures/foo/" designates a directory named foo.
4:28:59
mfiano
i think you're trying to compile files rather than taking the iterative development approach
4:30:07
harovali
how do I create a new repl in slime if I accidentally closed it ? the inferior buffer is still there
4:35:33
pjb
smokeink: yes, sorry. This was a trick in clisp to read :foo in the keyword package. But for after :, you need to use :||.
5:28:53
p0a
But when I delete that line of code that starts the server in my main.lisp file, the asd file no longer starts the server
5:30:13
pjb
p0a: check your toplevel forms. I would advise avoiding starting things from lisp sources. Instead, define functions, and call them from the repl. Like main, or start-server, stop-server, etc.
5:32:36
p0a
but wouldn't C-c C-c'ing (in-package :project-alpha) get me in project-alpha? It still is in CL-USER> or is that just for the REPL?
5:35:42
no-defun-allowed
If you have it in a file, SLIME will evaluate/compile/&c everything after that definition in the specified package, but it won't affect the REPL.
5:36:32
no-defun-allowed
If you evaluate (in-package package-name) in the REPL, it will change the package there.
5:37:07
no-defun-allowed
And for the love of all things that are not Turing-complete to parse, please don't make a website using C++.
5:37:09
harovali
cl-typesetting has an example which has a sequence type specifier of 'unicode-string-type. I'm trying to compile this code in SBCL, and it seems not to have that name defined. I'm trying without success to figure out the SBCL equivalent. Would you please help me?
5:37:56
no-defun-allowed
harovali: I would use the specifier STRING, because SBCL has Unicode support, so you should be fine.
5:39:29
no-defun-allowed
smokeink: That is a bit of a simplification. *package* is a special variable, and can be bound to many packages by one thread.
5:41:15
smokeink
slime's background evaluation thread peeks at (in-package :package-name) in the source file, and then sets *package* accordingly, before evaling the sourcecode (if I'm not mistaken)
5:42:19
smokeink
pjb : I need help writing that reader macro for #\: https://paste.ofcode.org/sMLY3Awg6pPKtJhrBCRLzT
5:43:40
no-defun-allowed
From memory, the symbol reading stuff is called when there is no macro character to use, so that makes sense, though it doesn't help.
5:47:45
smokeink
I want a macro character that'll allow me to read : as a symbol, and will not break pkg:symbols or :symbols
5:47:53
loke
Apparently it was removed (there is a note about that in CLHS). I must have seen it in the ClTL2 book.
5:54:56
loke
Oh wait. there is more information here: http://www.lispworks.com/documentation/HyperSpec/Issues/iss216_w.htm
6:07:59
harovali
smokeink: no, I'm trying to render a unicode enabled truetype font in making a pdf document with cl-pdf and cl-typesetting
6:12:16
no-defun-allowed
harovali: Those would look like the AFM files in https://github.com/mbattyani/cl-pdf/tree/master/afm
6:14:28
pjb
smokeink: if you want to deal with (foo:) -> (foo:||) then you also need to add reader macro on all consituent characters, and parse foo too.
6:17:35
pjb
smokeink: you could change the test for next-char to something like: (or (find …) (not (nth-value 1 (get-macro-character next-char)))) for more generality, I guess.
6:19:14
pjb
or rather: (multiple-value-bind (rm nt) (get-macro-character next-char) (and rm (not nt)))
8:02:20
galdor
Xach: I was not even aware they were in quicklisp, I have not use them for so many years I do not even remember what they were for
8:03:39
galdor
by all means remove them, I'm pretty sure I never submitted them for inclusion, and I'm not even sure I still have the code
11:22:57
atgreen
asdf question... I am using a one-package-per-file style, and have packages user and db - but they have a circular dependency (they want to call functions exported by each other), and asdf doesn't like this. What's the best way to address this?
11:28:03
Shinmera
two choices: 1) don't use oppf, 2) factor out the circular deps into a third package both depend on.
11:28:24
galdor
there are similar issues in every language, excessive compartmentalization does not help