Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Regal eagle / American cloud

360 views
Skip to first unread message

woodb...@gmail.com

unread,
Oct 30, 2019, 12:58:27 PM10/30/19
to
Shalom

Can you give me some suggestions on how to improve my
repo: https://github.com/Ebenezer-group/onwards
?

What do you think of recent changes to this file?
https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc

and a version from the end of September:
https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc

The number of lines hasn't changed much, but the size of the
event loop, the most complicated part of the program, has been
reduced by switching from TCP to SCTP. Thanks in advance.


Brian
Ebenezer Enterprise - America isn't great because America is powerful.
America is powerful because America is great. Ben Shapiro at dailywire.com

Mr Flibble

unread,
Oct 30, 2019, 2:16:49 PM10/30/19
to
On 30/10/2019 16:58, woodb...@gmail.com wrote:
> Shalom
>
> Can you give me some suggestions on how to improve my
> repo: https://github.com/Ebenezer-group/onwards
> ?
>
> What do you think of recent changes to this file?
> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc

I think your code is fucking shite. I think this not because you are a
misogynist homophobic bigot but because your code is shite. Your code
makes you look like a C programmer who has failed to grasp how to use C++
effectively (or even getting the basics down properly).

>
> and a version from the end of September:
> https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc
>
> The number of lines hasn't changed much, but the size of the
> event loop, the most complicated part of the program, has been
> reduced by switching from TCP to SCTP. Thanks in advance.
>
>
> Brian
> Ebenezer Enterprise - America isn't great because America is powerful.
> America is powerful because America is great. Ben Shapiro at dailywire.com
>

We don't want your spam here, dear.

/Flibble

--
"Snakes didn't evolve, instead talking snakes with legs changed into
snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” –
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are
confronted by God," Bryne asked on his show The Meaning of Life. "What
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a
world that is so full of injustice and pain. That's what I would say."

Mr Flibble

unread,
Oct 30, 2019, 2:28:08 PM10/30/19
to
On 30/10/2019 18:16, Mr Flibble wrote:
> On 30/10/2019 16:58, woodb...@gmail.com wrote:
>>
>> Brian
>> Ebenezer Enterprise - America isn't great because America is powerful.
>> America is powerful because America is great.  Ben Shapiro at dailywire.com
>>
>
> We don't want your spam here, dear.
>

*hateful spam

Mr Flibble

unread,
Oct 30, 2019, 6:13:42 PM10/30/19
to
On 30/10/2019 18:16, Mr Flibble wrote:
> On 30/10/2019 16:58, woodb...@gmail.com wrote:
>>                                                    Shalom
>>
>> Can you give me some suggestions on how to improve my
>> repo: https://github.com/Ebenezer-group/onwards
>> ?
>>
>> What do you think of recent changes to this file?
>> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc
>
> I think your code is fucking shite.  I think this not because you are a
> misogynist homophobic bigot but because your code is shite.  Your code
> makes you look like a C programmer who has failed to grasp how to use C++
> effectively (or even getting the basics down properly).

I mean who else writes code like this:

if('.'==name[0]||name[0]=='/')receive(buf,::strrchr(name,'/')+1,1);

Is the space bar on your keyboard broken? Are you deliberately trying to
make your code hard to read? You seem to bang on about how small you can
make files so is this the reason? Demented.

woodb...@gmail.com

unread,
Oct 31, 2019, 1:36:36 AM10/31/19
to
On Wednesday, October 30, 2019 at 5:13:42 PM UTC-5, Mr Flibble wrote:
>
> I mean who else writes code like this:
>

I take some inspiration from Boost author Joaquín M López Muñoz.
I go further though than he does, probably.

> if('.'==name[0]||name[0]=='/')receive(buf,::strrchr(name,'/')+1,1);
>
> Is the space bar on your keyboard broken? Are you deliberately trying to
> make your code hard to read?
It takes some getting used to, but I like it that way.


> You seem to bang on about how small you can
> make files so is this the reason? Demented.
>

The less code that has to be generated, the less that
has to be compressed and sent over a network, decompressed
and compiled. I decided after a while to adopt the same
format for the code I've written by hand. It's a terse,
poetic format.


Ian Collins

unread,
Oct 31, 2019, 3:36:06 AM10/31/19
to
On 31/10/2019 18:36, woodb...@gmail.com wrote:
>
> The less code that has to be generated, the less that
> has to be compressed and sent over a network, decompressed
> and compiled. I decided after a while to adopt the same
> format for the code I've written by hand. It's a terse,
> poetic format.

So you don't like spaces, but you make up for them with superfluous colons?

--
Ian.

woodb...@gmail.com

unread,
Oct 31, 2019, 1:28:32 PM10/31/19
to
We've discussed that a number of times. I think we'll have to
agree to disagree.


Brian

Bonita Montero

unread,
Nov 1, 2019, 3:25:05 AM11/1/19
to
> Can you give me some suggestions on how to improve my
> repo: https://github.com/Ebenezer-group/onwards ?

Yes: delete it and stop posting here.

Real Troll

unread,
Nov 1, 2019, 5:17:24 PM11/1/19
to
This is very much below the belt kung-fu kick!!! Even Bruce Lee never
did this.

why is everybody attacking a guy who is working on his C++ libraries
while religious nutters and Ramine posting his crap about Delphi and
Pascal!!

IMO anything goes on these newsgroups because there is no serious
discussion here any more.

Mind boggles!!.

Ian Collins

unread,
Nov 1, 2019, 7:43:48 PM11/1/19
to
On 02/11/2019 10:20, Real Troll wrote:
>
> why is everybody attacking a guy who is working on his C++ libraries
> while religious nutters and Ramine posting his crap about Delphi and
> Pascal!!

Because he is a well proven religious bigot.

--
Ian.

Daniel

unread,
Nov 1, 2019, 8:47:23 PM11/1/19
to
On Friday, November 1, 2019 at 7:43:48 PM UTC-4, Ian Collins wrote:
> On 02/11/2019 10:20, Real Troll wrote:
> >
> > why is everybody attacking a guy who is working on his C++ libraries

Agreed. For what reason is it necessary to be so uncivil?

>
> Because he is a well proven religious bigot.
>

What is the point of making statements like this?

Daniel

woodb...@gmail.com

unread,
Nov 1, 2019, 10:08:04 PM11/1/19
to
If you believe that G-d is G-d, some will try to label
you this way. Maybe some will realize the envious
environment I've been dealing with here. I feel a little
like Joseph with his regal robe. The brothers treated
their father and Joseph like !*%^, but G-d protected
Joseph and brought his dreams to pass.


Brian

Bonita Montero

