Skip to content

Instantly share code, notes, and snippets.

View JoshOrndorff's full-sized avatar
🌳

Joshy Orndorff JoshOrndorff

🌳
View GitHub Profile
@JoshOrndorff
JoshOrndorff / Moved
Last active May 24, 2019 20:04
This documentation has moved
https://docs.substrate.dev/docs/deploying-a-substrate-node-chain
@JoshOrndorff
JoshOrndorff / quiz.py
Created April 29, 2019 14:51
Arithmetic Quiz
# Arithmetic Quiz
# Author: Julie Coxe
# 24 April 2019
# Quiz a student in single-step addition, subtraction, multiplication, and division problems.
# Division answers should be the quotient only, no matter the remainder.
import random
@JoshOrndorff
JoshOrndorff / fancyLog.rho.scala
Created April 9, 2019 16:08
Logging Patterns
new fancyLogFactory in {
contract fancyLogFactory (return) = {
new
fancyLog,
logCh
in {
// Give the new log instance back to the user. A new unforgeable
// name is created each time, so you won't need to choose a new
// public name in your client-side code each time. However you,
@JoshOrndorff
JoshOrndorff / joshysolution.md
Created January 13, 2019 01:57
Isaac's rho-calc reduction problem

Problem posed by Isaac DeFrain

Cool little combinatorics problem:

How many reductions does the following [rho calculus] term have?

x!(*a) | x!(*b) | for(z <- x){y!(*z)} | y!(*c) | y!(*d) | for(z <- y){x!(*z)}

Rearrange the code for indentation

@JoshOrndorff
JoshOrndorff / installNotes.md
Last active December 18, 2018 10:16
Note for installing K5 on debian 9.2 YMMV

Following instruction from https://github.com/kframework/k5

  • Ran the apt-get command
  • git clone https://github.com/kframework/k5.git
  • Added lines to ~/.bashrc
export MAVEN_OPTS='-XX:+TieredCompilation'
export PATH=$PATH:~/k5/k-distribution/target/release/k/bin
  • cd k5 and mav package. Got a couple warnings, but everything ultimately says success.
  • k-configure-opam gave me this output (plus more)
@JoshOrndorff
JoshOrndorff / feedback.py
Created December 5, 2018 00:52
Brad's AOC2018 Problem 3b
linelist = f.readlines() # readlines makes a list of each line... linelist is an array
listnum = len(linelist) # listnum is the number of lines
# Creates a map of dimensions init x init with all zeroes in it. Double Array
init = 1100 # Map size
map = []
### Minor performance penalty for the first non-nested loop.
'''
for row in range(init):
@JoshOrndorff
JoshOrndorff / Master of Ceremonies command
Last active November 13, 2018 16:19
Genesis Ceremony 13 November 2018
rnode run --deploy-timestamp 1542122695 --required-sigs 6 --bonds-file ~/Desktop/bonds.txt --has-faucet --interval 15s --duration 5min --standalone
@JoshOrndorff
JoshOrndorff / convolutedLookup.js
Last active November 15, 2018 17:09
Ability to lookup data on RChain
// When listening for data (or continuation) at a name, the returned
// blockResults contain only blocks in which data was actually sent on
// the specified name. HOWEVER, each block in the blockResults contains
// a postBlockData which contains ALL previous sends on the name, not
// only the sends in that block. This code demonstrates that behavior
// by sending on the public name @"testChan" in blocks 1, 3, and 5, but
// not in blocks 2, 4, and 6.
//
// Run this shit on a fresh node if you care about your sanity.
//
@JoshOrndorff
JoshOrndorff / review.md
Last active October 13, 2018 19:29
San Francisco Blockchain Week Review

San Francisco Blockchain Week Review

Joshy Orndorff's reflections on RChain's presence at San Francisco Blockchain Week. Thoughts were written 13 October 2018 while the conference was still fresh on my mind.

What we did well

  • Gave a keynote speech
  • Ran a workshop
  • Had a booth
  • Represented technical (Joshy, Ned), community (Patrick), and investment (Reflective team) personnel
@JoshOrndorff
JoshOrndorff / draft.md
Last active September 13, 2018 00:50
Rholang vs the Dining Philosophers

Rholang vs the Dining Philosophers

Rholang is frequently touted as a fully concurrent programming language. It will be blazing fast because it only executes things sequentially when absolutely necessary. It allows us to avoid resource starvations and thread deadlock. And it isn't even clunky or hard to use because all of this is uilt right into that concurrent computational model.

That's definitely the sexiest programming language I've ever heard of, but what does all of that actually mean? Let's investigate one of rholang's real-world benefits, inherent concurrency, in the context of a classic computer science problem known as "The Dining Philosophers".

The Problem Setting

Imagine two philosophers sitting across from each other on the east and west sies of a table. They each have a bowl of pasta, but there is only one set of silverware. The knife is on north, and the fork on the south. Everyone knows it takes both pieces of silverware to eat pasta, so no philosopher can eat until they have both uten