Skip to content

Instantly share code, notes, and snippets.

View daveyostcom's full-sized avatar

Dave Yost daveyostcom

View GitHub Profile
@CaptnCodr
CaptnCodr / Fli.md
Last active February 6, 2025 20:32
A little story about Fli

A little story about Fli

This is my first contribution to the FsAdvent on Sergey Tihon's Blog, thank you Sergey for making this possible every year.

Back in September 2022, a wonderful idea came to my mind. I kept thinking more and more over it and took a note, here is the original gist:

type Shell =
| BASH
| POWERSHELL
| CMD
@kareman
kareman / Queue.swift
Last active July 31, 2020 19:16
A standard queue (FIFO - First In First Out) implemented in Swift. Supports simultaneous adding and removing, but only one item can be added at a time, and only one item can be removed at a time. Using the "Two-Lock Concurrent Queue Algorithm" from http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html#tlq, without the locks.
//
// Queue.swift
// NTBSwift
//
// Created by Kåre Morstøl on 11/07/14.
//
// Using the "Two-Lock Concurrent Queue Algorithm" from http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html#tlq, without the locks.
// should be an inner class of Queue, but inner classes and generics crash the compiler, SourceKit (repeatedly) and occasionally XCode.