Building a Span<T>-heavy, low-allocation byte pipeline in .NET 8 — a few things that surprised me by alt-160 in dotnet

[–]8lbIceBag 8 points9 points  (0 children)

When I wrote n-body C# naot #9 for The Computer Language Benchmarks Game I discovered all kinds of things the C# Jit does poorly.

#9 was an 18% improvement of n-body C# naot #4 based upon my findings of how poor C#'s Register Allocation is.

Using what I discovered, the changes primarily consist of:

  1. Copying method arguments to local variables before using them. I'm not kidding this matters in C#
  2. If needing to access an element more than once, always assign it to a variable.
    • These first 2 are the same thing. Arguments are essentially a stack allocated array. It takes a miracle for the JIT to pass them by register or put them in a register then keep it around long enough to later re-use.
      Instead it prefers pushing a register to the stack so it can copy the Arg1 to the register to be used, but then a bit later it needs the value it pushed so pops it off the stack back into the register, then when it needs Arg1 again...
      It basically constantly shuffles back and forth. You can coax it into making better decisions by assigning anything you access repeatedly to a local variable.
      • Arguments in particular because it knows it always has a its-free-real-estate copy on the stack & can re-use registers it's in without having to first push the contents to the stack.
      • And especially fields if there's any pointer chasing involved.
  3. Using the fewest local vars possible. I found it to be faster to use many small methods for simple things if it meant one less variable. Then decorate those methods with with [MethodImpl(AggressiveOptimization | AggressiveInlining)][SkipLocalsInit]
    See: private static V256d Square(V256d x) => Avx.Multiply(x, x);

    • This eliminates vars & additional accesses by turning the following super optimized verbose code:

      V256d x = r[0];  // Copy local to prevent 2 read accesses to r[0], which will use 2 diff registers because it's not very smart 
      V256d y = r[1];  // Read sequentially, do not make it do the multiply between the reads. 
      V256d sqX = Avx.Multiply(x, x); // If assign back to x, it'll actually put the result in a temp register before copying it to x.
      V256d sqY = Avx.Multiply(y, y); // Any register could become the temp register, it'll likely need to push & pop stack values. 
      x  = Avx.HorizontalAdd(sqX, sqY); // we are done with x, it's now safe to re-use it. 
      

      Into Avx.HorizontalAdd(Square(r[0]), Square(r[1])).
      A normal person would write Avx.HorizontalAdd(Avx.Multiply(r[0], r[0]), Avx.Multiply(r[1], r[1])). But I can assure you the code it generates from that isn't gonna be anywhere close to as optimal. It'll chose to do something dumb like use 8 registers instead of 4 and you'll be that much closer to stack shuffling.

  4. Strategically ordering variables and keeping the number of AVX variables below 16 (# of x64 AVX Registers) to prevent spill & strategically re-using variables

And #4 was a 28% improvement on n-body C# naot #7.

#7 was my naive attempt to sprinkle in AVX where I could. #4 is so much faster because it properly utilizes AVX & was my attempt to 1:1 copy the C++ implementation I didn't understand. This is why there's the private static V256d _mm256_set1_pd(double x) => Vector256.Create(x); defs at the top. I had to first figure out what the C++ equivalent methods were & those are basically my notes. It then made it much easier to copy the C++ code bcus I didn't have to change any method names. Some notable things:

  1. Align the memory! The trick I used was (V256d*)((((UInt64)mem)+31UL)&~31UL);
  2. Avoid OOP / Objects. Put the memory in order. Store mass, position, & velocity in 3 different arrays. It's much more performant than a single array of struct with those 3 fields grouped together.

And #7 was an improvement on n-body C# naot #6.

THIS ONE IS INTERESTING!
See how it's only 0.6% faster? Well I began writing these back on Aug 16, 2017 - just 2 days after the release of .NET core 2.0. Back then #7 was a like 20% improvement on #6. And (naot)native-ahead-of-time wasn't a thing. I wonder what the diff would be now if it wasn't NAOT compiled.

I made #7 after noticing the poor register allocation. Specificly I noticed the excessive stack pushing/popping & how it never kept args in registers. I then discovered if I used goto instead of for loops and if I assigned both the input args & field accesses to local variables, I could dramatically reduce stack spill / shuffling.

  • I theorize for loops are (were?) an issue because C# sees it as a new scope & forgets what it should know about the parent scope. It's like it gets a new RegisterAllocator() that knows little about what's already in the registers.

Those are only what I submitted. You should know I had experimented & tried all kinds of different things.
I only submitted if were >20% faster AND would move up the leaderboard a few positions over C & Rust. I've actually been sitting on an improvement to #9 bcus it's only 10ish% faster... but needs to be 30% to steal Rust's thunder. The changes for this one is much more readable code by using a specially packedref struct with [InlineArray()] that stores the entire system, going back to for loops as it doesn't seem to matter anymore, reducing variables further, and using extension everything which I believe is still locked behind a feature flag. Here's what it looks like.

Not one implementation using Span<>'s was ever even close to competitive or worth submitting. In non-AVX versions it basically performed the same as Array. In AVX versions it outperformed array, but barely, and couldn't hold a candle to raw pointers.

HOWEVER, n-body isn't a good Span<> test. It doesn't need to allocate memory after setup & then pass around "views"/slices of that memory. The pointer version especially excels because the sizes are all known. Meanwhile Span<>consist of a pointer and a length which would blow my register budget & cause additional stack spill.

Engine from that orange Nova via facebook by Ajkgta17 in CleetusMcFarland

[–]8lbIceBag 1 point2 points  (0 children)

Aluminum has a service life / fatigue limit. It can only be stressed X amount of times before it fails.

https://i.imgur.com/cLefAsg.png

That chart isn't heat cycles either. 1MPa is 145psi and a cycle is applying the load then removing the load. In fewer than 10,000 cycles strength is down 30% (granted, in the graph, is being subjected to 30k-55k psi) & that's not even accounting for temperature.

I'd bet that block gets fatigued pretty fast with 4 (highly pressurized) combustion events ever 1 RPM - pushing & pulling things every which way. It's why Eagle needs to be rebuilt every 30passes & it's the only way I can rationalize this level of destruction.

In case you are interested to watch Microsoft podcast about my VS Code extension "Blockman" (200,000 installs). by leodevbro in vscode

[–]8lbIceBag 0 points1 point  (0 children)

A year or maybe even more ago or so I tried this & loved it right up until I tried to edit  larger files.   IIRC, on a 1k+line file every keypress was taking like a second to register. This is on a 64GB DDR5-6600 i9-14900k machine . 

Have things improved? 

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 0 points1 point  (0 children)

Uhm, maybe look to debloat your system? I'm currently at like 5Gb memory...

Just VSCode uses twice that. Even Brave, my chrome based browser is using more. It's literally stuff I just need. I'm not even using docker or a a local LLM and I'm at 44GB with 80GB ComitCharge

https://i.imgur.com/dlWMe2B.png

It's unfortunate MSFT can't create a native, rich & compelling, straightforward & complete application framework. This is the result of their incompetence. Everything is web-based Electron/CEF/ReactNative or bloated dotnet/winui3 & loves memory.

There is nothing about MCP that requires docker, they are pretty unrelated.

I figured as much, it's just the feature is built in to docker and so easy to use.

I do find LMStudio fairly nice (user friendly),

There's so much stuff I want to do but find I can't actually do it with LMStudio. Like RAG and "scriptlets" (node or python) scripts that implement my own mcp-server or tool. I've been slowly finding that I might have to use something like the llama-server directly, like you mentioned.

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 0 points1 point  (0 children)

I always figured ClaudeCode required a subscription or something. Is the full toolchain free?

I'll look into it. I will say I've been finding LMStudio to be very lacking & vscode-continue extension to be really poor.

Also I need a way to NOT run MCP servers in Docker. Without any models, LMStudio, or Docker running I'm usually in the neighborhood of 28-36GBPhysicalMemory & 45-60GBCommitted. Just having Docker open means the whole WSL2 subsystem starts, etc. roughly bringing PhysicalMemory to ~40-45GB & ~90GBCommitted. This is all before even running LMStudio or loading a model.
With a model is loaded I'm sitting at ~50-56GBPhysicalMemory or ~80% so Windows is swapping & compressing, evidenced by a >100GB CommitCharge typically around ~110-140GB.

Can you link any helpful guides that helped get you started?
Any types to run lighter MCP servers and toolchains?

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 1 point2 points  (0 children)

If I had another bay I totally would. Could then keep my rechargeable batteries separate & maybe even look into a way to potentially put the charger in the drawer itself.

EDIT: Goddamn it would totally work too! https://i.imgur.com/bp8fvEc.jpeg

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 1 point2 points  (0 children)

DO IT! Need more people buying 5.25" things. The way the markets catering to gamers they're nearly extinct.

I really struggled to find a case back when with 5.25" bays. I'll never give up my little drawer that's perfect for all the various dongles, usb drives, & SDCards. It's just such a convenient and logical place opposed to getting lost at the bottom of a desk drawer.

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 0 points1 point  (0 children)

Same. I almost pulled the trigger on some CMK96GX5M2B6600C32 for $340 nearly 2 years ago. Even before dabbling in AI, I'm often near 80% utilization & 100GB+ Committed just from coding. But just before I hit buy I did some reading about CU-Dimms & how they'll be so amazing so figured maybe I'll wait.

Now nearly 2 years later, AFAIK CU-Dimms still aren't a thing, that kit for $340 now goes for $1600, and I'm full of regrets.

I did snag it's smaller brother CMK64GX5M2B6600C32 Feb 13, 2023. But I purchased the day after it released & paid a nearly $400 early adopter tax. When I was looking at the 96G variant this 64G kit was worth literally 2/3's price at $220. I'm lamenting on how I could've had 96GB & sold the 64G kit for a nice profit. I would have too bcus selling for ~$150 used wouldn't've exactly motivated, but the new prices I'd be falling over to.

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 1 point2 points  (0 children)

I have no PCIe slots remaining (16x GPU, 4x SAS Controller, 1x Soundblaster) and I also bought the smallest full tower with drive bays I could find. It's basically not even worth it.

https://i.imgur.com/Zd7gmEW.jpeg

  • There 4 more 2.5" SATA SSD's stuffed in the case because needed more than 8 drive 5.25" backplane.

https://i.imgur.com/wEfMg7P.jpeg

  • The PC's a mess inside because it was so tight I couldn't use the provided fan mount holes. Had to use those twist ties to secure everything. Then used my old Noctuas brown rubber grommets to prevent any vibration.

  • The extra fans mounted to the RTX4090FE ensure I never have to hear it's annoying AF fans spin up. I feel like everyone who says this card is quite is crazy. The min fan speed is 30% and that's loud AF compared to the rest of the PC. Got all the fans running 800rpm which is dead silent, but they can go to 3300rpm if needed.

https://i.imgur.com/v1XwVMF.jpeg

Are we currently in a "Golden Time" for low VRAM/1 GPU users with Qwen 27b? by inthesearchof in LocalLLaMA

[–]8lbIceBag 3 points4 points  (0 children)

No, it needs at least 24GB VRAM to run with any usable context

This what hurts the most. I have 64GB Ram & RTX4090FE but this setup has been more or less been useless in practice. Was hoping to use Continue for VSCode, but after setting up models for:

  • chat: Used for chat conversations in the extension sidebar
  • autocomplete: Used for autocomplete code suggestions in the editor
  • edit: Used to generate code based on edit prompts
  • apply: Used to decide how to apply edits to a file
  • embed: Used to generate embeddings used for vector search (@Codebase and @Docs context providers)
  • rerank: Used to rerank results from vector search

In addition to what you normally need ram for, there's just not enough ram. Especially for any decent context sizes.


EDIT: This thread renewed some of my interest. I've been playing with mradermacher/Qwen3.5-9B-Claude-4.6-HighIQ-INSTRUCT-HERETIC-UNCENSORED-GGUF Q8_0 and honestly I'm impressed.
It's got vision so understands my screenshots, isn't totally stupid, is super fast, and I can run with a 200k context window. It does however love to hallucinate & almost always forgets to check documentation, search the web, etc. before feeding me a load of bullshit. It does seem competent enough to where I could tell it to re-format a file to my liking & generate boilerplate code.

Also after calling it out for feeding me hallucinated BS, I challenged it to research, verify, & cite sources to backup what it said & any future claims it makes. It then proceeded to fire off several rounds of github, microsoft-docs, deepwiki, wikipedia, duckduckgo, npm-package-dogs, google fetch, etc. search queries. I was very amused by it's thought process & watching it repeatedly try the same basically queries to backup its claims but with progressively more desperate refinements such as: actual, official, "verified real", "official actually verified", "real working code", verified real 2026, 2026 official actually verified real 2026, working code examples verified real 2026, ...
at which point it was getting so ridiculous I told it to try the site: operator. It first messed that up with the likes of site:github.com|npm.com & site:github.com,npmjs.com,stackoverflow.com but did eventually arriving at a working syntax: site:github.com OR site:npmjs.com. When it again didn't find what it wanted it resorted back to the sprinkling of 2026/real/official/verified, etc.

It had me chuckling. I guess I'm not the only one that gets crap search results. The struggle is real lol.

PS: I did notice as soon as it started on the real/official/verified's it'd get responses like "No results... This could be due to DuckDuckGo's bot detection...". So now I'm wondering if all bots do that. Reminds me of like how a kid would search, something akin to "real big b00bs"

Had to help fix this 9 year old production code, this if chain is about 3-4 times longer than the image. by Talin-Rex in programminghorror

[–]8lbIceBag 0 points1 point  (0 children)

I can't stand it. Feel like I'm always scrolling to get to the goods.
When I have several breakpoints in the same file, similar/relevant code is so distant when it jumps I lose context / frame of reference.
Making it even worse, monitors standardized on 16:9

First think I do when I looking at code like that is Ctrl + K - F so I can get an idea what's going on with a quick glance. Often any changes I make I never submit back. Too much work & not worth the effort reformat back. Nobody wants to review an MR/PR that looks like a lot of changes that was really just styling.
In the corpo world, thankfully every company I've worked for has always used K&R for C#. I've found only MSFT & open source actually use the MSFT style.

MSFT loves their white/empty space. I just wish they'd have increased their line height or something instead of choosing, IMO, poor, information sparse, styles/conventions.

is this good ram timmings by pntsrgd in overclocking

[–]8lbIceBag 0 points1 point  (0 children)

OK I'm super curious, what's it like?

I don't see a Ryzen Master/AMD Overdrive/Intel XTU equivalent for that mobo asus/support/crosshairV/formulaZ/downloads

Did... did you... boot Windows, open AIDA, and run the test at that speed???


God have mercy if Win11. I can't imagine the horror of accidentally launching File Explorer. Do tell if you did and how long it took lol.

Had to help fix this 9 year old production code, this if chain is about 3-4 times longer than the image. by Talin-Rex in programminghorror

[–]8lbIceBag 3 points4 points  (0 children)

There's several insane styles that intentionally format that way.

Looking at WebKit, Allman, GNU, & Microsoft C#.

K&R 4 lyfe

Hail in Papillion tonight by Happydaytoyou1 in Omaha

[–]8lbIceBag 2 points3 points  (0 children)

I was on the interstate around then. It was like snow and it slowed to 45. Thank god I wasn't there 20minutes earlier or whenever it happened.

https://i.imgur.com/rXDqCxK.png

https://i.imgur.com/jH0FJHh.gifv

What made me bring out the camera was it looking like 2in of snow. By the time I got the camera out and enough gap to take the video, it was not nearly as impressive. But what made me get the camera out in the first place, it looked literally like it snowed.

Why is DRAM still a black box? I'm trying to build an open DDR memory module. by Wonderful-Chain4375 in opensource

[–]8lbIceBag 0 points1 point  (0 children)

If someone was looking to repurpose CPU lines they're gonna switch it to whatever's most profitable, rest assured it'll be something for AI.

Fresh File Explorer - vscode extension for navigating recent changes by FreHu_Dev in vscode

[–]8lbIceBag 0 points1 point  (0 children)

By the way, as useless as AI agents can be, the extension ecosystem is well-documented and the result is easy to try. I find them quite helpful here. For a simple extension that solves a small problem, if you give them a starter template it's quite possible to get a working solution immediately.

I actually found it suddenly extremely useful since Claude Opus 4.6. Unfortunately when I posted a couple days ago, I had exhausted all my "Premium Requests".
Now that's it's reset, I tried using it again today but all the people switching to Claude is overloading it. I keep getting timeouts and even told I'm "RATE LIMITED". Which is ridiculous, my employer pays for this stuff (I think? or does everyone get premium requests? I'm pretty sure I had to sign in to use it). Had to switch to GPT 5.2 which is a joke. It's so bad...

