Skip to content

Instantly share code, notes, and snippets.

View JoshOrndorff's full-sized avatar
🌳

Joshy Orndorff JoshOrndorff

🌳
View GitHub Profile
@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 / 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 / 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 / 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 / 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 / Moved
Last active May 24, 2019 20:04
This documentation has moved
https://docs.substrate.dev/docs/deploying-a-substrate-node-chain
@JoshOrndorff
JoshOrndorff / output.txt
Created June 24, 2019 18:44
DocSearch scraper error
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/root/src/index.py", line 98, in <module>
run_config(environ['CONFIG'])
File "/root/src/index.py", line 42, in run_config
config.query_rules
File "src/algolia_helper.py", line 18, in __init__

Keybase proof

I hereby claim:

  • I am joshorndorff on github.
  • I am joshyorndorff (https://keybase.io/joshyorndorff) on keybase.
  • I have a public key ASBsRd-ZZh08aPxCtypMF6Ix29IcqZtEMvXKXxLqHDTX1wo

To claim this, I am signing this object:

{
"MetadataV7": {
"modules": [
{
"name": "System",
"storage": {
"prefix": "System",
"items": [
{
"name": "AccountNonce",
@JoshOrndorff
JoshOrndorff / writeup.md
Created August 22, 2019 14:41
Pi-Calc Runtime for Substrate

Pi Calc Smart Contract Runtime

History of Mobile Process Calculi

In 1992 Robin Milner et al introduced the pi calculus, a member of the mobile process calculus family, as a new and novel model of computation [paper]. The pi calculus has several properties that make it an attractive option for modern programming. It is Turing complete, allows for straight-forward compositional programming, and is fundamentally concurrent. With the appropriate structure on it's channels, it allows for programming with in object capability paradigm (see architecture section below).

History of Blockchain

In 2009 Bitcoin introduced the proof of work blockchain allowing mutually distrusting parties to coordinate permissionlessly through a currency. In 2013 Ethereum generalized that idea to coordinate on arbitrary computations through a system of smart contracts. Both systems have be