<?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/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7894440568218095161</id><updated>2011-07-08T08:52:54.438-07:00</updated><category term='StringTemplate'/><category term='HAppStack.State'/><category term='HappS'/><category term='MACID'/><title type='text'>Ram on Haskell</title><subtitle type='html'>log of my progress with Haskell. starting from day 5</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>idunno</name><uri>http://www.blogger.com/profile/07007697555199641840</uri><email>noreply@blogger.com</email><gd:image 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>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7894440568218095161.post-2388512089547887463</id><published>2009-11-05T16:36:00.000-08:00</published><updated>2009-11-05T17:21:34.232-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MACID'/><category scheme='http://www.blogger.com/atom/ns#' term='HAppStack.State'/><title type='text'>Simple App to learn/teach MACID</title><content type='html'>Lets say I launch a spice store.  The old school brick and mortar type.&lt;br /&gt;&lt;br /&gt;1. Add/modify customer info&lt;br /&gt;2. Add/modify product info&lt;br /&gt;3. Enter/ Modify Stock status&lt;br /&gt;3. Enter/Modify Orders&lt;br /&gt;4. generate EoD sales, stock reports etc&lt;br /&gt;5. Generate news lettres&lt;br /&gt;&lt;br /&gt;Lets start with this basic requirement and keep adding more as we get more business.&lt;br /&gt;Eventually, I want an online store too.  And a community for my customers to discuss recipes and other stuff.&lt;br /&gt;========&lt;br /&gt;Lets use this as a starting point.&lt;br /&gt;&lt;a href="http://www.kuliniewicz.org/blog/archives/2009/04/05/happstackstate-the-basics/"&gt;http://www.kuliniewicz.org/blog/archives/2009/04/05/happstackstate-the-basics/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894440568218095161-2388512089547887463?l=ramonhaskell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/2388512089547887463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7894440568218095161&amp;postID=2388512089547887463' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/2388512089547887463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/2388512089547887463'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/2009/11/simple-app-to-learnteach-macid.html' title='Simple App to learn/teach MACID'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7894440568218095161.post-6664057749513681036</id><published>2008-02-02T23:16:00.000-08:00</published><updated>2008-02-02T23:18:16.736-08:00</updated><title type='text'></title><content type='html'>&lt;pre&gt;&lt;br /&gt;import Control.Monad&lt;br /&gt;import Data.Char&lt;br /&gt;import Data.List&lt;br /&gt;import System.Console.GetOpt&lt;br /&gt;import System.Environment&lt;br /&gt;import System.Exit&lt;br /&gt;import System.IO&lt;br /&gt;import Text.Printf&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import System( getArgs )&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;main = do&lt;br /&gt;  args &lt;- getArgs&lt;br /&gt; -- print $ " The input args are :" ++ ( (  ((++ " ") . (show )  =&lt;&lt;) ) $ ( map read args ::[Int]) )&lt;br /&gt;  printf $  nqueens $ ( map read args ::[Int])!!0 &lt;br /&gt;&lt;br /&gt;qoer,noha,nova,nosea,noswa::(Integral n, Enum n ,Ord n)=&gt; n -&gt; [[n]] -- take size of board and return a list of clauses.&lt;br /&gt;&lt;br /&gt;qoer  n = [ [ (n* (j-1) + i ) | i &lt;- [1..n] ] ++ [0] | j &lt;- [1..n] ]&lt;br /&gt;noha  n = [ [ -1 *(n * ( j-1) + i )  , -1* (n * ( j-1) + k) , 0 ] |  j &lt;- [1..n] , i &lt;- [ 1.. (n-1)] , k &lt;- [ (i+1)..n] ]&lt;br /&gt;nova  n = [ [ -1 *(n * ( j-1) + i )  , -1*( n * ( k-1) + i) , 0 ] |  i &lt;- [1..n] , j &lt;- [ 1.. (n-1)] , k &lt;- [ (j+1)..n] ]&lt;br /&gt;nosea n = [ [ -1 *(n * ( j-1) + i )  , -1*( n * ( j-1 + k ) + i + k ) , 0 ] |  i &lt;- [1..(n-1)] , j &lt;- [ 1.. (n-1)] , k &lt;- [1..(n*n)] , ( ( ( i+k) &lt;= n ) &amp;&amp; ( ( j+k) &lt;=n ) ) ] -- bugs lurk here&lt;br /&gt;noswa n = [ [ -1 *(n * ( j-1) + i )  , -1*( n * ( j-1 + k ) + i - k ) , 0 ] |  i &lt;- [2..n] , j &lt;- [ 1.. (n-1)] , k &lt;- [1..(n*n)] , ( ( ( i-k) &gt;= 1 ) &amp;&amp; ( ( j+k) &lt;=n ) ) ] -- bugs lurk here&lt;br /&gt;&lt;br /&gt;generate::(Integral n, Enum n, Ord n) =&gt; n -&gt; [[n]] --  -- take size of board and return a list of clauses.&lt;br /&gt;generate n = ( qoer n) ++ (noha n) ++ (nova n) ++ (nosea n) ++ (noswa n)&lt;br /&gt;&lt;br /&gt;printclause::(Integral n, Enum n, Ord n) =&gt; [n]-&gt;String&lt;br /&gt;printclause l = (((++" ").show) =&lt;&lt; ( init l)) ++ (show ( last l) )&lt;br /&gt;&lt;br /&gt;nqueens::(Integral n, Enum n, Ord n) =&gt; n -&gt; String&lt;br /&gt;nqueens nq = (header nv  nc )   ++  unlines ( map printclause clauses ) &lt;br /&gt;  where &lt;br /&gt;    clauses = generate nq&lt;br /&gt;    nc      = genericLength clauses&lt;br /&gt;    nv      = nq *nq &lt;br /&gt;&lt;br /&gt;header::(Integral n, Enum n, Ord n)=&gt;n-&gt;n-&gt;String&lt;br /&gt;header nv nc ="p cnf " ++ (show  nv )++ " " ++ ( show nc )++ "\n"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894440568218095161-6664057749513681036?l=ramonhaskell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/6664057749513681036/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7894440568218095161&amp;postID=6664057749513681036' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/6664057749513681036'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/6664057749513681036'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/2008/02/import-control.html' title=''/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7894440568218095161.post-6572282286828303621</id><published>2008-01-18T15:22:00.000-08:00</published><updated>2008-01-18T15:26:14.171-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HappS'/><category scheme='http://www.blogger.com/atom/ns#' term='StringTemplate'/><title type='text'>HappS and HStringTemplate</title><content type='html'>I was able to follow the instructions on the Happs.org site and get a rudimentary static file only site up and running.  To be able to run a wiki etc.. i need to do some more things..&lt;br /&gt;&lt;br /&gt;1. Difficulty is that there is no good documentation at this point.   So it is quite an uphill task to try and understand how it all works. &lt;br /&gt;&lt;br /&gt;The plan is to write a 20 minute wiki tutorial for HappS , hopefully using ANTLR StringTemplate&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894440568218095161-6572282286828303621?l=ramonhaskell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/6572282286828303621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7894440568218095161&amp;postID=6572282286828303621' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/6572282286828303621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/6572282286828303621'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/2008/01/happs-and-hstringtemplate.html' title='HappS and HStringTemplate'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7894440568218095161.post-886978770938765626</id><published>2007-07-24T15:55:00.000-07:00</published><updated>2009-11-05T16:33:22.912-08:00</updated><title type='text'>Haskell types and classes</title><content type='html'>data --  corresponds most with keyword  class  in Cpp/Java&lt;br /&gt;type --  typedef&lt;br /&gt;newtype -- mixture of typedef, and data with some restrictions&lt;br /&gt;class -- corresponds to interface&lt;br /&gt;instance -- corresponds to implements&lt;br /&gt;kind&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894440568218095161-886978770938765626?l=ramonhaskell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/886978770938765626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7894440568218095161&amp;postID=886978770938765626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/886978770938765626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/886978770938765626'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/2007/07/haskell-types-and-classes.html' title='Haskell types and classes'/><author><name>Ram</name><uri>http://www.blogger.com/profile/03503692967468323994</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7894440568218095161.post-575312110633129135</id><published>2007-07-14T11:56:00.000-07:00</published><updated>2007-07-14T22:14:37.106-07:00</updated><title type='text'>Sudoku Solver</title><content type='html'>This sudoku solver is my attempt at a clean architecture. I want to make sure to do the home work properly before coding.  Basically once this solver is implemented, it should be idiomatic of solutions to a lot of other problems.&lt;br /&gt;&lt;br /&gt;the sudoku solver should apply solver algorithms from a set until a test case is solved.&lt;br /&gt;pseudo code:&lt;br /&gt;                              A                            B                                 C&lt;br /&gt;mysudosol::( Set of algos) -&gt; (Set of puzzles)-&gt;( Set of solved puzzles)&lt;br /&gt;&lt;br /&gt;A can be a container of actions each of which takes a puzzle state , transforms it some how and returns the transformed version.&lt;br /&gt;&lt;br /&gt;B can be a container of puzzles, even a list would do.&lt;br /&gt;C same as B&lt;br /&gt;&lt;br /&gt;as for the algos, personally i dont like having to implement an algo in one place, and then register it or add it to the set A explicity.  it would be great if that could be discovered as opposed to having to register. eg: i implement mysooperdoopersolveralgo as an action that can be part of the set A, and put it in a certain place, and it autimatically gets included in A.  now this wouldn't be that much to think about, if i wanted to put all the implementations in A directly, but i want them else where, and i suspect in the future i will get third party solvers too. in that case, i want to just put their solver in a place, and not have to recompile my sources. but i don't know yet how that works with Haskell&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7894440568218095161-575312110633129135?l=ramonhaskell.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ramonhaskell.blogspot.com/feeds/575312110633129135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7894440568218095161&amp;postID=575312110633129135' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/575312110633129135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7894440568218095161/posts/default/575312110633129135'/><link rel='alternate' type='text/html' href='http://ramonhaskell.blogspot.com/2007/07/sudoku-solver.html' title='Sudoku Solver'/><author><name>idunno</name><uri>http://www.blogger.com/profile/07007697555199641840</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
