This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use autodie; | |
use strict; | |
use Data::Dump 'dump'; | |
use autodie; | |
open my $fh, '<:raw', 'dreamy-r8.syx'; | |
my @data=(); | |
my @asounds,my @acopy, my @arom,my @aperf,my @afeel,my @aassign,my @aoutput,my @amidi,my @asystem; | |
my $area = -1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(begin-tx) | |
(module m g | |
(defcap g () true) | |
(defschema s | |
a:string | |
) | |
(deftable t:{s}) | |
(defun add (k:string a:string) | |
(insert t k { 'a: a }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jsonrpc": "2.0", | |
"id": 1, | |
"result": { | |
"blockHash": "0xdcc2a8a430bca58e16783ab3aa2287ad6c8c3a27cdcf254519d55d03d92d698b", | |
"blockNumber": "0xa8b5a3", | |
"contractAddress": null, | |
"cumulativeGasUsed": "0xadb611", | |
"from": "0xa37e46fda154bb2152b1110c46a2287bac8da6e1", | |
# ---------- Buyer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module Pact.Types.Plated where | |
import Control.Lens.Plated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; "Hello, world!" smart contract/module | |
;; | |
;; To try it out, click "Load into REPL" and type into the repl: | |
;; pact> (hello-world.greet) | |
;; | |
;; Check lines 21 and 34 to play with Formal Verification | |
;; | |
;; Define the module. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; Pact Example: "payments", a simple cash ledger. | |
;; | |
(module payments MODULE_ADMIN | |
; no-op module admin for example purposes. | |
; in a real contract this could enforce a keyset, or | |
; tally votes, etc. | |
(defcap MODULE_ADMIN () true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data HashAlgo | |
data SignatureAlgo | |
data PPKScheme' a where | |
ED25519' :: PPKScheme' ED25519Scheme | |
ETH' :: PPKScheme' ETHScheme | |
deriving instance Show a => Show (PPKScheme' a) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.Cont | |
import Control.Monad.Reader | |
import Control.Monad.IO.Class | |
import qualified Data.Map.Strict as M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
benchmarking parse/longStr 10 | |
time 1.788 μs (1.762 μs .. 1.814 μs) | |
0.997 R² (0.996 R² .. 0.999 R²) | |
mean 1.813 μs (1.781 μs .. 1.845 μs) | |
std dev 106.6 ns (86.11 ns .. 133.5 ns) | |
variance introduced by outliers: 72% (severely inflated) | |
benchmarking parse/longStr 100 | |
time 5.493 μs (5.374 μs .. 5.591 μs) | |
0.997 R² (0.995 R² .. 0.998 R²) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/bench/bench compile | |
Array [String "Write succeeded"] | |
Array [String "Write succeeded"] | |
Array [String "Write succeeded"] | |
benchmarking compile/longStr 10 | |
time 370.0 ns (365.6 ns .. 374.8 ns) | |
0.999 R² (0.998 R² .. 0.999 R²) | |
mean 367.9 ns (362.6 ns .. 372.9 ns) | |
std dev 17.24 ns (13.55 ns .. 22.40 ns) | |
variance introduced by outliers: 65% (severely inflated) |
NewerOlder