Posts

Showing posts with the label haskell

Declarative programming introduction

"Haskell is a very elegant language, and the functional nature of it makes it a beautiful glue language... because the nature of Haskell as a language can make things clearer than many other programming languages" -- Mark C. Chu-Carroll of the ScienceBlogs "Haskell is a declarative language in that the program can be treated as a statement of facts, rather than as a set of commands that are sequenced in time" -- cdsmith Declarative programming is a programming paradigm that encourages that the programming logic describes what the program will do as opposed to how it will do it. Also, you don't define your programming logic in a sequence of steps like you normally would using an imperative style programming. Functional programming is considered declarative programming. With the imperative programming paradigm, one might do the following to reach a desired state. In Java (imperative style): final SavingsAccount savings = new SavingsAccount (); // ...

Imperative Haskell OpenGL development and demo

Image
I have finally created the camera component for the Octane Mech game. It is pretty basic, but is a basis for the camera movement. The camera, as you would expect, is a n important aspect of a 3D game. You can read more about the source and download the demo by going to the project wiki. I would have posted it on blogger.com but the code formatting here is terrible so I will only post to the wiki now and in the future. http://code.google.com/p/octanemech/wiki/MechProjectDiary

Octane Mech, OpenGL Haskell based mech game; early code and some haskell notes

Image
I am in the initial design and some development of OctaneMech; as the title implies is a OpenGL Haskell based Mech (bot, tank mobile) game. An early goal is to recreate/port glAnts (mech game) to haskell http://glants.sourceforge.net/ On Haskell Haskell is a pure functional programming language where your primary view of your software is through the use of functions. In java or other objected oriented/imperative languages, you are looking at the lowest level components; in Haskell, you are able to concentrate on the operation a particular function is used for without focusing on the low-level details (step-by-step sequences) of the function. I won't now or probably in the future detail the power you are given with Haskell and I leave that up to you the reader. I will focus on how I am using Haskell to build my project. And this first entry will contain some simple Haskell snippets. Main Like other applications, a Haskell application begins with entry point definition main fu...