unread,
Nov 2, 2019, 5:21:53 AM11/2/19
to
> why is everybody attacking a guy who is working on his C++ libraries
> while religious nutters and Ramine posting his crap about Delphi and
> Pascal!!

The rule is not if the postings are on/off-topic or wether they're of
any interest for anyone here. And woodbrain's rudiementary code are not
of any use for anyone here.

Mr Flibble

unread,
Nov 2, 2019, 12:33:43 PM11/2/19
to
You have been labelled a religious bigot because you *are* a religious
bigot. You are a homophobic, sexist misogynist which makes you a bigot and
your bigotry is informed by your fucktarded beliefs in your fucktarded
religion which makes you a religious bigot. Pretty simple math, huh, Bob?

woodb...@gmail.com

unread,
Nov 2, 2019, 1:26:21 PM11/2/19
to
Over the years the functionality of the repo has increased
while the size of the repo has decreased. I don't recall
if you have ever provided an idea that I've found useful,
but a lot of people in the newsgroup have. On behalf of
those people and myself, I press on.

I encourage people to develop some closed source code also.


Brian
https://github.com/Ebenezer-group/onwards

Melzzzzz

unread,
Nov 2, 2019, 1:43:33 PM11/2/19
to
On 2019-11-02, woodb...@gmail.com <woodb...@gmail.com> wrote:
>
> I encourage people to develop some closed source code also.

Every code is closed, until open :P
>
>
> Brian
> https://github.com/Ebenezer-group/onwards


--
press any key to continue or any other to quit...
U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec
Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec
Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi
bili naoruzani. -- Mladen Gogala

woodb...@gmail.com

unread,
Nov 2, 2019, 1:46:58 PM11/2/19
to
On Saturday, November 2, 2019 at 11:33:43 AM UTC-5, Mr Flibble wrote:

"In G-d we trust" has been on American money for centuries.
Before our national motto was "In G-d we trust" it was "mind
your own business". Sorry, but SaaS is important.

Bonita Montero

unread,
Nov 2, 2019, 1:53:00 PM11/2/19
to
>> Yes: delete it and stop posting here.

> Over the years the functionality of the repo has increased
> while the size of the repo has decreased. I don't recall
> if you have ever provided an idea that I've found useful,
> but a lot of people in the newsgroup have. On behalf of
> those people and myself, I press on.

Do you have noticed anyone interested in yor work here?
I didn't.

woodb...@gmail.com

unread,
Nov 2, 2019, 2:12:07 PM11/2/19
to
There have been scores of people that have replied to my
posts where I've found the replies helpful. I don't know
how interested they were in my work, but in my opinion
their replies were useful.

Also my replies to people are not always because I'm
interested in their work.


Brian
Ebenezer Enterprises - "Brothers, I do not consider myself
yet to have laid hold of it. But one thing I do: Forgetting
what is behind and straining toward what is ahead, I press on
toward the goal to win the prize of G-d’s heavenly calling in
Messiah Yeshua (aka Jesus)." Philippians 3:13,14

David Brown

unread,
Nov 2, 2019, 3:16:59 PM11/2/19
to
On 02/11/2019 19:11, woodb...@gmail.com wrote:
> On Saturday, November 2, 2019 at 12:53:00 PM UTC-5, Bonita Montero wrote:
>>>> Yes: delete it and stop posting here.
>>
>>> Over the years the functionality of the repo has increased
>>> while the size of the repo has decreased. I don't recall
>>> if you have ever provided an idea that I've found useful,
>>> but a lot of people in the newsgroup have. On behalf of
>>> those people and myself, I press on.
>>
>> Do you have noticed anyone interested in yor work here?
>> I didn't.
>
> There have been scores of people that have replied to my
> posts where I've found the replies helpful. I don't know
> how interested they were in my work, but in my opinion
> their replies were useful.

I have never seen anyone express any interest in your work - but I've
seen a lot of people suggest you are barking up the wrong tree with the
whole idea. However, that is entirely up to you - if you believe in
your software and business idea, go for it. But that does /not/ mean we
want your spam here.

When you ask concrete C++ questions, or discuss concrete C++ issues,
then of course people will discuss it. And maybe some of these posts
will help you - maybe they will help others.

That does not mean anyone cares about your software at all.

This is the /norm/. No one here cares about the software /I/ write.
Few people care about any software than anyone else here writes. I
don't care about Mr. Flibble's graphics library (though it is one of the
few projects here where others might be interested in the software
itself, rather than just the C++ discussions). I still wish him luck
with it, and hope he achieves his goals - but if he ever asks a question
and I give him a helpful answer, it's because I am interested in talking
about C++, not because I want to help out his project.

Does that make sense to you?


So if you want to ask specific, concrete C++ questions, you'll get
replies - probably helpful ones. If you ask for people to work on your
project for you, you'll get nothing positive back. If you post spam,
you'll get mostly insults in reply. If you post religious waffle,
you'll get mockery. If you post bigotry and prejudice, you'll get
condemnation. If you post absurd egoism and narcissism (like your
claims of being the next Noah or Joseph, or God's appointed C++
guardian), you will be treated with a mixture of laughter, and pity for
your madness.

No one cares what you want to believe in - pink unicorns, ancient gods,
or whatever. We don't want to know - its a personal matter for you
alone. We /do/ care if you use those beliefs to justify hatred,
prejudice, or if you try to spread them where nobody wants to hear them.

Stick to specific C++ questions or comments, and if someone makes a
reply you don't like, ignore it. And please stop digging yourself
deeper into your hole.

>
> Also my replies to people are not always because I'm
> interested in their work.
>

Of course.

Chris M. Thomasson

unread,
Nov 2, 2019, 4:19:06 PM11/2/19
to
Please, can you give a proper attribution? Almost begging. :^)

Melzzzzz

unread,
Nov 2, 2019, 4:37:40 PM11/2/19
to
She is rude person...

Real Troll

unread,
Nov 2, 2019, 5:01:41 PM11/2/19
to
On 02/11/2019 19:16, David Brown wrote:
>
> I have never seen anyone express any interest in your work -
>

Frankly this is completely ridiculous. In C newsgroup, people are
discussing about c compilers that most people aren't interested in yet
that is allowed without any complaints. There are 100s of C compilers
and there is no point in creating yet another one but it is their
prerogative to waste their own time and discuss it here on these newsgroup.

The OP should just continue posting his links (and show two fingers to
whoever complaints about them) and if people don't like it then they can
either stop visiting these newsgroups or simply kill-file someone whose
postings they dislike or hate!! My posts are kill-filed by almost
everybody on this planet but who fuck cares about them.

I for one is not going to to anything like this and keep plodding and
supporting whoever wants to post anything here including politics, sex,
porn or whatever. These newsgroups have never discussed anything useful
for the past 10 years.

