Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pron
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
79 ms
·
901.
▲
by
pron
1y ago
This is a change to the OpenJDK JVM (HotSpot) only. I'm not sure, but I think that Graal Native Image (based on the Substrate VM) may already have small headers.
902.
▲
by
pron
1y ago
These things tend to be done gradually out of an abundance of caution. Assuming the experience remains positive, it will be made the default in some future release.
903.
▲
by
pron
1y ago
FFM is the recommended alternative, but JNI is not being deprecated. There are some things that JNI can do that FFM can't, in particular - initiating calls from native code to arbitrary Java methods. FFM only supports upcalls to Java i
904.
▲
by
pron
1y ago
> I think we can increase the TLC model checker throughput to 1 billion states per minute (1000x speedup) by writing a bytecode interpreter. Truffle [1] can convert an interpreter to a JIT compiler -- there's no need to invent bytec
905.
▲
by
pron
1y ago
Even the fact that value keeps increasing doesn't mean it's a good idea. It's a good idea if it keeps increasing more than other value. If a piece of software is more robust against attacks then the value in that also keeps
906.
▲
by
pron
1y ago
But it's not free for the taking. The point is that we'd get more than that 5%'s worth in exchange. So sure, we'll get significant value "if software optimization was truly a priority", but we get even more v
907.
▲
by
pron
1y ago
I haven't seen anything particularly unusual/novel/interesting in Odin that would draw me to take a closer look. Same goes for Jai. That's not to say that these languages aren't well-designed, but I didn't find
908.
▲
by
pron
1y ago
Between records and compact classes [1] Java's boilerplate isn't what it once was. [1]: https://openjdk.org/jeps/512
909.
▲
by
pron
1y ago
I am similarly sceptical, but that's not to say these new languages cannot teach us much. I don't know if Zig or Rust would ever become as popular as C++ -- the odds are certainly stacked against them -- but they both have novel a
910.
▲
by
pron
1y ago
Because we rarely have objective measures by which to compare programming languages, there is no such thing as "ideal." Some objective measures can include code size, and it is undoubtedly true that switching from Assembly to Pyth
911.
▲
by
pron
1y ago
> 'wrestle the compiler' implies you think you know better; this is usually not the case and the compiler is here to tell you about it. Well, yes and no. The way type systems work to soundly guarantee that some program property
912.
▲
by
pron
2y ago
> While it might be Turing complete, it can't express equivalent behavior to a C program. Neither can safe Rust! But this is easier to see in my example because parity is a very functional, as opposed to technical property. > Thi
913.
▲
by
pron
2y ago
> A program that can't express H (72 in decimal) in Hello world is about as divorced from practicals as you can get Huh? I was giving an example of how we make undecidable properties trivial in languages. It can be any property. It&
914.
▲
by
pron
2y ago
> This is a strawman fallacy, we're not talking purely theoreticals. No, this is the technique we use in practice in formal methods to prove program properties. When we write a program correctness proof in TLA+ or Lean, this is what
915.
▲
by
pron
2y ago
> See Java, it doesn't demarcate unsafe code, you use the unsafe package The use of Unsafe in Java is demarcated, and besides, it is now being removed altogether, but we have more interesting things to talk about. > That means st
916.
▲
by
pron
2y ago
Isn't C++ already a serious contender to C? It clearly has not replaced C everywhere, but it's taken over much of C's market. And if C++ could do it, I don't see why another language couldn't do the same (that'
917.
▲
by
pron
2y ago
> By your definition no language ever would be deemed safe. Even Java/C# has to interface with C. Or you have to write bindings for C libs/ kernel calls. That's correct. My point is that even if we talk about memory safety
918.
▲
by
pron
2y ago
If it's for educational purposes and you want to explore various tradeoffs, then you shouldn't necessarily restrict yourself to languages that make similar tradeoffs regarding safety guarantees in the language as Rust. Again, th
919.
▲
by
pron
2y ago
> You messed up writing safe to unsafe interface (and forgot to sanitize your binary afterwards). That is the definition of a language not being memory-safe. Memory-safety in the language means a guarantee that the resulting program
920.
▲
by
pron
2y ago
If you love Rust -- use Rust. Trying to find a language that's just right for you risks it being just that: right for you and few others. Just remember that even if writing memory-safe programs is your goal, using a memory-safe languag
921.
▲
by
pron
2y ago
Because Zig supports cross-compilation, what you care about isn't the host -- the machine that runs the compiler -- but the target , which is not (necessarily) the same as the host. While information about the host isn't made a
922.
▲
by
pron
2y ago
My point is that focusing on the halting theorem is silly, because we have much more precise and less binary generalisations of it since 1965. Finding "practical approximations" that are easier than the hard limits is not only not
923.
▲
by
pron
2y ago
For relevant upcoming changes see Automatic Heap Sizing for ZGC: https://openjdk.org/jeps/8329758
924.
▲
by
pron
2y ago
> The class of code I'm referring to is more like those you already mention in your JEP: logging, tracing, profiling, serialization, authn/authz, mocking, ffi, and so on. I would describe all of those as fitting under the umbre
925.
▲
by
pron
2y ago
I don't think that's the same thing (rather, it's more like ordinary Zig variables in code that's evaluated at compile-time), as there's no arbitrary mixing of compile-time and runtime computation. Again, compare wi
926.
▲
by
pron
2y ago
A comptime variable in Zig isn't a constant whose value is computed at compile time (that would just be a Zig constant) but rather variable that's potentially mutable by comptime: https://ziglang.org/documentatio
927.
▲
by
pron
2y ago
> If your concern is integrity by default, why not just add yet another flag for can-muck-with-the-ast-annotation-processors? There is such a flag (or, rather, a set of flags), and that's exactly what the Lombok compiler uses to cha
928.
▲
by
pron
2y ago
> Picking some features while leaving others out is something that every language does; if doing that is enough to make a language "revolutionary", then every language is revolutionary. You can say that about the design of any
929.
▲
by
pron
2y ago
> Zig doesn't allow for the inference and type-directed method resolution that Rust or the above languages do Well, but Zig also doesn't allow for overloads and always opts for explicitness regardless of comptime, so I would sa
930.
▲
by
pron
2y ago
> But Zig's comptime only approximates the features you mentioned; it doesn't fully implement them That's like saying that a touchscreen device without a keyboard only approximates a keyboard but doesn't fully impleme
More ›