One day I'm going to sit computer scientists down and teach them about the concept of reversibility and how that might apply to verbs/functions/etc
-
One day I'm going to sit computer scientists down and teach them about the concept of reversibility and how that might apply to verbs/functions/etc
the opposite of install should be 'uninstall', not remove (remove should work too though)
if I must call a method namedfromarray
to create an object from an array, should there not be a method namedtoarray
arrrghhhhh
#techPosting -
fuck it, gonna come up with a language that has an implicit forward/reverse syntax and concept of "the arrow of time" such that any method or function may be trivially reversed by simply switching the arrow of time
-
fuuuuuck you unstirs your colors yeah you like that you no-brownian-motion-having-bitches
-
Asta [AMP]replied to Asta [AMP] last edited by [email protected]
IF ALL THINGS IN PHYSICS ARE FUNDAMENTALLY REVERSIBLE* you're goddamn right I should be able to reverse a function
what would a good syntax for that be? if we assume a method/function is called as such normallydiffuse()
would we then say, for the forward operation,diffuse<t->>()
anddiffuse<<-t>()
for the reverse?
(it works nicely if you have glyphs)
* I don't actually know if this is true except in a defined scope of reverse-time-arrow-entropy-always-decreasing universe, and even then I wouldn't actually state this with a high degree of confidence. -
@aud deffuse(), of course
-
perhaps
diffuse<'t>
anddiffuse<'-t>
? to avoid glyph issues and to steal some shit from Rust. -
-
@[email protected] it sounds just like someone is trying to pronounce like how they think the French would say it
-
@aud I am once again reminded of the code-base that consumed much of my programming attention in grad school where there were both finalize() and finalise() methods
-
There HAS to be some language or idea where this is a thing though. It should, at least, be theoretically possible.
I would uhhhh not advise implementing crypto (in the cool Turing sense, not the fuckboi sense) in it though -
@[email protected] please lie and tell me they were just the same function call
-
@aud [visibly sweating] well uh they *gulp* did the same thing
-
@[email protected] THAT JUST MEANS THEY'RE DEGENERATE THAT'S NOT THE SAME THING
-
Inga is looking for a jobreplied to Asta [AMP] last edited by
@aud but consider this: either you'll have accelerate and decelerate duplicating each other meanings, or you'll have to pick one time direction as special.
Or perhaps "t" here should be a generic parameter, passed through the entire call chain.
-
@aud whats your preference on double negatives? Do they cancel, or just more emphatic "no"
-
Is there a unit vector commonly used to denote "forward" and "reverse"? hm.
-
@aud Reversible computing in the physics sense is a thing, which also let me to this in wikipedia: https://en.wikipedia.org/wiki/Janus_(time-reversible_computing_programming_language)
-
@aud There's a whole field of computing around it. "Normal" logic and Turing machines and their equivalents are irreversible, though. Which interestingly requires them to dissipate energy. A reversible computer could theoretically dissipate no energy, but in exchange it builds up its own form of entropy in the form of information needed to reverse the computations that nevertheless aren't useful output for whatever you're trying to do.
-
Asta [AMP]replied to Inga is looking for a job last edited by
@[email protected] I thought about that second one, but if it's a whole language then it would be a lot of unnecessary boilerplate per function call.
Perhaps there's an "assumed", implicit direction? IE,diffuse()
is shorthand fordiffuse<t>()
or some such.
Unique symbols for each direction (apply and reverse) would work too, although I like the correctness of simply reversing the arrow of time as what it would mean.
Of course that does start to mean things if you're not careful; input/output must be the same. So it'd have to be a special feature where those remain the case... at least. -
-
-
-
@aud unyes