freenode/#lisp - IRC Chatlog
Search
4:07:48
akater
SBCL creates instances of a certain class with slot values that clearly outdated. There is a PLIST slot in sbcl's class implementation where I found some traces of old definitions. Can anyone offer any advice on this?
4:08:58
no-defun-allowed
beach: my teacher said that it would be possible to work on the double entry bookeeping system
4:09:59
beach
akater: I am not sure what you mean. Do you mean "outdated", as in some code lingers on and should have been removed years ago? Or do you mean that it wasn't updated properly when it should have been? Or something else?
4:10:54
beach
akater: What was the nature of these "old definitions", and how did you discover them?
4:12:35
akater
The definition of a class had long been modified but some slots are still initialized as if it were not.
4:14:16
beach
I don't know the details of what SBCL does, but in SICL, every instance has a slot containing a list of all the effective slot definitions of the class, as it was when the instance was created.
4:15:17
beach
So if you modify a class that has existing instances, there will be instances with slot definitions on that list that no longer exist in the corresponding class. And that is not just normal, it is a requirement.
4:16:27
beach
However, it would be hard to see those slot definitions, because the instance gets updated whenever it is an argument to some generic function that specializes on its class, which is why I asked how you discovered those old definitions.
4:16:52
beach
no-defun-allowed: So what's the plan now? You still have time to think it over, right?
4:18:34
akater
I'm having issues with *fresh* instances, returned by make-instance or allocate-instance. closer-mop:slot-definition-initform of class slots look like they should but some of them don't seem to have an effect
4:22:20
beach
volkov: Then you should know that SICP uses the Scheme programming language, whereas this channel is dedicated to Common Lisp.
4:22:40
beach
volkov: So if you have questions about the language used in the book, then this channel is not the right place.
4:23:48
aeth
as for trolling the only trolling we do here is diss other languages for not having Lisp machines. /s
4:24:16
LdBeth
beach: is it supposed to update an old instance explicitly when that class is redefined?
4:24:54
beach
volkov: It is not widely agreed upon what languages are "dialects of Lisp", which is why this channel is dedicated to a language with a precise definition, to avoid discussions about what is Lisp and what is not.
4:25:46
beach
LdBeth: No implementation I know would do it immediately, because that would require keeping a pointer to every instance.
4:26:14
akater
I find RJ's arguments (on code sharing, in particular) convincing when he argues that Scheme or Clojure are not Lisps.
4:28:02
beach
LdBeth: Yes, not only that, you wouldn't want to keep instances alive unnecessarily, so you would need weak pointers, etc.
4:28:50
volkov
beach: i will leave educated discussions about Lisp to u guys. im just a guy with some experience in slicing Python lists. i just want to deep my knowledge reading SICP. bye i will go to #scheme
4:29:08
verisimilitude
The Lisp implementation is already keeping track of every object; it could simply traverse the entire object list to update instances.
4:30:31
verisimilitude
Well, I'm particularly interested in eventually developing a Common Lisp that focuses on size without regard for speed, so this is a valid strategy for me. It's just a thought.
4:31:18
verisimilitude
Every time something consumes extra space, there's some thinking that can be done to eliminate that. Why store something in multiple lists when you can store it in one and all of that.
4:31:46
beach
LdBeth: If you want to know how PCL does it, it is documented in the paper about it. SICL assigns a unique number to each class and propagates it to its instances. When a class is updated, it gets a new number, and generic functions that use the old number are "invalidated".
4:31:47
beach
So when an old instance is used in some generic function, it is automatically detected, and the instance is updated.
4:31:57
verisimilitude
If you only update instances when they're used, you'd need to store the necessary changes in some way, somewhere.
4:32:53
no-defun-allowed
beach: my teacher did suggest it would be a very good task, so I probably will stick to it.
4:33:21
beach
no-defun-allowed: Oh, excellent! No protests with respect to the programming language being used?
4:34:01
verisimilitude
Oh, so you'll be working on a bookkeeping system for your school, no-defun-allowed?
4:34:19
no-defun-allowed
It's expected schools will teach one language, but students can use any object-oriented language they choose for most tasks.
4:34:46
no-defun-allowed
verisimilitude: Well, I'll be working on a double-entry bookeeping system, and the "client" is beach.
4:35:55
verisimilitude
By ``real'', I mean an environment where it's actually depended on for some purpose and all of that.
4:36:01
no-defun-allowed
I don't know. My teacher said it didn't have to, as long as there was a good program created.
4:36:53
no-defun-allowed
The only other constraint was there was some processing involved, a graphical interface, and some type of storage.
4:36:54
verisimilitude
I'd litter the program with restarts and whatnot so the interactive debugger could be expected to be used by someone other than me, then.
4:40:25
no-defun-allowed
I assume the REPL shouldn't be touched from the constraints, and that anything should be doable from McCLIM.
4:40:28
beach
volkov: Another strategy that some people use is to read SICP, but solve the problems in Common Lisp instead. That way they get better help, because #lisp is much more helpful than #scheme (more participants at more hours).
4:41:15
verisimilitude
Well, the pieces are there to construct a restricted interactive debugger. It's just a thought, though.
4:42:11
beach
fiddlerwoaroof: You did. scymtym has written an inspector that is much more competent than the current Clouseau.
4:42:52
verisimilitude
Now, there's an idea for a library, actually: providing a debugger intended for use by non-programmers, so effectively providing a nicer and sanded interface over restarts.
4:43:22
beach
volkov: Yet another strategy is to give up on SICP, since it is teaching some strange object-oriented techniques, and go for PCL, PAIP, etc. instead.
4:43:44
verisimilitude
Most people would foam at the mouth if their machines asked them to do anything while a scary number such as 0x1AB97381 were on the screen.
4:44:22
beach
no-defun-allowed: There are some cute tricks that I often use in my McCLIM applications. I often include an application command that starts the inspector on some aspect of the application contents.
4:45:44
verisimilitude
I'm talking about people that don't even read error messages, LdBeth. It's the kind of person who can't follow any instructions whatsoever and usually has someone competent do anything requiring more than scrolling and sharing a dog video do it for them.
4:46:20
fiddlerwoaroof
It's not just that, it would be useful to have things like some way to specify lists of values for the use-value restarts, etc.
4:46:51
fiddlerwoaroof
So, instead of having to type the new value in free-form, you select one from a list of pre-vetted values
4:47:52
fiddlerwoaroof
Yeah, I've been fitfully working on making CLIM usable in my normal computer environment
4:50:00
LdBeth
I think several months ago someone presented typing Math equations with McCLIM,but I forgot where I can find it
4:51:16
beach
I think Climaxima could very well be a very important application for showing the power of Common Lisp and CLIM.
4:55:44
akater
Last time I tried to use Maxima (for Android) to solve an ODE, it produced something bizarre for a trivial 2nd order one (constant coefficients)
4:56:48
loke
If the solvers cannot produce a full solution kit sometimes gives you a partial solution instea of giving yu an error.
4:59:46
akater
It was a long time ago during a trip, I don't have a record in my journals unfortunately. loke It was a linear ODE with constant coeffs.
5:02:02
akater
Overall, I found the only Lisp CAS to be sane, is Weyl. Maxima tries to introduce a mainstream syntax, this is an ostruction to programming in it. I wish a Lisp CAS was more like Mathematica.
5:04:15
akater
Mathematica introduces infix syntax by means of presentations, essentially. So the regular structure of expressions is never lost.
5:08:01
volkov
beach: thanks. i just googled "what is PCL PAIP etc" and was led to this 11 years old reddit thread https://www.reddit.com/r/programming/comments/1a73t/fine_i_will_look_at_lisp_where_do_i_start/
5:10:11
akater
I'm aware there is a way to feed lisp forms to it. But making them somewhat second-class like this is a bad decision. In Mathematica, it's much more smooth. Also, it offers proper expansion which means you never have to learn precedence rules for its infix as long as you use it.
5:12:51
akater
On Android, I found mangled TeX output. And e.g. :lisp (describe 'integrate) doesn't work.
5:15:03
akater
Anyway, I wish one day I could implement something more appropriate with representations in McCLIM.
5:16:22
loke
akater: So you would prefer to input and display the Sexp forms instead of maths equations?
5:17:21
akater
But of course, the fact that Maxima on Android works at all, utilizing codebase with history like this, is amazing and makes Sage look unattractive for me anyway.
5:19:51
fiddlerwoaroof
loke: it's probably a pretty niche view, but I generally prefer math in sexp form
5:20:08
fiddlerwoaroof
For one thing, it means I don't have to think about operator precedence and associativity
5:20:44
akater
loke: For starters, what I have in mind could display general sexps, not just mathematical expressions. Something arong the lines of (row-box "cons" ("a" "b"))
5:21:37
akater
^ that's basically exactly how mathematica does it. It has `box'es of various kinds, incl. those that display in 2D neatly.
5:21:43
loke
Climaxima can actually do that, to a limited extent. The framework is in place to extend it past the Maxima sexp forms.
5:22:36
loke
Each box is a subexpression. It just arranges those boxes in a maths-kinda way so that the result is standard maths equation syntax
5:24:26
akater
I'm still wondering if this interface could be better than purely text-based one. It *should be* but Emacs' pure text way is also impressive. I don't want to lose the ability to jump to text in arbitrary forms on screen.
5:28:24
akater
While Mathematica does presentations right (drew a ton of inspiration from Lisp for sure), its editing capabilities are mediocre. SLIME almost has it all when it comes to presentations, without compromising the convenience of navigation.
5:29:06
loke
but please tell me what can be improved when it comes to the Climaxima way of doin git.
5:30:01
fiddlerwoaroof
ACTION wants someone tom implement a CLIM-like interface for sending text from Lisp to an emacs buffer
5:31:24
fiddlerwoaroof
I've just added a swank-buffer-streams package to swank that implements the beginnings of something like CAPI's collector-panes or CLIM's app pane
5:31:35
loke
fiddlerwoaroof: Yes. SLIME exploses some functions on the Lisp side that results in an Elisp function being called in Emacs.
5:32:19
akater
Some day, I will have time for Climaxima. But for now, I need some tools in CL that I'm missing, and building them will take time.
5:35:35
loke
LdBeth: sly also doesn't support presentations, so it's lost kinda half its value there
5:36:16
akater
Sly froze my Emacs almost immediately when I tried flexi-search, or whatever it called. Almost led to data loss. When it happened the 2nd time, I uninstalled it until better times.
5:37:01
akater
Also, its printer has some ridiculous default settings when it comes to printing in org src blocks.
8:01:30
flip214
will ELS submissions end today? Then I could start reviewing papers -- last time new versions got in after I had read initial versions...
8:02:10
beach
It should end today, but I think the authors have the right to upload modified versions later.
12:03:12
splittist
margaritamike: not really, no. This is one of the benefits of First-Class Global Environments that is (kinda) part of the SICL project.
12:07:24
splittist
The wikipedia definition seems to make clear that this is an OS concern (where the jvm and clr and os-a-likes).
12:13:50
splittist
margaritamike: I think it goes like this. A CL image contains an evaluator and a compiler (EVAL and COMPILE). The compiler is necessary for important parts of the system - like CLOS - to operate, so you can't just rip it out. If the untrusted user has access to the compiler, then they can (eventually) do anything, regardless of what you have taken out of the environment to begin with.
12:14:49
splittist
Having multiple First Class Global Environments would allow the system to have access to COMPILE (and co) - via one environment - while not allowing the untrusted user to have access - via another environment.
12:18:06
margaritamike
You can't do something like say this lisp program can't write to file or use sockets in a security file?
12:20:06
splittist
As I said - that's an OS thing. Perhaps ABCL would work with the the java stuff. Otherwise, use a vast network of containers like everyone does for everything these days (:
12:25:56
margaritamike
Say you've set your restrictions in Java and you add in a dependency that uses java.net.SocketPermission whereas that was previously restricted
12:27:25
margaritamike
It would be good to catch that with a security policy before it has a change to execute during runtime or whatever
12:32:38
margaritamike
You have a lisp library you bring in from ql:quickload. Unknowingly, it does something malicious
12:33:11
margaritamike
You don't have the time, and probably not the skill either, to read and understand every line of code from the library
12:34:29
margaritamike
Until you read every line of the library's code or notice something strange one day?
12:39:30
splittist
How could it be any other way? You are including source code. You are basically asking someone else to type your program.
12:39:48
dim
you need capabilities for this kind of security, and you give capabilities to programs, with a very restricted default set
12:40:13
dim
also read this famous “Trusting Trust” paper from Thompson from back in the days, still relevant today
12:44:03
splittist
Common Lisp the language obviously can't do this, since it is a systems issue. Secure Common Lisp, which keeps track of which code comes from which set of source files and provides fine-grained access control to OS and other program resources based on this tracking.