Pages

Wednesday, September 23, 2009

Robots and Empire by Isac Asimov

Robots and Empire by Isac Asimov

The novel describes the effort of two robots to save the war between settlers and spacers along with their owner Gladia. R.Daneel which is a humanoid robot and R.Giskard which has a special skill to strengthen or weaken the human feelings and if robotic laws permit to wipe off the memory completely.

The robotic laws which can be considered as a ground work of development of robots with intelligence is put forward by Asimov here. as follows

1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
2. A robot must obey any orders given to it by human beings, except where such orders would conflict with the First Law.
3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

The basis for the zeroth law which is placed above all unravels in this novel which states as
"A robot may not harm humanity, or, by inaction, allow humanity to come to harm."

more info on wikipedia

You can find many situations where conflicts arise among these laws. Somehow R.Daneel adopts zeroth law to his circuits of positronic brain. R. Giskard fails to do so because he still cannot accept zeroth law. He thinks and believes humanity is an abstract thing and hence zeroth law has a flaw. Due to this friction he freezes and become inactive. The other question which rises is about how "human beings" can be defined to a robot and by modifying the definitions how robots can be harmful in spite of these laws guiding them is an interesting illustration depicted on the instances which happens on the forbidden planet Solaria.

Apart from being a very good entertaining thriller, this book also make you to think in complete scientific way.

PS: Here is a link which provides 30 robotic laws of Asimov..! an awful reading ..!!

Tuesday, September 15, 2009

apache2+fcgi+redmine

### apache2+fcgi+redmine ###

refer earlier post for redmine installation

apt-get install libapache2-mod-fcgid

### install fast-cgi (for ruby) ###

wget http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar -xzvf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0.
./configure
make
make install
gem install fcgi

### apache-configuration ###
in /etc/apache2/conf.d create a file redmine with content

Alias /redmine /var/www/redmine/public ##optional

SetEnV RAILS_ENV production
AllowOverride all
Options +ExecCGI FollowSymLinks
AddHandler fcgid-script .fcgi
#AddHandler cgi-script .cgi
Order allow,deny
Allow from all


In /var/www/redmine/public/.htaccess
a. make suitable changes for fcgi
b. enable rewritebase (if needed)
c. restart apache /etc/init.d/apache2 restart

chown -R www-data:www-data /var/www/redmine

now point your browser to your.server.com/redmine Hope thats it

Monday, September 07, 2009

Apache2+SVN with MySQL authentication

apt-get update
apt-get install subversion
apt-get install libapache2-svn

svnadmin create /var/svn

a2enmod dav
a2enmod dav_svn

vim /etc/apache2/mods-enabled/dav_svn.conf


uncomment the following
location /svn
DAV svn
SVNParentPath /var/svn
location

save and close the file after changing the above

reload apache2 ## /etc/init.d/apache reload

### Mysql auth

add a user svn to mysql
mysql
create user 'svn'@'localhost' identified by 'svn';
grant select on postfix.user to 'svn'@'localhost';


apt-get install libapache2-mod-auth-mysql
a2enmod auth_mysql

Then create a /etc/apache2/mods-enabled/auth_mysql.conf with the following line

Auth_MySQL_Info localhost

where is the credentials for accessing the database.

AuthMySQL_Authoritative on
AuthMySQL_DB
AuthMySQL_Password_Table users
AuthMySQL_Username_Field login
AuthMySQL_Password_Field pass
AuthMySQL_Empty_Passwords off
AuthMySQL_Encryption_Types Crypt_MD5 ## PHP_MD5 worked with my installation


######enabling ssl
http://edipage.wordpress.com/2006/06/11/apache2-and-svn/
http://www.reviewingit.com/index.php/content/view/62/2/

>>>>> Still my setup is not working.. donot know why yet ..

Friday, September 04, 2009

Redmine with lighttpd with debian lenny

$$$$ Redmine installation
$$$$ Get the dependecies

apt-get install mysql-server rails lighttpd
apt-get install librmagick-ruby
apt-get install subversion git-core
apt-get install gem


$$$ database preparation

create database redmine;
create user 'redmine'@'localhost' identified by 'redmine';
grant select,insert,update,delete,index,alter on redmine.* to 'redmine'@'localhost';

$$$ get the source of redmine

$$$ to Avoid root usage create user redmine with
svn co http://redmine.rubyforge.org/svn/branches/0.8-stable redmine-0.8 ## Latest stable
ln -s redmine-0.8 redmine
cd redmine/config
cp database.yml.example database.yml

add the database settings to database.yml

$$$$ getting database up
from redmine directory
rake db:migrate RAILS_ENV="production"
<<< for this installation gem install -v 2.1.2 rails >>>
<<< apt-get isntall libmysql-ruby >>>
rake redmin:load_default_data RAILS_ENV="production"

ruby script/server -e production
ctrl+c

put the file 20-redmine.conf in /etc/lighttpd/conf-available/
with contents as follows tweeked with your setting

server.modules += ( "mod_fastcgi" )

$HTTP["host"] == "redmine.josefsson.org" {
server.document-root = "/home/redmine/redmine/public/"
fastcgi.server = ( ".fcgi" =>
((
"bin-path" => "/home/redmine/redmine/public/dispatch.fcgi",
"socket" => "/tmp/ruby-rails.socket",
"max-procs" => 5,
"idle-timeout" => 20,
"bin-environment" => (
"RAILS_ENV" => "production",
"RAILS_ROOT" => "/home/redmine/redmine"
),
))
)
magnet.attract-physical-path-to = ( "/home/redmine/cleanurl.lua" )
}


##enable module
lighttpd-enable-mod redmine

## create a FastCGI wrapper in ~/redmine/public folder
cp dispatch.fcgi.example dispatch fcgi
chmod +x dispatch.fcgi

##start lighttpd restart
/etc/init.d/lighttpd restart

##start the redmine server
ruby script/server -e production

### now point your browser to http://yourserver:3000

<<< Things to do >>>
Porting redmine with apache 2
integrating SVN and SVN authentication