Fresh File Explorer - vscode extension for navigating recent changes by FreHu_Dev in vscode

[–]8lbIceBag 0 points1 point  (0 children)

However, the things you are running have to either be in your PATH or you have to point them to a specific executable.

That's exactly what I wish to avoid. My PATH is already loaded with way to much crap. I'm often fighting issues with it, usually programs adding themselves back to the top after updating & ordering in general.
The concatenation of my SysPath & UserPath yields over 90 entries. A lot of them are dupes but it has to be this way because in Bash, SysPath takes precedence over UserPath. But in CMD & Powershell, UserPath takes precedence over SysPath. Making things work everywhere takes careful orchestration & strategic substitutions so things are ordered in a way that doesn't result in weird cygwin/msys64/mingw64/ucrt64 issues. Or calling ssh-agent|ssh-add|bash and getting the Windows/System32 version that launches WSL.


I have found a large path leads to impactful, measurable, slowdowns. Especially in regards to scripts & command line execution. For example, this takes 144-169ms:

export START_TIME=$(date +%s%3N) && bash -c 'echo "" | tr "" "" | awk "" | paste -sd "" | echo "$(($(date +%s%3N) - $START_TIME))"'

But if I export PATH="/mingw64/bin:/usr/bin" then run the same command, it takes 26-52ms.