Now everybody go and fuck yourself. Real Troll has spoken.



Mr Flibble

unread,
Nov 2, 2019, 5:23:14 PM11/2/19
to
That's nice, dear.

woodb...@gmail.com

unread,
Nov 2, 2019, 8:14:29 PM11/2/19
to
On Saturday, November 2, 2019 at 2:16:59 PM UTC-5, David Brown wrote:


I find most of your replies to be spam.


Brian
Ebenezer Enterprises

woodb...@gmail.com

unread,
Nov 2, 2019, 8:49:30 PM11/2/19
to
On Saturday, November 2, 2019 at 4:01:41 PM UTC-5, Real Troll wrote:
>
> These newsgroups have never discussed anything useful
> for the past 10 years.
>

This group has been helpful to me for years now. Some may
not like the way things are going, e.g. SaaS, but that's not
my fault. Honk if you love SaaS.


Brian

Mr Flibble

unread,
Nov 2, 2019, 9:15:15 PM11/2/19
to
On 03/11/2019 00:14, woodb...@gmail.com wrote:
> On Saturday, November 2, 2019 at 2:16:59 PM UTC-5, David Brown wrote:
>
>
> I find most of your replies to be spam.

Oh the irony. Do as I say, not as I do eh Brian? Cockwomble.

woodb...@gmail.com

unread,
Nov 2, 2019, 10:01:28 PM11/2/19
to
On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>
> Oh the irony. Do as I say, not as I do eh Brian?
>

Sorry, but as Ben Shapiro says, "capitalism always wins."
In order for communism to not die even more quickly than
it otherwise would, you trolls actually need a quality
basis for your pogroms. Let's see, what quality
products/companies have come from communism? Oh, none?


Brian
Ebenezer Enterprises - "They stab it with their steely knives,
but they just can't kill the beast."
https://github.com/Ebenezer-group/onwards

"it" in this context is capitalism, free markets, free speech...

Mr Flibble

unread,
Nov 2, 2019, 11:51:40 PM11/2/19
to
On 03/11/2019 02:01, woodb...@gmail.com wrote:
> On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>>
>> Oh the irony. Do as I say, not as I do eh Brian?
>>
>
> Sorry, but as Ben Shapiro says, "capitalism always wins."
> In order for communism to not die even more quickly than
> it otherwise would, you trolls actually need a quality
> basis for your pogroms. Let's see, what quality
> products/companies have come from communism? Oh, none?

Who mentioned communism? Pathetic attempt at misdirection, Brian.

This "Ben Shapiro" guy is just as much of a religious bigot as you are,
Brian, but of course you know this already which is why you keep spamming
him here. Cockwomble.

Bonita Montero

unread,
Nov 3, 2019, 12:20:39 AM11/3/19
to
> I find most of your replies to be spam.

LOL!

David Brown

unread,
Nov 3, 2019, 5:12:46 AM11/3/19
to
On 03/11/2019 01:14, woodb...@gmail.com wrote:
> On Saturday, November 2, 2019 at 2:16:59 PM UTC-5, David Brown wrote:
>
>
> I find most of your replies to be spam.
>

You are free not to like my replies or posts. You can call them
insulting, argumentative, pointless, off-topic, rambling - there are
plenty of reasonable complaints you could make. But one thing they are
not, is spam. I have never once posted unwanted adverts for my services
or software.


David Brown

unread,
Nov 3, 2019, 5:35:56 AM11/3/19
to
On 03/11/2019 03:01, woodb...@gmail.com wrote:
> On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>>
>> Oh the irony. Do as I say, not as I do eh Brian?
>>
>
> Sorry, but as Ben Shapiro says, "capitalism always wins."

For those that don't know who Shapiro is, but (for some reason) want to
know, here is an introduction.

<https://rationalwiki.org/wiki/Ben_Shapiro>

I love the description of him as a "professional idiot".

Now, people can have whatever view they like on politics - this is not a
political group. And it is not an American group, and most certainly
not an American political group.

People don't get to have the same breadth of views on bigotry and
prejudice. But while I will condemn prejudice whenever I see it, it is
also off-topic for the group.

What is more relevant is does this Shapiro guy have the slightest
relevance to C++? Is anything he says remotely connected to the
language, or its use? The answer, of course, is no. Anything Shapiro
says is of no more interest here than the wisdom of Kermit the Frog.

> In order for communism to not die even more quickly than
> it otherwise would, you trolls actually need a quality
> basis for your pogroms. Let's see, what quality
> products/companies have come from communism? Oh, none?

Again, politics has nothing to do with anything under discussion.

woodb...@gmail.com

unread,
Nov 3, 2019, 11:05:04 PM11/3/19
to
On Sunday, November 3, 2019 at 4:35:56 AM UTC-6, David Brown wrote:
> On 03/11/2019 03:01, woodb...@gmail.com wrote:
> > On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
> >>
> >> Oh the irony. Do as I say, not as I do eh Brian?
> >>
> >
> > Sorry, but as Ben Shapiro says, "capitalism always wins."
>
> For those that don't know who Shapiro is, but (for some reason) want to
> know, here is an introduction.
>
> <https://rationalwiki.org/wiki/Ben_Shapiro>
>

He is from Los Angeles, California. He went to Harvard
Law School and practiced law for a short time, but then
became a journalist. He's a very knowledgeable and down-
to-earth person. He's an Orthodox Jew. He's married
and has three children - one of them hasn't been born yet.
His podcasts are super.

I have this in a server:

#ifdef __linux__
#include<linux/sctp.h>
#else
#include<netinet/sctp.h>
#endif

FreeBSD uses the else branch. I'm not sure what other platforms do.
Any ideas on how to improve this? My server is in pretty good shape
so this is a drag.


Brian
https://github.com/Ebenezer-group/onwards

Christian Gollwitzer

unread,
Nov 4, 2019, 2:07:49 AM11/4/19
to
Am 04.11.19 um 05:04 schrieb woodb...@gmail.com:
> On Sunday, November 3, 2019 at 4:35:56 AM UTC-6, David Brown wrote:
>> On 03/11/2019 03:01, woodb...@gmail.com wrote:
>>> On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>>>>
>>>> Oh the irony. Do as I say, not as I do eh Brian?
>>>>
>>>
>>> Sorry, but as Ben Shapiro says, "capitalism always wins."
>>
>> For those that don't know who Shapiro is, but (for some reason) want to
>> know, here is an introduction.
>>
>> <https://rationalwiki.org/wiki/Ben_Shapiro>
>>
>
> He is from Los Angeles, California. He went to Harvard
> Law School and practiced law for a short time, but then
> became a journalist. He's a very knowledgeable and down-
> to-earth person. He's an Orthodox Jew. He's married
> and has three children - one of them hasn't been born yet.
> His podcasts are super.

