473,411 Members | 2,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

good algorithms come with practice and reading good code/books?

I am a newbie and going through "The C programming language" by
Kernighan & Richie on my own time (I'm not a programmer but I want to
learn because it can save me time in my normal job, and it is kind of
fun). As I go through the book, I seek to do all the exercises because
they are very useful, and good, but it seems like I am just stumbling
through somewhat. In particular, I don't really know how to think about
"catching errors", or how my thought process should be. Right now, I
just try to come up with an algorithm by following the book and
improvising. I'll then try to test my code by throwing different things
at it (for instance, different types of input in different forms) and
see if it breaks, I then try to figure out why it broke and then patch
in the fix. My time is somewhat limited and I cannot at this time take
a C class at a junior college, but I was wondering if this is just part
of learning? Do I just need to continue reading various texts,
practicing, and studying code and I will acquire error checking and
more robust code over time? Any suggestions, hints, words of advice,
would be greatly appreciated. Thanks very much.

Here is my program by the way:

#include <stdio.h>

//program that counts the number of words and total chars
// but without whitespace, and newlines

// tracks going in/out of words for purpose of counting
#define IN 1 //inside a word
#define OUT 1 //outside a word

main ()
{
int c; //var that holds char read from stdin
int state; //flag for in/out of words
int nc; //counts chars per word
int tnc; //counts total chars minus any whitespace, and newlines
int nw; //total number of words

//initialize variables
c = 0;
low = 0;
state = 0;
nc = 0;
tnc = 0;
nw = 0;

//read char at a time until end of file (ctrl-d)
while ( (c = getchar()) != EOF ) {
if ( c == '\n' || c == '\t' || c == ' ') {
state = OUT;
if (nc 0) ++nw;
nc = 0;
} else {
state = IN; //if you are not OUT then you are IN
++nc;
++tnc;
}
}//while
printf("Number of words %d .. Number of non-whitespace chars %d \n",
nw, tnc);
}//main

Dec 30 '06 #1
26 4061
vlsidesign skrev:
[...]
Here is my program by the way:

#include <stdio.h>

//program that counts the number of words and total chars
// but without whitespace, and newlines

// tracks going in/out of words for purpose of counting
#define IN 1 //inside a word
#define OUT 1 //outside a word
You probably want the constants to have distinct values.
>
main ()
Should be `int main(void)'.
{
int c; //var that holds char read from stdin
int state; //flag for in/out of words
I would use a boolean variable `int insideword' or `bool insideword'
(after including stdbool.h) instead. It will make the program both
clearer and shorter.

Anyway, here is my version of the program:

#include <ctype.h>
#include <stdio.h>

int main(void)
{
int c, words = 0, chars = 0, insideword = 0;

c = getchar();
while (c != EOF) {
if (isspace(c)) {
if (insideword) { words++; }
insideword = 0;
} else {
chars++;
insideword = 1;
}
c = getchar();
}
if (insideword) { words++; }
printf("Found %d words and %d non-whitespace characters\n",
words, chars);
return 0;
}
August
Dec 30 '06 #2
On 30 Dec 2006 01:53:10 -0800, "vlsidesign" <fo*****@gmail.comwrote:
>I am a newbie and going through "The C programming language" by
Kernighan & Richie on my own time (I'm not a programmer but I want to
learn because it can save me time in my normal job, and it is kind of
fun). As I go through the book, I seek to do all the exercises because
they are very useful, and good, but it seems like I am just stumbling
through somewhat. In particular, I don't really know how to think about
"catching errors", or how my thought process should be. Right now, I
just try to come up with an algorithm by following the book and
improvising. I'll then try to test my code by throwing different things
at it (for instance, different types of input in different forms) and
see if it breaks, I then try to figure out why it broke and then patch
in the fix. My time is somewhat limited and I cannot at this time take
a C class at a junior college, but I was wondering if this is just part
of learning? Do I just need to continue reading various texts,
practicing, and studying code and I will acquire error checking and
more robust code over time? Any suggestions, hints, words of advice,
would be greatly appreciated. Thanks very much.

Here is my program by the way:

#include <stdio.h>

//program that counts the number of words and total chars
// but without whitespace, and newlines

