Click here to Skip to main content
15,907,906 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
jschell15-Jan-24 5:05
jschell15-Jan-24 5:05 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
jmaida15-Jan-24 11:57
jmaida15-Jan-24 11:57 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
trønderen15-Jan-24 12:37
trønderen15-Jan-24 12:37 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
jmaida15-Jan-24 13:13
jmaida15-Jan-24 13:13 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
BernardIE531715-Jan-24 5:16
BernardIE531715-Jan-24 5:16 
General.NET growing pains Pin
honey the codewitch13-Jan-24 14:43
mvahoney the codewitch13-Jan-24 14:43 
GeneralRe: .NET growing pains Pin
Daniel Pfeffer13-Jan-24 21:20
professionalDaniel Pfeffer13-Jan-24 21:20 
GeneralRe: .NET growing pains Pin
honey the codewitch13-Jan-24 22:26
mvahoney the codewitch13-Jan-24 22:26 
Daniel Pfeffer wrote:
Could you not create a wrapper around the parts of Microsoft's DNF that you need, providing the same functionality where it exists, but your own implementation where it doesn't?


Unfortunately, no. Read only spans kind of work like string views do in C++ except unlike C++ you have to rely on the CLI to support the feature. You can't even hold Span/ReadOnlySpan instances as fields in classes or structs. It will COMPILE error.

Edit: However, I thought about what you asked and it gave me an idea. To that end I created just enough of ReadOnlySpan<t> in C#/Slang that Deslang could find it and use it. I don't actually use the code for the ReadOnlySpan<t> cutout I made - but it's enough that Slang can resolve the methods on it. So that works.

C#
namespace System
{
	// dummy for DNF so Slang can compile
	internal class ReadOnlySpan<T>
	{
		public override string ToString()
		{
			return null;
		}
		public int Length { get { return 0; } }
		public ReadOnlySpan<T> Slice(int position, int length)
		{
			return null;
		}
	}
}

Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix


modified 14-Jan-24 5:45am.

GeneralRe: .NET growing pains Pin
Sander Rossel14-Jan-24 23:40
professionalSander Rossel14-Jan-24 23:40 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 2:17
mvahoney the codewitch15-Jan-24 2:17 
GeneralRe: .NET growing pains Pin
Sander Rossel15-Jan-24 4:44
professionalSander Rossel15-Jan-24 4:44 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 4:47
mvahoney the codewitch15-Jan-24 4:47 
GeneralRe: .NET growing pains Pin
jschell15-Jan-24 5:34
jschell15-Jan-24 5:34 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 5:36
mvahoney the codewitch15-Jan-24 5:36 
GeneralWordle 939 Pin
StarNamer@work13-Jan-24 13:05
professionalStarNamer@work13-Jan-24 13:05 
GeneralRe: Wordle 939 Pin
Amarnath S13-Jan-24 13:16
professionalAmarnath S13-Jan-24 13:16 
GeneralRe: Wordle 939 Pin
Sandeep Mewara13-Jan-24 16:56
mveSandeep Mewara13-Jan-24 16:56 
GeneralRe: Wordle 939 Pin
OriginalGriff13-Jan-24 19:54
mveOriginalGriff13-Jan-24 19:54 
GeneralRe: Wordle 939 Pin
Cp-Coder14-Jan-24 1:25
Cp-Coder14-Jan-24 1:25 
Generalshort joke Pin
Salvatore Terress13-Jan-24 7:58
Salvatore Terress13-Jan-24 7:58 
GeneralRe: short joke Pin
Ștefan-Mihai MOGA13-Jan-24 8:03
professionalȘtefan-Mihai MOGA13-Jan-24 8:03 
GeneralRe: short joke Pin
kmoorevs13-Jan-24 8:07
kmoorevs13-Jan-24 8:07 
GeneralRe: short joke Pin
Ștefan-Mihai MOGA13-Jan-24 8:13
professionalȘtefan-Mihai MOGA13-Jan-24 8:13 
GeneralRe: short joke Pin
charlieg13-Jan-24 10:10
charlieg13-Jan-24 10:10 
GeneralRe: short joke Pin
Gary R. Wheeler14-Jan-24 7:03
Gary R. Wheeler14-Jan-24 7:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.