That was an interesting read. Especially the first hits on Google where
a Britisch conservative from the BBC interviews him with tough questions:
https://www.youtube.com/watch?v=6VixqvOcK8E

Funny when he said "You try to make quick buck at BBC off the fact that
I'm popular and noone has ever heard of you!"

> I have this in a server:
>
> #ifdef __linux__
> #include<linux/sctp.h>
> #else
> #include<netinet/sctp.h>
> #endif
>
> FreeBSD uses the else branch. I'm not sure what other platforms do.
> Any ideas on how to improve this? My server is in pretty good shape
> so this is a drag.

Use autoconf.
AC_CHECK_HEADERS(linux/sctp.h netinet/sctp.h)


Christian

David Brown

unread,
Nov 4, 2019, 3:08:22 AM11/4/19
to
On 04/11/2019 05:04, woodb...@gmail.com wrote:
> On Sunday, November 3, 2019 at 4:35:56 AM UTC-6, David Brown wrote:
>> On 03/11/2019 03:01, woodb...@gmail.com wrote:
>>> On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>>>>
>>>> Oh the irony. Do as I say, not as I do eh Brian?
>>>>
>>>
>>> Sorry, but as Ben Shapiro says, "capitalism always wins."
>>
>> For those that don't know who Shapiro is, but (for some reason) want to
>> know, here is an introduction.
>>
>> <https://rationalwiki.org/wiki/Ben_Shapiro>
>>
>
> He is from Los Angeles, California. He went to Harvard
> Law School and practiced law for a short time, but then
> became a journalist. He's a very knowledgeable and down-
> to-earth person. He's an Orthodox Jew. He's married
> and has three children - one of them hasn't been born yet.
> His podcasts are super.

I understand that you like him (he shares many of your prejudices). You
seem to think his opinion is important for C++. I can't imagine why.
So unless you can reference his development work or writings on C++,
let's leave him out of this.

>
> I have this in a server:
>
> #ifdef __linux__
> #include<linux/sctp.h>
> #else
> #include<netinet/sctp.h>
> #endif
>
> FreeBSD uses the else branch. I'm not sure what other platforms do.

Every platform that is not Linux?

Or do you mean, "I'm not sure what other platforms /should/ use the
second include choice" ? If so, then I can't help, I'm afraid. But it
is a concrete, technical question - and if you ask it again in a new
thread (without any spam, or hero worshipping), then hopefully you'll
get technical answers.

> Any ideas on how to improve this? My server is in pretty good shape
> so this is a drag.
>

Are you running it on anything other than Linux and FreeBSD? Is it
likely to be used anywhere else? If not, then the code is fine.

Chris M. Thomasson

unread,
Nov 4, 2019, 3:31:01 AM11/4/19
to
I have gotten into a very informative and polite argument with you over
"race-conditions" wrt C++11. Well, you are a nice guy David Brown. :^)

Keith Thompson

unread,
Nov 4, 2019, 4:00:44 AM11/4/19
to
David Brown <david...@hesbynett.no> writes:
> On 03/11/2019 03:01, woodb...@gmail.com wrote:
>> On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
>>>
>>> Oh the irony. Do as I say, not as I do eh Brian?
>>
>> Sorry, but as Ben Shapiro says, "capitalism always wins."
>
> For those that don't know who Shapiro is, but (for some reason) want to
> know, here is an introduction.
[big snip]
> Again, politics has nothing to do with anything under discussion.

Do you want more discussions of politics here? Because this is
how you get more discussions of politics here.

Somebody cited Ben Shapiro, and in response you discussed Ben Shapiro
at considerable length -- with the intent, I guess, of saying that
discussing Ben Shapiro here is in appropriate.

Please, say that it's off-topic *without* engaging in further
off-topic discussion, or just ignore it. If you insist on replying
to off-topic posts that offend you, you encourage more of them.

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */

David Brown

unread,
Nov 4, 2019, 5:03:29 AM11/4/19
to
I learned a number of things from that discussion, and had some of my
misconceptions corrected. It was, IMHO, a good example of how Usenet
threads are supposed to be (unlike this one).

woodb...@gmail.com

unread,
Nov 7, 2019, 11:17:37 AM11/7/19
to
It should be portable to Posix systems. The ifdef is a wart and
I'd like to have one line for that -- like I do for everything else.

Jorgen Grahn

unread,
Nov 7, 2019, 11:53:14 AM11/7/19
to
Then it's a matter about how well standardised the BSD Sockets API
extension for the SCTP protocol is. Should be possible to google from
that angle: e.g. what does POSIX, SUS, RFCs say?

I see RFC 6458 covers the API ... except it doesn't seem to mention
which header files should exist, which is a disappointment.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

woodb...@gmail.com

unread,
Nov 7, 2019, 1:54:44 PM11/7/19
to
Is there anything wrong with netinet/sctp.h? If not, I suggest
that as the home.

Jorgen Grahn

unread,
Nov 7, 2019, 4:34:00 PM11/7/19
to
It's analogous to netinet/tcp.h, udp.h and so on, so I guess that's
the right place. And it's what the RFC uses in its examples (although
it doesn't say anything about that being normative).

woodb...@gmail.com

unread,
Nov 9, 2019, 7:28:40 PM11/9/19
to
I wonder what steps to take to get something done. I'd like
to think that it wouldn't take years.


Brian

woodb...@gmail.com

unread,
Nov 12, 2019, 1:33:56 AM11/12/19
to
I installed gcc10 on a FreeBSD 12.1 machine. That machine also has
gcc9.2 on it. When I try to use g++10, I get an error that
it cannot execute 'cc1plus' execvp: No such file or directory

. I found a cc1plus file under a gcc9 directory, but that's
the only version I found under /usr/local. I want to use span
so am trying to get g++10. The only idea I have is to do something
like
pkg remove gcc9

but kind of doubt that would help.
I have a version of clang on the machine that I can use, but just
thought I'd see if I could get gcc10 to work. Any ideas? Thanks.

Chris M. Thomasson

unread,
Nov 12, 2019, 2:38:19 AM11/12/19
to
100% Agreed. A medium for nice correspondence... Usenet? ;^)

Chris M. Thomasson

unread,
Nov 12, 2019, 2:39:18 AM11/12/19
to
Well, it takes two to tango, and if each person is nice, and able to not
go crazy, well... Yes, Usenet is nice.

woodb...@gmail.com

unread,
Nov 12, 2019, 11:26:35 AM11/12/19
to
I got it working by using the span header from gcc10 with gcc9.

Keith Thompson

