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.
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)
> 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.
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?
even when the underlying language is widely used (in this case, Rust) I think there is a case to coin a new language when (i) there is a bunch of new stuff, (ii) it ain’t gonna be adopted wholesale by the core team and (iii) it has a coherent toolchain and (iv) it makes promises to coders that are stable over time. Disclosure, I am the author of https://bil-lang.org that pulls the same trick as an extension / transpiler targeting golang
> 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 :)
fwiw I recently tried this with ChatGPT. The result (https://bil-lang.org) came after I dumped the LLM as a name suggester. As a checker and idea source it was fine. The language name space is quite crowded!
> 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?
> Is the intent that applications developed with this are compiled for target hardware on a machine-specific basis?
Vx gives you the power to do so, but one can be conservative by putting all the values in the fleet/*.vx files to extreme values. An analogy to that would be when we compile for X86-64, we can specify `-mcpu` otherwise by default the compiler picks a conservative backend.
Vx allows one to define compute elements(number of cores, etc), memory elements (number of distinct memory elements, hierarchy if any) and their relationship (placement, ownership etc). Together they define the toplogoy of a machine. Toplogy goes into machine description files (see https://github.com/vx-lang/Vx/tree/main/fleet) and the compiler uses them to 'monomorphize' the program based on that topology.
> 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.
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.
And it doesn't seem to render correctly on mobile. I hit this myself trying to vibe up a side project; it looked slick, but it took multiple prompts (and at least an uploaded screenshot or two) just to make it mobile friendly.
> On Apple's unified memory that transfer compiles to almost nothing. It is still written down, because data locality should be provable by reading the source rather than by profiling the binary.
How does profiling the binary play into this? Elsewhere the hypothesis is "it crashes", whereas profiling is about performance.
> Most languages treat the accelerator as infrastructure: you write math, and a large opaque runtime decides how to ship it. Vx treats it as semantics.
What does that mean? Vx doesn't treat the accelerator as infrastructure? Vx doesn't have a large opaque runtime? "You write math, Vx treats it as semantics". I don't understand that.
Can sort of make sense of the transfer and performance bit as: the location is encoded as part of the data type instead of some sort of automatic spillover to main memory that will behave differently based on data size.
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!)
I'm reminded of a number of critiques that have popped up over the years such as "C Is Not a Low-level Language: Your computer is not a fast PDP-11" and others I can't remember at the moment. In essence our "low level" languages are designed to run on an abstract machine that hasn't changed much since the 70s while the actual hardware it's meant to abstract over has become incredibly sophisticated. As a simple example consider how many programming languages have something simple like SIMD support without dropping into compiler intrinsics or relying on the optimizer.
I've actually created some experimental DSL embeddings around this idea before as I find it a fascinating area. Skimming through the Vx docs it seems like it is moving some of the abstract machine into the type system for greater flexibility.
Many x86 CPUs most since the PDP-11 were designed were designed around the languages (often C/C++) that they support. For example the introduction of AVX for SIMD with un-aligned memory and load-store cues for unrolling loops with pointers across memory boundaries without penalty. C++ of course also evolved.
It's important to note that there was a huge shift from RISC to CISC to speed decode and then to vectorization and virtualization. The former was driven at first to allow higher single threaded clock speeds, and then when that hit a power wall ~2004 to raise data throughput and allow multi-threading (which required code changes), and then multiple virtual machines.
A website explaining a new programming language tries its best. It is still not enough, because AI-generated writing needs some level of human attention, rather than let it degenerate into slop.
Please dedicate ten minutes of your time to reviewing your copy — so a person interested in your project walks away with understanding, not angry thoughts at three in the morning.
I have come slowly to the view that LLMs are very good at this kind of thing and we can use them very productively. I’m tempted to say that this is optimal human+LLM collaboration.
> Are you not biased having created another PL in a similar fashion?
guilty as charged (but also with experience that I have made something cool that I would not otherwise have had the skills or time to do)
> same fashion as a group project in school
you describe my approach to schoolwork with uncanny accuracy
> that’s the funnest part!
amazingly, finding a name for a new PL is the hardest part and yes I plead guilty to working collaboratively with an LLM for inspiration and for grunt checks (motorbike for the mind)
> One Language, Every Chip [...] CPU, GPU, NPU [...]
Every chip? For example if I target an Intel Meteor Lake (I'm not picking a niche one), does it compile for this CPU, its integrated NPU and its Arc GPU?
44 comments
[ 2.6 ms ] story [ 16.2 ms ] threadYou 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.
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?
I think the compiler was written from scratch though.
Sounds like a great language for an AI to use then :)
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?
Vx gives you the power to do so, but one can be conservative by putting all the values in the fleet/*.vx files to extreme values. An analogy to that would be when we compile for X86-64, we can specify `-mcpu` otherwise by default the compiler picks a conservative backend.
Vx allows one to define compute elements(number of cores, etc), memory elements (number of distinct memory elements, hierarchy if any) and their relationship (placement, ownership etc). Together they define the toplogoy of a machine. Toplogy goes into machine description files (see https://github.com/vx-lang/Vx/tree/main/fleet) and the compiler uses them to 'monomorphize' the program based on that topology.
https://en.wikipedia.org/wiki/Transmeta
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.
> On Apple's unified memory that transfer compiles to almost nothing. It is still written down, because data locality should be provable by reading the source rather than by profiling the binary.
How does profiling the binary play into this? Elsewhere the hypothesis is "it crashes", whereas profiling is about performance.
> Most languages treat the accelerator as infrastructure: you write math, and a large opaque runtime decides how to ship it. Vx treats it as semantics.
What does that mean? Vx doesn't treat the accelerator as infrastructure? Vx doesn't have a large opaque runtime? "You write math, Vx treats it as semantics". I don't understand that.
- "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!)
I've actually created some experimental DSL embeddings around this idea before as I find it a fascinating area. Skimming through the Vx docs it seems like it is moving some of the abstract machine into the type system for greater flexibility.
It's important to note that there was a huge shift from RISC to CISC to speed decode and then to vectorization and virtualization. The former was driven at first to allow higher single threaded clock speeds, and then when that hit a power wall ~2004 to raise data throughput and allow multi-threading (which required code changes), and then multiple virtual machines.
Please dedicate ten minutes of your time to reviewing your copy — so a person interested in your project walks away with understanding, not angry thoughts at three in the morning.
/s
Oh don’t forget we need to think of the future… Make sure we can run on GPUs.
Try not to sound too LLMy.
Don’t mess up.”
I wish you luck I guess
This is collaboration in the same fashion as a group project in school. One kid never shows up or does any work and expects to put their name on it.
It’s hard to take you all seriously when your first instinct is to pop open an llm to even name your project. I mean c’mon that’s the funnest part!
guilty as charged (but also with experience that I have made something cool that I would not otherwise have had the skills or time to do)
> same fashion as a group project in school
you describe my approach to schoolwork with uncanny accuracy
> that’s the funnest part!
amazingly, finding a name for a new PL is the hardest part and yes I plead guilty to working collaboratively with an LLM for inspiration and for grunt checks (motorbike for the mind)
Every chip? For example if I target an Intel Meteor Lake (I'm not picking a niche one), does it compile for this CPU, its integrated NPU and its Arc GPU?
> The repository ships machine files for H100, H200, B200, A100, MI300X, Apple M4 and multi-GPU nodes
So it seems it won't work out of the box.
Every chip? I bet it can't target analog chips, what with the pointer talk and all...