Skip to content

Instantly share code, notes, and snippets.

View kakkun61's full-sized avatar
🚂
Choo-choo

Kazuki Okamoto kakkun61

🚂
Choo-choo
View GitHub Profile
@kakkun61
kakkun61 / README.md
Created November 16, 2021 10:24
Windows セットアップ メモ

エクスプローラー

「最近使ったファイルをクイックアクセスに表示する」「よく使うフォルダーをクイックアクセスに表示する」を無効にする。

image

Chocolatey

https://chocolatey.org/

AVR with V language

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 2
indent_style = space
{- cabal:
build-depends: base, comonad
ghc-options: -Wall
-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NamedFieldPuns #-}
import Control.Comonad (Comonad (extract, extend))
namespace Wintellect.Interop.Sound
{
using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
sealed class Sound
{
public static void MessageBeep(BeepTypes type)
{
import Control.Monad (guard, replicateM)
import Data.List (foldl')
main :: IO ()
main = do
print $ head $ do
[a, b, c, d, e, g, h, j] <- replicateM 8 [0 .. 9]
[f, i] <- replicateM 2 [1 .. 9]
guard $ h * h `mod` 10 == h
guard $ dec [f, d, c, a, j, h] * dec [i, b, c, f, e, h] == dec [f, b, a, e, c, i, i, j, e, g, i, h]
@kakkun61
kakkun61 / Dockerfile
Created September 29, 2020 16:34
GHC 9.0.1 Alpha 1 on Windows
# escape=`
FROM mcr.microsoft.com/windows:2004
RUN curl -O https://www.7-zip.org/a/7z1900-x64.exe
RUN 7z1900-x64.exe /S /D=C:\7zip\
RUN curl -O https://downloads.haskell.org/ghc/9.0.1-alpha1/ghc-9.0.0.20200925-x86_64-unknown-mingw32.tar.xz
RUN 7zip\7z x ghc-9.0.0.20200925-x86_64-unknown-mingw32.tar.xz
RUN 7zip\7z x ghc-9.0.0.20200925-x86_64-unknown-mingw32.tar
$ 1 0.000005 7.010541234668786 51 5 43
a -384 128 -304 128 8 15 -15 1000000 -2.1615219297999033 2.2232274830737646 100000
r -384 112 -512 112 0 20000
r -304 80 -304 256 0 100000
r -304 256 -304 384 0 100000
w -304 128 -240 128 0
r -240 128 -240 192 0 40000
r -240 192 -144 192 0 40000
a -240 256 -144 256 8 15 -15 1000000 0.0002192264858535964 0 100000
w -240 192 -240 240 0
@kakkun61
kakkun61 / 10.md
Last active August 8, 2020 09:27
Haskell 2010 Language Report

10.3 Layout

Section 2.7 gives an informal discussion of the layout rule. This section defines it more precisely.

The meaning of a Haskell program may depend on its layout. The effect of layout on its meaning can be completely described by adding braces and semicolons in places determined by the layout. The meaning of this augmented program is now layout insensitive.

The effect of layout is specified in this section by describing how to add braces and semicolons to a laid-out program. The specification takes the form of a function L that performs the translation. The input to L is:

レイアウトの効果はこのセクションに記載されたどのように波括弧とセミコロンをプログラムに挿入することで仕様とされる。仕様は関数 L の形をとる。L はその変形をする。L への入力は:

@kakkun61
kakkun61 / settings.json
Created July 26, 2020 14:34
Windows Terminal
// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",