sirwhinesalot
Joined 5 years ago
Joined 5 years ago
I was experimenting with implementing something Hylo-like (formerly Val). Meaning no references what so ever, only parameter passing modes. But I hated their subscript mechanism (a form of coroutine, used to implement iterators and views, similar to what Graydon originally wanted for Rust).
I wanted to have what they call subscripts work as regular functions, so I needed some way for a function to return a reference-like thing. This gets you down the rabbit hole of extending second-class references until they're first-class.
Hylo already tracks paths implicitly in the function arguments, it needs to do so to maintain value semantics (if you have two references mutating the same thing, value semantics break). I wasn't particularly worried about the value semantics, what I wanted were nice to work with references. The first thing was how do you return a reference from a function in a way that is safe?
Well, if you apply the same rule as subscripts (that they can only appear as arguments to other functions, not assigned to variables), then everything just works out. The only thing I needed to know was what did the reference point to? Well, Hylo tracks paths, but I need to say which path, so I had something like the following:
// returns the longest slice of v1 that shares a prefix with v2
fun matching(in v1: Vec<int>, in v2: Vec<int>) -> &Slice<int> of v1
That `of v1` annotation essentially said "this reference has the same path as v1". I didn't give you a way to be more specific about the paths like you allow (I love that idea!), you could only be specific about which argument it was a reference of, and the path was inferred from that.There were more complicated cases I could think of that required the thing after `of` to be a set:
// returns the longest of s1 or s2
// output must be conservative
fun longest(in s1: &Slice<int>, in s2: &Slice<int>) -> &Slice<int> of {v1, v2}
In this case the slice can be of either input and the compiler has to be conservative about it.Once this was in place then it was a matter of expanding things where you could store Slices (and single element references) in variables, as long as they were in the same scope as their path, and where you could store Slices and Refs inside structs (which then become a view type as well, like C#'s ref structs).
I ended up getting frustrated with it and tapping out, but I'm glad there are people exploring this path route. It is much better IMO than abusing parametric polymorphism to track lifetimes.
It is a pain to ensure it works as intended. A simple syntax directed algorithm (even in reverse ;) ) is preferable if you can get away with it. I guess the compatibility with Rust will end up forcing you into the constraint route though.
Big props to the group borrowing idea. It is similar to my own attempts (including the use of an explicit path rather then some generic lifetime parameter), but I never got the rules quite this clear.
In the other article you mentioned stability. That's one part of the design I never quite figured out in a way I was happy with. It's not really mutation that matters, it is (potential) freeing.
If I have a very large struct made up of substructs, none of which is stored through a pointer, then mutating any part of this struct invalidates no references, it is the same as if each individual field was mutated. But I wanted to avoid needing an "invalidates" annotation of some sort...
https://rookandpossum.com/posts/scanline-sweeper/
Sean Barret (creator of the stb public domain libraries) independently invented a CPU-based implementation of the same idea, used in stb_truetype.
I don't want to ban LLMs, I don't blame them for the actions of crazy people, I don't even want to regulate them in any major way related to this particular issue.
Even on the subject if they are or not conscious my position as changed from "no" to "I don't care either way" awhile ago.
The problem is specifically with anthropomorphizing them. To push the idea that they are "as if human", which is what this consciousness discussion will inevitably lead to.
An imaginary perfect computer simulation of my dead father is not my father, it is a computer simulation. It will never be anything but.
No, because a simulation of a car cannot get me from A to B. No matter how accurate you make it, I can't get to my supermarket with it, because it's just a bunch of math on a computer.
It's an interesting sort of self-defeating position, the whole "simulation of human consciousness = human consciousness", because it simultaneously attempts to devalue the human experience, while also elevating the importance of a particular human brain process.
A robot running a simulation of the human mind is a robot, not a human.
Those people anthropomorphized the chat bot and used it as justification for their actions, just as a schizophrenic justifies their actions with the voices in their head.
If you anthropomorphize the chat bot, you're validating their delusions. They are mentally ill.
Categorically different. People have killed themselves or others due to conversations they had with LLMs, but those are just the extreme cases. Most schizophrenics don't commit suicide or kill others, they are mentally ill nonetheless.
Is a simulation of a car, the same thing as an actual car? Most people will probably say no, some might say "it depends on the accuracy". I say who the hell cares?
I care about the human experience because I am human, and therefore I care about things that affect humans, because they affect me. I have empathy, so I can extend that consideration to non-human beings that experience *similar biological processes*.
I know what pain feels like, and I don't like it, so I'd rather this other thing not feel it either, because that makes me feel bad.
I do not care about a pile of tensor multiplications, at all. If it is conscious, great, maybe it can finally follow instructions properly, which is its only purpose.
It's not a living creature. It's an autoregressive pure function of token-sequence to token, which is capable of incredible things, but it's still just a function. It is not alive as it cannot die in any meaningful sense. It is less "alive" than the RNA molecules that gave you your last cold. If it simulates something resembling consciousness that's neat but no more relevant than the Sims character that I locked up in a room until they pooped themselves when I was 9.
Anthropomorphizing it serves no purpose other than marketing, and it has very dangerous downstream effects like validating the severely mentally ill people who think ChatGPT is their boyfriend/girlfriend.
And I never left Python, the slowest language around.
AI is only going to make the problem worse unless you know what to look for.
Windows 8 Metro, on the other hand, was almost universally hated and with very good reason. And Apple has been doing the same exact mistake for awhile, slowly porting designs meant for a phone (and far worse designs than Metro at that, iOS 7 was terrible as was everything since) to laptops/desktops.