Skip to content

Instantly share code, notes, and snippets.

View iku000888's full-sized avatar
🤣
Having fun coding

Ikuru K iku000888

🤣
Having fun coding
View GitHub Profile
@roman01la
roman01la / rum-0.12.0.md
Last active June 29, 2020 12:39
Rum 0.12.0 release notes

Rum 0.12.0 release notes

Happy to announce that Rum 0.12.0 has been released.

Sablono -> Daiquiri

A major change in this release is Daiquiri — reworked fork of Sablono. The reason we went with a fork is to own the compiler/interpreter. Daiquiri removes input field wrappers, this was causing weird bugs with jumping caret. Similarly to Sablono, Daiquiri makes use of ClojureScript's type inference to reduce number of generated interpret calls when compiling Hiccup. This applies to primitive types such as number, string, array and function, and also anything that is hinted as js/React.Element, Rum components include the type hint implicitly.

Removed rAF based scheduling mechanism

Sablono's input wrappers exist because some ClojureScript React wrappers have their own update scheduling mechanism built on top of js/requestAnimationFrame which doesn't play well with input fields. In this release we've removed Rum's scheduler, which allowed us to remove input wr

@mala
mala / covid19-twitter-research_01.md
Last active December 31, 2021 05:58
生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

生活と意見: ソーシャルディスタンスなどと称してユーザー名や文章にスペースを挟む行為についての苦情

更新履歴

2020-05-13 追記

@benjiqq
benjiqq / joker_interop.md
Created May 4, 2020 05:54
joker golang interop

Interop

"Yet, by (someday) providing all the (supported) APIs, Joker enables higher-level, Clojure-like, APIs (that call these low-level API wrappers) to be written without requiring changes to the Joker codebase or executable itself."

I’ll try to address what I think might be unclear: normally, to make Go APIs available from Joker code, one might write a custom Joker source file, such as std/os.joke, perhaps accompanied by a std/os_native.go file, and then rebuild Joker. Alternately, one could add a namespace to core/data/some-namespace.joke and have it call new Go code, calling the desired APIs, provided in core/procs.go (or similar), which can be more complicated due to needing to modify other files…and then rebuild Joker.

Either way, the source code of Joker has to be modified, and Joker rebuilt, so the API can be called. gostd is intended to provide out-of-the-box access to all the Go standard-library packages via very low-level Joker access.

(ns bakusatsu
(:refer-clojure :exclude [+ -])
(:require [clojure.spec.alpha :as s]
[clojure.spec.test.alpha :as stest]
[clojure.core :as core]))
;; 金額に関する振る舞い(金額同士の加算と減算ができる)
(defprotocol IMoney
(+ [this money])
(- [this money]))
@pjstadig
pjstadig / transducers.md
Last active June 8, 2021 13:22
The secret feature of transducers that no one talks about!

The Pledge

One thing that always made me a little sad about transducers was how map lost its ability to iterate multiple collections in parallel. This is actually my favorite feature of map. For example:

(map + (range 5) (range 5 10))
=> (5 7 9 11 13)

One somewhat practical use of this is if you want to compare two sequences, pairwise, using a comparator. Though I wish that every? took multiple collections, this is an adequate substitute:

@voluntas
voluntas / loadtest.rst
Last active July 6, 2024 00:34
負荷試験コトハジメ
dev> (q #:venia{:operation #:operation{:type :query
:name "MemberById"}
:variables [#:variable{:type :ID!
:name "id"}]
:queries [[:member_by_id {:id :$id}
[:member_name
[:ratings [[:game [:name
[:rating_summary [:count
:average]]
[:designers [:name
@voluntas
voluntas / death_march.md
Last active July 1, 2024 01:31
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

@athos
athos / deps.edn
Last active June 2, 2024 08:57
Try on your terminal `clojure -Sdeps '{:deps {hello-clojure/hello-clojure {:git/url "https://gist.github.com/athos/b68b15b08efedffaf14d8c020b125202" :git/sha "099bdf7d565b2c35c1df601abf58514cc5276237"}}}' -M -m hello-clojure`
{:paths ["."]
:deps {clansi/clansi {:mvn/version "1.0.0"}}}
@stmtk1
stmtk1 / cells.clj
Last active January 5, 2018 02:30
(defn get_cell [cells x y]
(-> cells (get y) (get x)))
(defn create-cells [width height]
(loop [i 0
j 0
result []
col []]
(cond
(= j height) result