unread,
Nov 12, 2019, 6:55:01 PM11/12/19
to
woodb...@gmail.com writes:
> I installed gcc10 on a FreeBSD 12.1 machine. That machine also has
> gcc9.2 on it. When I try to use g++10, I get an error that
> it cannot execute 'cc1plus' execvp: No such file or directory

How did you install gcc10?

I'm not very familiar with FreeBSD, but on some systems "gcc" and "g++"
are separate packages. cc1plus is the C++ frontend, invoked by the g++
command. It's typically installed under a "libexec" directory, so g++
can find it but it's not in your $PATH. If you installed gcc-10 with
support for C but not for C++, that could explain what you saw -- except
that the "g++10" command itself probably shouldn't have been visible.

This might be a better question for a Unix or FreeBSD forum.

[...]

woodb...@gmail.com

unread,
Feb 1, 2020, 12:59:18 AM2/1/20
to
On Tuesday, November 12, 2019 at 5:55:01 PM UTC-6, Keith Thompson wrote:
>
> How did you install gcc10?
>
> I'm not very familiar with FreeBSD, but on some systems "gcc" and "g++"
> are separate packages. cc1plus is the C++ frontend, invoked by the g++
> command. It's typically installed under a "libexec" directory, so g++
> can find it but it's not in your $PATH. If you installed gcc-10 with
> support for C but not for C++, that could explain what you saw -- except
> that the "g++10" command itself probably shouldn't have been visible.
>

Good answer. I'm getting back into the
swing of things. Please bear with me.

From Foxnews:
Italian man denied Swiss citizenship for not knowing
bears and wolves shared enclosure at zoo.

woodb...@gmail.com

unread,
Feb 8, 2020, 10:54:31 PM2/8/20
to
On Friday, November 1, 2019 at 2:25:05 AM UTC-5, Bonita Montero wrote:
> > Can you give me some suggestions on how to improve my
> > repo: https://github.com/Ebenezer-group/onwards ?
>
> Yes: delete it and stop posting here.

Sorry, but it's been onwards and upwards for over
20 years now. The software is better than it has
ever been. Services are the way things have to be
now.


Brian
Ebenezer Enterprises
https://github.com/Ebenezer-group/onwards

Ian Collins

unread,
Feb 9, 2020, 1:53:03 AM2/9/20
to
On 09/02/2020 16:54, woodb...@gmail.com wrote:
> On Friday, November 1, 2019 at 2:25:05 AM UTC-5, Bonita Montero wrote:
>>> Can you give me some suggestions on how to improve my
>>> repo: https://github.com/Ebenezer-group/onwards ?
>>
>> Yes: delete it and stop posting here.
>
> Sorry, but it's been onwards and upwards for over
> 20 years now. The software is better than it has
> ever been. Services are the way things have to be
> now.

You've been pedaling that snake oil for almost as long.

--
Ian.

Chris M. Thomasson

unread,
Feb 9, 2020, 3:54:28 PM2/9/20
to
On 10/30/2019 9:58 AM, woodb...@gmail.com wrote:
> Shalom
>
> Can you give me some suggestions on how to improve my
> repo: https://github.com/Ebenezer-group/onwards
> ?
>
> What do you think of recent changes to this file?
> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc
>
> and a version from the end of September:
> https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc
>
> The number of lines hasn't changed much, but the size of the
> event loop, the most complicated part of the program, has been
> reduced by switching from TCP to SCTP. Thanks in advance.

Iirc, you require a user to "register" by sending you an email with
their password in the clear?

woodb...@gmail.com

unread,
Feb 27, 2020, 11:19:59 PM2/27/20
to
I plan to use Wireguard for encryption so it
could be done after we have that set up.

Mr Flibble

unread,
Feb 28, 2020, 11:51:00 AM2/28/20
to
You don't understand how passwords work do you? You should NEVER be storing user's passwords whether they are encrypted or not on your servers: you should be HASHING the user password on the user's machine and sending that over an encrypted link.

/Flibble

--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who doesn’t believe in any God the most. Oh, no..wait.. that never happens.” – Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?"

Chris M. Thomasson

unread,
Feb 28, 2020, 6:34:47 PM2/28/20
to
On 2/28/2020 8:50 AM, Mr Flibble wrote:
> On 28/02/2020 04:19, woodb...@gmail.com wrote:
>> On Sunday, February 9, 2020 at 2:54:28 PM UTC-6, Chris M. Thomasson
>> wrote:
>>> On 10/30/2019 9:58 AM, woodb...@gmail.com wrote:
>>>>                                                     Shalom
>>>>
>>>> Can you give me some suggestions on how to improve my
>>>> repo: https://github.com/Ebenezer-group/onwards
>>>> ?
>>>>
>>>> What do you think of recent changes to this file?
>>>> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc
>>>>
>>>>
>>>> and a version from the end of September:
>>>> https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc
>>>>
>>>>
>>>> The number of lines hasn't changed much, but the size of the
>>>> event loop, the most complicated part of the program, has been
>>>> reduced by switching from TCP to SCTP.  Thanks in advance.
>>>
>>> Iirc, you require a user to "register" by sending you an email with
>>> their password in the clear?
>>
>> I plan to use Wireguard for encryption so it
>> could be done after we have that set up.
>
> You don't understand how passwords work do you? You should NEVER be
> storing user's passwords whether they are encrypted or not on your
> servers: you should be HASHING the user password on the user's machine
> and sending that over an encrypted link.

Indeed. Even a nice DH exchange might be in order...

https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange


>
> /Flibble
>

Chris M. Thomasson

unread,
Feb 28, 2020, 6:37:35 PM2/28/20
to
How are you storing those user passwords on your end? I hope your not
storing them in the clear... You can store the HMAC'ed result, keyed
with a salt or some random element. Then instead of comparing passwords
in the clear, you can compare hash digests.

woodb...@gmail.com

unread,
Feb 28, 2020, 7:25:09 PM2/28/20
to
OK. I'm also thinking about this:
https://www.reddit.com/r/WireGuard/comments/ewzxk4/no_password_protection_at_all/

Perhaps I don't need passwords beyond what Wireguard provides.


Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net

Melzzzzz

