Search
Setup for Free
S
Silk.NET
•
3y ago
khitiara
i think they should work?
i think they should work
?
Silk.NET
Join
A Discord server for the Silk.NET - your one-stop-shop for high-speed .NET multimedia, graphics, and compute. FOSS.
1,788
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
K
khitiara
OP
•
10/22/23, 3:32 AM
not 100
% sure
P
Perksey
•
10/22/23, 3:35 AM
@grifon
.petre how much bandwidth do you have atm
P
Perksey
•
10/22/23, 3:36 AM
i want to nerdsnipe someone else into writing a competing solution to the overload problem
P
Perksey
•
10/22/23, 3:36 AM
so that we have multiple prototypes to try out in a short timeframe
K
khitiara
i think they should work?
M
Maxine
•
10/22/23, 3:37 AM
it don
't work
!
K
khitiara
OP
•
10/22/23, 3:37 AM
huh
P
Perksey
•
10/22/23, 3:37 AM
you need a TSelf
K
khitiara
OP
•
10/22/23, 3:37 AM
that almost feels like a bug lol
M
Maxine
•
10/22/23, 3:37 AM
yeah its such a strange design decision
K
khitiara
OP
•
10/22/23, 3:37 AM
the static abstracts can be called from the member type but also i guess those have a separate declaration on that type
M
Maxine
•
10/22/23, 3:37 AM
yeah
M
Maxine
•
10/22/23, 3:38 AM
i wanted to use interfaces to reuse code
M
Maxine
•
10/22/23, 3:38 AM
that ain
't happening now
M
Maxine
•
10/22/23, 3:38 AM
if c
# had templates this shit would be done in minutes
P
Perksey
i want to nerdsnipe someone else into writing a competing solution to the overlo...
P
Perksey
•
10/22/23, 3:39 AM
so the glass in my mind has been shattered a little bit
P
Perksey
•
10/22/23, 3:39 AM
and
.
.
. it
's workable but it
's making me realise just how ridiculous it is what we
're doing
P
Perksey
•
10/22/23, 3:39 AM
i still abstain that this is the only way without excessive overloads to achieve the level of flexibility we want
P
Perksey
•
10/22/23, 3:39 AM
but okay here it goes
P
Perksey
•
10/22/23, 3:39 AM
the Ptr type
P
Perksey
•
10/22/23, 3:39 AM
how do you store one
?
P
Perksey
•
10/22/23, 3:40 AM
like in a class
M
Maxine
•
10/22/23, 3:40 AM
not meant to
P
Perksey
•
10/22/23, 3:40 AM
but
P
Perksey
•
10/22/23, 3:40 AM
then we have no safe storage medium
M
Maxine
•
10/22/23, 3:40 AM
you store either a T
* or a T
[
]
, and that gets cast to Ptr
<T
> implicitly
P
Perksey
•
10/22/23, 3:40 AM
ok but consider glfwCreateWindow
P
Perksey
•
10/22/23, 3:40 AM
it returns a pointer
M
Maxine
•
10/22/23, 3:41 AM
it should instead return some sort of handle to GLFWwindow
M
Maxine
•
10/22/23, 3:41 AM
that can be cast to ptr
<T
> as well
P
Perksey
•
10/22/23, 3:42 AM
yeah that
's where i
'm at
. making a
StoredPtr
StoredPtr
type
(or add a
Untracked
Untracked
variant of each type so you can just do
PtrPtr<T>.Untracked
PtrPtr<T>.Untracked
)
P
Perksey
•
10/22/23, 3:42 AM
but that
's kinda crap
P
Perksey
•
10/22/23, 3:42 AM
and you
'd also have to assume that every return pointer is a stored pointer and not one we need to track
P
Perksey
•
10/22/23, 3:42 AM
which is a reasonable assumption
M
Maxine
•
10/22/23, 3:42 AM
Ptr
<T
> is meant to be an input type not an output type
, because the return value of glfwCreateWindow will never be a T
[
]
P
Perksey
•
10/22/23, 3:42 AM
but it just feels meh
M
Maxine
•
10/22/23, 3:42 AM
in fact
, you could just as well return T
* directly
P
Perksey
•
10/22/23, 3:42 AM
but then we
'd get all the unsafe whiners back on our case
M
Maxine
•
10/22/23, 3:43 AM
i thought the point was not safety but the inconvenience of having to get a pointer to T
[
] to call a method that takes T
*
M
Maxine
•
10/22/23, 3:43 AM
otherwise
, the methods should be all T
[
] and never T
*
P
Perksey
•
10/22/23, 3:43 AM
our userbase generally feels more comfortable if they can pretend like the unsafe isn
't happening even though it actually is
P
Perksey
•
10/22/23, 3:43 AM
it is a puzzling phenomenon
K
khitiara
OP
•
10/22/23, 3:43 AM
the point was to use implicit casts instead of thousands of overloads
M
Maxine
•
10/22/23, 3:43 AM
what if we break their kneecaps
K
khitiara
the point was to use implicit casts instead of thousands of overloads
P
Perksey
•
10/22/23, 3:44 AM
i guess the handle scenario needs to be resolved regardless if we want minimal unsafe in a codebase
M
Maxine
•
10/22/23, 3:44 AM
should GLFWwindow have methods on it
?
P
Perksey
•
10/22/23, 3:45 AM
no it
's an opaque type
P
Perksey
•
10/22/23, 3:45 AM
it may do eventually
M
Maxine
•
10/22/23, 3:45 AM
what does the handle do
, besides hiding the T
*
P
Perksey
•
10/22/23, 3:45 AM
as we do want to experiment with autogenerated OOP wrappers
P
Perksey
•
10/22/23, 3:45 AM
(or rather me and kai
)
Next page
StoredPtr
StoredPtr
Untracked
Untracked
PtrPtr<T>.Untracked
PtrPtr<T>.Untracked
Similar Threads
Scraper Work
S
Silk.NET / team-talk
4y ago