Saturday, March 20, 2004

OS stuff

Have you gone into details about what happens when an app is executed? Like what does the OS do? OS Loader, creating new process etc

the book i refered to was Modern Operating Systems by Andrew Tanenbaum. (i read a shorter earlier edition). the sample pdf's are worth looking at.

the major portions of the book i focussed on were processes and threads, inter-process communication(ipc), deadlocks, memory management, file systems. also the author had a *nix bias but wrote that win 2000 was better than linux in the design. linux is not as well structured.

in the book a more general conceptual view is provided. on processes and threads he explains why they are needed, and needs for IPC and IPC problems. Semaphores, Mutex locks, sleep and wake up, Monitors are important. similar concepts wait/sleep/interrupt are used in java api's. also a new concurreny utilities package has been added in java 1.5.

"The concurrency utility library provides powerful, high-level thread constructs, including executors, which are a thread task framework, thread safe queues, Timers, locks (including atomic ones)and other synchronization primitives."

so now you can create Semaphore s = new Semaphore(1,true); etc and work on a higher level than simple wait/sleep. is there a similar api in .net?

back to the book, memory management explains why swapping, virtual memory were needed and implemented. any part you interested in, i can try to blog on. also dinesh and i flopped in the cdac test on os'es. so we're not the best at this topic. (including this so that it gets persisted .. and i remember cst2004 ).

stuff like what happens when an app is executed i cannot confirm. in linux the fork() sys call is used to spawn new processes. a parent (can be a shell) simply forks a new child process. the child process gets all the parents handles and resumes running. the first process started by the kernel is init. it has the process id (pid) 1. try $ ps -ax | head .then init spawns new child processes etc. there is also an exec() call to start a new prog. whats the difference i do not know.

executable file format if ELF. support for running ELF files has to be enabled in the kernel. so then the kernel knows what to do with an ELF binary. i just noticed that the kernel can also support MISC binaries. these include apps which need an interpreter to run, ie java, python.

so within the ELF file format it is specified as to how mem is allocated, stack heap etc.. similar stuff should be valid for exe in win.

Friday, March 19, 2004

Re: why gentoo

what do you guys think of open/free source. the concept of learning, sharing knowledge is what pulls me. the economics i am still not sure of. but i am sure some of the worlds best brains are involved in open source.

I feel that open source is about people who are extremely passionate about what they're doing. I really respect that. I feel with open source, by it's nature, forces you to learn a LOT. And I agree with you about the best brains working on it too.

Regarding gentoo... it was a nice article. Here's another one I came across on oreilly... http://www.linuxdevcenter.com/pub/a/linux/2004/03/15/gentoo.html

Also, there's a stream of the founders talk at Standford... http://stanford-online.stanford.edu/courses/ee380/040310-ee380-100.asx. I haven't seen it.

why gentoo

another answer to the question mohn had asked me once. why linux? low on motivation to read on linux?? read this. as usual a link from developerworks.

gentoo linux is a linux distro, founded by daniel robbins. read on to find out why he started with linux and made gentoo. pretty inspirational.

what do you guys think of open/free source. the concept of learning, sharing knowledge is what pulls me. the economics i am still not sure of. but i am sure some of the worlds best brains are involved in open source.

AOP

any of you worked with AOP (Aspect Oriented Programming) ? its supposed to be the next thing after OOPs. actually works with OOPs.

aspectj is an implementation of AOP in java.i just read this introductory article on java world. though the examples and explanation are in java its pretty basic java.

the page provided a link for AOP in C++ www.aspectc.org. are there AOP implementation for C# ? what do you guys feel about AOP?

Wednesday, March 17, 2004

Re: C++ generics

this has to do a lot with the design of the languages.

Yup you're right, it does have to do with how the different platforms are designed. Java and .NET are much more dynamic than C++. This affects how they've implemented generics.

i can definitely not comment on generics in c++. but i am very relieved with the constraints part in java/c#.

It's funny because when I first read about constraints I was kind of disappointed. I think a lot of people were. In comparison to C++ templates they put more limitations on its use. So looking at what was there before, I guess people expected more rather than less. But when you think about it, it makes sense.

one part in generics that was really confusing me was that how can i know what "type" the generic class will have to work with so that some important/basic common property can be worked on. in other words, since i can constraint the generic to IComparable ( i guess == Comparable in java) it is much simpler to understand how a sorting algorithm can be created.

Exactly. Those checks would have to be done at runtime since the actual generic class instantiated object is generated at runtime by the JITer. That would be horrible for performance. One of the main goals of generics is performance so it would pretty much defeat the purpose. With constraints all the compiler has to make sure is that the types implement the specified Interface or derive from a Base Class. And if you don't specify any constraints you can only use methods defined in object. Those methods are guaranteed to work cause every type derives implicitly from object.

how do such things work in c++? do you just hope that the class used overloads some operator or something. else generate a compile error? say for the same sorting algorithm, is there some basic comparison method/operator the class is to define. is there no way to "constraint" that?

I dunno how it works exactly - Need a compiler book/class for that ;-) The basic idea is that for every template class instantiation, it creates a new class with the appropriate type. It then checks that the type supports whatever methods are called on it. If not, you get a compiler error. It works without constraints because all the instantiations are done at compile (or maybe link?) time.

The build times are super fast for Java/C# compared to C++ because of their dynamic nature. Another consequence of "static" compilation of C++ is code bloat. When it comes time to instantiate the template classes with actual types, C++ will generate a new class for EVERY type it encounters in the code regardless of whether the application goes down that branch or not. With Java and C# this won't happen. New types are generated only if they are encountered and as needed dynamically.

why do i even need to bother with bruce, when i have mohn here!!

Let's see...

Bruce Eckel - author of Thinking in Java, Thinking in C++, C++ Inside & Out. Published over 150 articles in numerous magazines. Founding member of the ANSI/ISO C++ committee. Provides public and private seminars & design consulting in C++ and Java.

Mohnish Rao - contributor to codeWord.

Eckel's got NOTHING on me.

so i guess i goofed up again.!! :) . so metadata means adding more type info other than the general class stuff.

When was the first time you goofed up?

You had the idea. I think it's more a case of naming that's causing confusion. Everything is being labeled "metadata"... especially in .NET. I just think of everything that will be used by the runtime and JITer (aside from IL) as metadata.

i am coming to questions on metadata/attributes now. how do they work?

Attributes allow you to "tag" your code (a specific class/method etc...). When compiling, the compiler sees these tags and injects it's own code. Like the example you gave - @Remote - the compiler probably injected some "infrastructure" code to expose it as a method that can be called remotely (is that what @Remote does? I'm guessing here). There is an attribute in .NET called "WebMethod". You can use that on any public method and it can be used as a web service. That's all you have to do. All the actual SOAP stuff is handled by the CLR. Another is "Serializable".

also if you ever get any info on how generics have been implemented in java pls let me know.

Doesn't Sun have some Whitepaper published on their dev site?

I just wanted to say that everthing I'm writing about this stuff is how I THINK it works... how I understand it from what I've read. It could very well be that I'm making a huge arse out of myself and writing utter bullshit.

The point of this blog is to discuss this stuff and learn from each other. In other words... to try and become less of an arse.

Java, Mono, or C++?

http://ometer.com/desktop-language.html

Thoughts on the future of open source desktop development

Personal Take: There's Anti-MS sentiment in almost every other para. But a good article nonetheless.

Re: ansi c++ revisited(by me)

that won't work in C++, new returns the address of the object it created on the heap, so it will have to be
MyClass * x2 = new MyClass;
or
MyClass x2 = *(new Myclass);


Thanks. Keeping Java, C# AND C++ straight in yer head is hard!

Re: C++ generics

firstly, thanks for all the amazing info you provided.

You CANNOT use ANY type you want when instantiating a generic class. In C++ you CAN. The constraints in C#/Java are there to enforce type safety.

this has to do a lot with the design of the languages. i can definitely not comment on generics in c++. but i am very relieved with the constraints part in java/c#. one part in generics that was really confusing me was that how can i know what "type" the generic class will have to work with so that some important/basic common property can be worked on. in other words, since i can constraint the generic to IComparable ( i guess == Comparable in java) it is much simpler to understand how a sorting algorithm can be created.

how do such things work in c++? do you just hope that the class used overloads some operator or something. else generate a compile error? say for the same sorting algorithm, is there some basic comparison method/operator the class is to define. is there no way to "constraint" that?


Anyway, so Eckel is saying if you have these constraints why bother with generics? What dyou feel he was saying?

why do i even need to bother with bruce, when i have mohn here!! if he was saying constraints are not a good thing, then i differ.


there is no metadata layer in a .class file. metadata in java == attributes in c#. so metadata in java is just injection of bytecode based on the implementation by the compiler.

I did a search for Java .class files and .. This is saying the .class file holds info about each method defined in the class in the "methods" array. See, all this type info HAS to be there for Reflection to work.

i have not read the vm spec, so the info yu provided was new to me. so thanks again for more info again!!

as yu know in java each class has to be in a seperate .java and hence goes into a seperate .class file. in .net yu can have multiple classes in a simgle file. so i am guessing that it was thought better to seperate all the type info of all classes into a seperate metadata layer, and leave the actual code in the IL layer. the vm spec for class files you showed has been present pre java 1.5. so the type info has always been there.

but the metadata introduced in java 1.5 was not type info. the example provided was equivalent to the attributes in .net. so this was what i was trying to say.


Attributes enbales you to generate more custom (you can create your own) info like this.

then i saw some stuff on metadata in java..
"The Metadata feature in J2SE 1.5 provides the ability to associate additional data alongside Java classes, interfaces, methods, and fields. This additional data, or annotation, can be read by the javac compiler or other tools, and depending on configuration can also be stored in the class file and can be discovered at runtime using the Java reflection API.""

this is what you were saying. so i guess i goofed up again.!! :) . so metadata means adding more type info other than the general class stuff.

i am coming to questions on metadata/attributes now. how do they work? there is additional metadata present so does the vm link this to the implementations at runtime or what?

also if you ever get any info on how generics have been implemented in java pls let me know. compiler-casting, i hope is an over simplification by me...

Re: ansi c++ revisited(by me)

MyClass x2 = new MyClass; // object created on heap

that won't work in C++, new returns the address of the object it created on the heap, so it will have to be
MyClass * x2 = new MyClass;
or
MyClass x2 = *(new Myclass);

dinesh.

Tuesday, March 16, 2004

Re: ansi c++ revisited(by me)

firstly what do you guys feel of friend methods? how much do u use them within yur code. i got the feeling that as "friend"ly as they might be they broke the oops principle of encapsulation.

You are right about violating the principle of encapsulation. But I think it is a "controlled" violation. It's not like any class/method out there can claim to be your friend and access your privates. YOU decide who your friend is. I could even see this as a convenience feature. If you mess up in design and want someone in the outside world to see some data, but not everyone, make him a friend.

whats the difference between creating an instance using new vs without new

Without new, the instance is created on the stack and memory management is taken care by the compiler. With new, it's created on the c++ heap and you have to make sure and call delete.

new is supposed to be dynamic runtime allocation so are instances like stack a given a memory space just when the os creates the app

Yeah, I think that's what happens. But I'm not sure exactly how it works. If one of you could explain the process.

Also you have read stuff on OS right? Have you gone into details about what happens when an app is executed? Like what does the OS do? OS Loader, creating new process etc... Could you post about that? I have not done anything in OS, but am very interested in it.

also is there a heap and stack in c++. can i specify where i can create the instance. this is possible in c# right? code snippet please.

Yeah there's a heap and stack in c++... same with c# and java. In c++ classes can be created on the stack or the heap. In c# classes can ONLY be created on the heap and structs can be created ONLY on the stack. Structs in c# are NOT the same as structs in c++. Structs in c++ are the same as Classes but their default access level for members is public. Java has no structs, only classes and they can ONLY be created on the heap.

// C++
MyClass x; // object created on stack
MyClass x2 = new MyClass; // object created on heap

MyStruct y; // object created on stack
MyStruct y2 = new MyStruct; // object created on heap


// C#
MyClass x; // just declares x to be a reference to a MyClass object (initialized to null)
MyClass x2 = new MyClass(); // object created on heap

MyStruct y; // object created on stack (initialized to 0, by compiler)
MyStruct y2 = new MyStruct(); // object created on stack (default constructor called)


// Java
MyClass x; // just declares x to be a reference to a MyClass object (initialized to null)
MyClass x2 = new MyClass(); // object created on heap


does c# allow overloaded operators?

Yup. They have to be declared as static methods of the class...

public class MyClass
{
    private int x;

    public MyClass( int x )
    {
        this.x = x;
    }

    public static MyClass operator+( MyClass that )
    {
        return new MyClass( this.x + that.x );
    }
}

Monday, March 15, 2004

Re: C++ generics

you must have noticed the "Insights Into the .NET Architecture" series on artima. they did mention some stuff of multiple inheritance being implemented in the CLR/CLS

Yeah I did read that article. I guess Eiffel has implemented MI, but it doesn't "play well" will the other languages in .NET. As in, if you have a multi language project with subclassing from one language to another, then Eiffel won't work cause MI isn't in the CLS.

could you please put the bruce eckel blog on java generics in simpler language!!

Basically, C++ Templates != C#/Java Generics. Both of them have similar goals, but not exact same capabilities. C++ offers more freedom in what types you can use when instantiating a template class. In a previous post I had written a bit about constraints in C# (there is something similar in Java also).

You CANNOT use ANY type you want when instantiating a generic class. In C++ you CAN. The constraints in C#/Java are there to enforce type safety. Generally they are an Interface or Base Class. It means "instantiate this generic class/method with a type ONLY if it implements this interface or extends this Base Class".

Ex...

public T Max<T>( T x, T y ) where T : IComparable
{
    // Call ONLY IComparable methods on x and y

    if ( x.CompareTo( y ) > 0 )
    {
        return x;
    }
    else
    {
        return y;
    }
}


or

public void Foo<T>( T bar ) where T : MyBaseClass
{
    // Call ONLY MyBaseClass methods on bar
}


Anyway, so Eckel is saying if you have these constraints why bother with generics? Just use Interfaces or Base Classes directly instead of making a generic class and then telling the user to ONLY instantiate that class with a type that implements that interface or extends the base class. Atleast that's the meaning I got from it. What dyou feel he was saying?

I think there is a slight difference between JUST Interfaces vs Interfaces through Generics...

With Interfaces, the compiler just cares about the methods on the interface. It does NOT care about the underlying type. As in if class Dog and class Cat both implement interface IAnimal, the compiler won't distinguish between the two if you have an IAnimal reference to a Dog object or a Cat object...

private void DoSomethingWithAnimals( IAnimal x )
{
    ...
}

IAnimal animal;

animal = new Dog();

DoSomethingWithAnimals( animal ); // fine

animal = new Cat();

DoSomethingWithAnimals( animal ); // fine


But with interfaces through generics it DOES care...

private void DoSomethingWithAnimals<T>( T x ) where T : IAnimal
{
    ...
}

IAnimal animal;

animal = new Dog();

DoSomethingWithAnimals<Dog>( animal ); // fine

animal = new Cat();

DoSomethingWithAnimals<Dog>( animal ); // fails


This is how I think of it. So with generics, you are not only limited by the interface, but also the type that implements the interface.

there is no metadata layer in a .class file. metadata in java == attributes in c#. so metadata in java is just injection of bytecode based on the implementation by the compiler.

I did a search for Java .class files and got this... http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html

It talks about storing the type information just like in .NET. The terminology might be different (.NET uses metadata for pretty much everything in the assembly aside from IL) but they DO store all the info in the file. Check it... I didn't go through in detail, but saw stuff like...

methods[]
Each value in the methods table must be a method_info (§4.6) structure giving a complete description of a method in this class or interface. If the method is not native or abstract, the Java virtual machine instructions implementing the method are also supplied.

The method_info structures represent all methods declared by this class or interface type, including instance methods, class (static) methods, instance initialization methods (§3.9), and any class or interface initialization method (§3.9). The methods table does not include items representing methods that are inherited from superclasses or superinterfaces.


This is saying the .class file holds info about each method defined in the class in the "methods" array.

See, all this type info HAS to be there for Reflection to work. How else will the runtime access this data? Attributes enbales you to generate more custom (you can create your own) info like this. All other type data is generated by default by the compiler.

ansi c++ revisited(by me)

i decided to get out of my java shell and explore some more languages. so decided to go back and read some stuff on ansi c++. i really liked the amount of freedom given to the developer to do whatever he wants. so i'll ask some of my dumb questions on the list, and just comment on the lang..

firstly what do you guys feel of friend methods? how much do u use them within yur code. i got the feeling that as "friend"ly as they might be they broke the oops principle of encapsulation.

a question now. whats the difference between creating an instance using new vs without new, say like stack a;. new is supposed to be dynamic runtime allocation so are instances like stack a given a memory space just when the os creates the app? aren't java/c# based on runtime allocation of mem.

also is there a heap and stack in c++. can i specify where i can create the instance. this is possible in c# right? code snippet please.

does c# allow overloaded operators?

so a few questions to keep you busy for some time.

Re: C++ Generics

Actually, they have an implementation of Eiffel that runs atop the CLR. Even though the CLR (CLS - Common Language Specification), doesn't support MI, they have managed to do it somehow.

you must have noticed the "Insights Into the .NET Architecture" series on artima. they did mention some stuff of multiple inheritance being implemented in the CLR/CLS. being as lazy (also dumb) as i am could you please put the bruce eckel blog on java generics in simpler language!!


"Metadata - Lets you avoid writing boilerplate code, .. That is actually also the definition of attributes. Attributes allow you to inject "custom" metadata.

can't you do most of the stuff simply by using reflections?
This is another reason why I think the metadata will not be too different between Java and .NET. Java also has Reflection capability.


the main difference is that in .net you have assembly = metadata + IL. right now i am not sure about the actual java 1.5 bytecode. but i'll tell you what i've gotten till now. there is no metadata layer in a .class file. metadata in java == attributes in c#. so metadata in java is just injection of bytecode based on the implementation by the compiler. similarly generics as of now seems casting by the compiler. hence there is NO metadata in java analogous to the metadata in c#. if any of you could confirm if what i said is right or wrong please correct. mohn i was wondering if you have any great faculty in yur coll, to whom u can/do ask such questions.

Those guys are Einstien's. I'm sure they have proper reasons for their choice. I was just stating my opinion.

yur opinions are always welcome!!

Saturday, March 13, 2004

Re: C++ Generics

something like its more pure oops.

Right... same thing I've also heard. I know that it is a system similar to Java and .NET with unified type system, garbage collection and totally OOP. It also supports multiple inheritance, which neither Java nor C# does. Actually, they have an implementation of Eiffel that runs atop the CLR. Even though the CLR (CLS - Common Language Specification), doesn't support MI, they have managed to do it somehow.

Eiffel is quite old. It was created in the mid/late 80's. So it had all those capabilites quite a few years before Java came out. I guess maybe the reason it's not so popular is cause it doesn't have the C/C++ syntax.

"Metadata - Lets you avoid writing boilerplate code, by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it."

That is actually also the definition of attributes. Attributes allow you to inject "custom" metadata. In your example, the attribute (Remote), is something that the Java guys have provided as part of the platform, but you can write your own stuff. When you run the code, the compiler will see the attributes/metadata and inject RPC code in for you. That's how it is declarative. You don't have to do anything.

so metadata in java is very different.

"What exactly is the metadata? Basically, it is binary information that describes every type and member defined in your code."


I don't think it will be too different. If you don't involve attributes in anyway, then the metadata just consists of type/member info. But if you declare attributes (like Remote), then that info will be added to the metadata.

also another question that just popped into my head is on metadata in c#. can't you do most of the stuff simply by using reflections? there must be more advantages.

This is another reason why I think the metadata will not be too different between Java and .NET. Java also has Reflection capability. So the runtime has to have access to all the type/member info. The slight differences will probably be with Generics data. Apparently you can't tell what type a generic class was instantiated with in Java Generics.

i agree that generics and metadata seem more fake/pseudo in java, but they must have had some tough decisions to make.

I agree. Those guys are Einstien's. I'm sure they have proper reasons for their choice. Software is all about tradeoffs. I was just stating my opinion.

Friday, March 12, 2004

Re: C++ Generics

have you guys heard of a language called eiffel?

i have heard very little stuff on eiffel. something like its more pure oops. so i wanted to know if any of you knew any features of the language vs java/c++/c#.

So I was saying, they should have changed the bytecode and emited some more metadata to handle generics. This way, those casts would be eliminated. The metadata would hold the generic class template as well as info about the type the class was instantiated with at runtime.

i guess you are speaking from c# experiece.i cannot confirm but things in java are very different. take this definition of metadata from joshua bloch, a lead architect in java.

"Metadata - Lets you avoid writing boilerplate code, by enabling tools to generate it from annotations in the source code. This leads to a "declarative" programming style where the programmer says what should be done and tools emit the code to do it."

and an example..
"
import javax.xml.rpc.*;

public class CoffeeOrder {
@Remote public Coffee [] getPriceList() {
...
}
@Remote public String orderCoffee(String name, int quantity) {
...
}
}
"

so metadata in java is very different. the above example simply exposes the method getPriceList() as a remote method. it simply auto-generates byte-code compared to if you would actually expose the method as a remote method. unlike what mohn had posted on metadata in c# ages ago
"What exactly is the metadata? Basically, it is binary information that describes every type and member defined in your code."
metadata in java is just the compiler doing stuff for you. the basic structure of the class file, jvm remains same. i agree that generics and metadata seem more fake/pseudo in java, but they must have had some tough decisions to make.

also another question that just popped into my head is on metadata in c#. can't you do most of the stuff simply by using reflections? there must be more advantages.

Generics Aren't

"Thinking in ..." books author talks about Java generics in his weblog.

http://mindview.net/WebLog/log-0050

Assert is your friend

http://www.codeproject.com/cpp/assertisyourfriend.asp

Focuses on MFC/C++, but applies to any language.

Thursday, March 11, 2004

Re: C++ Generics

have you guys heard of a language called eiffel?

Yeah I've heard of it. But don't know much about it. Why dyou ask?

i have hardly read stuff on artima. but they seem very design oriented. you recommend any more articles?

That site is very good. They don't have articles per se... they mostly have interviews with the "big" guys in programming. They have a series going with C# designer Anders Hejlsberg, Java designer James Gosling as well as C++ designer Bjarne Stroustrup and many more. Those tell you about what their goals were when they were designing the languages.

also bill veneers, the creator of artima (i think) has this great book on java internals, the bytecode spec

There is a link on artima... http://www.artima.com/insidejvm/blurb.html. Is this what you're referring to?

he too came up with examples on auto_ptr and tupples.

Take a look at the STL documentation... http://www.sgi.com/tech/stl/table_of_contents.html. Pretty much everything on there is totally generic.

It seems it might have been a better idea for them to make changes to the bytecode and metadata to make this happen.

could you explain what u meant.


If they make changes to the bytecode or the metadata, the JVM will have to be updated to be able to handle it. To avoid this update (or to keep backwards compatibility), they chose NOT to do this. Instead, it's the same code (with casts), but done by the compiler.

So I was saying, they should have changed the bytecode and emited some more metadata to handle generics. This way, those casts would be eliminated. The metadata would hold the generic class template as well as info about the type the class was instantiated with at runtime.

Re: C++ Generics

The whole point of introducing generics is to get rid of the casting completely so that you don't pay the performance penalty.

i read up on the article, and i think one you had posted before, on artima.com by the c# designer. i understand what you are saying but have no idea about java internals etc. i guess this is a price you have to pay for backward compatability!! post more stuff on language design's etc links whatever... have you guys heard of a language called eiffel?

i have hardly read stuff on artima. but they seem very design oriented. you recommend any more articles? also bill veneers, the creator of artima (i think) has this great book on java internals, the bytecode spec. the only thing i remember is java class files' magic number ... CAFEBABE ;) .

also i keep pestering dinesh with questions on stuff. (whenever i get the chance) he too came up with examples on auto_ptr and tupples. so mohn dinesh on similar freq.


It seems it might have been a better idea for them to make changes to the bytecode and metadata to make this happen.

could you explain what u meant.

Wednesday, March 10, 2004

Tiger

http://nl.internet.com/ct.html?rtr=on&s=1,ro9,1,85un,eq8n,9zv,h0i1

The article mentions (very) briefly about what I said in the prev blog. With generics, the casting is just shifted to the compiler. I think this is a bit strange. The whole point of introducing generics is to get rid of the casting completely so that you don't pay the performance penalty. It seems it might have been a better idea for them to make changes to the bytecode and metadata to make this happen.

Tuesday, March 09, 2004

Re: C++ Generics

could you give some places where templates, both class and function would be used. other than containers.

Containers are the most popular candidates because they are an abstraction that, by nature, are generic. I mean when you talk about an Array or List or Dictionary, you don't think about it in terms of a specific type. So when you think of templates etc... you immediately think of collections.

But there are many other places where genericity plays a role. For example, there is a class called auto_ptr in STL. This is a utility class that helps with memory management. In C++, when you create an object on the heap with "new", it is your responsibility to free it with "delete". But there are times when this fails to happen.

Consider this...

function foo()
{
    MyClass* pBar = new MyClass;

    DoSomethingThatCausesAnExceptionToBeThrown();

    delete pBar;
}


In this case, you allocate/initialize on the heap. Then you jump to another function. That function throws an exception and the stack unwinds both functions. You never get to "delete pBar". Memory leak. You can use auto_ptr to help you out. auto_ptr takes a pointer (to an object on the heap). When it goes out of scope, it calls "delete" on the pointer you pass it...

function foo()
{
    auto_ptr<MyClass> bar( new MyClass );

    DoSomethingThatCausesAnExceptionToBeThrown();
}


Here, bar is just a local variable created on the stack. When the function ends or the stack unwinds (because of an exception), bar's destructor is called, which in turn calls delete on the pointer passed to it.

auto_ptr is a generic class. It can hold on to a pointer of ANY type you pass it.

Similar to auto_ptr is pair. This is a class that holds on to a tuple. It is generic in that it can hold on to two objects of ANY type...

template <typename T1, typenameT2>
class pair
{
    private:
        T1 first;
        T2 second;

    public:
        pair( T1 f, T2 s ) : first( f ), second( s ) { }

...
}


should the 'size_t n' variable you created in the class template example be 'int n'??

size_t is an unsigned type defined in one of the standard C header files... dunno which one exactly. This is basically defined for any positive range like # of elements in a collection. It really is just a typedef for an unsigned integral.

how is the generics implementation in .net?

As I said before, in C++ everything happens at compile time. In C#, it's both compile and runtime. When you create a template class in C++, the compiler removes the actual template class and replaces it with classes of a specific type(s). In C#, the compiler emits IL code and metadata for the actual template. At runtime, the JITer will create actual classes of specific types as it is encountered.

In C# there is less freedom in the types you can use in templates. When you create a template, you define constraints on the types you can use the template with...

public class MyClass<T> where T : IComparable
{
    // Do stuff with T on IComparable methods
}


The constraint here is that all types with which you instantiate MyClass have to implement IComparable. The compiler will ensure that it does. So at runtime you don't have to worry about checking whether a type defines a specific method or not.

i am basically trying to gear up for java 1.5.

I read that Java generics are being implemented such that no changes to the JVM will be required. This is a good benefit. But apparently, this means that it won't provide "true" template functionality because you can't modify the bytecode. As in, it's going to be syntactic sugar for the programmer. The compiler will be using Object for the type and inject casts in the bytecode. Also, when using reflection on a generic class, you won't be able to tell what type it was instantiated with. Have you heard anything about this?

Re: Mount ( Extended )

just as you can mount devices onto the file system heirarchy after boot-up, during booting the partitions containing the basic heirarchy (/) are also mounted.

at some stage after the kernel is started at boot time, the /etc/fstab is read. this file contains information on which partition is to be mounted on which mount point. a mount point is simply the directory in the entire file system. the listing on my setup is like

LABEL=/ < space> / < space> ext3 < space> defaults < space> 1 < space> 1
LABEL=/boot < space> /boot < space> ext3 < space> defaults < space> 1 < space> 2
/dev/hda6 < space> /tmp/d < space> vfat < space> defaults < space> 1 < space> 2

#replace < space> with actual spaces

the explanation from the man pages...
<<
The first field, (fs_spec), describes the block special device or remote filesystem to be mounted.

The second field, (fs_file), describes the mount point for the filesystem.

The third field, (fs_vfstype), describes the type of the filesystem. Linux supports lots of filesystem types, such as ext2, ext3, hfs, hpfs, iso9660, jfs, minix, msdos, ntfs, proc, reiserfs, vfat, xenix, xfs, and possibly others.

The fourth field, (fs_mntops), describes the mount options associated with the filesystem.
It is formatted as a comma separated list of options. It contains at least the type of mount plus any additional options appropriate to the filesystem type.

The fifth field, (fs_freq), is used for these filesystems by the dump command to determine which filesystems need to be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that the filesystem does not need to be dumped.

The sixth field, (fs_passno), is used by the fsck program to determine the order in which filesystem checks are done at reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems should have a fs_passno of 2.
>>

the label / and /boot i think are defined in the boot loader config file. if you notice the third line in my config, /dev/hda6 type vfat, its my common windows fat32 partition where i store all my data / articles etc.

Re: C++ Generics

thanks for the great explanation and quick response..

could you give some places where templates, both class and function would be used. other than containers.

should the 'size_t n' variable you created in the class template example be 'int n'??

how is the generics implementation in .net?

i am basically trying to gear up for java 1.5. the examples i saw were using generics for containers. so other than casting, i did not notice any great advantages. what else do you guys think are the advantages?

Sunday, March 07, 2004

C++ Generics II

Besides class templates, you can also have function templates. Here you leave the type of the arguments to the function unspecified.

Ex...

template <typename T>
T max( T x, T y )
{
    if ( x > y )
    {
        return x;
    }
    else
    {
        return y;
    }
}


Again, similar to class templates, when you call the function with a particular type, the compiler will create a function with your specified type.

Ex...

int bigger = max( 2, 4 );

double bigger2 = max( 2.2, 4.6 );


Here, two separate functions will be generated. One for ints, one for doubles.

Function max, uses the ">" operator to compare values. So the compiler makes sure that whatever type you specify has overloaded this operator. If not, it will generate an error message. This is where the type safety comes into play.

One thing to notice is that function templates infer the type automatically, whereas class templates don't. With class templates, you HAVE to explicitly mention the type. But there are situations where it might be necessary to explicitly mention the types for functions also. In that case the syntax is similar... max<int>( 2, 4 );

C++ Generics

Generics in C++ are actually implemented with templates. There is some difference in the way it is implemented in C++ vs Java vs C#. I'm not very sure of the differences, but it involves the amount of work done at runtime. In C++ everything is done at compile time whereas in Java and C# it's done both at compile as well as runtime.

Anyway, templates provide a way to paramatize types. Templates allow us to NOT specify the type and program generically. This is most useful in collections like vector, deque, map etc.. since you don't need to create a class for every kind of type that could be held in the collection. C++ does not have a unified type system like Java and C#, so if you did NOT have templates, you would have the tedious job of creating something like an intVector that will hold only integers, stringVector for only strings etc...

With templates, you can keep the type unspecified. When you actually want to use the class with an integer, you just specify the type to be int. Before compiling, the compiler will go through the code, find the unspecified type in the class and replace it with the one you specified. This is, I guess, pre-processing... similar to macro's. But the difference is that it is type safe since after replacing with the specific type, the compiler will check to see if it supports the operation (like +... integral types support this operation, but bool doesnt). If it doesn't suport the op, the compiler will generate (sometimes amazingly cryptic) error messages.

I guess a simple ex may help...

template <typename T>
class myVector
{
    private:
        T* m_elements;

    public:

        myVector( size_t n )
        {
            this->m_elements = new T[ n ];
        }

        ~myVector()
        {
            delete[] this->m_elements;
        }

        void set( size_t i, T v )
        {
            this->m_elements[ i ] = v;
        }

        T get( size_t i )
        {
            return this->m_elements[ i ];
        }
};


Here, T is the unspecified type. myVector is a collection that holds on to T's. When you want to retreive an element at a specific location, get returns a T. And similarly, to add values to the collection you use set.

To actually use this class you'd need to specifiy a type...

int main()
{
    myVector<int> intVector( 2 );

    intVector.set( 0, 11111 );
    intVector.set( 1, 22222 );

    int val1 = intVector.get( 0 );
    int val2 = intVector.get( 1 );
}


So here you specify the type you want myVector to store as int. When the compiler sees myVector<int>, it will create a copy of your template class, with the T's replaced with ints. It will do the same for every type you specify. So if you have myVector<string>, it will have a separate copy of the code with the T's replaced with string. So the idea is to let the compiler do the work.

So hope this gave you some idea. Dinesh/Hrishi correct any mistakes I might have made.

Saturday, March 06, 2004

Re: mount

Dyou mean System V? The kernel is standardized, but what about the commands/programs?

i think there are some POSIX standards as well. i do not have a book right now so cannot confirm. also a basic set of commands / utilities are also always present. basic directory structure, services etc and a few other things are also standardised.


Microsoft had a version of Unix called Xenix! And more surprising... it was developed in a partnership with SCO!

SCO was previously a distro company called Caldera. but they never made much money or something. then they became SCO. also MS does have a stake in SCO. all the reason why linuxers feel this entire SCO issue is just FUD.


Interesting. But dyou think this is such a great idea? It seems this might be a nightmare scenario when it comes to managing different versions. Is there something similar to DLLs? Basically components, which enables reuse.

i have never built apps in linux so i cannot say. all library files ie == dll's go in the /lib or /usr/lib folder. they generally have extensions *.so. also i noticed some lib files with extensions like *.so.2.6 .. so i guess they do manage versions pretty well. some distro's like debian, gentoo have advanced dependency checking mechanisms for apps.


So I have a folder called /u/mrao. So, this is my home directory?
that should be yur home folder. try $ ls -a . yu'll see a bunch of hidden directories and files. most are application settings files.


I didn't try to access them, but I'm sure if I did, it would ask for login data. Anyway, does this mean that all these folders are actually stored in some server and the machine I used to log in is just a thin client (terminal)?

you will get an access denied error. in linux permission model, there are three roles. user == guy who made the file, group == group of which the user is part of and others == everyone else. there are three access levels, read write and execute. execute is when i create an app (suppose cpp or shell script) i can set whether it is executable or not. so calculate the permutations.

the setup definitely seems distributed. but cannot say much. yu might be using dumb terminals, with only processor and ram, no hdd. basically boot over the network. or some other config might be possible.


Another question was regarding daemons.

the stuff you mentioned about daemons, actually services is correct. try
$ ps -ax
this gives a list of all processes.or goto sys settings>>server settings>>services under rh gui mode.
another interesting command is
$ top
discover for yourself. remember h for help. you'll get some idea of how wonderful/powerful the shell is.!!

Re: mount

mohn, i really suggest you read the pike book hrishi got

Dyou mean the Unix book? Yeah, I plan on reading that. And also going through the Oreilly books he burnt for us. I'm actually reading one I got from the college library. It's quite old (he's using some disto called LST - heard of it?), but somehow I liked his approach to it. It's about getting started with Linux.

actually there were many different *nix based os'es. then they decided to standardize under a definite set of rules. not getting the name right now. something like IPC V or so. please correct. so more or less the directory structure, along with some standard commands were fixed.

Dyou mean System V? There were some three branches from the first asm based Unix... the main one - just several diff versions, BSD and SunOS. Because of differing functionality they standardized on System V which was based on the initial asm Unix. But I did not understand what the standardization involved. The kernel is standardized, but what about the commands/programs?

BTW, this came as a big surprise to me... Microsoft had a version of Unix called Xenix! And more surprising... it was developed in a partnership with SCO!

one major difference between *nix and windows is this. in linux when you install a program, it gets stored all over the file system. config files go in etc, some parts go in /lib, and the exe will go in some bin folder.

Interesting. But dyou think this is such a great idea? It seems this might be a nightmare scenario when it comes to managing different versions. Is there something similar to DLLs? Basically components, which enables reuse.

Some more questions I had... wanted to post before I forget.

As I told you before, they have Debian installed on the campus computer lab. Anyway, I have a cs unix account which allows me to log into those machines. So I have a folder called /u/mrao. So, this is my home directory?

The other day I was just playing with some cmds and entered ls -l /u. This brought back a HUGE list of folders with other peoples folders like /u/ajay, /u/dustin, /u/john etc... I didn't try to access them, but I'm sure if I did, it would ask for login data. Anyway, does this mean that all these folders are actually stored in some server and the machine I used to log in is just a thin client (terminal)? Cause sometimes I use a SSH client from home to connect and transfer my files to the Linux machines and I can connect to basically any domain on campus. Doesn't have to be one particular one.

Another question was regarding daemons. Are these just background processes? If you open up Task Manager in Windows you will see several svchost.exe's. These host several services that are always running in the background. So daemons are something similar?

i needed some info how generics work in C++.

I'll post some stuff on it soon.

Re: mount

And a request for more "beginners" linux related info.

mohn, i really suggest you read the pike book hrishi got. i had posted a blog on some fundamentals but i realised it was too long, and i was merely copying stuff. most of the fundamentals are really well explained.


So the next guy who logged in couldn't access the drive. What's the solution in that situation?

there is no solution. remember to umount. in linux, a device == file. and just as you have permissions for files, there are permissions for devices. once a user mounts a floppy, he owns it. so no one is allowed access. other than the superuser, root. also, if you do not unmount the cd, the cd will not eject from the drive even if you try ejecting. and removing a mounted floppy by force causes the system to become slightly unstable.


Can you elaborate a bit on the directory hierarchy.

/ pronounced as root is the highest level of the heirarchy. /bin contains most important system binaries like bash, kill mount etc... /boot contains the boot loader which is generally grub or lilo. /dev contains device files. /etc contains configuration files. /usr contains folders like bin, local, sbin which contain not so important binaries and other files. /var contains logs and stuff. the list i have provided is not exhaustive.


Do all linux distro's contain this exact same hierarchy? If not, how do they differ? Also what if they want to add some custom "user friendly" feature like "My Documents" or something... where would that folder be located?

actually there were many different *nix based os'es. then they decided to standardize under a definite set of rules. not getting the name right now. something like IPC V or so. please correct. so more or less the directory structure, along with some standard commands were fixed.

one major difference between *nix and windows is this. in linux when you install a program, it gets stored all over the file system. config files go in etc, some parts go in /lib, and the exe will go in some bin folder. and like you mentioned My Documents. this is the folder within /home. like say /home/rahul. all applications have different settings for different users. these are stored in the users home folder. this is yur place, yur home. try
$ cd ~
$ pwd


Also what exactly are executables in Linux called? What extensions do they have?

executables in *nix are ELF files. (Executable and Linkable Format). in linux extensions have no meaning (i would appreciate if hrishi could clarify). when you try to run a file linux reads the file and checks headers to determine file type. then takes necessary action. also you can have any length extensions. also something like file.tar.bz2 is valid.


Every new device you mount will be added under /dev? So if I mount a zip drive or whatever, it should appear there.

all devices possible on your system are already present in the /dev directory. when you mount it gets added to the filesystem. in /dev directory you cannot directly write into devices. so you mount along with filesystem type. like cd's are iso9660 or something.


What counts as secondary devices?

primary secondary depends on what bus the device is internally connected to the motherboard. there are two buses in standard x86.

master slave depends on the jumper settings you chose for the device.


This is quite cool. So I can access my music stuff on Windows which is in the main hd (hda). Does mount work "by value" or "by reference". As in, does it make a copy of the files in hda6?

cool i feel is an understaement. there i so many things in linux which are made for interoperability between systems. some stuff is really amazing. and lots lots more to discover.

refernce.. all changes will be reflected and permanent.


So, sorry for the whole bunch of stupid questions. My aim is to advance to intelligent ones after reading your posts on Linux.

hey mohn, don't embarass me. all of us are just trying to learn. we have lots to share. i needed some info how generics work in C++. probably mohn or dinesh could post some stuff.

Open Books Project

http://www.oreilly.com/openbook/

Oreilly at it again. Most are open source.

I'm personally thinking of starting with Linux Device Drivers.

Re: mount

Firstly, thnx for another great topic. And a request for more "beginners" linux related info.

Now for my dumb questions...

mount is a filesystem operation

The first time I had to use a *nix system was early last year for a cs project which HAD to run on Linux. Anyway, it was in java. So I coded it on Windows, saved it on a floppy and went to the linux box to test it. That's when someone told me about this "mounting" stuff. So it was kinda wierd and I didn't understand it. I thought it was kind of strange that the floppy drive had to be mounted and unmounted. I understand now this is an extensibility feature as Rahul said.

Anyway, one problem was that people would log into their account, mount the floppy drive, use it and then NOT unmount it before they logged off. So the next guy who logged in couldn't access the drive. What's the solution in that situation?

the directory structure in a *nix system heirarchy is of the form /(root) withinwhich there are other folders like boot, etc, dev, home etc...

Can you elaborate a bit on the directory hierarchy. I have seen a bit about the diff folders like boot, etc, usr etc... But what exactly does each contain? And are all of these first level under root? As in /boot, /etc, /usr

Do all linux distro's contain this exact same hierarchy? If not, how do they differ? Also what if they want to add some custom "user friendly" feature like "My Documents" or something... where would that folder be located?

Also there are commands that you use from the cmd line like ps, grep, set, etc... These are actualy programs (executables) right? Where are these stored in the hierarchy? Also, are they available in ALL distro's like a standard?

Also what exactly are executables in Linux called? What extensions do they have?

now the important thing here is to understand the numbering for partitions under the /dev(device) directory.

Every new device you mount will be added under /dev? So if I mount a zip drive or whatever, it should appear there.

a in hda means the primary master device on the bus. if you had a primary slave, it would be denoted as hdb.

hda == Your main hard drive.
hdb == If you have a second harddrive it will appear as that.
Similarly, if you have a thrid, fourth harddrives, will it continue as hdc, hdd etc...?
And under those if you have partitions they are numbered.

for secondary devices, they would be hdc and hdd.

What counts as secondary devices?

# mount -t vfat /dev/hda6 /tmp/d
now, wheni browse the /tmp/d directory, all my d: files are visible, with complete read/write support.


This is quite cool. So I can access my music stuff on Windows which is in the main hd (hda). Does mount work "by value" or "by reference". As in, does it make a copy of the files in hda6? What if I mount to /tmp/d and then add files to it, remove some files, edit etc... Will the changes also be made to the originals?

So, sorry for the whole bunch of stupid questions. My aim is to advance to intelligent ones after reading your posts on Linux.

Friday, March 05, 2004

mount

one of the very advanced utilities in *nix, is mount. mount is a filesystem operation.

the directory structure in a *nix system heirarchy is of the form /(root) withinwhich there are other folders like boot, etc, dev, home etc... it is not necessary to have the entire file-system on one device(for eg harddisk) or one partition. it is possible to extend the file system at any mount point for expansion, and the users will be totally unaware of the underlying implementation. let me try an exampleas things seem very cryptic right now.

on my hdd, i have d: (windows) and e: of filesystem type fat32. i store my documents etc on these partition. and need to access them through linux as well. so i just"mount" the partitions within my linux heirarchy. consider the command.

# mount -t vfat /dev/hda6 /tmp/d

here /dev/hda6 is the d: partition which is of type vfat(fat32). /tmp/d is a directory. with this command, the entired: partition is placed under /tmp/d directory. now, wheni browse the /tmp/d directory, all my d: files are visible, with complete read/write support.

now the important thing here is to understand the numbering for partitions under the /dev(device) directory. i will break up hda6. hd means harddisk. a in hda means the primary master device on the bus. if you had a primary slave, it would be denoted as hdb. for secondary devices, they would be hdc and hdd. now 6 in hda6 means the sixth partition.

Device Boot Start End Blocks Id System
/dev/hda1 * 1 1217 9775521 7 HPFS/NTFS
/dev/hda2 1218 1230 104422+ 83 Linux
/dev/hda3 1231 4734 28145880 f Win95 Ext'd (LBA)
/dev/hda4 4735 4865 1052257+ 82 Linux swap
/dev/hda5 1231 1969 5935986 b Win95 FAT32
/dev/hda6 1970 2708 5935986 b Win95 FAT32
/dev/hda7 2709 3728 8193118+ b Win95 FAT32
/dev/hda8 3729 4734 8080663+ 83 Linux

this is the print for my hda using fdisk. to view a similar partiion table for your hdd use fdisk as follows..

# fdisk /dev/hda

then use 'p' as an option to print the partion table.

mohn, you can surf on windows and save the files/tutorials and then access them in linux. now if you have only ntfs partitions, you'll have to recompile the kernel in red hat for ntfs support or get better advice from hrishi. newest mandrake might have ntfs pre-compiled.

have you ever mount-ed ntfs with total read/write hrishi? you can probably suggest some more stuff in mount.

also just a comment, this feature of mounting stuff allows to extend the file system very efficiently unlike windows where drive letters make things slightly more complicated.

Re: Burning iso

Digressing a little bit here... reiserfs is a really good option. It's more robust than the ext3 filesystem.

did you notice any performance gains using reiserfs? i tried using it once, but was a bit apprehensive as i am used to ext3 now. you tried any other fs?


also i got my iptable query solved. i had a funny red-hat default chain which allowed all packets in. so had to insert the icmp drop rule rather than add it!!


i wanted to ask you on devfs, udev, and the current /dev directory. i am a bit messed up on these concepts. any good info/links? or better still could you explain some stuff.

Re: communicating to a modem

Basically, you connect to a friend's computer using hyper terminal.
I've a question... is there a program which I can use to make / answer telephone calls?


like mohn said, it is very possible and there should be apps. but i have tried, but failed with at commands i tried at home. probably you can give me a call next time you come to vashi, and we'll try some stuff.

how come you decided to chat it up with your modem?
well this was a part of the project at barc. dinesh and i got to work on some pretty cool stuff there and these have really been great days for me.!! with respect to the project, we connect to the nokia 30 terminal and a normal data/fax modem through serial ports on the motherboard of the microcontroller. then simply open input/output streams and communicate as required. also as we are communicating to serial ports through java, we have to use the java communcation api. just to get you back down to earth, we did not write the code. just refractored the example code provided with the TINI programming api to suit our needs. if those examples would not have been there this project would simply be impossible. at least thats what i feel.

Indian Techies Answer About 'Onshore Insourcing'

http://interviews.slashdot.org/article.pl?sid=04/02/17/1654255

Wednesday, March 03, 2004

Re: Burning iso

I'm an idiot.

Thanks

Re: Burning iso

mohnish 731,797,504 bytes == 698MB (calculate it yourself if you wish :):) ), so there shouldn't be a problem.