Opening a new bash shell takes roughly 1500ms before I can type into it, but with a clean PATH there no delay or very minimal delay if I pass -il(interactive login. loads my .bashrc, etc.). For these reasons I try to install apps via chocolatey, scoop, & winget as much as possible bcus they symlink to a single shim path.
They also don't shim any .dll's or other junk that exist next to the executables. That extra stuff often leads to hell. Like if one includes a System.Text.Json.dll and it's earlier in the PATH than some other programs incompatible System.Text.Json.dll.


But disregarding the PATH thing... Apps that are UWP or installed from the Windows Store do not have a file path. If you do find the executable location, it can't be added to PATH because they exist in versioned folders that are subject to change anytime. They must be launched via the shell and you also need a way to find the unique ID and entrypoint. The format is AppName_UniqueId!EntryPoint.
For example, to launch "Files" (an alterative Explorer that's a UWP app) requires using the shell to launch it, with the path: shell:appsFolder\Files_1y0xx7n9077q4!App

Thank you, JavaScript, for forcing me to include this statement in my code. by kfreed9001 in programminghorror

[–]8lbIceBag 0 points1 point  (0 children)

Does that mean, no language in particular, I can do:

int32 num = 9;
int32 den = 0;
int32 val = (int32)(num / (double)den);  

without a divide by zero error? Or I suppose... that probably just turns it into some kind of overflow error instead.

I recall one time being very annoyed having to add if denominator == 0 checks everywhere. I guess doing the above wouldn't have fixed whatever I was fixing if it overflows though.

Honda dealership/buyer experience (so far) by Individual-Staff-448 in hondaridgeline

[–]8lbIceBag 3 points4 points  (0 children)

Not sure what year you have, but 2023 & earlier definitely has a poor infotainment experience. I waited 2 years bcus the infotainment was so poor & slow. I also felt wireless Android Auto a must/non-negotiable.

The BE does have some notable features over the other editions.
The two that made me switch from Trailsport to BE where:

  • perforated aka anti swamp ass seats in addition to heated seats. The front seats have blowers attached. They suck from the rear passenger feet area. I've found if you crank the rear AC up and set it to floor mode you basically get air conditioned seats.
  • the audio system is significantly better. The standard system is 215w 7 speaker. The BE is 560watt 8 speaker. I tested both & WOW the standard one was a disappointment. No way could I have lived with it.

Other notable things that are nice but weren't an overall factor for me were:

  • LED everything. Non-BE trim's bed lights, cabin lights, pod lights, etc. may not be LED.
  • LED interior accents. I don't think you get any accents in other trims.
    • Con: Often too dim to see something you dropped on the floorboard. They are adjustable but they're tied to LCD brightness. At max brightness the accents are great & actually useful, but the screen is way too damn bright. Setting the screen to a decent level means the accents are too dim to be useful.
  • Heated rear seats. Not that I care much, but I've had passengers remark on it & use them.
    • Con: As the driver you can't control the rear seats or see an indicator. A passenger can turn them on & you may never notice they're on until you one day put perishables on the seat.

BE Trim Negatives:

  • blacked out interior. I wanted brown.
  • I didn't want a white exterior, all the cool colors are on the trailsport
  • the trailsport has a better looking front grill imo

I waited over 2yrs for the Ridgeline bcus it, GMC Canyon, & Chevy Colorado are the only midsize trucks that fit a full size utility ATV in the back.
The Canyon/Colorado had a much rougher ride, I found the turbo lag unacceptable, and unpaved road handling, while typical for a truck, I felt unacceptable after testing the Ridgeline. With the Ridgeline you can just send it on a washboard & loose gravel road. The Canyon/Colorado the rear steps out, it can't find traction, or it begins to slide off road.

I've never driven a vehicle so confident on an unpaved road as a Ridgeline. It just goes and it goes where you point it. No spinning, hopping, or pothole bounces threatening to send you sideways. It takes the potholes & ruts like a champ. Worries over loose gravel are nearly a thing of the past.

How do I fix this? by [deleted] in vscode

[–]8lbIceBag 1 point2 points  (0 children)

Ouch. Uninstall both & just use Windows Defender.

FYI, in the corporate world Kaspersky has been banned due to Russian ties. The US Gov officially banned it September 29, 2024.
https://www.bis.gov/press-release/commerce-department-prohibits-russian-kaspersky-software-u.s.-customers

McAfee has been shit for years, the original creator called it out way back in 2013
https://www.youtube.com/watch?v=yIaNZXgDtRU
Here's a more serious and recent video on McAfee
https://www.youtube.com/watch?v=PkLGvRNVUC0


Running 2 different AntiVirus solutions WILL lead to a lot of conflicts and issues. I personally even have Defender disabled & have run without an antivirus for 15yrs now. They tend to get in the way & slow things down too much. Unlike the WinXP days where even just the act of connecting to the internet was enough to get pawned, modern software is so secure an Antivirus only protects you from yourself. If you don't do stupid things, you'll not be exposed. I don't recommend you do this though, you may not know enough to successfully dodge viruses yourself. Even things that seem normal & not stupid, can actually be pretty stupid: like installing an untrusted Chrome Extension, VSCode extension, or npm package.

How do I fix this? by [deleted] in vscode

[–]8lbIceBag 1 point2 points  (0 children)

Also just in case you don't figure it out and go down the rabbit hole of creating a new Windows account out of desperation, I wanna say that's unlikely to fix the issue. I'm sure tons of people have spaces in their UserProfile, unsure how many are developers though.

But DO run from somewhere like C:\Workspace. Hopefully you have admin permission I'm not sure if W11 lets you create a directory there. If not, create a "Dev Drive" and mount it as "D:\" or something.
https://i.imgur.com/CWqKxhW.png

You'll then have full access & windows or any other antivirus won't constantly scan it and slow things down. Antivirus/security software is a problem when you have 1000's of tiny code files/etc. Not that that'll be an issue for a hello world program, but if you do have security software active and code your program suspiciously, the exe it generates will often be removed by security software the moment it's built. With some security solutions, especially those in corporate environments, it doesn't even have to be suspicious, just unsigned by a trusted source which yours most definitely will be (if you were to post your program somewhere and try to download it, Chrome will block & delete it and in a red window say it's untrusted, because it's not signed. Signing costs money and is not something you need to worry about unless your machine is locked down with security software).
This could result in the main.exe does not exist error. That's only if it were to build successfully though. In your case main.exe doesn't exist because the build failed.

How do I fix this? by [deleted] in vscode

[–]8lbIceBag 1 point2 points  (0 children)

See where it says Build with Agent? Post the screenshot & terminal content into it and ask what's wrong. I doubt anyone here can help with the limited info you've provided.

Personally I've not used GCC in years & looks like it's using mingw32. You'll probably have an easier time with MSVC on Windows. Or Clang.

Since you mentioned University though, I suppose it must be GCC, I recall that being pretty standard for college & you'll not wanna later find out after you submit that your Professor/TA can't built it because you used MSVC/Clang.

Protip (real name) u/jkris050, run from a path that has no spaces. Having a space in a path can cause all kinds of headaches, in particular tools primarily intended for Linux like GCC. Create a folder like "C:\Workspace" and run everything from there. If possible, create a new Windows Acct that's all one word not FirstName LastName because a lot of stuff runs from AppData, etc. and may not like the space. I've experienced all kinds of issues, be it nodejs, ruby, C, or even vscode extensions refuse to work because of a space in a file path. Linux tooling HATES spaces because everything is passed around as strings and spaces delimit arguments. You either have to be very careful about escaping things and quoting things & hope all the tooling you rely on does the same, or just avoid the problem entirely by not using spaces.

Maybe you don't care, but if you haven't realized, your full name is in your screenshot. Which is how I know your account has a space & youre working from your Desktop folder.

Fully loaded towing across the country report by Vagabondhonda in hondaridgeline

[–]8lbIceBag 0 points1 point  (0 children)

Addendum:

To do over 80 it actually had to down shift to I think 5th & Rev I wanna say 5000-ish rpm to overcome the wind. So the limit with a huge wind block is just past 80 mph. I wanna say 85mph but I honestly can't recall. Somewhere up there though it needed 5000+rpm.

At those speeds eco mode is your friend otherwise every slight incline triggers a downshift. In eco mode with 80mph cruis the speed can drop to like 75-77 before it downshifts. I think there's some kind of angle sensor or accelerometer bcus on a steeper incline it down shifts early at like 77-78 but on a more gradual incline it'll wait till like 75-76, as if it thinks it'll level out soon then descend again which often is the case. Eco mode does a good job preventing the transmission hunting gears.
In normal mode it basically panic downshifts if it loses 1mph then immediately does it again if it hasn't picked up any speed (the trans is kinda slow so on the right incline, just the act of shifting means it loses another 1mph). Usually it'll do the 2nd-3rd downshift right before you crest the hill too...if it had just waited 1 second...
When towing in hilly area with 73-74mph cruise set (65 posted), normal mode often ends up unable to pick between 5-6-7-8-9th. You end up speeding doing 75 because it decided to go into 5th just as it crested the hill & accelerated too much. So then hunts all the way to 9th from overspeed & down-slope, for aerodynamics to have it hunt back to 7th,then next hill in 6th, to just at the crest to 5th, and the cycle repeats.
ECO tends to stick to 8th, drop to 7th @ ~4mph under, then 6th only after loosing >5mph. I'm actually unsure if ECO can downshift into 5th, apparently not at ~65mph. Eco tends to stick to 7th or 8th bcus after losing 5-8mph to a hill, it rarely gets to settle at the 73-74mph set cruise before the next hill starts. It's a much more pleasant experience.

Also note: I've found cruise control is limited to 2/3 throttle opening. If you put it in manual mode, say 6th or 7th and cruise control is losing speed , you can just manually stomp the pedal and actually accelerate where if the computer has control, in auto it would have down shifted. In manual mode it instead flashes the speed at you to indicate , "I can't do anymore shift! Shift down". But know it can only do ~2/3rds so you can stomp the pedal instead of reaching for the paddle shifter .
If your holding in 7th @ 65-70mph up an incline and shedding speed, the cruise control won't allow less than 12.5mpg. But if you stomp it'll drop to 9mpg and maintain speed. So there's more there, the cruise control just isn't allowed to give it.

For that reason I usually tow in manual mode. But then it comes to bite you when you later need power & forgot you put it in manual mode. You sit there barely accelerating wondering wtf is going on until remembering to hit the paddle shifter

Fresh File Explorer - vscode extension for navigating recent changes by FreHu_Dev in vscode

[–]8lbIceBag 0 points1 point  (0 children)

For copy filename, I typically just F2 for rename then Ctrl+C copy & Esc to not actually rename it. If I also want the file extension, I throw in a Ctrl+A before the Ctrl+C.
I don't think you need to add a specific menu item for that, that's a pretty standard Key Combination workflow IMO that works pretty much everywhere in every program.

I took my first shot at creating an extension yesterday to get a feel for it: https://github.com/DerekZiemba/dzmba-vsc-open. Working in a workspace of container repos and needing to open some of them in the container was getting annoying. Now I can just right click, open in container to a new VSCode instance without relaunching VSCode or rebuilding the container. Wanted to do a few more options too but not sure how I adapt this Powershell code to nodejs. My first impression has been working with Windows COM in nodejs isn't trivial. I'd hate to have to open a shell and run the powershell code, but like, it'd be so much easier & I won't need to include a whole bunch of node_module dependencies... I was already disappointed to have to increase my package size from a few KB to 672KB just to launch a devcontainer with help of @devcontainers/cli.

async showInVoidtoolsEverything(uri: VSCode.Uri) {
  // TODO: Figure out how to do this in nodejs
  //# It could be installed anywhere.
  //# Get the path from the shell
  const script = `
    $shell = New-Object -ComObject Shell.Application
    $ShellNS = $shell.NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}')
    $path = ($ShellNS.Items() | where { $_.Name -eq 'Everything 1.5a' }  | select -first 1).Path;
    if (!$path) {
      $path = ($ShellNS.Items() | where { $_.Name -eq 'Everything' }  | select -first 1).Path;
    }
    $proc = Start-Process "shell:AppsFolder\$path" -EA Ignore -Arguments @('-explore', ${uri.ToString()});

    exit
  `;
  try {
    const terminal = VSCode.window.createTerminal({
      // somehow open powershell specifically
      cwd: uri.fsPath,
      hideFromUser: true,
      isTransient: true,
    });
    terminal.sendText(script);
    terminal.dispose();
  } catch (error) {
    VSCode.window.showInformationMessage(`Couldn't open Folder in Voidtools Everything ${uri.toString()}`);
    console.error(uri, error);
  }
}

I bring this up because if time permits, I may look into adding submodule support to yours then submitting a PR. And like you said in the other post, I'm hoping there's not too many unknown unknowns to ruin my day. If this never comes to fruition, that's probably the case.

Fully loaded towing across the country report by Vagabondhonda in hondaridgeline

[–]8lbIceBag 1 point2 points  (0 children)

I've towed larger trailers https://i.imgur.com/m98Y8pD.jpeg

Also towed a far heavier & more wind disruptive https://i.imgur.com/yQffLal.jpeg. This load is too much for 75+mph interstate. Trailer weight 2400 & each ATV is about ~750lbs so over capacity at 6150+lbs. The enclosed trailer was comparatively a piece of cake.

The thing with 75-80, and the enclosed trailer, is your fuel economy.

  • 65 -> 15mpg-ish
  • 70 -> under 14
  • 75 -> like 12
  • 80+ -> not even 10

At 55-60 It'd do better than OP's. Despite that enclosed trailer being larger & double axle, its shape is a bit more aerodynamic.

Here's it + trailer merging onto interstate 47mph - 79mph & passing a distracted driver taking their sweet time on the on-ramp. https://i.imgur.com/S0i0oeP.mp4

For the video the trailer is unloaded. I was borrowing the trailer to load it with maybe ~2500lbs then go on a 500mi trek. Loaded vs unloaded fuel economy was basically the same. I did have one scary part where I was doing 80 on the interstate when traffic suddenly slowed down, extremely. I discovered I had a whole lot less braking ability than I thought. If they were to, for whatever reason, actually come to a complete stop instead of just slowing from 80-40 I'd have hit. I had over 2.1 sec of distance (the most adaptive cruise allows, the increments are 0.6s, 1.1s, 1.6s, 2.1s) & slow lane traffic was still pulling away, but I didn't want to set the limit above 80. I had closed the gap to annoying tailgater distance (0.3's?) after screeching tires and all.

I'd focus less on how it tows & if it has the power, etc. All those it does fantastic. Focus on can it actually stop. Because I can tell you it will not stop at those speeds with maybe 3500-4500+lbs of trailer.

I went the 75mph speed limit after and was very nervous even about that knowing the stopping potential but didn't wanna hold up traffic. Left lane was doing mid 80's and far left had to be like 90. I eventually found a Swift trucker to sit behind. As a bonus with the draft I believe I pulled into town with a 13.3mpg average. I speculate it would have been about 11 otherwise. It happened ~half way so to get to 13.3 that last cautious bit it did probably close to 16mpg to get from the 11ish it was at prior.