// tracks going in/out of words for purpose of counting
#define IN 1 //inside a word
#define OUT 1 //outside a word
I don't think you want both to be 1.
>
main ()
{
int c; //var that holds char read from stdin
int state; //flag for in/out of words
int nc; //counts chars per word
int tnc; //counts total chars minus any whitespace, and newlines
int nw; //total number of words

//initialize variables
c = 0;
low = 0;
state = 0;
nc = 0;
tnc = 0;
nw = 0;

//read char at a time until end of file (ctrl-d)
It's only a comment but remove the parenthetical phrase. ctrl-d is
unix specific (other systems hare different conventions) and it is not
equivalent to end of file (but merely a method for signaling end of
file from a certain input device). If you had redirected your input
to a file using the "<" shell convention, ctrl-d would have no special
meaning.
while ( (c = getchar()) != EOF ) {
if ( c == '\n' || c == '\t' || c == ' ') {
You might find the isspace function useful here.
state = OUT;
You never make use of the value in state. See next comment.
if (nc 0) ++nw;
What happens if the first two words are separated by three spaces?
(Hint: you should only increment nw when state is set to IN.)
nc = 0;
} else {
state = IN; //if you are not OUT then you are IN
You should avoid // comments on usenet. A compiler invoked in C90
mode may not accept them. Equally importantly, if they wrap as a
result of message line length, they produce syntax errors. Both
problems have the effect of reducing the number of people who can (or
are willing) to help solve your problem.
++nc;
++tnc;
}
}//while
printf("Number of words %d .. Number of non-whitespace chars %d \n",
nw, tnc);
}//main

Remove del for email
Dec 30 '06 #3
vlsidesign <fo*****@gmail.comwrote:

<snip>
Right now, I just try to come up with an algorithm by following the book and
improvising. I'll then try to test my code by throwing different things
at it (for instance, different types of input in different forms) and
see if it breaks, I then try to figure out why it broke and then patch
in the fix.
There is nothing wrong with that path of learning. Patience is a virtue.

<snip>
My time is somewhat limited...
You are not alone.

<snip>
Do I just need to continue reading various texts,
practicing, and studying code and I will acquire error checking and
more robust code over time? Any suggestions, hints, words of advice,
would be greatly appreciated. Thanks very much.
Here's a little background from me.
I started programming in the early 80s, because I couldn't find what I was looking
for in terms of software. It wasn't much - it was BASIC just to get what I needed.

I began to realize that I rather enjoyed pondering better programming methods, and
enjoyed learning about logic, programming, and algorithms.

Years later in the 90s I wanted to start making programs for my Windows 3.1 OS computer
so I learned Visual Basic. I had not taken 1 single computer programming course - so I figured I was
behind most people I knew who worked with computers, which forced me to read many books!

Jump ahead many years later - I had to learn .NET for work, and fell in love with C# (which now- no longer like and use)
as opposed to Visual Basic. But I had to learn a bunch of new concepts, which appeared to have originated from
Java. So I learned Java.

While learning Java, I saw many concepts which were also borrowed from the past so I went on to
study C++.

Studying C++ I learned that it was created to add OOP(Object Oriented Programming) concepts to C,
so I went back and learned C. While I was learning C, I realized that I had come full circle, and
had gone back to the "basics", but with better methods of programming, because I had studied so many different
programmers, authors, algorithms, and have made many programs that I later reworked as I learned new concepts.

So having come full circle back to C (which is now, what, around 30+ years old?) I decided to take the plunge
and jump into linux. I have never had more fun with computers than I do now, making programs with C, scripting with BASH, administering my own linux servers, and further automating tasks I had previously done manually. I have learned to love the
open source concept - browse many projects on sourceforge.net to find what I'm looking for.

Wow! What a path!

Some of the most fun I've had learning C (and the most frustrating) was using the book called PROGRAMMING CHALLENGES ISBN-10: 0387001638 ISBN-13: 978-0387001630. Written by 2 academics, this book is a compilation of 100 exercises to practice programming. You then submit your code to automated judges online to see if it passes. Personally, my favorite part is just determining the methods with which to solve the problems.

I also suggest as a reference Herb Schildt's Complete Reference to C (check out herbschildt.com)

But the book that really opened my eyes to the art of programming and algorithms was Mastering Algorithms with C ISBN 10: 1-56592-453-3 ISBN 13: 9781565924536.

If you really want to study algorithms in more depth, allow me also to suggest Algorithms in C parts 1-5, by Robert Sedgewick.

