Skip to content

Instantly share code, notes, and snippets.

View rudolph9's full-sized avatar

Kurt Robert Rudolph rudolph9

View GitHub Profile
@rudolph9
rudolph9 / currency.cue
Last active July 28, 2020 16:01
Currency conversion
// cue v0.3.0-alpha1
given: {
INC: USD: v: 2.0
USD: GBP: v: 3.0
}
_hydrated: given & {
for k, v in given
for _, v1 in given
for k2, _ in v1 {
@rudolph9
rudolph9 / README.md
Last active July 13, 2020 18:59
Resume

Kurt Rudolph Resume

@rudolph9
rudolph9 / scratch.md
Last active June 10, 2020 17:04
Haskell intro stuff

Detailed explination

Prelude Data.String> foldr (\acc x -> x ++ acc ) "a" (map (:[]) "12345")
"a54321"
Prelude Data.String> foldl (\acc x -> x ++ acc ) "a" (map (:[]) "12345")
"54321a"
Prelude Data.String> scanr (\acc x -> x ++ acc ) "a" (map (:[]) "12345")
["a54321","a5432","a543","a54","a5","a"]
Prelude Data.String> scanl (\acc x -> x ++ acc ) "a" (map (:[]) "12345")
https://beacon.exergy.dev/?swarmKey=%2Fkey%2Fswarm%2Fpsk%2F1.0.0%2F%0A%2Fbase16%2F%0A69802e05a4ce11ade9f0fe3d55595b24a9d03ad6522848478ebf52f479cfbbb7&bootstrapNode=%2Fdns4%2Fbootstrap-node.jx-staging.xrg.pw%2Ftcp%2F443%2Fwss%2Fipfs%2FQmdnmJmwKSGLDYp494ApKM2DYfrU7BuPVKPCqzKoWRFbDd
@rudolph9
rudolph9 / Marlowe.hs
Last active October 28, 2019 19:29
Marlowe Smart Contract
{-# LANGUAGE OverloadedStrings #-}
module Swap where
import Language.Marlowe
main :: IO ()
main = print . pretty $ contract
{- Simply swap two payments between parties -}
contract :: Contract
@rudolph9
rudolph9 / Marlowe.hs
Last active October 28, 2019 19:23
Marlowe Smart Contract
{-# LANGUAGE OverloadedStrings #-}
module Swap where
import Language.Marlowe
main :: IO ()
main = print . pretty $ contract
{- Simply swap two payments between parties -}
contract :: Contract
@rudolph9
rudolph9 / STDOUT
Last active October 17, 2019 23:57
Cuelang rspec like testing package
$ cue eval ttest.cue
FooBar: string
test: {
subject: _
describe: {
"One big definition": {
subject: string
it: {
"should work for invalid": {
assert: {
@rudolph9
rudolph9 / .gitignore
Last active September 6, 2019 23:32
go-ipfs-api_wasm_app
bin
@rudolph9
rudolph9 / README.md
Last active February 4, 2023 00:32
Cue Web Assembly

Cue Web Assembly

Followed tutorial here: https://github.com/golang/go/wiki/WebAssembly

Setup

  1. install compatible version of golang. Test with go1.12.8
  2. get cue: go get -u cuelang.org/go/cue NOTE: this installs the packages files, not the cmd
  3. get the wasm exec_file cp "$(go env GOROOT)/misc/wasm/wasm_exec.js
@rudolph9
rudolph9 / table.mkdn
Created June 14, 2019 20:31 — forked from ngs/table.mkdn
Unicode character table

A

Description Entity Preview
A With Acute, Latin Capital Letter Á Á
A With Acute, Latin Small Letter á á
A With Breve, Latin Small Letter ă ă
A With Caron, Latin Small Letter ǎ ǎ
A With Circumflex, Latin Capital Letter  Â
A With Circumflex, Latin Small Letter â â