Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Cross-platform: Coloured text, Networking, Multithreading

Reply
Thread Tools

Cross-platform: Coloured text, Networking, Multithreading

 
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      11-12-2008

I'm currently writing a program and I've got in mind to keep it as
portable as possible. In particular I want it to run on Linux and
Windows, but I'm also keeping an open mind to any machine that has a
screen and is capable of Ethernet networking. The program requires
three things that aren't available in the C Standard:
1) Coloured text (for a console application)
2) Raw socket networking
3) Multithreading

For number 1, I've already written my own tiny little cross-platform
library (it uses ANSI escape sequences for Linux, and Win32 API
functions for Windows).

For number 2, I've again written my own tiny little cross-platform
library (it uses Berkeley Sockets for Linux, and winpcap for Windows
-- I would have used Winsock for Windows but Winsock no longer
supports raw sockets).

For number 3, well I'm just about to delve into it now. I see that
somebody has already ported the "pthreads" library to Win32, so that
looks like a very attractive option. Just before I go down that road
though, I'd like to ask if anyone has a better idea than to use
pthreads?
 
Reply With Quote
 
 
 
 
vippstar@gmail.com
Guest
Posts: n/a
 
      11-12-2008
On Nov 12, 6:00 pm, Tomás Ó hÉilidhe <(E-Mail Removed)> wrote:
> I'm currently writing a program and I've got in mind to keep it as
> portable as possible. In particular I want it to run on Linux and
> Windows, but I'm also keeping an open mind to any machine that has a
> screen and is capable of Ethernet networking. The program requires
> three things that aren't available in the C Standard:
> 1) Coloured text (for a console application)
> 2) Raw socket networking
> 3) Multithreading
>
> For number 1, I've already written my own tiny little cross-platform
> library (it uses ANSI escape sequences for Linux, and Win32 API
> functions for Windows).


How cute. Why do we need to know all this?

> For number 2, I've again written my own tiny little cross-platform
> library (it uses Berkeley Sockets for Linux, and winpcap for Windows
> -- I would have used Winsock for Windows but Winsock no longer
> supports raw sockets).


How cute. Why do we need to know all this?

> For number 3, well I'm just about to delve into it now. I see that
> somebody has already ported the "pthreads" library to Win32, so that
> looks like a very attractive option. Just before I go down that road
> though, I'd like to ask if anyone has a better idea than to use
> pthreads?


So you're asking about threading, concurrency, and thread libraries in
comp.lang.c. You're going to have to try harder if you expect to troll
someone. (hint: try an unrelated rant about gypsies in your post)
 
Reply With Quote
 
 
 
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      11-12-2008
On Nov 12, 11:27*pm, Eric Sosman <(E-Mail Removed)> wrote:

> Perhaps you could ask in comp.programming.threads, where the
> threading experts hang out?



Your sarcasm is a little addictive but I'll try to resist. I asked the
question on comp.lang.c because I'm writing a program in C.

I could imagine, if I asked the question over on c.p.t, that they'd
direct me here.
 
Reply With Quote
 
Tomás Ó hÉilidhe
Guest
Posts: n/a
 
      11-12-2008
On Nov 12, 11:39*pm, (E-Mail Removed) wrote:

> How cute. Why do we need to know all this?



Because your head is vacuous and I wanted to offer you a filler.


> So you're asking about threading, concurrency, and thread libraries in
> comp.lang.c.



Which thread have you been reading? Nope, never mentioned anything
about concurrency; that was your own mental masturbation taking over
to throw in a buzz word to show the big kids that you actually have a
clue what you're talking about.

I'm writing a program in C and I'm asking for advice on what threading
library to use in C. If you don't have the answer, please don't do a
dance to distract is from your lack of knowledge.
 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      11-12-2008
In article <1226507251.342302@news1nwk>,
Eric Sosman <(E-Mail Removed)> wrote:
....
> No, never mind, that's too obvious, where's the adventure in
>getting useful answers from experts when you could instead get a
>boatload of nonsense from non-experts? Much more entertaining to
>do it your way, I suppose.


Thank you for confirming everything I (and other truth tellers, er, I
mean, trolls) have been saying about CLC for years.

(That this newsgroup is populated by a bunch of nattering fools.)


 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      11-12-2008
In article <(E-Mail Removed)>,
Tomás Ó hÉilidhe <(E-Mail Removed)> wrote:
....
>> How cute. Why do we need to know all this?


Typical clc jabber. Note that vippy is our latest reg wannabee, so he
tries extra hard.

>Because your head is vacuous and I wanted to offer you a filler.


Yup - you got his number.

>> So you're asking about threading, concurrency, and thread libraries in
>> comp.lang.c.

>
>
>Which thread have you been reading? Nope, never mentioned anything
>about concurrency; that was your own mental masturbation taking over
>to throw in a buzz word to show the big kids that you actually have a
>clue what you're talking about.
>
>I'm writing a program in C and I'm asking for advice on what threading
>library to use in C. If you don't have the answer, please don't do a
>dance to distract is from your lack of knowledge.


You will soon learn that this newsgroup is about everything except C.

 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      11-12-2008
In article <491b1a7f$0$40306$(E-Mail Removed)>,
Lorenzo Villari <(E-Mail Removed)> wrote:
>
>"Kenny McCormack" <(E-Mail Removed)> ha scritto nel messaggio
>news:gff3bu$cv$(E-Mail Removed)...
>>
>> You will soon learn that this newsgroup is about everything except C.
>>

>
>So split it. comp.lang.c and comp.lang.iso-c


Exactly.

As I've pointed out many times in the past, the (real, core) problem is
simply that this group is misnamed. If it were named something like
comp.lang.obscurely_academic.iso-only.andNothingElse, then the
discussions occurring here would be entirely correct and justified.

Or, to put it another way, the people who should have gone out and
created (new-grouped) c.l.o.i.a decided instead to invade and take over
this group. And things haven't been the same since.

 
Reply With Quote
 
Antoninus Twink
Guest
Posts: n/a
 
      11-12-2008
On 12 Nov 2008 at 16:27, Eric Sosman wrote:
> Tomás Ó hÉilidhe wrote:
>> I see that somebody has already ported the "pthreads" library to
>> Win32, so that looks like a very attractive option. Just before I go
>> down that road though, I'd like to ask if anyone has a better idea
>> than to use pthreads?

>
> Perhaps you could ask in comp.programming.threads, where the
> threading experts hang out?


Oh come on, Eric - it hardly takes a world expert on threading to be
able to say that pthreads is an excellent choice, and if it's available
on all the target platforms then go for it.

 
Reply With Quote
 
Martin Ambuhl
Guest
Posts: n/a
 
      11-12-2008
Tomás Ó hÉilidhe wrote:
> On Nov 12, 11:27 pm, Eric Sosman <(E-Mail Removed)> wrote:
>
>> Perhaps you could ask in comp.programming.threads, where the
>> threading experts hang out?

>
>
> Your sarcasm is a little addictive but I'll try to resist. I asked the
> question on comp.lang.c because I'm writing a program in C.


There is _no_ sarcasm in the suggestion that when using features that
are not standard C but which have supporting newsgroups that you not ask
in a newsgroup for C (where those features are not topical) but in a
newsgroup specifically for those features (where those features are
obviously topical).

When you write programs using threads, something not supported by C but
by specific implementations on specific platforms, you are outside the
realm of writing programs in C.

> I could imagine, if I asked the question over on c.p.t, that they'd
> direct me here.


Then they have no idea of what either C or threads are. I can't believe
that the folks in cpt are that clueless. But if your post is any
indication, ...


 
Reply With Quote
 
Martin Ambuhl
Guest
Posts: n/a
 
      11-12-2008
Tomás Ó hÉilidhe wrote:
> On Nov 12, 11:39 pm, (E-Mail Removed) wrote:


>> How cute. Why do we need to know all this?


> Because your head is vacuous and I wanted to offer you a filler.


I suppose you think that is clever. It only marks you as at least one
of an idiot or a boor. You haven't yet made it to my killfile, but keep
it up and you will. I suspect that several people who could have been
useful to you when you have a legitimate C question will have already
sent you to their bozo bins.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I print out in the standard output coloured lines cniharral@gmail.com Python 9 02-02-2007 02:35 PM
Blue coloured text beneath folders. g saul Computer Support 10 10-02-2005 02:26 PM
Differently Coloured Text in one textual area arun.hallan@gmail.com Java 2 02-11-2005 10:33 AM
How to do a coloured line Thibault HTML 9 10-11-2004 10:08 AM
Coloured Buttons Venkat HTML 3 07-01-2003 08:24 AM



Advertisments