freenode/#lisp - IRC Chatlog
Search
21:45:34
jcowan
"before" is ambiguous, I meant it in the temporal rather than the spatial sense. First you write the 6, then you write the 1 to its right.
22:25:25
|3b|
if you are passing to OS, native is better. CL one might escape things oddly to maintain CL semantics
22:36:11
jmercouris
then again, there is so much to learn, I feel like I could spend at least a decade before really mastering CL
22:39:40
pjb
A decade if you put in a dedicated effort learning it. I've been doing CL for 22 years, and I'm still very light on parts, such as the MOP.
23:01:10
Petit_Dejeuner
...how many years until you become such expert who regularly uses eval and read.
23:18:11
Petit_Dejeuner
Since we're on the topic, is there anyway to control what dynamic environment #'eval sees to limit what functions it can call?
23:20:00
White_Flame
it can always use package::private in order to hit whatever dynamic variable it wants
23:21:10
White_Flame
after read and before eval, maybe you could sweep through all the symbols to try to ensure they're always white-listed. Then you also have to eliminate interning, and it might be a difficult cat-and-mouse game
23:31:07
jasom
Petit_Dejeuner: there is no way to control the environment of eval in general; if you want to have a sandbox, it's probably better to write a CL-like DSL
23:32:33
Petit_Dejeuner
This ALMOST seems right, but I need to make sure stuff like #. isn't creating leaks. https://pastebin.com/raw/gQYwVRkF
23:36:49
Petit_Dejeuner
Maybe I can change the reader so qualified (or whatever they're called) symbols don't work?
23:52:11
jasom
Petit_Dejeuner: if you change the reader so it can't get at other packages and you don't import any symbols that could allow them to intern strings, then you might be almost right.
0:17:50
jcowan
given the limited objectives of safe-read, I would think writing it from scratch (by which I mean read-char) would be not only safer but easier
0:20:27
jcowan
come to think of it, though, there is no string->number, is there? If not, you'd have to sanitize numbers and call read on them.
1:03:11
didi
What should I use for the parameter `default' of function `getf' if I want to know, for certain, that an indicator is absent?
1:06:16
drewc
didi: I use a GENSYM for that if I really care, for often, :asbent, or a similar keyword that states my intention if it is vancant.
1:08:02
didi
I am thinking of using something like (list :absent) as default, so I can test it using `eq'.
1:09:53
jcowan
The advantage of that over a pair is that it doesn't interfere with the way things are printed
1:12:05
didi
The manual mentions function `get-properties' but seems a bit overkill. Maybe it isn't.
1:48:09
asarch_
I was watching a video about how to construct a menu using CSS and the programmer wrote: ul>li*5>a[href="#"]{Item $}
2:50:05
beach
phoe: Could your safe reader be implemented as a bunch of specific methods for Eclector?
3:23:15
beach
Are you saying that the safe-read code is simpler than the combined amount of code required to configure Eclector?
3:26:03
beach
So the combined maintenance burden is less than with a specific implementation for safe-read.
3:26:32
beach
jcowan: I don't know, but I am sure scymtym would be happy to consider such an addition.
3:27:33
beach
He has been doing a fantastic job of testing and documenting Eclector. Also, uniforminzing the code so that it is understandable and maintainable.
3:27:56
jcowan
(I'm not talking about phoe's impleentation specifically, but a lower-level version not involving readtables or REQD istself.
3:28:51
jcowan
I suspect that such code would be easier to audit, since it is part of the security perimeter
3:28:55
beach
The current clients for Eclector are: SICL, Clasp, Second Climacs, and scymtym's experimental (and very impressive) Common Lisp development environment.
3:30:44
beach
And it's more than a reader. It can "read" the comments and other skipped material as well.
3:31:36
beach
There have been portable readers in the past, but I think this is the first one that is written with heavy use of generic functions, so that it can be adapted to the needs of the client.
4:24:24
jcowan
beach, Petit_Dejeuner: arbitrary predicates supplemented by subsumption relationships between them
4:41:10
fiddlerwoaroof
I've been thinking recently about what would make code completion for lisp nicer
4:58:08
PuercoPop
fiddlerwoaroof: I like the m-v-b<tab> approach to completion, although its main use is to save typing when I know what I want to call but am to lazy to type it
5:00:23
fiddlerwoaroof
So, you can advise the IDE that the first argument to a function is "normally" one of a certain set of keywords
5:01:39
fiddlerwoaroof
And then ways to customize the argument list things like eldoc show, so that complicated forms like LOOP can be easier to use
5:03:00
PuercoPop
fiddlerwoaroof: you could start from the arglists contrib that sl{y,ime} uses for function specific eldocs maybe?
5:06:00
PuercoPop
What I think we are missing from a tooling perspective is a way to declare custom indentation for forms that is well integrated with the system. The cl-indent.el 'contrib' has that functionality but the API appears to expect the user of a library to copy emacs-lisp into their init.el (or .dir-locals.el at least)
5:06:01
fiddlerwoaroof
Just skimming through that code, it looks very similar to the things I was thinking about
5:07:01
PuercoPop
I've seen some code that configures it from the CL side only if it finds slime is loaded in the image
5:07:05
fiddlerwoaroof
Yeah, and there are other things: I'd like to be able to have a single emacs buffer that contains the source for all the methods of a generic function
5:07:45
fiddlerwoaroof
But, to do that right, I'd need an implementation that made the code in the image the source of truth
5:08:09
fiddlerwoaroof
e.g. it'd be more like a smalltalk environment than like modern CL environments
5:10:36
fiddlerwoaroof
One advantage of this would be that, it wouldn't matter _where_ I define a function: if I type it in the repl, or enter it through a buffer, the code will end up in the same place and I could extract it into a buffer using a hypothetical query language for source code
5:11:47
PuercoPop
But with current xref's capabilities you could create a buffer that is the 'view' current loaded methods associated with a generic functions today
5:12:59
fiddlerwoaroof
Yeah, the problem with that is that if I edit the from that buffer, I'd have to manage patching those functions back into their source files
5:13:14
PuercoPop
Except the prospect of writing complex UI controls in elisp is not an enticing one
5:14:42
fiddlerwoaroof
I think so, although from what I gather, combining parts of several files into one file doesn't work very reliably in emacs.
5:15:42
fiddlerwoaroof
Also, the other thing is, if the source of truth for the code is whatever is stored in the image, it might be less painful to maintain customizations of other people's code
5:17:25
PuercoPop
yeah, an indirect-buffers can only show content from one buffer. But you a buffer to select the method and a buffer to display its contents. Similar to how the Smalltalk Browser shows protocols and methods. Although that is mostly the same to the current xref capabilities in sl{y,ime}
5:19:29
fiddlerwoaroof
I'm actually a bit curious if it's possible to tell something like sqlite to embed a database at the end of a file
5:20:58
oni-on-ion
i was looking at org-mode attachments for a similar purpose; to compound a given project source tree into a single org file