I can tell you this,
I'm no expert, but I enjoy what I do, and study every day (when time allows).
But that's the other part of the fun...
Knowing I have a limited amount of time to spend studying what I enjoy,
makes it all the more worth it.

Take your time, have fun, share ideas, offer aid, and stay humble.

I can't think of a better way to have fun with a computer than progamming with C.

But above all else, have fun and enjoy your progress,

otherwise why do it at all?

Dec 30 '06 #4
newsman...@sbcglobal.net wrote:
<snip>
I also suggest as a reference Herb Schildt's Complete Reference to C (check out herbschildt.com)
That book is not considered accurate enough. Harbison & Steele's
reference may be better choice.

Dec 30 '06 #5
ne********@sbcglobal.net said:

<snip>
I also suggest as a reference Herb Schildt's Complete Reference to C
....which tells us all we need to know about the quality of your advice.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 30 '06 #6
Richard Heathfield <rj*@see.sig.invalidwrote:
ne********@sbcglobal.net said:

<snip>

...which tells us all we need to know about the quality of your advice.
All I really use that book for is a reference to the c library functions.

But you are correct, Herb Schildt's book should not be used for much else.

Let me correct myself and suggest to pick out a good reference to the functions in the C library.

I would suggest to exhaust what exists in the libraries and 'know' the functions, so the beginner isn't reworking
what's already there.
Dec 30 '06 #7
August Karlstrom wrote:
Anyway, here is my version of the program:
Cool. Thanks for sharing it :)
#include <ctype.h>
#include <stdio.h>

int main(void)
{
int c, words = 0, chars = 0, insideword = 0;

c = getchar();
while (c != EOF) {
if (isspace(c)) {
Thanks I was unaware of isspace function.
if (insideword) { words++; }
insideword = 0;
I like the way you did it and yours works, my didn't. I was doing it
like this
if (nc 0) ++nw;
nc = 0;
My version here did take care of multiple spaces in a row because nc
(number of characters in word) is only 0 if it is the first
whitespace char (coming out of word, and nc is not set to 0 yet), but
it incorrectly incremented nw (new word) when first character of input
was a whitespace.
} else {
chars++;
insideword = 1;
}
c = getchar();
}
if (insideword) { words++; }
This catches when the last char is nonwhitespace and then EOF. My
version I didn't catch this.
printf("Found %d words and %d non-whitespace characters\n",
words, chars);
return 0;
}
August
Thanks again for sharing that.

Dec 30 '06 #8
ne********@sbcglobal.net said:
Richard Heathfield <rj*@see.sig.invalidwrote:
>ne********@sbcglobal.net said:

<snip>

...which tells us all we need to know about the quality of your advice.

All I really use that book for is a reference to the c library functions.
Nice spot of back-pedalling. :-)

Unfortunately, it's no good as a library reference either.

For example, it suggests in the gets() description that "it is your job to
make sure that the array pointed to by str is not overrun", hinting that
this job is actually possible (which it isn't). This wouldn't be so bad if
Schildt warned against using gets(), but of course he uses it freely
throughout the book.

For example, it claims in the getchar() description that "since EOF is a
valid integer value, you must use feof() to check for end-of-file when
working with binary files", which is complete nonsense.

For example, it claims that fwrite() and fread() return int, whereas in fact
they return size_t.

For example, it claims that fflush() clears the contents of the input buffer
if given an input stream's file pointer, whereas in fact the behaviour is
undefined.

For example, it suggests in the strncpy() description that "if the string
pointed to by str2 is longer than count characters, the resultant string
pointed to by str1 is not null terminated", whereas in fact this happens if
the source string is longer than or equal to count characters.

In the same description, it gives the following example:

---- begin quote ----
The following fragment copies at most 79 characters of str1 into str2,
thus ensuring that no array boundary overflow occurs.

char str1[128], str2[80];

gets(str1);
strncpy(str2, str1, 79);
---- end quote ----

In fact, it ensures no such thing, for two reasons. Firstly, the use of
gets() means that it cannot be ensured that no array boundary overflow has
occurred. Secondly, since str2's value is initially indeterminate, if the
input given to gets() is exactly 79 characters long (not including the
terminator), those 79 characters will be copied, but str2 will not be
null-terminated, and thus even a printf is likely to violate the bounds of
the array (I say "likely" because it's just possible that str2[79] will
happen to be a '\0'). Thus, array bounds overflow prevention is *not*
ensured.

For example... well, I found those half-dozen obviously flawed examples in
the first six functions I looked at. Heaven knows how many more such
obvious errors there are, and we haven't even started to consider the
*subtle* errors.
But you are correct, Herb Schildt's book should not be used for much else.
s/for much else/except as a door-stop/
Let me correct myself and suggest to pick out a good reference to the
functions in the C library.
"The C Programming Language", 2nd edition, by Kernighan and Ritchie, is an
excellent reference.
I would suggest to exhaust what exists in the libraries and 'know' the
functions, so the beginner isn't reworking what's already there.
That, at least, is sound advice. :-)

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 30 '06 #9
Richard Heathfield <rj*@see.sig.invalidwrites:
ne********@sbcglobal.net said:
[...]
"The C Programming Language", 2nd edition, by Kernighan and Ritchie, is an
excellent reference.
It's probably a better tutorial than a reference.

