Category Archives: c0d3

Coding Run

Posted by Pour Raphael Date: 2018-06-20

This is: CODING RUN!!! Test out an idea in a small amount of time to distract yourself from your business. While learning some Math I thought about the difficulty of an easy glm-alike Vector Datatrype in C. 20 minutes later I got this: #include <stdlib.h> #include <stdio.h> #include <math.h> typedef struct{ union{ double x; double […]

GLSL Shader Development

Posted by Pour Raphael Date: 2018-04-20

I developed a little tool to develop, compile, link and test GLSL Shaders. It is based on Qt and supports only Vertex-, Geometry- and Fragment-Shader. To test the shaders I send a simple Triangle to them with Cyan-Yellow-Magenta colors. Additional a uniform variable t will be incremented each render iteration. A Model/View/Projection Mat will be […]

Saving Goats with Prolog

Posted by Pour Raphael Date: 2018-02-09

Spoiler: You might have guessed it already… you won’t see any real goat in here[1]. This is about a planning problem and how we can solve it using Prolog. A planning ploblem could be for example a game or a more or less complex task. You know the starting and goal state and the rules […]

Debugging C with GDB

Posted by Pour Raphael Date: 2018-02-06

Introduction As long as the gcc tells you whats wrong (including the -Wall Flag) you can at least barely locate the source of the error. What about Segmentation Faults which are hard to detect during compilation time? The GNU Debugger may give you a clue! The GNU Debugger (short: gdb) is a command line tool […]

Inside a C float

Posted by Pour Raphael Date: 2018-01-12

Handling with floats can  be irritating while it is one of the non-integral datatypes. This means that the displayed value (e.g. via printf(“%f”,somefloat); )  is different to the one actualy stored in memory. This is caused by IEEE 754 To get the real values we have to go inside the float. A cast wouldn’t do the […]

Programming in Logic with Prolog

Posted by Pour Raphael Date: 2017-12-11

Motivation While Imperative Programming is very common, Logic Programming seems to be not  popular at all. Why would anyone use it? It is an other kind of thinking about problems. There are problems where imperative programming languages, such as C,C++, Java, Python, …, will suck. It is more like making a set of rules/constraints rather […]

C Generator

Posted by Pour Raphael Date: 2017-12-04

C is fun Repeating all the default stuff when starting over a new project is boring and waste of time. While doing some researches I needed to make a lot of little C programs. In order to fullfill the DRY (Don’t Repeat Yourself) Principle, I did a quick-n-dirty C Generator. It is easy to use […]

OpenGL-Template

Posted by Pour Raphael Date: 2017-10-23

I did some graphic-library-research-stuff last summer which can be found on my bitbucket @ OpenGL-Template. There are several Low-Level Functions from my other Projects collected and new one implemented. Current Featureset: Model-Loader (Obj) Renderable Classes like Cube, Grid and Plane Camera Class for orthogonal and perspective projection Static coordinate axes Default shader which pass through […]

Summer of OpenGL

Posted by Pour Raphael Date: 2017-08-18

There came a lot of research projects up while learn and practice for the module Computergraphics 1. It was all about the basic graphic stuff with OpenGL: Making some shapes and solids Colorize them Translate/Scale/Rotate them Different projections … We made an application for every problem. It is just obvious that a Template would really […]

Prolog for Cloud-Rapper

Posted by Pour Raphael Date: 2017-07-06

While doing some Prolog excercises where I had to develope a kind of language parser, I thought of implementing a “Cloud-Rapper”-Parser which analyses a MoneyBoy-ish Sentence. % % Autor: Raphael Pour % Datum: 06.07.2017 % usage: satz(Satz,Rest,Subject,Object,Verb). % example: satz([1,gurl,spotted,1,boi],[],S,O,V). % satz(In, Rest, S,O,V) :- nominalP(In,S, R), verbalP(R,V,O,Rest). nominalP(In,N, Rest) :- artikel(In,R), nomen(R,N,Rest). verbalP(In,V,N,Rest) :- […]