libera/commonlisp - IRC Chatlog
Search
3:44:38
kathe
would you be in a position to comment on which is a good common lisp programming environment under macos?
3:45:33
kathe
i "was" going to migrate to windows and hence use lispworks, but macos is looking very impressive.
3:52:47
semz
kathe: Clozure CL is probably a good choice, it focuses on Macs quite a bit and I think it even has its own IDE on there (although I've never used it so I can't say anything about its quality)
3:59:38
kathe
hmnn, hemlock is very interesting, but doesn't have the wide array of modes available with 'gnu' emacs.
4:02:38
kathe
i don't have any background in common lisp nor emacs, and i'm a bit confused about how to learn both in parallel without messing up my thought process.
4:03:45
kathe
so should i first work through the emacs tutorial and manual, get well acclimatised with emacs and then start-off with common lisp?
4:05:52
kathe
i had been quite gung-ho about forth, but after my interaction with some people from it's community regarding introducing a "condition system" and an object system via a metaobject protocol were shot down, i'm going to stick with common lisp.
4:07:35
kathe
thanks EdLangley, i think i'm going to stick with ubuntu. not only does it offer better facilities for development systems but a ubuntu-based setup also costs a lot lesser than a mac.
4:09:47
White_Flame
those who don't use emacs are forging their own path, and yeah hopefully other paths get as fully supported
4:10:32
ns12
kathe: What text editor are you currently using? Perhaps your current text editor has some support for Common Lisp. This will free up more time for learning Common Lisp.
4:11:16
kathe
i cut my teeth on 'sco' openserver so i tend to lean toward vi (not vim), but i'm eager to learn emacs because of the tight integration with common lisp development routines.
4:11:17
White_Flame
after sbcl & emacs, you want to install, in order: quicklisp, quicklisp-slime-helper
4:11:42
White_Flame
you shouldn't really need to adjust any config files after following their steps
4:12:38
EdLangley[m]
https://portacle.github.io is also a good way to get a nice package of "all of the above"
4:12:52
ns12
I personally use the SBCL REPL directly (with rlwrap for readline keybindings). That's another way to defer learning Emacs.
4:13:51
White_Flame
lots of cheat sheets, if you're learning: http://pchristensen.com/wp-content/uploads/2008/02/slimecommands.pdf
4:13:58
minion
kathe: look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
4:14:57
ns12
Here's a list: https://github.com/EbookFoundation/free-programming-books/blob/main/books/free-programming-books-langs.md#lisp
4:18:58
ns12
In the free books list, "Practical Common Lisp" and/or "Common Lisp: A Gentle Introduction to Symbolic Computation" are typically recommended to beginners.
4:19:31
kathe
I checked out slimv and vlime based setup, but i think i'll go with emacs because i can do almost everything else from within emacs (irc, email, notes, todo, etc.).
4:20:33
kathe
ns12: i've heard that the digital version of touretzky's book doesn't have corrections present in the paperback one.
4:23:12
kathe
2 things that most impress me about common lisp are the "condition system" and the "metaobject protocol" based object-system.
4:26:15
kathe
i don't remember finding the "condition system" in autolisp, nor did any of the seniors talk about it back then.
4:28:33
Bike
"The *error* function takes a single string argument, which is supplied by AutoCAD when an error is encountered during program evaluation. This string describes the error which has caused the *error* function to evaluate." doesn't sound like it has the condition system
4:30:22
kathe
i went through the sample session in phoe's "Appendix E". it's mind blowing. waiting to complete learning common lisp and buy phoe's book on the "condition system".
4:36:43
mfiano
I'd need conformal displacement for anything more than a flat row-major view of the backing storage, correct?
4:38:52
mfiano
Currently I only need a view of a pixel in a '(width height channel-count) #3a, but I was also thinking of things like a NxM kernel view for convolutions.
4:40:16
mfiano
Guess I could just derive the shape/extents from a single pixel and mutate the original directly.
5:16:04
qhong
recalling the discussion about software longevity a few days ago, what you guys think about a Nix/Guix replicate that runs in a single Lisp image a la asdf?
5:30:07
kagevf
I use guix to install nyxt since that's the only way I could figure out how to get all the right versions of nyxt, sbcl, and emacs ... necessary to connect to nyxt's swank server from slime
5:32:31
kagevf
qhong: what would the nix/guix inside CL do? find, and build CL systems? and allow easy switching between different versions? and also act as a package manager? so it would replace asdf and QL, plus add the versioning?
6:07:49
qhong
kagevf: I also think that reproducibility is a pain point of the status quo of CL eco-system. Hyrum law is real. I have no hope contemporary CL projects still work after just 20 years
6:19:18
qhong
mfiano: AFAIU CLPM is akin to a traditional package manager (ala pip, npm etc) rather than a functional pm
6:21:45
mfiano
Of course. Many existing software systems rely on stateful actions during installation. ASDF is programmable to do anything you could want.
6:22:59
lisp123w
kathe: I was trying Sly recently last week but had some pretty bad experiences so reverted to Slime
6:23:44
lisp123w
But in general Sly has some more advanced features (like stickers, which allows to mark a region to get automatic printing on the output) and a better search
6:24:09
moon-child
qhong: cl is in general ideologically aligned towards flexibility over analyzability
6:26:05
qhong
UNIX (and UNIX toolchain) allows as much flexibility (albeit much more poorly designed) on its FS state as CL (and ASDF), yet ppl eventually curse it and invented Nix/Guix
6:27:50
moon-child
mfiano: well, that is interesting, because jails encapsulate non-referentially-transparent things (such as network devices). Probably not super relevant to present discussion
6:28:26
moon-child
qhong: in particular, I can trivially calculate (and isolate) the closure of some object in unix, but not in lisp
6:28:32
qhong
As for edge cases, Nix/Guix has to deal with them manually too and it doesn't seem like too much a practical issue
6:29:08
moon-child
and I can observe all the side effects of an arbitrary operation (see ptrace, dtrace, this has been effected in practice)
6:29:08
qhong
mfiano: I understand you can certainly break it, my question is how many packages actually do it
6:30:36
moon-child
qhong: the closure of an object is the set containing that object and all the objects it points to
6:30:48
moon-child
(actually, the implementation generally gets such a closure, e.g. for fasls; but you do not)
6:31:27
qhong
moon-child: you mean one can get who-reference for arbitrary datum? damn I always want it so hard when CLing
6:31:41
lisp123w
kathe: I think Sly works better for multiple REPLs (I was doing a setup where I had SBCL / CCL / CLISP all on 1 command each), but I didn't want to spend time debugging the issues I had (lag on remote connection to an Image, some other strange bugs) so I reverted to Slime and it suited me.
6:32:35
lisp123w
kathe: However, the stickers thing in SLY is really good - so don't discount it based on my words. Its just that I was doing some bespoke setups which Sly had some issues on my machine
6:33:29
EdLangley[m]
Lispworks's delivery system can do a bunch of stuff that's unsafe if symbols are interned dynamicaly
6:34:12
kathe
lisp123w: thanks. on a different note, would you suggest that i learn to work with emacs in parallel with learning common lisp?
6:34:46
mfiano
Can you take care of dynamic runtime code that generates symbols looking for a specific package with uiop:symbol-call, alexandria:format-symbol in macro's, etc?
6:35:43
qhong
Basically, before build, all dependency are renamed to their nominal names, and after build, all dependencies plus newly created packages are renamed to their unique name
6:36:25
mfiano
I wouldn't want anything to do with such restrictions, but then again, I don't like Linux either.
6:36:49
lisp123w
kathe: Yes, it will be useful for many reasons I won't go into. The trick with Emacs is read the tutorial and guide (don't just jump in), then learn the keybindings C-h k (which lets you see what a keystroke does), C-h f (which describes function at point), C-h v (which describes variable at point), C-h b or C-h m (to see what keybindings are active in the buffer). But I'll shut up now (you can ask #emacs for more help there)
6:37:17
EdLangley[m]
And I can tell when a system uses them, because inevitably my preference of doing (setf print-case :downcase) breaks loading such systems :)
6:38:32
mfiano
ACTION is amused at the thought of #'(setf documentation) being changed when you look at it.
6:41:09
qhong
Actually I think there is an outrageous hack to make macros finding specific package at runtime still work
6:41:41
qhong
First I assume they will use keyword symbols instead of strings, then we can unintern those keywords after each build, and hack `find-package` so they recognize such keyword
6:43:14
lisp123w
EdLangley[m]: !!! Thank you for that archaic macro, very useful to protect against unintended consequences
6:47:23
EdLangley[m]
So, I think the best way (at the moment) to make building systems deterministic is to compute a dependency graph of the system you want to load and then do a depth-first postorder traversal of the graph, building each system you encounter in a subprocess
6:52:32
qhong
EdLangley[m]: hmm, interesting. so, because we can't do isolation in Lisp, let's use UNIX process virtualization to do isolation
7:46:36
kathe
phoe: i assure you that i will definitely buy the book, only i want to be ready for it. :)
7:46:43
moon-child
I dare say if you have completely learned common lisp you will not get much value out of the book, but
7:47:47
kathe
phoe: will you please consider writing a similar walk-through for 'clos' using 'mop'? currently there are disparate books, mostly going beyond what's really required to work under common lisp.
7:49:25
phoe
the only sane way to access keene's book is to *somehow* grab a physical copy or to visit Library Generic
7:51:07
moon-child
https://www.abebooks.com/products/isbn/9780201175899?clickid=WmHzvNy54xyIWLPUVSRa73dbUkGyAWwJITkbUg0&cm_mmc=aff-_-ir-_-64682-_-77798&ref=imprad64682&afn_sr=impact
7:57:05
mfiano
Hmm I think I'll read this book this weekend. Looks like I will enjoy it better than AMOP. I found too many errors in that book that stunted my learning and questioned my sanity.
7:58:28
phoe
kathe: if you're alluding to TCLCS, I simply had enough reviewers from all over my known Lisp world
7:59:58
parjanya
‘modern’ is overrated, if something works well that’s more than enough (and hi)
8:00:25
phoe
the main issue with keene book is that some examples don't really work anymore, and they're kind of badly chosen (e.g. the lock primitive)
8:00:36
kathe
phoe: the 'mit' press book explains 3 different approaches to 'mop' implementation without relying on common lisp.
8:00:50
phoe
and paepcke's is kind of a collection of articles rather than a singular and consistent book
8:09:09
phoe
kathe: https://www.reddit.com/r/lisp/comments/6qc61v/second_edition_published_interpreting_lisp/dkw66fl/
11:19:34
kathe
looks like it's either going to require extreme dedication for me to erase 24 years of ingrained key-stroke muscle memory, or i'm going to have to use "vim + vlime".
11:20:57
kathe
emacs has this interesting thing called buffers which become useful when grabbing code from/to the emacs email client, emacs code editor, emacs irc client and org-mode.
11:23:03
kathe
it would allow me to never take my hands off the keyboard and not have to switch between multiple onscreen windows for various applications. emacs has all of it in one place. in addition to having fantastic support for common lisp development.
11:44:24
ns12
How do BSD users get their Common Lisp libraries if they do not use Quicklisp? The ports tree for FreeBSD, NetBSD, and OpenBSD are mostly devoid of Common Lisp libraries.
11:46:15
kathe
ns12, i don't think there are very many common lisp developers working on any of the 'bsd' systems.
11:51:32
phoe
ns12: it doesn't, at least for me on mostly default evil settings - but I use smartparens instead
12:04:51
ns12
kathe: So what OS do Common Lisp programmers use? Linux? Some Linux distributions use NetBSD's ports tree (pkgsrc). There are zero Common Lisp libraries in pkgsrc.
12:11:09
phoe
they are a constant source of anguish and conflicts to anyone who has them installed and wants to use e.g. Quicklisp
12:14:15
ns12
Isn't that ASDF's fault for not allowing users to arbitrarily add/remove/reorder the directories where libraries are found?
12:16:48
ns12
AFAIK, it is not possible to make ASDF ignore a single directory such as /usr/share/common-lisp/cl-asdf/
12:19:20
ns12
Suppose I have installed many Common Lisp libraries using APT. The libraries get installed in /usr/share/common-lisp/ (e.g. /usr/share/common-lisp/cl-lib1/, /usr/share/common-lisp/cl-lib2, etc.).
12:19:20
ns12
How do I make ASDF completely ignore the existence of /usr/share/common-lisp/cl-lib1/ only?
12:20:14
phoe
(let ((asdf:*central-registry* (remove #p"/usr/share/common-lisp/cl-lib1/" asdf:*central-registry* :test #'equalp))) ...) ?
12:21:32
ns12
asdf:*central-registry* is NIL by default, so there is really nothing to remove from it.
12:22:15
ns12
"I'd simply clone cl-lib1 into my local-projects and have this one provide cl-lib1.asd" - Yes, but then ASDF will complain/warn that there are two different versions of the same library ...
12:23:42
phoe
I do not have a lot of practical ASDF experience, I use it for simple cases most of the time
12:23:45
ns12
"I have no idea how to exclude it the "proper" way" - I actually have no idea whether or not it is possible. I'll read the docs again (for the fourth time...).
12:25:19
ns12
Me too, I use it for simple cases most of the time. I just have not figured out how to make ASDF ignore one single library at a specified filepath.
12:35:01
_death
maybe something like putting (:source-registry (:exclude "cl-lib1")) in ~/.config/common-lisp/source-registry.conf (I've not tried it.. check the manual for more info)
12:56:41
phoe
minion: memo for marcoxa: a CDR idea would be to make DESCRIBE for symbols configurable, so e.g. if I create some custom namespace mapping from symbols to my custom objects, I can have this reflected in (describe 'foo); the portable DESCRIBE-OBJECT mechanism doesn't allow for that.
13:04:20
phoe
_death: I'm looking at LISP-NAMESPACE and the horrible hack it uses for actually adding things to DESCRIBE output
13:04:45
phoe
and the worst thing is that it seems to work, and that LISP-NAMESPACE is the 51st most popular Quicklisp system
13:06:58
_death
just because someone wrote something doesn't mean it's a good idea?.. and just because it's been downloaded many times doesn't mean it's popular (= used by many)
13:09:50
beach
Perhaps it is best to supply something entirely different both for DESCRIBE and DOCUMENTATION. I mean, no other module depends on them, so we might as well design a new mechanism for them.
13:10:28
beach
That way, we could plan for internationalization, for instance, but also for something other than raw text for DOCUMENTATION.
13:12:35
phoe
I assume we could use a client technique to pass additional arguments to DESCRIBE or DOCUMENTATION, just like Eclector does with READ
13:14:13
Shinmera
Granted, I never had the time to actually make use of it. But I hoped it would find some use when the Radiance documentation was translated into Japanese. Sadly it never got beyond the primary documentation file (so no docstrings were localised)
13:14:46
beach
Anyway, I was also thinking of structured documentation that can contain links, and that can be presented in different ways.
13:15:40
Shinmera
I think someone here used my documentation-utils package with an extension of their own to provide structured docstrings that are then just compiled down to a plaintext version for backwards compat.
13:25:11
phoe
...the elephant in the room that is here is that none of the implementations seem to define an :AFTER (SYMBOL T) method on DESCRIBE-OBJECT
13:35:03
_death
so there's a semantic network project called sneps.. sneps3 is from 2012 and seems to use ltk/common-graphics or a java gui.. it also has allegro-specific code for loading (no asdf), wonder how much effort would be needed to get it to work portably.. and it seems they decided to rewrite in clojure :o
13:41:38
_death
with some gamedev toolkit (trial) maybe an interface like http://www.wikiwebapp.com/ can be written for introspecting the lisp image
13:56:46
_death
I did just try some alloy examples, and seems to mostly work.. menu-bar items appear to have wrong widths (maybe has something to do with stumpwm?)
13:57:43
Shinmera
fwiw we just released a jam game written using Trial that's fully open source: https://github.com/Shinmera/vpetjam with binaries / screenshots here: https://shinmera.itch.io/vegetablemash
13:59:03
Shinmera
_death: The glfw backend uses the fond text renderer, which is abandoned. The maintained backend is the msdf renderer, but that one requires precompiling texture atlases for fonts using an external tool. |3b| has been working on the pure-lisp version of that for some time, and hopefully it'll be ready for use this year so I can switch to that and purge the fond one.
14:07:55
morganw
Could I ask, was there ever a working prototype or theory about how to run a Common Lisp game on Android or iOS?
14:25:30
foxfromabyss
Is there a better way of searching for a library, than querying this? https://www.quicklisp.org/beta/releases.html
14:27:13
phoe
is there anything in the spec that guarantees that (let ((x 1) (x 2)) x) will signal an error?
14:29:27
foxfromabyss
Is it also possible to find the source code for a quicklisp library? specifically looking for a readme or smth similar
14:29:45
phoe
foxfromabyss: https://github.com/quicklisp/quicklisp-projects/tree/master/projects/zpb-ttf
14:30:00
foxfromabyss
yes but .. i am *searching* for a library and not sure if the one i found is the one I am looking for
14:53:04
epolanski
hey all, pretty new to common lisp. I wanted to ask if there's some library to write html front ends in pure common lisp. I don't really need much js interop I can implement all I need on my own
14:56:49
epolanski
interesting I want to give it a spin, I have recently released a pet project and since I have already all E2E tests setup I thought it would be nice to create an experimental branch and TDD the same application in a different language, possibly common lisp
15:18:38
epolanski
ok but generating templates is one of the issues, what about interacting with dom APIs?
15:19:57
epolanski
e.g. making SPAs in scala, elm, haskell, ocaml is possible, wonder if that's true for common lisp as well
15:22:24
epolanski
can I use something like https://github.com/cxxxr/valtan to implement some bindings to JS apis?
15:23:17
Shinmera
You can use stuff like Parenscript to pretend like you're writing CL which is then spit out as JS
15:24:07
Shinmera
There is currently no full implementation that can compile to JS, and it is unlikely it would be worth it anyway, due to the runtime size imposed by the CL standard.
15:26:17
Shinmera
Common Lisp is a big standard, with a lot of stuff that is needed to make an implementation compliant. For instance, the entire compiler needs to be available at runtime. By necessity this makes the runtime large.
15:26:20
epolanski
I'm new to CL but I've read that many CL functions are not implemented in CL itself but, e.g. in C
15:29:13
Shinmera
epolanski: To preempt things, how functions are implemented is an implementation detail. However, all implementations that are in serious use implement most of their library in CL. C is only really used to interface with the operating system or to implement very hairy things like the GC.
15:29:14
epolanski
I'm not ultra fond of the book to be honest, not as much as I was in SICP when I've first read it