Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3bd72fe
remove all
ingun37 Sep 6, 2025
d99493a
genesis
ingun37 Sep 6, 2025
0d5b858
basic cli
ingun37 Sep 6, 2025
8fd6ba8
reading directory and very basic test data
ingun37 Sep 6, 2025
9f42157
text and filetype
ingun37 Sep 7, 2025
d846343
trying to compile cmark ...
ingun37 Sep 7, 2025
f9ac298
convert to tree
ingun37 Sep 7, 2025
92d3300
tree folding
ingun37 Sep 8, 2025
9aa3214
pass down full path, hash
ingun37 Sep 8, 2025
4421732
refac
ingun37 Sep 8, 2025
5cbe1b0
remove numAnswer and hash
ingun37 Sep 8, 2025
0971b32
copy resource
ingun37 Sep 8, 2025
61e11d6
hmmm
ingun37 Sep 8, 2025
1cef2c6
log
ingun37 Sep 8, 2025
a3eaa72
format
ingun37 Sep 8, 2025
197de7f
cabal project
ingun37 Sep 9, 2025
128fb1c
Revert "cabal project"
ingun37 Sep 9, 2025
9b2633d
finally it builds
ingun37 Sep 9, 2025
7934061
construct time map
ingun37 Sep 10, 2025
dd72664
refact
ingun37 Sep 10, 2025
ee70b82
refact
ingun37 Sep 10, 2025
bfd9a07
refact
ingun37 Sep 10, 2025
c674a71
compile markdown
ingun37 Sep 10, 2025
9311e09
data flow readme
ingun37 Sep 10, 2025
503b734
test with git submodule
ingun37 Sep 10, 2025
199fb58
unpack bytestring correctly
ingun37 Sep 10, 2025
8a0dcfb
time
ingun37 Sep 10, 2025
508abcb
refact
ingun37 Sep 10, 2025
db2bf36
write json files
ingun37 Sep 10, 2025
f43cc76
parent hash
ingun37 Sep 10, 2025
b213a72
page content
ingun37 Sep 10, 2025
84877ee
qualified import in MyGit.hs
ingun37 Sep 10, 2025
7cc0a2b
pretty log
ingun37 Sep 10, 2025
8be01e3
cool lens tricks
ingun37 Sep 10, 2025
def2fa0
prefix
ingun37 Sep 11, 2025
7b3dc00
distinguish code and math
ingun37 Sep 11, 2025
d78b682
new line
ingun37 Sep 11, 2025
7604d74
workflow
ingun37 Sep 11, 2025
f2ff100
git add flake.nix
ingun37 Sep 11, 2025
d1f9b2d
update cache.iog
ingun37 Sep 11, 2025
d826468
fix ghc version
ingun37 Sep 11, 2025
ff316d6
lets gooo
ingun37 Sep 11, 2025
fe1097a
pause ...
ingun37 Sep 11, 2025
7869607
ghc version 9121
ingun37 Sep 11, 2025
93ad8e2
use flake
ingun37 Sep 11, 2025
f32fbe8
ditch haskell.nix
ingun37 Sep 11, 2025
cd69d35
give it a try another
ingun37 Sep 11, 2025
086c511
try again
ingun37 Sep 11, 2025
d303db8
another hix go
ingun37 Sep 11, 2025
2bfa922
add flake.nix
ingun37 Sep 11, 2025
73b163a
allow-import-from-derivation
ingun37 Sep 11, 2025
051f6c8
accept-flake-config
ingun37 Sep 11, 2025
e73d526
shaaaaa
ingun37 Sep 11, 2025
1d9bc22
buffer size
ingun37 Sep 11, 2025
46c0fc2
cat
ingun37 Sep 11, 2025
86abfdf
fix flake.nix
ingun37 Sep 11, 2025
c9638b1
remove sha1
ingun37 Sep 11, 2025
ae7d7a5
back
ingun37 Sep 11, 2025
04850e8
try different sha
ingun37 Sep 11, 2025
bfc01af
correct sha
ingun37 Sep 11, 2025
dc4f528
how to check sha256
ingun37 Sep 11, 2025
ca5187c
ghc 9 12 2
ingun37 Sep 11, 2025
bf6fea9
prefixpath --> prefix
ingun37 Sep 11, 2025
9e2fe83
fix image prefix
ingun37 Sep 11, 2025
dee47cc
up version to 1.0.0.0
ingun37 Sep 12, 2025
9072c95
test case
ingun37 Sep 12, 2025
42d3b75
test pass
ingun37 Sep 12, 2025
fa9177c
add subcommands
ingun37 Sep 14, 2025
7c839be
matlab-mark
ingun37 Sep 20, 2025
adf86a5
matlab mark
ingun37 Sep 20, 2025
94f4816
add sha256 for cmark-lens
ingun37 Sep 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/dist-newstyle
/test/dst
/test/matlab-dst
/cabal.project.freeze
18 changes: 15 additions & 3 deletions answers-script.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ library
import: warnings