"C: A Reference Manual", 5th edition, by Harbison and Steele, is an
excellent reference.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Dec 30 '06 #10
Keith Thompson said:
Richard Heathfield <rj*@see.sig.invalidwrites:
>ne********@sbcglobal.net said:
[...]
>"The C Programming Language", 2nd edition, by Kernighan and Ritchie, is
an excellent reference.

It's probably a better tutorial than a reference.
That's probably a matter of taste. :-)
"C: A Reference Manual", 5th edition, by Harbison and Steele, is an
excellent reference.
I have both (well, okay, 4th edition of H&S), but I invariably look stuff up
in K&R. Having said that, it may simply be because K&R guesses what I'm
looking for, and tends to fall open at the appropriate page, whereas H&S is
rather more aloof and makes me look stuff up in the index.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 31 '06 #11
ne********@sbcglobal.net wrote:
>
.... snip ...
>
I also suggest as a reference Herb Schildt's Complete Reference
to C (check out herbschildt.com)

But the book that really opened my eyes to the art of programming
and algorithms was Mastering Algorithms with C ISBN
10:1-56592-453-3 ISBN 13: 9781565924536.

If you really want to study algorithms in more depth, allow me
also to suggest Algorithms in C parts 1-5, by Robert Sedgewick.
Sedgewick is good, I don't know about Mastering Algorithms, but
anything by Schildt is fundamentally wrong and will give you evil
habits. It is generally known as BullSchildt around here. You
might want to get the ISO standard as the ultimate reference.
Search for N869 and/or N1124. A well formatted text version
suitable for quoting and easy searching with less is available,
bzip2 compressed, at:

<http://cbfalconer.home.att.net/download/>

--
Merry Christmas, Happy Hanukah, Happy New Year
Joyeux Noel, Bonne Annee.
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Dec 31 '06 #12

vlsidesign wrote:
I am a newbie and going through "The C programming language" by
Kernighan & Richie on my own time (I'm not a programmer but I want to
learn because it can save me time in my normal job, and it is kind of
fun). As I go through the book, I seek to do all the exercises because
they are very useful, and good, but it seems like I am just stumbling
through somewhat. In particular, I don't really know how to think about
"catching errors", or how my thought process should be. Right now, I
just try to come up with an algorithm by following the book and
improvising. I'll then try to test my code by throwing different things
at it (for instance, different types of input in different forms) and
see if it breaks, I then try to figure out why it broke and then patch
in the fix. My time is somewhat limited and I cannot at this time take
a C class at a junior college, but I was wondering if this is just part
of learning? Do I just need to continue reading various texts,
practicing, and studying code and I will acquire error checking and
more robust code over time? Any suggestions, hints, words of advice,
would be greatly appreciated. Thanks very much.
You might try your hand at functional programming. You should
realize this, if anything else, that C is not a very expressive
language.
Give that some thought while you learn a language like Scheme or
Haskell.

--
aegis

Jan 1 '07 #13
aegis a écrit :
>
You might try your hand at functional programming. You should
realize this, if anything else, that C is not a very expressive
language.
Give that some thought while you learn a language like Scheme or
Haskell.
Can you please give ma an example of commercial or
public domain software that is written in Haskell or in
Scheme?

I mean a substantial software system like a word processor
or a spreadsheet, a network application, a mail reader,
something like that.

Thanks
Jan 1 '07 #14

jacob navia wrote:
aegis a écrit :

You might try your hand at functional programming. You should
realize this, if anything else, that C is not a very expressive
language.
Give that some thought while you learn a language like Scheme or
Haskell.

