Compare commits

...

10 commits

Author SHA1 Message Date
Sanchayan Maity 73e2800295
Add link to keyoxide profile 2022-12-17 11:37:38 +05:30
Sanchayan Maity f195dd0cad
Update about me 2022-12-17 08:56:59 +05:30
Sanchayan Maity 77317d3369 Update Mastodon link 2022-11-23 09:56:35 +05:30
Sanchayan Maity 4fb75c9009 Fix Mastodon profile verification
Fixes commit f3655c2.
2022-11-20 10:26:27 +05:30
Sanchayan Maity 8f2e20b3d3 cabal.project: Add a cabal project file to pin compiler used
This allows us to specify something else in .cabal/config.
2022-11-19 14:51:53 +05:30
Sanchayan Maity 61f35bbb3a site.hs: Format with default LSP formatter 2022-11-19 14:33:51 +05:30
Sanchayan Maity 2490265685 Minor clean up for build depends 2022-11-19 14:17:49 +05:30
Sanchayan Maity 710955ed42 site.hs: Clean up redundant bracket 2022-11-19 14:16:44 +05:30
Sanchayan Maity 990c576703 Drop stack
We use cabal now.
2022-11-19 14:09:36 +05:30
Sanchayan Maity d643e7df12 Drop google analytics
Don't be evil :).
2022-11-19 13:08:31 +05:30
6 changed files with 154 additions and 170 deletions

View file

