Skip to content

Instantly share code, notes, and snippets.

Avatar

Yoshinari Takaoka mumumu

View GitHub Profile
View libuv-vs-libev.md

Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.

The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.

Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.

Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a

@madken
madken / sortListPair.kt
Created Jul 4, 2017
kotlin sort a list of pairs by second and then first value
View sortListPair.kt
fun sortListPairDesc(list: List<Pair<String, Int>>): List<Pair<String, Int>> {
val result = list.sortedWith(compareBy({ it.second }, { it.first })).asReversed()
return result
}
@taichi
taichi / code_review_basics.md
Last active Mar 30, 2021
チームでコードを書き始めた後、「どうやらレビューってやつをした方が良いらしい」くらいの若手に向けた資料です。
View code_review_basics.md

コードレビューの基本


一番大事な事

ソースコードはプロジェクトの共同所有物である

  • 誰かだけが触れるコードを無くす
View pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
View msgpack-1.0-or-1.1.md

msgpackの変更案について

概要:

  • 現行のRaw型をString型として読み替える。
  • Binary型を新設する。
  • 明らかなバイナリはデフォルトでBinary型(新設型)で保存

型システムの変更

  • Binary: バイト列