Re: c/unix q

2013-10-25 Thread E.S. Rosenberg
2013/6/6 Erez D erez0...@gmail.com: On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote: On 04/06/13 15:28, Erez D wrote: thanks, so i guess if i use unidirectional connection, and the reader does not expect to get an EOF() thank i'm safe. Why are you so keen on

Re: c/unix q

2013-10-25 Thread E.S. Rosenberg
2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote: 2013/6/6 Erez D erez0...@gmail.com: On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote: On 04/06/13 15:28, Erez D wrote: thanks, so i guess

Re: c/unix q

2013-06-06 Thread Erez D
On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote: On 04/06/13 15:28, Erez D wrote: thanks, so i guess if i use unidirectional connection, and the reader does not expect to get an EOF() thank i'm safe. Why are you so keen on doing it wrong? No, you are not

Re: c/unix q

2013-06-06 Thread Erez D
On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote: 2013/6/6 Erez D erez0...@gmail.com: On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote: On 04/06/13 15:28, Erez D wrote: thanks, so i guess if i use unidirectional connection, and

Re: c/unix q

2013-06-06 Thread E.S. Rosenberg
re:all, forgot to change my from field. 2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote: 2013/6/6 Erez D erez0...@gmail.com: On Tue, Jun 4, 2013 at 6:09 PM, Shachar Shemesh shac...@shemesh.biz wrote: On 04/06/13 15:28,

Re: c/unix q

2013-06-06 Thread Erez D
On Thu, Jun 6, 2013 at 5:29 PM, E.S. Rosenberg esr+linux...@g.jct.ac.ilwrote: re:all, forgot to change my from field. 2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote: 2013/6/6 Erez D erez0...@gmail.com: On Tue,

Re: c/unix q

2013-06-06 Thread E.S. Rosenberg
2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:29 PM, E.S. Rosenberg esr+linux...@g.jct.ac.il wrote: re:all, forgot to change my from field. 2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:04 PM, E.S. Rosenberg e...@g.jct.ac.il wrote: 2013/6/6 Erez D

Re: c/unix q

2013-06-06 Thread Erez D
On Thu, Jun 6, 2013 at 5:45 PM, E.S. Rosenberg esr+linux...@g.jct.ac.ilwrote: 2013/6/6 Erez D erez0...@gmail.com: On Thu, Jun 6, 2013 at 5:29 PM, E.S. Rosenberg esr+linux...@g.jct.ac.il wrote: re:all, forgot to change my from field. 2013/6/6 Erez D erez0...@gmail.com:

Re: c/unix q

2013-06-06 Thread Shachar Shemesh
On 06/06/13 18:14, Erez D wrote: Just have the parent request another child from the child, can't do - i do not have the source of the child. ( i do fork+exec ) Remind me why you insist on one pipe for all children? What are you going to do if the children's lifetime overlaps? What is

Re: c/unix q

