Piotr Gabryjeluk blog

Co Tam U Pana, Panie Piotrze

10 Feb 2009 18:16

Za jakieś 38 godzin mam najgorszy egzamin w tej sesji: podstawy przetwarzania sygnałów. To oczywiście czas, żeby robić wszystko inne, tylko nie uczyć się. No może poza sprzątaniem.

UPDATE: Ten filmik jest świetny: http://www.zdnet.com.au/insight/software/soa/Is-it-Windows-7-or-KDE-4-/0,139023769,339294810,00.htm

Odnośnie egzaminu z podstaw przetwarzania sygnałów. Przejrzałem stare egzaminy, wyszło, że muszę się nauczyć rzeczu dość niewielu, czyli:

  • dyskretnej transformaty Fouriera
  • kilku twierdzeń dotyczątych ciągłej transformaty Fouriera
  • kilku twierdzeń dotyczątych odwrotnej transformaty Fouriera
  • działań na transformatach (odwracanie, skalowanie, przesuwanie)

Nie wydaje się, żeby to było jakoś bardzo dużo. Na szczęście, koledzy donoszą, że jednak nie będzie egzaminu ustnego z tego przedmiotu.

Jak już wspominałem zamiast uczyć się robiłem kilka innych fajnych rzeczy, między innymi wymyśliłem jak dopasować wygląd strony z biżuterią mojej Ukochanej do pionowych (zamiast zakładanych do tej pory poziomych) zdjęć jej arcydzieł.

Szkic tego, co chcę zrobić:

cr2.jpg

Ponadto odbyłem ciekawą rozmowę z Adamem Czachorowskim na temat potencjalnych tematów pracy magisterskiej oraz ogólnie tematów interesujących, czyli:

  • Jythona (ogólnie Pythona) na Androidzie
  • event-machine w kernelu (coś na podobieństwo dbusa może) lekarstwem na całe zło obecnego oprogramowania
  • CouchDB i implementacji podobnej bazy danych w Pythonie

Ponadto wymieniliśmy się poglądami na temat dobrej muzy. Padły stwierdzenia o wysokim poziomie sprawdzalności:

  • dobre kawałki to te dłuższe niż 10 minut
  • dobre kawałki we FLAC-u osiągają bitrate ponad 1000 kbit/s

Do tego dochodzi, że piszę tę notkę. Wczoraj pisałem dłuższą, ale Firefox mi wysiadł i efekt około godzinnej pisaniny poszedł do /dev/null. Miało być o Viscie pod VirtualBoksem, systemie plików tagfs i innych pierdołach.

Dzisiaj jeszcze czytałem trochę o wirtualizacji urządzeń OpenGL oraz co ciekawe DirectX (D3D).

Co ciekawe implementacja Wine'a, która polega na tłumaczeniu żądań D3D na OpenGL została skompilowana pod Windowsa (!) i używana jest w produkcie Paralels (taki komercyjny VirtualBox pod Maca) jako dodatek do zainstalowego "w środku" Windowsa.

Podobną technikę zamierzają zastosować programiści VirtualBoksa, którzy jak dotąd nie próżnowali, bo udostępnili działąjącą wirtualną kartę z obsługą OpenGL do odpalonego wirtualnego Windowsa, czym zasłużyli na gromkie brawa.

Instrukcje OpenGL idą w tym przypadku w jakiś magiczny sposób do karty graficznej hosta, więc system jest dość wydajny, bo nie występuje do końca "emulowanie" tylko raczej "przekazywanie". Gdyby dołożyć do tego biblioteki emulujące DirectX przez OpenGL od Wine'a, które też ponoć są dość wydaje, to wydaje się możliwe odpalanie gierek Windowsowych bez restartowania kompa (wielkie brawa!).

