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
import { NativeDatabase, SQLiteOpenOptions } from "./NativeDatabase"; | |
import { | |
NativeStatement, | |
SQLiteAnyDatabase, | |
SQLiteBindBlobParams, | |
SQLiteBindPrimitiveParams, | |
SQLiteColumnNames, | |
SQLiteColumnValues, | |
SQLiteRunResult, | |
} from "./NativeStatement"; |
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
/*** | |
* Common tweaks | |
***/ | |
/* Using the Github Theme with a few tweaks */ | |
.theme-dark { | |
--background-primary: #1f1f1f; | |
} | |
/* display headings with normal font size */ |
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
import React, { LC, hot, useFiber } from '@use-gpu/live'; | |
import { HTML } from '@use-gpu/react'; | |
import { AutoCanvas, WebGPU } from '@use-gpu/webgpu'; | |
import { DebugProvider, FontLoader, PanControls, Flat, Pass, OrbitCamera, OrbitControls, | |
PointLight, AmbientLight, | |
} from '@use-gpu/workbench'; | |
import { UI, Layout, Flex, Block, Inline, Text } from '@use-gpu/layout'; | |
import { |
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
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
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 Main where | |
import Prelude | |
-- Trying to implement https://github.com/dorchard/effect-monad/blob/master/src/Control/Coeffect.hs | |
class CoEffect :: forall k. (k -> Type -> Type) -> ((k -> Type -> Type) -> k) -> ((k -> Type -> Type) -> k -> k -> k) -> Constraint | |
class CoEffect | |
-- class Coeffect (c :: k -> * -> *) where | |
c |
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 Main where | |
import Data.Foldable | |
import Prelude | |
import Data.Set as S | |
-- data Set a where | |
-- Prim :: (Ord a) => S.Set a -> Set a | |
-- Return :: a -> Set 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
module Main where | |
import Prelude | |
newtype AnyShow = AnyShow (forall r. (forall a. Show a => a -> r) -> r) | |
mkAnyShow :: forall a. Show a => a -> AnyShow | |
mkAnyShow a = AnyShow (_ $ a) | |
elimAnyShow :: forall r. (forall a. Show a => a -> r) -> AnyShow -> 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
module Data.Set.Monad where | |
import Prelude | |
import Data.Set as S | |
import Data.Foldable | |
import Data.Tuple.Nested | |
import Unsafe.Coerce | |
-- data Set a where | |
-- Prim :: (Ord a) => S.Set a -> Set 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
Comonadic explorations | |
- Is day convolution as comonadic composition really free? What's the difference with Kenneth's Distribute based composition? | |
- How do specific comonads compose? | |
- cursors -> apart | |
- The cursor like intuition, extended to a range, starts feeing exactly like a lens !? | |
- If the data space has this comonadic structure, how does it compose with the ui components? | |
- If we can model time also as a comonadic cofree module/pattern, how do we sync with an event loop? Seems like the shape of the time dimension(s?) define a clock type!!! Actions are a time dimension :O ?!? I think that's also the coeffect/effect dimension (tricky with cursors on data, does it depends on whether a query is sent or should we abstract that out?). | |
- Chris's Zippers feel like Pairing |
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 Main where | |
import Prelude | |
import Effect (Effect) | |
import Data.Foldable (fold) | |
import TryPureScript (h1, text, render) | |
data Nat m n = Nat (m ~> n) | |
data NatR m n = NatR { nat :: (m ~> n) } |
NewerOlder