<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-6800934446457898793.post6237409105482969135..comments</id><updated>2009-11-19T08:59:24.398-05:00</updated><title type='text'>Comments on Moserware: Building an Object-Oriented Parasitic Metalanguage...</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.moserware.com/feeds/6237409105482969135/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html'/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>16</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-198332364070706567</id><published>2009-03-17T13:43:22.486-04:00</published><updated>2009-03-17T13:43:22.486-04:00</updated><title type='text'>Thanks.  I understand perfectly now.  I thought th...</title><content type='html'>Thanks.  I understand perfectly now.  I thought this was a parser being written in C#.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/198332364070706567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/198332364070706567'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1237311802486#c198332364070706567' title=''/><author><name>GreGor</name><uri>http://www.blogger.com/profile/07815471805312437872</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2598947985721670198</id><published>2009-03-17T13:28:27.452-04:00</published><updated>2009-03-17T13:28:27.452-04:00</updated><title type='text'>GreGor: After this post was written, I changed "&lt;:...</title><content type='html'>GreGor: After this post was written, I changed &amp;quot;&amp;lt;:&amp;quot; to just be &amp;quot;:&amp;quot; to make it more like C#. OMeta#&amp;#39;s parser is written in OMeta itself. The rule that handles parsing this top level is &lt;A HREF="http://ometasharp.codeplex.com/SourceControl/changeset/view/17706#360103" REL="nofollow"&gt;in OMetaParser.ometacs&lt;/A&gt;. Specifically, look at the &amp;quot;Grammar&amp;quot; rule there.&lt;BR/&gt;&lt;BR/&gt;Note the:&lt;BR/&gt;&lt;BR/&gt;( &amp;quot;:&amp;quot; Name | Empty -&amp;gt; { &amp;quot;OMeta&amp;quot; } ):sn BaseTypeDef:btd&lt;BR/&gt;&lt;BR/&gt;This means that it&amp;#39;s expecting a &amp;quot;:&amp;quot; followed by whatever matches the &amp;quot;Name&amp;quot; rule. If it doesn&amp;#39;t find this, it matches the &amp;quot;Empty&amp;quot; rule and that will return &amp;quot;OMeta&amp;quot; meaning that implied base grammar is &amp;quot;OMeta&amp;quot; unless you override it.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2598947985721670198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2598947985721670198'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1237310907452#c2598947985721670198' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-5899631625040197204</id><published>2009-03-17T12:23:13.051-04:00</published><updated>2009-03-17T12:23:13.051-04:00</updated><title type='text'>I'm still a bit confused about the &lt;: operator.  I...</title><content type='html'>I&amp;#39;m still a bit confused about the &amp;lt;: operator.  It is an operator I&amp;#39;m not aware of.&lt;BR/&gt;&lt;BR/&gt;Where is a &amp;lt;: operator defined?&lt;BR/&gt;&lt;BR/&gt;I&amp;#39;ve used the google - can&amp;#39;t find anything.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/5899631625040197204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/5899631625040197204'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1237306993051#c5899631625040197204' title=''/><author><name>GreGor</name><uri>http://www.blogger.com/profile/07815471805312437872</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-220159806431527161</id><published>2009-03-17T11:42:04.268-04:00</published><updated>2009-03-17T11:42:04.268-04:00</updated><title type='text'>GreGor: The "&lt;:" operator there means that the "Ca...</title><content type='html'>GreGor: The &amp;quot;&amp;lt;:&amp;quot; operator there means that the &amp;quot;Calculator&amp;quot; grammar &amp;quot;inherits&amp;quot; from the &amp;quot;Parser&amp;quot; grammar. Essentially, this means that the &amp;quot;Calculator&amp;quot; grammar has access to all of &amp;quot;Parser&amp;quot;&amp;#39;s rules and can extend them or call back to the base grammar using the &amp;quot;Super&amp;quot; call.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/220159806431527161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/220159806431527161'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1237304524268#c220159806431527161' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2425888366266495965</id><published>2009-03-17T11:11:26.528-04:00</published><updated>2009-03-17T11:11:26.528-04:00</updated><title type='text'>what is the operator &lt;: you're using for the calc ...</title><content type='html'>what is the operator &amp;lt;: you&amp;#39;re using for the calc + parser connection in the class declaration?  Is it some sort of one way inheritance?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2425888366266495965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2425888366266495965'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1237302686528#c2425888366266495965' title=''/><author><name>GreGor</name><uri>http://www.blogger.com/profile/07815471805312437872</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-1015589384777883116</id><published>2008-08-06T23:19:30.514-04:00</published><updated>2008-08-06T23:19:30.514-04:00</updated><title type='text'>Yes, thank you.  I will be keeping track of your p...</title><content type='html'>Yes, thank you.  I will be keeping track of your progress.  Godd luck.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/1015589384777883116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/1015589384777883116'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1218079170514#c1015589384777883116' title=''/><author><name>Kyle Lahnakoski</name><uri>http://www.blogger.com/profile/12480148399162216639</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2148807322114170733</id><published>2008-08-05T22:58:49.500-04:00</published><updated>2008-08-05T22:58:49.500-04:00</updated><title type='text'>kyle lahnakoski:After a first pass, it seems like ...</title><content type='html'>kyle lahnakoski:&lt;BR/&gt;&lt;BR/&gt;After a first pass, it seems like you could write YAY in OMeta. You could take advantage of OMeta's BNF-like syntax (e.g. 'WordChar = "_" | Digit | Letter')&lt;BR/&gt;&lt;BR/&gt;OMeta# grammars are sort of like your "Parsers" concept but with a focus on OO and streams of anything.&lt;BR/&gt;&lt;BR/&gt;An interesting thing about OMeta is that you can hand off your input stream to a foreign grammar. It's a way of getting object-oriented features without having to derive or do multiple inheritance. &lt;BR/&gt;&lt;BR/&gt;As to your second question, in my current OMeta# code generator, all the variables are method-local. My parser keeps track of all of my variables used within the production/rule. If you look at the generated code, you'll notice that all of the local variables are emitted at the start of the method. This happens because I have a HashSet of all the variables while parsing the rule body.&lt;BR/&gt;&lt;BR/&gt;In theory, I could check the host expression for variables to make sure that they were declared. &lt;BR/&gt;&lt;BR/&gt;To really do it well for OMeta#, I'd need a much better host language understanding than I currently have so that I could do a richer semantic analysis. For example, the improved host language parser would be able to parse to trees like "[Method, op_add, [RegularString, "["], [VariableAccess, foo]]". With that richness of a tree like that, I could make sure that all the variable accesses had a corresponding variable definition using OMeta#'s host language predicates.&lt;BR/&gt;&lt;BR/&gt;For right now, I'm going to keep it simple and punt the hard work to the host language compiler. Perhaps I'll emit in a comment the original OMeta# input so that when they see the compiler error in the host language they'll have better context.&lt;BR/&gt;&lt;BR/&gt;Did that help answer your questions? Feel free to follow up.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2148807322114170733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2148807322114170733'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217991529500#c2148807322114170733' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-8747565590020747851</id><published>2008-08-05T15:59:15.139-04:00</published><updated>2008-08-05T15:59:15.139-04:00</updated><title type='text'>Oh!  I have not had the time to understand how OMe...</title><content type='html'>Oh!  I have not had the time to understand how OMeta (or others) could compile something like:&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;public class Example{&lt;BR/&gt;&lt;BR/&gt; public String toString(){&lt;BR/&gt;  return "("+x+", "+y+")";&lt;BR/&gt; }//method&lt;BR/&gt;&lt;BR/&gt; &lt;BR/&gt; int x;&lt;BR/&gt; int y; &lt;BR/&gt; &lt;BR/&gt;}//class&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;...into a working piece of code YET give reasonable compiler errors on &lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;public class Example{&lt;BR/&gt;&lt;BR/&gt; public String toString(){&lt;BR/&gt;  return "("+foo+", "+bar+")";&lt;BR/&gt; }//method&lt;BR/&gt;&lt;BR/&gt; &lt;BR/&gt; int x;&lt;BR/&gt; int y; &lt;BR/&gt;}//class&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;This has more to do with the semantic analysis of handing a graph of objects with a given namespace, rather than simple parse trees.&lt;BR/&gt;&lt;BR/&gt;Have you seen elegant OO-like solutions to this problem?  Or am I still stuck in the world of low-level semantic analysis?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/8747565590020747851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/8747565590020747851'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217966355139#c8747565590020747851' title=''/><author><name>Kyle Lahnakoski</name><uri>http://www.blogger.com/profile/12480148399162216639</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2086508212855449969</id><published>2008-08-05T15:17:35.669-04:00</published><updated>2008-08-05T15:17:35.669-04:00</updated><title type='text'>Jeff:Please forgive the deplorable state of my web...</title><content type='html'>Jeff:&lt;BR/&gt;&lt;BR/&gt;Please forgive the deplorable state of my web pages.  I have not had the desire to clean up the look (or the ideas) in many years.&lt;BR/&gt;&lt;BR/&gt;I have a write-up of what I was building:&lt;BR/&gt;&lt;BR/&gt;http://www.arcavia.com/Software/YAY/index.html&lt;BR/&gt;&lt;BR/&gt;If you really want code:  The YAY runs in the DBOS, which can be found at:&lt;BR/&gt;&lt;BR/&gt;http://www.arcavia.com/Software/DBOS/index.html</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2086508212855449969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2086508212855449969'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217963855669#c2086508212855449969' title=''/><author><name>Kyle Lahnakoski</name><uri>http://www.blogger.com/profile/12480148399162216639</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-6740188585984288019</id><published>2008-08-02T10:32:49.708-04:00</published><updated>2008-08-02T10:32:49.708-04:00</updated><title type='text'>domenic:Maybe the right approach is to at least of...</title><content type='html'>domenic:&lt;BR/&gt;&lt;BR/&gt;Maybe the right approach is to at least offer a version that will modify the semantic action { x + y } to use reflection to look for the add operator that is the most in line with what you want to do. You&amp;#39;d pay the cost of reflection, but you wouldn&amp;#39;t have to annotate the type.&lt;BR/&gt;&lt;BR/&gt;Another idea I had is that if you would annotate your grammar for what the input and default output types are, you wouldn&amp;#39;t have to specify them elsewhere unless you wanted to &amp;quot;override&amp;quot; the defaults.&lt;BR/&gt;&lt;BR/&gt;For example, &amp;quot;ometa Calculator&amp;lt;char, int&amp;gt; &amp;lt;: Parser { ... Number = Number:n Digit:d -&amp;gt; { n * 10 + d } ... }&amp;quot;&lt;BR/&gt;&lt;BR/&gt;In this case, I&amp;#39;d rewrite the semantic action to cast things appropriately as I do now (e.g. .As&amp;lt;int&amp;gt;()). Then, I push the static analysis work to the C# compiler. It&amp;#39;s sort of an extension of your first idea, but makes the common case cleaner by providing a default.&lt;BR/&gt;&lt;BR/&gt;Ideally though, the Duck Typing will probably win out long term since it&amp;#39;s less work (make the program work harder instead of the programmer). However, it&amp;#39;d be nice to have an explicitly typed one as well for performance reasons.&lt;BR/&gt;&lt;BR/&gt;If anyone knows obvious DLR or other tricks that I&amp;#39;m missing, please speak up :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/6740188585984288019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/6740188585984288019'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217687569708#c6740188585984288019' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-1367935454087488975</id><published>2008-08-01T14:09:43.212-04:00</published><updated>2008-08-01T14:09:43.212-04:00</updated><title type='text'>Hmm, I see your point regarding where the grammar ...</title><content type='html'>Hmm, I see your point regarding where the grammar is being changed. I dunno, seems worthwhile to me though; you&amp;#39;re kind of extending OMeta to be more type-safe, which seems quite worthy of something called Omega# (emphasis on the sharp).&lt;BR/&gt;&lt;BR/&gt;Regarding duck typing, I have absolutely no idea what I&amp;#39;m talking about, and feel especially bad saying anything given that people have presumably written papers about this. But with that said, my thought would be that maybe you don&amp;#39;t need to actually identify x and y as ints, but rather as any type which has either an Add method or an overloaded + operator defined? So you&amp;#39;d just write&lt;BR/&gt;&lt;BR/&gt;AddExpr = AddExpr:x &amp;#39;+&amp;#39; MulExpr:y -&amp;gt; { x + y }&lt;BR/&gt;&lt;BR/&gt;And this would be shorthand for  (making up syntax here)&lt;BR/&gt;&lt;BR/&gt;AddExpr = AddExpr:x&amp;lt;T&amp;gt; &amp;#39;+&amp;#39; MulExpr:y&amp;lt;U&amp;gt; -&amp;gt; { x + y } where T : static Add(T, U)&lt;BR/&gt;&lt;BR/&gt;I have no idea how the implementation details on this would work, but presumably all this can be done with compile-time checking: first figure out what operations are needed, then make sure that the appropriate types have them, given specific instances of T and U. This is kinda shaky though, since I&amp;#39;m not entirely clear on what&amp;#39;s happening at compile time versus runtime. (Or rather, I&amp;#39;ve forgotten the details since I read this blog post the other day :P).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/1367935454087488975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/1367935454087488975'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217614183212#c1367935454087488975' title=''/><author><name>Domenic</name><uri>http://www.domenicdenicola.com/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-4801085738114896455</id><published>2008-07-31T19:07:33.028-04:00</published><updated>2008-07-31T19:07:33.028-04:00</updated><title type='text'>js:As I mentioned in the previous two posts, F# is...</title><content type='html'>js:&lt;BR/&gt;&lt;BR/&gt;As I mentioned in the previous two posts, F# is definitely a great language for the reason you mentioned (descendent of ML). However, I felt that it would unnecessarily burden people to get started with OMeta. If we use C#, then people could (in theory) add generated C# to their projects as if they wrote it by hand. It fits in with a gradual adoption of OMeta.&lt;BR/&gt;&lt;BR/&gt;As for the runtime in C#, I&amp;#39;m trying to keep things as friction free as possible. If I would have required F#, that would have been an extra thing people would need to get started.&lt;BR/&gt;&lt;BR/&gt;Besides, perhaps doing this first in a hard language like C# might pay off later with a better understanding of the platform :).&lt;BR/&gt;&lt;BR/&gt;But regardless, yes -- F# is a fantastic language. I&amp;#39;m hoping to steal some good ideas from ML and friends.&lt;BR/&gt;&lt;BR/&gt;--&lt;BR/&gt;&lt;BR/&gt;domenic:&lt;BR/&gt;&lt;BR/&gt;1. Very interesting thought! It would shave off 5 characters per variable reference and be parasitic with C#. Perhaps I could make that the standard way of specifying a type to give hints to weak type inference algorithm. &lt;BR/&gt;&lt;BR/&gt;My only concern is that it would be a change to the OMeta parser grammar itself rather than to the Semantic action/expression. I don&amp;#39;t suppose you have additional thoughts on how to get duck typing to work in this environment so that the &amp;lt;int&amp;gt; annotations wouldn&amp;#39;t be needed?&lt;BR/&gt;&lt;BR/&gt;2. I haven&amp;#39;t seen this in the wild. But that looks like a good potential for a VS addin. My hope is that someone can show me the ropes of writing VS debugger support for OMeta itself. That way, instead of stepping through generated code, you&amp;#39;re only dealing with the OMeta grammar source file itself (it&amp;#39;d highlight in yellow each rule application as it happened if you pressed F11).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/4801085738114896455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/4801085738114896455'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217545653028#c4801085738114896455' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-7673849780934355800</id><published>2008-07-31T18:34:05.357-04:00</published><updated>2008-07-31T18:34:05.357-04:00</updated><title type='text'>Very neat :).Two things:1) I would imagine the syn...</title><content type='html'>Very neat :).&lt;BR/&gt;&lt;BR/&gt;Two things:&lt;BR/&gt;&lt;BR/&gt;1) I would imagine the syntax could be much improved by replacing things like&lt;BR/&gt;&lt;BR/&gt;AddExpr = AddExpr:x &amp;#39;+&amp;#39; MulExpr:y -&amp;gt; { x.As&amp;lt;int&amp;gt;() + y.As&amp;lt;int&amp;gt;() }&lt;BR/&gt;&lt;BR/&gt;with, say,&lt;BR/&gt;&lt;BR/&gt;AddExpr = AddExpr:x&amp;lt;int&amp;gt; &amp;#39;+&amp;#39; MulExpr:y&amp;lt;int&amp;gt; -&amp;gt; { x + y }&lt;BR/&gt;&lt;BR/&gt;Especially when you end up calling .As&amp;lt;int&amp;gt; on the same object multiple times...&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;2) Debugging. One solution I kind of hope for is a &amp;quot;automatic step through&amp;quot;... it would be equivalent to pressing F11 every 1 second (or whatever), but you can just press (say) spacebar and it&amp;#39;ll pause. I&amp;#39;m surprised I haven&amp;#39;t seen this already... do you know of any such solution, maybe as a VS addin?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/7673849780934355800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/7673849780934355800'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217543645357#c7673849780934355800' title=''/><author><name>Domenic</name><uri>http://www.domenicdenicola.com/</uri><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-3338426408802557404</id><published>2008-07-31T13:55:27.233-04:00</published><updated>2008-07-31T13:55:27.233-04:00</updated><title type='text'>May I suggest that you take a look at F# as your i...</title><content type='html'>May I suggest that you take a look at F# as your implementing language?  ML-family languages in their own right lend themselves to language parser and compiler tasks.  Hosting OMeta in it seems like the shortest route to providing OMeta .Net support.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/3338426408802557404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/3338426408802557404'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217526927233#c3338426408802557404' title=''/><author><name>JS</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-2509939140864659633</id><published>2008-07-31T11:56:09.124-04:00</published><updated>2008-07-31T11:56:09.124-04:00</updated><title type='text'>Kyle Lahnakoski:One small approach if you're using...</title><content type='html'>Kyle Lahnakoski:&lt;BR/&gt;&lt;BR/&gt;One small approach if you're using .NET, is to annotate a method with the "[DebuggerStepThrough]" attribute and it will give a hint to the debugger to step through it.&lt;BR/&gt;&lt;BR/&gt;This helps a little in my "MetaRules" property in OMetaBase.cs (since it can be called literally thousands of times), but it is still far from ideal.&lt;BR/&gt;&lt;BR/&gt;Do you have a URL for your project?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2509939140864659633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/2509939140864659633'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217519769124#c2509939140864659633' title=''/><author><name>Jeff Moser</name><uri>http://www.blogger.com/profile/16074905903060665396</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='08376966494433799517'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry><entry><id>tag:blogger.com,1999:blog-6800934446457898793.post-724519050539055082</id><published>2008-07-31T09:08:18.866-04:00</published><updated>2008-07-31T09:08:18.866-04:00</updated><title type='text'>"…debugging is annoyingly difficult…  …stepping in...</title><content type='html'>"…debugging is annoyingly difficult…  …stepping into so many methods that fail often takes a long time…”&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;I would like to hear more of your ideas on how to solve this.  My own (inferior) grammar language project stalled when these debugging and optimization problems became unbearable.  Now I am working on compiler optimizations (assuming you consider a day-a-month still working).&lt;BR/&gt;&lt;BR/&gt;Thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/724519050539055082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6800934446457898793/6237409105482969135/comments/default/724519050539055082'/><link rel='alternate' type='text/html' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html?showComment=1217509698866#c724519050539055082' title=''/><author><name>Kyle Lahnakoski</name><email>noreply@blogger.com</email></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.moserware.com/2008/07/building-object-oriented-parasitic.html' ref='tag:blogger.com,1999:blog-6800934446457898793.post-6237409105482969135' source='http://www.blogger.com/feeds/6800934446457898793/posts/default/6237409105482969135' type='text/html'/></entry></feed>