Skip to content

Instantly share code, notes, and snippets.

<script>
var module = WebAssembly.instantiateStreaming(fetch("linked_list.wasm"), {});
</script>
@da-tubi
da-tubi / ElvishScriptingBasics.md
Last active August 22, 2023 08:00
Elvish Scripting Basics

Elvish Scripting Basics

Assignment and Substitution

var a = 375
set a = 376

var hello = $a

Variables

@steve981cr
steve981cr / How-to-Release-an-Electron-App-on-the-Microsoft-Store.md
Last active May 4, 2024 04:33
Step by step instructions on how to release an Electron app on the Microsoft Store. Uses Electron-builder to package the app.
@steve981cr
steve981cr / How-to-Release-an-Electron-App-on-the-Mac-App-Store.md
Last active May 4, 2024 04:33
Step by step instructions on how to release an Electron app on the Mac App Store. Uses Electron-builder to package the app.
@ttesmer
ttesmer / AD.hs
Last active March 19, 2024 03:04
Automatic Differentiation in 38 lines of Haskell using Operator Overloading and Dual Numbers. Inspired by conal.net/papers/beautiful-differentiation
{-# LANGUAGE TypeSynonymInstances #-}
data Dual d = D Float d deriving Show
type Float' = Float
diff :: (Dual Float' -> Dual Float') -> Float -> Float'
diff f x = y'
where D y y' = f (D x 1)
class VectorSpace v where
zero :: v
// PS. Tailwind classes used for wrapper.
import { FC, useEffect, useState } from 'react'
import { FieldContainer } from '@keystone-ui/fields'
import { Field } from '@keystone-6/fields-document/views'
enum EditorState {
Loading,
Ready,
}
@wphicks
wphicks / Fraud_Detection_Example.ipynb
Last active January 28, 2023 12:44
Notebook example for fraud detection with the Triton FIL Backend
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@natanlao
natanlao / syncthing-photo-sync.md
Last active May 5, 2024 04:59
Syncing iPhone photos with Syncthing

For those who prefer to avoid solutions like iCloud Photos and Dropbox for backing up photos, you can sync your iPhone photos with Syncthing. To do this, you'll need two things:

  • Möbius Sync is, to my knowledge, the only actively-maintained Syncthing client for iOS. It's free to sync up to 20 MB, and only $4.99 (one-time) to remove that limit.

  • PhotoSync is a nifty iOS app for syncing photos to a number of different destinations. It's free for low-quality

Understanding Comparative Benchmarks

I'm going to do something that I don't normally do, which is to say I'm going to talk about comparative benchmarks. In general, I try to confine performance discussion to absolute metrics as much as possible, or comparisons to other well-defined neutral reference points. This is precisely why Cats Effect's readme mentions a comparison to a fixed thread pool, rather doing comparisons with other asynchronous runtimes like Akka or ZIO. Comparisons in general devolve very quickly into emotional marketing.

But, just once, today we're going to talk about the emotional marketing. In particular, we're going to look at Cats Effect 3 and ZIO 2. Now, for context, as of this writing ZIO 2 has released their first milestone; they have not released a final 2.0 version. This implies straight off the bat that we're comparing apples to oranges a bit, since Cats Effect 3 has been out and in production for months. However, there has been a post going around which cites various compar

@mjpitz
mjpitz / _README.md
Last active February 27, 2024 14:32
comparison of embedded databases for raft

As an exercise, I started to design and implement a database in some of my free time. As I started working through some of the details, there were a few things that I knew I wanted to work with and a few things I wanted to evaluate. Since I'm looking at more of a CP system, my mind immediately jumped to Raft. But which implemenation to use? And what storage mechanism? Since I had more familiarity with Hashicorps implemenation, I started there.

The first thing I wanted to do was consider the performance characteristics of the underlying data stores. One of the nice features of the hashicorp implementation is it allows callers to plugin in different stores for logs, stable, and snapshots. There's a whole slew of community implementations.