<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for JamesIry</title><link>http://disqus.com/by/JamesIry/</link><description></description><atom:link href="http://disqus.com/JamesIry/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 16 Sep 2015 10:41:34 -0000</lastBuildDate><item><title>Re: Don't use Actors for concurrency</title><link>http://www.chrisstucchio.com/blog/2013/actors_vs_futures.html#comment-2256690975</link><description>&lt;p&gt;Terminology is slightly backwards. Actors are for concurrency (multiple logical threads interacting). Futures are for parallelism (multiple phyiscal processors/cores/whatever running simultaneously). &lt;a href="https://mail.haskell.org/pipermail/haskell-cafe/2008-September/047312.html" rel="nofollow noopener" target="_blank" title="https://mail.haskell.org/pipermail/haskell-cafe/2008-September/047312.html"&gt;https://mail.haskell.org/pi...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 16 Sep 2015 10:41:34 -0000</pubDate></item><item><title>Re: Curry-Howard, the Ontological Ultimate</title><link>http://psnively.github.com/blog/2014/10/14/Curry-Howard-the-Ontological-Ultimate/#comment-1637820006</link><description>&lt;p&gt;Type safety of a language is usually formally defined as meaning that all programs in that language have preservation and progress properties. Preservation means that as a program is evaluated its static properties remain true and progress means that as it's evaluated it never comes to a point where the next step is undefined. Undefinedness and the static properties of a program are both language defined. Importantly for this conversation though, most dynamically typed languages are type safe in that a) evaluation doesn't break the very few static properties they have and b) they never get stuck in an undefined state during evaluation. That's why it's entirely fair to say that type safety is different from static types&lt;/p&gt;&lt;p&gt;As a trivial example, just about every production programming language prevents writing past the end of an array with a dynamic check. Their static type systems just don't have the horsepower to statically prove that the undefined state of writing to arbitrary memory never happens. Yet they remain safe from that problem.&lt;/p&gt;&lt;p&gt;Ironically, the mainstream programming languages that are deeply type unsafe are in fact statically typed: C and C++.&lt;/p&gt;&lt;p&gt;I bring all this up for two  reasons. One, the preservation and progress definition is stronger than what Kell asserts about type safe being the same thing as memory safe. For some language, yes, they might actually be about the same thing. But for, say, a language built on capability safety any escalation of privilege beyond explicit granted capabilities would violate its type safety guarantees because a guaranteed static property would be violated (and again note that some capabilities based languages, like E, are dynamically typed).&lt;/p&gt;&lt;p&gt;The second reason I bring it up is because progress expressly allows for the logical inconsistency of divergence. Progress can still be made in small step dynamics even though a program has an infinite loop or throws an exception. The discussion of the simply typed lambda calculus is a bit beside the point in the context of type safety.&lt;/p&gt;&lt;p&gt;Both the simply typed and untyped lambda calculi are type safe in that they both can be proven to have preservation and progress properties. The fact that expressions in the untyped lambda calculus can get into an infinite loop is a different problem from type safety.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 15 Oct 2014 15:56:47 -0000</pubDate></item><item><title>Re: Using Functions to Represent Sets</title><link>http://www.mihneadb.net/using-functions-to-represent-sets/#comment-1557208084</link><description>&lt;p&gt;Java isn't that bad. It mainly suffers from lack of type inference or at least a good way to create a type alias&lt;/p&gt;&lt;p&gt;&lt;a href="https://gist.github.com/JamesIry/51bf4f74583b8449c96a" rel="nofollow noopener" target="_blank" title="https://gist.github.com/JamesIry/51bf4f74583b8449c96a"&gt;https://gist.github.com/Jam...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Sun, 24 Aug 2014 14:21:24 -0000</pubDate></item><item><title>Re: Scheme in Scala</title><link>http://martintrojer.github.io/scala/2013/06/06/scheme-in-scala/#comment-922395834</link><description>&lt;p&gt;I found a couple of small things that should help with performance. Pull request is &lt;a href="https://github.com/martintrojer/scheme-scala/pull/1" rel="nofollow noopener" target="_blank" title="https://github.com/martintrojer/scheme-scala/pull/1"&gt;https://github.com/martintr...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 07 Jun 2013 13:00:34 -0000</pubDate></item><item><title>Re: Programming languages ranked by expressiveness</title><link>https://redmonk.com/dberkholz/2013/03/25/programming-languages-ranked-by-expressiveness/#comment-842099031</link><description>&lt;p&gt;A  (probably good) guess: JavaScript is often used by people who are not experienced programmers and who feel more comfortable with copy/paste than with abstraction.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Mon, 25 Mar 2013 18:40:25 -0000</pubDate></item><item><title>Re: 
                                
                                        Scala traits as well-defined modules - And a crime scene investigation
                                
                   ...</title><link>http://blog.rintcius.nl/post/scala-traits-as-well-defined-modules-and-a-crime-scene-investigation.html#comment-823092884</link><description>&lt;p&gt;It doesn't take Scala's abstract vals to demonstrate the problem. Java can exhibit the same behavior. &lt;a href="https://gist.github.com/JamesIry/5117983" rel="nofollow noopener" target="_blank" title="https://gist.github.com/JamesIry/5117983"&gt;https://gist.github.com/Jam...&lt;/a&gt; . It's a tough problem to prevent, and well known in OO circles. The last time I checked every mechanism ever used to prevent that behavior statically also prevented perfectly good code from compiling.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 08 Mar 2013 12:04:13 -0000</pubDate></item><item><title>Re: One Div Zero: The Best-Laid Schemes O' Mice An' Constructors Gang Aft Agley</title><link>http://james-iry.blogspot.com/2013/02/the-best-laid-schemes-o-mice.html#comment-804793325</link><description>&lt;p&gt;Class#getModifiers also does not cause class init. Even if it did, it would share the same potentially fatal flaw as Class.forName: reflective features can be and often are disabled by security managers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Tue, 19 Feb 2013 17:04:42 -0000</pubDate></item><item><title>Re: One Div Zero: The Best-Laid Schemes O' Mice An' Constructors Gang Aft Agley</title><link>http://james-iry.blogspot.com/2013/02/the-best-laid-schemes-o-mice.html#comment-804703848</link><description>&lt;p&gt;checkcast doesn't cause static init to fire. &lt;a href="http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html#jvms-5.5" rel="nofollow noopener" target="_blank" title="http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html#jvms-5.5"&gt;http://docs.oracle.com/java...&lt;/a&gt;. I verified by plugging in "Foo2 x = (Foo2)null;" into my sample java code above, inspecting the bytecode to make sure the checkcast was emitted, then running.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Tue, 19 Feb 2013 15:50:39 -0000</pubDate></item><item><title>Re: One Div Zero: The Best-Laid Schemes O' Mice An' Constructors Gang Aft Agley</title><link>http://james-iry.blogspot.com/2013/02/the-best-laid-schemes-o-mice.html#comment-803196268</link><description>&lt;p&gt;Of course, but what if the "Foo" has no static fields? There aren't any that guaranteed to be there by the Java spec. &lt;/p&gt;&lt;p&gt;Even in cases where there is one, the JVMs separate compilation model means you should assume that the layout of a 3rd party class can change between compilation and run time so you should bind to as little as possible. If the compiler finds a static field in a third party class and gens bytecode that references it without that being in user code then the user will be VERY confused when the presence or absence of an apparently unreferenced static field breaks binary compatibility as the version of the 3rd party class is changed without recompiling.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Mon, 18 Feb 2013 12:50:38 -0000</pubDate></item><item><title>Re: One Div Zero: The Best-Laid Schemes O' Mice An' Constructors Gang Aft Agley</title><link>http://james-iry.blogspot.com/2013/02/the-best-laid-schemes-o-mice.html#comment-802703647</link><description>&lt;p&gt;That's a viable alternative but I don't think I want to go down that route. As it is the compiler already has 2 points where it deals with problematic try/catch. What you're suggesting would add a third point. If I can come up with a clean, efficient solution to this class initialization issue then I could consolidate all the problematic try/catch transformation logic to one place.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Sun, 17 Feb 2013 23:30:41 -0000</pubDate></item><item><title>Re: One Div Zero: The Best-Laid Schemes O' Mice An' Constructors Gang Aft Agley</title><link>http://james-iry.blogspot.com/2013/02/the-best-laid-schemes-o-mice.html#comment-800813008</link><description>&lt;p&gt;The problem with seeing Plan 4 as a bug fix is that I wouldn't ALWAYS make this translation. It would only be done when try/catch is used as an argument to the constructor. So from a user point of view order of evaluation would change depending on something seemingly irrelevant. &lt;/p&gt;&lt;p&gt;For Plan 4 to be a bug fix I'd have to always use locals for constructor args and that would lead to bigger classfile sizes.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 15 Feb 2013 17:08:35 -0000</pubDate></item><item><title>Re: Heroku | Cedar Goes GA</title><link>http://blog.heroku.com/archives/2012/5/24/cedar_goes_ga/#comment-537963227</link><description>&lt;p&gt;Performant is a perfectly cromulent word.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Thu, 24 May 2012 17:56:59 -0000</pubDate></item><item><title>Re: One Div Zero: Type Errors as Warnings</title><link>http://james-iry.blogspot.com/2012/01/type-errors-as-warnings.html#comment-428160405</link><description>&lt;p&gt;I want the compiler to emit exception code in its output, not monkey with my source code.  That would be a pain in the ass.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Thu, 02 Feb 2012 19:11:25 -0000</pubDate></item><item><title>Re: One Div Zero: Type Errors as Warnings</title><link>http://james-iry.blogspot.com/2012/01/type-errors-as-warnings.html#comment-402871019</link><description>&lt;p&gt;I'm not talking about modifying source code, I'm talking about the object code (byte code, machine code, whatever) emitted by the compiler.  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 06 Jan 2012 16:25:40 -0000</pubDate></item><item><title>Re: One Div Zero: Type Errors as Warnings</title><link>http://james-iry.blogspot.com/2012/01/type-errors-as-warnings.html#comment-402855646</link><description>&lt;p&gt;The reason for the sophistication in SPJ's discussion about wrappers that throw exception is just that Haskell is lazy and can get away with some things that won't fly in strict languages.  GHC doesn't have to do those wrappers, but it can so why not?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 06 Jan 2012 16:15:35 -0000</pubDate></item><item><title>Re: One Div Zero: Type Errors as Warnings</title><link>http://james-iry.blogspot.com/2012/01/type-errors-as-warnings.html#comment-402843245</link><description>&lt;p&gt;Around 27:00 SPJ responds to a question about optional typing with something related to what I'm talking about and then makes it clear that it's not optional typing because some programs that would work under optional typing won't work under his proposed scheme.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 06 Jan 2012 16:07:01 -0000</pubDate></item><item><title>Re: One Div Zero: Type Errors as Warnings</title><link>http://james-iry.blogspot.com/2012/01/type-errors-as-warnings.html#comment-402825449</link><description>&lt;p&gt;"My project is to automatically detect Composite design pattern in Java 1.4 source code."  He wanted to do analysis on the code, not deploy it.  I'm not clear on why he need to compile unless he was analyzing the byte code and accidentally wrote "source code" but either way I don't think that's an example of your nightmare scenario.  I've put other comments into the article.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 06 Jan 2012 15:54:36 -0000</pubDate></item><item><title>Re: One Div Zero: Sleep Sort! With Actors! For No Reason!</title><link>http://james-iry.blogspot.com/2011/06/sleep-sort-with-actors-for-no-reason.html#comment-228943247</link><description>&lt;p&gt;Oooh.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Sat, 18 Jun 2011 01:13:08 -0000</pubDate></item><item><title>Re: http://james-iry.blogspot.com/2007/10/monads-are-elephants-part-3.html</title><link>http://james-iry.blogspot.com/2007/10/monads-are-elephants-part-3.html#comment-226674504</link><description>&lt;p&gt;Nope.  That would make the types wrong.  The unit for Option is Some&lt;/p&gt;&lt;p&gt;scala&amp;gt; def f(x : Int) : Option[String] = Some(x + "a")&lt;/p&gt;&lt;p&gt;f: (x: Int)Option[String]&lt;/p&gt;&lt;p&gt;scala&amp;gt; Some(1) flatMap f&lt;/p&gt;&lt;p&gt;res0: Option[java.lang.String] = Some(1a)&lt;/p&gt;&lt;p&gt;scala&amp;gt; f(1)&lt;/p&gt;&lt;p&gt;res1: Option[java.lang.String] = Some(1a)&lt;/p&gt;&lt;p&gt;Compare with your alternative&lt;/p&gt;&lt;p&gt;scala&amp;gt; Some(f(1))&lt;/p&gt;&lt;p&gt;res2: Some[Option[java.lang.String]] = Some(Some(1a))&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 15 Jun 2011 16:29:19 -0000</pubDate></item><item><title>Re: One Div Zero: Why Eager Languages Don't Have Products and Lazy Languages Don't Have Sums</title><link>http://james-iry.blogspot.com/2011/05/why-eager-languages-dont-have-products.html#comment-201446357</link><description>&lt;p&gt; Dan Doel's comment is that cleaner way to describe the differences and why in some sense it's technically accurate to say that design choices mean that a language "doesn't have sums or products."&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 11 May 2011 11:07:22 -0000</pubDate></item><item><title>Re: One Div Zero: Why Eager Languages Don't Have Products and Lazy Languages Don't Have Sums</title><link>http://james-iry.blogspot.com/2011/05/why-eager-languages-dont-have-products.html#comment-201445426</link><description>&lt;p&gt; Of course Haskell "has sum types" in its library and of course SML "has products types" in its library.  This article is an attempt to explain what Dr. Harper was getting at.  However, Dan Doel's comment has put me to shame.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 11 May 2011 11:05:09 -0000</pubDate></item><item><title>Re: One Div Zero: Why Eager Languages Don't Have Products and Lazy Languages Don't Have Sums</title><link>http://james-iry.blogspot.com/2011/05/why-eager-languages-dont-have-products.html#comment-201442001</link><description>&lt;p&gt;This comment is fascinating.  Dr. Harper isn't the first person from whom I've heard "lazy languages have products but not sums" and the argument I've seen is the fst (a, b) = a business.  I don't think I've ever seen anybody carry it on to (fst p, snd p) = p.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 11 May 2011 10:57:38 -0000</pubDate></item><item><title>Re: One Div Zero: Why Eager Languages Don't Have Products and Lazy Languages Don't Have Sums</title><link>http://james-iry.blogspot.com/2011/05/why-eager-languages-dont-have-products.html#comment-200645699</link><description>&lt;p&gt;@MarkusQ , the same objection holds for the eager language problem with products - the invariant holds up just fine as long as we ignore 0's (bottom).  Bob Harper's point, I think, is that there's a nifty duality here where bottom causes problems in invariants in different but equal ways for both eager and lazy languages.&lt;/p&gt;&lt;p&gt;@Vlad patryshev , I'm not as versed in category theory as you are.  But it is related to the same kind of dualities (sum is often called coproduct).  However, in this case we don't even need infinite co-data structures like stream to see the differences.&lt;/p&gt;&lt;p&gt;@Pelotom true, I linked to another article to talk more about bottoms.  I didn't want to go back over the same territory.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Tue, 10 May 2011 00:46:07 -0000</pubDate></item><item><title>Re: http://james-iry.blogspot.com/2009/05/erlang-is-not-functional.html</title><link>http://james-iry.blogspot.com/2009/05/erlang-is-not-functional.html#comment-136001491</link><description>&lt;p&gt;Even at the time I wrote this Scala supported curried function definition.  It's in my footnote.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Fri, 28 Jan 2011 10:23:44 -0000</pubDate></item><item><title>Re: One Div Zero: The Read Eval Print Lie</title><link>http://james-iry.blogspot.com/2011/01/read-eval-print-lie.html#comment-131367137</link><description>&lt;p&gt;Nifty.  From the README at &lt;a href="http://neugierig.org/software/git/?url=c-repl/tree/README" rel="nofollow noopener" target="_blank" title="http://neugierig.org/software/git/?url=c-repl/tree/README"&gt;http://neugierig.org/softwa...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;"== How it works&lt;br&gt;The approach is surprisingly simple: for each line of code you enter, we compile a shared object in the background. If the compilation succeeds, the object is loaded into a child process via dlopen()."&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">James Iry</dc:creator><pubDate>Wed, 19 Jan 2011 11:36:47 -0000</pubDate></item></channel></rss>