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 October 11, 2024 03:14
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 November 7, 2024 10:37
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 October 29, 2024 15:35
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
Loading
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 August 14, 2024 16:29
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