2013-06-04 Thread ronys
Nothing. You're just wasting resources (file descriptors) and making your code a bit harder to understand and maintain. Note that for pipe(), you can use both fds at both ends of the pipe, but it's very easy to get into a race condition.Better to open a pair of pipes, one for each direction (of

Re: c/unix q

2013-06-04 Thread Geoffrey S. Mendelson
On 06/04/2013 02:43 PM, ronys wrote: Nothing. You're just wasting resources (file descriptors) and making your code a bit harder to understand and maintain. It kind of says to anyone reading the code that you put the minimum into creating it you could, and implies there are details that were

Re: c/unix q

2013-06-04 Thread Amos Shapira
Bt. Wrong. If the unused side of the pipe is left open by the process which doesn't read it then it will be considered as open even if the other side closed it, therefore preventing the reading process from receiving the EOF mark (read(2) returning zero bytes). And just to backup my claim

Re: c/unix q

2013-06-04 Thread Amos Shapira
On 4 June 2013 21:43, ronys ro...@gmx.net wrote: Nothing. You're just wasting resources (file descriptors) and making your code a bit harder to understand and maintain. Note that for pipe(), you can use both fds at both ends of the pipe, but it's very easy to get into a race condition.Better

Re: c/unix q

2013-06-04 Thread Erez D
thanks, so i guess if i use unidirectional connection, and the reader does not expect to get an EOF() thank i'm safe. thanks, erez. On Tue, Jun 4, 2013 at 3:23 PM, Amos Shapira amos.shap...@gmail.com wrote: On 4 June 2013 21:43, ronys ro...@gmx.net wrote: Nothing. You're just wasting

Re: c/unix q

2013-06-04 Thread Yedidyah Bar David
ְAlso, you might cause other software that inherits the fds to fail/complain/whatever. I only mention this because just yesterday I noticed that when running 'lvs' on my Debian wheeze laptop, I get: File descriptor 3 (/usr/share/bash-completion/completions) leaked on lvs invocation. Parent PID

Re: c/unix q

2013-06-04 Thread Shachar Shemesh
On 04/06/13 15:28, Erez D wrote: thanks, so i guess if i use unidirectional connection, and the reader does not expect to get an EOF() thank i'm safe. Why are you so keen on doing it wrong? No, you are not safe. If the child process dies because of a segmentation fault (or whatever), the

Re: C++ problem

2005-01-31 Thread Oleg Goldshmidt
Shachar Shemesh [EMAIL PROTECTED] writes: Oleg Goldshmidt wrote: Oleg Goldshmidt [EMAIL PROTECTED] writes: I stand by my posting so far. Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's

Re: C++ problem

2005-01-31 Thread Shachar Shemesh
Oleg Goldshmidt wrote: Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's Effective C++ confirms what I wrote: temps are const, and for the reasons I covered. It explicitly says that with a declaration like

Re: C++ problem

2005-01-31 Thread voguemaster
Couple of points, 1. In normal circumstances the compiler automatically generates a bitwise copy constructor if none is present. This can be verified easily. Note that in this case, the copy ctor is declared but not implemented which means the compiler will not create a default copy ctor.

Re: C++ problem

2005-01-31 Thread Oleg Goldshmidt
Shachar Shemesh [EMAIL PROTECTED] writes: There is no difference between the first a() and the second a(). Both are temporary variables of type a generated by an empty constructor. Yes, there is a difference, and I suspect that is what you are missing. In the first case you create a temp a()

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Omer Zak wrote: On Sat, 29 Jan 2005, Shachar Shemesh wrote: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); What is the meaning of 'explicit' declaration? Is this a C++ keyword which was added since I learned C++? Explicit

Re: Sorry, I forgot about copy constructor (was: Re: C++ problem)

2005-01-30 Thread Alex Vinokur
Omer Zak [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Replying to myself, because I forgot one more point: From what I remember about C++, you need also a copy constructor in this case, In this case a copy constructor is not invoked. because you strive to copy a value to a

Re: C++ problem

2005-01-30 Thread Alex Vinokur
Shachar Shemesh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm wondering WHY temporary implicit variables should be considered const. It's clear that the compiler does consider them like that. [snip] See

Re: C++ problem

2005-01-30 Thread Alex Vinokur
Shachar Shemesh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); a operator= ( a that ); }; int main() { a var1(3); var1=a(5); return 0;

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Shachar Shemesh wrote: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); a operator= ( a that ); }; int main() { a var1(3); var1=a(5); return 0; } Somewhat surprisingly, this does not compile: g++ -Wall -gtestcompile.cc -o

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Shachar Shemesh [EMAIL PROTECTED] writes: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); a operator= ( a that ); }; int main() { a var1(3); var1=a(5); return 0; } Somewhat surprisingly,

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Oleg Goldshmidt wrote: Hi Shachar, Compilers generate const temporaries to prevent accidental passing of such a temporary to a function that would be able to modify its argument. If that were allowed the programmer would be surprized because only the compiler-generated temporary would be modified,

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Shachar Shemesh [EMAIL PROTECTED] writes: Oleg Goldshmidt wrote: Hi Shachar, Compilers generate const temporaries to prevent accidental passing of such a temporary to a function that would be able to modify its argument. If that were allowed the programmer would be surprized because

Re: C++ problem

2005-01-30 Thread Oleg Goldshmidt
Oleg Goldshmidt [EMAIL PROTECTED] writes: I stand by my posting so far. Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's Effective C++ confirms what I wrote: temps are const, and for the reasons I