To na razie tyle, bo naprawdę (co mnie przeraża) trzeba się tego przedmiotu kiedyś nauczyć :(.

Trzymajcie kciuki!

Comments: 1, Rating: 0

wdLite Ready For Testing

06 Feb 2009 12:30

During last days, I've been working on wdLite Installer (a light single-wiki version of Wikidot).

The main purpose of this, was to make installation of this pretty piece of software as easy as possible.

Having this said, I'll prove it is really simple on the example of Ubuntu Linux.

Overview

  • Step one: Install required packages
  • Step two: Configure database
  • Step three: Choose a proper place for wdLite and download it
  • Step four: Launch web-based installer
  • Step five: Your wiki is ready

Step one: Install required packages

Issue the following command:

sudo apt-get install apache2 php5 imagemagick subversion postgresql postgresql-contrib php5-tidy php5-pgsql php5-gd zip

Step two: Configure database

Use your user name instead of piotr. Use some (not yours) password instead of strong-password.

sudo su postgres
psql --command "CREATE USER piotr PASSWORD 'strong-password'"
createdb --owner piotr piotr

Step three: Choose a proper place for wdLite and download it

Version a

The best place for Wikidot would be probably somewhere under /var/www

(replace piotr with your user name)

sudo mkdir /var/www/wiki
sudo chown piotr /var/www/wiki
cd /var/www/wiki
svn checkout http://svn.wikidot.org/repos/wdlite/trunk .
chmod a+rwX . -R

Having wdLite copied there, it'll be accessible at: http://localhost/wiki/

Version b

You can also locate wdLite to your public_html directory.

cd ~/public_html
sudo svn checkout http://svn.wikidot.org/repos/wdlite/trunk .
sudo chmod a+rwX . -R

In order for this to work, you would need to issue the following commands:

sudo ln -s ../mods-available/userdir* /etc/apache2/mods-enabled
sudo /etc/init.d/apache2 restart

wdLite will be accessible at: http://localhost/~piotr/ (replace piotr with your user name).

Step four: Launch web-based installer

Go to http://localhost/wiki (version a) or http://localhost/~piotr (version b), click the "Click and install a wiki here!" link.

wdlite-installation.png

Fill ALL the fields. If you followed this howto, the values would be as follows:

  • PostgreSQL settings
    • user: piotr
    • password: strong-password
    • database: piotr
  • GMail settings
    • you have to create a GMail account for sending verification emails from it
    • supply the GMail login and password in the fields
  • Wiki settings
    • it's totally up to you what to include there
    • the values will be accordingly the wiki title and subtitle (shown at the very top of wiki)
  • Wiki administrator — it's you!
    • e-mail: e-mail address you will use to log in
    • password: password you will user to log in
  • Members
    • if you have friend you would like to invite to the new wiki, just enter their e-mail addresses separated with spaces. You can leave this single field empty
  • Confirm and save
    • click save and wait while the wiki is installing the database and sending invitation e-mails. This should take no more than 5 minutes (usually less than 1 minute)

Step five: Your wiki is ready

wdlite-installed.png

Log in using the e-mail address and password that you supplied in the previous step.

Enjoy your wiki!

wdlite-login.png

Comments: 20, Rating: 1

wdLite Installer

05 Feb 2009 02:56

Today I've worked on an installer for wdLite. It's a little too late to write about, I'll give it a short presentation on my blog tomorrow.

Good night

Comments: 1, Rating: 0

Working On wdLite

03 Feb 2009 00:54

A few days ago I started working on wdLite — a lite version of Wikidot.

The primary aim of this project is to make installation dead simple and server requirements really small.

Server requirements

wdLite should be installable on:

  • Apache with PHP5 (no safe mode or other limitations) and PostgreSQL on Linux boxes

PHP and PostgreSQL should be already configured to work with each other. You should have a PostgreSQL database and "user/password/database"-based access to it. Wikidot will create tables, but won't create a database. You should either create it as root or have root created it for you before (this process might be automatic on webhosting services with PHP/PostgreSQL).

This configuration should include a whole bunch of virtual hosting providers.

Installation

The installation process should be no harder than this:

  • Get a zip or checkout the newest version from repository
  • Upload the directory to the server
  • Adjust directory permissions
  • Go to install.php script with your browser
  • Supply mail and PostgreSQL credentials
  • Choose your wiki name and create users
  • Enjoy your new wiki

What are the differences between "full" Wikidot installation and wdLite

Limitations

  • only one wiki
  • no page revision diffs
  • more limited page size
  • lower security (especially for IE users)
  • works only with Apache
  • some features disabled or non-working
  • memcached disabled
  • karma disabled
  • notifications disabled

Better than full version, because

  • works with Apache
  • works on any HTTP port (not only 80)
  • works within any directory (also in user directory accessible like http://myserver.com/~quake/something/really/deep/wikidot)
  • easier installation with a web interface
  • no root-access needed
  • works well with GMail to send mails from the service
  • easily installable on Ubuntu
  • the easiest method to start developing with Wikidot
  • no need to manually compile additional software

Current work progress

I'm about to pre-release this software, to let you test it.

I have to:

  • create a list of things that need to work before a final 1.0 release.
  • redirect / to /?/
  • create install.php

Things that work already:

  • logging in/out
  • displaying pages
  • editing pages
  • saving pages
  • some basic modules
  • uploading and displaying files
  • navigation (links are rewritten from absolute to relative)

How does it work

The wdLite is based on Wikidot OpenSource. It contains wikidot, index.php and a bunch of helpers scripts. The index.php file is a hacky PHP script that

  • converts URL-s like http://some.server.com/some/url/?/front:page to http://www.some.server.com/front:page
  • tricks Wikidot software to think that the Wikidot domain is some.server.com and the main wiki is www.some.server.com
  • sets a bunch of system variables Wikidot relies on, like $_SERVER['REQUEST_URI'], $_SERVER['QUERY_STRING']
  • runs a proper one from Wikidot scripts
  • … or serves (more like redirects to) a static file
  • catches the script output
  • runs some transformation on caught output (like converting the links from http://www.some-server.com/some:other-page to ?/some:other-page)
  • sends the data back to browser

WARNING, ACHTUNG
The script is more a dirty hack than a version of Wikidot, but this is intentional. We don't want to mantain to many versions of Wikidot. Having this dirty script "only using without modyfing" Wikidot software makes it quite independent from changes in Wikidot. This means the same wdLite script will work for a newer version of Wikidot (=less maintaining work).
WARNING, ACHTUNG

Comments: 2, Rating: 1

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License