Ncurses Thoughts
I plan to make several console-mode only programs, and thus have been researching ncurses. However, I'm not impressed by it.
To be quite frank, many of the programs I see using it shouldn't need it at all ( bsdgames package has some good examples there). Many man pages and web pages claim ncurses key value is the portability it gives to programs. Let's look at this a moment shall we? -ncurses is not "forward compatable". ie stuff compiled against version 5 won't work with version 4. -ncurses has no Windows or DOS ports. A while back I wrote a simple program that demos all of the key functions I use. It is statically linked. It has no dependencies (under linux; under Windows it has 4 dependencies). -Compiled under kernel version 2.4.27, it runs without change on systems with different kernel versions (older and newer kernels). -Compiled under ncurses 5, it runs on systems with version 4. -I only have to compile this program on Windows to make it Windows / DOS compatable. (no editing of source code needed). NCurses' other features include writing text to the terminal screen, blanking the screen, and changing text color. All of which are already present APIs like getc. Is there any reason to use ncurses? |
Not to be critical of you, but when they say ncurses is "portable" they were really saying that it is a free software version of curses from SysV R4.0 that will work on any ANSI/POSIX compliant UNIX system (or *nix system). Nobody ever said it would work on Windows or DOS because they aren't UNIX OS's... but it does work on Solaris, AIX, IRIX, MacOSX, Linux, BSD, ect. You need to keep in mind why they wrote it in the first place. There were a bunch of apps people had written with curses on SysV and everyone wanted to use those apps on new systems running other Unix OS's. Compared to curses it is VERY portable.
I do agree that there are some apps out there that use it that probably don't need to, but as far as emulating basic windowing in text mode unix it is hard to beat. |
Quote:
Quote:
After all loading 350 KB of libraries to run a 30 KB program is a good portion of the definition of bloatware. ;) |
I agree with you about some linux apps being total bloatware. I find from time to time just utterly stupid actions programmers take when creating a program. One of my bigest beef's i would say with some programs is a over dependancy on librarys. Now im not saying librarys are bad but we need to be a little more less dependant on obscure shared librarys. IF you know that a library you used in a program is not very common in any of the distros and you use it in your program "INCLUDE IT WITH THE SOURCE" <--- why is this such a problem to do.
another reason i belive a 40kb program requires so many librarys is because the programer will use a function in one of the librarys and its the only one he used in there. So you have to load the whole library just to get the one function used. an example i would say is i found this wonderfull program online that shows me the wireless stregth of my wireless signal. But after about 2 hours of trying to find a java library i think cant rember too good on this one for tcl looking on cspan i gave up trying to compile the program. The programmer had used a library that is almost impossible to get online. |
Quote:
|
Quote:
Wine can't run it because it calls a DLL that isn't supported. Using a dependency checker I found that sol.exe calls exactly one function from a 2.3 MB DLL. That function is just a "OK" response to Windows shutting down. :rolleyes: |
But that's very likely to be library that is used by a lot of programs, if not virtually all programs that have a user-interface.
So I guess when you start sol.exe 99 out of a 100 times, this DLL is already loaded. Though ncurses is not that common, the same reasoning applies. |
Ohh I agree that windows programs do exactly the same thing :P
|
Maybe I'm missing something, but I do believe that there is a Windows port of ncurses available with Cygwin...
|
Probably true,..
Strictly speaking that's not a Windows-port, but a unix/linux emulation layer. |
All times are GMT -5. The time now is 11:07 PM. |