473,889 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Boost process and C

Hi,

Is there any group in the manner of the C++ Boost group that works on
the evolution of the C language? Or is there any group that performs an
equivalent function?

Thanks,
-vs

Apr 29 '06
335 11982


we******@gmail. com wrote:
So if you think you know how to evolve C, *just do it*. Build a
following and your bright new addition will be an obvious candidate
for a future DR, or revision of the C Standard.
You know, debugging heaps have been around for ever (speaking of
*market*). strlcat, strlcpy, and strtok_r have been around for some
time (certainly from well before 1999), and have had plenty of pickup
in certain environments. The C standard didn't pick them up, why would
they pick up any other useful, successful extension? I don't buy your
claim, because its not consistent with observed reality.


TR18037 codifies embedded standalone practices of many different
compiler companies.
You might also like to observe the efforts of Bjarne Stroustrup . . .
These people have garnered a
significant market following that has gone completely unnoticed by the
Standards committee.


I guess that why Bjarne Stroustrup attends some of the standards meetings.

My point is the process may be long at times but it is a collection of
checks and balances that achieves broad input from a wide range of
sources. A single driven individual can start the process but cannot
force the outcome. It is more than the WG14 committee that needs
to be convinced of the merits of changes.

The TR's have become a kind of standards beta test and with broad
instead of limited use ideas can change.

Walter..
May 3 '06 #191
REH

Ben C wrote:
In C, builtin types are passed around by value and space for them
doesn't need to be allocated or freed.


Um, the same is true for C++.

REH

May 3 '06 #192
Keith Thompson wrote:
we******@gmail. com writes:
CBFalconer wrote:
we******@gmail. com wrote:
> CBFalconer wrote:
... snip ...
>> The last time I took an (admittedly cursory) look at Bstrlib, I
>> found it cursed with non-portabilities
>
> You perhaps would like to name one?

I took another 2 minute look, and was immediately struck by the use
of int for sizes, rather than size_t. This limits reliably
available string length to 32767.
Using size_t is also not any more *portable* than using int. Any lack
of portability is merely a reflection of the lack of the intrinsic
non-portability of the language itself. size_t can only reliably
contain values as high as 65535 -- so you are saying this difference in
limits (between 32k and 64k) embodies a significant universe of string
manipulation to warrant a claim against Bstrlib's portability?


Yes.

I can't speak for Chuck, but size_t can reliably contain the size of
any object that the system can create. That's what it's for. If the
maximum value of size_t is 65535, then the system isn't going to be
able to create objects bigger than 65535 bytes.

It's entirely possible to have a conforming implementation in which
int is 16 bits, but size_t is 32 bits. On such a system, using int to
represents sizes needlessly sacrifices the ability to handle objects
bigger than 32767 bytes. For that matter, it's conceivable (but
unlikely) that size_t could be smaller than int.


None of this speaks of the portability complaint CBF was claiming to
make. Its also an extremely marginal complaint that ignores the
tremendous benefit of this design choice, as I've already thoroughly
explained.
[...]
Hundreds of people have downloaded Bstrlib and seriously looked at it
already. I've gotten plenty of feedback over its lifetime which has
lead to its evolution (so its not like it hasn't already had
significant review). You, of all people, are not going find any
serious flaw in it by perusing it for 2 minutes.

"Cursed with non-portabilities" indeed ...
Do you have any figures on the number of people who have looked at it
briefly, rejected it because it's too complex, and not bothered to
mention it to you? [...]


How do you suppose I would obtain such figures? I instead count the
actual feedback, and from that feedback count the number of people who
complained of portability problems (none) hidden assumptions (none) and
interminable API (none -- well even less than none, since people keep
asking me to add things into it.)

I also roughly count the number of people who have included Bstrlib in
their project but for some reason don't tell me about this fact (just
using google). While some of them may be being irresponsible and just
using the library without looking at the source at all -- I highly
doubt that that represents the majority, or that I can find even a
significant percentage of all such people this way.

Its not like a language standard where the audience is obvious
(compiler vendors) and so if you wanted to know if the standard was
rejected, you could just count up the number of people who upgraded
their compiler, but didn't implement the standard, say.
[...] I'm not saying there are a lot of such people (obviously I don't have any such
figures myself),
You can look in the sourceforge project page; the number of downloads
is not a secret.

There have, in fact, been thousands of downloads, but clearly a
significant number of them are probably just people getting the latest
version -- so I'm just estimating. There are a lot of "first day of
release" downloads of my library, indicating I have repeat customers
(about a hundred within the first few days of any new release) who are
very interested in keeping up to date with the latest version. But at
the same time, there are many more conservative people with on going
projects who I can see from their sources are using old versions of the
library.
[...] but I don't think
you can exclude the possibility that it's a common thing.


That's true, but I have received enough feedback to suggest that this
library has survived quite a thorough amount of auditting. Some
bugs have been caught, and the design has been improved because of it.