unread,
Feb 28, 2020, 10:48:15 PM2/28/20
to
On 2020-02-29, woodb...@gmail.com <woodb...@gmail.com> wrote:
> On Friday, February 28, 2020 at 5:37:35 PM UTC-6, Chris M. Thomasson wrote:
>> On 2/27/2020 8:19 PM, woodb...@gmail.com wrote:
>> > On Sunday, February 9, 2020 at 2:54:28 PM UTC-6, Chris M. Thomasson wrote:
>> >> On 10/30/2019 9:58 AM, woodb...@gmail.com wrote:
>> >>> Shalom
>> >>>
>> >>> Can you give me some suggestions on how to improve my
>> >>> repo: https://github.com/Ebenezer-group/onwards
>> >>> ?
>> >>>
>> >>> What do you think of recent changes to this file?
>> >>> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc
>> >>>
>> >>> and a version from the end of September:
>> >>> https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc
>> >>>
>> >>> The number of lines hasn't changed much, but the size of the
>> >>> event loop, the most complicated part of the program, has been
>> >>> reduced by switching from TCP to SCTP. Thanks in advance.
>> >>
>> >> Iirc, you require a user to "register" by sending you an email with
>> >> their password in the clear?
>> >
>> > I plan to use Wireguard for encryption so it
>> > could be done after we have that set up.

sending passwords over mail is highly unsecure. No one does it any more.
>>
>> How are you storing those user passwords on your end? I hope your not
>> storing them in the clear... You can store the HMAC'ed result, keyed
>> with a salt or some random element. Then instead of comparing passwords
>> in the clear, you can compare hash digests.
>
> OK. I'm also thinking about this:
> https://www.reddit.com/r/WireGuard/comments/ewzxk4/no_password_protection_at_all/
>
> Perhaps I don't need passwords beyond what Wireguard provides.
Hm, no password is something like sending public keys?
>
>
> Brian
> Ebenezer Enterprises - In G-d we trust.
> http://webEbenezer.net


--
press any key to continue or any other to quit...
U ničemu ja ne uživam kao u svom statusu INVALIDA -- Zli Zec
Svi smo svedoci - oko 3 godine intenzivne propagande je dovoljno da jedan narod poludi -- Zli Zec
Na divljem zapadu i nije bilo tako puno nasilja, upravo zato jer su svi
bili naoruzani. -- Mladen Gogala

Chris M. Thomasson

unread,
Feb 29, 2020, 12:33:36 AM2/29/20
to
Very Simple scheme...

Password Setup:

Use DH to setup temporary secure channel between server and a client.

The client encrypts the password using this session and sends the
ciphertext to the server.

The server decrypts and hashes the password with a random salt.

The secure channel is destroyed.

The server stores the digest and the salt.


Password Validation:

Use DH to setup temporary secure channel between server and a client.

The client encrypts the password using this session and sends the
ciphertext to the server.

The server decrypts, looks up your account, hashes the password with the
stored random salt.

The secure channel is destroyed.

The server compares the stored digest vs the computed digest.


This way, the users passwords do not have to be stored.

This is just a simple way to do it.

Mr Flibble

unread,
Feb 29, 2020, 1:28:40 AM2/29/20
to
NO! Do not send the password to the fucking server, hash on the fucking CLIENT and send the fucking HASH to the fucking server.

Chris M. Thomasson

unread,
Feb 29, 2020, 1:34:21 AM2/29/20
to
> CLIENT and send the fucking HASH to the fucking server.'

Okay. I was thinking of sending an encrypted password using a DH secure
channel. We can most certainly hash on the client, then send the digest
to the server using a secure DH?

>
> /Flibble
>

Melzzzzz

unread,
Feb 29, 2020, 1:50:11 AM2/29/20
to
Hash or ciphertext? Hash is same as sending it in plain text.

>
> /Flibble

Melzzzzz

unread,
Feb 29, 2020, 1:51:23 AM2/29/20
to
When using encrypted protocol it is same. When attacker has hash it is
same as plain text.
>
>>
>> /Flibble

Chris M. Thomasson

unread,
Feb 29, 2020, 2:32:28 AM2/29/20
to
We want a ciphertext to be sent across the wire. We can use async crypto
to get a shared key, then encrypt using a symmetric cipher.

>
>>
>> /Flibble
>>
>
>

Mr Flibble

unread,
Feb 29, 2020, 2:34:28 AM2/29/20
to
You are missing the point: people use the same password for different things: if the hash is compromised it only compromises access to this particular server; also
you cannot gaurantee that lemons working on the server code don't log it by mistake. NEVER send password in the clear from the CLIENT computer even over encrpypted links.
Clue: you can hash a hash.

Chris M. Thomasson

unread,
Feb 29, 2020, 2:38:46 AM2/29/20
to
Exactly. This is why its good to try to setup a temporary secure
channel, just to send ciphertext to the server.

>>
>>>
>>> /Flibble
>>>
>>
>
>

Chris M. Thomasson

unread,
Feb 29, 2020, 2:40:48 AM2/29/20
to
It must use encrpypted links regardless.

David Brown

unread,
Mar 1, 2020, 8:46:29 AM3/1/20
to
On 29/02/2020 08:34, Mr Flibble wrote:
> On 29/02/2020 06:51, Melzzzzz wrote:
>> On 2020-02-29, Chris M. Thomasson <chris.m.t...@gmail.com> wrote:

>>>
>>> Okay. I was thinking of sending an encrypted password using a DH secure
>>> channel. We can most certainly hash on the client, then send the digest
>>> to the server using a secure DH?
>>
>> When using encrypted protocol it is same. When attacker has hash it is
>> same as plain text.
>
> You are missing the point: people use the same password for different
> things: if the hash is compromised it only compromises access to this
> particular server; also
> you cannot gaurantee that lemons working on the server code don't log it
> by mistake. NEVER send password in the clear from the CLIENT computer
> even over encrpypted links.
> Clue: you can hash a hash.
>

Exactly. It is always surprising how many people miss this point. (And
it should be needless to add that you should pick a good, random salt.)

The bad guys don't break into Facebook, Google, banks, and the like by
hacking those servers and reading out their data. They break into some
numpty web site that has stored user names, email addresses and clear
text passwords (because the muppet running them thinks Wireguard or DH
is magic that keeps it all safe). Then they guess that the user has the
same password on other services.

In virtually all cases, a standard https connection is secure enough for
transferring the password hash from the client to the server. It is
almost certainly better than making up your own system because you have
heard that Diffie-Hellman key exchange is good, or because you have read
about Wireguard while totally misunderstanding its purpose.

And after the initial transfer of the hash, you never have to transfer
it again, meaning the bad guys only have once chance to eavesdrop on it.

Chris M. Thomasson

unread,
Mar 1, 2020, 4:00:09 PM3/1/20
to
Agreed.


> It is
> almost certainly better than making up your own system because you have
> heard that Diffie-Hellman key exchange is good

Actually, DH key exchange can be very dangerous. One needs to know how
to use it. Large secure primes come to mind.

David Brown

unread,
Mar 1, 2020, 4:47:55 PM3/1/20
to
Friendly reminder - it was /you/ who brought up DH!

