libera/#commonlisp - IRC Chatlog
Search
11:03:44
Guest36
So I want to figure something out. Class C inherits from Class A and B. Class A1 is "effectively" class A but with a particular value for one of its slots. I created A1 to allow me to specialise some methods
11:05:21
Guest36
I basically want a method on class C, but specialising based on the values within its slots
11:06:56
Guest36
Yes, I got to that. So I decided to "create" class A1 so that I could create methods that specialise on A1
11:07:56
rotateq
beach: I noticed you from the first lines on to be very precise and clear with much experience, even that I didn't know then who you really are. :)
11:12:09
contrapunctus
I'm trying to set up EQL5-Android. I followed the README-PREPARE.md, but when I run `./1-make-ecl-host.sh`, I get this - http://ix.io/3J1K .
11:12:10
rotateq
or TikZ :D in the gallery iirc there's an example for a class diagram but maybe too limited and I'm still bad at TikZ
11:16:44
rotateq
some days ago i needed something, had no laptop with me and the app CL-REPL saved me :)
11:52:05
rotateq
So CLOS is the most powerful OO system in the galaxy, I wonder what they do in other galaxies.
11:59:51
rotateq
sure, but maybe my mind is still not ripe enough that they take me and teach me everything they know
12:00:27
rotateq
until that time comes up, I'm good to learn CL completely, will take many years more. the details ...
12:59:23
VincentV`
rotateq: RE: /CLOS and what they have in other galaxies/. So I have recently learned about garnet, and it has prototype OO called KR. Prototype OO is argued by some to be more flexible than class-based OO. The basic premise is that instead of classes you simply clone objects -- while setting slot values, adding/(removing?) slots, the whole inheritence deal etc. The inflection point is: you don't have to specify types of the new object
12:59:23
VincentV`
(particularly in garnet, you have to set :is-a slot, every object is of type "schema"; I don't know how if other such systems do it better). So, this seems to be more dynamic. But then, again, I wonder how well it bodes for performance (e.g. you can't do gradual typing on these in particular, but, in principle, you could probably find a way to do it).
12:59:36
VincentV`
So, this discussion here lists some pros/cons: https://softwareengineering.stackexchange.com/questions/110936/what-are-the-advantages-of-prototype-based-oop-over-class-based-oop
12:59:43
VincentV`
Even though not all of these points are relevant against something like CLOS (e.g. changing behaviour at runtime is supported pretty damn well in CLOS, and I bet it's more robust with change-class), it does make you wonder. Maybe even some sort of a system where you can go from one to another (ie gradual) could be the next most alien(ating) thing on the line.
13:02:36
rotateq
I see or learned CLOS till now as a metaobject system which can be forged to others. (the ones with this class-centered thing they call OO)
13:50:16
rotateq
gendl: instantly i think about clsql, but for mariadb I'm not sure. or one writes an add on
14:03:28
engblom
When it comes to nosql databases, I think berkeleydb would be a really good option if the CL library would just be worked on a bit. What I like with berkeleydb is how everything is pairs (a bit like a alist) and both the key and the value can be of any native type in any programming language.
14:04:42
rotateq
there's a CL tool pgloader or so for SQL databases, to bring them to postgresql with one click
15:59:26
Guest74
rotateq: my nick will always start with guest74. Just like everybody elses nick will always start with their nick with some random character(s) after.
18:28:56
lisp123
stylewarning: I tried reading https://coalton-lang.github.io/20211212-typeclasses/ but unfortunately it was too advanced for me, but I am just curious where CLOS fall shorts as a type system? I saw some mention of "generic values"
18:32:12
Bike
the perhaps silly way that i think about it is that generic functions can't specialize on their return type.
18:35:36
Bike
the bit on this post in map sums it up: "Common Lisp does not allow map to deduce its return type based off the surrounding context", and indeed that's kind of a nonsensical proposition with the semantics of the language
18:36:04
lisp123
But wouldn't the return type be contingent upon the inputs to a function so one should just create distinct generic functions, depending on the input?
18:36:54
Bike
for map the return type is not continent on the inputs to the function (other than the specifier input). you can map a list to a vector, a list to a list, whatever.
18:37:48
Bike
in the example in this blog post, you could also consider how "identity" would work as a generic function
18:38:08
Bike
...it wouldn't, since it doesn't actually have any arguments. the only thing to "dispatch on" is the context
18:39:29
lisp123
I need to read that bit again, I didn't quite get it. What does "context" mean in this sense?
18:41:01
lisp123
The bit about specialising on return type, would that be more useful when coercing from one type to another? I saw mention something of that in the post, so that kinda makes sense to me
18:41:39
Bike
Consider the lisp form (+). that is defined to be an integer 0. If you write (+ 3.7 (+)), what that means (prior to optimization) is that you call +, that returns integer 0, that's coerced to a single float, and then added to the float 3.7
18:42:45
Bike
In a language like coalton, you could have (+) return a different zero depending on its inferred return type
18:46:21
yitzi
Seems like if you were actually trying to implement an algebra with generic functions you could just accomplish this by specializing on a "group" or "field" instance.
18:47:04
Bike
sure, people do that. and actually i think that's how coalton implements typeclasses under the hood.
18:55:59
jcowan
First-era industrial capitalism worked on the principle of "work fast and break people and other living things".
19:01:15
Bike
jcowan, when you respond to something hours later like i assume you're doing, can you give me some kind of hint so I don't sit for a minute trying to understand what coal mines have to do with computer algebra systems
19:03:30
_death
I don't care about specializing on the return type, but it would be great if I could declaim a GF's return type without SBCL clobbering it :/