-- Modules exported by the library.
exposed-modules: MyLib, MyGit, MyMark
exposed-modules: MyLib, MyGit, MyMark, MatlabMark

-- Modules included in this library but not exported.
-- other-modules: MyGit
Expand All @@ -85,7 +85,9 @@ library
tagged,
transformers,
monad-loops,
aeson
aeson,
attoparsec,
cmark-lens

-- Directories containing source files.
hs-source-dirs: src
Expand Down Expand Up @@ -145,4 +147,14 @@ test-suite answers-script-test
base ^>=4.21.0.0,
answers-script,
filepath,
containers
containers,
directory-tree,
hspec,
QuickCheck,
text,
bytestring,
lens,
attoparsec,
cmark,
cmark-lens,
directory
77 changes: 62 additions & 15 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module Main where

import MyLib (someFunc)
import MatlabMark qualified
import Options.Applicative

data Sample = Sample
data GenerateArgs = GenerateArgs
{ prefix :: String,
src :: String,
dst :: String
}

sample :: Parser Sample
sample =
Sample
generateParser :: Parser GenerateArgs
generateParser =
GenerateArgs
<$> strOption
( long "prefix"
<> value ""
Expand All @@ -26,18 +27,64 @@ sample =
<> help "path to static directory"
)

greet :: Sample -> IO ()
greet (Sample prefix src dst) = do
generateCommand :: ParserInfo GenerateArgs
generateCommand =
info
(generateParser <**> helper)
( fullDesc
<> progDesc "Import answers-db into answers static asset"
<> header "Import answers-db into answers static asset"
)

data MatlabMarkdownArgs = MatlabMarkdownArgs FilePath FilePath

matlabMarkdownParser :: Parser MatlabMarkdownArgs
matlabMarkdownParser =
MatlabMarkdownArgs
<$> strOption
( long "src"
<> help "path to the markdown file that is exported from MATLAB"
)
<*> strOption
( long "dst"
<> help "path to a directory in answers-db"
)

matlabMarkdownCommand :: ParserInfo MatlabMarkdownArgs
matlabMarkdownCommand =
info
(matlabMarkdownParser <**> helper)
( fullDesc
<> progDesc "Build assets from a markdown file exported from MATLAB"
<> header "Build assets from a markdown file exported from MATLAB"
)

data Args = Generate GenerateArgs | MatlabMarkdown MatlabMarkdownArgs

-- data Args = Args { commandArgs :: CommandArgs }

argsParser :: Parser Args
argsParser =
hsubparser
( command "generate" (Generate <$> generateCommand)
<> command "matlab-markdown" (MatlabMarkdown <$> matlabMarkdownCommand)
)

greet :: Args -> IO ()
greet (Generate (GenerateArgs prefix src dst)) = do
_ <- someFunc prefix src dst
return ()
greet (MatlabMarkdown (MatlabMarkdownArgs src dst)) = do
MatlabMark.generateMatlabAnswersDB dst =<< MatlabMark.readMatlabMD src