For the average source file in any environment, you are lucky if you
can get *one* person to review it. Bstrlib has clearly far exceeded
that.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/

May 3 '06 #193
we******@gmail. com a écrit :
[snip]

None of this speaks of the portability complaint CBF was claiming to
make. Its also an extremely marginal complaint that ignores the
tremendous benefit of this design choice, as I've already thoroughly
explained.


Look, I have used size_t for my string library, and a "flags" field for
annotating info like "read only", etc. Your method looks much more
interesting since it avoids an extra field an saves 32 bits per string.

True, I would have an upper limit of 2GB for strings but I think that
will be enough... Anyway having a 2GB limit or a 4GB limit is not so
different. You will have to have a limit *anyway*

Besides, if all Chuck has to say about your library is that "it should
have been a size_t" well... it is not a big problem. You are lucky that
he is not complaining that it doesn't run in a 486 :-)

jacob
May 3 '06 #194
On 2006-05-03, REH <sp******@stny. rr.com> wrote:

Ben C wrote:
In C, builtin types are passed around by value and space for them
doesn't need to be allocated or freed.


Um, the same is true for C++.


Yes of course, I never intended to imply that it wasn't.

The point I was making was that operator overloading doesn't mix so
easily with things that might need to be allocated and freed manually--
i.e. objects of user-defined types. You start needing constructors and
destructors, which C++ (but not C) has.
May 3 '06 #195
On 2006-05-03, we******@gmail. com <we******@gmail .com> wrote:
CBFalconer wrote:
we******@gmail. com wrote:
> CBFalconer wrote: ... snip ...
>> The last time I took an (admittedly cursory) look at Bstrlib, I
>> found it cursed with non-portabilities
>
> You perhaps would like to name one?


I took another 2 minute look, and was immediately struck by the use
of int for sizes, rather than size_t. This limits reliably
available string length to 32767.
[snip]
[...] I did find an explanation and
justification for this. Conceded, such a size is probably adequate
for most usage, but the restriction is not present in standard C
strings.

Your going to need to conceed on more grounds than that. There is a
reason many UNIX systems tried to add a ssize_t type, and why TR 24731
has added rsize_t to their extension. (As a side note, I strongly
suspect the Microsoft, in fact, added this whole rsize_t thing to TR
24731 when they realized that Bstrlib, or things like it, actually has
far better real world safety because its use of ints for string
lengths.) Using a long would be incorrect since there are some systems
where a long value can exceed a size_t value (and thus lead to falsely
sized mallocs.) There is also the matter of trying to codify
read-only and constant strings and detecting errors efficiently
(negative lengths fit the bill.) Using ints is the best choice
because at worst its giving up things (super-long strings) that nobody
cares about,
I think it's fair to expect the possibility of super-long strings in a
general-purpose string library.
it allows in an efficient way for all desirable encoding scenarios,
and it avoids any wrap around anomolies causing under-allocations.
What anomalies? Are these a consequence of using signed long, or
size_t?
If I tried to use size_t I would give up a significant amount of
safety and design features (or else I would have to put more entries
into the header, making it less efficient).


If you only need a single "special" marker value (for which you were
perhaps using -1), you could consider using ~(size_t) 0.

Things will go wrong for at most one possible string length, but that's
more than can be said for using int.

But whatever the difference in efficiency, surely correctness and safety
first, efficiency second has to be the rule for a general-purpose
library?
May 3 '06 #196
REH

"Ben C" <sp******@spam. eggs> wrote in message
news:sl******** *************@b owser.marioworl d...
On 2006-05-03, REH <sp******@stny. rr.com> wrote:

Ben C wrote:
In C, builtin types are passed around by value and space for them
doesn't need to be allocated or freed.


Um, the same is true for C++.


Yes of course, I never intended to imply that it wasn't.

The point I was making was that operator overloading doesn't mix so
easily with things that might need to be allocated and freed manually--
i.e. objects of user-defined types. You start needing constructors and
destructors, which C++ (but not C) has.


Why? And why do you think objects of user-defined types have to be
"allocated and freed manually"?

struct foo {
int x, y;
};

foo operator+ (const foo& a, const foo& b)
// for it you are of the "I hate references" camp: foo operator+ (foo a,
foo b)
{
const foo z = {a.x + b.x, a.y + b.y};
return z;
}

foo x = {1, 2};
foo y = {3, 4};
foo z = x + y;

simplistic, but no constructors.

REH
May 4 '06 #197

"Richard Heathfield" <in*****@invali d.invalid> wrote in message
news:0O******** ************@bt .com...
jacob navia said:
I want to discuss about improving C strings for
instance, about a container library etc.
Nobody is stopping you. Why not get on with it? For example: what

containers do you think a standard C container library should make available? What
should the APIs look like? And how will you persuade people to use the new
library instead of whatever they are using right now?

I have asked these questions before. You seem reluctant to pursue them.

You can go on if you wish. I will go on posting here. Neither you nor
anyone else has any authority to tell me what I should do or not do.


That's right. You are free to throw your reputation down the tubes, and
nobody here can stop you, try as they might.


His reputation is far better than yours. Noone has ever heard of you. And
if they did once learn of you, they sure don't remember you... The same
can be said of Keith Thompson, Martin Ambuhl, Chuck Falconer, etc...
Everyone knows about LCC-Win32 and Jacob Navia.

Rod Pemberton
May 4 '06 #198
Rod Pemberton wrote:
"Richard Heathfield" <in*****@invali d.invalid> wrote in message
news:0O******** ************@bt .com...

That's right. You are free to throw your reputation down the tubes, and
nobody here can stop you, try as they might.

His reputation is far better than yours. Noone has ever heard of you. And
if they did once learn of you, they sure don't remember you... The same
can be said of Keith Thompson, Martin Ambuhl, Chuck Falconer, etc...
Everyone knows about LCC-Win32 and Jacob Navia.

That kind of assumes everyone uses windows....

--
Ian Collins.
May 4 '06 #199

"Ian Collins" <ia******@hotma il.com> wrote in message
news:4b******** *****@individua l.net...
Rod Pemberton wrote:
"Richard Heathfield" <in*****@invali d.invalid> wrote in message
news:0O******** ************@bt .com...

That's right. You are free to throw your reputation down the tubes, and
nobody here can stop you, try as they might.

His reputation is far better than yours. Noone has ever heard of you. And if they did once learn of you, they sure don't remember you... The same can be said of Keith Thompson, Martin Ambuhl, Chuck Falconer, etc...
Everyone knows about LCC-Win32 and Jacob Navia.

That kind of assumes everyone uses windows....


Untrue, I learned of it when programming on Stratus Continuum's in PL/1...
In fact, I doubt anyone knows the original authors names to LCC either...
Rod Pemberton
May 4 '06 #200

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

Similar topics

65
5415
by: perseus | last post by:
I think that everyone who told me that my question is irrelevant, in particular Mr. David White, is being absolutely ridiculous. Obviously, most of you up here behave like the owners of the C++ language. A C++ interface installation IS ABOUT THE C++ LANGUAGE! The language does not possess the ability to handle even simple file directory manipulation. Those wise people that created it did not take care of it. So, BOOST is a portable...
205
10775
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
17
1908
by: Howard Gardner | last post by:
/* If I am using boost, then how should I write this program? As it sits, this program is using SFINAE to determine whether or not a type supports particular syntax. I suspect that there is functionality in boost to do this. I have found mpl::has_xxx, which I suspect of being part of the solution. I've also found type_traits::has_nothrow_constructor
2
6637
by: smith4894 | last post by:
{ not sure you're aware of that but there are the newsgroups for all major operating systems. you might want to try asking in the forum 'comp.os.linux.development.apps', since memory-mapped files are not a language-supported structure, they are platform-specific. -mod } I'm trying to use boost serialization to serialize/deserialize data to and from a mmap'd file. I have my own ostream/istream classes that essentially read/write bytes...
5
2400
by: linyanhung | last post by:
I used a boost multi thread in VS 2005 on a Duo Core PC, and made a two thread process. The code is something like this: #include <boost/thread/thread.hpp> void fun1() { //do something
8
6220
by: Matt England | last post by:
My team currently using Boost Threads, but we are considering switching to ZThreads. (We seek cross-platform, C++ multithreading capabilities in an external library.) ZThread(s): http://zthread.sourceforge.net/ http://www.inf.uni-konstanz.de/dbis/members/vinnik/zsim/doc/ Can anyone share their ZThreads experience, either good, bad, or
2
2417
by: ironpingwin | last post by:
Hi! I'd like to make few threads which will run in the same time in C++. I try to use boost library v 1.34.1 (it can't be newest, because I compile on remote machine, which is not administrated by me). In this version there isn't detach() function. How to run functions from two different class in the same time?
13
4543
by: brad | last post by:
Still learning C++. I'm writing some regex using boost. It works great. Only thing is... this code seems slow to me compared to equivelent Perl and Python. I'm sure I'm doing something incorrect. Any tips? #include <boost/regex.hpp> #include <iostream> // g++ numbers.cpp -o numbers -I/usr/local/include/boost-1_35 /usr/local/lib/libboost_regex-gcc41-mt-s.a // g++ numbers.cpp -o numbers.exe
5
3596
by: ameyav | last post by:
Hi All, I am converting some C code into C++ code. The objective is to improve throughput. I have some code written in C which serially parses through a list of files, opens each one of them, processes the data and closes the file. All the files are processed one by one. The obvious performance bottleneck that i could think of is the wasted cpu cycles for file i/o. *My solution* was to spawn multiple threads to do the file i/o. For...
0
9969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10794
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10896
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10443
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7999
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7151
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6029
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4650
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.