2018년 5월 24일 목요일

오늘의 스터디 - 2018년 2월 23일

Beyond the Basics of Image Optimization

- the old ones
PNG vs JPEG vs GIF

- the new ones
PNG vs JPG vs WebP vs HEIF

mozjpeg

optipng

img-loader for webpack

Blur Up

the contrast swap technique

Never use GIFs

Image processing pipeline: Download -> Decode -> VRAM -> Composite

2018년 5월 7일 월요일

참고하는 Swift 소스

RxSwift

ReSwift

Alamofire

IGListKit
 
GPUImage2

에디터( Editor ) 어떻게 만들지?

Text Editor: Data Structures

아래의 4가지 data type 에 대해 설명한다.

1. Array

Redis로 유명한 Antirez가 재미로 만든 kilo를 기반으로 하여 에디터 만들기를 설명하는 블로그가 있다. 처음 시작으로 좋을 듯.

2. Rope

Rust로 만든 에디터인 xi-editor가 rope로 구현되어 있다.

3. Gap Buffer

Emacs가 Gap Buffer를 사용하여 구현되어 있다고 한다.

4. Piece Table

Atom, Visual Studio Code가 Piece Table로 구현되어 있다고 한다.

2018년 3월 2일 금요일

자바 스터디

String concatenation in Java 9: Untangling invokeDynamic

- 자바와 하스켈에서 Expression problem을 어떻게 해결할 수 있을지 본다.

http://koerbitz.me/posts/Sum-Types-Visitors-and-the-Expression-Problem.html

http://koerbitz.me/posts/Solving-the-Expression-Problem-in-Haskell-and-Java.html

Expression problem: http://www.haruair.com/blog/3338

- C++에서 vtable이 어떻게 구현되는지 간단히 살펴본다.

http://www.michaelburge.us/2017/10/15/haskell-typeclasses-vs-cpp-classes.html

Java language oddities

Arrays are objects

Bytes and shorts are second-class citizens

Private fields and methods are accessible without reflection

Variance in Java and Scala

? extends T : read only인 이유 설명
? super T : write only인 이유 설명
-> 둘 다 실제 타입이 무엇인지 알지 못하기 때문에 발생한다.
-> design note 참조

2018년 1월 23일 화요일

자바스크립트 스터디

A Tale of TurboFan: Four years that changed V8 forever

Inlining

Escape Analysis and Scalar Replacement

Making WebAssembly even faster: Firefox's new streaming and tiering compiler

Streaming compilation : Tier 1(or baseline compiler) and Tier 2 compiler

New bottleneck: CPU - main thread

Caching .wasm file

The Cost Of JavaScript

Bottleneck = Network(transmission size) + CPU(parse time)

JavaScript Startup Bytecode Cache

Optimizing hash tables: hiding the hash code

private symbol을 사용 -> symbol lookup이 필요

Backing store를 사용 -> lookup이 필요없게 되었다. 성능 향상!
: empty, array, dictionary

Fast Properties in V8

Named properties vs Indexed properties

Hidden classes and Descriptor arrays

In-object, fast, slow

Explaining JavaScript VMs in JavaScript - Inline Cached

Must-Watch JavaScript

In The Loop

Tasks - Animation callbacks - Microtasks

Tasks: 한번에 하나만 실행
Animation callbacks: 실행 시점에 큐에 있는 것은 모두 실행(실행 중 추가된 콜백은 다음번에 실행)
Microtasks: 큐가 빌때까지 계속 실행(따라서, 무한히 실행하는 것에 주의 필요)

자바스크립트와 이벤트 루프

Tasks, microtasks, queues and schedules

How JavaScript Timers Work

setTimeout vs setInterval

setInterval : 큐에 이전 핸들러가 실행되지 못하고 남아 있으면 새로 추가하지 않는다.

Elements kinds in V8

small integer -> PACKED_SMI_ELEMENTS
floating-point number -> PACKED_DOUBLE_ELEMENTS
regular element(string) -> PACKED_ELEMENTS

from PACKED to HOLEY

Avoid creating holes
Avoid reading beyond the length of the array
Avoid elements kind transitions
Prefer arrays over array-like objects
Avoid polymorphism

Bubbling and capturing

A cartoon guide to Flux

Generic interfaces 요점

 https://go.dev/blog/generic-interfaces  Generic interface를 정의할 때 최소한의 제약만을 정의하고 실제 구현체들이 자신만의 필요한 제약을 추가할 수 있도록 하는 것이 좋다. pointer receiver를...