<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>따라쟁이</title>
	<atom:link href="http://www.yuiworld.kr/suguni/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.yuiworld.kr/suguni</link>
	<description>모방은 상대방에 대한 최고의 찬사다. - 속담이라는데...?</description>
	<lastBuildDate>Wed, 22 May 2013 01:41:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Java Exception</title>
		<link>http://www.yuiworld.kr/suguni/?p=1034</link>
		<comments>http://www.yuiworld.kr/suguni/?p=1034#comments</comments>
		<pubDate>Wed, 22 May 2013 01:40:46 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[Programming?]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=1034</guid>
		<description><![CDATA[프로그램에서 오류 처리를 어떻게 해야 할 것인지 고민 중. 나름 모듈화를 하려다 보니 불필요하게 레이어가 많아져(?) 버렸고, 오류 처리하는 방식이 제각각. 더군다나 catch 하지 못하는 오류까지 발생하고 있어 뭔가 정리가 필요한 상황. 아래 책들을 읽어보고 있음. Effective Java &#8211; 9. Exceptions * Item 57: 예외적인 상황에서만 exception을 사용해라. * Item 58: 회복할 수 있는 상황에서는 [...]]]></description>
				<content:encoded><![CDATA[<p>프로그램에서 오류 처리를 어떻게 해야 할 것인지 고민 중. 나름 모듈화를 하려다 보니 불필요하게 레이어가 많아져(?) 버렸고, 오류 처리하는 방식이 제각각. 더군다나 catch 하지 못하는 오류까지 발생하고 있어 뭔가 정리가 필요한 상황. 아래 책들을 읽어보고 있음.</p>
<h3>Effective Java &#8211; 9. Exceptions</h3>
<pre>
* Item 57: 예외적인 상황에서만 exception을 사용해라.

* Item 58: 회복할 수 있는 상황에서는 checked exception을 프로그래밍 오류인 경우는 runtime exception을 사용해라.
   - 3가지 종류의 throwables
     + checked exceptions
     + runtime exceptions
     + errors
   - checked exceptions을 던지는 것은 호출자가 예외를 처리하도록 강제하는 것
   - 프로그래밍 오류를 나타내기 위해 runtime exception을 사용해라
     + 대표적인 것: precodition violations
   - Error 로 부터 상속받지 마라
     + unchecked throwables 만드려면 RuntimeException를 subclassing 해라
   - Exception object에 필요한 메소드를 정의해서 노출해라
     + Message를 파싱하게 하지 마라.
   - checked exception을 복구 가능한 경우이니, client가 복구할 수 있는 정보를 exception에서 제공해 주는게 좋다.
* Item 59: 불필요한 checked exception 사용 금지
   - checked exception이 유용하지만, 남용하지 마라.
   - API를 잘 사용한다고 해서 예외 상황을 피해갈 수 없고,
     예외 상황일 때 client가 유용한 행위를 할 수 있는 경우
     이 경우에만 checked exception을 사용해라. 이외의 경우는 unchecked exception
* Item 60: 표준 예외를 주로 사용해라.
   - exception도 재사용하면 된다.
   - 장점
     1. API 사용자가 배우기 쉽다.
     2. API를 사용하는 프로그램이 읽기 쉬워진다.
     3. exception class가 적으면 메모리 사용량이나 클래스 로딩 시간이 줄어든다.
   - 주로 사용하는 class
     + IllegalArgumentException
     + IllegalStateException
     + NullPointerException
     + IndexOutOfBoundsException
     + ConcurrentModificationException
     + UnsupportedOperationException
   - 어떤 exception을 재활용할지는 정답 없는 문제이다.
* Item 61: 적절히 추상화해서 예외 던저라.
   - higher layer는 lower-level 예외를 catch 한 후 추상화해서 throw 해라
   - exception translation 이라고 한다.
   - exception chaining : lower-level exception을 감싸서 새로 exception을 던지는 경우
     Throwable.getCause로 lower-level exception을 얻을 수 있다.
   - exception translation을 과도히 사용 마라.
* 62: 메소드가 던지는 모든 예외를 문서화 해라
   - checked exception을 개별적으로 선언하고, 각각 언제 발생하는지 @throws tag로 문서화해라.
   - 발생할 수 있는 unchecked exception도 문서화 하는게 좋지만, throws 에 넣지는 마라.
</pre>
<h3>Clean Code &#8211; 7. Error Handling</h3>
<h3>Refactoring</h3>
<p>* Replace Error Code with Exception<br />
* Replace Exception with Test</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=1034</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Tutorial User Style</title>
		<link>http://www.yuiworld.kr/suguni/?p=1028</link>
		<comments>http://www.yuiworld.kr/suguni/?p=1028#comments</comments>
		<pubDate>Mon, 31 Dec 2012 12:48:52 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[공부]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=1028</guid>
		<description><![CDATA[Java 공부를 다시 해 보자는 생각에 Online Java Tutorial을 읽고 있다. 안식 동안 빨리 마물해야 할 숙제 중 하나. 암튼&#8230; 예전(거의 15년 전 처음 Java 배울때 이걸로 시작했었음. 당시 교수님이 숙제를 Java로 코딩하라시는 바람에 책 사긴 싫고&#8230; 그래서 ㅎ)에도 그랬지만 읽기 편한 스타일이 아니다. 그래서 이 참에 User Style Manager를 이용해 읽기 편하게 좀 스타일을 [...]]]></description>
				<content:encoded><![CDATA[<p>Java 공부를 다시 해 보자는 생각에 <a href="http://docs.oracle.com/javase/tutorial/">Online Java Tutorial</a>을 읽고 있다. 안식 동안 빨리 마물해야 할 숙제 중 하나. 암튼&#8230; 예전(거의 15년 전 처음 Java 배울때 이걸로 시작했었음. 당시 교수님이 숙제를 Java로 코딩하라시는 바람에 책 사긴 싫고&#8230; 그래서 ㅎ)에도 그랬지만 읽기 편한 스타일이 아니다. 그래서 이 참에 <a href="https://addons.mozilla.org/ko/firefox/addon/user-style-manager/">User Style Manager</a>를 이용해 읽기 편하게 좀 스타일을 수정해봤다. 꽤 오래되고 유명한 확장 기능인데 제대로 사용하는건 처음인듯.</p>
<p>사용한 소스는 아래와 같으니 한번 사용해보심이~? ^^</p>
<pre class="brush: css; title: ; notranslate">
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix('http://docs.oracle.com/javase/tutorial/') {

    #PageTitle h1 {
        font-family: georgia, serif !important;
        font-size: 24px !important;
    }
    #PageContent {
        font-size: 18px !important;
    }
    #PageContent h2, #PageContent h3, #PageContent h4, #PageContent h5 {
        font-family: georgia, serif !important;
    }
    #PageContent h2 {
        font-size: 22px !important;
    }
    #PageContent h3 {
        font-size: 20px !important;
    }
    #PageContent h4 {
        font-size: 18px !important;
    }
    #PageContent, #PageContent a {
        line-height: 1.6 !important;
        font-family: georgia, serif !important;
    }
    #Footer2 {
        display:none;
    }
    .FigureCaption {
        text-align: inherit !important;
        font-family: inherit !important;
    }
    
    @media (max-width: 1024px) {
    
        #MainFlow {
            margin-left: 20px !important;
        }
        #LeftBar {
            display: none;
        }
    }
}
</pre>
<p>역시 책 읽기는 큰 글씨에 Serif 체가 좋은거 같다.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=1028</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move Text</title>
		<link>http://www.yuiworld.kr/suguni/?p=1025</link>
		<comments>http://www.yuiworld.kr/suguni/?p=1025#comments</comments>
		<pubDate>Sun, 30 Dec 2012 14:26:54 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=1025</guid>
		<description><![CDATA[eclipse에서는 줄의 위치를 alt-up/alt-down으로 이동할 수 있어 참 편하다. emacs에는 기본 명령어로 제공되지 않는데&#8230; What the .emacs.d!?에 함수가 올라왔다. 써 봤더니 move-line-up 함수에 버그(?)가&#8230; 맨 마지막 줄을 내리면 끝없이 내려간다. 어떻게 할까 고민중에 댓글 중에 EmacsWiki에 Move Text라는게 있어서 잘 쓰고 있다는 글이 있어서, 바로 package-install move-text로 설치. 잠깐 써보니 잘 동작하는것 처럼 보였는데, paredit랑 [...]]]></description>
				<content:encoded><![CDATA[<p>eclipse에서는 줄의 위치를 alt-up/alt-down으로 이동할 수 있어 참 편하다. emacs에는 기본 명령어로 제공되지 않는데&#8230; <a href="http://whattheemacsd.com//editing-defuns.el-02.html">What the .emacs.d!?</a>에 함수가 올라왔다. 써 봤더니 <code>move-line-up</code> 함수에 버그(?)가&#8230; 맨 마지막 줄을 내리면 끝없이 내려간다. 어떻게 할까 고민중에 댓글 중에 <a href="http://emacswiki.org/">EmacsWiki</a>에 <a href="http://emacswiki.org/emacs/MoveText">Move Text</a>라는게 있어서 잘 쓰고 있다는 글이 있어서, 바로 <tt>package-install move-text</tt>로 설치. 잠깐 써보니 잘 동작하는것 처럼 보였는데, <a href="http://emacswiki.org/emacs/ParEdit">paredit</a>랑 충돌 나는 듯. move text의 소스코드를 보면 기본적으로 <tt>M-up</tt>과 <tt>M-down</tt>를 함수에 바인딩해 두었는데 이걸 <tt>C-S-up</tt>, <tt>C-S-down</tt>으로 변경. 결론은 잘 쓰고 있음.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=1025</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>emacs cocoa 에서 terminal 로 변경</title>
		<link>http://www.yuiworld.kr/suguni/?p=1019</link>
		<comments>http://www.yuiworld.kr/suguni/?p=1019#comments</comments>
		<pubDate>Tue, 25 Dec 2012 12:25:22 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=1019</guid>
		<description><![CDATA[ㅠㅠ 그냥 cocoa 빌드로 복귀. command 키 사용 설정이 문제다. 안쓰자니 불편한 점이 넘 많다. 대표적으로 clipboard가 동기화되지 못하는 문제. 빌드랑 상관없는 거지만 일단 ctrl키를 caps lock 키로 변경해서 사용하기롬 함. 그동안 cocoa로 빌드해서 Mac Application으로 사용했었는데, terminal 버전으로 사용하는것으로 시도. 몇 가지 문제가 있지만 가장 큰 문제점은 한글 폰트. 고정크기폰트를 사용할 때 문자 간격을 [...]]]></description>
				<content:encoded><![CDATA[<p>ㅠㅠ 그냥 cocoa 빌드로 복귀. command 키 사용 설정이 문제다. 안쓰자니 불편한 점이 넘 많다. 대표적으로 clipboard가 동기화되지 못하는 문제.</p>
<p>빌드랑 상관없는 거지만 일단 ctrl키를 caps lock 키로 변경해서 사용하기롬 함.</p>
<p>그동안 cocoa로 빌드해서 Mac Application으로 사용했었는데, terminal 버전으로 사용하는것으로 시도. 몇 가지 문제가 있지만 가장 큰 문제점은 한글 폰트. 고정크기폰트를 사용할 때 문자 간격을 조정할 수 없어, 한글 폰트의 경우 크기를 키우는 수밖에 없는데 무척 보기 싫었다.</p>
<p>두번째는 한글 입력 문제. 문론 leim을 이용하면 전혀 문제가 없긴 한데, shift-space나 command-space를 이용할 수 없고, 시스템의 IME와 emacs의 한영 변환이 서로 꼬이면 입력시 구찮은 문제들이 발생.</p>
<p>cocoa 옵션을 빼고 빌드(<tt>brew install emacs</tt>)한 후 terminal에서 사용해 보니, 일단 alt(option)키가 안먹어서 ESC를 사용해야 하고, command도 안먹는데, 복사/붙여넣기가 불편. 이건 방법을 찾아봐야 겠다.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=1019</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>권한은 책임에서 나온다.</title>
		<link>http://www.yuiworld.kr/suguni/?p=1010</link>
		<comments>http://www.yuiworld.kr/suguni/?p=1010#comments</comments>
		<pubDate>Tue, 25 Dec 2012 11:04:45 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[업무]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=1010</guid>
		<description><![CDATA[예전 울 회사 CTO 이셨던 이명종 님이 오셔서 리더십 교육을 해 주셨는데 교육 중 기억에 남는 이야기. 조직에 있는 사람은 누구나 권한이 없어서 어떤 일을 못한다고 한다. 하지만 권한은 누가 주는 것도 아니고 직급이 올라간다고 해서 생기는 것도 아니다. 자기가 가진 책임만큼이 자기의 권한이다. 권한이 많아지려면 책임을 많이 져야 한다는 뜻. 누구도 책임지지 않고 권한도 [...]]]></description>
				<content:encoded><![CDATA[<p>예전 울 회사 CTO 이셨던 이명종 님이 오셔서 리더십 교육을 해 주셨는데 교육 중 기억에 남는 이야기.</p>
<blockquote><p>조직에 있는 사람은 누구나 권한이 없어서 어떤 일을 못한다고 한다. 하지만 권한은 누가 주는 것도 아니고 직급이 올라간다고 해서 생기는 것도 아니다. 자기가 가진 책임만큼이 자기의 권한이다.
</p></blockquote>
<p>권한이 많아지려면 책임을 많이 져야 한다는 뜻.</p>
<blockquote><p>누구도 책임지지 않고 권한도 없어 보이는 업무 영역은 어떻게 할 것인가? 내 업무 영역을 확장하면 이러한 영역의 일에 대한 권한이 나에게 생긴다.
</p></blockquote>
<p>아래 그림을 보면 확실해 진다.</p>
<p><img src="https://docs.google.com/drawings/pub?id=1Qr0p9VLdgKpPQRXG_FwNZf6fy1oF2kL2G0zOZT4e__8&amp;w=520" alt="업무 확장과 권한 증가" /></p>
<p>얘기한 내용과 동일한 워딩은 아니겠지만 이렇게 난 이해했다. 그런데, 이런 얘기들은 모두 일에 대한 열정과 동기가 충만한 사람들에게만 해당될 것이다. 사실 일을 하다 보면 그렇지 않은, 그냥 월급을 받기 때문에 일을 하는 사람들이 많아 보인다.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=1010</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Unix Processes</title>
		<link>http://www.yuiworld.kr/suguni/?p=966</link>
		<comments>http://www.yuiworld.kr/suguni/?p=966#comments</comments>
		<pubDate>Sat, 24 Nov 2012 08:26:37 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[공부]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=966</guid>
		<description><![CDATA[Processes Have File Descriptors 모든 것(file, socket, pipe 등)이 다 파일이다. 프로세스에서 리소스를 열면 file descriptor number를 부여한다. 연 프로세스에서만 사용할 수 있고, 프로세스가 죽으면 닫힌다. file descriptor는 열린 파일에 대해서만 의미 있음(open file descriptor number). 닫으면 사라진다(?). 처음으로 파일을 열면 file descriptor number가 3인데, 0, 1, 2는 STDIN, STDOUT, STDERR 이다. Processes Have Resource [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://pragprog.com/book/jsunix/working-with-unix-processes"><img src="http://imagery.pragprog.com/products/310/jsunix_xlargecover.jpg?1337287136" alt="Working with Unix Processes" style="float:right;" /></a></p>
<h3>Processes Have File Descriptors</h3>
<p>모든 것(file, socket, pipe 등)이 다 파일이다. 프로세스에서 리소스를 열면 file descriptor number를 부여한다. 연 프로세스에서만 사용할 수 있고, 프로세스가 죽으면 닫힌다. file descriptor는 열린 파일에 대해서만 의미 있음(open file descriptor number). 닫으면 사라진다(?). 처음으로 파일을 열면 file descriptor number가 3인데, 0, 1, 2는 STDIN, STDOUT, STDERR 이다.</p>
<h3>Processes Have Resource Limits</h3>
<p>하나의 프로세스가 열수 있는 파일 수에는 제한이 있다. <code>Process.getrlimit(:NOFILE)</code> 결과는 soft limit과 hard limit. soft limit은 실제 한계가 아니다. 예외 발생하지만 조절할 수 있다. hard limit값은 <code>Process::RLIM_INFINITY</code>과 동일한 값이 나온다. 즉, 무한대 의미. <code>Process.setrlimit</code>으로 limit 조절할 수 있는데 조절할 수 있는 리소스 종료는 <a href="http://ruby-doc.org/core-1.9.3/Process.html#method-c-setrlimit">문서</a> 참조. httperf에서 부하를 주기 위해 동시 접속 수를 늘리기 위해 사용. 외부 코드가 실행될 때 리소스 사용을 제한하기 위해 사용.</p>
<blockquote><p>TYPO : <code>Process::RLIMIT_INFINITY</code> => <code>Process::RLIM_INFINITY</code></p></blockquote>
<h3>Process Have an Environment</h3>
<p>Environment는 환경 변수 의미한다. 모든 프로세스는 부모 프로세스로부터 환경 변수 상속 받는다. <code>ENV</code>는 hash 같지만 사실 hash가 아니므로 모든 Hash API를 사용할 수 있다고 생각하지 마라(ruby에서 얘기인듯). </p>
<h3>Process Have Arguments</h3>
<p>모든 프로세스에는 <code>ARGV</code>라는 speical array가 있다. 프로그래밍 언어별로 다르게 구현. 어쨌든 비슷한게 있음. 프로세스가 실행할 때 전달된 arguments를 담고 있다. ARGV는 배열이다(ruby).</p>
<h3>Process Have Names</h3>
<p>모든 프로세스는 이름을 가지며 변경할 수 있다. <code>$PROGRAM_NAME</code>(ruby). irb에서 값 변경하고 shell에서 <tt>ps</tt> 실행하면 변경된거 확인할 수 있다.</p>
<h3>Process Have Exit Codes</h3>
<p>전통적으로 종료 코드 <code>0</code>은 정상 종료를 의미. ruby 얘기. <code>exit</code>는 정상 종료(0), 종료 전에 <code>at_exit</code> 블럭을 실행한다. <code>exit!</code>는 비정상 종료(1). <code>at_exit</code> 블럭을 실행 안함. <code>abort</code>는 비정상 종료(1), 종료 전에 <code>at_exit</code> 블럭을 실행. <code>exit!</code>와 <code>abort</code> 뭐가 다른거? <code>at_exit</code> 블럭 실행 여부? 마지막으로 <code>raise</code> 예외를 처리 안하기.</p>
<h3>Process Can Fort</h3>
<p>실행중인 프로세스가 새로운 프로세스를 만드는 것. 새로운 프로세스는 원 프로세스의 복사본이다. fork된 자식 프로세스는 fork 시점에서 부모 프로세스가 사용하는 메모리와 file descriptor를 복사받아 공유할 수 있다. fork는 아주 빠르게 실행된다. fork로 만들어진 자식 프로세스가 해당 프로그램을 처음부터 다시 실행하는 것은 아님. 생성 상태에서 자식 프로세스로 실행된다. 책의 예제에서, 자식 프로세스는 <code>if</code> 앞에 있는 <code>puts</code>를 실행하지 않음. 멀티 코어 CPU에서 fork할 경우 모두 다른 core에서 프로세스가 실행된다고 보장할 수 없음.</p>
<h3>Orphaned Processes</h3>
<p>부모가 종료된 자식 프로세스들. 쉘에서 프로그램 실행하고 이놈이 자식 프로세스 생성했는데, <tt>Ctrl-C</tt> 해서 부모 프로세스 죽으면 자식은? 부모가 죽어도 자식은 암 영향 없이 계속 실행된다. 고아 프로세스 관리는? 일단 2가지 개념부터 &#8211; 데몬은 의도된 orphaned 프로세스다. 유닉스 시그널을 이용해 프로세스간 통신할 수 있다.</p>
<h3>Processes Are Friendly</h3>
<p><code>fork</code> 하면 메모리를 그대로 복사하는데 성능 문제가 있을 수 있다. 최신 유닉스에서는 CoW(copy-on-write) semantic을 사용하는데, 부모로부터 상속받은 메모리 영역을 수정하는 순간에 복사하는 기법. 문제는&#8230; <a href="http://www.ruby-lang.org">MRI</a>(ruby 참조 구현체), <a href="http://rubini.us/">Rubinius</a>(ruby 플랫폼, ruby 코드로부터 byte code 생성)는 CoW 지원하지 않는다. <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a>에서는 지원한다. fork를 많이 써야 하는 상황이면 <a href="http://www.rubyenterpriseedition.com/">Ruby Enterprise Edition</a> 사용을 고려해라.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=966</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tmux 튜토리얼 참고</title>
		<link>http://www.yuiworld.kr/suguni/?p=964</link>
		<comments>http://www.yuiworld.kr/suguni/?p=964#comments</comments>
		<pubDate>Sat, 24 Nov 2012 03:57:27 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[생활]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=964</guid>
		<description><![CDATA[tmux, screen 뭐 얘기는 많이 들었지만 서버 사이드 관리를 안하니 그다지 접근할 기회가 없었는데, vagrant 사용하면서 시도. http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/]]></description>
				<content:encoded><![CDATA[<p>tmux, screen 뭐 얘기는 많이 들었지만 서버 사이드 관리를 안하니 그다지 접근할 기회가 없었는데, vagrant 사용하면서 시도.</p>
<p>http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=964</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript 전역 변수와 delete</title>
		<link>http://www.yuiworld.kr/suguni/?p=957</link>
		<comments>http://www.yuiworld.kr/suguni/?p=957#comments</comments>
		<pubDate>Mon, 12 Nov 2012 07:30:19 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[Front-end]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[전역변수]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=957</guid>
		<description><![CDATA[아래처럼 적어 놓고 보니 애매하네~ 'use strict' 사용하자!!!]]></description>
				<content:encoded><![CDATA[<p>아래처럼 적어 놓고 보니 애매하네~</p>
<pre class="brush: jscript; title: ; notranslate">
var x = 10;
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
delete x;                                            // &gt; 안지워진다.
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
</pre>
<pre class="brush: jscript; title: ; notranslate">
var x = 10;
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
delete window.x;                                     // &gt; 안지워진다.
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
</pre>
<pre class="brush: jscript; title: ; notranslate">
window.x = 10;
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
delete x;                                            // &gt; 지워진다.
/* console.log(x); */                                // &gt; ReferenceError: x is not defined
console.log(typeof window.x, window.x, typeof x);    // &gt; undefined undefined undefined
</pre>
<pre class="brush: jscript; title: ; notranslate">
window.x = 10;
console.log(typeof window.x, window.x, typeof x, x); // &gt; number 10 number 10
delete window.x;                                     // &gt; 지워진다.
/* console.log(x); */                                // &gt; ReferenceError: x is not defined
console.log(typeof window.x, window.x, typeof x);    // &gt; undefined undefined undefined
</pre>
<p><strong><code>'use strict'</code> 사용하자!!!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=957</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs eshell sudo find-file 하기</title>
		<link>http://www.yuiworld.kr/suguni/?p=935</link>
		<comments>http://www.yuiworld.kr/suguni/?p=935#comments</comments>
		<pubDate>Mon, 05 Nov 2012 05:02:15 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=935</guid>
		<description><![CDATA[eshell에서 /etc/hosts 파일을 수정하고 싶은데, permission 때문에 sudo를 해야 한다. sudo find-file /etc/hosts 하면 될까? eshell에서의 sudo는 elisp으로 구현된 명령(built-in command)이다. Unix sudo를 실행하려면 *sudo를 실행하면 된다. 바로 보이겠지만, foo가 eshell built-in command이면 동일한 이름의 unix 명령어는 *foo로 실행하면 된다. Built-ins &#8211; Eshell: The Emacs Shell 참고. 암튼, sudo find-file /etc/hosts 하면 파일은 열리는데 저장할 [...]]]></description>
				<content:encoded><![CDATA[<p>eshell에서 /etc/hosts 파일을 수정하고 싶은데, permission 때문에 sudo를 해야 한다. <tt>sudo find-file /etc/hosts</tt> 하면 될까?</p>
<p>eshell에서의 <tt>sudo</tt>는 elisp으로 구현된 명령(built-in command)이다. Unix sudo를 실행하려면 <tt>*sudo</tt>를 실행하면 된다. 바로 보이겠지만, foo가 eshell built-in command이면 동일한 이름의 unix 명령어는 *foo로 실행하면 된다. <a href="http://www.gnu.org/software/emacs/manual/html_node/eshell/Built_002dins.html">Built-ins &#8211; Eshell: The Emacs Shell</a> 참고.</p>
<p>암튼, <tt>sudo find-file /etc/hosts</tt> 하면 파일은 열리는데 저장할 수가 없다. 열릴 때 부터 read-only 이다. 어떻게 해야 할까?</p>
<p><strong>해결책</strong></p>
<p><tt>find-file /sudo::/etc/hosts</tt> 하면 된다. 원격 접속을 위한 <a href="http://www.gnu.org/software/tramp/">Tramp</a>를 이용한 방법. 좀 번거롭긴 하지만, 일단 방법을 찾았으니 OK. 참고로 <q cite="http://www.gnu.org/software/tramp/">tramp stands for `Transparent Remote (file) Access, Multiple Protocol&#8217;. This package provides remote file editing, similar to Ange-FTP</q> 임.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=935</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little Schemer</title>
		<link>http://www.yuiworld.kr/suguni/?p=927</link>
		<comments>http://www.yuiworld.kr/suguni/?p=927#comments</comments>
		<pubDate>Mon, 05 Nov 2012 03:55:28 +0000</pubDate>
		<dc:creator>suguni</dc:creator>
				<category><![CDATA[Programming?]]></category>
		<category><![CDATA[공부]]></category>
		<category><![CDATA[scheme]]></category>

		<guid isPermaLink="false">http://www.yuiworld.kr/suguni/?p=927</guid>
		<description><![CDATA[Code : https://github.com/suguni/my-study/blob/master/schemer/little.ss 5. *Oh My Gawd*: It&#8217;s Full of Stars 제1계명 : When recurring on a list of atoms, lat, ask two questions about it: (null? lat) and else. When recurring on a number, n, ask two questions about it: (zero? n) and else. When recurring on a list of S-expressions, l, ask three [...]]]></description>
				<content:encoded><![CDATA[<p>Code : <a href="https://github.com/suguni/my-study/blob/master/schemer/little.ss">https://github.com/suguni/my-study/blob/master/schemer/little.ss</a></p>
<h3>5. *Oh My Gawd*: It&#8217;s Full of Stars</h3>
<p><strong>제1계명</strong> :<br />
When recurring on a list of atoms, lat, ask two questions about it: (null? lat) and else.<br />
When recurring on a number, n, ask two questions about it: (zero? n) and else.<br />
When recurring on a list of S-expressions, l, ask three question about it: (null? l), (atom? (car l)), and else.</p>
<p><strong>제4계명</strong> :<br />
되풀이하는(recurring) 동안 항상 하나 이상의 인자(argument)를 변경해라. Atom의 리스트 lat를 되풀이 할 때는 (cdr lat)를 사용해라. 숫자 n을 되풀이 할 때는 (sub1 n)를 사용해라. S-expression의 리스트 l을 되풀이 할 때는, (null? l)도 아니고 (atom? (car l))도 아닌 경우에 (car l)와 (cdr l)를 사용해라.<br />
인자는 종료에 가까워지도록 변경되어야 한다. 인자는 종료 조건에 맞는지 다음과 같이 검사하면 된다.<br />
cdr를 사용할때는 null?로 검사하고,<br />
sub1을 사용할때는 zero?로 검사해라.</p>
<h3>6. Shadows</h3>
<p><strong>제7계명</strong> :<br />
같은 성질을 가진 subparts에 대해 되풀이해라.<br />
- 리스트의 하위리스트<br />
- Arithmetic expression의 하위 표현식(subexpression)</p>
<p><strong>제8계명</strong> :<br />
표현을 추상화하기 위해 도움 함수를 사용해라. Use help functions to abstract from representations.</p>
<h3>8. lambda the Ultimate</h3>
<p><strong>제9계명</strong> :<br />
공통된 패턴을 새로운 함수로 추상화해라. Abstract common patterns with a new function.</p>
<p><strong>제10계명</strong> :<br />
한 번에 하나 이상의 값을 수집하는 함수를 만들어라. Build functions to collect more than one value at a time.</p>
<p><code>multiremberEco</code> 함수. 조건에 맞으면 두번째, 틀리면 첫번째 인자로 주어진 collector(continuation)을 실행한 결과를 반환. continuation이라고 나오는데 이게 FP에서 얘기하는 <a href="http://en.wikipedia.org/wiki/Continuation">continuation</a>인지??? 오&#8230;</p>
<h3>9. &#8230; and Again, and Again, and Again, &#8230;</h3>
<ul>
<li>partial function : 인자값에 따라 결과가 나오지 않을수도 있는 함수</li>
<li>total function : 어떤 인자가 들어와도 결과값이 나오는 함수</li>
</ul>
<p>어떤 함수가 partial 인지 total 인지 알 수 없다. &#8211; 불완정성 원리, 괴델<br />
아래는 예제.</p>
<pre class="brush: lisp; title: ; notranslate">
(define eternity (lambda (x) (eternity x)))
;; will-stop?은 인자(함수)가 full function 인지를 판별하는 함수이다.
(define last-try
  (lambda (x)
    (and (will-stop? last-try)
         (eternity x))))
</pre>
<p>중간에 <a href="http://en.wikipedia.org/wiki/Ackermann_function">애커만 함수</a> 언급. 애커만 함수는 total computable function이지만 primitive recursion이 아닌 가장 단순한 형태의 함수 중 하나. 모든 primitive recursion function은 total computable function이지만, 애커만 함수처럼 모든 total computable function이 항상 primitive recursion function인 것은 아니다.</p>
<p>음&#8230; 이상하다. total computable function은 위의 total function을 의미하는것 같은데, 애커만 함수는 total function이 아니다. 뭔가 잘못 이해하고 있음&#8230;ㅠㅠ</p>
<p>뒷 부분은 recursion 이 무엇인가에 대한 얘기. 최종적으로 applicative-order Y combinator를 만든다. <a href="http://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combinator">Y combinator</a>는 <a href="http://en.wikipedia.org/wiki/Fixed-point_combinator">Fixed-point combinator</a> 중 하나인데, fixed-point&#8230; 다시!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuiworld.kr/suguni/?feed=rss2&#038;p=927</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
