Search
Setup for Free
S
Silk.NET
•
3y ago
Perksey
really the reason for me losing motivation here is that C# fundamentally is not built for using unsa
really the reason for me losing motivation here is that C
# fundamentally is not built for using unsafe safely
.
Silk.NET
Join
A Discord server for the Silk.NET - your one-stop-shop for high-speed .NET multimedia, graphics, and compute. FOSS.
1,790
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
T
TechPizza
•
7/31/23, 5:02 PM
i saw you mention an array of
ref
ref
, what was that for
?
P
Perksey
OP
•
7/31/23, 5:03 PM
basically the way I was going to achieve the usability I wanted without using overloads was to have wrapper types that both unsafe and safe types can cast to
P
Perksey
OP
•
7/31/23, 5:03 PM
one of these was ConstPtr
, which is pretty complete actually
:
https://github.com/Perksey/SilkX/blob/main/sources/Core/Pointers/ConstPtr.cs
P
Perksey
OP
•
7/31/23, 5:04 PM
however I got fustrated while trying to come up with the equivalent for ConstPtr2D
:
https://github.com/Perksey/SilkX/blob/main/sources/Core/Pointers/ConstPtr2D.cs
P
Perksey
OP
•
7/31/23, 5:04 PM
namely implicitly marshalling a string array
T
TechPizza
•
7/31/23, 5:05 PM
i was thinking of source
-generated InlineArrays lol
T
TechPizza
•
7/31/23, 5:05 PM
but that would still require constant lengths
P
Perksey
OP
•
7/31/23, 5:05 PM
yeah
P
Perksey
OP
•
7/31/23, 5:06 PM
fundamentally working with a language where what our afraid
-of
-unsafe users want is so difficult to achieve without making them use unsafe
P
Perksey
OP
•
7/31/23, 5:06 PM
is just killing my motivation
P
Perksey
OP
•
7/31/23, 5:06 PM
and if we remove that
, we
're just terrafx with pretty names
T
TechPizza
•
7/31/23, 5:09 PM
hmm
, something like a ref struct that allocates pinned GCHandles around all given strings sounds fun
P
Perksey
OP
•
7/31/23, 5:09 PM
yeah
, but then you need a sentinel type that the user is responsible for keeping alive
P
Perksey
OP
•
7/31/23, 5:09 PM
or a free method
T
TechPizza
•
7/31/23, 5:10 PM
clearly we need source interceptors that inject those sentinels
K
khitiara
•
7/31/23, 5:10 PM
there is that one dictionary thing
K
khitiara
•
7/31/23, 5:10 PM
forget the name
K
khitiara
•
7/31/23, 5:12 PM
conditionalweaktable
K
khitiara
•
7/31/23, 5:13 PM
finalizes the values when the keys get deleted
P
Perksey
OP
•
7/31/23, 5:13 PM
Yeah that
’d still need a sentinel that the user is responsible for keeping around
P
Perksey
OP
•
7/31/23, 5:14 PM
The only other alternative is monads and I
’m not sure how much I can trust the JIT codegen
K
khitiara
•
7/31/23, 5:14 PM
yeah good luck with that one
T
TechPizza
•
7/31/23, 5:17 PM
were source interceptors that bad of an idea
?
P
Perksey
OP
•
7/31/23, 5:18 PM
interceptors would solve the codegen problem maybe
T
TechPizza
•
7/31/23, 5:27 PM
you could insert a branch and make them call a pinning method if an array was passed
V
Volte
•
7/31/23, 8:07 PM
@kaijellinghaus
Reminder
You asked me
July 17, 2023
to remind you about
:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- C
&C
K
Kai
•
7/31/23, 8:27 PM
@Perksey
@baebey it
's C
&C time soon
L
Lyris the Kitori
•
7/31/23, 8:29 PM
for some reason i forgot to put it on my calendar
, what time did we agree on
?
P
Perksey
OP
•
7/31/23, 8:34 PM
when do you want a C
&C
L
Lyris the Kitori
•
7/31/23, 8:39 PM
today is my last full day in washington
, tomorrow is my flight
, then i
'll need a day or 2 to re
-organize at home
, maybe the 5th
?
P
Perksey
OP
•
7/31/23, 8:40 PM
yes I can probably do the 5th
K
Kai
•
7/31/23, 11:06 PM
I do not have plans so whatever time you want iso k
L
Lyris the Kitori
•
7/31/23, 11:06 PM
cool
L
Lyris the Kitori
•
7/31/23, 11:06 PM
lets work out timezone problems ahead of time this time
:
^
)
L
Lyris the Kitori
•
7/31/23, 11:07 PM
cus ive gotten trolled thinking its a day earlier than it actually was because of timezone magic
K
Kai
•
7/31/23, 11:07 PM
It
's weekend so idc when
K
Kai
•
7/31/23, 11:08 PM
we can do like
2
0
:00 UTC
? Or earlier or later
?
K
Kai
•
7/31/23, 11:09 PM
August 5, 2023
K
Kai
•
7/31/23, 11:09 PM
?
L
Lyris the Kitori
•
7/31/23, 11:09 PM
yeah that time should work for me
K
Kai
•
7/31/23, 11:10 PM
Ok pending approval from
@Perksey I guess that
's good
K
Kai
•
7/31/23, 11:10 PM
Also fuck it
's 1am
L
Lyris the Kitori
•
7/31/23, 11:10 PM
correct
L
Lyris the Kitori
•
7/31/23, 11:11 PM
it is 1am for you
K
Kai
•
7/31/23, 11:11 PM
Nah I
'm asserting that it
's 1am for everyone
L
Lyris the Kitori
•
7/31/23, 11:11 PM
its
1
6
:11 for me
K
Kai
•
7/31/23, 11:11 PM
It
's
July 31, 2023
K
Kai
•
7/31/23, 11:11 PM
Does that work
? I think that works
?
L
Lyris the Kitori
•
7/31/23, 11:12 PM
it does work
K
Kai
•
7/31/23, 11:12 PM
oh btw
Next page
ref
ref