Looks great, the IETF is amazing :)
Posts by Ilari Suhonen
TeaVM seems promising if you can use WASM :)
I guess that's true. It's possible to think of Rust's box as a kind of "virtual" object on the heap which wraps the real value but occupies zero bytes, much in the same way that the layout of structs is erased at compile time. In this way it's still a "box" and works the same as a real-life box.
This is what "boxing" means in Java; a Box is a concrete object on the heap with a value that is distinct from the primitive value (indeed, primitive values can't be on the heap in the first place).
In Rust, primitive values do exist on the heap, and they may be placed there using Box.
IntelliJ RustRover's Debugger view showing the heap memory of a Rust progrma which places the value 3 in a Box and stores the pointer to the Box in a local variable 'b'.
The HotSpot JVM debugger and Java Debugger showing the source code, stack, and heap for a program which creates a local variable of type Integer and assigns the primitive value 3 to it. The memory view shows the Integer object retains metadata such as the mark and compressed klass pointer, instead of only the value 3.
Kind of, but not in the implementation sense. See the attached screenshots; Rust places the raw value, 3, on the heap when it is boxed. Java, however, places a full "box", that is to say, an Integer object which contains the value 3, complete with its mark, klass pointer, and value.
Box is a pretty confusing name, but I prefer it to HeapPtr, HeapPointer or HeapValue because pointers have their own semantics in Rust and Box is a shorter and cleaner name that doesn't pollute code all that much and clarifies the strong ownership semantics by reserving a specific term.
In Java specifically, the reference on the stack is a pointer to the object header, which is the start of the value of the object on the heap.
In Rust this idea breaks down because Rust stores the value directly on the heap instead of putting it in a boxing object (like a struct)
Hm, true. Originally, I believe, the Box was the object that was in the heap and contained the inner value of type T. So you wouldn't be "moving the Box", but moving the address on the stack that tells you where the Box is.
Sometimes mythology, sometimes blue.lhf.linear_algebra_library...
Honestly don't worry about it so much, learning one imperative language well puts you far on the track of learning the others.
your kid sounds based
Try looking into Collectors.groupingBy :)
You can add the Russian ad list to your ad blocker's filter lists to block them :) easylist-downloads.adblockplus.org/ruadlist+eas...
Here's another one which is probably illegal but won't re-compute if you call the method on the record and also doesn't come with the frustrating additional "get()" call.
Like this:
Work towards features like this is being done with JEP 468, for example :) For now, you'd still need a default constructor though and it would be a valid record at each step
Not exactly what you want, but you can achieve this behaviour with a method that returns a supplier that returns a variable that was frozen by the lambda
Just have to become a better VM-powered developer! The resources to learn about how the JVM organises objects in memory are available online (especially if you read C++)
With the new MemorySegment API, too, Java developers can do direct memory access :)
I remember there being some problems with developing annotation processors when using Maven as a build tool — do you use a different build tool? If you use Maven, did you run into any quirks and if so, how did you circumvent them?
brilliant i want it
i don't remember the exact powershell commands to compile and run java without a build tool but i bet it's
cd $Env:UserProfile\Desktop
javac com\craftinginterpreters\tool\GenerateAst.java
java com.craftinginterpreters.tool.GenerateAst
you should try setting up your project using IDEA community edition instead :) it's free !!
noo :( java.* returns Nothing — packages aren't arranged hierarchically like folders, so for example the 'java.util' package is not "inside" the 'java' package, they are completely separate and just happen to both start with "java."
Since you're trying to make an app, learn Kotlin, Dart or TypeScript :)
Kotlin and Dart are easier if you already know Java and TypeScript is easier if you already know JavaScript
(and also note that your first app will probably suck, especially if you're learning programming at the same time)
These posts always show up on my feeds for Java: en.m.wikipedia.org/wiki/Java_(p...
Delightful little birds! I only wish Bluesky knew the difference between Java, and, well, Java.
obligatory "this wouldn't have happened if you were using Java"
C# isn't that fast! In any case, I'd hazard a guess that a lot of the benchmark time is spent inside the Bun runtime, which is written in Zig (and so performance should be roughly comparable to C)
new PrintStream(OutputStream.nullOutputStream()) and just println() your screams right in :)
"Calculate retained size and biggest objects" is a great opportunity to take a break, meditate for a while and get a coffee :)