HNHacker News
TopNewBestAskShowJobs

lewurm

104 karma · joined September 12, 2016

blog: github.com/lewurm/blog/issues

contact: wien.tomnetworks.com

submissionscomments
lewurm··on Quake 3 Source Code Review: Network Model (2012)
What is a former q3 champion doing these days? I'm genuinely curious. Since you are on hacker news I assume you do something with software. Any skills that you picked up back then that are useful today?
lewurm··on AMD's Turin: 5th Gen EPYC Launched
Firmware is using cache as RAM (e.g. https://www.coreboot.org/images/6/6c/LBCar.pdf) to do early init, like DRAM training. I guess later things in the boot chain rely on DRAM being set up probably though.
lewurm··on Arm64EC – Build and port apps for native performance on Arm
> I actually think I'm going to rush out and buy a Windows ARM computer right now.

If you have an Apple Silicon machine you can run a Windows Insider build via UTM in a VM.

lewurm··on Show HN: I Built a Java IDE for iPad
Probably a OpenJDK Zero VM build. That's a configuration without JIT or template interpreter, but a "plain" C++ switch dispatch interpreter that requires no runtime code generation.
lewurm··on Notes on debugging HotSpot's JIT compilation (2023)
Sure, but neither javac (the Java to bytecode compiler) or HotSpot are doing that. The former tries to preserve as much as possible, and for the latter interprocedure analysis is too costly at run-time.
lewurm··on Cortex X2: ARM aims high
Mac Mini running Asahi Linux might be an option
lewurm··on Zig is now self–hosted by default
Thanks for the context!

What's the difference between the stage2 and stage3 binary? Does stage1 produce different binaries for the same input compared to stage2/stage3?

lewurm··on Clojure and Doom Emacs on a brand new M1 computer
GraalVM will have a stable release that includes Apple Silicon support next week. Glad to see the snapshot did the job for you though :-)
lewurm··on OpenSSH 9.0
For github: https://github.com/$user.keys
lewurm··on Preview of Microsoft Build of OpenJDK
Issue at JetBrains: https://youtrack.jetbrains.com/issue/JBR-2074
lewurm··on Show HN: Split Keyboards Gallery
I'm new to mechanical and split keyboards, but so far the moonlander has been great. Well, in the beginning it was a bit of a learning curve, but coming from the ergodox that shouldn't be an issue for you. Not being wireless is the only complaint that I have.
lewurm··on Ditch high definition and new tech to fight climate change
My pessimism tends to agree with you.

OTOH social distancing and wearing masks has shown recently that (most) people are fine with changing their behavior, if necessary.

lewurm··on Ditch high definition and new tech to fight climate change
Premature optimization is the root of all evil. There are lower hanging fruits. Avoiding animal products in your diet is your best bet as individual to fight climate change: https://www.theguardian.com/environment/2018/may/31/avoiding...
lewurm··on A Race of Two Compilers: GraalVM JIT versus HotSpot JIT C2 [video]
CoreCLR started to implemented Tiered Compilation https://github.com/dotnet/coreclr/blob/master/Documentation/...

It's experimental currently, no profile guided optimizations _yet_

lewurm··on A Race of Two Compilers: GraalVM JIT versus HotSpot JIT C2 [video]
> [...] which is what for example .NET does.

.NET is the platform. There are different implementations for it doing different things.

JIT compilation is still different to AOT even without profile guided optimizations. Simple example: In AOT code you can't embed pointers easily and is often solved with indirection (e.g. something like GOT in ELF).

lewurm··on Writing a JIT Compiler in C#
Targeting a stack machine is much easier when writing a compiler for the first time, but real-world machines are generally register based.

In general this is true, here however, we are targeting LLMV IR which is register based with infinite registers; so it's kinda easy again :-) The hard part, register allocation, is actually done by LLVM.

This class implements the conversion: https://github.com/lambdageek/mono/blob/mjit/mcs/class/Mono....

lewurm··on CoreRT – A .NET Runtime for AOT
no, blazor uses a Mono version that interprets at runtime .NET. AOT is in the pipeline though
lewurm··on Substrate VM – A framework that allows AOT compilation of Java applications
`jaotc` integrates with the HotSpot VM, while Substrate VM provides its own runtime (GC etc.) and intentionally supports only a subset of the JVM features.

FWIW, both use Graal as a compiler.

lewurm··on Substrate VM – A framework that allows AOT compilation of Java applications
that's most likely intentional, I'm sure Oracle has a lot of lawyers to look over this kind of stuff ;-)
lewurm··on Substrate VM – A framework that allows AOT compilation of Java applications
With Substrate VM you get way faster startup for your Truffle language and potentially overall less dynamic footprint.

Graal VM is based on HotSpot, which is sort of "bloated" for the specific use case that Truffle has.

lewurm··on Substrate VM – A framework that allows AOT compilation of Java applications
This is huge, congrats to the team! I hope it helps Substrate VM to get better adoption outside of Oracle.
lewurm··on Mono's New .NET Interpreter
Ideally, an application doesn't have to choose, but the runtime uses some good defaults. For example, let's have a look at the HotSpot JVM: A Java method first gets executed in the interpreter, then, if it's hot enough it will compile the method with the C1 JIT, and then later uses the C2 JIT to bring the method up to full peak performance. There is also some profiling going on that is fed into the JITs to guide optimizations. The transition between the execution tiers is based on some heuristics and is kinda complex.

Do you need to care as an application? Ideally no :-) It should be transparent to the user and it's the runtime's job to do the best available thing for you. (Sure, the runtime can be tweaked for specific workloads etc.)

In Mono we aren't there yet: the interpreter is currently useful for restricted targets like iOS, where a JIT can't be used due to security concerns and AOT comes with certain limitations (that is, loading assemblies at runtime and execute them). If you want to use Mono's Interpreter to run roslyn, you can explicitly tell the runtime to do so, but it doesn't make much sense today, because it will give you less performance than the available JIT; we don't support switching the execution engine on the fly for single methods yet (it's also called tiered compilation).

lewurm··on Mono's New .NET Interpreter
check out https://twitter.com/kumpera/status/924007954696646656 and http://blog.stevensanderson.com/2017/11/05/blazor-on-mono/