libera/#commonlisp - IRC Chatlog
Search
6:01:44
moon-child
Spawns: obviously, immutable languages are turing-complete, so you _can_ implement a mutable language in terms of immutable semantics
6:02:58
moon-child
Spawns: setf is a macro. In the case of CDDR, that will expand to something like (rplacd (cdr list) nil)
6:03:01
beach
I would appreciate not being corrected when I attempt a pedagogical approximation to a newbie.
6:03:23
Spawns
i think you are right about performance moon-child, that will be a lot of allocations and general churn
6:04:16
Spawns
the main reason I am asking is because doing mutable link lists in rust is a massive annoyance
6:04:21
beach
Spawns: More generally, this is a channel for Common Lisp. You are attempting the implementation of a different language for which we have no specification, so it is nearly impossible to give you advice.
6:04:46
beach
Spawns: I think you need to phrase your questions in terms of how Common Lisp is or can be implemented.
6:04:53
moon-child
Spawns: I think I told you before that trying to implement lisp in rust was not going to work out
6:05:14
Spawns
i was curious if you are familiar with how cl implementations implement their lists beach
6:05:45
minion
Spawns: SICL: SICL is a (perhaps futile) attempt to re-implement Common Lisp from scratch, hopefully using improved programming and bootstrapping techniques. See https://github.com/robert-strandh/SICL
6:06:40
beach
Spawns: Usually, a CONS cell consists of two consecutive words in memory, and a list is just a sequence of CONS cells, linked by their CDR.
6:07:16
beach
Spawns: SICL bootstrapping? The compiler is written in Common Lisp and generates native code. Or will, when we are done.
6:08:33
beach
Spawns: You might want to read the paper by Krystof, entitled "SBCL, a Sanely Bootstrappable Common Lisp". SBCL is mostly written in Common Lisp as well.
6:09:55
beach
Spawns: You might also watch my videos for the online Lisp meeting, entitled "Creating a Common Lisp implementation".
7:21:07
ns12
Hello, in "EVAL-WHEN considered harmful to your mental health" (https://fare.livejournal.com/146698.html), I see "The Lisp processor reads a stream of text (an unfortunate choice of specification, INTERLISP and Smalltalk fans may tell you) ...".
7:27:51
beach
ns12: I am just guessing, but I think it means that Common Lisp is based on keeping source code in files, and those other systems are more "image based".
8:33:57
pjb
ns12: nothing prevents to to adopt an image based development model with CL implementations (that have images, ie. all but ecl). Have a look at: Image Based Development http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/ibcl/index.html
8:35:10
pjb
ns12: it's just the matter of developping a few tools, including a nice editor. there's CL:ED but most implementations defer to an external program or don't implement it.
8:38:13
phoe
and there's the problem where images accumulate cruft over time - and Smalltalk and Interlisp images are no exception
8:40:37
phoe
sure, but textual source code is inspectable easier than images which are composed of many things that are impossible to show as text
8:41:03
phoe
while text as a representation of source code has many downsides, this one is a clear upside
8:42:03
moon-child
I may ask my image (or, at least, ought to be able to ask my image) not only 'show me all the objects', but also 'show me all the relationships between the objects'
8:47:20
akater[m]
How expensive would it be to keep a registry of all objects, or at least of objects of all interesting classes to make cruft more manageable? (Maybe commercial Lisps do this already, I don't know)
8:48:12
phoe
maybe you don't need to do that - you should be able to walk the whole image in order to find interesting objects
8:51:19
moon-child
so you can't so easily say 'trace _all_ the objects in the image' (as a gc would, say). (I assume that it still is possible, though)
8:53:14
phoe
https://github.com/sbcl/sbcl/blob/a45f58f7b5e10666cd80bcba9bd90a84b3d49c53/src/code/traceroot.lisp#L171-L282
8:55:09
phoe
https://github.com/sbcl/sbcl/blob/f16d44366365a9529b78b05d6787be8b5e9ac084/src/code/room.lisp#L343-L393
12:35:24
cage
hi! Can be assumed that (string= nil nil) ; => t ? I checked the hyperspec but i was not able to answer my question.
13:10:22
Shinmera
mcoll: You won't find many people using them on "freenode". If you want better insights, throw a mail to their mailing lists, or look at their appraisals that they list on their websites.
13:15:48
beach
My paper on debugging rates Allegro the best: http://metamodular.com/SICL/sicl-debugging.pdf
13:16:22
beach
Not that I used it myself, but it actually has a real debugger which none of the others I investigated does.
13:17:49
phoe
before rasengan decided to flip the network upside down and forced everyone to migrate here
14:03:17
lisp123
You will have to figure out a way of copying the faces from lisp major mode to slime repl (C-h m should tell you what the exact major mode of the slime repl is called)
14:04:35
lisp123
Something like this may help https://protesilaos.com/codelog/2022-01-08-emacs-face-remap-add-relative/
14:05:03
lisp123
THere's different ways to do it, and its a bit complicated (I don't know exactly how just yet and won't have time to look into it)
14:06:50
lisp123
Ask on #emacs actually, somebody might be able to help, its not that obscure of a question
14:54:54
mgl
I don't seem to receive the two-factor authentication code from https://gitlab.common-lisp.net/. Is this a known issue?
14:56:20
minion
The URL https://gitlab.common-lisp.net/users/sign_up?secret=b491250b will be valid until 15:00 UTC.
15:47:01
kevingal_
What I want to know is how to stop everything in the REPL being coloured a string after there's an error message with a newline in it.
15:52:21
edgar-rft
kevingal_: what REPL are you talking about? Emacs/Slime or some CL implementation running in a terminal emulator?
17:57:19
sveit_
if i'm using symbols as flags inside of a function, is there a reason to prefer keyword, uninterned, or "normal" symbols?
17:58:22
White_Flame
also, even if they're purely internally used within your function, keywords can higlight in your source code and have a good visual distinction from your local var names
17:58:23
sveit_
say that they are meant to be used exactly in the scope of the function body (otherwise I guess uninterned would not work)
17:59:49
sveit_
something like (lambda (x) (let ((size (cond ((> x 7) 'big) ((< x 3) 'small) (t 'unknown)))) (when (eql x 'big) "wow")))