Skip to content

Instantly share code, notes, and snippets.

View LukasKalbertodt's full-sized avatar
🦊

Lukas Kalbertodt LukasKalbertodt

🦊
View GitHub Profile
@LukasKalbertodt
LukasKalbertodt / doc.md
Last active October 12, 2025 18:25
Quick'n'dirty Rust UI library startup time and binary size comparison

Quick'n'dirty Rust UI library startup time and binary size comparison

Note: this is very much not a good scientific benchmark. Most things I only measured once and I didn't try to control compilation settings. I just cloned the repositories, and ran cargo run -r for an example that seemed fairly minimal to me. I only measured on one machine, on one OS. I still think there is a tiny bit of value in these measurements (hence this gist), but don't take them at face value!

UI lib/app size Final render window task bar
Slint 15MB 111ms 90ms 62ms
egui 12MB 118ms - 21ms
Freya 28MB 146ms - 14ms
@LukasKalbertodt
LukasKalbertodt / _veggie-filter-lieferando.md
Last active March 13, 2023 17:05
Veggie filter for Lieferando

I cannot believe how Lieferando still has no filter for this. So here is my hacky "filter". It sets the background color of non veggie meals to red (or unsets it if it's already red). I just test for a list of German words. You probably want to adjust that.

Be aware, this is a shitty filter. Probably has lots of false positives and false negatives.

The best way to apply this is to create a new bookmark in your browser and copy the code into the target/URL field. This makes it a bookmarklet.

Licensed under CC-0.

@LukasKalbertodt
LukasKalbertodt / Chars.java
Created November 29, 2017 15:50
All valid unicode characters which can be a part of a java identifier
public class Chars {
public static void main(String[] args) {
int k = 0;
for (int i = 0x20; i < 0x10FFFF; i++) {
if (Character.isJavaIdentifierPart(i)) {
System.out.print(new String(Character.toChars(i)));
k++;
if (k == 32) {
System.out.println();
k = 0;
@LukasKalbertodt
LukasKalbertodt / 0-rust-wasm-llvm-backend.md
Last active September 22, 2020 12:18
Several Rust & WebAssembly notes

Compiling Rust to Wasm manually with the LLVM wasm-backend (without Emscripten)

EDIT November 2017: recently the target wasm32-unknown-unknown was added to rustc which uses the LLVM WASM backend and works without Emscripten. This is now the recommended way of generating WASM code from Rust (as it is much easier). Thus, this gist document is pretty much useless now. A great resource on getting started with WASM and Rust is hellorust.com: Setup and Minimal Example.




#!/bin/bash
TMP_PATH=/tmp/rust-blast-off-$(date +%s)
mkdir $TMP_PATH
### install rustup in tmp dir ###
echo "========================================="
echo "=== Just press Enter soon ;-) ==="
echo "========================================="
@LukasKalbertodt
LukasKalbertodt / EventManager.hpp
Created July 4, 2016 15:38
Just found this snippet of code... it's at least 3 years old. An exception-like event manager for games...
/**
* Template based Event-System by Lukas Kalbertodt <[email protected]>
*/
#pragma once
// needed std headers
#include <map>
#include <memory>
#include <cstring>
#include <set>
@LukasKalbertodt
LukasKalbertodt / NiceExample.java
Last active November 21, 2017 16:27
Java Style Guide
/****************************** FormatExample.java **************************/
import AlgoTools.IO;
/**
* @author Willi Wacker <[email protected]>
* @author Susi Sorglos <[email protected]>
*
* Ein sinnloses, aber schön formatiertes Beispiel
*
@LukasKalbertodt
LukasKalbertodt / Cargo.toml
Created October 12, 2015 00:32
Prime Sieve
[package]
name = "era"
version = "0.1.0"
authors = ["Lukas Kalbertodt <[email protected]>"]
[dependencies]
time = "0.1"
bit-vec = "*"
@LukasKalbertodt
LukasKalbertodt / FormatExample.java
Last active August 29, 2015 14:09
Formatierung in Java: Ein Beispiel
/****************************** FormatExample.java **************************/
import AlgoTools.IO;
/**
* @author Lukas Kalbertodt <[email protected]>
* @author Susi Sorglos <[email protected]>
*/
public class FormatExample {
import AlgoTools.IO;
import java.util.Scanner;
import java.io.*;
public class PrimeTest {
private static String m_program;
private static String m_yesString;
private static String m_noString;
public static void main(String[] args) throws Exception {