Skip to content

Instantly share code, notes, and snippets.

View bkrmendy's full-sized avatar
💭
⚡️

Bertalan Körmendy bkrmendy

💭
⚡️
  • Budapest, HU
View GitHub Profile
@0xLeif
0xLeif / metal_01_swiftui.swift
Last active May 6, 2023 11:47
Metal + SwiftUI
//
// ContentView.swift
// MetalSwiftUI
//
// Created by Zach Eriksen on 9/8/20.
// Copyright © 2020 oneleif. All rights reserved.
//
// Inspired [MetalUI](https://github.com/0xLeif/MetalUI)
import SwiftUI
@aisamanra
aisamanra / pratt.hs
Created March 11, 2016 22:22
a simple pratt parser in Haskell
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import MonadLib
type Tables t a = (PrefixMap t a, InfixMap t a)
newtype PrattM t r a = PrattM
{ runPrattM :: ReaderT (Tables t r) (StateT [t] (ExceptionT String Id)) a
@Bachmann1234
Bachmann1234 / Output
Last active March 26, 2018 16:17
Christmas Unicode!
billy gets 🎁
jill gets 💩
Jen gets 🎁
@davidjrice
davidjrice / punctuation.js
Created April 30, 2014 22:16
List of punctuation characters
var PUNCTUATION = "" +
"’'" + // apostrophe
"()[]{}<>" + // brackets
":" + // colon
"," + // comma
"‒–—―" + // dashes
"…" + // ellipsis
"!" + // exclamation mark
"." + // full stop/period
"«»" + // guillemets
@kubek2k
kubek2k / quicksort.pl
Created January 26, 2012 12:05
Quicksort in prolog
pivot(_, [], [], []).
pivot(Pivot, [Head|Tail], [Head|LessOrEqualThan], GreaterThan) :- Pivot >= Head, pivot(Pivot, Tail, LessOrEqualThan, GreaterThan).
pivot(Pivot, [Head|Tail], LessOrEqualThan, [Head|GreaterThan]) :- pivot(Pivot, Tail, LessOrEqualThan, GreaterThan).
quicksort([], []).
quicksort([Head|Tail], Sorted) :- pivot(Head, Tail, List1, List2), quicksort(List1, SortedList1), quicksort(List2, SortedList2), append(SortedList1, [Head|SortedList2], Sorted).