rpearce / robertwpearce.com Goto Github PK
View Code? Open in Web Editor NEW💾 My personal site; built with hakyll
Home Page: https://robertwpearce.com
License: BSD 3-Clause "New" or "Revised" License
💾 My personal site; built with hakyll
Home Page: https://robertwpearce.com
License: BSD 3-Clause "New" or "Revised" License
Will need a demo app 💯 before doing this.
"I point out to you […] a lesson learned from past over-machined societies which you appear not to have learned. The devices themselves condition the users to employ each other the way they employ machines."
— Leto II, God Emperor of Dune
I'm re-reading the Dune series for the nth time, and this time, I'm doing it with a group via the excellent Gom Jabbar podcast. There are some seriously problematic themes in God Emperor of Dune, but the quote above has stuck with me for weeks and has illuminated life for me in a way I haven't experienced in years.
This quote helped me wrap my head around ways we might inadvertantly dehumanize one another by assigning those around us rigid roles in the context of our daily lives and businesses. Like removing extra dough around a cookie cutter baking shape, we may discard from others that wealth of life and creativity that makes us human, leaving behind only the shapes we expect to see, and this limits and devalues ourselves and everyone around us.
Machines are everywhere and, depending on where you live, are involved in nearly everything we do. We give them commands, and they do something. When a part is broken, we replace that part. When they no longer suit our needs or are broken enough, we discard them. If we are exposed to this thinking every day for most of our lives, how does that affect how we treat and interact with people around us? Through force of habit, do we unintentionally treat others similarly to how we treat machines? Have we always done this, but our current technology makes this more ingrained since it is all-engrossing and demands our constant attention?
Much could be written on this subject, but let's keep this short.
The next time you find yourself eliminating someone's "role" at work and laying them off, ignoring someone bagging your groceries, growing impatient with your music teacher's stories, or disregarding someone's ideas because of their station, try to stop and remember that the person before you is a vibrant, autonomous, wonderful being that brings their entire lifetime of valuable experiences before you and exists far outside the box you and/or society might have put them in.
const mql = window.matchMedia('print')
mql.addEventListener('change', (event) => {
const detailEls = document.querySelectorAll('details')
detailEls.forEach(detailEl => {
if (event.matches) {
detailEl.open = true
} else if (detailEl.open) {
detailEl.open = false
}
})
})
... Using CSS Variables and a Little JavaScript
Helpful:
haskellPackages = pkgs.haskellPackages; # really haskell.packages.ghc7102
: https://nixos.org/nixpkgs/manual/#haskelloverrideAttrs
: https://nixos.org/nixpkgs/manual/#sec-pkg-overrideAttrsoverlays
: https://nixos.org/nixpkgs/manual/#chap-overlaysSteps:
default.nix
, shell.nix
, and release.nix
and get into its pure nix shell environmentλ mkdir hakyll-nix-example && cd $_
λ echo "(import ./release.nix { }).project" > default.nix
λ echo "(import ./release.nix { }).shell" > shell.nix
λ echo "{ }: let in { }" > release.nix
λ nix-shell --pure -p niv nix cacert
niv
and setup your nixpkgs owner, repository, and branch[nix-shell:~/projects/hakyll-nix-example]$ niv init
[nix-shell:~/projects/hakyll-nix-example]$ niv update nixpkgs -o NixOS -r nixpkgs-channels -b nixpkgs-unstable
[nix-shell:~/projects/hakyll-nix-example]$ exit
release.nix
{ compiler ? "ghc883"
, sources ? import ./nix/sources.nix
}:
let
overlay = _: pkgz: {
niv = import sources.niv { };
};
pkgs = import sources.nixpkgs {
config = {
packageOverrides = pkgz: rec {
haskell = pkgz.haskell // {
packages = pkgz.haskell.packages // {
${compiler} = pkgz.haskell.packages.${compiler}.override {
overrides = hpNew: hpOld: rec {
hakyll = hpOld.hakyll.overrideAttrs(oldAttrs: {
configureFlags = "-f watchServer -f previewServer";
patches = [ ./hakyll.patch ];
});
project = hpNew.callCabal2nix "robertwpearce-com" ./. { };
};
};
};
};
};
};
overlays = [ overlay ];
};
haskellPackages = pkgs.haskell.packages.${compiler};
in
{
project = haskellPackages.project;
shell = haskellPackages.shellFor {
packages = p: with p; [
haskellPackages.project
];
buildInputs = with haskellPackages; [
ghcid
hlint
niv
#ormolu
pkgs.cacert
pkgs.nix
];
withHoogle = true;
};
}
hakyll.patch
diff filediff --git a/hakyll.cabal b/hakyll.cabal
index fcded8d..9746f20 100644
--- a/hakyll.cabal
+++ b/hakyll.cabal
@@ -199,7 +199,7 @@ Library
If flag(previewServer)
Build-depends:
wai >= 3.2 && < 3.3,
- warp >= 3.2 && < 3.3,
+ warp,
wai-app-static >= 3.1 && < 3.2,
http-types >= 0.9 && < 0.13,
fsnotify >= 0.2 && < 0.4
λ nix-shell --pure -p haskellPackages.hakyll --run "hakyll-init ."
--show-trace
just in case something goes wrongλ nix-build --show-trace
λ ./result/bin/site watch
Helpful:
Line 76 in 655e73d
This might be the wrong place to report this bug?
I wanted to use your hakyll+nix blog builder in my configuration.nix
I spent fruitless hours debugging, and finally discovered that I had to manually add /dist/
as shown here:
https://github.com/shapr/surtr/blob/main/surtr.nix#L71
Would you be open to a pull request changing the output directory to $out
?
https://jaspervdj.be/hakyll/tutorials/using-clay-with-hakyll.html
Write post after doing this (issue #35)
Hogan, for all its greatness and simplicity, is way too complex for something this simple.
Instead, consider using functions and template strings to accomplish the same thing. I bet it'll be 50x simpler.
Hey, I love your blog setup. May I reuse your code? I'd be happy to attribute.
Resources
Updated content:
WebMention
s https://christine.website/blog/webmention-support-2020-12-02Maybe also don't load them if it takes longer than X? Or certain level of slow speed detected?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.