Skip to content

Instantly share code, notes, and snippets.

View dalinaum's full-sized avatar
:octocat:
Learning Rust and IR.

LYK dalinaum

:octocat:
Learning Rust and IR.
View GitHub Profile

Windows + Common Lisp 개발에서 사용하기 위해 Atom에서 SLIMA를 써보기로 결정했다.

apm install slima
apm install language-lisp
apm install lisp-paredit
apm install parinfer

CLISP이 설치되어 있기 때문에 그걸 쓰기로 했다. 설치된 Lisp 구현이 없으면 Roswell을 이용해 설치하면 될 것 이다. 윈도 환경에 Scoop과 Roswell을 사용하는 것은 지난 글에서 다루었다.

RxJava 2의 연산자 결합 (Operator fusion in RxJava 2) https://proandroiddev.com/operator-fusion-in-rxjava-2-dcd6612cffae

작성: Vasya Drobushkov

서문

RxJava는 강력한 라이브러리지만 몇가지 문제도 있습니다. 특히 성능과 메모리 문제는 라이브러리가 풀려는 문제와 기술적인 관점에서 솔루션이 설계되는 방식에서 비롯됩니다.

RxJava는 간접비용(overhead)를 최소화하기 위해 "연산자 결합" (Operator fusion)이라 불리는 여라 가지 최적화를 가집니다. 그리고 우리는 이 글에서 거기에 대해 다룰 예정입니다.

McLauren Stanley가 작성한 우버 앱 스위프트 고생기를 러프하게 번역해보았습니다.

불행히도 제가 겪은 (거의) 가장 큰 엔지니어링 재앙 이야기를 여러분께 들려드리겠습니다. 정치, 설계, 매몰 비용 오류에 관한 이야기입니다. [지금은 Aberlour Cask Strngth Single Malt Scotch를 마시는 중입니다.]

2016년으로 되돌아갑니다. 도날드 트럼프는 아직 대통령이 아니었기 때문에 #우버를_지우자(#DeleteUber) 운동은 아직 없었습니다. 트래비스 캘러닉(Travis Kalanick)이 여전히 CEO였고 우리는 국제적으로 활주하는 초 성장 단계였습니다. 대중은 극도로 긍정적이었고 우버는 높이 성장중이었습니다.

그러나 급 성장에는 문제가 있었고 앱 자체에 균열이 보이기 시작했습니다. 엔지니어링 조직은 매년 이전에 비해 거의 두 배가 되었습니다. 그렇게 빠르게 성장할 때 엄청나게 다양한 기술을 갖게 됩니다. 그런 점은 빌더가 빌드(Let Builder's build, 주: 우버의 핵심가치 중 하나. 창의적인 것을 만들어 내었다는 평가와 사회질서와 대립한다는 평이 있음.)하게 하자는 해킹 사고와 결합해 앱 구조가 복잡하고 깨지기 쉬웠습니다. 그 시절 우버는 클라이언트 측의 로직이 극단적으로 무거웠기 때문에 앱은 자주 망가졌습니다. 우리는 지속적으로 핫 픽스, 시급한 릴리즈 등을 진행해습니다. 디자인도 크게 확장되었습니다.

이 모든 문제의 결과로 "앱의 바닥부터 재작성"하는 생각으로 조직의 모든 수준에서 집결하는 움직임이 시작되었습니다. 우리가 더 느리게 하는 설계 때문에 더 빠르기 위해 처음부터 만들어야 한다는 것이 일반적인 정서였습니다.

@dalinaum
dalinaum / GLSurfaceView.java
Created October 15, 2012 05:40
my own GLSurfaceView.java
package ##_USE_YOUR_PACKAGE_HERE#;
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@dalinaum
dalinaum / hiroyuki-seto.kt
Last active April 4, 2020 03:09
Hiroyuki Seto의 이모지 카운트 솔루션
fun CharSequence.getDisplayLength(): Int {
val codePointCount = Character.codePointCount(this, 0, length)
val text = EmojiCompat.get().process(SpannableString(this))
if (text !is Spannable) {
// 문자 길이 가 0의 경우
return codePointCount
}
val spans = text.getSpans(0, text.length, EmojiSpan::class.java)
if (spans.isEmpty()) {
package com.example.kotlintest
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
class MainActivity : AppCompatActivity() {
@dalinaum
dalinaum / delay.smali
Created January 16, 2020 01:12
delay.smali
// ================com/example/kotlintest/MainActivity.class =================
// class version 50.0 (50)
// access flags 0x31
public final class com/example/kotlintest/MainActivity extends androidx/appcompat/app/AppCompatActivity {
// access flags 0x4
protected onCreate(Landroid/os/Bundle;)V
// annotable parameter count: 1 (visible)
// annotable parameter count: 1 (invisible)
sealed class Option<out A> {
object None : Option<Nothing>()
data class Some<out A>(val value: A) : Option<A>()
inline infix fun <B> map(f: (A) -> B): Option<B> = when (this) {
is None -> this
is Some -> Some(f(value))
}
}
(defun pudding-eater (person)
(cond ((eq person 'henry) (setf *arch-enemy* 'stupid-lisp-alien)
'(curse you lisp alien ? you ate my pudding))
((eq person 'johnny) (setf *arch-enemy* 'useless-old-johnny)
'(i hope you choked on my pudding johnny))
(t '(why you eat my pudding stranger ?))))
(defun pudding-eater (person)
(case person
((henry) (setf *arch-enemy* 'stupid-lisp-alien)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.