Skip to content

Instantly share code, notes, and snippets.

View naoyamakino's full-sized avatar

Naoya Makino naoyamakino

View GitHub Profile
@geoffreydhuyvetters
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@bryanstern
bryanstern / OkHttpStack.java
Last active April 24, 2022 03:17
An OkHttp backed HttpStack for Volley
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Circle Internet Financial
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@practicingruby
practicingruby / mrdi.md
Created December 19, 2012 22:29
Models, Roles, Decorators, and Interactions -- A modest proposal for a toned done version of DCI that isn't as janky as Concerns.

Models, Roles, Decorators, and Interactions

A modest alternative to DCI that might be worth further thought

One of the problems with advancing the discussion on DCI is that we lack a comparable alternative pattern that has the same goals, but favors a low ceremony approach. The closest thing we have to that is Rails concerns, but they are more like distant relatives of the DCI concepts rather than first cousins, and that makes comparisions between the two approaches not especially fruitful.

I am considering the idea of experimenting with my own paradigm that captures the intent and purity of DCI, but with the convenience of concerns. Please note that this is just the starting point of a conversation, it is NOT a promise of comercially available cold fusion or a cure for cancer. It's just a gist with an idea on it I'd like to hear your thoughts on.

What if we had a top-level topology that was split into Models, **Rol

(def x 1)
(def y 10)
(defn useit []
(print "------------")
(println x))
(binding [x (+ x 1)] (useit))
(binding [x (+ x 1)] ((fn [] (println x))))
# a = 1
# b = a + 2
# print b
program = [
('assign', 'a', ('value', 1)),
('assign', 'b', ('plus', ('refer', 'a'), ('value', 2))),
('print', ('refer', 'b')),
('variables',)]
variables = {}
(defn my-last [xs]
(cond
(empty? (rest xs)) (first xs)
:otherwise (recur (rest xs))))
(println
(my-last '(a b c d)))
(defn my-but-last [xs]
(cond
(empty? (rest (rest xs))) xs