C
C#9mo ago
ᛁᛊᚺᛁ

✅ Folder Creation

So all the paths specific in the strings of this file need to be created. I've written one so far. Is there a better way to do it? https://github.com/Ishikudeska/NolvusForLinux/blob/main/NexusForLinux/src/backend/FilePaths/FilePaths.cs
GitHub
NolvusForLinux/NexusForLinux/src/backend/FilePaths/FilePaths.cs at ...
Contribute to Ishikudeska/NolvusForLinux development by creating an account on GitHub.
33 Replies
tera
tera9mo ago
that code is not even valid C#. what
Angius
Angius9mo ago
It's C#-ish but not really It's, like, an LLM's hallucination of what C#++ would be So, @ᛁᛊᚺᛁ, what's up with that?
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
WDYM? VScode doesn't spit any errors so it's fine to me.
Angius
Angius9mo ago
Do you have the DevKit extension set up? Did you open the project, and not just a loose file? Because in no way, shape, or form is your code valid C#
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
I followed the guide on VScode. I'm also doing 90% of the work on a chromebook. Outside of that even when I do work on my Windows machine it doesn't spit out errors
Angius
Angius9mo ago
You did not answer my questions
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
Yes, I have the dev kit setup
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
No description
Angius
Angius9mo ago
And are you opening the project, or a loose C# file?
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
the project. Well mor like the folder. VScode is detecting the project oh 🤮 yeah it wasn't working bc "enablewindowstargeting" wasn't working BLEGH 279 errors hoooo boy
Angius
Angius9mo ago
Unsurprising lol
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
yeah, welcome to non-maui projects. I'm gonna go home and generate a maui forms app in VScommunity but I fucked myself Holy shit. Yeah no the downloadmanager Tasks HAVE to be asynchronous, if only for the purpose of them downloading multiple files
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
isn't this returning a value??
No description
SinFluxx
SinFluxx9mo ago
Do you see a return statement in that method?
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
ye, I just added that I'm also adding a foreach, because I want each file to download before the next one starts
SinFluxx
SinFluxx9mo ago
We'll have to take your word for it because we can't see the line you added it on, but vscode reckons you haven't
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
No description
SinFluxx
SinFluxx9mo ago
Still don't see a return
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
Check the github one sec
Angius
Angius9mo ago
On your Github it's an async Task method. Here, it's async Task<List<string>>
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
yeah I effed up with branches. I'm fairly new to git, so I messed up my progress alr should be fixed 🙏 Yeah, so it's fixed on github. Yet still spitting out errprs
Angius
Angius9mo ago
What do you suppose this does?
await foreach (DownloadManager.DownloadFilesAsync(coreskseUrlList));
await foreach (DownloadManager.DownloadFilesAsync(coreskseUrlList));
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
nothing, it's wrong look again. I fixed it but I suppose it makes each file wait to be downloaded before it starts downloading the next one? ^^
Angius
Angius9mo ago
You can download files in parallel Task.WhenAll() would come in handy, for example
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
ye, but it'd be a pain in the ass because some files are 16mb and others are 100gb (welcome to skyrim LOD downloads) "Task does not contain a method for WhenAll"
Angius
Angius9mo ago
Unless you're on some ancient-ass version of .NET Framework, it should be supported
No description
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
I'm on .NET 8.0 unless I'm missing a using?
Angius
Angius9mo ago
Then, as you can see, Task.WhenAll() is supported Maybe System.Threading I believe
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
ok it's still saying it's not a thing
MODiX
MODiX9mo ago
Angius
REPL Result: Success
async Task Print(string s)
{
await Task.Delay(Random.Shared.Next(1, 10));
Console.WriteLine(s);
}

string[] lines = ["hello", "world", "goodbye", "cat"];
var tasks = lines.Select(l => Print(l));
await Task.WhenAll(tasks);
async Task Print(string s)
{
await Task.Delay(Random.Shared.Next(1, 10));
Console.WriteLine(s);
}

string[] lines = ["hello", "world", "goodbye", "cat"];
var tasks = lines.Select(l => Print(l));
await Task.WhenAll(tasks);
Console Output
world
hello
cat
goodbye
world
hello
cat
goodbye
Compile: 536.158ms | Execution: 86.438ms | React with ❌ to remove this embed.
SinFluxx
SinFluxx9mo ago
Have you got your own Task class?
ᛁᛊᚺᛁ
ᛁᛊᚺᛁOP9mo ago
No yes :catfacepalm: fixed I'm ACTUALLY STUPID BRO WTF
Want results from more Discord servers?
Add your server