% Markdown + Pandoc + Shower = XD % @smly % 2013-03-13
Shower のスライドを Markdown で作る話
- まとめ
レンズは余状態余モナドの余代数だった | |
=================================== | |
余余余〜!別名`関数的参照`とも呼ばれる[レンズ](https://hackage.haskell.org/package/lens)はJavaのGetter, Setterと同等と[言われる](https://twitter.com/plt_borat/status/228009057670291456)関数型プログラミングのデザインパターンの一つです。 | |
レンズは余状態余モナドの余代数だと[聞いて](https://twitter.com/hiratara/status/317602743219003392)そうなのかーと思ってたのですが、ふと自分で実装してみたくなったので **余状態余モナドの余代数** として実装してみることにしました。 | |
ちなみにこの文章は`literate Haskell`という形式で書かれているのでダウンロードしてghciでロードすればすぐにでも自分で試すことができます。 | |
まず最初におまじない | |
> {-# LANGUAGE RankNTypes #-} |
> perl -E 'say "生" & "死"' | |
愛 | |
生 Life U+751F \xe7\x94\x9f 11100111 10010100 10011111 | |
死 Death U+6B7B \xe6\xad\xbb 11100110 10101101 10111011 | |
愛 Love u+611B \xe6\x84\x9b 11100110 10000100 10011011 |
# | |
# | |
# | |
# | |
- ー 1 | |
a あ 1 | |
i い | |
u う 1 |
Max Goldstein | July 30, 2015 | Elm 0.15.1
In Elm, signals always have a data source associated with them. Window.dimensions
is exactly what you think it is, and you can't send your own events on it. You can derive your own signals from these primitives using map
, filter
, and merge
, but the timing of events is beyond your control.
This becomes a problem when you try to add UI elements. We want to be able to add checkboxes and dropdown menus, and to receive the current state of these elements as a signal. So how do we do that?
この記事は、Clojure Adven Calendar 2013 12/07日の記事です。
今日は、leiningen (github) を使って、自分の独自のプロジェクトのテンプレート(いわゆるオレオレテンプレート)を作る話をします (leiningen のテンプレート作成に関するドキュメント(ここ ) を見れば終わり、という話もありますが、自習メモの意味でもまとめておきたいと思います)。
In an effort to gain at least a superficial understanding of the technical implementation of cryptocurrencies, I recently worked my way through "Learn Blockchains by Building One" using Clojure.
This was a good chance to experiment with using spec in new ways. At work, we primarily use spec to validate our global re-frame state and to validate data at system boundaries. For this project, I experimented with using instrumentation much more pervasively than I had done elsewhere.
This is not a guide to spec (there are already many excellent resources for this). Rather, it's an experience report exploring what went well, what is still missing, and quite a few unanswered questions for future research. If you have solutions for any of the problems I've presented, please let me know!
You don't need to know or care about blockchains to understand the code be
(ns scrape | |
(:require [babashka.pods :as pods] | |
[clojure.walk :as walk])) | |
(pods/load-pod "bootleg") ;; installed on path, use "./bootleg" for local binary | |
(require '[babashka.curl :as curl]) | |
(def clojure-html (:body (curl/get "https://en.wikipedia.org/wiki/Clojure"))) |