Anything in the cryptographic world can be "dangerous". A little
knowledge can be a very bad thing here. You are far better off
forgetting you ever heard of "Diffie-Hellman" or key exchange - use a
good TLS implementation and let people who know what they are doing
implement the security. (The authors of such software are not
infallible either, so track updates and fixes for the software.)


red floyd

unread,
Mar 2, 2020, 1:15:09 AM3/2/20
to
Crypto is hard. Really hard. Do not -- repeat DO NOT -- attempt
to write your own crypto. Use something like OpenSSL, LibreSSL,
or Guttman's Cryptlib for the crypto and secure channel.


Chris M. Thomasson

unread,
Mar 2, 2020, 4:21:57 PM3/2/20
to
Indeed I did. It was simply meant for the OP to take a look at; study.
Imvvvho, its a good algorihtm to learn, at least.


> Anything in the cryptographic world can be "dangerous".  A little
> knowledge can be a very bad thing here.  You are far better off
> forgetting you ever heard of "Diffie-Hellman" or key exchange - use a
> good TLS implementation and let people who know what they are doing
> implement the security.  (The authors of such software are not
> infallible either, so track updates and fixes for the software.)

Fwiw, I have an experimental symmetric cipher. If you get some really
free time perhaps you can take a look at it:

https://groups.google.com/d/topic/comp.lang.c/a53VxN8cwkY/discussion

http://funwithfractals.atspace.cc/ct_cipher

https://pastebin.com/raw/feUnA3kP
(C version with hardcoded secret key)

I can get it to work with traditional HMAC, however its way too slow.
Using an optimized HMAC that can take a digest without destroying its
internal state makes things go a lot faster.

Chris M. Thomasson

unread,
Mar 2, 2020, 4:24:51 PM3/2/20
to
Fwiw, the folks over on sci.crypt are telling me that its beyond their
experience to properly perform crypto analysis on. Perhaps you can help
tear it apart!?

David Brown

unread,
Mar 3, 2020, 2:11:52 AM3/3/20
to
No, I am don't have the knowledge or experience with cryptography to do
an analysis, nor do I have enough maths background (I'm fine with the
workings of RSA, but analysis of hashes and encryptions is beyond me).

Chris M. Thomasson

unread,
Mar 3, 2020, 4:31:45 AM3/3/20
to
Damn! If you happen to know any experts, please show this to them, on
your free time. Fwiw, have you tried to run my C code?

Chris M. Thomasson

unread,
Mar 3, 2020, 4:33:24 AM3/3/20
to
Its c99, should compile right up using the following sha2 lib:

https://github.com/ogay/hmac

and allow you to encrypt and decrypt files using a hardcoded secret key
to play with.

woodb...@gmail.com

unread,
Mar 3, 2020, 11:06:44 AM3/3/20
to
I'm going to use Wireguard as a first step.

woodb...@gmail.com

unread,
Aug 4, 2020, 9:28:55 PM8/4/20
to
On Wednesday, October 30, 2019 at 11:58:27 AM UTC-5, woodb...@gmail.com wrote:
> Shalom
>
> Can you give me some suggestions on how to improve my
> repo: https://github.com/Ebenezer-group/onwards
> ?
>
> What do you think of recent changes to this file?
> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc
>
> and a version from the end of September:
> https://github.com/Ebenezer-group/onwards/blob/9bc4c2646e7dc6421dfdcd9d1107d544c320a13a/src/cmw/tiers/cmwA.cc
>
> The number of lines hasn't changed much, but the size of the
> event loop, the most complicated part of the program, has been
> reduced by switching from TCP to SCTP. Thanks in advance.
>
>
> Brian
> Ebenezer Enterprise - America isn't great because America is powerful.
> America is powerful because America is great. Ben Shapiro at dailywire.com



https://github.com/Ebenezer-group/onwards/commit/01e81ab1c93cc60ad3754dbbfe64ed4fb0864cfd

Brian Wood

unread,
Dec 3, 2020, 12:40:31 PM12/3/20
to
On Thursday, November 7, 2019 at 3:34:00 PM UTC-6, Jorgen Grahn wrote:
> On Thu, 2019-11-07, woodb...@gmail.com wrote:
> > On Thursday, November 7, 2019 at 10:53:14 AM UTC-6, Jorgen Grahn wrote:
> >> On Thu, 2019-11-07, woodb...@gmail.com wrote:
> >> > On Monday, November 4, 2019 at 2:08:22 AM UTC-6, David Brown wrote:
> >> >> On 04/11/2019 05:04, woodb...@gmail.com wrote:
> >> >> >
> >> >> > I have this in a server:
> >> >> >
> >> >> > #ifdef __linux__
> >> >> > #include<linux/sctp.h>
> >> >> > #else
> >> >> > #include<netinet/sctp.h>
> >> >> > #endif
> >> >> >
> >> >> > FreeBSD uses the else branch. I'm not sure what other platforms do.
> >> >>
> >> >> Every platform that is not Linux?
> >> >>
> >> >> Or do you mean, "I'm not sure what other platforms /should/ use the
> >> >> second include choice" ? If so, then I can't help, I'm afraid. But it
> >> >> is a concrete, technical question - and if you ask it again in a new
> >> >> thread (without any spam, or hero worshipping), then hopefully you'll
> >> >> get technical answers.
> >> >>
> >> >> > Any ideas on how to improve this? My server is in pretty good shape
> >> >> > so this is a drag.
> >> >> >
> >> >>
> >> >> Are you running it on anything other than Linux and FreeBSD? Is it
> >> >> likely to be used anywhere else? If not, then the code is fine.
> >> >
> >> > It should be portable to Posix systems. The ifdef is a wart and
> >> > I'd like to have one line for that -- like I do for everything else.
> >>
> >> Then it's a matter about how well standardised the BSD Sockets API
> >> extension for the SCTP protocol is. Should be possible to google from
> >> that angle: e.g. what does POSIX, SUS, RFCs say?
> >>
> >> I see RFC 6458 covers the API ... except it doesn't seem to mention
> >> which header files should exist, which is a disappointment.
> >>
> >
> > Is there anything wrong with netinet/sctp.h? If not, I suggest
> > that as the home.
> It's analogous to netinet/tcp.h, udp.h and so on, so I guess that's
> the right place. And it's what the RFC uses in its examples (although
> it doesn't say anything about that being normative).
> /Jorgen
>

This man page:
https://www.man7.org/linux/man-pages/man7/sctp.7.html

says netinet/sctp.h, but on my Linux Mint system, the file
is still at linux/sctp.h. The biggest wart in my middle tier is
courtesy of Linux.


Brian
Ebenezer Enterprises - Enjoying programming again.
https://github.com/Ebenezer-group/onwards

Brian Wood

unread,
Dec 3, 2020, 12:40:31 PM12/3/20
to

daniel...@gmail.com

unread,
Dec 8, 2020, 11:24:55 AM12/8/20
to
How do we implement a robust exception class that has accessors to several string data members, and a what function that returns a concatenation of those strings?

A naive implementation to illustrate the intent is:

class my_error : public std::exception
{
std::string what1_;
std::string what2_;
mutable std::string what_;

my_error(const std::string& what1, const std::string& what2)
: what1_(what1), what2_(what2)
{
}

const std::string& what1() const
{
return what1_;
}

const std::string& what2() const
{
return what2_;
}

const char* what() const noexcept
{
try
{
what_ = what1_ + what2_;
return what_.c_str();
}
catch (...)
{
return what1_.c_str();
}
}
};

Thanks,
Daniel

Öö Tiib

unread,
Dec 8, 2020, 1:26:43 PM12/8/20
to
On Tuesday, 8 December 2020 at 18:24:55 UTC+2, daniel...@gmail.com wrote:
> How do we implement a robust exception class that has accessors to several string data members, and a what function that returns a concatenation of those strings?

The issue with that request is that we avoid exceptions that carry lot of
information and make lot of text processing. Exception is information for
developer about failure not for text processing or data transporting.
Ideally it is cheap and chance of exception from exception is none.

daniel...@gmail.com

unread,
Dec 8, 2020, 2:01:12 PM12/8/20
to
I don't think that's entirely correct. Software that relies on exceptions for
handling errors may have no other channel for communicating
information that must end up in messages to users, for example,
the line and column number where a parsing error occurred, in
addition to a description of the parsing violation.

Even boost sometimes does text processing when constructing
exception messages, for example (snipping the irrelevant bits),

class bad_virtual_result_cast :
public std::bad_cast, public boost::contract::exception {
public:
explicit bad_virtual_result_cast(char const* from_type_name,
char const* to_type_name)
{
std::ostringstream text;
text << "incompatible contracted virtual function result type "
<< "conversion from '" << from_type_name << "' to '"
<< to_type_name << "'" ;
what_ = text.str();
}

virtual char const* what() const BOOST_NOEXCEPT_OR_NOTHROW
{
return what_.c_str();
}

private:
std::string what_;
};

Daniel

Paavo Helde

unread,
Dec 8, 2020, 3:13:33 PM12/8/20
to
08.12.2020 18:24 daniel...@gmail.com kirjutas:
> How do we implement a robust exception class that has accessors to several string data members, and a what function that returns a concatenation of those strings?

I understand you worry about memory exhaustion while constructing an
error message. This question is mostly theoretical. If the machine is so
out of memory that it cannot construct a single error message even after
stack unwinding, then you have got much more serious troubles than
trying to preserve your error message text. Most likely your error
handler would not be able to process the long error message properly anyway.

So it does not really matter what you return. Considering the memory is
fully exhausted, it makes some sense to return a very short string,
increasing the chances the error handler is able to cope with it. E.g.:

try {
// ...
} catch(...) {
return "No memory";
}

With some kind of software, it might be even preferable to kill the
program on spot if memory appears to be fully exhausted. But this is
probably better done in the out-of-memory handler.

Öö Tiib

unread,
Dec 8, 2020, 4:17:33 PM12/8/20
to
On Tuesday, 8 December 2020 at 21:01:12 UTC+2, daniel...@gmail.com wrote:
> On Tuesday, December 8, 2020 at 1:26:43 PM UTC-5, Öö Tiib wrote:
> > On Tuesday, 8 December 2020 at 18:24:55 UTC+2, daniel...@gmail.com wrote:
> > > How do we implement a robust exception class that has accessors to several string data members, and a what function that returns a concatenation of those strings?
> > The issue with that request is that we avoid exceptions that carry lot of
> > information and make lot of text processing. Exception is information for
> > developer about failure not for text processing or data transporting.
> > Ideally it is cheap and chance of exception from exception is none.
> I don't think that's entirely correct. Software that relies on exceptions for
> handling errors may have no other channel for communicating
> information that must end up in messages to users, for example,
> the line and column number where a parsing error occurred, in
> addition to a description of the parsing violation.

It is unlikely that I want to show exception texts to user ever
as error handling, error reporting, user interface and debugging
are different concerns. Conflating those together results with all
being weak as exceptions are not silver bullets.
Exceptions should be used for handling exceptional
situations. Exceptional means that those happen rarely.
Rarely happening situations are less tested. More
complexity will add more chances of defects into
those places. Adding more debugging need is counter-
intuitive. User interface must be clear and might be
needed to be translated.

>
> Even boost sometimes does text processing when constructing
> exception messages, for example (snipping the irrelevant bits),

Boost is not always good example of best practices. Some things
are well made. Some are over-complicated and then either not
competitive or compile slowly because of too lot of
meta-programming. Your example was exception about misuse
of some boost library feature by programmer. Only
programmer can fix that problem, and so it is of no much value
to catch site nor to user.


Brian Wood

unread,
Jan 18, 2021, 11:48:45 PM1/18/21
to
I've posted about this now on reddit:
https://www.reddit.com/r/linux/comments/l0cb4h/home_of_sctph/


Brian Wood

unread,
Mar 9, 2021, 11:24:21 PM3/9/21
to
On Saturday, November 2, 2019 at 10:51:40 PM UTC-5, Mr Flibble wrote:
> On 03/11/2019 02:01, woodb...@gmail.com wrote:
> > On Saturday, November 2, 2019 at 8:15:15 PM UTC-5, Mr Flibble wrote:
> >>
> >> Oh the irony. Do as I say, not as I do eh Brian?
> >>
> >
> > Sorry, but as Ben Shapiro says, "capitalism always wins."
> > In order for communism to not die even more quickly than
> > it otherwise would, you trolls actually need a quality
> > basis for your pogroms. Let's see, what quality
> > products/companies have come from communism? Oh, none?
> Who mentioned communism? Pathetic attempt at misdirection, Brian.
>
> This "Ben Shapiro" guy is just as much of a religious bigot as you are,
> Brian, but of course you know this already which is why you keep spamming
> him here. Cockwomble.
> /Flibble
>

Today he said something like: Once the woke mob starts
coming for you, they don't stop. That reminds me of this
quote that I've used here before: "They stab it with their
steely knives, but they just can't kill the beast."

Yesterday he recommended people use duckduckgo.com.
I've had a link to them on my website for years!

I would be remiss if I didn't ask for ideas on how to improve
my repo: https://github.com/Ebenezer-group/onwards


Brian
Ebenezer Enterprises
https://webEbenezer.net

0 new messages