Michi’s blog » archive for September, 2006

OpenGL programming in Haskell, a tutorial (Part 2)

  • September 19th, 2006

As we left off the last installment, we were just about capable to open up a window, and draw some basic things in it by giving coordinate lists to the command renderPrimitive. The programs we built suffered under a couple of very infringing and ugly restraints when we wrote them - for one, they weren’t really very modularized. The code would have been much clearer had we farmed out important subtasks on other modules. For another, we never even considered the fact that some manipulations would not necessarily be good to do on the entire picture.

Some modules

To deal with the first problem, let’s break apart our program a little bit, forming several more or less independent code files linked together to form a whole.

First off, HelloWorld.hs - containing a very generic program skeleton. We will use our module Bindings to setup everything else we might need, and tie them to the callbacks.

Hello, Planet Haskell

  • September 14th, 2006

Since the content rate of haskell-related posts is going up, the feed of this blog will get added to Planet Haskell. Hi, Planet!

OpenGL programming in Haskell - a tutorial (part 1)

  • September 14th, 2006

After having failed following the googled tutorial in HOpenGL programming, I thought I’d write down the steps I actually can get to work in a tutorial-like fashion. It may be a good idea to read this in parallell to the tutorial linked, since Panitz actually brings a lot of good explanations, even though his syntax isn’t up to speed with the latest HOpenGL at all points.

Hello World

First of all, we’ll want to load the OpenGL libraries, throw up a window, and generally get to grips with what needs to be done to get a program running at all.

import Graphics.Rendering.OpenGL
import Graphics.UI.GLUT

main = do
  (progname, _) <- getArgsAndInitialize
  createWindow "Hello World"
  mainLoop
 

This code throws up a window, with a given title. Nothing more happens, though. This is the skeleton that we’ll be building on to. Save it to HelloWorld.hs and compile it by running

ghc -package GLUT HelloWorld.hs -o HelloWorld

Monthly Report: Conference summer draws to an end

  • September 11th, 2006

I haven’t really been updating much here - and especially not the category Weekly Report. Slowly, it’s time to get around to it.

Now, there is a specific reason updates have been slow: I’ve been travelling. A lot. With very varying internet access and even more varying energy to spare for writing. It all started with two weeks of vacation in Sweden - spending time with my lovely fiancee, meeting old friends, and generally relaxing. She proposed (of sorts), and we’re getting married next summer. After the vacation, I went to Leeds, to the Triangulated Categories workshop, and then back home to Jena - only to go off again within just over a week, for the First Copenhagen Topology Conference, tightly followed by a master’s class in Morse theory lead by Ralph Cohen, and a simultaneous workshop on Morse theory and string topology.

Localisation and ring depth

  • September 5th, 2006

So, we’re back at the point where I’m hesitating whether what I tried to work out even made sense or not. So I’ll do a write up of all the things I feel certain about asserting, and ask my loyal readership to hunt my errors for me. :)

Don’t laugh. This is less embarrassing for me than asking my advisor point blank.

We say that a (graded) commutative ring R has depth k if we can find a sequence of elements x_1,\dots,x_k with x_1 not a zero-divisor, each x_i not a zero-divisor in the quotient R/\langle x_1,\dots,x_{i-1}\rangle and R/\langle x_1,\dots,x_k\rangle a ring without non-zero divisors. This definition, of course, being the first obvious point where I may have screwed up.

Now, we know (from looking it up in Atiyah-MacDonald), that for SR the localisation of R in a multiplicatively closed subset S, S(R/I)=SR/SI, that injections carry over to injections, and that the annihilator over SR of an element is the localisation of the annihilator of the element.

post navigation
about
Michi is a PhD student working in homological algebra. This blog is his outlet for texts with some manner of thought put into them. Over at his LiveJournal intimate details and streams of consciousness might be found.
Not all here is mathematics. All here, though, are my personal thoughts and opinions. Please read the about page (linked above) for more details.
This blog uses statcounter.com for logging and traffic analysis. In order to identify return visitors, this site will issue a cookie on viewing the blog.
buttons

latest comments
search
blogs and links
the rdc* theme