diff --git a/build.sh b/build.sh index c56722e..25b137c 100755 --- a/build.sh +++ b/build.sh @@ -1,16 +1,8 @@ #!/usr/bin/env bash +echo "* org-publish" emacs \ --load project.el \ - --eval "(progn (org-publish \"blog\" t) (evil-quit))" + --eval "(progn (org-publish \"blog\") (evil-quit))" -echo "Optim HTML size" -./optim-html.sh -echo "Gen themes clones" -./dup-for-themes.sh -echo "Building RSS" -./mkrss.sh -echo "Optim Classes accross CSS/HTML" -./optim-classes.sh -echo "Update file size" -./update-file-size.sh +echo "* org-publish [done]" diff --git a/fullbuild.sh b/clean.sh similarity index 52% rename from fullbuild.sh rename to clean.sh index 250a3ba..eafd828 100755 --- a/fullbuild.sh +++ b/clean.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash +echo -n "* Clean site cache" rm -rf _site rm -rf _cache - -./build.sh +echo " [done]" diff --git a/deploy.sh b/deploy.sh index 2c51ba9..5dc90e8 100755 --- a/deploy.sh +++ b/deploy.sh @@ -3,8 +3,7 @@ rootdir=${0:h} echo $rootdir -echo "Full Build" -./fullbuild.sh -echo -n "Publishing" +./clean.sh +./build.sh +./pre-deploy.sh ./sync.sh -echo " [done]" diff --git a/dup-for-themes.sh b/dup-for-themes.sh index 9873172..5df31a7 100755 --- a/dup-for-themes.sh +++ b/dup-for-themes.sh @@ -20,6 +20,7 @@ trans(){ cat $fic | perl -p -e 's#href="?/css/mk.css"?#href=/css/'$suff'.css#;s#(/?(index|archive|slides|about-me)).html#$1-'$suff'.html#g;s#(posts/[a-zA-Z0-9_-]*).html#$1-'$suff'.html#g;s#-'$suff'.html>mk#.html>mk#g' > ${fic:r}-${suff}.html } +print -- "Duplicate HTML by themes" for fic in $filelist; do if echo $fic|egrep -- '-(mk|min|sci|modern).html$'>/dev/null; then continue @@ -30,3 +31,4 @@ for fic in $filelist; do done print "[OK]" done +print "Duplicate HTML by theme [done]" diff --git a/mkrss.sh b/mkrss.sh index 865b17c..8c4149f 100755 --- a/mkrss.sh +++ b/mkrss.sh @@ -122,4 +122,4 @@ END } > "$rssfile" rm -rf $tmpdir -echo "RSS Generated" +echo "* RSS [done]" diff --git a/pre-deploy.sh b/pre-deploy.sh new file mode 100755 index 0000000..65945f1 --- /dev/null +++ b/pre-deploy.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +echo "Optim HTML size" +./optim-html.sh +echo "Gen themes clones" +./dup-for-themes.sh +echo "Building RSS" +./mkrss.sh +echo "Optim Classes accross CSS/HTML" +./optim-classes.sh +echo "Update file size" +./update-file-size.sh diff --git a/src/css/mk.css b/src/css/mk.css index 4f77700..3869f3b 100644 --- a/src/css/mk.css +++ b/src/css/mk.css @@ -334,10 +334,9 @@ body,.main { color: var(--fg); min-height: 100vh; } -::selection, .main ::selection, -::-moz-selection, .main ::-moz-selection { +::selection, .main ::selection { color: white; - background: var(--b); + background: var(--v); } a, a:visited, .main a, .main a:visited { diff --git a/src/posts/0010-Haskell-Now/hello.hs b/src/posts/0010-Haskell-Now/hello.hs deleted file mode 100755 index cfed90d..0000000 --- a/src/posts/0010-Haskell-Now/hello.hs +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i runghc -#! nix-shell -p "ghc.withPackages (ps: [ ps.protolude ])" -#! nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" -main = putStrLn "Hello World!" diff --git a/src/posts/0010-Haskell-Now/index.org b/src/posts/0010-Haskell-Now/index.org index 2075966..1505acc 100644 --- a/src/posts/0010-Haskell-Now/index.org +++ b/src/posts/0010-Haskell-Now/index.org @@ -50,13 +50,17 @@ But a few things have changed in the Haskell world. But you must understand that there is not really any central mindset within Haskeller unlike I can find in some other programming language communities. -4. Haskell has become a lot more serious programming language now. - There are a lot more big projects written in Haskell not just toy projects. +4. I think that Haskell is now perceived as a lot more serious programming + language now. + There are a lot more big projects written in Haskell not just toy + projects. + Thus Haskell as proved that it can be considered to write succesful + complex entreprise projects. -Also I myself have certainly matured on my take on Haskell. -I am paid to work in Clojure since 2013 now, and most of my personal side -project are written either in Haskell or in Purescript (an Haskell inspired -language mostly focused on frontend development). +While the ecosystem evolved I believe that I myself have certainly matured. +Since 2013 I am paid to develop in Clojure. +Most of my personal side project are written in Haskell or in an +Haskell-inspired language. As such I can follow two functional programming communities growth and evolution. @@ -64,16 +68,17 @@ I am kind of confident that my Haskell understanding is a lot better than before. But I still think, the ability to learn new Haskell subject is infinite. -I want someday to write an article about my team philosophy about how we -program. -Mostly, our rule is to use as few features of a programming language as +One article I would like to write someday is about my current team +philosophy about programming. +Our main rule is to use as few features of a programming language as possible to achieve your goal. This is a kind of merge between minimalism and pragmatism that in the end provide a tremendous amount of benefits. -This is why, even if I like to try the latest trend/hype in Haskell. -I generally program without those latest nice features because, with just a -very few amount of Haskell features you will already be in enviromnent with -a *lot* of benefits as compared to other programming languages ecosystem. +This is why, even if I like to play with the latest Haskell trendy feature, +I generally program without those. +With just a very few amount of Haskell features you will already be in +enviromnent with a *lot* of benefits as compared to many programming +languages. So enough talk, here is my old article new again, with just a few changes and cleanup. @@ -84,11 +89,16 @@ Be it a simple command line tool or a web application. If you are going toward GUI programming, this is a whole subject on its own and I do not really mention it. -My .02 for "Single Page Application" is to use Purescript with the halogen -framework. +My .02 for "Single Page Application" choice is to use Purescript with the +halogen framework. Purescript is really awesome as well as halogen. #+end_quote +* Introduction +:PROPERTIES: +:CUSTOM_ID: introduction +:END: + I really believe that every developer should learn Haskell. I don't think every dev needs to be a super Haskell ninja, but they should at least discover what Haskell has to offer. @@ -155,10 +165,6 @@ The article contains five parts: - More on infinite tree; a more math oriented discussion about infinite trees -* Introduction -:PROPERTIES: -:CUSTOM_ID: introduction -:END: ** Install :PROPERTIES: @@ -185,7 +191,6 @@ The environment in which you will learn Haskell will be quite different from an environment to use Haskell seriously for a new project. This is because, there are too much choices for that. - Mainly, you can start by writing your code in a file and executing it by putting one of the following at the top of your file: @@ -210,20 +215,33 @@ If you chose Stack: https://haskellstack.org -} #+END_EXAMPLE -*** code :noexport: +In this article most code block can be downloaded, it will have the =nix= +shebang. + +So the first time you'll launch this script it will download all +dependencies for you and will start its execution. + +The next time it should start a lot faster. + +*** code :noexport: :PROPERTIES: :CUSTOM_ID: code :END: #+begin_src elisp :eval yes -(defun nixb () - "#! /usr/bin/env nix-shell\n#! nix-shell -i runghc\n#! nix-shell -p \"ghc.withPackages (ps: [ ps.protolude ])\"\n#! nix-shell -I nixpkgs=\"https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz\"") + (defun nixb () + (mapconcat 'identity + '("#! /usr/bin/env nix-shell" + "#! nix-shell -i runghc" + "#! nix-shell -p \"ghc.withPackages (ps: [ ps.protolude ])\"" + "#! nix-shell -I nixpkgs=\"https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz\"") + "\n")) #+end_src #+RESULTS: : nixb -#+MACRO: lnk @@html:$1 ⤓@@ +#+MACRO: lnk @@html:$1 ⤓@@ ** Don't be afraid :PROPERTIES: @@ -241,7 +259,7 @@ to the mandatory "Hello World". {{{lnk(hello.hs)}}} #+BEGIN_SRC haskell :tangle hello.hs :shebang '(nixb) -main = putStrLn "Hello World!" + main = putStrLn "Hello World!" #+END_SRC #+BEGIN_EXAMPLE @@ -259,7 +277,7 @@ Hello World! Now, a program asking your name and replying "Hello" using the name you entered: -#+NAME: name.hs +{{{lnk(name.hs)}}} #+BEGIN_SRC haskell :tangle name.hs :shebang '(nixb) main = do print "What is your name?" diff --git a/src/posts/0010-Haskell-Now/name.hs b/src/posts/0010-Haskell-Now/name.hs old mode 100755 new mode 100644 index 8a43380..ad7e89b --- a/src/posts/0010-Haskell-Now/name.hs +++ b/src/posts/0010-Haskell-Now/name.hs @@ -1,7 +1,3 @@ -#! /usr/bin/env nix-shell -#! nix-shell -i runghc -#! nix-shell -p "ghc.withPackages (ps: [ ps.protolude ])" -#! nix-shell -I nixpkgs="https://github.com/NixOS/nixpkgs/archive/19.09.tar.gz" main = do print "What is your name?" name <- getLine diff --git a/sync.sh b/sync.sh index 5e98c94..0e8b0ae 100755 --- a/sync.sh +++ b/sync.sh @@ -3,4 +3,6 @@ rootdir=${0:h} echo $rootdir +echo -n "Uploading website" rsync --progress --partial -avHe ssh $rootdir/_site/ root@esy.fun:/var/www/her.esy.fun/ --delete +echo " [done]"