libera/#commonlisp - IRC Chatlog
Search
12:12:26
contrapunctus
I wish Common Lisp tools used Common Lisp contructs themselves to work with Common Lisp code, so you could e.g. change the readtable and your tooling would automatically be aware of it and go on working as usual...but beach is working on something like that, right? 🤔
12:14:20
hayley
"We got incremental parsing to work, and now you want me to solve the halting problem at typing speed?" - roughly paraphrasing beach
13:25:16
MichaelRaskin
I have a page or so in my paper… basically interactions of macros and lexical environments and macrolet are already a mess, and then there is a question to what defun expands…
13:42:18
pdietz
This shows up in, for example, the ITERATE macro. Some parts of that require code walking, and they don't work if there are macrolets in the body. It also interacts poorly with what Waters' COVER package does to code. I had to expose an extension feature to ITERATE so COVER could tell it how to deal with certain cover-specific
13:42:58
MichaelRaskin
Yep, agnostic-lizard test suite more or less breaks all the previous code walkers in _unforced_ places
13:43:24
MichaelRaskin
There are things that are actually hard to handle, and there are a few places people just forget about
13:46:29
MichaelRaskin
(except implementation-specific code walkers, of course; those just get completely broken by updates from time to time)
14:10:14
Guest74
contrapunctus: thanks, thought I wasn't looking for any to try, I'm quite happy with paredit. I was asking if the behaviour with pipes is the same in the other ones to see if the fault was paredits. Then tried to report the issue and ran into a dead wall trying to find a place to raise issues. it does make dealing with symbols that have to be
14:21:59
lisp123
Has anyone considered before extending the CLHS documentation look up to user packages? e.g. C-c C-d h on a symbol takes you to the definition page of that symbol
14:22:30
lisp123
(it assumes people write documentation, but if there's a habit of doing it, then hopefully more will do it)
14:23:59
ns12
Hi, is 15.17R X3J13/94-101R (12 August 1994) the latest draft of the Common Lisp standard?
14:25:41
ns12
Another question: now that ftp://ftp.parc.xerox.com/pub/CL is no longer accessible, is there a reputable mirror of its contents available over HTTP(S)?
14:27:37
beach
ns12: This site https://github.com/s-expressionists/dpans claims to have the latest draft.
14:27:53
lisp123
Is a good online copy (if you need an offline copy, let me know, I copied it to a repo earlier)
14:32:07
ns12
Franz provides Version 15.17R of the draft in HTML and PDF formats: https://franz.com/support/documentation/ (see "ANSI Specification").
14:32:46
beach
ns12: What are you planning to do with it? I am asking because there are some existing projects that use it.
14:34:24
lisp123
ns12: Please let me know if you get an answer to this - access to a copy of ftp://ftp.parc.xerox.com/pub/CL
14:43:51
ns12
The Franz documentation page links to https://web.archive.org/web/20190630183107/http://cvberry.com/tech_writings/notes/common_lisp_standard_draft.html which in turn links to this interesting repository https://gitlab.com/vancan1ty/clstandard_build
14:46:11
ns12
lisp123: It seems that there are many copies of ftp://ftp.parc.xerox.com/pub/CL if one searches using Google, but I don't know how reputable those copies are.
14:51:42
contrapunctus
lisp123: SLIME has a command to look up documentation called `slime-documentation` (not to be confused with `slime-documentation-lookup` , which is for the CLHS)...doesn't that work for this?
14:52:14
AndrewYu
Hello guys- I found an article of interest at least to me (http://metamodular.com/Common-Lisp/lispos.html). I wonder if there are any implementations of such, as in, an operating system with a lisp-like interface. It seems that shcl(1) is a nice shell where you can, eg, define shell "builtins" with (define-shell-builtin double (x) (* 2 x)) and stuff, seems cool. I also wonder if command-line
14:52:15
AndrewYu
shells (or other means to access a system) with a (almost) completely Lisp-like syntax is feasible (that is, usable to the end user). It seems that needing to 'quote stuff and write all those parens for (procedures) seem cumbersome as a user interface, heh :\
14:52:36
ns12
lisp123: Most of these Common Lisp draft projects seem to use copies of the drafts hosted by CMU: https://www.cs.cmu.edu/afs/cs/Web/Groups/AI/lang/lisp/doc/standard/ansi/dpans/ which apparently comes from ftp://parcftp.xerox.com/pub/cl/dpANS1/dpans/
14:52:53
beach
AndrewYu: There is Mezzano and Movitz already, but not the full specification you indicated.
14:55:00
lisp123
contrapunctus: Thanks. That works, but its only doc strings and lambda lists. Perhaps then doc strings should be expanded in greater detail and used in conjunction with this
14:55:12
AndrewYu
Yeah. I'm trying not to appeal to tradition here, because legacies aren't always good... I've heard of mezzano, will check movitz
14:55:33
AndrewYu
The idea of a single address space seems like a good way to solve the mess of IPC in UNIX-like systems
14:55:43
lisp123
ns12: I see. I have a copy of the final standard, so haven't really looked into the draft
14:58:01
lisp123
contrapunctus: Thanks though. What I might do going forward is expand the doc strings of any libraries I use, to then better utilize slime-documentation
15:00:45
lisp123
contrapunctus: Thank you! I saw that from the perspective of "Divio", which is one of the users, I did not know the original source was different
15:52:29
White_Flame
AndrewYu: it hasn't been explicitly mentioned here, but there used to be commercial Lisp machines in the 70s-80s, whose fundamental high level language was Lisp, too
15:54:59
White_Flame
but of course beach's site does address their (now) glaring omission of inter-application security against mucking up the system too horribly, with the notion of first-class environments
15:57:10
White_Flame
well, there's 2 issues: untrusted & potentially malicious code, and robustness against errors
16:06:34
Guest74
when using COLLECT something INTO in loop, should the supplied variable be accessible? It says it's bound as if by WITH, but I can't seem to setf it to '() like I can with WITH.
16:10:44
Guest74
I see the var i'm collecting into having the previous contents. uh, maybe a paste will help.
16:12:02
Bike
oh, i see. i'm not sure it's guaranteed to be modifiable directly, and making it so might make the collection less efficient
16:13:03
Guest74
the standard saying it's bound as if by WITH leads me to believe it should, unless I'm reading the spec incorrectly.
16:15:47
Bike
you can modify them. saying "into" vars are initialized as by with probably just means that they have the same kind of defaulting behavior
16:16:36
Guest74
i'm just trying to get rid of more nreverse nonsense. I'd really like to be able to use collect with WITH vars.
16:19:25
Bike
to elaborate on the efficiency thing- the usual implementation just keeps track of the last cons in the accumulated list, so collect is just (setf lastcons (setf (cdr lastcons) (list new-element))). as such lastcons is where the action is and the "into" var doesn't affect the operations. to make it affect the operations, the list would have to be linearly scanned each time something is added instead of
16:20:47
Guest74
oh i'm aware of the efficiency thing, which is why I'd like to use collect. I'm wondering if it's what the spec says, but I guess it depends on what bound as if with WITH means.
16:21:59
Bike
i'm saying that if you could set the variable, you couldn't do the more efficient thing.
16:44:45
White_Flame
Guest74: there's also no guarantee as to what the value is shaped like in the midst of accumulation, so if an implementation uses some struct instance or an extendable vector or something non-list-like, setting it to '() could blow things up
16:45:56
White_Flame
or even just some other arrangement of cons cells, as the (cons nil nil) head cell might need to exist to always have a CDR to push into
16:47:28
White_Flame
or, it might not even used the named variable at all until the final list is set into it
16:58:48
specbot
Value Accumulation Clauses: http://www.lispworks.com/reference/HyperSpec/Body/06_ac.htm
16:59:56
beach
Guest74: For what it's worth, you can set the var in SICL LOOP. You are probably using a Common Lisp implementation that uses MIT LOOP, which is full of problems.
17:01:13
beach
(loop for i in '(1 2 3 4 5 6) collect i into result when (= i 4) (setf result '()) (finally (return result))) => (5 6)
17:08:10
beach
Bike: I couldn't think of any other way than the most straightforward one. Bind a variable, and modify it as more things are added.
17:11:37
VincentVega
Guest74: Not to start a war here, but you could consider using iterate and either write your own clause or build on accumulate.
17:11:55
Bike
so how do you do it if you just keep track of the variable holding the head of the list?
17:12:25
Bike
VincentVega: i actually checked iterate and i think the "into" variables work the same way? the manual describes being able to "inspect" them but doesn't mention being able to modify
17:12:26
semz
but repeatedly concatenating strings is not the greatest idea because it creates lots and lots of intermediate garbage
17:12:51
beach
Bike: There is a special case. When the suffix pointer is NIL, it means the entire list needs to be copied when added to.
17:13:56
VincentVega
Bike: They do, but as I said you can define your own clause which behaves like you want it to.
17:14:05
Bike
but setf on the "into" variable still works? doesn't that leave the suffix pointer in a weird state?
17:15:39
jackdaniel
VincentVega: utilities in cmucl have a macro `collect` that allows defining your own expander
17:17:51
beach
Since we are on the topic, MIT LOOP also copies the last list appended, which is wrong.
17:18:06
Bike
the utilities are in the CMU source code, but they don't really rely on cmu internals.
17:18:46
jackdaniel
I've copied this small utility to ecl and mcclim, it is very handy thing to have
17:20:19
Guest74
ah, that brings up a question I was wondering yesterday. Do we have gzip streams somewhere? tar? I thought I heard about something like that.
17:21:34
Bike
https://github.com/pmai/Deflate/ is an implementation of gzip/zlib/deflate decompression
17:21:53
etimmons
Shinmera: Not yet. I've been pretty hosed with other tasks. But that reminds me that I should get cl-tar added to QL now that I've tested it a bit more.
17:22:36
etimmons
I've it's something you're interested in, I can probably nudge up its priority a bit
17:25:18
Shinmera
I've been thinking about some depot and file format related things (particularly SF3), but haven't found the motivation to work on i t yet.
17:25:18
etimmons
I've got an in progress project I'm using to build releases (both source and binary). It currently shells out to tar (for non-Windows releases) and uses zippy for Windows targeted things.
17:25:40
etimmons
When I get around to using cl-tar instead is likely when I'll do the depot integration
17:25:46
Guest74
thanks guys, seems both are slow on streams. I guess since this use case is only consolefonts a non stream based should be ok.
17:26:23
Shinmera
Guest74: stream interfaces are bound to be slow if you write to them byte by byte, I'm afraid.
17:27:44
Guest74
Shinmera: what's the link to your file format stuff? Thinking I should probably make my image stuff compatible if it's not too much hassle.
17:32:14
Guest74
and seems the vector format doesn't allow cubic beziers? or i'm reading incorrectly?
17:40:08
Guest74
read too fast, makes sense now. Though i guess that means no quadratics? Anyways, it does say it's a simple format so I guess I'll look elsewhere. Not sure I want to settle on svg.
17:41:37
Shinmera
you can define a quadratic bezier with a cubic one. just set both control points to the same.
17:47:38
Guest74
Do you have any example vector or image files? Wouldn't hurt to write reader/writers to practice my binary formats stuff.
17:50:13
Guest74
np. the image stuff looks good, similar to what I do. But for image layers I have positions as well, since I allow different sized surfaces in an image stack. though I'm not sure how often that is used by others.
17:52:59
Shinmera
Guest74: in this case they're not layers, they're 3D images, or arrays of 2D images.
17:55:04
Shinmera
yeah you're gonna want a different format for that. Personally I'd store a metadata file along with a payload for each layer in some kinda archive
17:56:31
Guest74
yeah, i store meta separately. an archive seems like a good idea. I've kept thinking of combining them, but like to have the meta separate.
17:57:54
Shinmera
I mean, at that point width/height/layer offset would also be metadata, so just exclude that from the binary data payload of each layer.
17:59:10
White_Flame
Shinmera: btw, I think the last line of the Audio description block is a copy/paste error from Image
17:59:26
Guest74
though I might prefer to have the width height so that it can still be read without the meta.
17:59:41
Shinmera
I'm pretty sure Krita's files for instance are zip archives containing a metadata payload, some other crap, and pngs for each of the layers, where a layer is often smaller than the total image.
18:41:31
frgo
Hi all - anybody of you guys have been able to load cl-sdl2 on sbcl running on M1 Mac?
18:52:50
jackdaniel
cl:read doesn't have a timeout for a reason - it is to make fun of the #commonlisp participants
19:43:57
Guest74
I was actually going to start bitching about freedesktop specs, but I guess my smudged charcoal ones are worse.
20:45:57
hobo
while reading some CL code, I see something like |blahblah|. I remember seeing that before, but can't recall if there's a special name for that.
20:48:15
ecraven
'|foo bar| is a representation of a symbol with printname "foo bar". the || delimits the symbol name.
20:48:52
ecraven
ah, yes, sorry. I've never seen it used for only part of a name, but it could be, right?