wip
This commit is contained in:
parent
c9965904a0
commit
5be92b888d
14
build.sh
14
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]"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -n "* Clean site cache"
|
||||
rm -rf _site
|
||||
rm -rf _cache
|
||||
|
||||
./build.sh
|
||||
echo " [done]"
|
|
@ -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]"
|
||||
|
|
|
@ -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]"
|
||||
|
|
2
mkrss.sh
2
mkrss.sh
|
@ -122,4 +122,4 @@ END
|
|||
} > "$rssfile"
|
||||
|
||||
rm -rf $tmpdir
|
||||
echo "RSS Generated"
|
||||
echo "* RSS [done]"
|
||||
|
|
12
pre-deploy.sh
Executable file
12
pre-deploy.sh
Executable file
|
@ -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
|
|
@ -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 {
|
||||
|
|
|
@ -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!"
|
|
@ -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,6 +215,14 @@ If you chose Stack: https://haskellstack.org
|
|||
-}
|
||||
#+END_EXAMPLE
|
||||
|
||||
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
|
||||
|
@ -217,13 +230,18 @@ If you chose Stack: https://haskellstack.org
|
|||
|
||||
#+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\"")
|
||||
(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:<a href="$1" target="_blank">$1 ⤓</a>@@
|
||||
#+MACRO: lnk @@html:<a href="$1" style="float:right" target="_blank">$1 ⤓</a>@@
|
||||
|
||||
** Don't be afraid
|
||||
:PROPERTIES:
|
||||
|
@ -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?"
|
||||
|
|
4
src/posts/0010-Haskell-Now/name.hs
Executable file → Normal file
4
src/posts/0010-Haskell-Now/name.hs
Executable file → Normal file
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue