Thursday, April 28, 2005

Preparing for Networks Exam

Day after tomorrow, i am having Networks exam. Preparing for the same.
No other great news. After the exam, i will be installing NVidia driver for my GeForce MX graphics card. Last time when i installed i made a mistake of not keeping the internet connection on. This time i guess i wont make that mistake as my modem does the dialling now. This method of NATed internet usage seems safe since all those Microsoft Network Discovery packets are cleanly filtered. Not only that, most port scans are totally filtered. Above that i have my firestarter in Linux and a good firewall for windows. Today Venks downloaded a 30 MB file (i wont tell what it is! ;-) ) from my system. It took an hour since my upload speed is around 6 KB/s. my bsnl broadband seemed much faster than it usually is. Yesteday i got speeds around 35 - 40 KBs.What happened to BSNL ? Is something wrong? ;-). OK got to study. Bye

Friday, April 15, 2005

bsnl broadband

Hi,
my bsnl brdband is back from slumber. Now it is back to its 256 Kbps +. I have provided a ksnapshotted blog for configuring the modem through the web interface ( 192.168.1.1) instead of using rp-pppoe and/or other packages.
check out here: http://modembsnl.blogspot.com/

Wednesday, April 13, 2005

I was preparing for the seminar when i found a good content on Run time storage management
http://www.cs.utsa.edu/~wagner/CS3723/storage/storage2.html
ciao
Varun

Sunday, April 10, 2005

Tough Day, lex and yacc code dissected

today was a tough day. Had to submit record, finished it; but had to skip lunch to finish. After finishing found an easy way with yacc for the intermediate code generator for assignment statement, with just a few lines. Hmmm...
This is the code and explanation
/* calc.lex */
%{
#include
#include
#include "y.tab.h" //needed to obtain represented values for tokens (for example INTEGER is given a number 257 by yacc) and need to be used here
extern int yylval; // this enables to pass values to yacc

%}

DIGIT [0-9]
ID [a-z]
OPR [+-\\*/()]
//guess no problem here
%%
= { return *yytext;;} //returns the char '='
{DIGIT}+ {yylval=atoi(yytext);
return INTEGER; } //sets the value of digit in yylval. When yacc resolves those $x's in case the $x is INTEGER, it reads the value from here.
{ID} { yylval=*yytext-'a'; return IDS;} //same case here. Since my yylval is integer i have to convert char to int this way (by subtracting ascii(a) )
{OPR} {return *yytext;}
[ \n] {return *yytext;}
[ \t] ;
. { fprintf(stderr,"Illegal char %c\n",*yytext); }
%%

/****************************************************************/

/* calc.yacc */

%token INTEGER IDS EQUALS //meaning these are the possible user def tokens
%left '+' '-'
%left '*' '/'
//operator precedence + and - have equal and less precedence than * and / (which have equal precedence)
%{
#include
#include
int tcount=1; //this is same as mktemp function. returns a running var for temp variable(as in dragon book)
%}

%%
program:
IDS '=' expr '\n' { printf("%c=t%d\n",$1+'a',tcount-1);} //assignment statement will always be a=expr\n form.
|
;
expr:
IDS {$$=$1; } //if i have an ID resolved for expression set value of expression to be the value of ID
|expr '+' expr { printf("t%d=",tcount++);
if($1>=50) printf("t%d+",$1-50); else
printf("%c+",$1+'a');
if($3>=50) printf("t%d\n",$3-50); else
printf("%c\n",$3+'a');
$$=50+tcount-1;fflush(stdout);
}
//here if i have a both expr1 and expr2 to be IDS then i have to print tx=a+b where a and b are the IDs resolved.
//in case the expr1 or expr2 are states (i use a convention that if the value of expr1 is >=50, i mean a tempvar rather than ID)
//then print tx instead of some character(i mean ID).
|expr '-' expr {
printf("t%d=",tcount++);
if($1>=50) printf("t%d-",$1-50); else
printf("%c-",$1+'a');
if($3>=50) printf("t%d\n",$3-50); else
printf("%c\n",$3+'a');
$$=50+tcount-1;fflush(stdout);
}
|expr '*' expr {
printf("t%d=",tcount++);
if($1>=50) printf("t%d*",$1-50); else
printf("%c*",$1+'a');
if($3>=50) printf("t%d\n",$3-50); else
printf("%c\n",$3+'a');
$$=50+tcount-1;fflush(stdout);
}
|expr '/' expr {
printf("t%d=",tcount++);
if($1>=50) printf("t%d/",$1-50); else
printf("%c/",$1+'a');
if($3>=50) printf("t%d\n",$3-50); else
printf("%c\n",$3+'a');
$$=50+tcount-1;fflush(stdout);
}
| '('expr')' { $$=$2;}; //if i have a open brackt and close bracket dont worry, the value only is required.
%%
int main(int argc, char **argv)
{
yyparse();
return 0;
}
//////*****************************************************************////////////////////

