<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
	<channel>
		<title>LangDev</title>
		<link>http://langdev.net/board/discussion</link>
		<description>The latest posts from LangDev</description>
		<pubDate>Wed, 01 Jul 2009 07:49:51 +0900</pubDate>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/langdev" type="application/rss+xml" /><item>
			<title><![CDATA[2009년 7월 1~6일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/8sUc6WEPLoU/305</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.reverberate.org/2009/06/26/books-about-parsing/"&gt;Books About Parsing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://cacm.acm.org/blogs/blog-cacm/32212-the-end-of-a-dbms-era-might-be-upon-us/fulltext"&gt;The End of a DBMS Era (Might be Upon Us)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://lua-users.org/wiki/LuaCoroutinesVersusPythonGenerators"&gt;Lua Coroutines Versus Python Generators&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/8sUc6WEPLoU" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Wed, 01 Jul 2009 07:49:51 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/305</feedburner:origLink></item>
		<item>
			<title><![CDATA[#langdev 접속자 단체사진]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/Z5oHOFEcF0w/304</link>
			<description>&lt;p&gt;&lt;a href="http://www.flickr.com/photos/heungsub/3671703114/"&gt;&lt;img src="http://farm3.static.flickr.com/2466/3671703114_6dac9de992.jpg" alt="정면에서 촬영한 이흥섭, 서상현, 김우승, 노우경, 김준기, 홍민희" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/heungsub/3670896669/"&gt;&lt;img src="http://farm3.static.flickr.com/2568/3670896669_8541f2ea55.jpg" alt="하단에서 촬영한 이흥섭, 서상현, 김우승, 노우경, 김준기, 홍민희" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/heungsub/tags/dwlive2009/"&gt;dw Live! 2009&lt;/a&gt;에서 찍은 사진입니다. Flickr 콘텐츠에 이름 태그를 다음과 같이 입력했는데 틀린 표기가 있다면 정정 요청해주세요.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;LeeHeungSub, SeoSangHyun, KimWooSeung, NohWooKyeong, KimJoonKi, HongMinHee
&lt;/code&gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/Z5oHOFEcF0w" height="1" width="1"/&gt;</description>
			<author><![CDATA[Heungsub]]></author>
			<pubDate>Mon, 29 Jun 2009 23:41:29 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/304</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 6월 19~25일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/jV6WNLeSHh4/303</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://factor-language.blogspot.com/2007/08/mixins.html"&gt;팩터 믹스인&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.embedded.com/columns/barrcode/216200567?printable=true"&gt;Bug-killing standards for firmware coding&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programmingpraxis.com/2009/06/16/who-owns-the-zebra/"&gt;프로그래밍 연습 문제: Who Owns The Zebra?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.eecs.harvard.edu/cs152/lectures/CS152-Lecture_14-Kernighan.pdf"&gt;Brian Kernighan, Random thoughts on scripting languages&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.abhishek-tiwari.com/2009/06/haskell-for-bioinformatics.html"&gt;Haskell for Bioinformatics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.doc.ic.ac.uk/~rak/papers/the%20early%20years.pdf"&gt;The Early Years of Logic Programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mixter.void.ru/exploit.html"&gt;Writing buffer overflow exploits - a tutorial for beginners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kvardek-du.kerno.org/2009/06/illustrating-sbcls-build-process.html"&gt;Illustrating SBCL’s build process&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blogs.sans.org/appsecstreetfighter/2009/06/23/session-attacks-and-php/"&gt;Session Attacks and PHP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Alan Kay
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://epresence.kmdi.utoronto.ca/mediacontent/1/watch/480.aspx"&gt;Should / Could Computing Be Better?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.guidebookgallery.org/articles/microelectronicsandthepersonalcomputer"&gt;Microelectronics and the Personal Computer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/jV6WNLeSHh4" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Thu, 25 Jun 2009 08:55:14 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/303</feedburner:origLink></item>
		<item>
			<title><![CDATA[재미있는 컴퓨터 프로그래밍 교재]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/XAbRqby4FJE/193</link>
			<description>&lt;p&gt;저는 컴퓨터 프로그래밍 교재를 쓰는 것(특히 입문자 대상으로)에 조금 관심이 있는데, 각자 인상깊거나 재미있게 접했던 교재(출판된 책이 아니라도 됩니다)를 적어봅시다. &lt;a href="http://mitpress.mit.edu/sicp/"&gt;&lt;abbr title="Structure and Interpretation of Computer Programs"&gt;SICP&lt;/abbr&gt;&lt;/a&gt;나 &lt;a href="http://www.htdp.org/"&gt;&lt;abbr title="How To Design Programs"&gt;HTDP&lt;/abbr&gt;&lt;/a&gt;는 이미 모두들 아시는 훌륭한 교재들이고, 저는 그보다는 덜 알려진 것—그래도 이 텍스트 역시 유명하죠—하나를 소개합니다.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://poignantguide.net/ruby/"&gt;Why’s (Poignant) Guide to Ruby&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;이 분도 유명한 Ruby 해커시죠? 그림(만화)도 그리시고, 밴드도 하신다고 들었습니다. 이런 것 말고도 좋은 교재 있으면 다른 분들도 소개해주세요.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/XAbRqby4FJE" height="1" width="1"/&gt;</description>
			<author><![CDATA[홍민희]]></author>
			<pubDate>Fri, 17 Oct 2008 02:44:46 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/193</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 6월 16일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/ZT2W0Ymq9lw/299</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://project-voldemort.com/blog/2009/06/building-a-1-tb-data-cycle-at-linkedin-with-hadoop-and-project-voldemort/"&gt;Building a terrabyte-scale data cycle at LinkedIn with Hadoop and Project Voldemort&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.jpstacey.info/blog/2009/06/15/django-internal-architecture-a-nice-pdf/"&gt;Django internal architecture: a nice PDF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://nothingintoinsight.blogspot.com/2009/02/how-to-hack-closures-in-your-c-code-or.html"&gt;How to Hack Closures in your C Code (or “The Closure Design-Pattern in C”)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sitecanary.com/blog/4"&gt;Markdown in Webpy Templates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/ZT2W0Ymq9lw" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Tue, 16 Jun 2009 08:57:53 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/299</feedburner:origLink></item>
		<item>
			<title><![CDATA[성문 기본 영어 - 명사편]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/SZMd1Jp-bqY/298</link>
			<description>&lt;p&gt;요즘에 들어서 다시 semmal을 개발하는 중인데…&lt;/p&gt;
&lt;p&gt;오래 전 어느 시절처럼 성문 기본 영어를 보는 기분입니다. 몇 년동안 명사편만 계속 보고 있는 기분 아시죠?&lt;/p&gt;
&lt;p&gt;시작은 최대한 빨리 만들어야지…라는 생각으로 시작하다가&lt;/p&gt;
&lt;p&gt;왜 계속 잘 만들어야지…라는 생각으로 빠지는지 모르겠습니다.&lt;/p&gt;
&lt;p&gt;이것저것 만지고 이거저거 추가하는 생각만으로도 파서는 커녕 렉서에서 막혀버립니다.&lt;/p&gt;
&lt;p&gt;python으로 만들어야지 하다가 haskell로 만들고, 그러다 erlang으로 만들고 싶은 욕심이들다가, c/c++로 옵니다.&lt;/p&gt;
&lt;p&gt;속으로 “이래서는 안되는거야…”라는 생각에 다시 python과 haskell로… 돌고 도는 군요.&lt;/p&gt;
&lt;p&gt;머리속에 쓸데없는 생각만 가득차서 손을 제대로 움직이는게 너무나도 힘드네요…&lt;/p&gt;
&lt;p&gt;결국 몰랐지만, 결과를 봤을 때 제 스스로 뭘 만드는지도 모르고 있다는 결론이겠지요.&lt;/p&gt;
&lt;p&gt;빨리든 자알이든 뭔가 만들기는 해야겠는데 말이죠.&lt;/p&gt;
&lt;p&gt;ascii나 하드웨어 의존적인 datatype을 배제하고, atomic으로 UTF16과 big num MP을 지원하도록 생각하니 선택해야하는 라이브러리만 생각해도 머리만 아픕니다. 그래서 계속 QT or ICU + GMP를 쓰기 위해 c/c++로 돌아오나 봅니다.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/SZMd1Jp-bqY" height="1" width="1"/&gt;</description>
			<author><![CDATA[semmal]]></author>
			<pubDate>Thu, 11 Jun 2009 18:33:10 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/298</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 6월 8~11일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/bht9u5tzyQo/297</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.programmersheaven.com/user/spickersgill/blog/956-Delegates-Explained-in-Plain-English/"&gt;.NET Delegates Explained in Plain English&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://shootout.alioth.debian.org/"&gt;The Computer Language Benchmarks Game&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.newsweek.com/id/197812"&gt;Ray Kurzweil wants to be a robot.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jlongster.com/blog/2009/05/25/mona-lisa-genetically-drawn-scheme/"&gt;Mona Lisa genetically drawn from Scheme&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code.google.com/intl/ko-KR/events/io/sessions/ThoughtWorksAppEngineJava.html"&gt;ThoughtWorks on App Engine for Java: An Enterprise Cumulonimbus?(Martin Fowler, Rebecca Parsons 발표)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.slideshare.net/michael.galpin/performance-comparisons-of-dynamic-languages-on-the-java-virtual-machine?type=powerpoint"&gt;Performance Comparisons of Dynamic Languages on the Java Virtual Machine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/bht9u5tzyQo" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Thu, 11 Jun 2009 09:38:41 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/297</feedburner:origLink></item>
		<item>
			<title><![CDATA[여러 값 반환]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/Q5_pVFrfzWU/290</link>
			<description>&lt;p&gt;어떤 프로그래밍 언어는 여러 값(multiple value)을 지원합니다. 함수가 여러 인자를 취할 수 있듯이, 여러 값을 반환할 수 있어야 한다는 것이죠. 이것은 여러 값을 담을 수 있는 튜플 같은 자료 구조를 제공하는 것과는 다릅니다.&lt;/p&gt;
&lt;p&gt;파이썬은 한 값만 반환할 수 있기 때문에, return 1, 2를 하면 (1, 2)라는 튜플이 만들어지고, 반환된 다음에 unpack 됩니다. (1, 2) 자체가 값이기 때문에, unpack 하지 않으면 튜플이 저장됩니다. 예를 들면,&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;C:\&amp;gt;python
Python 2.6.1
&amp;gt;&amp;gt;&amp;gt; def f(): return 1, 2
&amp;gt;&amp;gt;&amp;gt; a, b = f()
&amp;gt;&amp;gt;&amp;gt; c = f()
&amp;gt;&amp;gt;&amp;gt; print a, b, c
1 2 (1, 2)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;여러 값 반환을 하는 루아와 비교해 봅시다. 루아에서 return 1, 2는 (1, 2)라는 튜플을 만들지 않습니다. (루아에는 테이블만 있고 튜플이란 게 없지요.) return {1, 2}와는 다르다는 말입니다.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;C:\&amp;gt;lua
Lua 5.1.4
&amp;gt; function f() return 1, 2 end
&amp;gt; a, b = f()
&amp;gt; c = f()
&amp;gt; print(a, b, c)
1 2 1
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;루아는 (여러 값 반환을 지원하는 다른 언어와 마찬가지로) 대입하는 쪽에 숫자가 맞지 않으면 남은 값을 버리기 때문에, c에는 1, 2가 들어가는 것이 아니라 1만 들어갑니다.&lt;/p&gt;
&lt;p&gt;커먼 리습의 예는 다음과 같습니다.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;C:\&amp;gt;clisp
GNU CLISP 2.47
[1]&amp;gt; (defun f () (values 1 2))
[2]&amp;gt; (setf (values a b) (f))
[3]&amp;gt; (setf c (f))
[4]&amp;gt; (print (list a b c))
(1 2 1)
&lt;/code&gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/Q5_pVFrfzWU" height="1" width="1"/&gt;</description>
			<author><![CDATA[서상현]]></author>
			<pubDate>Wed, 27 May 2009 16:17:19 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/290</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 6월 5일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/bGNplVD3YZ0/295</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.groklaw.net/article.php?story=20090603224807259"&gt;Donald Knuth: Mathematical Ideas, or Algorithms, Should Not Be Patented&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.springsource.org/node/1482"&gt;Spring Python 1.0.0.RC2 Released&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.infoq.com/news/2009/06/FSharp-Nulls"&gt;The Many Types of Null in F#&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/bGNplVD3YZ0" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Fri, 05 Jun 2009 09:55:52 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/295</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 5월 19~29일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/_nm47C7QuLQ/292</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blogs.gurulabs.com/stephen/2009/05/cross-language-library-loading.html"&gt;Cross-language library loading on Parrot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://hivelogic.com/articles/view/top-10-programming-fonts"&gt;Top 10 Programming Fonts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://code-factor.blogspot.com/2009/04/blog-post.html"&gt;An ID3 Parser in Factor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://codytaylor.org/?p=14033"&gt;Recursive, Anonymous, and Simple functions in Javascript&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://factor-language.blogspot.com/2009/05/factors-implementation-of-polymorphic.html"&gt;Factor’s implementation of polymorphic inline caching&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dawsdesign.com/drupal/erlang-driver-walkthrough"&gt;Erlang Driver Walkthrough with Berkeley DB in C&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://scienceblogs.com/goodmath/2009/05/finally_finger_trees.php"&gt;Finally: Finger Trees!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://it.toolbox.com/blogs/database-soup/postgresql-development-priorities-31886"&gt;PostgreSQL Development Priorities&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://eigenclass.org/R2/writings/write-barrier-cost"&gt;When immutable data is faster: write barrier costs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.wired.com/gadgetlab/2009/05/homebrewed-cpu/"&gt;Homebrewed CPU Is a Beautiful Mess of Wires&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cs.utexas.edu/users/arvindn/misc/knuth_song_complexity.pdf"&gt;The Complexity of Songs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://haystacksearch.org/"&gt;Haystack&lt;/a&gt;: modular search for django&lt;/li&gt;
&lt;li&gt;&lt;a href="http://cruisecontrol.sourceforge.net/"&gt;CruiseControl&lt;/a&gt;: a continuous integration tool and an extensible framework for creating a custom continuous build process&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/_nm47C7QuLQ" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Fri, 29 May 2009 10:03:01 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/292</feedburner:origLink></item>
		<item>
			<title><![CDATA[부동소수점 계산 : Haskell과 다른 언어의 비교]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/gz-g_KhmMb4/279</link>
			<description>&lt;p&gt;사건의 발단은 이러합니다. - 4주에 걸친 지옥의 중간고사를 대비하여 공부를 하던 중 계산을 해야할 일이 생겼지요. 그리 복잡하진 않지만 손을 풀기는 귀찮고 계산기도 없었습니다. 그리하여 옆에 있던 랩탑의 자판을 잡고 잠시 어떤 걸로 계산을 할까 고민을 했습니다. 요새 다시 Haskell을 보고 있는지라 GHCi 콘솔을 열고 수식을 입력하고 결과를 확인했지요.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Prelude&amp;gt; (5 * 0.08206 * 300 ) / 10
12.309000000000001
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;제일 끝의 1이 거슬리긴 했지만 어쨌건 값이 12.309라는 걸 파악할 수 있었습니다. 다음 식을 입력했죠.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Prelude&amp;gt; 12.309 * 10 / 61.545
1.9999999999999998
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;엥? 대충 봐도 2가 나와야 하는데 애매하게 나오네요. 게다가 오차 자체는 아까의 1/5 이지만 여튼 …2가 차이가 나네요. 그래서 역으로도 계산을 해봤습니다.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Prelude&amp;gt; 12.309 * 5
61.544999999999995
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;-_-; Haskell의 부동소수점은 도저히 못 쓰겠다 싶어서 Ruby의 irb 콘솔을 열었습니다.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;irb(main):001:0&amp;gt; (5 * 0.08206 * 300) / 10
=&amp;gt; 12.309
irb(main):002:0&amp;gt; 12.309 * 10 / 61.545
=&amp;gt; 2.0
irb(main):003:0&amp;gt; 12.309 * 5
=&amp;gt; 61.545
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;깔끔하게 소수점 아래의 0은 떼어서 보여주네요. 이 맛에 Ruby를 쓰지요. 그런데 이 차이가 혹시 float와 double의 차이는 아닌가 싶어서 Eclipse CDT를 열었습니다. (MinGW 사용) C로는 세 가지로 테스트해 봤습니다.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;printf("(5 * 0.08206 * 300) / 10 = %f\n", (5 * 0.08206 * 300) / 10);
printf("12.309 * 10 / 61.545 = %f\n", 12.309 * 10 / 61.545);
printf("12.309 * 5 = %f\n", 12.309 * 5);

---- output

(5 * 0.08206 * 300) / 10 = 12.309000
12.309 * 10 / 61.545 = 2.000000
12.309 * 5 = 61.545000
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;먼저 그냥 계산하고 형이 정해져 있는 변수에 담지 않고 바로 출력입니다. 잘 나오네요.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;float f1 = (5 * 0.08206 * 300) / 10;
float f2 = 12.309 * 10 / 61.545;
float f3 = 12.309 * 5;

printf("(5 * 0.08206 * 300) / 10 = %f\n", f1);
printf("12.309 * 10 / 61.545 = %f\n", f2);
printf("12.309 * 5 = %f\n", f3);

---- output

(5 * 0.08206 * 300) / 10 = 12.309000
12.309 * 10 / 61.545 = 2.000000
12.309 * 5 = 61.544998
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;두 번째는 문제가 될 거라 예상되는 float에 저장한 다음 출력인데요, 앞의 둘은 문제가 없는데 세 번째 간단한 곱셈에서 문제가 생기네요. 게다가 오차는 Haskell의 경우보다 훨씬 크군요.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;double d1 = (5 * 0.08206 * 300) / 10;
double d2 = 12.309 * 10 / 61.545;
double d3 = 12.309 * 5;

printf("(5 * 0.08206 * 300) / 10 = %f\n", d1);
printf("12.309 * 10 / 61.545 = %f\n", d2);
printf("12.309 * 5 = %f\n", d3);

---- output

(5 * 0.08206 * 300) / 10 = 12.309000
12.309 * 10 / 61.545 = 2.000000
12.309 * 5 = 61.545000
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;마지막으로 문제가 없으리라 기대한 double입니다. 내부 비트야 모르겠지만 역시 잘 출력되네요. 그래서 의심이 생겼습니다. Haskell처럼 유효숫자를 늘려서 출력하면 어떨까요?&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;double d1 = (5 * 0.08206 * 300) / 10;
double d2 = 12.309 * 10 / 61.545;
double d3 = 12.309 * 5;

printf("(5 * 0.08206 * 300) / 10 = %.20f\n", d1);
printf("12.309 * 10 / 61.545 = %.20f\n", d2);
printf("12.309 * 5 = %.20f\n", d3);

---- output

(5 * 0.08206 * 300) / 10 = 12.30900000000000100000
12.309 * 10 / 61.545 = 1.99999999999999980000
12.309 * 5 = 61.54499999999999500000
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;뒤의 0을 떼고 보니 Haskell과 동일한 값이네요. 처음에 제가 겪었는 오차는 예상과는 다르게 float가 아니라 double로 게산했을 때 오차였습니다. (참고로 윈도 계산기로도 잘 게산이 됐습니다. 엑셀은 … 귀찮아서 생략)&lt;/p&gt;
&lt;p&gt;여기서 드는 의문점이 있네요. 일단 부동소수점 계산 자체가 완벽할 수는 없지요. 그렇다면 Haskell처럼 기계(machine)의 오차를 그대로 보여주는 게 좋을까요, 아니면 Ruby처럼 적당히 오차를 수정하여 보여주는 게 좋을까요? 혹은 C처럼 프로그래머가 오차 범위를 지정하게 하는 게 좋을까요?&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/gz-g_KhmMb4" height="1" width="1"/&gt;</description>
			<author><![CDATA[엽우]]></author>
			<pubDate>Sun, 19 Apr 2009 16:09:32 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/279</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 5월 13일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/E4iDVi6HQ9I/287</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://fritzing.org/"&gt;Fritzing - opensource circuit sketching tool for Arduino&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/jucs05.pdf"&gt;The Implementation of Lua 5.0(pdf)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://digitaltools.node3000.com/blog/1052-field-experimental-programming-suite"&gt;Field: New experimental kind of development environment from MIT Media Lab&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/E4iDVi6HQ9I" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Wed, 13 May 2009 16:37:41 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/287</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 5월 12일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/MJMAP6C_fuc/286</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/devlabs/dd795202.aspx"&gt;Axum&lt;/a&gt;: Microsoft’s Approach to Parallelism&lt;/li&gt;
&lt;li&gt;&lt;a href="http://duriansoftware.com/joe/The-Factor-game-framework.html"&gt;팩터(Factor) 게임 프레임워크&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/MJMAP6C_fuc" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Tue, 12 May 2009 10:17:09 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/286</feedburner:origLink></item>
		<item>
			<title><![CDATA[Robert Martin 가라사대 “What Killed Smalltalk Could Kill Ruby, Too”]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/FXDo1g8ZA6k/284</link>
			<description>&lt;p&gt;railsconf 2009 중 로버트 마틴의 강연입니다.&lt;/p&gt;
&lt;p&gt;&lt;embed src="http://blip.tv/play/AYGAlmaGvAQ" type="application/x-shockwave-flash" width="640" height="390" allowscriptaccess="always" allowfullscreen="true" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/FXDo1g8ZA6k" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Sat, 09 May 2009 19:59:38 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/284</feedburner:origLink></item>
		<item>
			<title><![CDATA[IRC 채널을 오징어로 이전합니다.]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/mOmfZP5gN8s/285</link>
			<description>&lt;p&gt;LangDev에서도 활동하고 계시는 &lt;a href="http://mearie.org/"&gt;강성훈&lt;/a&gt; 님께서 &lt;a href="http://ozinger.org/"&gt;오징어&lt;/a&gt;라는 새로운 IRC 서버를 마련해주셨습니다. 짝짝짝. 이제 HanIRC에서 CP949로 대화하지 않아도 됩니다. UTF-8으로 설정해주세요.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;서버&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;irc.ozinger.org&lt;/code&gt; (6667 포트를 사용할 수 없다고 합니다. 8080이나 6667을 제외한 6660-6669 포트를 사용하시면 됩니다.)&lt;/dd&gt;
&lt;dt&gt;채널&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;#langdev&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/mOmfZP5gN8s" height="1" width="1"/&gt;</description>
			<author><![CDATA[홍민희]]></author>
			<pubDate>Mon, 11 May 2009 15:02:41 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/285</feedburner:origLink></item>
		<item>
			<title><![CDATA[LangDev Wiki, IRC 채널도 있습니다.]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/QFdmjLihJtk/39</link>
			<description>&lt;p&gt;LangDev 사이트는 원래 IRC 채널에서 나왔습니다. IRC 하시는 분들은 접속해주세요.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;서버&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;irc.ozinger.org&lt;/code&gt; (6667 포트를 사용할 수 없다고 합니다. 8080이나 6667을 제외한 6660-6669 포트를 사용하시면 됩니다.)&lt;/dd&gt;
&lt;dt&gt;채널&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;#langdev&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;위키는 아래 주소로 접속하시면 됩니다.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://wiki.langdev.net/"&gt;http://wiki.langdev.net/&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/QFdmjLihJtk" height="1" width="1"/&gt;</description>
			<author><![CDATA[홍민희]]></author>
			<pubDate>Sun, 06 Apr 2008 00:24:37 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/39</feedburner:origLink></item>
		<item>
			<title><![CDATA[Type cast는 type 변환에 대한 부정적 견해에서 출발한 용어일까요?]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/Klw4cBXNmg0/276</link>
			<description>&lt;p&gt;C에서 형변환 연산을 명시적으로 적는 것에 대해서 type casting 한다고 하는데요. Cast의 정확한 의미가 ‘던지다’에서 나온 것 맞는지요. 던지다 혹은 내던지다에서 어원이 출발한 것 같아서요. 그렇다면 type을 내던져 버린다는 뜻인데 이걸 어떻게 해석하는게 좋을지 좀 의문입니다. C 언어 변수의 type이 가지는 제약을 벗어던지고, 프로그래머가 하고자 하는 값 형태로 연산을 마음대로 적용시키자는 의미라면 긍정정인 것 같기도 합니다. 마치 동적 언어의 낙관적 type 처럼 말이죠. 하지만 C는 표준화 과정에서 조금씩 type이 엄격해지는 형태를 취하게 됩니다. 그러면서 type cast가 거의 필요없게 되는데 그렇게 본다면 엄격한 type의미를 포기하는 위험한 행동이 되는거죠.&lt;/p&gt;
&lt;p&gt;p.s. 판타지 소설에서 주문(spell)을 casting 한다고 하죠. Type casting은 무엇이 발생할지 모르는 마법의 주문이 아닌지… ^_^&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/Klw4cBXNmg0" height="1" width="1"/&gt;</description>
			<author><![CDATA[김우승]]></author>
			<pubDate>Fri, 10 Apr 2009 08:14:58 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/276</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 5월 5일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/wcBadIm8zmo/283</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://leaf.dragonflybsd.org/~alexh/clang/clang.html"&gt;Compiling DragonFly BSD using llvm/clang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.artima.com/scalazine/articles/origins_of_scala.html"&gt;The Origins of Scala&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jaskell.codehaus.org/"&gt;Jaskell Programming Language&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/wcBadIm8zmo" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Tue, 05 May 2009 10:52:32 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/283</feedburner:origLink></item>
		<item>
			<title><![CDATA[CrossTwine Linker]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/9PwSOKzIUEs/282</link>
			<description>&lt;p&gt;&lt;a href="http://crosstwine.com/linker/"&gt;CrossTwine Linker&lt;/a&gt; makes dynamic languages much faster 라고 하는데 x86_64만 지원해서 지금 제 컴퓨터가 64비트가 아니라 실행해 볼 수가 없네요.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/9PwSOKzIUEs" height="1" width="1"/&gt;</description>
			<author><![CDATA[서상현]]></author>
			<pubDate>Sun, 03 May 2009 13:51:08 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/282</feedburner:origLink></item>
		<item>
			<title><![CDATA[2009년 4월 15~30일 이것저것]]></title>
			<link>http://feedproxy.google.com/~r/langdev/~3/dRvUxlgZoQ8/281</link>
			<description>&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.noop.nl/2009/04/the-optimal-team-size-is-five.html"&gt;The Optimal Team Size is Five&lt;/a&gt;: 정말일까요?&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.hatfulofhollow.com/posts/code/visualisingsorting/index.html"&gt;Visualising Sorting Algorithms&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://chneukirchen.org/blog/archive/2009/04/programming-for-android-with-scala.html"&gt;Programming for Android with Scala&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.leksah.org/"&gt;Leksah&lt;/a&gt;: 해스켈로 만든 해스켈 IDE&lt;/li&gt;
&lt;li&gt;&lt;a href="http://jasonmbaker.wordpress.com/2009/04/25/the-magic-of-python-decorators/"&gt;파이썬 데코레이터의 마법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.cilk.com/multicore-blog/bid/9185/A-Parallel-bzip2"&gt;A Parallel bzip2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sourceware.org/ml/libc-alpha/2009-04/msg00034.html"&gt;glibc도 git로 이전&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.alertdebugging.com/2009/04/29/building-a-better-javascript-profiler-with-webkit/"&gt;Building a Better JavaScript Profiler with WebKit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://feeds.feedburner.com/~r/langdev/~4/dRvUxlgZoQ8" height="1" width="1"/&gt;</description>
			<author><![CDATA[wooil]]></author>
			<pubDate>Thu, 30 Apr 2009 09:01:13 +0900</pubDate>
		<feedburner:origLink>http://langdev.net/post/281</feedburner:origLink></item>
	</channel>
</rss>
