@MAKS23 Zelensky is of the same scale in the history as Churchill.
@SnowshadowII I just hope we won't find strange bedfellows in what's coming. I already feel like Turkey with it's democracy-washed autocracy will have to be our best friend, haha.
@jonn Canada would like a word...we are trapped between both!
@knotfeed a very sick heart indeed
Early today we launched the new Lean reference manual, our core documentation intended as a comprehensive, precise description of Lean! #leanlang #leanprover
Check out the manual: https://lean-lang.org/doc/reference/latest/
Read more about the release: https://lean-lang.org/blog/2024-12-16-introducing-the-lean-language-reference/
@jonn Right, but the frustrating thing is that there *is* a dichotomy. Types still only exist at compile time, and while types can depend on values, values can't depend on types. You're still running Program 1 first (the type/value program), THEN running Program 2 (the value program). Which means you still have to do indirection like Enum TBool | TInt | TBlah, etc. What I am more or less looking for is a type-safe version of reflection. So you could do something like fields(myType)
Garry Kasparov: 'You never hear Russian opposition actually say Ukraine must win'¹
In an interview with the Kyiv Independent, Russian chess grandmaster and political Garry Kasparov shared his thoughts on the current state of the Russian opposition, why they're looking for a "good tsar" to replace Putin, and why he'll push back at those who insist it's "Putin's war" rather than Russia's war.
Read the full interview here. ²
Photo: Saul Loeb/AFP via Getty Images
➖➖➖➖➖➖➖➖➖
¹ https://kyivindependent.com/garry-kasparov-without-decisive-military-defeat-there-wont-be-change-in-russia/
² https://kyivindependent.com/garry-kasparov-without-decisive-military-defeat-there-wont-be-change-in-russia/
@tolmasky the amount of times I had to learn what is #CommonJS and what is #ESM to then forget it and get bitten again when I come to #JS is bleak in comparison, I'm sure, but it made me make a video (mostly for myself) to later watch: https://www.youtube.com/watch?v=SIows5N4BAY
😆
@tolmasky if I had to implement reflection in Lean4 or Agda, I would try to mimic #Haskell's typeable.
But also, I think there must be a very important point here! In dependently typed languages, entities can have more than one type!
(frac 1 2) : Frac 2 4, but also (frac 1 2) : Frac 4 8, for instance.
[1] : ListLE 1, but also [1]: ListLE 42.
So, perhaps the whole idea of general reflaction is defeated by this property. And this is why #haskell offers superior reflection[1]. Note that #Typeable is in #GHC itself!
I don't know if I'm mansplaining here or if you're aware of haskell's Typeable, but here is a simple demo of its capabilities: https://github.com/cognivore/typeable-haskell-demo/blob/main/app/Main.hs
In #Lean, I would emulate it by defining asking the user to provide explict instances over an enum, just as you wrote! The existential quantification trick can be done in #Lean by carrying the instance inside a structure that ties the knot between the type and an entity which has this type:
```
structure Stuff where
α : Type
val : α
inst : Reflect α
```
You won't be able to construct it unless α is Reflect.
* * *
[1]: https://hackage.haskell.org/package/base-4.21.0.0/docs/Type-Reflection.html#t:TypeRep
@tolmasky fwiw, you are absolutely correct: https://lean-lang.org/lean4/doc/dev/ffi.html?highlight=import#the-lean-abi
@tolmasky ah! "Type-safe version of reflection" makes a lot of sense. I will think more.
Today on Threads: Endless questions like:
"Where to escape from this?"
WHERE, I WONDER, TELL ME I WANT TO KNOW
@tolmasky I didn't go into details of your use-case, sorry, but the mind-bending bit about dependently typed languages is that there are no value-type dichotomy. Just sone expressions with those are expressible, and some are not.
I take a lot of pride in this code:
https://github.com/argumentcomputer/Wasm.lean/blob/main/Wasm/Wast/Num.lean#L85-L89
Observe how function invocation is a type. (Feel free to ignore Cached constructor, it's an optimisation).
Sorry for a non-answer, I hope it helps. But based on what I understand about the things you describe, it should be somehow possible and I hope my snippet will get you moving in the right direction.
She married Giuliano Mattioli in 1945. (He served in 1 Special Force as Julian Mathews, British Army.) They had 2 children. After the war, she worked as a TV producer. She was awarded 3 British Medals January 2015: The Italy Star, Victory Medal, 1939-45 Medal. She died on October 5, 2021 at the age of 96. (4/4)
@mudkip I say. Fancy a cuppa?
https://www.youtube.com/watch?v=50_Ddhfbj_Q
#FunnyWays #Progressive #Prog #ProgRock #GentleGiant
This song makes me cry sometimes. ❤️
That https://doma.dev guy
#lean #rust #typescript #react #nix
In my non-existent free time I design and run #TTRPG
If you use tools made by genocide-apologists, you are a genocide-apologist.
#lemmy users aren't welcome here.