Re: Burning iso

Thanks for the info.

If you are comfortable working on redhat, stick to redhat

Pretty much the main reason I want to switch distros is that Red Hat is not recognizing my wierd network card. So I can't connect to the net. There's not much point in booting into Linux... especially since it's so new to me without a net connection.

I'm not sure if mandrake will recognize it either, but it's worth a shot. And it seems to me (my lay opinon) that Mandrake has a pretty good community behind it. Red Hat's site sucks. Plus they've stopped the client version.

i did not understand your earlier question. the red-hat cd-s were 653mb, 661mb, 496mb.

I downloaded the ISO images for Mandrake 9.2 - just like Red Hat, it has three images. I got them from here... http://gulus.usherb.ca/pub/Mandrake/iso/. It shows all the file sizes as < 700 MB, but the biggest image (698MB) is actually 731,797,504 bytes. So how do I burn that onto a disk?

Re: Burning iso

Just a small addition to Rahul's blog. If you are comfortable working on redhat, stick to redhat. Mandrake has a pretty weird directory structure - esp with the /etc stuff. The reason I use the word 'weird' is I've become very much used to using redhat.

I haven't used Mandrake but it's quite likely that they have some other defaults set differently. From this point of view, I didn't like suse very much.

I've been using redhat all along; I stick to redhat. The point is you wouldn't want to spend much time learning these kind of minor things/defaults... so just stick to what you're comfortable with... unless you have a very specific reason for choosing a particular distribution.
Like for example, you want the reiserfs (file system) instead of the ext3. Redhat did not support it until RH9 (don't know about fedora). SuSE does. But a few minor issues bugged me and my movie player for linux (mplayer) didn't work very well on SuSE, so I ditched SuSE. :-)

Digressing a little bit here... reiserfs is a really good option. It's more robust than the ext3 filesystem. Even in cases of improper shutdowns, it hardly takes any time analyzing it the next time it boots... compare it with the significant time taken to check the ext3fs. Just do a little googling on the reiser and ext3 file systems; you'll pick up some interesting points.

Happy linuxing...

Re: Burning iso

I've downloaded the three iso images Mandrake Linux 9.2. Windows/Opera etc... give the size in MBs at around 695 mb each, but the actual size is 700mb+.How big were the red hat iso's?

i did not understand your earlier question. the red-hat cd-s were 653mb, 661mb, 496mb. if you need an app to create iso files, then i suggest winiso.


Also, apparently Mandrake 10.0 release is just around the corner.

software-wise there will be some upgrades. i expect ver 10.0 to be running on kernel 2.6.x and a few other important apps also. but again in open/free source, there are very regular updates and generally you need upgrades relatively quickly. besides for learning purposes you do not need too bleeding-edge software. but there might be some usability upgrades in mandrake 10.0. so really its all upto yur patience. i would suggest to wait. practice on red hat till then.

Burning iso

Couple questions...

I've downloaded the three iso images Mandrake Linux 9.2. Windows/Opera etc... give the size in MBs at around 695 mb each, but the actual size is 700mb+. How do you burn this on a CD? How big were the red hat iso's?

Also, apparently Mandrake 10.0 release is just around the corner. I dunno what new features it has. Do you think it might be a better idea for me to wait for a bit and then go for that? If it's like a Win2k -> WinXP type upgrade, I don't think it will make much of a diff.

Tuesday, March 02, 2004

Re: communicating to a modem

basically i'll show you how to issue commands to your modem. the modem can be programmed to perform various tasks.

That was a good blog Rahul. Quite insightful. Unfortunately, I don't have a modem, so I can't try out your stuff. But still, it was interesting. Just curious... how come you decided to chat it up with your modem? It aint something you just wake up one morning and decide to do. So something must have drove your attention there.

I've a question... is there a program which I can use to make / answer telephone calls? Something which runs in the background and tells me when the phone rings (assuming I don't have a regular phone connected) so I can answer it using the computer itself...

I'm not sure of any popular ones out there. But I'm sure they are available. A lot of ISPs over here include the software for guys using modems and having one phone line.

One a related topic... Have you guys heard of SKYPE (www.skype.com). It is program that allows you to voice chat online. The thing that makes this so amazing is the quality. The clarity is truely remarkable. It uses P2P technology based off of Kazza technology. Check it out.