main :: IO ()
main = greet =<< execParser opts
where
opts =
info
(sample <**> helper)
( fullDesc
<> progDesc "import answers-db into answers static asset"
<> header "what is header?"
)
main =
greet
=<< execParser
( info
(argsParser <**> helper)
( fullDesc
<> progDesc "Collection of utility functions for the Answers web app"
<> header "Collection of utility functions for the Answers web app"
)
)
8 changes: 7 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ source-repository-package
location: https://github.com/jwiegley/gitlib.git
subdir: hlibgit2
tag: bf256617179d853bdbc12e9283b3f570ebb9d9d7
--sha256: 13k3aymqwzpcijnjjka820nv6rkgakzbvh13glw98p1c4yhqwcbf
--sha256: 13k3aymqwzpcijnjjka820nv6rkgakzbvh13glw98p1c4yhqwcbf

source-repository-package
type: git
location: https://github.com/ingun37/cmark-lens.git
tag: 4456f10deccb61419ce28811db448c266931190f
--sha256: 0s1zzpd1bgap403awkjar365qxsysw4lwq6i23whjydqj3whqdhb
47 changes: 47 additions & 0 deletions src/MatlabMark.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

module MatlabMark (generateMatlabAnswersDB, readMatlabMD) where

import CMark
import CMark.Lens
import Control.Lens
import Data.Attoparsec.Text qualified as A
import Data.Text qualified as T
import Data.Text.IO qualified as TIO
import System.FilePath qualified as File

changeMatlabMarkdownDelimeters :: T.Text -> T.Text
changeMatlabMarkdownDelimeters = T.replace "\n $$ " "\n```math\n" . T.replace " $$ \n" "\n``` \n" . T.replace "\n $" "\n $`" . T.replace "$\n" "`$\n"

theRecurse :: [Node] -> ([Node], [(String, [Node])])
theRecurse [] = ([], [])
theRecurse (x : xs) =
let (nodes, pairs) = theRecurse xs
problemNumber = A.parseOnly parseVersion (x ^. _nodesLens . ix 0 . _nodeType . _TEXT)
in case problemNumber of
Left _ -> (x : nodes, pairs)
Right v -> ([], (v, nodes) : pairs)

groupByProblems :: Node -> ([Node], [(String, [Node])])
groupByProblems (Node _ DOCUMENT nodes) = theRecurse nodes
groupByProblems _ = undefined

parseVersion :: A.Parser String
parseVersion = do
major <- A.many1 A.digit
_ <- A.char '.'
minor <- A.many1 A.digit
return $ major <> "." <> minor

generateMatlabAnswersDB :: FilePath -> Node -> IO ()
generateMatlabAnswersDB outputDirPath node =
let (intro, groups) = groupByProblems node
toDoc = Node Nothing DOCUMENT
writeMD name nodes = TIO.writeFile (outputDirPath File.</> (name <> ".md")) (CMark.nodeToCommonmark [] Nothing (toDoc nodes))
in do
writeMD "cover" intro
mapM_ (uncurry writeMD) groups

readMatlabMD :: FilePath -> IO Node
readMatlabMD mdFilePath = CMark.commonmarkToNode [] . changeMatlabMarkdownDelimeters <$> TIO.readFile mdFilePath
71 changes: 56 additions & 15 deletions test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,20 +1,61 @@
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import MyLib qualified
import MyGit qualified
import System.FilePath
import Control.Monad
import Data.Map

src :: FilePath
src = "test" </> "answers-db"
import Control.Monad
import Data.ByteString qualified as B
import Data.Either qualified as E
import Data.Text qualified as T
import Data.Text.IO qualified as TIO
import Data.Text.Encoding qualified as Encoding
import MyLib qualified
import MatlabMark qualified
import System.Directory.Tree qualified as DT
import System.Directory qualified as D
import System.FilePath qualified as F
import Test.Hspec
import Control.Lens
import CMark qualified
import CMark.Lens
import Data.Attoparsec.Text qualified as A

