[Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-28 Thread Harish R
Hi,

I am replying like a new thread because for some reason mails are not
getting delivered to my inbox and I cannot login to play around with the
settings. I am still figuring out the problem. Anyway, lets set that aside
and thanks to all for replying.

As Sankarshan Mukhopadhyay said, there exists Glib. But it does not target
at STL like functionality directly. It deals with stacks, queues, dequeues,
singly and doubly linked lists, arrays, binary trees, n-array trees,
sequences and a few other data structures only. However, it lacks the
support for graphs, hash tables and several algorithms that exist like
searching, sorting, traversing etc. Also, Glib sounds kinda complex to me
personally and this project idea could benefit people like me as I will try
to create easily usable library functions.

As Girish suggested, STL is a C++ thing and not a C thing. I agree totally.
But in cases when you need to demo the algorithm in class as a teacher or
use these data structure operations in quick prototyping of an algorithm or
software you are developing, I think my proposed idea serves well. What say?
Thanks for the other ideas too.

Warm Regards,
Harish.R.

http://blogofharish.wordpress.com

Don't design your character as a garden where everyone can walk
Design it as the sky where everyone will aspire to reach
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-27 Thread Raman.P
--- On Wed, 27/10/10, Girish Venkatachalam  
wrote:

> 4) Find out a perl program to analyze logs
> 
There are few. Look at 
analog http://www.analog.cx/intro.html
awstats http://awstats.sourceforge.net/

Additing some features to them should be a fine project.

Raman.P
blog:http://ramanchennai.wordpress.com/


___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-27 Thread balaji sivanath
On Wed, Oct 27, 2010 at 9:22 PM, Girish Venkatachalam
 wrote:

> I will discuss more things later. People tend not to read long mails.
>
> I have time but later on. Long mails are a problem.

Oh..no am so interested,you know we are reading hundreds of pages in
books, length of the mail is not a problem,explain all the things
please. if you think sending a big mail to list is a problem then send
atleast to me in offlist
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-28 Thread Sudharshan S
On Thu, Oct 28, 2010 at 1:06 PM, Harish R  wrote:
> Hi,
> As Sankarshan Mukhopadhyay said, there exists Glib. But it does not target
> at STL like functionality directly. It deals with stacks, queues, dequeues,
> singly and doubly linked lists, arrays, binary trees, n-array trees,
> sequences and a few other data structures only. However, it lacks the
> support for graphs, hash tables and several algorithms that exist like
> searching, sorting, traversing etc. Also, Glib sounds kinda complex to me
> personally and this project idea could benefit people like me as I will try
> to create easily usable library functions.
>

Glib has been in use for a long time now and is not that difficult to
use. Coming up with something like Glib is not that easy either. Glib
has a ton of utility functions and the documentation is easy to
follow, even for stupid programmers like me.
If you feel something is missing in Glib, why not just add the missing
functionality in Glib itself? Especially since Glib has all the
low-level details abstracted for you anyway. It would also help if you
can tell us what aspect of Glib you find to be complex. If it is the
sleep inducing GObject boilerplate code that you might end up writing,
take a look at Vala. Generates C code and makes Gobject based
programming painless.

> As Girish suggested, STL is a C++ thing and not a C thing. I agree totally.
> But in cases when you need to demo the algorithm in class as a teacher or
> use these data structure operations in quick prototyping of an algorithm or
> software you are developing, I think my proposed idea serves well. What say?
> Thanks for the other ideas too.

If I were you, I'd save myself a lot of trouble by choosing a more
'high-level' language like Python or Ruby (even better, Lisp or
Haskell) for prototyping an algorithm. You can get a lot of job done
by writing less code. Its also easier to teach what the algorithm is
about with these languages as the written code is almost similar to a
pseudocode.

-- 
Sudharshan S
http://sudharsh.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-28 Thread Joe Steeve
On 10/28/2010 01:48 PM, Sudharshan S wrote:
> If you feel something is missing in Glib, why not just add the missing
> functionality in Glib itself?

+1

> can tell us what aspect of Glib you find to be complex. If it is the
> sleep inducing GObject boilerplate code that you might end up writing,
> take a look at Vala. Generates C code and makes Gobject based
> programming painless.

I would not recommend vala for adding functionality to a Glib like
library. If the OP really implements the said features for Glib, I am
sure the Glib folks will be happy to take it into their codebase.

But the fact that Glib does not have such features YET, suggests that
there might be a reason.

-- 
.o. I'm a Free man. I use Free Software.
..o
ooo http://www.joesteeve.org/



signature.asc
Description: OpenPGP digital signature
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-28 Thread Sudharshan S
On Thu, Oct 28, 2010 at 3:33 PM, Joe Steeve  wrote:
> I would not recommend vala for adding functionality to a Glib like
> library. If the OP really implements the said features for Glib, I am
> sure the Glib folks will be happy to take it into their codebase.
>

Oops. I was referring to GObject/Glib programming in general.
I feel, the Vala codebase is an interesting playground for students.
Lot of opportunities to contribute.

> But the fact that Glib does not have such features YET, suggests that
> there might be a reason.
>

I guess one of the reasons is that, being a utility library, Glib need
not have the implementations of all the algorithms under the sun.
As an API user, I won't care what sort algorithm Glib uses as long as
g_list_sort returns a sorted list correctly with a decent performance
:). (g_list_sort seems to use merge sort ;) )

@OP,
All the searching, sorting, hashmaps.etc are already there in Glib.
Graphs are not that hard to implement either. Just have a GHashMap
with GList as values and voila, you have an adjacency list. IMHO,
Implementing a full typing system like GObject and building something
like Glib on top of it is just crazy, especially considering the fact
you want to do it as part of an academic project where you are
time-constrained. That said, there is nothing wrong in doing it. The
experience and the pain might be worth it ;).

-- 
Sudharshan S
http://sudharsh.wordpress.com
___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc


[OFF-TOPIC] Re: [Ilugc] [Final Year Project Idea] Creating a STL like library for C

2010-10-27 Thread Sankarshan Mukhopadhyay
On Wed, Oct 27, 2010 at 8:45 PM, Girish Venkatachalam
 wrote:

[snip]

> Then of course you need to consider the fact that there is a cultural
> issue here.

At some point I'd like to understand what you meant by the above sentence.


-- 
sankarshan mukhopadhyay

___
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc