-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrss.xml
More file actions
33 lines (32 loc) ยท 6.42 KB
/
rss.xml
File metadata and controls
33 lines (32 loc) ยท 6.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[daewon's log]]></title><description><![CDATA[about programming language]]></description><link>http://daewon.github.io</link><image><url>http://daewon.github.io/public/img/favorite.png</url><title>daewon's log</title><link>http://daewon.github.io</link></image><generator>NodeJS RSS Module</generator><lastBuildDate>Mon, 22 Jul 2013 02:11:06 GMT</lastBuildDate><atom:link href="http://daewon.github.io/rss.xml" rel="self" type="application/rss+xml"/><item><title><![CDATA[The reason Scala has a bottom type]]></title><description><![CDATA[<img src="http://www.gravatar.com/avatar/201e7a836b57569bf241ddd73d90c3bf?r=pg&s=48.jpg&d=identicon"><br/><h3 id="toc_24">Why <code>throw</code> has a type: <code>Nothing</code> in Scala</h3>
<h4 id="toc_25">Scala์์ <code>throw</code> ๋ ์ ํ์
์ด ํ์ํ ๊น? ์๋ ์๋ฌธ์ ์ดํด๋ณด์.</h4>
<pre><code class="scala"><span class="function"><span class="keyword">def</span> <span class="title">error</span><span class="params">(message: String)</span>:</span> Nothing = throw new RuntimeException(message)
<span class="function"><span class="keyword">def</span> <span class="title">divide</span><span class="params">(x: Int, y: Int)</span>:</span> Int = {
<span class="keyword">if</span> (y != <span class="number">0</span>) x / y
<span class="keyword">else</span> error(<span class="string">"can't divide by zero"</span>)
}
</code></pre><p>๋ช๊ฐ์ง ํน์ดํ ์ ์ ๋ฐ๊ฒฌํ ์ ์๋ค.</p>
<ol>
<li>divid ํจ์์ ๋ฐํ ํ์
์ <code>Int</code>์ด๋ค. ๊ทธ๋ฐ๋ฐ divid ํจ์์ ๋ณธ๋ฌธ์ <code>if/else</code> ๋ฟ์ด๋ฉฐ <code>if</code>์ <code>else</code>์ ๋ฐํ ํ์
์ด ๋ค๋ฅด๋ค.</li>
<li>error ํจ์์ ๋ฐํ ํ์
์ <code>Nothing</code>์ด๋ค. ๊ทธ๋ฐ๋ฐ errorํจ์์ ๋ณธ๋ฌธ์ <code>throw</code> ๋ฟ์ด๋ค. <code>throw</code>๊ฐ ๋๋ฉด ์คํ์ด ์ค์ง๋ ํ
๋ฐ ํ์
์ด ์ ํ์ํ ๊น?</li>
</ol>
]]></description><link>http://daewon.github.io/post/the-reason-scala-has-a-bottom-type</link><guid isPermaLink="false">the-reason-scala-has-a-bottom-type</guid><dc:creator><![CDATA[<a href="blueiur" target="_blank">daewon</a>]]></dc:creator><pubDate>Mon, 22 Jul 2013 17:00:00 GMT</pubDate></item><item><title><![CDATA[No more loops with Scala]]></title><description><![CDATA[<img src="http://www.gravatar.com/avatar/201e7a836b57569bf241ddd73d90c3bf?r=pg&s=48.jpg&d=identicon"><br/><h3 id="toc_18">์๋ฐ์์๋ ์ผ๋ฐ์ ์ผ๋ก loop๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ปฌ๋ ์
์ ๋ค๋ฃฌ๋ค.</h3>
<p><a href="http://daewon.github.com/post/next-generation-java-programming-style/">์ฐจ์ธ๋ ์๋ฐ ํ๋ก๊ทธ๋๋ฐ ์คํ์ผ</a>
์์๋ ์ดํด๋ณธ ๊ฒ๊ณผ ๊ฐ์ด loop๊ฐ ์ปฌ๋ ์
์ ๋ค๋ฃจ๋ ๊ฐ์ฅ ์ข์ ๋ฐฉ๋ฒ์ ์๋๋ค. loop๋ ์ฝ๋์ ๊ฐ๋
์ฑ์ ๋น ๋ฅด๊ฒ ๋ง๊ฐ๋จ๋ฆฐ๋ค.
ํจ์๊ฐ 1๊ธ ๊ฐ์ฒด์ธ ์ธ์ด๋ค์์๋ ์ด๋ฌํ loop๋ฅผ ๋ช
์์ ์ผ๋ก ๋
ธ์ถ์ํค์ง ์๊ณ <strong>๊ณ ์ฐจ ํจ์</strong> ๋ก ์ถ์ํ ์ํจ๋ค.
์ด๋ฐ ์ถ์ํ ๋๋ถ์ ์ปฌ๋ ์
์ ๋ค๋ฃจ๋ ๋ฐฉ๋ฒ์ด ๋งค์ฐ ๊ฐ๊ฒฐํ๊ณ ์ง๊ด์ ์ด๋ค.</p><p>์๋ฐ์์๋ ํจ์ํ ์คํ์ผ๋ก ์ปฌ๋ ์
์ ๋ค๋ฃจ๊ณ ์ ํ ์๋๋ก <a href="http://code.google.com/p/lambdaj/">lambdaj</a> ํ๋ก์ ํธ๊ฐ ์๋ค. </p><p>lambdaj๊ฐ ๋ง๋ค์ด์ง ์ด์ ๋ ๋ค์๊ณผ ๊ฐ๋ค</p>
<blockquote>
<p>๋ณต์กํ ๋ฐ์ดํฐ ๋ชจ๋ธ์ ๋ค๋ฃจ๋ ํ๋ก์ ํธ์์ ๋น์ฆ๋์ค ๋ก์ง์ ์๋น ๋ถ๋ถ์
์ด๋ค ์์
์ ์ํด์ ๋น์ง๋์ค ๊ฐ์ฒด์ ์ปฌ๋ ์
์ ์ํํ๋ ์ผ์ ๋ฐ๋ณต์ด๋ค.
loop๋ ์กฐ๊ฑด์ด ์ถ๊ฐ๋๊ฑฐ๋ ์ค์ฒฉ๋๊ธฐ ์์ํ๋ฉด ์ฝ๋๋ฅผ ์์ฑํ๋๊ฒ ๋ณด๋ค ์ฝ๊ธฐ๊ฐ ๋ ์ด๋ ค์์ง๋ค.
๊ทธ๋ ๊ธฐ ๋๋ฌธ์ ๋น์ง๋์ค ๋ก์ง์ด ์กฐ๊ธ ๋ ๊ธฐ์ ์ ์ธ ๋ถ๋ถ๊ณผ ๋ถ๋ฆฌ๋์ด ์์ฑ๋๊ธฐ๋ฅผ ์ํ๋ค.</p></blockquote>
]]></description><link>http://daewon.github.io/post/from-java-to-scala-scala-collections-hwalyong</link><guid isPermaLink="false">from-java-to-scala-scala-collections-hwalyong</guid><dc:creator><![CDATA[<a href="blueiur" target="_blank">daewon</a>]]></dc:creator><pubDate>Sun, 30 Dec 2012 17:00:00 GMT</pubDate></item><item><title><![CDATA[What's the result of [1, 2, 3].map(parseInt)]]></title><description><![CDATA[<img src="http://www.gravatar.com/avatar/201e7a836b57569bf241ddd73d90c3bf?r=pg&s=48.jpg&d=identicon"><br/><p><strong>[1, 2, 3].map(parseInt)๋ฅผ ์คํํ๋ฉด ์ด๋ค ๊ฒฐ๊ณผ๊ฐ ๋์ฌ๊น?</strong></p><p><img src="/post/Array.prototype.map_with_parseInt/@img/map.png" alt="wrongresult "></p><p>๊ฒฐ๊ณผ๋ [1, Nan, Nan]์ด ๋์ค๋๋ฐ ์์ธ์ map ํจ์์ ๊ตฌํ๊ณผ ๊ฐ๋ณ ์ธ์ ๋๋ฌธ์ ๋ฐ์ํ๋ค. </p><p>๋จผ์ ์๋ ์์ ์คํ ๊ฒฐ๊ณผ๋ฅผ ํ์ธํด ๋ณด์</p><pre><code class="javacript">[<span class="string">'1'</span>, <span class="string">'2'</span>, <span class="string">'3'</span>].map( <span class="built_in">function</span>(v, i, o){
<span class="keyword">return</span> parseInt(v)
}; <span class="comment">// [1, 2, 3]</span>
</code></pre>]]></description><link>http://daewon.github.io/post/Array.prototype.map_with_parseInt</link><guid isPermaLink="false">Array.prototype.map_with_parseInt</guid><dc:creator><![CDATA[<a href="blueiur" target="_blank">daewon</a>]]></dc:creator><pubDate>Sun, 09 Dec 2012 15:02:00 GMT</pubDate></item><item><title><![CDATA[Next generation Java Programming Style]]></title><description><![CDATA[<img src="http://www.gravatar.com/avatar/201e7a836b57569bf241ddd73d90c3bf?r=pg&s=48.jpg&d=identicon"><br/><h3 id="toc_20"><a href="http://codemonkeyism.com/generation-java-programming-style/">์ฐจ์ธ๋ ์๋ฐ ํ๋ก๊ทธ๋๋ฐ ์คํ์ผ</a></h3>
<p>๋ง์ ํ์ฌ์ ๊ฐ๋ฐ์๋ค์ด ์๋ฐ๋ก๋ถํฐ ์๋ก์ด ์ธ์ด์ธ <strong>Ruby, Python, Groovy, Erlang, Scala</strong> ๋ฑ์ผ๋ก ์ด๋ํ๋ค.</p><p>์ฌ์ ํ ์๋ฐ๋ฅผ ์ฌ์ฉํ๊ณ ์์์ง ๋ชจ๋ฅด๊ฒ ์ง๋ง, ์๋ฐ๋ฅผ ์ฌ์ฉํ๋๋ผ๋ ํ๋ก๊ทธ๋๋ฐ ์คํ์ผ์ ๋ฐ๊ฟ ์ ์๊ณ , ์๋ก์ด ์ธ์ด๋ก๋ถํฐ ์ฌ๋ฌ ์ด์ ์ ์ทจํ ์ ์๋ค.</p><p>์ต๊ทผ 15๋
๋์ ์๋ฐ์ ํ๋ก๊ทธ๋๋ฐ ์คํ์ผ์ ๋งค์ฐ ๋ง์ด ๋ณํ๋ค.</p>
<ul>
<li><strong>Final is your new love</strong></li>
</ul>
]]></description><link>http://daewon.github.io/post/next-generation-java-programming-style</link><guid isPermaLink="false">next-generation-java-programming-style</guid><dc:creator><![CDATA[<a href="blueiur" target="_blank">daewon</a>]]></dc:creator><pubDate>Sat, 01 May 2010 14:26:00 GMT</pubDate></item></channel></rss>