Results 1 to 5 of 5
Hi. First post. And I am writing this the third time now... I am using links2 in graphics mode, and first time, I pressed left arrow accidentally. Second time, my ...
- 06-11-2008 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 0
Packaging programs in a single C source file
Hi. First post. And I am writing this the third time now... I am using links2 in graphics mode, and first time, I pressed left arrow accidentally. Second time, my session ended before I posted and I got angry and clicked left arrow accidentally again. But anyway, X is Evil. I also use gmail web interface under links2, and it looks good - the use almost no CSS
OK, so here I am.
I converted some programs into single big C source files, and they work quite well. For example, ./configure script from ncftp package runs for some 30 seconds, while my converted version compiles in a second (!).
I started to think that make is only good for huge projects, such as the kernel or wine.
You can try my converted files, I made a list here: http://cgz.tensus.net
Write what do you think about it. Maybe it is time to introduce a change in GNU's messy packaging system.
- 06-12-2008 #2Linux User
- Join Date
- Jun 2007
- Posts
- 458
Yes, when I was new to Linux, packages were in a bag of filth. I couldn't do anything with them. But you see, if all files (libraries, headers, binaries) are packed within one file, it would weigh tons. And imagine the time taken for downloading packages. I think the Ubuntu's package managing system is a better option.
"When you have nothing to say, say nothing."
- 06-13-2008 #3Just Joined!
- Join Date
- Jun 2008
- Posts
- 0
Well, neither libraries, headers nor binaries go into the one-file source (the package becomes actually a lot smaller).
And you can still use packaging system of your distribution. You would not notice any difference until you build programs from source.
Any kind of package can be easily made from program source in a single C file, but it does not go the other way. A package that depends on make and configure requires much effort when converting it to other platforms, for example non-UNIX.
- 06-13-2008 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
Surely though your code is modular? Monolithic source files are more like scripts or shopping-lists. Write something once and reuse. Also wouldn't your entire binary need to be loaded into memory at once instead of calling what's required from libraries?
- 06-15-2008 #5Just Joined!
- Join Date
- Jun 2008
- Posts
- 0


Reply With Quote

