- Install stack.
- Run
stack setupas a normal user. This will install GHC for you (under~/.stack). - Run
stack ghcito start ghci. Please see the rest of the page linked above on how to use stack to create and build projects.
| \documentclass[12pt,fleqn,a4paper]{article} | |
| \usepackage{mathtools} | |
| \usepackage{amssymb} | |
| \usepackage{amsthm} | |
| \usepackage{float} | |
| \usepackage{wrapfig} | |
| \usepackage[font=small]{caption} | |
| \usepackage{setspace} | |
| \usepackage{hyperref} |
| #!/usr/bin/env python | |
| # -*- mode: python, coding: utf-8 -*- | |
| # | |
| # This incredible piece of code makes git a bit Polish, a bit Western Ukrainian, | |
| # пше прошу пана | |
| # Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts | |
| # | |
| # (c) 2013 Alexander Solovyov under terms of WTFPL | |
| import sys |
| // License: MIT - https://opensource.org/licenses/MIT | |
| // Author: Michele Locati <[email protected]> | |
| // Source: https://gist.github.com/mlocati/7210513 | |
| function perc2color(perc) { | |
| var r, g, b = 0; | |
| if(perc < 50) { | |
| r = 255; | |
| g = Math.round(5.1 * perc); | |
| } | |
| else { |
| while { | |
| let x = foo(); | |
| bar(x); | |
| x != 0 | |
| } {} |
This is material to go along with a 2014 Boston Haskell talk.
We are going to look at a series of type signatures in Haskell and explore how parametricity (or lack thereof) lets us constrain what a function is allowed to do.
Let's start with a decidedly non-generic function signature. What are the possible implementations of this function which typecheck?
wrangle :: Int -> Int| %% Copyright 2020 Alexander Yakushev | |
| % | |
| % This work may be distributed and/or modified under the | |
| % conditions of the LaTeX Project Public License, either version 1.3 | |
| % of this license or (at your option) any later version. | |
| % The latest version of this license is in | |
| % http://www.latex-project.org/lppl.txt | |
| % and version 1.3 or later is part of all distributions of LaTeX | |
| % version 2005/12/01 or later. | |
| % |
Prerequisites : the letsencrypt CLI tool
This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.
You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge.
Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.
I redirect all HTTP requests on HTTPS, so my nginx config looks like :
server {
| extern crate openssl; | |
| use std::io::prelude::*; | |
| use std::path::Path; | |
| use std::net::TcpStream; | |
| use openssl::ssl::{Ssl, SslMethod, SslContext, SslStream, SSL_VERIFY_NONE}; | |
| use openssl::x509::{X509FileType}; | |
| Это логи чата, а не протокол какого-то собрания, так что просьба шуточки про JS | |
| близко к сердцу не принимать. Кроме того, речь идёт о JVM, Erlang VM, браузерах, | |
| native, поэтому слово «абстракция» следует понимать как «платформа». —Minoru | |
| Из [email protected]: | |
| <ForNeVeR> ɹǝɟılʍǝu: смотри что. У JS есть своя семантика (модель памяти, | |
| выполнения, и проч.). Прямых маппингов на машинную модель у неё нету. | |
| JS не зависит от машины. Поэтому, чтобы писать на JS, тебе нужно |