pdpian hour ago
> Vx is the right language for the thing that must be correct and fast across ten kinds of silicon. It is not the right language for the thing you are still figuring out.
A bit tangential, but I really *really* appreciate them making this distinction, and wish more people did this. Way too many tools try to advertise themselves as all things for all people, catering to all use cases, and that helps nobody.
Cyan4882 hours ago
> Heterogeneity belongs in the type system, not in the runtime.
Is the intent that applications developed with this are compiled for target hardware on a machine-specific basis?
e.g. I define a machine file for my i5 and GTX3080, and another machine file for my gnarly datacenter rack, and the compiler compiles specifically for each?
That way the same source file is "provable" for different hardware configurations without relying on a runtime to be identicallu implemented?
png7322 hours ago
Is there a backstory for this being named Vx? Seems a bit too close for comfort to the VxWorks OS, though there seems to be no connection.
Skwidan hour ago
Better than I was thinking: https://en.wikipedia.org/wiki/VX_(nerve_agent)
yewenjie2 hours ago
Why is it giving me Vlang vibe
dev_dan_224 minutes ago
Always nice seeing others arriving at similar conclusions! Those two jump out to me:
- "Most compilers hard-code a cost model. Vx reads one. A machine file describes the memory hierarchy and interconnect of a real part, and the compiler admits or rejects placements against it." I also designed it so that the target system is described by a single file that is picked up by the static analysis - cool!
- "Where data lives is part of its type" also doing that - when I got my project to an mvp state; I need to check out how vxlang does what it does: do they use a literal typesystem, or also compile checks outside of that? If its a type system, is it a dependent type system, or another flavor?
Yet another motivation to finally get my side project starting (forth-adjacent, many similar claims with regards to compile-time checks as vxlang; however, I still have to achieve that, while they already seem to have at least those and more in place; kudos to the vxlang team!)
amelius2 hours ago
> Vx is the right language for the thing that must be correct and fast across ten kinds of silicon. It is not the right language for the thing you are still figuring out.
Sounds like a great language for an AI to use then :)
api2 hours ago
Why does this need a new language? Aren't there existing languages where these concepts can be expressed?
paufernandez13 minutes ago
Yeah, Mojo.
classified2 hours ago
[dead]
IshKebab24 minutes ago
Ugh guys... The front page of your project is the most important thing there is. If you can't even be bothered to write it yourself then I don't have much hope for the rest of your project.
Muromec17 minutes ago
Right, right? I see the llm smell seeping through the quotes shared here without even visiting
dev_dan_223 minutes ago
I would argue that it does a good job at pre-selecting its core intended userbase.
AnimalMuppet4 hours ago
I haven't played with it at all, but the writeup looks promising. Moving a bunch of things into the type system and out of runtime crashes is one of the ways we make progress.
dnautics2 hours ago
I think this is wrong. Type systems should be simpler, and you should design it so that your language is easily and correctly statically checked. Not all invariants necessarily have to be verified at the same cadence (compile time)
AnimalMuppet6 minutes ago
But what does static analysis work on? The source code. If it's not in the source code, the static analyzer can't check it. So if you want to check something, even with a static analyzer, then you need some way to talk about that thing in the source code, which means it has to be part of the source language.
Now, sure, you could have some kind of annotations in the comments or something, and a static analyzer that checked those, and you could get that to check pretty much anything that can be checked statically. But at that point, it's not really part of the language, is it?
treyd2 hours ago
> you should design it so that your language is easily and correctly statically checked.
You do that by making the type system more sophisticated.
If you have a really important invariant that you really don't want to be violated due to run-time behavior/input, it's a huge benefit to have a compiler that can statically check that it actually can't be. That's one of the main benefits of having type systems, not just describing the shape of data structures in memory.
dnautics2 hours ago
You can perform static analysis outside of the compiler without putting things in the type system?
C is a bad language to do this with for various reasons, but as a simple example:
char* buf = malloc(SIZE);
free(buf);
free(buf);
There is absolutely no reason why static analysis should not be able to see what the problem is here.kfsone9 minutes ago
Sure, but what it is that makes you believe the compiler shouldn't be the one doing that analysis? Should it catch
``` ((void()(void) free)(buf); ((void()(void) free)(buf); ```
It's been my experience people invested in static analysis think of it like some wholly additive extension.
Compiler-independent static analysis is code applying rules. Someone has to write all the rules, align them with the language and the compiler. The user rarely reads the static analyzer's code or full rule definitions and is blissfully unaware of the full set of disconnects, inconsistences, and gaps between the coverage of the two.
They only notice divergence in the analysis when it generates a false-positive warning or error.
Static analysis adds compilation overhead. Sure, but I'd hazard that re-reading and in to some degree repeating the parsing/translation process that the compiler is going to do also introduces overhead.
There are some languages that demonstrate sta-by-compiler capabilities with heinous compile times, but it doesn't have to be that way. We can engineer better, but at some point it requires a price. Better comments, boilerplate of some kind or another, annotating intent over idiom.
A complex type system isn't ideal; with the right set of primitives you can achieve sophistication without complexity.
``` Freeable buf = malloc(SIZE); free(buf); // compiler error, you didn't check buf isn't valid. free(buf); // compiler error still if you fixed the above, free makes buf invalid. ```
"Making the compiler do STA makes it slow". I don't think that's proven one way or the other. There are examples both ways. "complex" type systems frequently have slow compilers, but if you look more closely that's usually because they're trying to compensate for the disconnect between organically emerged complexity in their under-designed type systems.
0xdeafbeef15 minutes ago
uintptr_t x = opaque((uintptr_t)p); free((void *)x); free(p);
How will you find such violations if opaque comes from so or some ffi, so compiler can't see through? you can't. It's heuristics. Sound type system is much stronger
binary132an hour ago
typesystems can be considered a kind of static analysis
classified2 hours ago
So you prefer runtime crashes to compiler diagnostics, just so the type system can be "simpler"? I find these priorities backwards.
dnautics2 hours ago
> So you prefer runtime crashes
Do you not understand what static analysis is?
BatchJoban hour ago
Here we go again, why dont we try this again?