Can you please give ma an example of commercial or
public domain software that is written in Haskell or in
Scheme?

I mean a substantial software system like a word processor
or a spreadsheet, a network application, a mail reader,
something like that.
DrScheme is mostly written in scheme.

--
aegis

Jan 1 '07 #15
aegis a écrit :
jacob navia wrote:
>>aegis a écrit :
>>>You might try your hand at functional programming. You should
realize this, if anything else, that C is not a very expressive
language.
Give that some thought while you learn a language like Scheme or
Haskell.

Can you please give ma an example of commercial or
public domain software that is written in Haskell or in
Scheme?

I mean a substantial software system like a word processor
or a spreadsheet, a network application, a mail reader,
something like that.


DrScheme is mostly written in scheme.

--
aegis
I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.
Jan 1 '07 #16
jacob navia wrote:
>
I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.
Last I checked, development tools counted as application software.
Since you're applying unknown and unnecessary restrictions to prove
your point, perhaps you could define what you mean by "whatever" in
your list of acceptable applications.

Jan 1 '07 #17
jacob navia wrote:
aegis a écrit :
>jacob navia wrote:
>>aegis a écrit :

You might try your hand at functional programming. You should
realize this, if anything else, that C is not a very expressive
language.
Give that some thought while you learn a language like Scheme or
Haskell.

Can you please give ma an example of commercial or
public domain software that is written in Haskell or in
Scheme?

I mean a substantial software system like a word processor
or a spreadsheet, a network application, a mail reader,
something like that.


DrScheme is mostly written in scheme.

--
aegis

I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.
- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).
- AutoCAD uses lisp modules.
--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 1 '07 #18
Nelu wrote:
jacob navia wrote:

I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.

- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).
Isn't elisp a different dialect of Lisp from scheme ?

Jan 2 '07 #19
Spiros Bousbouras a écrit :
Nelu wrote:
>>jacob navia wrote:
>>>I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.

- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).


Isn't elisp a different dialect of Lisp from scheme ?
yes, but it is the same "family".
Emacs itself is written in....

YES!!!!
YOU GUESSED IT!!!

But they have a small little "extensions" language (like
MatchCad), and many others where lisp shines.

I am NOT against lisp (as I am not "against" any
computer language, but in the real world there is
very little space apparently for this languages.

Scripting languages like perl/ruby/python, are
another stuff.
Jan 2 '07 #20
Spiros Bousbouras wrote:
Nelu wrote:
>jacob navia wrote:
>>I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.
- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).

Isn't elisp a different dialect of Lisp from scheme ?
Yes, it is. I believe the previous post was more about functional
programming than about a specific language. If not, then Sawfish
is the only example, from the list, that stands.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 2 '07 #21
Nelu wrote:
Spiros Bousbouras wrote:
Nelu wrote:
jacob navia wrote:
I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.
- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).
Isn't elisp a different dialect of Lisp from scheme ?

Yes, it is. I believe the previous post was more about functional
programming than about a specific language. If not, then Sawfish
is the only example, from the list, that stands.
sawfish is not written in scheme. It is mostly written in a custom
dialect of lisp based on elisp.

Jan 2 '07 #22
Harald van Dijk a écrit :
Nelu wrote:
>>Spiros Bousbouras wrote:
>>>Nelu wrote:

jacob navia wrote:

>I meant APPLICATION software.
>
>An application that does something, for instance
>a spreadsheet, a word processor, whatever.

- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).

Isn't elisp a different dialect of Lisp from scheme ?

Yes, it is. I believe the previous post was more about functional
programming than about a specific language. If not, then Sawfish
is the only example, from the list, that stands.


sawfish is not written in scheme. It is mostly written in a custom
dialect of lisp based on elisp.
There are applications in lisp

Macsyma, the famous mathematical system, is written
in ANSI lisp. (Common lisp).

That is a HUGE software package.

Scheme is mostly used for education and universities.
Personally I have never seen any application in that
language. The same for Haskell and all the
functional languages.

Jan 2 '07 #23
On 1 Jan 2007 16:23:56 -0800, "Spiros Bousbouras" <sp****@gmail.comwrote:
>Nelu wrote:
>>jacob navia wrote:
>>I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.

- Sawfish (window manager)

