Skip to content

Instantly share code, notes, and snippets.

View edsko's full-sized avatar

Edsko de Vries edsko

View GitHub Profile
-- Due to Oleg
Prelude GHC.IO> (return 'x' >>= const undefined :: IO Int) `seq` ()
()
Prelude GHC.IO> (const undefined 'x' :: IO Int) `seq` ()
*** Exception: Prelude.undefined
CallStack (from HasCallStack):
undefined, called at <interactive>:9:8 in interactive:Ghci4
@edsko
edsko / metadata.json
Last active January 19, 2023 11:10
Simple Bet
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@edsko
edsko / metadata.json
Last active January 19, 2023 09:22
Simple Oracle
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
use futures::StreamExt;
use quinn::{Connecting, Connection, Endpoint, ServerConfig};
use quinn_interop::{config, endpoint::stream::EndpointStream, insecure};
async fn server(config: ServerConfig) -> anyhow::Result<()> {
let endpoint = Endpoint::server(config, config::server_addr())?;
println!("Server setup");
// does not work
EndpointStream::new(&endpoint)
@edsko
edsko / Handwritten.hs
Created December 12, 2022 10:19
Handwritten PIR code
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Spec.Plutus.CodeSize.Handwritten where
import PlutusTx.Prelude
import Data.List.NonEmpty (NonEmpty(..))
@edsko
edsko / metadata.json
Last active August 24, 2022 13:23
Vesting Example
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@edsko
edsko / metadata.json
Created August 24, 2022 11:20
Document token
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@edsko
edsko / metadata.json
Last active August 5, 2022 17:15
Simple ROFO
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@edsko
edsko / metadata.json
Last active August 3, 2022 11:03
Tender offer
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}
@edsko
edsko / metadata.json
Last active August 3, 2022 12:13
Fiat token transfer
{"valueParameterInfo":[],"timeParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Unknown","contractName":"Unknown","contractLongDescription":"We couldn't find information about this contract","choiceInfo":[]}