April 19th, 2012
Mac OSX is having opengl installed by default. However compiling a program that uses it wasn’t so straight forward.
How do you link the openGL library to your executable?
Took me a hard time googling this one, but eventually I found this blog post: http://dandesousa.com/2010/01/16/compiling-opengl-on-mac-os-x-or-linux/ .
gcc helloGL.c -Framework OpenGL
in linux / unix I think it’s :
gcc helloGL.c -lGL
for windows(in msys f.eks) I think it’s:
gcc helloGL.c -lopengl32
So in short, three different library names for three different os-environments.
Posted in Uncategorized | No Comments »
March 5th, 2012
Salmon, is the name of our bachelor project. Ours? Yeah, Erlend Blegstad and I have joined efforts to create a network administrating program
.
Our first major breakthrough was: http://salmon.im/2012/02/07/first-topology-discovered-by-the-salmon-graph-discovery-by-spiral-swim-algorithm/
Posted in Uncategorized | No Comments »
February 17th, 2012
When I find myself in times of trouble, monty python comes to me.
Speaking words of lispers : let it pdb let it pdb
Python seems always to amaze me when i come across built in functionality that is awesome and useful both at the same time. Im writing a challenge
for the netchalonged system (see http://svn.technocake.net/repos/dev/code-phun/netchallonge ) when I was in a need for more debuging info. A quick google search revealed me this super nice article about pdb -> python debuging. I compozed this cheat sheet summary of it. Read it yourself
in short:
import pdb
...
pdb.set_trace()
-- code to debug --

Posted in Uncategorized | No Comments »
February 10th, 2012

From the start, computer networks where closed mysterious things that only those designing it had a comprehensive overview of how it all worked. Each network where custom made, from hardware to communication protocols – custom to the needs of each organization ordering them. Then entered an era of agreement and standardization. And out of all this a protocol was born with the rise of the world wide web to transport those documents. HyperText Transfer Protocol. (HTTP). But it is now destined to die some might say. Are we not going to be able to browse the web anymore?
Security is an issue
Back when networks where closed, the posibilites of somebody or something in the middle of a communication link to eavesdrop on the content seemed impossible. Now it is too convenient for anyone with the slightest knowledge to do exactly this, listen in what your doing. As the human world is digitalizing with an increasingly amount of our daily life enacted on the web, there is a concern of privacy. Surveilance, fraud, control. The possibilities the one whom possesses the flow of your communication has are mind-blowing.
It is not encrypted. Http that is. And hence all inhabitants of the world have a potential open source to acces a vast amount of information. Information about you, your habits, the ones you care about and even your location of any given time in the worst case scenario. Enough mumble jumble. The risk could dramatically be redused by killing HTTP. The protocol that transports all your webpages, your facebook chatting, your emails on the clouds, your friends pictures and most of the world wide web. How can we manage without it?
We replace it with HTTPS. Which encrypts all data transported over the network. And hence eavesdropping suddenly becomes highly more complex. There is always a possibilty, to device a man in the middle attack. But constraining the amount of information that is clear to read for anyone possessing it, will be a major step in securing the world. HTTPS is exactly the same as HTTP, except that in encrypts all data transmitted and could also potentially authorize and authenticate the communicating entities.
Posted in Uncategorized | No Comments »
October 20th, 2011
Tags: events, python
Posted in Uncategorized | No Comments »
October 8th, 2011
Reference:
89-10-207-101:~ technocake$ iperf -c 89.10.206.196
————————————————————
Client connecting to 89.10.206.196, TCP port 5001
TCP window size: 129 KByte (default)
————————————————————
[ 3] local 89.10.207.101 port 56153 connected with 89.10.206.196 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.5 sec 515 MBytes 412 Mbits/sec
89-10-207-101:~ technocake$
root@snapp:/home/technocake# iperf -c 89.10.206.196
————————————————————
Client connecting to 89.10.206.196, TCP port 5001
TCP window size: 16.0 KByte (default)
————————————————————
[ 3] local 158.37.91.141 port 39666 connected with 89.10.206.196 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.1 sec 42.5 MBytes 35.1 Mbits/sec
root@snapp:/home/technocake#
say whoot?
Posted in Uncategorized | No Comments »
September 27th, 2011
http://www.linusakesson.net/programming/tty/index.php
Posted in Uncategorized | No Comments »
September 12th, 2011
http://www.linuxjournal.com/article/6340
Tags: linux, screen, tips
Posted in Uncategorized | No Comments »
September 11th, 2011
Per Harald Knudsen-Baas tok i sin tid til å starte kodingen på den berømte “Random Pizza Generator”. Her er hans historie om bakgrunnen for denne:
Konseptet:
Vi som en gang gikk i 06HKOM hadde en tendens til å kjøpe mye pizza på pizzabakeren, men det oppsto alltid krangel om hvem som skulle hente pizzaen etter at den var bestilit. “RandomPizzaGenerator” ble derfor svaret.
Det eneste dette programmet gjorde var å hente inn navnene på de som var med på pizza. Hvert av navnene som tastes inn får en id. Deretter ble en av disse trukket ut til å måtte hente pizzaen. Trekningen utførte jeg ved å hente et tilfeldig tall tilsvarende en av id’ene ved bruk av randseed-funksjonen i C++ . Tallet som trekkes tilsvarer en person, og denne personen må lunte ned på pizzabakeren.
Konseptet er enkelt, men er jo mange muligheter for å lage det mer avansert enn dette og på andre plattformer. F.eks. Java applikasjon med GUI, web-basert, eller å lage en Android-app med mer tillegsfunksjonalitet? Går jo an å lage noe som kan hente inn menyen til Pizzabakeren, la en gruppe med brukere stemme over pizzavalget, trekke ut en til å hente godsakene, for deretter å la applikasjonen dele regningen basert på hva som er bestilt til hvem, og hvem som har lagt ut for hva… er jo bare fantasien som setter grenser;-)
Lykke til med Code::Phun!
Får håpe det blir bra oppmøte i morgen:)
Nå har jeg laget en reinkarnasjon skrevet i Python.
Bruksmekanismen er enkel:
Fyr det igang, skriv navn på dem som er der, skriv quit og den velger ut en stakkars for dere.
#!/usr/bin/python
# @description: Random Pizza Generator reincarnation based upon the rumors of the
# previous legendary version from Per Harald Knudsen-Baas
#
# Purpose: To decide who is going to get the pizza from the restaurant.
from random import *
from urllib import *
def RandomPizzaGenerator(Persons):
return Persons[int(round(randrange(len(Persons))))]
#in python 3, raw_input is renamed to input. In python v <3. input does something else.
def prompt(text):
try: return raw_input(text)
except:
try: return input(text)
except: exit()
def nerds(persons = []):
global nerd
persons.append(nerd)
return persons
if __name__ == "__main__":
while True:
nerd = prompt("Nerd present: ");
if nerd == "quit": break
nerds()
print (urlopen("http://fiikus.net/asciiart/pizza.txt").read() )
print ("""
The wise judgement of the randomPizzaGenerator has been made:
Thou shall be the pizza-carrier: %s
May the steps be with you. Fare well, young lad!
""" % (RandomPizzaGenerator(nerds()), ) )
Sjekk ut via svn:
svn co http://svn.technocake.net/repos/dev/python/random-pizza-generator
Tags: 06hkom, code::phun, communica, per harald, random-pizza-generator
Posted in Uncategorized | No Comments »
September 9th, 2011
semantically related topics
Sigma, is supposed to be syntezising diverse, distributed but semantically related topics
into a new context – relevant for learning what you are learning.
We have a dynamic source of sources: the web.
They are all very different by nature. Articles, videos (youtube), lexical articles,
examples, reflective thoughts about a topic, wolfram’s computed knowleedge model and
far far more. The amount, shape and content will continually keep changing and new arises every day.
How can we achieve recognizing what is relevant, and where to find it?
Another topic to be discussing, is the following. We don’t have any control over the
sources. They are fully self-operating. How can we be recognizing relevant content over
spooky content with this in mind: We don’t host the content, others do.
from “semantic search algorithm for peer-to-peer open hypermedia systemssm”
“”"
In addition, our algorithm does not take into account the trust mechanisms
between individual peers. As highlighted by [3], the peer-to-peer approach in
OHS is subject to the existence of adequate trust mechanisms, as is the case
with evolving peer-to-peer networks in general. The DDLS relies on the faithful
delegation of trust between the participating peers, which requires further
investigation.
“”"
A third topic I would like to discuss is this:
Sigma wants to grow, and let everyone share their knowledge.
How can we avoid letting bad content wrongfully propagate through the system?
(“Example, a user posts an entry: a super site for discovering mechanical physics: , but in reality it’s a spam site..”)
Posted in research and developement | No Comments »