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
module TH where | |
import Language.Haskell.TH | |
precompute :: [Int] -> DecsQ | |
precompute xs = do | |
let name = mkName "lookupTable" | |
patterns = map intToPat xs | |
fnBodies = map precomputeInteger xs | |
precomputedClauses = |
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
module Problem where | |
bigBadMathProblem :: Integer -> Integer | |
bigBadMathProblem = (* 5) | |
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
newtype Deprecated a b = Deprecated { undeprecate :: a -> b } | |
(💩 ) :: Deprecated a b -> a -> b | |
(💩 ) = undeprecate | |
myDeprecatedFunction :: Deprecated Int Int | |
myDeprecatedFunction = Deprecated myFunction | |
where | |
myFunction :: Int -> Int |
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
I've been thinking about where one would get started to find problems in code. | |
Ideally I'd come up with some mathematical properties to spot that would be | |
likely to indicate that bugs are more common. | |
Part 1: Possible implementations | |
One idea I've had stems from algebra. It starts with the concept of cardinality. | |
Out of all possible implementations of a solution to a certain problem, there | |
are only few of them that correctly solve the problem. |
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
resolver: lts-11.13 | |
packages: | |
- . | |
# https://github.com/NorfairKing/validity/tree/development | |
extra-deps: | |
- git: git@github.com:NorfairKing/validity.git | |
commit: 4de0a0eff895ee2dc7f0bc17cf65d3acb0a0cd5a | |
subdirs: |
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
02/12 15:38:50: Launching app | |
$ adb shell am start -n "eu.cs_syd.intray/eu.cs_syd.intray.android.ui.activity.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER | |
Client not ready yet..Waiting for process to come online | |
Connected to process 18258 on device ulefone-power_3s-0123456789ABCDEF | |
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. | |
W/System: ClassLoader referenced unknown path: /data/app/eu.cs_syd.intray-1/lib/arm64 | |
I/art: Starting a blocking GC HeapTrim | |
I/InstantRun: starting instant run server: is main process | |
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable | |
V/PhoneWindow: D |
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 DeriveGeneric #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Lib where | |
import Control.Monad | |
import Data.Function | |
import Data.List |
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
## Preliminary data: | |
Upgrades to validity: be40c0a0b0bf6a1d58f4a6a5c6770c4a544c4450 | |
- better generators for | |
- Int, Int8, Int16, Int32, Int64 | |
- Word, Word8, Word16, Word32, Word64 | |
- Float, Double | |
- Integer, Natural |
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
( someFunc, | |
) | |
where | |
import qualified Data.Aeson as JSON | |
import qualified Data.Yaml as Yaml | |
import qualified Env | |
import Options.Applicative | |
import Text.Read | |
import qualified YamlParse.Applicative as YamlParse |
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
{ fetchFromGitHub | |
, python | |
, maturin | |
, arrow | |
, dataclasses | |
, numpy | |
, pendulum | |
, psutil | |
, pytest | |
, pytz |
OlderNewer