- Emacs (real-time text editor) <- GNUS (mail client) <- emms <- erc
and so on. (Emacs and all the software written on top of it with
elisp make for a very substantial software system that's well beyond
any of you requirements :-) ).

Isn't elisp a different dialect of Lisp from scheme ?
Yes. It does support writing programs using a functional style though,
which we can probably assume -- with the usual jacob-navia risk factor,
of course -- that kind of matches the original request by jacob navia.

This is already getting too OT for c.l.c though.

Jan 2 '07 #24
Harald van Dijk wrote:
Nelu wrote:
>Spiros Bousbouras wrote:
>>Nelu wrote:
jacob navia wrote:
I meant APPLICATION software.
>
An application that does something, for instance
a spreadsheet, a word processor, whatever.
- Sawfish (window manager)
- Emacs (real-time text editor) <- GNUS (mail client) <- emms <-
erc and so on. (Emacs and all the software written on top of it
with elisp make for a very substantial software system that's
well beyond any of you requirements :-) ).
Isn't elisp a different dialect of Lisp from scheme ?
Yes, it is. I believe the previous post was more about functional
programming than about a specific language. If not, then Sawfish
is the only example, from the list, that stands.

sawfish is not written in scheme. It is mostly written in a custom
dialect of lisp based on elisp.
I saw it advertised somewhere as being written in a language like
guile-scheme. Anyway, scwm may be a better example.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jan 2 '07 #25
Giorgos Keramidas wrote:
On 1 Jan 2007 16:23:56 -0800, "Spiros Bousbouras" <sp****@gmail.comwrote:
Nelu wrote:
>jacob navia wrote:
I meant APPLICATION software.

An application that does something, for instance
a spreadsheet, a word processor, whatever.

- Sawfish (window manager)

- Emacs (real-time text editor) <- GNUS (mail client) <- emms <- erc
and so on. (Emacs and all the software written on top of it with
elisp make for a very substantial software system that's well beyond
any of you requirements :-) ).
Isn't elisp a different dialect of Lisp from scheme ?

Yes. It does support writing programs using a functional style though,
which we can probably assume -- with the usual jacob-navia risk factor,
of course -- that kind of matches the original request by jacob navia.

This is already getting too OT for c.l.c though.
No , I think he literally wanted to know about Haskell
or Scheme. Anyway , it is out of topic. There are newsgroups
for both languages and the question is best asked there.

Jan 2 '07 #26
jacob navia <ja***@jacob.remcomp.frwrites:
[...]
Emacs itself is written in....

YES!!!!
YOU GUESSED IT!!!

But they have a small little "extensions" language (like
MatchCad), and many others where lisp shines.

I am NOT against lisp (as I am not "against" any
computer language, but in the real world there is
very little space apparently for this languages.
<OT>
The core of GNU Emacs, including the elisp interpreter, is written in
C, but the bulk of the functionality is implemented in elisp.
</OT>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jan 2 '07 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: matty | last post by:
Go away for a few days and you miss it all... A few opinions... Programming is a craft more than an art (software engineering, not black magic) and as such, is about writing code that works,...
10
by: KN | last post by:
I know both are pretty much the same and it comes down to personal choice. But I have to make the choice for the team. Things so far that I am considering 1. XML documentation in C# -- thats...
12
by: G. | last post by:
Hi all, During my degree, BEng (Hons) Electronics and Communications Engineering, we did C programming every year, but I never kept it up, as I had no interest and didn't see the point. But now...
113
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same...
19
by: JoeC | last post by:
I have seen many books that teack coding for C++. What are ways to improve my techniques for writing larger programs. I have written many demo programs learning some aspects of code wether it be...
7
by: TAVOSOFT | last post by:
Hi friends, I am begginer , I wanna to learn VB2005 ,Which are good book for to learn VB2005 of level -begginer-intermediate. Thanks you friends.
17
by: Happy Man | last post by:
Truth Seeker http://www.thisistruth.org/truth.php?f=TruthSeeker No one is compelled to accept the truth, but it is certainly a shame upon the human intellect when a man is not even...
3
by: arnuld | last post by:
i am a beginner at algorithms. i was checking ACCU and this one caught my attention: "Introduction to Computing and Algorithms" -- Russell Shackelford had anybody read this book ? i want...
11
by: CellDivider | last post by:
Hello folks, currently I'm looking for a good books that gives an overview of useful c/c++ algorithms and design patterns, in the manner of "what's the most efficient way to implement <often...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.