Skip to content

Instantly share code, notes, and snippets.

View MattAlp's full-sized avatar
❄️

Matt MattAlp

❄️
View GitHub Profile
@MattAlp
MattAlp / javascript_engines_and_runtimes.md
Created June 26, 2024 11:31 — forked from guest271314/javascript_engines_and_runtimes.md
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@MattAlp
MattAlp / strongtalk.md
Created August 3, 2024 13:30 — forked from landonf/strongtalk.md
A brief list of Strongtalk papers

In considering where Objective-C could go, it's worthwhile to start by understanding the work that's already been done.

Below are a selection of papers from Gilad Bracha's 1990s work on Strongtalk, an extension of Smalltalk (from which Objective-C's design derives) with (among other things), stronger type-safety tooling.

What's interesting (to me, anyway), is that the work done on the Self/Strongtalk VM in the early 90s was actually bought by Sun and became the modern Java VM. When Google got started on their V8 JavaScript runtime, guess who shows up again — Lars Bak, who was the technical lead for both the Strongtalk and HotSpot Java VMs.

If we're going to be talking about how to apply "modern" (1990s!) ideas to Objective-C, we'd be wise to review the considerable work done in considering those sorts of problems in a Smalltalk-derived universe, and lifting whatever good ideas we can, and discarding

/**
* RollingFileAppender with Lazy Initialization on GraalVM native image.
*/
public class LazyInitRollingFileAppender<E> extends ch.qos.logback.core.rolling.RollingFileAppender<E> {
private boolean started = false;
@Override
public void start() {
if (!inGraalImageBuildtimeCode()) {
super.start();
@MattAlp
MattAlp / SoABenchmark.java
Created January 9, 2025 18:37 — forked from twolfe18/SoABenchmark.java
Does SoA (structure of arrays) beat AoS (array of structures) for Java?
package sandbox;
import java.util.Arrays;
import java.util.Random;
public class SoABenchmark {
public static Random rand = new Random(9001);
public static int NUM_LABELS = 10;
public static Struct[] aos;
@MattAlp
MattAlp / ClassInit.java
Created February 11, 2025 21:29 — forked from simonis/ClassInit.java
Concurrent class initialization
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
public class ClassInit {
static final int CLASSLOADERS = Integer.getInteger("classloaders", 3);
static final int THREADS = Integer.getInteger("threads", 3);
static class MyClassLoader extends URLClassLoader {
public MyClassLoader() {