Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Timon3
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
48 ms
·
781.
▲
by
Timon3
3y ago
> The type constrains the definition. Look at the definition, there is ONLY one possible definition when converting this: Yes, and if Python had a better type system, I could write a more concrete definition. Why don't you understan
782.
▲
by
Timon3
3y ago
> This is wrong. Again, Arbitrary fixed-size tuples are equivalent to structs with an arbitrary amount of properties. Languages shouldn't do this, it destroys the nature of what a TUPLE is which is essentially just a struct with no
783.
▲
by
Timon3
3y ago
You're welcome! That's why I'm very excited about Typescript, the system is very powerful :)
784.
▲
by
Timon3
3y ago
> concat_tuples I specifically talked about arbitrary tuples. Your function only handles specific tuples. > Your second function you just broke out of the type system with Any. Give me a more exact, are you saying Any is a constrained
785.
▲
by
Timon3
3y ago
It absolutely isn't wrong, and it's strange that you have some aversion against it. Think of Tuple[int, ...] as a union of Tuples of all lengths containing only ints. It's a specific language feature, and it's not "
786.
▲
by
Timon3
3y ago
That's confusing, considering Python has them with TypeVarTuples?
787.
▲
by
Timon3
3y ago
That's the conclusion I also arrived at. The type system is slowly getting there, but many operations like this one are still not possible. It's a shame, because it makes features like decorators significantly harder to use with s
788.
▲
by
Timon3
3y ago
> And n is fixed at the calling site, right? I wonder if something like "TypeVar, but for a list of type arguments" could solve your problem. Yep, and TypeVarTuple should - all the syntax etc. is in place, there is an Unpack op
789.
▲
by
Timon3
3y ago
> That's not really fair. The uses that make sense when considering Python's convention ("Pythonic" code, nebulous but usually well-understood) are supported. You're focussing on a very specific part of what I wr
790.
▲
by
Timon3
3y ago
Typescript supports it too (quick example[0]) :) and Python actually as well, but currently you can't unpack two TypeVarTuples in the same type expression: https://peps.python.org/pep-0646/ [0] https://
791.
▲
by
Timon3
3y ago
> What's missing is in which context the tuple's length is variable, and in which context it is fixed. Simple example: a function has a parameter whose type is "variable-length tuple of int". You can pass any tuple in
792.
▲
by
Timon3
3y ago
> If the PSF ran a poll for the most-wanted type checking features, I don't think this would come close to first. This sounds very niche. The people working on typing seemed very busy in the last few versions. Sure, but while it
793.
▲
by
Timon3
3y ago
Considering the opposite is called a "variable-length tuple", and I wanted to express that I'm talking about arbitrary tuples with non-variable length, what wording would have made this clearer?
794.
▲
by
Timon3
3y ago
> That's a type that matches tuples of any length, not a variable-length tuple. A tuple with a type that matches variable lengths of tuples is a variable-length tuple for that piece of code. You're free to show me some official
795.
▲
by
Timon3
3y ago
> "Arbitrary fixed-size tuples" probably don't have a widely accepted meaning :) I read it as "size known when compiling the function". That is exactly what I'm talking about - the size of the tuples is know
796.
▲
by
Timon3
3y ago
> Tuples are already fixed size by nature, so adding a redundant "fixed-size" in that description was confusing. No, you can type variable-length tuples in Python. A variable int tuple, for example, can be typed as Tuple[int, .
797.
▲
by
Timon3
3y ago
Your tuple example only works if both tuples have two elements. I specifically mentioned arbitrary fixed-size tuples (as in, tuples with an arbitrary non-variable length). Your generic type transformation example also doesn't come cl
798.
▲
by
Timon3
3y ago
> Python not only has types but it's type system is superior to typeScript. I strongly disagree. It might be better at some things, but it's much worse at others. Many functions can't be accurately typed (try, for example,
799.
▲
by
Timon3
3y ago
I would guess "fairings", at least that's the only one I don't know on this page: https://rocket.rs/v0.5/guide/
800.
▲
by
Timon3
3y ago
Aside from the obvious meaning of your comment - there is a mod which makes Alyx playable without VR: https://github.com/bfeber/HLA-NoVR
801.
▲
by
Timon3
3y ago
I'm not sure I understand your last sentence. Do you think that Tesla is a stronger power than the country of Sweden?
802.
▲
by
Timon3
3y ago
Remember that it's not a single lock ships go through. If I understand correctly, ships are lifted in 3 locks and lowered in another 3. That would make it $45k+.
803.
▲
by
Timon3
3y ago
That still makes running it a bit annoying, since you have to call each script in order. You could of course create a script that covers this, but that's duplication that can drift apart. I guess you could generate the script from your
804.
▲
by
Timon3
3y ago
I wish I didn't have to circumvent the UI with a strategy like this. Part of the reason I like CI/CD tools is the visualization factor - I can create specific steps, see which step is currently active during execution, and only ca
805.
▲
by
Timon3
3y ago
> Same in Germany, where the left party and labor union drive a campaign against Tesla Grünheide (just southeast of Berlin) with very nebulous claims such as safe working conditions or wages. Those claims are never backed by hard numbers
806.
▲
by
Timon3
3y ago
It's available for Linux and Windows.
807.
▲
by
Timon3
3y ago
But how would they do that? I don't want my queries to be rewritten, or new parts to be injected, because it would limit my ability to actually write the exact query I need.
808.
▲
by
Timon3
3y ago
This wasn't done deliberately. It's something the model picked up from it's training dataset. I'm sure the creators don't want it to be like this, but cleaning trillions of tokens of all examples is long and hard wo
809.
▲
by
Timon3
3y ago
That's a great name! Imposing the images works for me similarly to when you "can't unsee" something. Like when you start seeing something specific in a generic shape or pattern, like with clouds. I tell myself that I see
810.
▲
by
Timon3
3y ago
I think you can use docker-machine for this purpose: https://datamachines.com/blog/how-to-install-a-docker-machin...
More ›