freenode/#lisp - IRC Chatlog
Search
22:01:48
aeth
_death: Nice try, but the presence of BORDEAUX-THREADS makes implementing an accurate PYTHON impossible.
22:24:22
fiddlerwoaroof
of course, you'll discover all the concurrency bugs that people have hiding in their code, like people did when they switched to jruby
22:28:40
fiddlerwoaroof
There are GIL-less implementations, like Jython and Ironpython, however the 2->3 transition seems to have killed some of them
22:29:14
aeth
fiddlerwoaroof: The main alternative seems to be PyPy, which makes sense. JIT and implemented in the language itself.
22:31:32
fiddlerwoaroof
That's the one that gets the most press, https://jython.github.io is older and has had some commercial uptake
22:42:51
aeth
One thing CL needs is a "language platform". Yeah, there are already (obscure) foo-on-cl (including Python), but I'm talking about one level more abstract so there's better interoperability
22:54:28
jackdaniel
with an annotation, that jvm already meets all practical purposes such clvm would serve, and supporting jvm would require as much effort as supporting said clvm from existing implementations
22:55:06
aeth
Languages that would be interesting to integrate with CL (imo): Prolog, Scheme, Emacs Lisp, Forth, Smalltalk, an array programming language, and popular scripting languages (especially Python and JS)
22:55:29
aeth
jackdaniel: I disagree about that because a JVM language is good at Java<->Foo interoperability, with no guarantees that ABCL<->Foo interoperability is as flawless
22:57:13
jackdaniel
fwiw ecl has clr support (common language runtime), it is documented in an article about ecolisp from '94
22:58:22
jackdaniel
being able to expose lisp libraries to other languages would help gaining bigger mindshare by implementing popular and secure libraries
22:59:34
jackdaniel
(in fact ecl does that in form of shared objects though it could give better performance for heavy closified code - gf dispatch is slow on ecl atm)
22:59:34
LdBeth
before CLR there was VMS's Common Language Environment, which takes a multi language ABI approch
23:00:07
aeth
jackdaniel: You could expose Lisp libraries with Foo-on-CL, though. e.g. Quicklisp has about 4,000 libraries, which isn't a lot but it isn't a tiny amount, either. Racket has about 1,200. So a perfectly-wrapped Scheme-on-CL with full QL support for every library (not possible in practice because there are code-walking macros) would overnight become the Scheme with the most libraries.
23:00:50
aeth
I haven't looked into the libraries available for Forth or Smalltalk, but I wouldn't be surprised if it's a similar situation there.
23:06:45
fiddlerwoaroof
At least for the big-name languages: Java, Kotlin, Scala, Clojure, Groovy, etc.
23:09:18
fiddlerwoaroof
The only issue is when you're using things that are language-specific features, rather than things designed to be used from Java
23:09:42
fiddlerwoaroof
But, usually, libraries have a Java API that you can use like any other Java library
0:08:25
no-defun-allowed
i got some code compiled with my llvm IR library https://ghostbin.com/paste/njf3m
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.