/* makefile */
//this is the order of compilation
//compile yacc, then lex , then the binary code with gcc
all:yacc lex code
yacc:calc.yacc
yacc -d calc.yacc
lex:calc.lex
lex calc.lex
code: y.tab.c lex.yy.c
gcc -g -o code y.tab.c lex.yy.c -lfl -L /home/cs2k23749/lib -ly
Thats it . If you have any problems, tell me. I guess this should be useful for atleast one soul.

Friday, April 08, 2005

bsnl broadband

Yesterday, my bsnl broadband went to sleep. It took 2 days for it to wake up from slumber. Did my networks lab well. Preparing for Compiler lab exam. Lot of work to do. :-(. back from slumber, my brdband went narrow, got speeds upto 10 KBps :-( hmmm. Guess it should be back to its original speed soon. Recently (for a few weeks), i started playing word racer (in yahoo messenger) with my relative venki. He is a great player, and kindles me to do better. Nowadays got addicted to the game, i cant sleep without playing a few games with him. Bye, Varun

Thursday, April 07, 2005


This i thought was the best of all. BTW, the body is of a male person(can u believe it?) (i suspected, venks confirmed). all these pictures are courtesy NASA. Posted by Hello

This was the other picture, of tsunami (wrecked) hero Oberoi, Vivek. This was not an exact fit, but still was good enough.  Posted by Hello

this was one of the best pictures for the konqueror site (see it at http://varun.siteburg.com) the other best one was of ash (both faces fitted/morphed excellently by Venkatesh!!! ) Posted by Hello

Wednesday, April 06, 2005

Networks Lab Exam

Tomorrow end semester Networks Lab Exam. The problem with gmail still persists. As GB said, after all gmail is still in beta (a nice reason if something ceases to work properly ;) ). Preparing for the lab exam. Nothing more.
-Varun :)
I just saw Chronicle Lite from chronicle lite.
It's based on Java (hence slow). However is good and the only editor i know that compiled in linux x86-64 (many failed about 6 of them i tried to compile)
Nothing else.
Got to sleep

Tuesday, April 05, 2005

Actually i am writing this blog from GAIM. This was done using a nice simple plugin available for blogger.com from gaim. If you are seeing this then i shd say that this really rocks!!!!.What else???

கூகிள் பிகாஸா

கூகிள் பிகாஸா நன்றாக இருந்தது. என்று லினக்ஸிர்கு எழுதப்படும் என்று அறியேன். (vasagha dhosam shandhaviyaha)
It was real tough writing this sentence.
Picasa was nice. It allowed me to send photos and even better burn them to CDs, although havent tried it yet.Will try sometime soon.

the google presentation

A nice presentation about google.


Google Presentation

The mess(age) of the day

today i tried installing mandrake linux 10.1. (x86-64)
I downloaded from a mirror and installed, it happily installed properly, but unfortunately when i restarted, things went wrong. it says init not available although i actually passed the init in the grub.
BTW, i actually upgraded from 10.0 official i586 to 10.1 community x86-64. I came to know this only when i started installing :-(. got to do something abt it. I am currently unhappy with FC3 and cant spare a lot of space( i have close to 4 GB space for installation in mandrake partition so thought of installing the new one over the old), but FC3 has a good amt of space for day 2 day works. It doesnt have mp3 and i plugged it up myself (got realplayer & xmms plugin). That made me hate fc3, coz had a tuf time first setting up yum (that too gave me problem) and first had problem installing a simple c program (coz gcc4 was also installed and had incomplete libraries and failed to compile x86-64 program, gave pages of errors etc etc ). I shd say FC3 is fedora crap 3

gmail had a bug i found. I had three unopened mails while it said only one
Hmm, gmail bug i found, I had three unopened, but said only one.

Search this site

Google