Re: C++ problem

2005-01-30 Thread Shachar Shemesh
Oleg Goldshmidt wrote: Oleg Goldshmidt [EMAIL PROTECTED] writes: I stand by my posting so far. Well, while it was making the round trip to the list and back, I also made a trip to the bookshelf to check myself. Item 15 of Scott Meyers's Effective C++ confirms what I wrote: temps are

Re: C++ problem

2005-01-29 Thread Omer Zak
On Sat, 29 Jan 2005, Shachar Shemesh wrote: Hi all, Here is a small program for your viewing pleasure: class a { public: explicit a(int param); What is the meaning of 'explicit' declaration? Is this a C++ keyword which was added since I learned C++? a operator= ( a that );

Sorry, I forgot about copy constructor (was: Re: C++ problem)

2005-01-29 Thread Omer Zak
Replying to myself, because I forgot one more point: From what I remember about C++, you need also a copy constructor in this case, because you strive to copy a value to a variable (and in this special case, the value is a constant instance of a class). On Sat, 29 Jan 2005, Omer Zak wrote: On

Re: C++ problem

2005-01-29 Thread Kobi Cohen-Arazi
Yes, explicit keyword is here long time ago. Get a C++ book from more details. At the moment, C++ decides that binding a non-const ref to a temporary is wrong. Thats the problem. Kobi. On Sat, 29 Jan 2005 23:04:52 +0200 (EET), Omer Zak [EMAIL PROTECTED] wrote: On Sat, 29 Jan 2005, Shachar

Re: c++ sigmentation fault happens only in linux

2005-01-27 Thread Shachar Shemesh
guy keren wrote: int i; int j = i; int k = j; if (k 0) blablabla... valgrind will only point the last one as an error (at least, that's how it is in valgrind-1.0.3). Actually, that's intentional. Otherwise, consider the following example: struct padding { char a; int b; } struct a, b; .

Re: c++ sigmentation fault happens only in linux

2005-01-26 Thread guy keren
On Wed, 26 Jan 2005, Orna Agmon wrote: On Wed, 26 Jan 2005, guy keren wrote: On Mon, 24 Jan 2005, Orna Agmon wrote: Valgrind is not always correct. It sometimes reports errors which do not exists - they have no reason to exist and other memory checkers (such as third) do not find

Re: c++ sigmentation fault happens only in linux

2005-01-25 Thread guy keren
On Mon, 24 Jan 2005, Orna Agmon wrote: Valgrind is not always correct. It sometimes reports errors which do not exists - they have no reason to exist and other memory checkers (such as third) do not find them. that, ofcourse, is no proof - the other checker might be too limited, or have a

Re: c++ sigmentation fault happens only in linux

2005-01-25 Thread Orna Agmon
On Wed, 26 Jan 2005, guy keren wrote: On Mon, 24 Jan 2005, Orna Agmon wrote: Valgrind is not always correct. It sometimes reports errors which do not exists - they have no reason to exist and other memory checkers (such as third) do not find them. that, ofcourse, is no proof - the other

Re: c++ sigmentation fault happens only in linux

2005-01-24 Thread shtirlitz
Quoting Aviv Goll [EMAIL PROTECTED]: You better fix all vargrind errors. It takes time to understand why they are happening. The stability of my applications have bin raised significantly high after fixing all vargrind errors. Additional thing to test in valgring is gracefull shutdown of you

Re: c++ sigmentation fault happens only in linux

2005-01-24 Thread Aviv Goll
On Mon, 24 Jan 2005 05:16:23 +0200, Micha Feigin [EMAIL PROTECTED] wrote: At Mon, 24 Jan 2005 02:45:52 +0200, Aviv Goll wrote: hi, I'm currently writing an assignment in c++ using g++. according to some printouts, during the following lines: stringstream Fstr; fstrblah blah;

Re: c++ sigmentation fault happens only in linux

2005-01-24 Thread Yedidyah Bar-David
On Mon, Jan 24, 2005 at 11:12:28AM +0200, Aviv Goll wrote: On Mon, 24 Jan 2005 05:16:23 +0200, Micha Feigin [EMAIL PROTECTED] wrote: At Mon, 24 Jan 2005 02:45:52 +0200, Aviv Goll wrote: hi, I'm currently writing an assignment in c++ using g++. according to some printouts, during

Re: c++ sigmentation fault happens only in linux

2005-01-24 Thread Orna Agmon
On Mon, 24 Jan 2005, Yedidyah Bar-David wrote: Aviv, nobody thought that modern C++ compilers/OSes can't compile/run this piece of code. The bug is obviously elsewhere in your program. Now, traditionally, it would be hard to debug - you'd, as someone else suggested, find a minimal subset of

Re: c++ sigmentation fault happens only in linux

2005-01-23 Thread Micha Feigin
At Mon, 24 Jan 2005 02:45:52 +0200, Aviv Goll wrote: hi, I'm currently writing an assignment in c++ using g++. according to some printouts, during the following lines: stringstream Fstr; fstrblah blah; Just tried running just that and had no problem. Do notice that in the first line

Re: C locale problems

2004-10-25 Thread Tzafrir Cohen
On Mon, Oct 25, 2004 at 01:02:07AM -0400, William Sherwin wrote: Ever since I reconfigured my console to work with Hebrew (which it does, at least in vim, except that the kuf does not display: it displays as a blank space), What vim: vim in a terminal? (what terminal?)? gvim? If gvim: what

Re: C locale problems

2004-10-25 Thread William Sherwin
Tzafrir Cohen wrote: On Mon, Oct 25, 2004 at 01:02:07AM -0400, William Sherwin wrote: Ever since I reconfigured my console to work with Hebrew (which it does, at least in vim, except that the kuf does not display: it displays as a blank space), What vim: vim in a terminal? (what terminal?)?

Re: C locale problems

2004-10-25 Thread William Sherwin
Yury Chursa wrote: And this string [en_US.UTF-8] also present in output of [locale -a] ? If not you must use locale-def(part of libc utilities) for generating locale specific data. It is not present and, when I tried to add it, and add the keymap that I use, I got the following errors:

Re: C locale problems

2004-10-25 Thread Yury Chursa
William Sherwin wrote: Yury Chursa wrote: And this string [en_US.UTF-8] also present in output of [locale -a] ? If not you must use locale-def(part of libc utilities) for generating locale specific data. It is not present and, when I tried to add it, and add the keymap that I use, I got the

[OFFTOPIC] Abstraction layer design (was: Re: C#)

2003-06-26 Thread Omer Zak
On 26 Jun 2003, Gilboa Davara wrote: I do OS abstraction layers for a living (among others) so I know how an efficient underlaying should look like. STL is *far* from that. How should one design an OS abstraction layer, if one wants to have high-quality OS abstraction layer by whatever

Re: [OFFTOPIC] Abstraction layer design (was: Re: C#)

2003-06-26 Thread Oleg Goldshmidt
Gilboa Davara [EMAIL PROTECTED] writes: .. you are right... it is getting (way) off-topic fast. Here's a stupid question for you: Where's the Hacker-IL mailing list? http://www.iglu.org.il/mailing-lists/hackers-il.html Spared you going to http://www.google.com/search?q=hackers-il -- Oleg

Re: C#

2003-06-25 Thread Gilboa Davara
STL is one of the worst pieces of code I ever saw in my life. It's a good example to what happens if you decide to take OO design a couple of steps too far. Gilboa On Wed, 2003-06-25 at 23:43, Ilya Konstantinov wrote: On Tuesday 24 June 2003 21:26, Gilboa Davara wrote: Funny enough... I know

Re: C#

2003-06-25 Thread Gilboa Davara
.. But two wrongs don't make a right. STL sucks doesn't mean that sun's JRE (not the same I know) doesn't. Same goes for .net, MFC, and ATL. Gilboa On Thu, 2003-06-26 at 00:39, Gilboa Davara wrote: STL is one of the worst pieces of code I ever saw in my life. It's a good example to what

Re: C#

2003-06-25 Thread Muli Ben-Yehuda
On Thu, Jun 26, 2003 at 12:39:19AM +0300, Gilboa Davara wrote: STL is one of the worst pieces of code I ever saw in my life. It's a good example to what happens if you decide to take OO design a couple of steps too far. Your quote above is 100% content free. Could you please back the above

Re: C#

2003-06-25 Thread Muli Ben-Yehuda
On Thu, Jun 26, 2003 at 02:09:51AM +0300, Shachar Shemesh wrote: Muli Ben-Yehuda wrote: This message brought the you by the coalition against content free misinformed ramblings on linux-il. How do you have time to sleep, then? procmail. -- Muli Ben-Yehuda http://www.mulix.org

Re: C#

2003-06-25 Thread Gilboa Davara
On Thu, 2003-06-26 at 01:21, Muli Ben-Yehuda wrote: On Thu, Jun 26, 2003 at 12:39:19AM +0300, Gilboa Davara wrote: STL is one of the worst pieces of code I ever saw in my life. It's a good example to what happens if you decide to take OO design a couple of steps too far. Your quote above

Re: C#

2003-06-25 Thread Oleg Goldshmidt
On Thu, Jun 26, 2003 at 12:39:19AM +0300, Gilboa Davara wrote: STL is one of the worst pieces of code I ever saw in my life. It's a good example to what happens if you decide to take OO design a couple of steps too far. What experience have you got with STL? What has it got to do with OOP?

Re: C#

2003-06-25 Thread Gilboa Davara
Sadly enough my company has used (past tense) STL (No, I don't do C++, I don't touch it), and I was forced, times and times again to debug deep into the damn thing. (Helping other coworkers locate crashes within the library). It's over-designed, bloated, fairly slow, unreadable, impossible to

Re: C#

2003-06-25 Thread Muli Ben-Yehuda
On Thu, Jun 26, 2003 at 07:58:59AM +0300, Gilboa Davara wrote: On Thu, 2003-06-26 at 01:21, Muli Ben-Yehuda wrote: On Thu, Jun 26, 2003 at 12:39:19AM +0300, Gilboa Davara wrote: STL is one of the worst pieces of code I ever saw in my life. It's a good example to what happens if you decide

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Stanislav Malyshev
HM Last time that I heard, in Ben-Gurion university, the first programming HM language was Java. That's a swell idea in my opinion. Java is HM feature-complete, you can't argue with that. It also means that students I can. Too many times I have heard from Java guys working next door phrases like

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Herouth Maoz
Quoting Stanislav Malyshev [EMAIL PROTECTED]: I can. Too many times I have heard from Java guys working next door phrases like This feature works starting with Java 1.x and saw This feature is deprecated. Say hi to the guys next door... But really, I think you misinterpret this. Yes, there

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Alexander Maryanovsky
At 10:20 08.06.2003 +0300, Stanislav Malyshev wrote: HM Last time that I heard, in Ben-Gurion university, the first programming HM language was Java. That's a swell idea in my opinion. Java is HM feature-complete, you can't argue with that. It also means that students I can. Too many times I have

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Eran Tromer
On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. Eran

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Oleg Goldshmidt
Eran Tromer [EMAIL PROTECTED] writes: On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. Reportedly, more

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Alexander Maryanovsky
At 13:16 08.06.2003 +0200, Eran Tromer wrote: On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. True, yes...

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Eran Tromer
On 2003/06/08 12:56, Oleg Goldshmidt wrote: Reportedly, more important changes will be introduced in 1.5, including [snip] templates (dubbed generics) Hardly! In Java's new generics you declare what the template argument must extend/implement. In C++'s templates the template code just

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Beni Cherniavsky
Oh goodie, a holy war :-) [seen on usenet] Well, this is a long thread (and yes, I've read it all) and I feel like replying at almost every point so I'll reply in one piece ;). I've learnt mainly Pascal for my 5 points bagrut. Now that I think of it, the most characterizing thing about this is

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Stanislav Malyshev
AM and many other universities teach Scheme in their introduction AM to CS classes. Scheme has garbage collection, no pointer AM arithmetics, unboundedly Well, I personally never understood how anybody can use, let alone like, a language that has '(' and ')' as it's only syntax and I personally

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Stanislav Malyshev
AM The main change since JDK1.1 was the clean and fairly complete AM Collections framework in JDK 1.2, but that's of course not a AM language change (although it's much more important than scrictfp AM or assert). It definitely is. Standard Java library is a part of Java language package, as well

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Yedidyah Bar-David
On Sun, Jun 08, 2003 at 09:51:46PM +0300, Stanislav Malyshev wrote: AM and many other universities teach Scheme in their introduction AM to CS classes. Scheme has garbage collection, no pointer AM arithmetics, unboundedly Well, I personally never understood how anybody can use, let alone

Re: C flame (was: FS/OS in schools)

2003-06-08 Thread Daniel Vainsencher
The best Paul Graham article on this subject is http://www.paulgraham.com/paulgraham/icad.html Which should convince you that if someone is telling you that language A he knows and you don't is better than language B you both know, you should learn at least a little of A just in case he's right.

Re: C flame (was: FS/OS in schools)

2003-06-07 Thread Vadim Vygonets
Quoth Voguemaster on Sat, Jun 07, 2003: Well, I'm no expert in Perl but I know enough C++ to quickly dismiss your comments about it being bloated. Yes, it DOES have some overhead, but it is extremely negligible. In terms of performance, you only need to know what you're doing to get the same

Re: C flame (was: FS/OS in schools)

2003-06-07 Thread Nadav Har'El
On Fri, Jun 06, 2003, Herouth Maoz wrote about Re: C flame (was: FS/OS in schools): Quoting Nadav Har'El [EMAIL PROTECTED]: Let's face it, when you teach someone to drive its enough to teach them to use the pedals and the steering-wheel. But when you teach someone to become a mechanic

Re: C flame (was: FS/OS in schools)

2003-06-07 Thread Voguemaster
On Sat, 07 Jun 2003 17:49:39 +0300, Vadim Vygonets vadik-linux- [EMAIL PROTECTED] wrote: I wasn't talking about speed and overhead, I was talking about all the different features of C++. Vadik. How do you consider those features as bloating ??? Those features are great for good program design.

RE: C vs. Pascal vs. the World [was Re: Edu in linux]

2003-01-03 Thread Tzahi Fadida
://members.lycos.co.uk/my2nis/spamwarning.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Oleg Goldshmidt Sent: Friday, January 03, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: Re: C vs. Pascal vs. the World [was Re: Edu in linux] Shlomi Fish

Another Language War [was RE: C vs. Pascal vs. the World [was Re:Edu in linux]]

2003-01-03 Thread Shlomi Fish
/spamwarning.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Oleg Goldshmidt Sent: Friday, January 03, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: Re: C vs. Pascal vs. the World [was Re: Edu in linux] Shlomi Fish [EMAIL PROTECTED] writes

Re: C vs. Pascal vs. the World [was Re: Edu in linux]

2003-01-03 Thread Shlomi Fish
On 3 Jan 2003, Oleg Goldshmidt wrote: Shlomi Fish [EMAIL PROTECTED] writes: And C is the only language that is expected to bootstrap itself.[1] snipped to footnote [1] - There are a few exceptions. ghc is an Haskell compiler that is the only tool capable of compiling its own Haskell

Re: Another Language War [was RE: C vs. Pascal vs. the World [was Re: Edu in linux]]

2003-01-03 Thread Alexander Maryanovsky
, January 03, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: Re: C vs. Pascal vs. the World [was Re: Edu in linux] Shlomi Fish [EMAIL PROTECTED] writes: And C is the only language that is expected to bootstrap itself.[1] snipped to footnote [1] - There are a few exceptions. ghc

Debuggers [was Re: Another Language War [was RE: C vs. Pascal vs.the World [was Re: Edu in linux]]

2003-01-03 Thread Shlomi Fish
Hi Alexander! Next time please delete the rest of the message - it was quite long. On Fri, 3 Jan 2003, Alexander Maryanovsky wrote: I won't get into this war, but I'll respond to a small comment: And you do need a good Java debugger. Trust me. You could always use a good debugger,

Re: Debuggers [was Re: Another Language War [was RE: C vs. Pascal vs. the World [was Re: Edu in linux]]

2003-01-03 Thread Alexander Maryanovsky
Hi Alexander! Next time please delete the rest of the message - it was quite long. Ok. As much as a code can be well-thought and well-designed, there can always be typos and things you did not thought about. A misplaced operator, two consecutive if's instead of one nested in the other or

Re: Debuggers [was Re: Another Language War [was RE: C vs. Pascalvs. the World [was Re: Edu in linux]]

2003-01-03 Thread Shlomi Fish
On Fri, 3 Jan 2003, Alexander Maryanovsky wrote: Hi Alexander! Next time please delete the rest of the message - it was quite long. Ok. As much as a code can be well-thought and well-designed, there can always be typos and things you did not thought about. A misplaced operator, two

Re: C vs. Pascal vs. the World [was Re: Edu in linux]

2003-01-02 Thread Oleg Goldshmidt
Shlomi Fish [EMAIL PROTECTED] writes: And C is the only language that is expected to bootstrap itself.[1] snipped to footnote [1] - There are a few exceptions. ghc is an Haskell compiler that is the only tool capable of compiling its own Haskell code. The GNU Ada compiler is written in

Re: c/unix question

2002-04-07 Thread Nadav Har'El
On Sun, Apr 07, 2002, Erez Doron wrote about c/unix question: hi I am trying to open a tcp port to a server, did it and it works. now i blocked the server via firewall. trying to connect just hangs. how do i make 'connect' timeout ? What is usually done is to use non-blocking

Re: c/unix question

2002-04-07 Thread Muli Ben-Yehuda
On Sun, Apr 07, 2002 at 04:00:21PM +0300, Erez Doron wrote: hi I am trying to open a tcp port to a server, did it and it works. now i blocked the server via firewall. trying to connect just hangs. how do i make 'connect' timeout ? In this case, you make your firewall REJECT the

Re: C++: a constructor can not operate on a private static map object?

2002-04-04 Thread Oleg Goldshmidt
Gold Edward [EMAIL PROTECTED] writes: Regarding Oleg Goldshmidt message quoted bellow   Look, I really did not want to get bogged down in a flame war like the ones that (saddly) errupted here and there on this list. No one flamed anyone. I suggested staying away from Schildt's books, and

Re: c question

2002-04-04 Thread Sagi Bashari
From: Erez Doron [EMAIL PROTECTED] the problem is that printf does not sync it's buffers until a newline so no progress bar is displayed until the job ends. how do i solve this ? Try fflush(stdout); Sagi = To unsubscribe,

RE: c question

2002-04-04 Thread Omer Musaev
-Original Message- From: Sagi Bashari [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:39 PM To: Erez Doron; ilug Subject: Re: c question From: Erez Doron [EMAIL PROTECTED] the problem is that printf does not sync it's buffers until a newline so no progress

Re: c question

2002-04-04 Thread Erez Doron
thanks to all who replied i mistakfully tried fsync instead of fflush fflush solved my problem erez. On Thu, 2002-04-04 at 13:39, Sagi Bashari wrote: From: Erez Doron [EMAIL PROTECTED] the problem is that printf does not sync it's buffers until a newline so no progress bar is displayed

Re: c question

2002-04-04 Thread Nadav Har'El
On Thu, Apr 04, 2002, Omer Musaev wrote about RE: c question: Instead of using buffered output and flushing it on every char, you can use raw output. .. --- write(1, #, 1 ) ; /* man write(2) */ sleep( 1 ) ; This is getting

RE: c question

2002-04-04 Thread Iftach Hyams
It has nothing to do with C (except the fact that most of the O.S. I know has API is in C). It has to do with the implementation by the OS + runtime library of the printf and stderr. Anyhow, fputc is your friend. It doesn't solve your problem but is more likely to use when writing single non

Re: c question

2002-04-04 Thread Nadav Har'El
On Thu, Apr 04, 2002, Iftach Hyams wrote about RE: c question: It has nothing to do with C (except the fact that most of the O.S. I know has API is in C). It has to do with the implementation by the OS + runtime library of the printf and stderr. This is not true. The standard IO library

Re: c question

2002-04-04 Thread Oleg Goldshmidt
Nadav Har'El [EMAIL PROTECTED] writes: I'm not sure, however, whether stdout's default buffering (see my previous email) is mandated in the standard (Harbison Steele and Kernighan Ritchie are very vague on this issue). I doubt that buffering is specified in ANSI C. It is more likely to be

Re: c question

2002-04-04 Thread Shlomi Fish
On Thu, 4 Apr 2002, Nadav Har'El wrote: On Thu, Apr 04, 2002, Omer Musaev wrote about RE: c question: Instead of using buffered output and flushing it on every char, you can use raw output. .. --- write(1, #, 1 ) ; /* man write(2

Re: c question

2002-04-04 Thread Nadav Har'El
On Thu, Apr 04, 2002, Shlomi Fish wrote about Re: c question: When I worked in Smart-Link and asked a more experienced fellow programmer how I can, in the Win32 RTL, convert an open() filehandle to its Windows HFILE equivalent, he told me that mixing IO for two different kinds of handles

Re: c question

2002-04-04 Thread mulix
On Thu, Apr 04, 2002 at 06:00:36PM +0300, Shlomi Fish wrote: write(1, World!\n, 7); please use fileno(stdout). daemon writers everywhere will thank you. -- The ill-formed Orange Fails to satisfy the eye: http://vipe.technion.ac.il/~mulix/ Segmentation fault.

Re: c question

2002-04-04 Thread Nadav Har'El
On Thu, Apr 04, 2002, mulix wrote about Re: c question: On Thu, Apr 04, 2002 at 06:00:36PM +0300, Shlomi Fish wrote: write(1, World!\n, 7); please use fileno(stdout). daemon writers everywhere will thank you. You're right about the existance of the fileno() function, but I'm

Re: c question

2002-04-04 Thread mulix
On Thu, Apr 04, 2002 at 06:17:16PM +0300, Nadav Har'El wrote: On Thu, Apr 04, 2002, mulix wrote about Re: c question: On Thu, Apr 04, 2002 at 06:00:36PM +0300, Shlomi Fish wrote: write(1, World!\n, 7); please use fileno(stdout). daemon writers everywhere will thank you

Re: [C++] What is wrong with mapstring, string ?

2002-04-04 Thread Oleg Goldshmidt
Shaul Karl [EMAIL PROTECTED] writes: Attached a short program and a longer compilation output. If I understand it correctly then the type mapstring, string is not acceptable. But why? The compilation output mentions `reference to reference'. Can you elaborate on this or do

Re: c question

2002-04-04 Thread Nadav Har'El
On Thu, Apr 04, 2002, mulix wrote about Re: c question: On Thu, Apr 04, 2002 at 06:17:16PM +0300, Nadav Har'El wrote: stdout = fopen(/my/logging/file); stderr = fopen(/my/other/logging/file); Ok, I get your point. I don't remember seeing any program doing something like

Re: c question

2002-04-04 Thread mulix
On Thu, Apr 04, 2002 at 06:47:13PM +0300, Nadav Har'El wrote: On Thu, Apr 04, 2002, mulix wrote about Re: c question: On Thu, Apr 04, 2002 at 06:17:16PM +0300, Nadav Har'El wrote: stdout = fopen(/my/logging/file); stderr = fopen(/my/other/logging/file); Ok, I get your point. I

Re: c question

2002-04-04 Thread Shachar Shemesh
. Some people are too narrowminded. Shachar Nadav Har'El wrote: On Thu, Apr 04, 2002, mulix wrote about Re: c question: On Thu, Apr 04, 2002 at 06:17:16PM +0300, Nadav Har'El wrote: stdout = fopen(/my/logging/file); stderr = fopen(/my/other/logging/file); Ok, I get your

Re: c question

2002-04-04 Thread mulix
On Thu, Apr 04, 2002 at 06:03:40PM +0200, Shachar Shemesh wrote: Just wanted to quote an amuzing experience I had in the single haifux club meeting I attended. I made a comment about something only working on Linux, and having to use X in order to make it Unix compatible, and got bemused

RE: [C++] What is wrong with mapstring, string ?

2002-04-04 Thread Omer Musaev
-Original Message- From: Shaul Karl [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:57 PM To: [EMAIL PROTECTED] Subject: [C++] What is wrong with mapstring, string ? Attached a short program and a longer compilation output. If I understand it correctly then the

  1   2   >