The 4 things I wish Kotlin had (as a Kotlin + Java + Scala
developer)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Script to run on https://huntshowdown.rocks/en/weapons to extract weapon info | |
const meleeVariantNames = [ | |
"Precision", | |
"Deadeye", | |
"Marksman", | |
"Sniper", | |
"Bayonet", | |
"Riposte", | |
"Trauma", | |
"Striker", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
@author Ilias-Timon Poulakis (FeedTheCat) | |
@license MIT | |
@version 1.8.0 | |
@provides [main=main,mediaexplorer] . | |
@about Simple tuner utility for the reaper media explorer | |
@changelog | |
- Alt-click on a key now adds 'key' metadata (not automatic on MacOS) | |
- Alt-click on the metadata icon now removes 'key' metadata | |
- Improved FFT pitch detection algorithm (better harmonics detection) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WASI_VERSION_FULL = 20.0 | |
WASMTIME_DIR = ../third-party/wasmtime-dev-x86_64-linux-c-api | |
WASI_SDK_PATH = ./wasi-sdk-$(WASI_VERSION_FULL) | |
CC = clang++ | |
WASM_CC = $(WASI_SDK_PATH)/bin/clang++ --sysroot=$(WASI_SDK_PATH)/share/wasi-sysroot | |
CFLAGS = -std=c++20 -I$(WASMTIME_DIR)/include -L$(WASMTIME_DIR)/lib | |
LIBS = -lwasmtime |
https://mail.openjdk.org/pipermail/valhalla-spec-observers/2023-May/002243.html
Design document on nullability and value types
Brian Goetz brian.goetz at oracle.com
Wed May 31 18:37:34 UTC 2023
As we've hinted at, we've made some progress refining the essential differences between primitive and reference types, which has enabled us
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
#include <cstddef> | |
#include <cstdint> | |
#include <cstring> | |
#include <optional> | |
#include <span> | |
#include <string> | |
// A write-ahead log is a log of all the operations that have been performed on the database. | |
struct LogEntryHeader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AsyncLock { | |
private _lock = new Int32Array(new SharedArrayBuffer(4)) // SharedArrayBuffer for multi-threading, 4 bytes for 32-bit integer | |
static INDEX = 0 | |
static UNLOCKED = 0 | |
static LOCKED = 1 | |
lock() { | |
while (true) { | |
console.log("lock") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val JDK_21_PATH = "/home/user/.sdkman/candidates/java/21.ea.6-open" | |
tasks.withType<org.jetbrains.kotlin.gradle.tasks.UsesKotlinJavaToolchain>().configureEach { | |
kotlinJavaToolchain.jdk.use(JDK_21_PATH, JavaVersion.VERSION_21) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with: | |
// $ /opt/gcc-latest/bin/g++ --std=c++2b -fmodules-ts other-module.cxx example-module.cxx -o example | |
// Global module fragment where #includes can happen | |
module; | |
#include <iostream> | |
// first thing after the Global module fragment must be a module command | |
export module example; | |
import other_module; |
NewerOlder