Skip to content

Instantly share code, notes, and snippets.

View lagenorhynque's full-sized avatar
🐬
architecting & managing

Kent OHASHI lagenorhynque

🐬
architecting & managing
View GitHub Profile
@lagenorhynque
lagenorhynque / clojure-builtin-traits.png
Last active November 11, 2022 06:55
Clojureコレクションで探るimmutableでpersistentな世界
clojure-builtin-traits.png
@lagenorhynque
lagenorhynque / introduction-to-french-grammar-for-english-learners.md
Last active November 11, 2022 06:55
英語学習者のためのフランス語文法入門: フランス語完全理解(?)

英語学習者のための

フランス語文法入門

フランス語完全理解(?)


@lagenorhynque
lagenorhynque / from-java-through-scala-to-clojure.md
Last active November 11, 2022 06:56
JavaからScala、そしてClojureへ: 実務で活きる関数型プログラミング
@lagenorhynque
lagenorhynque / Money.java
Last active April 30, 2022 12:49
『良いコード/悪いコードで学ぶ設計入門』3章: Money.javaのClojure移植版
package chapter03_fundamentalofoop;
import java.util.Currency;
class Money {
final int amount;
final Currency currency;
Money(final int amount, final Currency currency) {
if (amount < 0) {
@lagenorhynque
lagenorhynque / repl_session.clj
Created April 21, 2022 09:39
Modelling age of person in Clojure
user=> (require '[clojure.spec.alpha :as s]
#_=> '[clojure.spec.test.alpha :as st])
nil
user=> (s/def :person/age nat-int?)
:person/age
user=> (defn make-person [& {:keys [age]}]
#_=> #:person{:age age})
#'user/make-person
user=> (s/fdef make-person
#_=> :args (s/keys* :req-un [:person/age])
@lagenorhynque
lagenorhynque / introduction-to-practical-etymology.md
Last active November 11, 2022 06:59
実用のための語源学入門

実用のための語源学入門


(defprofile lagénorhynque
  :id           @lagenorhynque
 :reading "/laʒenɔʁɛ̃k/"
@lagenorhynque
lagenorhynque / delegation.ts
Last active April 14, 2021 02:13
Subtyping, inheritance and delegation
class Quadrangle {
name: string;
width: number;
height: number;
constructor(name: string, width: number, height: number) {
this.name = name;
this.width = width;
this.height = height;
}
getArea(): number {
@lagenorhynque
lagenorhynque / introduction-to-metaprogramming.md
Last active November 11, 2022 06:59
メタプログラミング入門

メタプログラミング入門


(defprofile lagénorhynque
  :id           @lagenorhynque
 :reading "/laʒenɔʁɛ̃k/"
#!/usr/bin/env bb
(ns list-repositories
(:require
[babashka.curl :as curl]
[cheshire.core :as cheshire]
[clojure.pprint :refer [pprint]]
[clojure.string :as str]))
(def auth-token (System/getenv "AUTH_TOKEN"))
@lagenorhynque
lagenorhynque / github_graphql_api_client.py
Created February 16, 2021 12:33
A minimal GitHub GraphQL API client implemented as a Python script
#!/usr/bin/env python
import os
import pprint
import requests
AUTH_TOKEN = os.getenv('AUTH_TOKEN')
GRAPHQL_QUERY = '''
query ($query: String!, $last: Int) {