On Fri, 8 May 2026 20:16:09 +0200, fir wrote:
thats this simple but this is totally NEEDED, its hell people not
adepted it
Why donrCOt you send them a patch to fix it?
W dniu 8.05.2026 o-a23:27, fir pisze:
something mistaked in your brain
In Polish: Nie! Pyta+eem o to w prost! I gada+ee+c co+c w tym stylu jak teraz o UMK.
In Eng.: No! I asked straight to you. And you told me some think like
that about UMK.
i studied theoretical phisics on UMK (extremally good times it was)..
i dont remember the user as you at all
In Polish: W przesz+eo+cci u++ywa+eem ksywy "Szyk Cech".
In Eng.: In the past I use "Szyk Cech" as my nick.
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here.-a We don't need to know about Fir's - or your - qualifications or lack thereof.-a We don't need to know people's academic
or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the posts.
David Brown pisze:
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:few years ago we were in quite good relations witch szyk..he was a
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here.-a We don't need to know about Fir's - or your
- qualifications or lack thereof.-a We don't need to know people's
academic or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the posts.
little shizophrenic (as to our day by day typical standards) but kinda respectable (by me and my colegue emo)
David Brown pisze:
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here.-a We don't need to know about Fir's - or your
- qualifications or lack thereof.-a We don't need to know people's
academic or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the posts.
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here. We don't need to know about Fir's - or your
- qualifications or lack thereof. We don't need to know people's
academic or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the
posts.
Lawrence DrCOOliveiro pisze:
On Fri, 8 May 2026 20:16:09 +0200, fir wrote:
thats this simple but this is totally NEEDED, its hell people not
adepted it
Why donrCOt you send them a patch to fix it?
this is a convention many people should use - how i can sent them
patch?
David Brown <david.brown@hesbynett.no> writes:
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here. We don't need to know about Fir's - or your
- qualifications or lack thereof. We don't need to know people's
academic or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the
posts.
Indeed.
And please also consider that many of us here have killfiled fir.
Since so many of us don't see fir's posts, there's not much point
in publicly replying to him.
Of course if fir says something relevant to C, feel free to reply.
But I see no C content in this subthread.
Keith Thompson pisze:
David Brown <david.brown@hesbynett.no> writes:
On 08/05/2026 22:32, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# wrote:
<snip>
As was mentioned in another post in another thread, let's judge people
here on their posts here.-a We don't need to know about Fir's - or your
- qualifications or lack thereof.-a We don't need to know people's
academic or professional careers.
If you have something personal to take up with Fir, please do so by
email and not here on Usenet.
Let those that want to read Fir's posts, read them, and let those that
want to reply or comment on the do so based on the contents of the
posts.
Indeed.
And please also consider that many of us here have killfiled fir.
Since so many of us don't see fir's posts, there's not much point
in publicly replying to him.
Of course if fir says something relevant to C, feel free to reply.
But I see no C content in this subthread.
you dont see many things keith thompson
obviously it is quite strong c content - it is about naming conventions
and this is important part od c culture/coding (though it is not only c)
winapi has some functions that when you call it you need to later call
some function to "destroy" it - all knows the topic (not only winapi has
it but winapi is example)
those functions are hell, but i realized today if some gives them to use
for people they simply should be named after Alloc, for example if
uunction uses malloc to alloc the bitmap or font etc (or other alloc may
be platform specyfic) the name of this function should be AllocBitmap AllocFont
thats this simple but this is totally NEEDED, its hell people not
adepted it
Am 08.05.2026 um 20:16 schrieb fir:
winapi has some functions that when you call it you need to later call
some function to "destroy" it - all knows the topic (not only winapi
has it but winapi is example)
those functions are hell, but i realized today if some gives them to
use for people they simply should be named after Alloc, for example if
uunction uses malloc to alloc the bitmap or font etc (or other alloc
may be platform specyfic) the name of this function should be
AllocBitmap AllocFont
thats this simple but this is totally NEEDED, its hell people not
adepted it
In C++ that's easy with some self-documenting code (almost no one uses
WinAPI with C). I've developed a small class which is like experimental ::scope_exit, here it is:
#pragma once
#include <utility>
#include <concepts>
#include "nui.hpp"
template<std::invocable Fn>
struct defer final
{
-a-a-a-adefer( Fn &&fn ) :
-a-a-a-a-a-a-a m_enabled( true ),
-a-a-a-a-a-a-a m_fn( std::forward<Fn>( fn ) )
-a-a-a-a{
-a-a-a-a}
-a-a-a-adefer( defer const & ) = delete;
-a-a-a-avoid operator =( defer const & ) = delete;
-a-a-a-a~defer() noexcept(false)
-a-a-a-a{
-a-a-a-a-a-a-a if( m_enabled ) [[likely]]
-a-a-a-a-a-a-a-a-a-a-a m_fn();
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-abool operator ()( defer<Fns> &... additional )
-a-a-a-a{
-a-a-a-a-a-a-a if( !m_enabled ) [[unlikely]]
-a-a-a-a-a-a-a-a-a-a-a return false;
-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a m_fn();
-a-a-a-a-a-a-a return (additional() && ...);
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-avoid disable( defer<Fns> &... additional ) noexcept
-a-a-a-a{
-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a (additional.disable(), ...);
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-avoid enable( defer<Fns> &... additional ) noexcept
-a-a-a-a{
-a-a-a-a-a-a-a m_enabled = true;
-a-a-a-a-a-a-a (additional.enable(), ...);
-a-a-a-a}
private:
-a-a-a-abool m_enabled;
-a-a-a-aNO_UNIQUE_ADDRESS Fn m_fn;
};
With that you'd simply write:
-a-a-a-avoid *xyz = CreateResource( ... );
-a-a-a-adefer cleanup( [&] { DestroyResource( xyz ); } );
So if allocation and destruction is so closely bound to each other
there's really no need for a naming convention like you suggest.
Bonita Montero pisze:
font f; void load_things()
{
-a AllocFont(&f, "verdana")
}
maybe, but it seems something is slightly wrong here in both versions maybe
Am 08.05.2026 um 20:16 schrieb fir:
winapi has some functions that when you call it you need to later call
some function to "destroy" it - all knows the topic (not only winapi
has it but winapi is example)
those functions are hell, but i realized today if some gives them to
use for people they simply should be named after Alloc, for example if
uunction uses malloc to alloc the bitmap or font etc (or other alloc
may be platform specyfic) the name of this function should be
AllocBitmap AllocFont
thats this simple but this is totally NEEDED, its hell people not
adepted it
In C++ that's easy with some self-documenting code (almost no one uses
WinAPI with C). I've developed a small class which is like experimental ::scope_exit, here it is:
#pragma once
#include <utility>
#include <concepts>
#include "nui.hpp"
template<std::invocable Fn>
struct defer final
{
-a-a-a-adefer( Fn &&fn ) :
-a-a-a-a-a-a-a m_enabled( true ),
-a-a-a-a-a-a-a m_fn( std::forward<Fn>( fn ) )
-a-a-a-a{
-a-a-a-a}
-a-a-a-adefer( defer const & ) = delete;
-a-a-a-avoid operator =( defer const & ) = delete;
-a-a-a-a~defer() noexcept(false)
-a-a-a-a{
-a-a-a-a-a-a-a if( m_enabled ) [[likely]]
-a-a-a-a-a-a-a-a-a-a-a m_fn();
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-abool operator ()( defer<Fns> &... additional )
-a-a-a-a{
-a-a-a-a-a-a-a if( !m_enabled ) [[unlikely]]
-a-a-a-a-a-a-a-a-a-a-a return false;
-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a m_fn();
-a-a-a-a-a-a-a return (additional() && ...);
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-avoid disable( defer<Fns> &... additional ) noexcept
-a-a-a-a{
-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a (additional.disable(), ...);
-a-a-a-a}
-a-a-a-atemplate<typename ... Fns>
-a-a-a-avoid enable( defer<Fns> &... additional ) noexcept
-a-a-a-a{
-a-a-a-a-a-a-a m_enabled = true;
-a-a-a-a-a-a-a (additional.enable(), ...);
-a-a-a-a}
private:
-a-a-a-abool m_enabled;
-a-a-a-aNO_UNIQUE_ADDRESS Fn m_fn;
};
With that you'd simply write:
-a-a-a-avoid *xyz = CreateResource( ... );
-a-a-a-adefer cleanup( [&] { DestroyResource( xyz ); } );
So if allocation and destruction is so closely bound to each other
there's really no need for a naming convention like you suggest.
Bonita Montero pisze:
Am 08.05.2026 um 20:16 schrieb fir:
winapi has some functions that when you call it you need to later
call some function to "destroy" it - all knows the topic (not only
winapi has it but winapi is example)
those functions are hell, but i realized today if some gives them to
use for people they simply should be named after Alloc, for example
if uunction uses malloc to alloc the bitmap or font etc (or other
alloc may be platform specyfic) the name of this function should be
AllocBitmap AllocFont
thats this simple but this is totally NEEDED, its hell people not
adepted it
In C++ that's easy with some self-documenting code (almost no one uses
WinAPI with C). I've developed a small class which is like experimental
::scope_exit, here it is:
#pragma once
#include <utility>
#include <concepts>
#include "nui.hpp"
template<std::invocable Fn>
struct defer final
{
-a-a-a-a-adefer( Fn &&fn ) :
-a-a-a-a-a-a-a-a m_enabled( true ),
-a-a-a-a-a-a-a-a m_fn( std::forward<Fn>( fn ) )
-a-a-a-a-a{
-a-a-a-a-a}
-a-a-a-a-adefer( defer const & ) = delete;
-a-a-a-a-avoid operator =( defer const & ) = delete;
-a-a-a-a-a~defer() noexcept(false)
-a-a-a-a-a{
-a-a-a-a-a-a-a-a if( m_enabled ) [[likely]]
-a-a-a-a-a-a-a-a-a-a-a-a m_fn();
-a-a-a-a-a}
-a-a-a-a-atemplate<typename ... Fns>
-a-a-a-a-abool operator ()( defer<Fns> &... additional )
-a-a-a-a-a{
-a-a-a-a-a-a-a-a if( !m_enabled ) [[unlikely]]
-a-a-a-a-a-a-a-a-a-a-a-a return false;
-a-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a-a m_fn();
-a-a-a-a-a-a-a-a return (additional() && ...);
-a-a-a-a-a}
-a-a-a-a-atemplate<typename ... Fns>
-a-a-a-a-avoid disable( defer<Fns> &... additional ) noexcept
-a-a-a-a-a{
-a-a-a-a-a-a-a-a m_enabled = false;
-a-a-a-a-a-a-a-a (additional.disable(), ...);
-a-a-a-a-a}
-a-a-a-a-atemplate<typename ... Fns>
-a-a-a-a-avoid enable( defer<Fns> &... additional ) noexcept
-a-a-a-a-a{
-a-a-a-a-a-a-a-a m_enabled = true;
-a-a-a-a-a-a-a-a (additional.enable(), ...);
-a-a-a-a-a}
private:
-a-a-a-a-abool m_enabled;
-a-a-a-a-aNO_UNIQUE_ADDRESS Fn m_fn;
};
With that you'd simply write:
-a-a-a-a-avoid *xyz = CreateResource( ... );
-a-a-a-a-adefer cleanup( [&] { DestroyResource( xyz ); } );
So if allocation and destruction is so closely bound to each other
there's really no need for a naming convention like you suggest.
note i dont know what your class is doin (i detaste c+ new cobol
horrible language) but the problem of AllocFunctions() is not to meke
sure programmer wil call Dealloc (which in most cases is not needed at
all) - the problem is not to allow it call many times with no need
in winapi trash naming this gdi is fatel you need lo create some gdy functions like birmaps dibs whateever it is some brushes maybe yet some
more thinghs and if you would simply know which one is allocating
something you would use it quite sane way without it its kinda gate to
small insanity (at least for some)
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 02:10:23 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,321 |