Skip to content

Instantly share code, notes, and snippets.

View ENvironmentSet's full-sized avatar
🎯
Focusing on development of hyogwa

Jaewon Seo ENvironmentSet

🎯
Focusing on development of hyogwa
View GitHub Profile
@ENvironmentSet
ENvironmentSet / Future.js
Last active May 5, 2018 16:18
10분이면 여러분도 Future Monad를 만들 수 있습니다.
module.exports = ( () => {
const STATE = { PENDING: 0, DONE: 1, FAIL: 2};
class Future {
constructor(worker) {
this.state = STATE.PENDING;
this.value = undefined;
this.handlers = [];
try{
worker(Future.resolver(this), Future.rejector(this));
} catch (error) {
@ENvironmentSet
ENvironmentSet / Promise.md
Last active May 6, 2018 15:15
ECMA-262 8th edition의 Promise에 관한 내용들을 번역한 문서

이 번역본의 저작권은 TC39에게 있습니다.

고유명사의 경우, 대응하는 마땅한 단어가 없는 경우에는 영어 표기를 사용했습니다. 하이퍼링크의 경우 제거하였습니다. 또한 오역, 의역이 조금 있습니다. 이 부분은 양해 바랍니다.

25.4 Promise 객체

Promise는 미뤄진 계산의 결과를 나타내기위한 placeholder 로서 쓰이는 객체입니다.

모든 Promise 객체는 아래의 세 가지 상태 중 하나의 상태를 가지고 있습니다. : 이행됨(fufilled), 거절됨(rejected), 대기중(pending)

@ENvironmentSet
ENvironmentSet / container.md
Last active June 6, 2018 08:54
EBNF of container

EBNF of identifier
EBNF of literal
연속된 2개 이상의 space는 한개의 space로 치환됩니다. 모든 줄은 trim 됩니다.(줄의 첫 번째 문자가 space가 아니고, 가장 마지막 문자가 space가 아닐 때 까지 모든 space를 제거함을 의미.)

space ::= 'utf8 space character'
spaces ::= space spaces
expressions ::= expression spaces expressions
expression ::= container | literal | nothing
@ENvironmentSet
ENvironmentSet / Stack.go
Created May 12, 2018 06:26
Simple Stack based on Go slice
package main
import "fmt"
type any interface {}
type Stack []any
func (stack *Stack) Push(elements ...any) Stack {
for _, element:= range elements {
@ENvironmentSet
ENvironmentSet / identifier.md
Last active May 18, 2018 15:38
EBNF of identifier
alphabet ::= A-z
alphabets ::= alphabet alphabets | nothing
number ::= 0-9
numbers ::= number numbers | nothing
specialChar ::= _ | ?
specialChars ::= specialChar specialChars | nothing
identifierHead ::= specialChar | alphabet
identifierBody ::= alphabets | numbers | specialChars
identifierBodys ::= identifierBody identifierBodys | nothing
@ENvironmentSet
ENvironmentSet / literals.md
Last active May 20, 2018 14:45
EBNF of literals
numPrefix ::= 0x | 0b | 0o | nothing
floatNumber ::= numbers . numbers
fullNumber ::= numPrefix numbers | floatNumber
char ::= utf 8 char
chars ::= char chars | nothing
fullString ::= " chars "
@ENvironmentSet
ENvironmentSet / ebnfLink.md
Created May 18, 2018 15:31
Whole EBNF gist links for Tteok
@ENvironmentSet
ENvironmentSet / history-tteok.md
Created June 5, 2018 14:54
History Of Tteok

History Of Tteok

@ENvironmentSet
ENvironmentSet / readme.md
Last active October 29, 2018 09:22
callbag-basic korean readme

Origin

Callbag basics 👜

기본적인 callbag 팩토리와 오퍼레이터들을 제공하는 라이브러리입니다.

callbag-basicscallbag 이라는 명세를 따르는 함수들을 구현한 라이브러리에요.

Callbag 은 말이죠..:

@ENvironmentSet
ENvironmentSet / readme.md
Last active October 29, 2018 08:55
callbag korean readme

Origin

Callbag 👜

가벼운 Observable 과 Iterable을 구현할 수 있게 하는 자바스크립트의 콜백을 위한 표준

  • 최소한의 오버헤드를 가지고 있는 스트림, Iterable, Observable, AsyncIterable 등
  • Modular (각각의 오퍼레이터는 그 자체로 하나의 npm 패키지입니다.)
  • 가벼움 (적은 메모리 할당)
  • 라이브러리가 아닙니다, 그저 표준일 뿐입니다. (라이브러리를 찾고 계신다면 callbag-basics을 확인하시거나 위키를 확인해 주세요.)