Received: by 10.180.82.166 with SMTP id j6mr836878wiy.1.1347645100108; Fri, 14 Sep 2012 10:51:40 -0700 (PDT) X-BeenThere: haskell-cafe@googlegroups.com Received: by 10.216.228.99 with SMTP id e77ls5556958weq.9.gmail; Fri, 14 Sep 2012 10:51:39 -0700 (PDT) Received: by 10.180.98.234 with SMTP id el10mr831049wib.3.1347645099667; Fri, 14 Sep 2012 10:51:39 -0700 (PDT) Received: by 10.180.98.234 with SMTP id el10mr831048wib.3.1347645099649; Fri, 14 Sep 2012 10:51:39 -0700 (PDT) Return-Path: Received: from lambda.haskell.org (lambda.haskell.org. [2a01:4f8:121:6::10]) by gmr-mx.google.com with ESMTPS id fb20si2660824wid.3.2012.09.14.10.51.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 10:51:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of haskell-cafe-boun...@haskell.org designates 2a01:4f8:121:6::10 as permitted sender) client-ip=2a01:4f8:121:6::10; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of haskell-cafe-boun...@haskell.org designates 2a01:4f8:121:6::10 as permitted sender) smtp.mail=haskell-cafe-boun...@haskell.org Received: from localhost ([127.0.0.1] helo=lambda.haskell.org) by lambda.haskell.org with esmtp (Exim 4.69) (envelope-from ) id 1TCa2H-00011O-Vq; Fri, 14 Sep 2012 19:50:38 +0200 Received: from stangl.us ([66.93.193.95]) by lambda.haskell.org with esmtp (Exim 4.69) (envelope-from ) id 1TCa2G-00010w-Ex for haskell-c...@haskell.org; Fri, 14 Sep 2012 19:50:36 +0200 Received: from scout.stangl.us (localhost [127.0.0.1]) by scout.stangl.us (Postfix) with ESMTP id C74421704D; Fri, 14 Sep 2012 12:50:32 -0500 (CDT) X-Virus-Scanned: amavisd-new at stangl.us Received: from stangl.us ([127.0.0.1]) by scout.stangl.us (scout.stangl.us [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JMd7L7mkyiEn; Fri, 14 Sep 2012 12:50:22 -0500 (CDT) Received: by scout.stangl.us (Postfix, from userid 1001) id D2B8B17048; Fri, 14 Sep 2012 12:50:22 -0500 (CDT) Date: Fri, 14 Sep 2012 12:50:22 -0500 From: Alex Stangl To: Andrew Pennebaker Message-ID: <20120914175022.GA38...@scout.stangl.us> Mail-Followup-To: Andrew Pennebaker , Haskell Cafe References: Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: Haskell Cafe Subject: Re: [Haskell-cafe] Tutorial: Haskell for the Evil Genius X-BeenThere: haskell-c...@haskell.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: The Haskell Cafe List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: haskell-cafe-boun...@haskell.org Errors-To: haskell-cafe-boun...@haskell.org On Fri, Sep 14, 2012 at 12:13:15PM -0400, Andrew Pennebaker wrote: > I've gotten mixed feedback from Reddit for my tutorial. It provides an > overview of how functional and declarative programming in Haskell empower > baddies, increasing the accuracy and efficiency of their atomic > superweapons. What do you guys think of my tutorial, Haskell for the Evil > Genius ? Hopefully you'll get more feedback here, although my recent post here soliciting feedback netted me nothing. FWIW, my feedback is below. Alex Under Declarative, you aren't creating a "named expression, 2 + 2", really. You are redefining (+). Under Lazy, your example of binding fib 30 is not a good example of memoization. With memoization you typically call the underlying computation the first time, and memoize it for repeated retrieval later, not hardwire in values at compile time. Here you never ever call the real fib at all. On top of everything else, it'd be too easy to introduce a typo into one of your hardwired constant values. Under Infinite, you should use "sieve (n:ns)" pattern matching instead of calling head. Under Type-Safe Subtle distinction, but returning () is not the same as returning nothing at all. s/ommitted/omitted/ You've got an unusual indentation scheme. Consider adopting a more standard one for your tutorial. In general, monotonically decreasing is not sufficient to prove you will hit a base case. For example, decreasing by 5 would still be monotonically decreasing, and could jump right over your base cases. (Not arguing that the code is incorrect, but rather than your explanation is a little misleading/incomplete.) Again, further confusion about what memoization really is. Under Records "Functions are already defined by their data structures; they are already semantically bundled..." doesn't seem to make sense. "... acts on the specific constructor, blasting fools, murdering crowds..." makes it sound like fireOn actually has side effects. _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe