Updated Blog Entry There seems to be some issues with the documentation as it relates to install GTK and Haskell (at least at present). There are two steps that need to be highlighted if they aren't already. Task-Remove Install Paths with Spaces: GTK has an windows installer like most windows apps and normally you would install the application/library to C:/Program[SPACE]Files/GTK[PLUS-SIGN]. Don't do that. The default install of GTK haskell win32 did not seem to work. I recommend the simple: Install to: C:/gtk Task-Setup mingw/bin in your PATH env: Also, you may need to use the mingw install that comes with the haskell platform. Navigate to Haskell Platform/mingw/bin and copy that path and add it to your PATH environment variable setting. Before doing this, you may see errors, cpp.exe is not found or other such compile errors. Adding mingw adds some of those compiler tools. Optional The glade/gtk bundle install to C:/gtk may not have all the dev libraries that you need. ...
I have been wanting to write this for a while, I believe ever since I started web development more than 15 years ago. Web Application Development is pretty frustrating mostly because of issues with the foundation technologies, HTML, CSS and JavaScript. Alone, they are pretty harmless and quite useful but when mixed together they seemed to step over their intended roles (CSS is pretty useless in a self-contained environment). The original intent of websites seemed to involve easily publishing text documents so that others could view information online. The documents also would have functionality to link to other documents. There you have a web of documents. The web of the mid-nineties was functional and didn't seem so bad. In 2011 so many features have been piled on top of past technology and now we are just left with this big pile of mud. Most content online is for presenting text information, like news reports or stock quotes, business profiles. But now businesses are put...
Given the basic expression for summation: \[ \begin{align} \sum_{i=1}^n i \end{align} \] Calculating the scalar sum: 1 + 2 + 3 + 4 ... public class ScalarSum { public int sum(final f f, int j, int n) { int sum = 0; for (int index = j; index sum = sum + f.$(index); } return sum; } public interface f { public int $(final int x); } public static class Fx implements f { public int $(int x) { return x; } } public static class Fx2 implements f { public int $(int x) { return x*x; } } public static class Fx3 implements f { public int $(int x) { return x*x*x; } } } System.out.println("Sum: " + new ScalarSum().sum(new ScalarSum.Fx(), 1, 100)); With haskell: summation1 :: Integer -> Integer -> Integer summation1 x y = summation' x y 0 summation' :: Integer -> Integer -> Integer -> Integer summation' x y sum = if (y<x) then sum else summation' x (y...
Comments
Post a Comment