Skip to content

Instantly share code, notes, and snippets.

View laoshaw's full-sized avatar

Ginger Old laoshaw

View GitHub Profile
@caiorss
caiorss / rpn-calculator.cpp
Created November 20, 2018 15:07
Example HP-48 Reverse Polish Notation Interpreter in moder C++ (>= C++11) - https://caiorss.github.io/C-Cpp-Notes/sample-modern-cpp-programs.html
/** File: rpn-calculator.cpp
* Author: Caio Rodrigues - caiorss <DOT> rodrigues <AT> gmail <DOT> com
* Brief: Reverse Polish Notation Calculator
* Description: A simple reverse polish notation command line calculator
* implemented in modern C++.
* Site: https://caiorss.github.io/C-Cpp-Notes/sample-modern-cpp-programs.htm
***************************************************************************/
#include <iostream>
#include <cmath>
#include <map>
@luk6xff
luk6xff / ARMonQEMUforDebianUbuntu.md
Last active June 22, 2025 15:51 — forked from bruce30262/ARMDebianUbuntu.md
Emulating ARM with QEMU on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead

@peltho
peltho / svelte.md
Last active June 10, 2025 16:31
Svelte cheatsheet
@zingaburga
zingaburga / sve2.md
Last active June 21, 2025 02:26
ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

Scalable Vector Extensions (SVE) is ARM’s latest SIMD extension to their instruction set, which was announced back in 2016. A follow-up SVE2 extension was announced in 2019, designed to incorporate all functionality from ARM’s current primary SIMD extension, NEON (aka ASIMD).

Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the [Fugaku supercomputer](https://www.fujitsu.com/global/about/innovation/

@tangentstorm
tangentstorm / sh.mts
Last active May 14, 2025 20:29
sh.mts: javascript shorthand (mostly for web/dom stuff)
// sh.mts: javascript shorthand
// #region array tools
/** id function (returns first argument) */
export const id=<T,>(x: T): T=>x
/** create an array filled with n copies of x */
export const af=<T,>(n: number, x: T): T[]=>Array(n).fill(x) // TODO: make this 'afl' or 'fil' (aa?)
/** loop i from 0..n, calling f(i) */
export const ii=(n: number, f: (i: number)=>void)=>{for(let i=0;i<n;i++)f(i)}
/** map f over [0..n] */