<?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-12467669.post6277355033913160132..comments</id><updated>2011-12-28T22:19:27.648-05:00</updated><category term='RailsConf2007'/><category term='books'/><category term='validations'/><category term='hash'/><category term='mocha'/><category term='codeline management'/><category term='contains?'/><category term='gui patterns'/><category term='include'/><category term='array'/><category term='expectations'/><category term='module'/><category term='restarting'/><category term='TDD'/><category term='memfn'/><category term='extension'/><category term='not'/><category term='rails'/><category term='rss'/><category term='unless'/><category term='one assertion per test'/><category term='Testing Refactorings'/><category term='validatable'/><category term='patch'/><category term='poro'/><category term='arbs'/><category term='java'/><category term='anti-pattern'/><category term='singleton class'/><category term='success'/><category term='RailsConf07'/><category term='InfoQ'/><category term='MMS'/><category term='lambda'/><category term='gems'/><category term='method_missing'/><category term='good to great'/><category term='goruco'/><category term='staying current'/><category term='class_eval'/><category term='initial development time'/><category term='code ownership'/><category term='controller'/><category term='interview'/><category term='iPhone'/><category term='state based'/><category term='starting'/><category term='functional testing'/><category term='expressive software'/><category term='unit testing'/><category term='mac os-x'/><category term='parameter'/><category term='static typing'/><category term='principle of least surprise'/><category term='subversion'/><category term='ruby'/><category term='pressure'/><category term='gotham ruby conference'/><category term='blocks'/><category term='podcast'/><category term='ActiveRecord'/><category term='Selenium'/><category term='DRY'/><category term='ActionScript'/><category term='essence'/><category term='eval'/><category term='web sockets'/><category term='sqldsl'/><category term='get-in'/><category term='arrogance'/><category term='Business Natural Language'/><category term='login error'/><category term='language adoption'/><category term='leadership'/><category term='java interop'/><category term='routes'/><category term='apprentice'/><category term='frameworks'/><category term='initialize_with'/><category term='language features'/><category term='split test suite'/><category term='learning'/><category term='if'/><category term='comments'/><category term='Time.now'/><category term='alias'/><category term='state pattern'/><category term='law of demeter'/><category term='true'/><category term='silverlight'/><category term='RailsConf'/><category term='stub'/><category term='software is art'/><category term='class methods'/><category term='migration'/><category term='erb'/><category term='technical debt'/><category term='literals'/><category term='Team Size'/><category term='luminaries'/><category term='instance_method'/><category term='presenter'/><category term='sql'/><category term='operator precedence'/><category term='caller'/><category term='sets'/><category term='master'/><category term='block'/><category term='clojure'/><category term='ampersand'/><category term='erlang'/><category term='Acceptance Tests'/><category term='false'/><category term='define_method'/><category term='functions'/><category term='method'/><category term='convention'/><category term='c#'/><category term='test'/><category term='individuals over people'/><category term='library loading'/><category term='DSL'/><category term='TextMate'/><category term='custom assertions'/><category term='macro'/><category term='and'/><category term='strings'/><category term='composing'/><category term='get'/><category term='facets'/><category term='blogs'/><category term='maintainable code'/><category term='xml'/><category term='SMS'/><category term='test names'/><category term='==='/><category term='retrospective'/><category term='refactoring'/><category term='confidence'/><category term='security'/><category term='sequence'/><category term='destructuring'/><category term='schema'/><category term='object'/><category term='Gmail'/><category term='extend'/><category term='RailsConf Europe 2007'/><category term='state'/><category term='flex'/><category term='oracle'/><category term='yaml'/><category term='xUnit'/><category term='pair programming'/><category term='feature toggle'/><category term='dynamic typing'/><category term='journeyman'/><category term='internal DSL'/><category term='to_proc'/><category term='static methods'/><category term='metaclass'/><category term='ria'/><category term='stories'/><category term='testing'/><category term='serialize'/><category term='feature branch'/><category term='examples'/><category term='ide'/><category term='Symbol.to_proc'/><category term='clojure functions'/><category term='simplicity'/><category term='setup'/><category term='javascript'/><category term='forwardable'/><category term='initializer'/><category term='def'/><category term='debugging'/><category term='mock'/><category term='behavior based'/><category term='ThoughtWorks'/><category term='conference'/><category term='or'/><category term='stack trace'/><category term='mail.app'/><category term='as'/><category term='java classes'/><category term='developers'/><category term='agile'/><category term='*'/><category term='screencasts'/><category term='joda'/><category term='class'/><category term='LocalJumpError'/><category term='testing immaturity'/><category term='windows'/><category term='activesupport'/><category term='open'/><category term='mockito'/><category term='testing private methods'/><category term='rake'/><category term='presentations'/><category term='linux'/><category term='upcoming presentations'/><category term='lean'/><category term='dependency injection'/><category term='niche language'/><category term='process'/><category term='railsconfeurope07'/><category term='metaprogramming'/><category term='context'/><category term='blog'/><category term='netnewswire'/><category term='time'/><category term='enumerable'/><category term='symbols'/><category term='disk inventory x'/><category term='inject'/><category term='languages'/><category term='instance_eval'/><category term='dust'/><category term='ddl'/><category term='maps'/><category term='estimation'/><category term='singleton methods'/><title type='text'>Comments on Jay Fields' Thoughts: Clojure &amp; Java Interop</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.jayfields.com/feeds/6277355033913160132/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default'/><link rel='alternate' type='text/html' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html'/><author><name>jaycfields</name><uri>http://www.blogger.com/profile/14491442812573747680</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12467669.post-653542648266605099</id><published>2011-12-28T22:19:27.648-05:00</published><updated>2011-12-28T22:19:27.648-05:00</updated><title type='text'>Hi,

