Skip to content

Instantly share code, notes, and snippets.

Avatar
🐙

Robert Estelle rwe

🐙
View GitHub Profile
@elizarov
elizarov / Delimited.kt
Last active Jan 21, 2021
Delimited Continuations shift/reset in Kotlin
View Delimited.kt
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
/**
* Implementation for Delimited Continuations `shift`/`reset` primitives via Kotlin Coroutines.
* See [https://en.wikipedia.org/wiki/Delimited_continuation].
*
* The following LISP code:
*
* ```
View synthesis.rkt
#lang rosette/safe
(require rosette/lib/angelic ; provides `choose*`
rosette/lib/destruct) ; provides `destruct`
; Tell Rosette we really do want to use integers.
(current-bitwidth #f)
@tvogel
tvogel / git-merge-associate
Created Mar 30, 2011
git script to manually associate files in a conflicting merge when rename detection fails
View git-merge-associate
#!/bin/bash
#
# Purpose: manually associate missed renames in merge conflicts
#
# Usage: git merge-associate <our-target> <base> <theirs>
#
# Example: After a failed rename detection A/a -> B/b which results
# in CONFLICT (delete/modify) for A/a and corresponding "deleted by us"
# messages in git status, the following invocation can be used to manually
# establish the link: