放送で紹介する用。書きかけです。
ちょっと伸びたのでさらに追記。これは元々自分の勉強がてら書いていたもので、これを書く過程でどうしても自分の理解では説明できないところがあり koba789 に依頼してペアプロをしてもらった、という流れがあります。その結果が次の動画です。
生放送の流れを円滑にするために資料を公開しましたが、この記事は未完成で、あとでさらに整理して別途記事にまとめるつもりです
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
放送で紹介する用。書きかけです。
ちょっと伸びたのでさらに追記。これは元々自分の勉強がてら書いていたもので、これを書く過程でどうしても自分の理解では説明できないところがあり koba789 に依頼してペアプロをしてもらった、という流れがあります。その結果が次の動画です。
生放送の流れを円滑にするために資料を公開しましたが、この記事は未完成で、あとでさらに整理して別途記事にまとめるつもりです
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.let pkgs = import (fetchTarball path) {}; | |
path = https://github.com/NixOS/nixpkgs/archive/master.tar.gz; | |
in with pkgs; | |
mkShell { | |
buildInputs = [ | |
haskell.compiler.ghc901 | |
]; | |
} |
export enum HttpStatusCodes100 { | |
CONTINUE = 100, | |
SWITCHING_PROTOCOLS = 101, | |
PROCESSING = 102, | |
EARLY_HINTS = 103, | |
} | |
export enum HttpStatusCodes200 { | |
OK = 200, | |
CREATED = 201, |
module Main where | |
import Prelude | |
import Control.Monad.Reader (Reader, runReader, ReaderT(..), runReaderT, ask, class MonadAsk) | |
import Effect (Effect) | |
import Effect.Class (class MonadEffect, liftEffect) | |
import Effect.Console (log) | |
--------------------------------------------------------- |
{-# LANGUAGE RankNTypes #-} | |
module RankN where | |
-- Rank 0: | |
-- add1 is momomorphic | |
add1 :: Int -> Int | |
add1 x = x + 1 | |
-- Rank 1 |
関連: RFC 2394
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh
file and put it into a directory where you want the files to be saved.cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.