In proxy vs. reify, I think it&amp;#39;s worth me...</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;In proxy vs. reify, I think it&amp;#39;s worth mentioning that the main difference is that proxy allows you to sub-class existing classes, not just implement interfaces. You mostly need proxy when you&amp;#39;re working with old, yucky, inheritance-heavy Java libs. Otherwise, reify is almost always a better choice because it doesn&amp;#39;t mess with &amp;quot;this&amp;quot;, and plays nicely with protocols as well as interfaces.&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;&lt;br /&gt;Dave</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/653542648266605099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/653542648266605099'/><link rel='alternate' type='text/html' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html?showComment=1325128767648#c653542648266605099' title=''/><author><name>dr</name><uri>http://www.blogger.com/profile/12025474968494424584</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html' ref='tag:blogger.com,1999:blog-12467669.post-6277355033913160132' source='http://www.blogger.com/feeds/12467669/posts/default/6277355033913160132' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1283676137'/></entry><entry><id>tag:blogger.com,1999:blog-12467669.post-7871459484542667755</id><published>2011-12-28T13:58:09.371-05:00</published><updated>2011-12-28T13:58:09.371-05:00</updated><title type='text'>@tapichu,
You&amp;#39;re welcome. Thanks for commentin...</title><content type='html'>@tapichu,&lt;br /&gt;You&amp;#39;re welcome. Thanks for commenting.&lt;br /&gt;&lt;br /&gt;Your example code will work just fine - RT.var returns a clojure.lang.Var, which is also a IFn, so there&amp;#39;s no issue there; however, since you&amp;#39;re just passing fib into invoke (which takes an Object) I would just leave fib as a clojure.lang.Var or I&amp;#39;d define it as an Object. I can&amp;#39;t see any reason to cast it to an IFn.&lt;br /&gt;&lt;br /&gt;When I first started doing clojure I used ..; however, these days I use -&amp;gt; exclusively. I mean&amp;#39;t to put that in the blog entry as well, but forgot. Thanks for the reminder. It&amp;#39;s worth knowing both, but I prefer -&amp;gt; since it works for Java as well as Clojure. The equivalent version of your example would be:&lt;br /&gt;&lt;br /&gt;(-&amp;gt; (System/getProperties) (.get &amp;quot;os.name&amp;quot;))&lt;br /&gt;&lt;br /&gt;Cheers, Jay</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/7871459484542667755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/7871459484542667755'/><link rel='alternate' type='text/html' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html?showComment=1325098689371#c7871459484542667755' title=''/><author><name>jaycfields</name><uri>http://www.blogger.com/profile/14491442812573747680</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html' ref='tag:blogger.com,1999:blog-12467669.post-6277355033913160132' source='http://www.blogger.com/feeds/12467669/posts/default/6277355033913160132' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-831726224'/></entry><entry><id>tag:blogger.com,1999:blog-12467669.post-957394476239498950</id><published>2011-12-28T13:42:34.241-05:00</published><updated>2011-12-28T13:42:34.241-05:00</updated><title type='text'>Thanks for the post, I&amp;#39;m just starting to lear...</title><content type='html'>Thanks for the post, I&amp;#39;m just starting to learn Clojure and I was wondering how to execute Clojure from Java.&lt;br /&gt;&lt;br /&gt;Would this be a good way of working with lazy sequences? &lt;br /&gt;&lt;i&gt;&lt;br /&gt;RT.loadResourceScript(&amp;quot;interop/core.clj&amp;quot;);&lt;br /&gt;clojure.lang.IFn nth = (clojure.lang.IFn) RT.var(&amp;quot;clojure.core&amp;quot;, &amp;quot;nth&amp;quot;);&lt;br /&gt;clojure.lang.IFn fib = (clojure.lang.IFn) RT.var(&amp;quot;interop.core&amp;quot;, &amp;quot;fib&amp;quot;);&lt;br /&gt;System.out.println(nth.invoke(fib, 30));&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Oh and something you didn&amp;#39;t mention that I like about Clojure &amp;amp; Java interop is the &amp;#39;..&amp;#39; macro to chain method calls:&lt;br /&gt;&lt;i&gt;&lt;br /&gt;(.. System (getProperties) (get &amp;quot;os.name&amp;quot;))&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;Cheers</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/957394476239498950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12467669/6277355033913160132/comments/default/957394476239498950'/><link rel='alternate' type='text/html' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html?showComment=1325097754241#c957394476239498950' title=''/><author><name>tapichu</name><uri>http://www.blogger.com/profile/03203791518901036814</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://blog.jayfields.com/2011/12/clojure-java-interop.html' ref='tag:blogger.com,1999:blog-12467669.post-6277355033913160132' source='http://www.blogger.com/feeds/12467669/posts/default/6277355033913160132' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1619589228'/></entry></feed>
