This file contains hidden or 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
| EXPLAIN ANALYZE — computeRewardTotals restructured (no second pass through computed CTE) | |
| Date: 2026-03-26 | |
| Setup: 10000 activity records, 100 distinct parties, round=42 | |
| Query: thresholded = totalIssuance - unclaimed - mintingAllowance (inline arithmetic) | |
| ================================================================================ | |
| EXPLAIN ANALYZE — computeRewardTotals restructured (round=42, historyId=1) | |
| ================================================================================ | |
| Insert on app_reward_round_totals (cost=8.22..8.24 rows=0 width=0) (actual time=0.266..0.267 rows=0 loops=1) | |
| CTE inserted_parties |
This file contains hidden or 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
| EXPLAIN ANALYZE — combined computeRewardTotals CTE | |
| Date: 2026-03-25 | |
| Setup: 10000 activity records, 100 distinct parties, round=42 | |
| ================================================================================ | |
| EXPLAIN ANALYZE — combined computeRewardTotals (round=42, historyId=1) | |
| ================================================================================ | |
| Insert on app_reward_round_totals (cost=8.27..8.29 rows=0 width=0) (actual time=0.218..0.219 rows=0 loops=1) | |
| CTE computed | |
| -> Index Scan using uq_app_activity_party on app_activity_party_totals (cost=0.15..8.18 rows=1 width=52) (actual time=0.012..0.034 rows=100 loops=1) |
This file contains hidden or 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
| EXPLAIN ANALYZE — computeRewardTotals queries | |
| Date: 2026-03-25 | |
| Setup: 10000 activity records, 100 distinct parties, round=42 | |
| ================================================================================ | |
| EXPLAIN ANALYZE — insertPartyRewards (round=42, historyId=1) | |
| ================================================================================ | |
| Insert on app_reward_party_totals (cost=0.15..8.20 rows=0 width=0) (actual time=0.057..0.057 rows=0 loops=1) | |
| -> Index Scan using uq_app_activity_party on app_activity_party_totals (cost=0.15..8.20 rows=1 width=50) (actual time=0.056..0.056 rows=0 loops=1) | |
| Index Cond: ((history_id = '1'::bigint) AND (round_number = '42'::bigint)) |
This file contains hidden or 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
| #!/bin/bash | |
| # Options / Usage | |
| # put this script in the same directory as your *.cabal file | |
| # it will use the first line of "cabal info ." to determine the package name | |
| # custom options for "cabal install" | |
| CUSTOM_OPTIONS=(--haddock-options='-q aliased') | |
| # hackage server to upload to (and to search uploaded versions for) | |
| HACKAGESERVER=hackage.haskell.org |
This file contains hidden or 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 DataKinds #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE GADTs #-} | |
| {-# LANGUAGE KindSignatures #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| import Control.Applicative ((<$>)) |
This file contains hidden or 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
| { | |
| "AD": { | |
| "countryName": "Andorra", | |
| "currency": "EUR", | |
| "symbol": "€" | |
| }, | |
| "AE": { | |
| "countryName": "United Arab Emirates", | |
| "currency": "AED", | |
| "symbol": "AED" |
This file contains hidden or 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
| $ nix-shell | |
| building '/nix/store/2p075yxfnykj1wgcf7cl83n3ygnnlds1-git-ls-files.drv'... | |
| trace: No index state specified for haskell-project, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
| trace: To make project.plan-nix for hoogle a fixed-output derivation but not materialized, set `plan-sha256` to the output of the 'calculateMaterializedSha' script in 'passthru'. | |
| trace: To materialize project.plan-nix for hoogle entirely, pass a writable path as the `materialized` argument and run the 'updateMaterialized' script in 'passthru'. | |
| trace: No index state specified for cabal-install, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
| trace: No index state specified for ghcid, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
| trace: No index state specified for haskell-language-server, using the latest index state that we know about (2022-01-06T00:00:00Z)! | |
| trace: No index state specified for hlint, using the latest index state that we know about (202 |
This file contains hidden or 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
| #!/bin/bash | |
| cd | |
| # | |
| # fix locales | |
| # | |
| echo "en_US.UTF-8 UTF-8" > /var/lib/locales/supported.d/local | |
| dpkg-reconfigure locales |
This file contains hidden or 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
| # Haskell stack project Github Actions template | |
| # https://gist.github.com/mstksg/11f753d891cee5980326a8ea8c865233 | |
| # | |
| # To use, mainly change the list in 'plans' and modify 'include' for | |
| # any OS package manager deps. | |
| # | |
| # Currently not working for cabal-install >= 3 | |
| # | |
| # Based on https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-complex.yml | |
| # |
This file contains hidden or 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 TypeOperators #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| module HFilter where | |
| data a :* b = a :* b | |
| deriving (Show, Eq) | |
| infixr 5 :* | |
| hlist :: Int :* String :* Int :* Maybe Float :* () |
NewerOlder