libera/#commonlisp - IRC Chatlog
Search
10:20:59
rain3
- I had tried Paredit, Lispy, and 2 other similar packages ... too complicated, (and lispy too restrictive) - I hate them;there's also smartparens or smth like that, some people like to build atomic bombs to kill a fly; what always strikes me that usually those are exactly the people that don't know about the built-in "emacs" way of doing it
10:30:53
jackdaniel
Guest74: how clim model is broken? and do you have some specification draft that addresses these isses in your grand project?
10:35:12
beach
jackdaniel: I think we are supposed to read the IRC logs and make suggestions, rather than read a document with one or more proposals comparing pros and cons of each alternative.
10:36:40
hayley
To do the classic joke for the day (which I forgot the original form of): I have never used Paredit and never needed it.
10:36:46
contrapunctus
rain3: most of the time I get by with Boon - combined commands for movement over words and s-expressions, which combine with composable commands to provide killing/copying of s-expressions. But Paredit/SP splice operations are very useful. I also like Lispy's commands to move an s-expression forward and back, and the Lispy eval command is useful because it evaluates the s-expression before or aft
10:37:38
jackdaniel
beach: Im still waiting for some interesting idea to steal though. sadly until now only superficial complaints were presented
10:41:21
beach
jackdaniel: I don't think the main point was to complain about CLIM or anything else, but to come up with a good design. But then there was disappointment expressed about the lack of feedback, and I was trying to explain why no feedback can be expected unless there is a serious documented analysis of the problem and alternative solutions.
10:53:40
rain3
VincentVega: I forgot the details, I think it was the fact that it doesn't allow me to type a single paren and things like that , which weren't even easily configurable
10:57:38
VincentVega
rain3: Oh, I hear you. I did find that infuriating myself at first, with the " especially, but I did manage to turn that off (I think through a custom binding). Although I think it just takes getting used to.
11:01:47
VincentVega
rain3: No persuasion on my part, the only reason I am using it is because of lispyville which makes lispy usable with evil.
11:02:51
rain3
I was also curious about lispyville , but never gathered enough courage to install it , or I tried and I failed
11:04:06
rain3
I was using evil mode with lispy and bindings such as this: (evil-define-key 'insert evil-lispy-mode-map "}" #'lispy-brackets
11:04:55
rain3
"Most people use a package called paredit. I find it too complicated, I just just the following: (info "(emacs) Parentheses") Basically C-M-{n,p;f,b;u,d}"
11:05:22
VincentVega
rain3: I see. I got custom bindings going for the whole deal myself, a strange mix of lispy and paredit and lispiville's own commands. I do find it satisfactory enough by now, though.
11:07:00
VincentVega
rain3: I do those through a leader key for sexps, chords are far too cumbersome to my taste.
11:08:08
rain3
VincentVega: how about connecting an external usb keyboard and assigning actions to single keys
11:09:56
VincentVega
rain3: well, that doesn't sound like something I would go for, if I were to keep a hold of my sanity
11:10:02
rain3
an ordinary keyboard which you can program; it's easier and better than to use 'macro keyboards' because their programming interface is limited
11:10:14
rain3
"Personally, I think of attempts to keep parens balanced automatically as unlispy - something that might be helpful for, say, C programming, but more harmful than helpful for Lisp. I tend to think that all of the slurping, burping, gurgling, snorting, and barfing, which devotees consider handy, are just contrivances to try to make a virtue out of necessity. From the moment that you've automatically, prematurely introduced a
11:10:14
rain3
closing paren, you naturally find a need to try to find a way to work around it. If you don't box yourself in, in the first place, then there's no such need. Not that I'm trying to convince anyone. But since you asked, I don't need to "handle parentheses". There's no real problem to solve, IMO. Or if the question about "handling" parens is more general, then my answer is that Emacs lets me know whether parens are balanced. I
11:10:14
rain3
don't need or want them balanced "ahead of time". I use show-paren-mode, blink-matching-paren, and blink-matching-open. And I sometimes double-click a paren to go to its match (and select the whole sexp)."
11:12:24
rain3
"FWIW, in the 80s there was a certain amount of interest in "structural editing" in languages like Lisp. (And later, that really took off in non-developer or not-much-developer contexts such as XML editing.) At the time, I realized that that approach was unnecessarily restraining/restrictive - like always being in prison, just to avoid the possibility, even temporarily, of creating something syntactically invalid. When
11:12:24
rain3
enthusiasts of Lisp structural editing who weren't familiar with Emacs were shown Emacs they sometimes realized they were on the wrong track. The point isn't to prevent you from ever creating something invalid. The point is to let you easily do anything - general text editing, and at the same time (1) let you check validity on demand, on the fly and (2) provide automatic feedback about validity (e.g. font-lock), without
11:12:24
rain3
imposing continual validity. (Plain) Emacs gives you just that: unlimited, general text editing, but also feedback about validity and language-specific structure and syntax."
11:18:51
lisp123win
rain3: Yeah, many people don't know that the standard SEXP manipulation of Emacs are already quite good. Once you get used to paredit's extra features, its hard to go back. But to me, the best combination is evil mode + paredit, heaven on earth
11:20:55
VincentVega
rain3: I take it this is not a first time you are having this argument : D I am not going to argue extensively, because that would require an article on its own, which I will hopefully write at some point. But let it be known that I don't find myself having to "work around" a closing parens. Just a matter of habit and I say that as someone who hated paredit when I first tried it. As that one emacs rocks episode quoted, "if you think
11:20:55
VincentVega
that paredit is not for you, then you need to become the kind of person that paredit is for."
11:23:07
rain3
it is the first time I am discussing about this topic; just sharing some quotes here , and also reading with interest what you are sharing
11:23:38
VincentVega
rain3: "who weren't familiar with Emacs were shown Emacs they sometimes realized they were on the wrong track" I would like to read up on this.
11:26:38
lisp123win
A lot of lisp programmers didn't use paredit in the old days I'm assuming (Emacs has always been one of the significant platforms of choice), so its not necessary. For example, I think Guy Steele programs on Emacs, so I don't think he used paredit
11:27:47
rain3
VincentVega: https://i.reddit.com/r/emacs/comments/l7khmk/what_key_binding_scheme_do_you_use_to_handle/
11:35:55
contrapunctus
VincentVega, rain3: if you don't have a keyboard which places Ctrl under your thumb, I highly recommend using this program called kmonad to configure Space to act as Ctrl when held. This is my configuration for it - https://tildegit.org/contrapunctus/dotfiles/src/branch/production/kmonad.kbd
11:40:33
rain3
I had heard some people say they prefer capslock to act as ctrl , never heard about space -> ctrl , thanks for the tip . What are the benefits of it?
11:41:10
VincentVega
contrapunctus: Thanks, but I dig modal editing, I barely ever need ctrl, and I use space for a leader key. I did remap ralt to escape though.
11:41:31
lisp123win
VincentVega: Apparently paredit brought some functionality from some of the older lisp systems (might be Interlisp but don't quote me on that), but naturally that part wasn't in Emacs otherwise we wouldn't have Paredit until 2005
11:43:53
rain3
someone told me this: "despite what poeple say emacs is also modal, but it achieves modal editing with another mindset"
11:45:13
contrapunctus
rain3: before Space-as-Ctrl, I used setxkbmap+xcape to have Caps Lock as both Esc and Ctrl. It's better-placed - less disruptive to the home row position - than Ctrl on most keyboards, but Space-as-Ctrl takes it to the next level. No more straining the pinky, better utilization of the thumbs, and opens up many more Ctrl bindings. (And it makes Ctrl bindings the most comfortable ones, only behind
11:49:31
pdietz
Structure editing as done on Interlisp wouldn't really work with Common Lisp, since one can arbitrarily redefine the character-level syntax of Common Lisp with the readtable. Interlisp didn't have that; indeed, comments in Interlisp were parts of the s-exprs of the code (using the * symbol as a special operator; TIMES was used for
11:50:41
hayley
Could you write a * at the end and pretend you have Pascal? e.g. (PLUS (* woo quadratic equation *) (TIMES A X X) (TIMES B X) C)
11:50:55
pdietz
That said, readtable shenanigans can confuse emacs as well (but one can customize emacs to take such things into account.)
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?