@ -31,3 +31,64 @@ man as a heroic being, with his own happiness as the moral purpose of his life,
with productive achievement as his noblest activity, and reason as his only with productive achievement as his noblest activity, and reason as his only
absolute.” absolute.”
—Ayn Rand.</p> —Ayn Rand.</p>
# Open source contributions
- [GStreamer](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [gst-plugins-rs](https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [Linux](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=author&q=Sanchayan+Maity)
- [u-boot](https://source.denx.de/u-boot/u-boot/-/commits/master?search=Sanchayan%20Maity)
- [PipeWire](https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
- [PulseAudio](https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests?scope=all&state=all&author_username=SanchayanMaity)
# Talks
- [Free Monads](https://www.youtube.com/watch?v=fhu1UQel5eo)
- [Lens](https://www.youtube.com/watch?v=0sAvCCAz8DQ)
- [What's next for Bluetooth in PulseAudio?](https://www.youtube.com/watch?v=aU8Hjt2h6GQ)
- [Using Rust and GStreamer for building multimedia pipelines](https://hasgeek.com/rustlang/rustlang-mini-conference/schedule/using-rust-for-building-multimedia-pipelines-using-gstreamer-UfW59v9esDeZut5mXUVXhy)
# Blog
- [sanchayanmaity.net](https://sanchayanmaity.net)
- [sanchayanmaity.com](https://sanchayanmaity.com)
# Tools
- **desktop**: sway
- **CLI**: neovim, tmux, foot, fzf, rg
- **shell**: fish
- **browser**: qutebrowser
- ❤️ **Languages**: C, Rust, Haskell
- 💔 **Languages**: Python, JavaScript, Typescript
# dotfiles
- [https://git.sr.ht/~sanchayanmaity/dotfiles](https://git.sr.ht/~sanchayanmaity/dotfiles)
- [https://codeberg.org/sanchayanmaity/dotfiles](https://codeberg.org/sanchayanmaity/dotfiles)
# Give up GitHub
- [SourceHut](https://git.sr.ht/~sanchayanmaity)
- [CodeBerg](https://codeberg.org/sanchayanmaity)
- [GitLab](https://gitlab.freedesktop.org/SanchayanMaity)
## Keys
Public key used for signing:
```bash
41B3 422B 0370 3BF5 FD03 FAFB 6F6A 0609 C120 38F3
```
Also available as DNS TXT record.
```bash
dig TXT openpgp.sanchayanmaity.net +short | sed 's/"//g'
```
Also available via Web Key Directory at https://keys.openpgp.org/.
```bash
gpg --locate-keys --auto-key-locate clear,nodefault,wkd sanchayanmaity.net
```

2
cabal.project Normal file
View file

@ -0,0 +1,2 @@
packages: .
with-compiler: ghc-8.10

View file

@ -5,7 +5,7 @@ cabal-version: >= 1.10
executable site executable site
main-is: site.hs main-is: site.hs
build-depends: base == 4.* build-depends: base >= 4.12
, hakyll == 4.15.* , hakyll == 4.15.*
ghc-options: -threaded ghc-options: -threaded
default-language: Haskell2010 default-language: Haskell2010

170
site.hs
View file

@ -1,116 +1,122 @@
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE OverloadedStrings #-}
import Data.Monoid (mappend)
import Hakyll import Data.Monoid (mappend)
import qualified GHC.IO.Encoding as E import qualified GHC.IO.Encoding as E
import Hakyll
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
main :: IO () main :: IO ()
main = do main = do
E.setLocaleEncoding E.utf8 E.setLocaleEncoding E.utf8
hakyllWith config $ do hakyllWith config $ do
match "images/*" $ do match "images/*" $ do
route idRoute route idRoute
compile copyFileCompiler compile copyFileCompiler
match "css/*" $ compile compressCssCompiler match "css/*" $ compile compressCssCompiler
create ["style.css"] $ do create ["style.css"] $ do
route idRoute route idRoute
compile $ do compile $ do
csses <- loadAll "css/*.css" csses <- loadAll "css/*.css"
makeItem $ unlines $ map itemBody csses makeItem $ unlines $ map itemBody csses
match (fromList ["about.markdown"]) $ do match (fromList ["about.markdown"]) $ do
route $ setExtension "html" route $ setExtension "html"
compile $ pandocCompiler compile $
>>= loadAndApplyTemplate "templates/default.html" defaultContext pandocCompiler
>>= relativizeUrls >>= loadAndApplyTemplate "templates/default.html" defaultContext
>>= relativizeUrls
tags <- buildTags "posts/*" (fromCapture "tags/*.html") tags <- buildTags "posts/*" (fromCapture "tags/*.html")
match "posts/*" $ do match "posts/*" $ do
route $ setExtension "html" route $ setExtension "html"
compile $ pandocCompiler compile $
>>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags) pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags) >>= loadAndApplyTemplate "templates/post.html" (postCtxWithTags tags)
>>= relativizeUrls >>= loadAndApplyTemplate "templates/default.html" (postCtxWithTags tags)
>>= relativizeUrls
create ["archive.html"] $ do create ["archive.html"] $ do
route idRoute route idRoute
compile $ do compile $ do
posts <- recentFirst =<< loadAll "posts/*" posts <- recentFirst =<< loadAll "posts/*"
let archiveCtx = let archiveCtx =
listField "posts" (postCtxWithTags tags) (return posts) `mappend` listField "posts" (postCtxWithTags tags) (return posts)
constField "title" "Archives" `mappend` `mappend` constField "title" "Archives"
defaultContext `mappend` defaultContext
makeItem "" makeItem ""
>>= loadAndApplyTemplate "templates/archive.html" archiveCtx >>= loadAndApplyTemplate "templates/archive.html" archiveCtx
>>= loadAndApplyTemplate "templates/default.html" archiveCtx >>= loadAndApplyTemplate "templates/default.html" archiveCtx
>>= relativizeUrls >>= relativizeUrls
match "index.html" $ do match "index.html" $ do
route idRoute route idRoute
compile $ do compile $ do
posts <- fmap (take 3) . recentFirst =<< loadAll "posts/*" posts <- fmap (take 3) . recentFirst =<< loadAll "posts/*"
let indexCtx = let indexCtx =
listField "posts" (postCtxWithTags tags) (return posts) `mappend` listField "posts" (postCtxWithTags tags) (return posts)
field "tags" (\_ -> renderTagList tags) `mappend` `mappend` field "tags" (\_ -> renderTagList tags)
constField "title" "Welcome" `mappend` `mappend` constField "title" "Welcome"
defaultContext `mappend` defaultContext
getResourceBody getResourceBody
>>= applyAsTemplate indexCtx >>= applyAsTemplate indexCtx
>>= loadAndApplyTemplate "templates/default.html" indexCtx >>= loadAndApplyTemplate "templates/default.html" indexCtx
>>= relativizeUrls >>= relativizeUrls
create ["sitemap.xml"] $ do create ["sitemap.xml"] $ do
route idRoute route idRoute
compile $ do compile $ do
posts <- recentFirst =<< loadAll "posts/*" posts <- recentFirst =<< loadAll "posts/*"
let sitemapCtx = let sitemapCtx =
constField "baseUrl" "sanchayanmaity.net" `mappend` constField "baseUrl" "sanchayanmaity.net"
constField "title" "Sitemap" `mappend` `mappend` constField "title" "Sitemap"
listField "posts" (postCtxWithTags tags) (return posts) `mappend` `mappend` listField "posts" (postCtxWithTags tags) (return posts)
(postCtxWithTags tags) `mappend` postCtxWithTags tags
makeItem "" makeItem ""
>>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx >>= loadAndApplyTemplate "templates/sitemap.xml" sitemapCtx
>>= cleanIndexHtmls >>= cleanIndexHtmls
match "templates/*" $ compile templateBodyCompiler match "templates/*" $ compile templateBodyCompiler
tagsRules tags $ \tag pattern -> do tagsRules tags $ \tag pattern -> do
let title = "Posts tagged \"" ++ tag ++ "\"" let title = "Posts tagged \"" ++ tag ++ "\""
route idRoute route idRoute
compile $ do compile $ do
posts <- recentFirst =<< loadAll pattern posts <- recentFirst =<< loadAll pattern
let ctx = constField "title" title let ctx =
`mappend` listField "posts" (postCtxWithTags tags) (return posts) constField "title" title
`mappend` defaultContext `mappend` listField "posts" (postCtxWithTags tags) (return posts)
`mappend` defaultContext
makeItem "" makeItem ""
>>= loadAndApplyTemplate "templates/tag.html" ctx >>= loadAndApplyTemplate "templates/tag.html" ctx
>>= loadAndApplyTemplate "templates/default.html" ctx >>= loadAndApplyTemplate "templates/default.html" ctx
>>= relativizeUrls >>= relativizeUrls
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
config :: Configuration config :: Configuration
config = defaultConfiguration { config =
destinationDirectory = "public" defaultConfiguration
} { destinationDirectory = "public"
}
postCtx :: Context String postCtx :: Context String
postCtx = postCtx =
dateField "date" "%B %e, %Y" `mappend` dateField "date" "%B %e, %Y"
defaultContext `mappend` defaultContext
postCtxWithTags :: Tags -> Context String postCtxWithTags :: Tags -> Context String
postCtxWithTags tags = tagsField "tags" tags `mappend` postCtx postCtxWithTags tags = tagsField "tags" tags `mappend` postCtx
cleanIndexHtmls :: Item String -> Compiler (Item String) cleanIndexHtmls :: Item String -> Compiler (Item String)
cleanIndexHtmls = return . fmap (replaceAll pattern replacement) cleanIndexHtmls = return . fmap (replaceAll pattern replacement)
where where
pattern = "/index.html" pattern = "/index.html"
replacement :: String -> String replacement :: String -> String
replacement = const "/" replacement = const "/"

View file

@ -1,74 +0,0 @@
# This file was automatically generated by 'stack init'
#
# Some commonly used options have been documented as comments in this file.
# For advanced use and comprehensive documentation of the format, please see:
# http://docs.haskellstack.org/en/stable/yaml_configuration/
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
# A snapshot resolver dictates the compiler version and the set of packages
# to be used for project dependencies. For example:
#
# resolver: lts-3.5
# resolver: nightly-2015-09-21
# resolver: ghc-7.10.2
# resolver: ghcjs-0.1.0_ghc-7.10.2
# resolver:
# name: custom-snapshot
# location: "./custom-snapshot.yaml"
resolver: lts-17.5
# User packages to be built.
# Various formats can be used as shown in the example below.
#
# packages:
# - some-directory
# - https://example.com/foo/bar/baz-0.0.2.tar.gz
# - location:
# git: https://github.com/commercialhaskell/stack.git
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# - location: https://github.com/commercialhaskell/stack/commit/e7b331f14bcffb8367cd58fbfc8b40ec7642100a
# extra-dep: true
# subdirs:
# - auto-update
# - wai
#
# A package marked 'extra-dep: true' will only be built if demanded by a
# non-dependency (i.e. a user package), and its test suites and benchmarks
# will not be run. This is useful for tweaking upstream packages.
packages:
- '.'
# Dependency packages to be pulled from upstream that are not in the resolver
# (e.g., acme-missiles-0.3)
extra-deps:
- ipynb-0.1.0.1
- lrucache-1.2.0.1
- pandoc-2.11.4
- citeproc-0.3.0.8
- skylighting-0.10.4
- skylighting-core-0.10.4
- texmath-0.12.1.1
- hakyll-4.15.1.0
# Override default flag values for local packages and extra-deps
flags: {}
# Extra package databases containing global packages
extra-package-dbs: []
# Control whether we use the GHC we find on the path
# system-ghc: true
#
# Require a specific version of stack, using version ranges
# require-stack-version: -any # Default
# require-stack-version: ">=1.3"
#
# Override the architecture used by stack, especially useful on Windows
# arch: i386
# arch: x86_64
#
# Extra directories used by stack for building
# extra-include-dirs: [/path/to/dir]
# extra-lib-dirs: [/path/to/dir]
#
# Allow a newer minor version of GHC than the snapshot specifies
# compiler-check: newer-minor

View file

@ -1,17 +1,6 @@
<!doctype html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-60143780-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
@ -19,7 +8,6 @@
<title>Coherent Musings - $title$</title> <title>Coherent Musings - $title$</title>
<link rel="stylesheet" type="text/css" href="/style.css" /> <link rel="stylesheet" type="text/css" href="/style.css" />
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.5.0/css/all.css' /> <link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.5.0/css/all.css' />
<link rel="me" href="https://linuxrocks.online/@sanchayan"/>
</head> </head>
<body> <body>
<header> <header>
@ -41,9 +29,10 @@
<ul> <ul>
<li><a class='fab fa-github' href='https://github.com/sanchayanmaity'></a></li> <li><a class='fab fa-github' href='https://github.com/sanchayanmaity'></a></li>
<li><a class='fab fa-gitlab' href='https://gitlab.freedesktop.org/SanchayanMaity'></a></li> <li><a class='fab fa-gitlab' href='https://gitlab.freedesktop.org/SanchayanMaity'></a></li>
<li><a class='fab fa-mastodon' href='https://linuxrocks.online/@sanchayan'></a></li> <li><a rel="me" class='fab fa-mastodon' href='https://functional.cafe/@sanchayan'></a></li>
<li><a class='fab fa-lastfm-square' href='https://www.last.fm/user/sanchayan_maity'></a></li> <li><a class='fab fa-lastfm-square' href='https://www.last.fm/user/sanchayan_maity'></a></li>
<li><a class='fab fa-linkedin' href='https://in.linkedin.com/in/sanchayan-maity-57235953'></a></li> <li><a class='fab fa-linkedin' href='https://in.linkedin.com/in/sanchayan-maity-57235953'></a></li>
<li><a class='fas fa-fingerprint' href='https://keyoxide.org/41B3422B03703BF5FD03FAFB6F6A0609C12038F3'></a></li>
</ul> </ul>
<div> <div>
Site proudly generated by Site proudly generated by