Skip to content

Instantly share code, notes, and snippets.

View bwbush's full-sized avatar

Brian W Bush bwbush

View GitHub Profile
@bwbush
bwbush / PLT-7581.ipynb
Last active December 11, 2023 12:57
PLT-7581
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bwbush
bwbush / marlowe-burn.md
Last active May 14, 2023 18:16
How to Burn Role Tokens Minted by Marlowe Runtime

How to Burn Role Tokens Minted by Marlowe Runtime

Open a Marlowe development shell

$ nix develop github:input-output-hk/marlowe-cardano
warning: Using saved setting for 'allow-import-from-derivation = true' from ~/.local/share/nix/trusted-settings.json.
@abailly-iohk
abailly-iohk / testnets.md
Last active June 5, 2024 08:43
List of tools to launch a testnet
There was an error at block ten of Lesson 4
https://github.com/input-output-hk/marlowe-cardano/blob/73ed922f025e494d0060e21cfba4a340b70d12e0/marlowe-cli/lectures/04-marlowe-cli-concrete.ipynb
This is the History of input and output at the Linux terminal.
The error message is shown at the very bottom.
C:\Users\jshea>wsl
johnshearing@LAPTOP-NGQPLDGT:/mnt/c/Users/jshea$ cd ~

Marlowe Pioneers:

Setting Up A Cardano Development Environment On a Windows 10 Computer

I made this tutorial so that I can remember how to set up my Cardano development environment if I ever have to do it again. Much thanks to all the community members that helped me through the process.
I hope others may find this useful.

Tutorial showing how to:

  • Setup a Linux environment on Windows 10 using Windows Subsystem for Linux (WSL)
  • Setup VS Code for use with WSL
@bwbush
bwbush / metadata.json
Created July 3, 2022 16:34
Revenue-Based Loan
{"valueParameterInfo":[["Interest",{"valueParameterFormat":{"contents":null,"tag":"DefaultFormat"},"valueParameterDescription":"The interest paid by the borrower, in DjedUSD."}],["Payment as Percent of Revenue",{"valueParameterFormat":{"contents":null,"tag":"DefaultFormat"},"valueParameterDescription":"The percent of each period's revenue that the borrower must pay the lender."}],["Principal",{"valueParameterFormat":{"contents":null,"tag":"DefaultFormat"},"valueParameterDescription":"The principal provided by the lender, in DjedUSD."}]],"timeParameterDescriptions":[],"roleDescriptions":[["Borrower","The party that borrows the principal and pays back the principal plus interest."],["Lender","The party that lends the principal."],["Revenue Oracle","The oracle that reports the borrow's revenue."]],"contractType":"Other","contractShortDescription":"An unsecured loan where each payment depends upon the borrower's revenue during that period.","contractName":"Revenue-Based Loan","contractLongDescription":"An unsecur
@bwbush
bwbush / debugging-plutus.md
Last active August 31, 2022 09:30
Debugging Plutus

Debugging Plutus

This example illustrates manually passing serialized data from a Plutus validator and then deserializing it. It uses Plutus.Debug.

Instrument the validator

Change traceIfFalse to Plutus.Debug.debugIfFalse with added arguments containing the data to be passed out of the script. Here we change

traceIfFalse "R" $ any (checkScriptOutput addr hsh value) allOutputs
@bwbush
bwbush / proof-of-burn.hs
Created October 15, 2021 23:30
Proof of Burn for Cardano
---------------------------------------------------------------
--
-- Module : Main
-- Copyright : (c) 2021 Brian W Bush
-- License : MIT
--
-- Maintainer : Brian W Bush <code@functionally.io>
-- Stability : Stable
-- Portability : Portable
--
@r-k-b
r-k-b / README.md
Last active May 14, 2022 18:35
nix shell for a development environment for a Gradle project

I was getting errors like...

$ ./gradlew build
... snip ...
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSearchableOptions'.
> A problem occurred starting process 'command '/home/rkb/.gradle/caches/modules-2/files-2.1/com.jetbrains/jbre/jbrx-8u202-linux-x64-b1483.49/jre/bin/java''
@ekmett
ekmett / saunders.md
Created July 21, 2020 23:52
GPT-3-generated Saunders Mac Lane.

Anon, a young researcher, sits down with Saunders Mac Lane.

Anon: Please, explain to me in full detail, everything you know about category theory. Indicate where you are uncertain so I may better understand your epistemic state.

-- End Prompt

Saunders: It's the foundation of modern mathematics and computer science. It deals with sets of objects called categories, which can be thought of as collections of things. For example, there is a set called the natural numbers that we use for counting. There is also another set called the real numbers, which are used for computing. The idea behind it is that if two things are in one category, then they must have some relationship to each other. If two things are in two different categories, then they probably don't have any relationship to each other.

Anon: Can you describe how these objects and arrows get used in practice?