Skip to content

Instantly share code, notes, and snippets.

View puzzlet's full-sized avatar

정 경훈 (Kyung-hown Chung) puzzlet

View GitHub Profile
@xnuk
xnuk / 아희.md
Last active September 5, 2019 22:42

아희 유형 A 프로그래밍 언어 설명 문서 - draft 버전 1.2.0

한국어

한국어는 애매합니다. 정확히는 명료한 언어 설명 문서를 적기에는 부족한 점이 좀 있습니다. 따라서, 본론에 들어가기 전 몇 가지 표현을 미리 명료히 하겠습니다.

  • A에서 B까지 / A부터 B까지: A와 B 사이에 있는 구간에서 A와 B를 포함한 구간을 칭합니다.
  • (U+AC00) 이상 (U+D7A3) 이하: 유니코드의 문자 번호가 십육진수 표기로 AC00 이상 D7A3 이하에 속하는 모든 유니코드 문자를 칭합니다.
  • 이 문서에서의 숫자 표기는 별도로 정의하지 않는 이상 십진수 표기를 사용합니다.
    • U+AC00U+ 뒤에 바로 따라 나오는 네 자리 문자는 십육진수 표기를 사용합니다.
  • 받침종성은 동의어로 봅니다.
@Snack-X
Snack-X / number2aheui.js
Last active August 29, 2015 14:02
Convert number to aheui expression
/**
* TODO
* optimize algorithm
* support negative numbers
*/
var readline = require("readline");
var rl = readline.createInterface({input: process.stdin, output: process.stdout, terminal: false});
var cho = {"+": 3, "*": 4, "-": 16, "/": 2, ">": 8};
@Snack-X
Snack-X / 99bob.aheui
Created June 4, 2014 13:40
99 bottles of beer in aheui
발발따밤따박박나타삭밤밣따산박밦따밞뚜 #기본 스택 99로 초기화, 공백(32)->ㄱ, (l)108->ㄴ
우어어어어어어어어어어어어어어어어어어
아우 #루프의 시작
오사뺘뿌처밞밞따받타맣산빠받다맣삭빠맣산빠박박나다맣빠받다맣빠밦다맣빠밝타맣수 #복제 후, 0일 경우 'No more' 출력 (78 111 32 109 111 114 101) (No more로 변경)
오우어명여어어어어어어어어어어어어어어어어어어어어어어어어어어어어어어어어어어 #0이 아닐 경우 복제 후 숫자로 출력
오삭빠맣산빠발타발타맣빠받다맣빠밣다빠맣맣빠맣빠밝타맣수 #' bottle' 출력 (32 98 111 116 116 108 101)
오우어어어어어어어어어어어어어어멓더벍뻐선처우텨너벅벅뻐 #복제 후, -1이 0이 아닐 경우 's' 출력 (115)
오우어어어어어어어어어어어어어어어어어어어어어
오아삭빠맣산빠받다맣빠밦타맣삭빠맣산빠발타발타맣빠밝타빠맣맣빠밦다맣삭빠맣산빠받다맣빠박다뭏 #' of beer on' 출력 (32 111 102 32 98 101 101 114 32 111 110)
오뭏뻐멓더벖더벖뻐석멓뻐멓뻐멓터벖터벌뻐멓더벖더벌뻐선멓뻐석멓터벍뻐멓터범뻐멓더벓뻐선멓뻐석 #' the wall, ' 출력 (32 116 104 101 32 119 97 108 108 44 32)
@Snack-X
Snack-X / README.txt
Last active August 29, 2015 14:02
rot13 in aheui
아희로 구현된 ROT13입니다.
pyaheui(https://bitbucket.org/lifthrasiir/esotope-aheui/raw/esotope-aheui-5a/esotope-aheui)와 jsaheui(http://jinoh.3owl.com/aheui/jsaheui_ko.html)에서 테스트, 정상 작동을 확인하였습니다.
문장을 입력하면 문장의 ROT13 결과가 출력되며, 인터프리터를 종료하기 전까지 계속해서 작동합니다.
(jsaheui의 경우 개행이 되지 않지만, pyaheui에서는 입력마다 개행이 됩니다.)
@klutzy
klutzy / hello.windows.rs
Created December 6, 2013 07:45
Rust with Emscripten and win32.js
// From rust get `libstd/libc.rs` to the working dir.
// From rust-windows <https://github.com/klutzy/rust-windows>
// copy whole `ll/` dir to the working dir and
// patch some code: (TODO)
// From win32.js <https://github.com/klutzy/win32.js>, copy
// `library_win32.js` and `window.js` to working dir.
//
// emscripten uses le32-unknown-nacl triple but rustc doesn't know it now.
// So just use similar target instead.
// Here I use `win32` because libc.rs needs it.
/*
code
{
char: string,
cho: number,
jung: number,
jong: number,
eliminate: boolean
}
*/
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
@dagss
dagss / gist:5008118
Last active September 20, 2017 01:33
marked_yaml
"""
A PyYAML loader that annotates position in source code.
The loader is based on `SafeConstructor`, i.e., the behaviour of
`yaml.safe_load`, but in addition:
- Every dict/list/unicode is replaced with dict_node/list_node/unicode_node,
which subclasses dict/list/unicode to add the attributes `start_mark`
and `end_mark`. (See the yaml.error module for the `Mark` class.)
@albyr
albyr / traceroute 216.81.59.173
Created February 10, 2013 10:10
The results of a traceroute to 216.81.59.173
Tracing route to FIN [216.81.59.173]:
1 76 ms 96 ms 99 ms 192.168.1.254
2 * * * Request timed out.
3 18 ms 18 ms 17 ms 195.66.225.189
4 22 ms 24 ms 24 ms 10gigabitethernet1-1.core1.lon1.he.net [195.66.224.21]
5 24 ms 24 ms 24 ms 10gigabitethernet2-4.core1.par2.he.net [72.52.92.42]
6 97 ms 97 ms 100 ms 10gigabitethernet7-1.core1.ash1.he.net [184.105.213.93]
7 109 ms 109 ms 112 ms 10gigabitethernet1-2.core1.atl1.he.net [184.105.213.110]
8 109 ms 108 ms 108 ms 216.66.0.26
@stania
stania / setupVSEnv.py
Last active June 11, 2016 21:45
python implementation replacing "call vsvars32.bat"
from subprocess import Popen
import os, subprocess
def parseEnv(envoutput):
handle_line = lambda l: tuple(l.rstrip().split("=", 1))
pairs = map(handle_line, envoutput)
valid_pairs = filter(lambda x: len(x) == 2, pairs)
valid_pairs = [(x[0].upper(), x[1]) for x in valid_pairs]
return dict(valid_pairs)