Skip to content

Instantly share code, notes, and snippets.

View MattAlp's full-sized avatar
❄️

Matt MattAlp

❄️
View GitHub Profile
@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

@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 / DirectMemorySize.java
Created June 10, 2024 20:31 — forked from charleehu/DirectMemorySize.java
An Serviceability-Agent based tool to see stats of NIO direct memory, as an alternative on JDKs without JMX support for direct memory monitoring.
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.utilities.*;
public class DirectMemorySize extends Tool {
HotSpot Internals Wiki
https://wiki.openjdk.java.net/display/HotSpot/Main
High-level introduction to HotSpot
https://www.infoq.com/articles/Introduction-to-HotSpot
Jvm-Mechanics https://github.com/dougqh/jvm-mechanics.git
Open Heart Surgery: Analyzing and Debugging the Java HotSpot VM at the OS Level (by Volker Simonis, JavaOne 2014)
https://www.youtube.com/watch?v=k7IX_diKCEo
@MattAlp
MattAlp / nix-cmake
Created January 25, 2024 17:47 — forked from chpatrick/nix-cmake
Using CLion with Nix
#!/usr/bin/env python3
# let's say you have a C++ project in Nix that you want to work on with CLion so that the Nix dependencies are available
# put this script in your project directory
# then, in Settings -> Build, Execution, Deployment -> Toolchains set CMake to this script
# if you need any extra nix-shell arguments, add them to the invocation at the bottom
import os
import sys
import shlex
@MattAlp
MattAlp / named_loop_template.nim
Created August 5, 2023 19:04
From Discord in response to my macro
template nfor(name:string, idx: untyped, loop_range: untyped, body:untyped): untyped =
block `name`:
for `idx`{.inject.} in `loop_range`:
`body`
nfor "outer", i, 0..5:
nfor "inner", j, 0..5:
echo i, j
import macros
macro namedFor(label: string, counter: string, loop_range: untyped, body: untyped): untyped =
result = newStmtList()
let
loopStmt = newTree(nnkForStmt, newIdentNode(counter.strVal), loop_range, body)
labelBlock = newTree(nnkBlockStmt, newIdentNode(label.strVal), loopStmt)
result.add(labelBlock)
macro namedWhile(label: string, condition: untyped, body: untyped): untyped =

Keybase proof

I hereby claim:

  • I am mattalp on github.
  • I am matthewalp (https://keybase.io/matthewalp) on keybase.
  • I have a public key ASCZssS191-9Ia9fvqfy_jqNtnogA3kmESM8UayF2Ldc_Qo

To claim this, I am signing this object:

@MattAlp
MattAlp / ban-user.sql
Created December 29, 2022 18:42 — forked from mixerp/ban-user.sql
PostgreSQL Rule Example
CREATE TABLE forums.banned_users
(
banned_user_id integer PRIMARY KEY REFERENCES account.users,
banned_by integer REFERENCES account.users,
reason text,
browser text,
ip_address text,
user_agent text,
audit_ts TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT(NOW())
);
@MattAlp
MattAlp / humans.txt
Last active February 21, 2021 20:18
Hello.
I'm available at:
(last name)(full first name)@gmail.com.