dst :: FilePath
dst = "test" </> "dst"
main :: IO ()
main = hspec $ do
describe "changeMatlabMarkdownDelimeters" $ do
it "matlab answers markdown test" $ do
matlab
describe "MyLib.someFunc" $ do
it "asset build test" $ do
testCase

prefix :: String
prefix = "prefix"
testCase :: IO ()
testCase =
do
let expect = "test" F.</> "expect"
let dst = "test" F.</> "dst"
let src = "test" F.</> "answers-db"
_ <- MyLib.someFunc "prefix" src dst
let reader x = do
b <- B.readFile x
return $ E.fromRight (T.pack $ F.takeBaseName x ++ ": " ++ show (B.length b)) $ Encoding.decodeUtf8' b
a <- DT.readDirectoryWith reader dst
let a' = a ^.DT._dirTree
let a'' = DT.flattenDir (set DT._name "" a')
b <- DT.readDirectoryWith reader expect
let b' = b ^.DT._dirTree
let b'' = DT.flattenDir (set DT._name "" b')
zipWithM_ shouldBe a'' b''

main :: IO ()
main = do
pageDatas <- MyLib.someFunc prefix src dst
forM_ pageDatas print
matlab :: IO ()
matlab =
do
node <- MatlabMark.readMatlabMD $ "test" F.</> "matlab-short.md"
let dst = "test" F.</> "matlab-dst"
D.createDirectoryIfMissing True dst
MatlabMark.generateMatlabAnswersDB dst node
a <- DT.readDirectoryWith TIO.readFile dst
let a' = a ^.DT._dirTree
let a'' = DT.flattenDir (set DT._name "" a')
b <- DT.readDirectoryWith TIO.readFile ("test" F.</> "matlab-expect")
let b' = b ^.DT._dirTree
let b'' = DT.flattenDir (set DT._name "" b')
zipWithM_ shouldBe a'' b''
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"5.1 Continuous Mappings","_hash":"2125c437aaac928d5852224ff00a83f9d9776dda","_attributes":{},"_answers":1},"_parentHash":"6c11e3a31b4b8bd07bdef3f87887ab202a568679","_childPageContents":[{"_pageTitle":"8","_hash":"3e8d61043ed9bdb6b3cd4f197f0203bbdcb13db1","_attributes":{"a.md":{"_time":"2020-10-18T14:48:51+09:00","_attributeFile":{"_content":"I'll refer $`\\mathcal{T}`$ as $`\\mathcal{T}_X`$, $`\\mathcal{T}_1`$ as $`\\mathcal{T}_Y`$, $`\\mathcal{T}_2`$ as $`\\mathcal{T}_A`$, $`\\mathcal{T}_3`$ as $`\\mathcal{T}_B`$.\n\nLet's define $`x \\in X`$ and $`U \\in \\mathcal{T}_Y`$ such that $`f(x) \\in U`$. By definition of continuous mapping, there must exists a $`V`$ such that $`x \\in V \\in \\mathcal{T}_X`$ and $`f(x) \\in fV \\subseteq U`$.\n\nIf for any $`x \\in A`$ and any B-induced open set $`U_B \\in \\mathcal{T}_B`$, which must imply existance of $`U \\in \\mathcal{T}_Y`$, such that $`g(x) \\in U_B`$,\n\n![](IMG_44AF9D4BED6C-1.jpeg)\n\n...there exists an A-induced open set $`V_A`$, which must imply existance of $`V \\in \\mathcal{T}_A`$, such that the image $`gV_A`$ satisfies $`g(x) \\in gV_A \\subseteq U_B`$, then $`g`$ must be continuous. What we have to know is that if the image $`gV_A`$is subset of $`U_B`$, in other words, every $`x \\in V_A`$ will satisfiy $`g(x) \\in U_B`$. Let's proove it.\n\n![](IMG_E7FB922B8E70-1.jpeg)\n\n```math\n\\begin{aligned}\n & x \\in V_A \\\\\n & \\rightarrow x \\in V \\\\\n & \\rightarrow g(x) \\in gV \\\\\n & \\rightarrow g(x) \\in \\text{ some } U & \\text{ since } f \\text{ is continuous} \\\\\n & \\rightarrow g(x) \\in U \\cap B & \\text{ since codomain of } g \\text{ is } B \\\\\n & \\rightarrow g(x) \\in U_B\n\\end{aligned}\n```"}},"q.md":{"_time":"2020-04-12T01:08:01+09:00","_attributeFile":{"_content":"Let $`(X,\\mathcal{T})`$ and $`(Y,\\mathcal{T}_1)`$ be topological spaces and $`f:(X,\\mathcal{T}) \\rightarrow (Y,\\mathcal{T}_1)`$ a continuous mapping. Let $`A`$ be a subset of $`X`$, $`\\mathcal{T}_2`$ the induced topology on $`A`$, $`B = f(A)`$, $`\\mathcal{T}_3`$ the induced topology on $`B`$ and $`g:(A,\\mathcal{T}_2) \\rightarrow (B,\\mathcal{T}_3)`$ the restriction of $`f`$ to $`A`$. Prove that $`g`$ is continuous."}}},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"books","_hash":"2aed5404c83f7a46aa249e0a6328af756b19d513","_attributes":{"q.md":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"# DON'T PANIC\n\nAlthough it has many omissions and contains much that is apocryphal, or at least wildly inaccurate, but it scores over the other answers over the internet in few important respects. First, the way it is written is very subjective, and second, it has the words DON'T PANIC inscribed in large friendly letters on its home."}}},"_answers":3},"_parentHash":"da39a3ee5e6b4b0d3255bfef95601890afd80709","_childPageContents":[{"_pageTitle":"Topology Without Tears","_hash":"4c1513c92422dc16b3c5f13bd03d34ba0feeb6df","_attributes":{"author.txt":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"Sidney A. Morris"}}},"_answers":1},{"_pageTitle":"Category Theory For Programmers","_hash":"b614f31d04b3bc2b3d23ee4337475251429e5a9f","_attributes":{"author.txt":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"Bartosz Milewski"}}},"_answers":2}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"8","_hash":"3e8d61043ed9bdb6b3cd4f197f0203bbdcb13db1","_attributes":{"a.md":{"_time":"2020-10-18T14:48:51+09:00","_attributeFile":{"_content":"I'll refer $`\\mathcal{T}`$ as $`\\mathcal{T}_X`$, $`\\mathcal{T}_1`$ as $`\\mathcal{T}_Y`$, $`\\mathcal{T}_2`$ as $`\\mathcal{T}_A`$, $`\\mathcal{T}_3`$ as $`\\mathcal{T}_B`$.\n\nLet's define $`x \\in X`$ and $`U \\in \\mathcal{T}_Y`$ such that $`f(x) \\in U`$. By definition of continuous mapping, there must exists a $`V`$ such that $`x \\in V \\in \\mathcal{T}_X`$ and $`f(x) \\in fV \\subseteq U`$.\n\nIf for any $`x \\in A`$ and any B-induced open set $`U_B \\in \\mathcal{T}_B`$, which must imply existance of $`U \\in \\mathcal{T}_Y`$, such that $`g(x) \\in U_B`$,\n\n![](IMG_44AF9D4BED6C-1.jpeg)\n\n...there exists an A-induced open set $`V_A`$, which must imply existance of $`V \\in \\mathcal{T}_A`$, such that the image $`gV_A`$ satisfies $`g(x) \\in gV_A \\subseteq U_B`$, then $`g`$ must be continuous. What we have to know is that if the image $`gV_A`$is subset of $`U_B`$, in other words, every $`x \\in V_A`$ will satisfiy $`g(x) \\in U_B`$. Let's proove it.\n\n![](IMG_E7FB922B8E70-1.jpeg)\n\n```math\n\\begin{aligned}\n & x \\in V_A \\\\\n & \\rightarrow x \\in V \\\\\n & \\rightarrow g(x) \\in gV \\\\\n & \\rightarrow g(x) \\in \\text{ some } U & \\text{ since } f \\text{ is continuous} \\\\\n & \\rightarrow g(x) \\in U \\cap B & \\text{ since codomain of } g \\text{ is } B \\\\\n & \\rightarrow g(x) \\in U_B\n\\end{aligned}\n```"}},"q.md":{"_time":"2020-04-12T01:08:01+09:00","_attributeFile":{"_content":"Let $`(X,\\mathcal{T})`$ and $`(Y,\\mathcal{T}_1)`$ be topological spaces and $`f:(X,\\mathcal{T}) \\rightarrow (Y,\\mathcal{T}_1)`$ a continuous mapping. Let $`A`$ be a subset of $`X`$, $`\\mathcal{T}_2`$ the induced topology on $`A`$, $`B = f(A)`$, $`\\mathcal{T}_3`$ the induced topology on $`B`$ and $`g:(A,\\mathcal{T}_2) \\rightarrow (B,\\mathcal{T}_3)`$ the restriction of $`f`$ to $`A`$. Prove that $`g`$ is continuous."}}},"_answers":1},"_parentHash":"2125c437aaac928d5852224ff00a83f9d9776dda","_childPageContents":[]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"Topology Without Tears","_hash":"4c1513c92422dc16b3c5f13bd03d34ba0feeb6df","_attributes":{"author.txt":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"Sidney A. Morris"}}},"_answers":1},"_parentHash":"2aed5404c83f7a46aa249e0a6328af756b19d513","_childPageContents":[{"_pageTitle":"5. Continuous Mappings","_hash":"6c11e3a31b4b8bd07bdef3f87887ab202a568679","_attributes":{},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"10. Natural Transformations","_hash":"54c6ff9a213b80284619a5afb7859d9d30a444bc","_attributes":{},"_answers":1},"_parentHash":"b614f31d04b3bc2b3d23ee4337475251429e5a9f","_childPageContents":[{"_pageTitle":"5","_hash":"ebe52014d6aaf02a4ddeaa7de59a014eac6634b8","_attributes":{"a.md":{"_time":"2020-10-18T14:48:51+09:00","_attributeFile":{"_content":"Let's proove interchange law.\n\n\n$`\\left( \\beta '\\cdot \\alpha '\\right) \\circ \\left( \\beta \\cdot \\alpha \\right) =\\left( \\beta '\\circ \\beta \\right) \\cdot \\left( \\alpha '\\circ \\alpha \\right)`$\n\n\nLet's say each natural transformation is defined as\n\n\n$`\\alpha :F\\rightarrow F_{2}`$\n$`\\alpha ':F_{2}\\rightarrow F_{3}`$\n$`\\beta :G\\rightarrow G_{2}`$\n$`\\beta ':G_{2}\\rightarrow G_{3}`$\n\n\n![](nat.JPG)\n\nLet's see what we get with first one.\n\n$`\\left( \\beta '\\cdot \\alpha '\\right) \\circ \\left( \\beta \\cdot \\alpha \\right)GF`$ \n\nUsing horizontal composition\n$`=\\left( \\beta'\\cdot \\alpha '\\right) G_{2}F_{2}`$\nAgain, using horizontal composition\n$`=G_{3}F_{3}`$\n\nNow the second one.\n\n$`\\left( \\beta '\\circ \\beta \\right) \\cdot \\left( \\alpha '\\circ \\alpha \\right)GF`$\n\nUnlike previous one, we cannot directly apply the $`(\\alpha' \\circ \\alpha)`$ to $`GF`$. No problem. We can composite horizontally with $`id:G\\rightarrow G`$\n\n$`=\\left( \\beta '\\circ \\beta\\right) \\cdot \\left( \\left( id\\cdot \\alpha '\\right) \\circ \\left( id\\cdot \\alpha \\right) \\right)GF`$\n$`=\\left( \\beta'\\circ \\beta\\right)GF_3`$\n\nSame way but this time with $`id:F\\rightarrow F`$\n\n$`=\\left( \\left( \\beta'\\cdot id\\right) \\circ \\left( \\beta \\cdot id\\right) \\right) GF_{3}`$\n$`=G_3 F_3`$\n\n\nProooven BAMMM"}},"q.md":{"_time":"2019-12-19T21:51:08+09:00","_attributeFile":{"_content":"Write a short essay about how you may enjoy writing down the evident diagrams needed to prove the interchange law.\n"}}},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"5. Continuous Mappings","_hash":"6c11e3a31b4b8bd07bdef3f87887ab202a568679","_attributes":{},"_answers":1},"_parentHash":"4c1513c92422dc16b3c5f13bd03d34ba0feeb6df","_childPageContents":[{"_pageTitle":"5.1 Continuous Mappings","_hash":"2125c437aaac928d5852224ff00a83f9d9776dda","_attributes":{},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"answers-db","_hash":"96d719cd412e4a8d03ac3d84cb0e8858f68ec008","_attributes":{},"_answers":3},"_parentHash":"da39a3ee5e6b4b0d3255bfef95601890afd80709","_childPageContents":[{"_pageTitle":"books","_hash":"2aed5404c83f7a46aa249e0a6328af756b19d513","_attributes":{"q.md":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"# DON'T PANIC\n\nAlthough it has many omissions and contains much that is apocryphal, or at least wildly inaccurate, but it scores over the other answers over the internet in few important respects. First, the way it is written is very subjective, and second, it has the words DON'T PANIC inscribed in large friendly letters on its home."}}},"_answers":3}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"24. F-Algebras","_hash":"b2a3b650e20b0d34511030969274674aaf259e55","_attributes":{},"_answers":1},"_parentHash":"b614f31d04b3bc2b3d23ee4337475251429e5a9f","_childPageContents":[{"_pageTitle":"5","_hash":"c4ad78b11338182da6d1e6b792987c7319ef55d8","_attributes":{"a.md":{"_time":"2020-01-30T14:24:00+09:00","_attributeFile":{"_content":"```haskell\nmodule Un\n ( primes\n ) where\n\nimport Data.List\n\nprimes :: [Int]\nprimes = unfoldr (\\(prime:remains) -> Just (prime, filter (notdiv prime) remains)) [2..]\n where notdiv p n = n `mod` p /= 0\n```"}},"q.md":{"_time":"2020-01-30T14:24:00+09:00","_attributeFile":{"_content":"Use `unfoldr` to generate a list of the first n primes."}}},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"Category Theory For Programmers","_hash":"b614f31d04b3bc2b3d23ee4337475251429e5a9f","_attributes":{"author.txt":{"_time":"2022-09-25T22:34:28+09:00","_attributeFile":{"_content":"Bartosz Milewski"}}},"_answers":2},"_parentHash":"2aed5404c83f7a46aa249e0a6328af756b19d513","_childPageContents":[{"_pageTitle":"10. Natural Transformations","_hash":"54c6ff9a213b80284619a5afb7859d9d30a444bc","_attributes":{},"_answers":1},{"_pageTitle":"24. F-Algebras","_hash":"b2a3b650e20b0d34511030969274674aaf259e55","_attributes":{},"_answers":1}]}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"_pageContent":{"_pageTitle":"5","_hash":"c4ad78b11338182da6d1e6b792987c7319ef55d8","_attributes":{"a.md":{"_time":"2020-01-30T14:24:00+09:00","_attributeFile":{"_content":"```haskell\nmodule Un\n ( primes\n ) where\n\nimport Data.List\n\nprimes :: [Int]\nprimes = unfoldr (\\(prime:remains) -> Just (prime, filter (notdiv prime) remains)) [2..]\n where notdiv p n = n `mod` p /= 0\n```"}},"q.md":{"_time":"2020-01-30T14:24:00+09:00","_attributeFile":{"_content":"Use `unfoldr` to generate a list of the first n primes."}}},"_answers":1},"_parentHash":"b2a3b650e20b0d34511030969274674aaf259e55","_childPageContents":[]}
Loading