<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Geeking out with Lisp Flavoured Erlang</title>
	<atom:link href="http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/feed/" rel="self" type="application/rss+xml" />
	<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/</link>
	<description>Adventures in Open Source Erlang</description>
	<lastBuildDate>Sun, 06 Dec 2009 10:29:08 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-409490</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Tue, 19 May 2009 05:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-409490</guid>
		<description>@Robert Instead of using &#039;call&#039; I&#039;ll just define a macro that performs the same operation. This way I won&#039;t be using any parameterized module features that come with Erlang.</description>
		<content:encoded><![CDATA[<p>@Robert Instead of using &#8216;call&#8217; I&#8217;ll just define a macro that performs the same operation. This way I won&#8217;t be using any parameterized module features that come with Erlang.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Virding</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407630</link>
		<dc:creator>Robert Virding</dc:creator>
		<pubDate>Tue, 12 May 2009 14:20:36 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407630</guid>
		<description>Some responses:

- @Abhijith LFE has in no way died, just paused the last month. There is now a wiki (in github) to help people get started and a google group for discussions.

- LFE records look the way they do as they are defined to be compatible with vanilla erlang records. Tough I know, but not much to do about it. A goal of LFE is to be compatible with vanilla erlang and the OTP libraries.

- @Laqrix That is basically compatible with LFE records, though I based naming more on CL than scheme. This happened at the same time LFE went lisp-2 and adopted a more CL style. Defrecord also defines a macro to be used when matching, in the case of dog it would be match-dog and can be used like

(match-dog name &quot;fido&quot; size fido-size)

which match dogs called &quot;fido&quot; and return the dogs size in fido-size. All unmentioned fields will match anything of course.

- @Yariv You should be careful using the tuple structure like that, if parameterized module ever get adopted it might not work anymore. :-)</description>
		<content:encoded><![CDATA[<p>Some responses:</p>
<p>- @Abhijith LFE has in no way died, just paused the last month. There is now a wiki (in github) to help people get started and a google group for discussions.</p>
<p>- LFE records look the way they do as they are defined to be compatible with vanilla erlang records. Tough I know, but not much to do about it. A goal of LFE is to be compatible with vanilla erlang and the OTP libraries.</p>
<p>- @Laqrix That is basically compatible with LFE records, though I based naming more on CL than scheme. This happened at the same time LFE went lisp-2 and adopted a more CL style. Defrecord also defines a macro to be used when matching, in the case of dog it would be match-dog and can be used like</p>
<p>(match-dog name &#8220;fido&#8221; size fido-size)</p>
<p>which match dogs called &#8220;fido&#8221; and return the dogs size in fido-size. All unmentioned fields will match anything of course.</p>
<p>- @Yariv You should be careful using the tuple structure like that, if parameterized module ever get adopted it might not work anymore. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wei Zhu</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407514</link>
		<dc:creator>Wei Zhu</dc:creator>
		<pubDate>Tue, 12 May 2009 03:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407514</guid>
		<description>Yariv, I have no idea what this article is about :-). I am just testing your Connect integration.</description>
		<content:encoded><![CDATA[<p>Yariv, I have no idea what this article is about :-). I am just testing your Connect integration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laqrix</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407478</link>
		<dc:creator>Laqrix</dc:creator>
		<pubDate>Mon, 11 May 2009 23:15:35 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407478</guid>
		<description>For comparison, consider a different Lisp macro (or in my case Scheme):

(define-erlang-record dog name parent)

define-erlang-record emits a new macro &#039;dog&#039; which provides syntax that
starts with the type name.

( make [field value] ...)
( copy source [field value] ...)
(  instance)

For creation, fields are named and required. Generally, I don&#039;t like
optional fields.

(define lola
  (dog make [name &quot;Lola&quot;] [parent #f]))
(define rocky
  (dog make [name &quot;Rocky&quot;] [parent #f]))

lola =&gt; #(dog &quot;Lola&quot; #f)
rocky =&gt; #(dog &quot;Rocky&quot; #f)

For functional updating provide copy. Any unspecified fields come from
the source record:

(define new-lola
  (dog copy lola [parent rocky]))

new-lola =&gt; #(dog &quot;Lola&quot; #(dog &quot;Rocky&quot; #f))

Accessors can be used like this:

(dog name lola)

The macro can generate syntax errors for duplicate, missing, and
unknown fields. The macro can allow the fields to occur in any order.

If each accessor performs a type check, then with pattern matcher
support, you can do a single type check and extract multiple fields.

A possible matcher syntax might be:

(match x
  [`(dog [name ,name] [parent ,top-dog])
   ;; name and top-dog are now bound in this scope
   ...]
  ...)

Food for thought.</description>
		<content:encoded><![CDATA[<p>For comparison, consider a different Lisp macro (or in my case Scheme):</p>
<p>(define-erlang-record dog name parent)</p>
<p>define-erlang-record emits a new macro &#8216;dog&#8217; which provides syntax that<br />
starts with the type name.</p>
<p>( make [field value] &#8230;)<br />
( copy source [field value] &#8230;)<br />
(  instance)</p>
<p>For creation, fields are named and required. Generally, I don&#8217;t like<br />
optional fields.</p>
<p>(define lola<br />
  (dog make [name "Lola"] [parent #f]))<br />
(define rocky<br />
  (dog make [name "Rocky"] [parent #f]))</p>
<p>lola =&gt; #(dog &#8220;Lola&#8221; #f)<br />
rocky =&gt; #(dog &#8220;Rocky&#8221; #f)</p>
<p>For functional updating provide copy. Any unspecified fields come from<br />
the source record:</p>
<p>(define new-lola<br />
  (dog copy lola [parent rocky]))</p>
<p>new-lola =&gt; #(dog &#8220;Lola&#8221; #(dog &#8220;Rocky&#8221; #f))</p>
<p>Accessors can be used like this:</p>
<p>(dog name lola)</p>
<p>The macro can generate syntax errors for duplicate, missing, and<br />
unknown fields. The macro can allow the fields to occur in any order.</p>
<p>If each accessor performs a type check, then with pattern matcher<br />
support, you can do a single type check and extract multiple fields.</p>
<p>A possible matcher syntax might be:</p>
<p>(match x<br />
  [`(dog [name ,name] [parent ,top-dog])<br />
   ;; name and top-dog are now bound in this scope<br />
   &#8230;]<br />
  &#8230;)</p>
<p>Food for thought.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407403</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Mon, 11 May 2009 19:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407403</guid>
		<description>@Tom You&#039;re right, it was a bug.

@Abhijith I think Robert Virding is still working on it.</description>
		<content:encoded><![CDATA[<p>@Tom You&#8217;re right, it was a bug.</p>
<p>@Abhijith I think Robert Virding is still working on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhijith</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407397</link>
		<dc:creator>Abhijith</dc:creator>
		<pubDate>Mon, 11 May 2009 17:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407397</guid>
		<description>I had given LFE a cursory look but if the development moves forward I think it would be the ideal language for me - lisp syntax, macros and erlang features.
Is the development of LFE going anywhere ? It seems to have stalled.</description>
		<content:encoded><![CDATA[<p>I had given LFE a cursory look but if the development moves forward I think it would be the ideal language for me &#8211; lisp syntax, macros and erlang features.<br />
Is the development of LFE going anywhere ? It seems to have stalled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407389</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Mon, 11 May 2009 15:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407389</guid>
		<description>Ever used the parse transform exprecs? An Ulf Wiger creation I think - it does much to remove the &#039;wreck&#039; from &#039;record&#039; imho.  Very handy for writing simple specialized record access/manipulation functions too.</description>
		<content:encoded><![CDATA[<p>Ever used the parse transform exprecs? An Ulf Wiger creation I think &#8211; it does much to remove the &#8216;wreck&#8217; from &#8216;record&#8217; imho.  Very handy for writing simple specialized record access/manipulation functions too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://yarivsblog.com/articles/2009/05/11/geeking-out-with-lisp-flavoured-erlang/comment-page-1/#comment-407351</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 11 May 2009 09:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://yarivsblog.com/?p=270#comment-407351</guid>
		<description>I presume you mean 

Dog = #dog{name = &quot;Lolo&quot;, parent = #dog{name = &quot;Max&quot;}},

not 

Dog = #Dog{name = &quot;Lolo&quot;, parent = #dog{name = &quot;Max&quot;}},

?</description>
		<content:encoded><![CDATA[<p>I presume you mean </p>
<p>Dog = #dog{name = &#8220;Lolo&#8221;, parent = #dog{name = &#8220;Max&#8221;}},</p>
<p>not </p>
<p>Dog = #Dog{name = &#8220;Lolo&#8221;, parent = #dog{name = &#8220;Max&#8221;}},</p>
<p>?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
