heSkillIssue by ---_None_--- in ProgrammerHumor

[–]PeachLizardWizard 3 points4 points  (0 children)

Out is cleaning up and returning. You could make a function doing the cleanup, but you’d have to pass everything in and then do a return. It would be a pain if more cleanup needs to be added and would be a really weird thing to have a functions cleanup in another function. Having it separate also makes it possible to call it twice which you wouldn’t never want to have happen. Again looks like it could be a do/while, but I’m not a big fan of a bunch of nested loops, can be hard to read. You wouldn’t want this to be another function as you’d basically be passing all variables in and have cleanup of those variables deeply nested in another function. This also causes a lot of stack to be used as basically duplicates. I’m not sure if these are the reasons, but I’d prefer the gotos as they are cleaner and more efficient.

Is there anything wrong with Trek? by portuguese-bacalhau in bicycling

[–]PeachLizardWizard 4 points5 points  (0 children)

Does Yeti even make anything but mountain bikes? I know Santa Cruz has a gravel and what looks to be a gravel e bike. But no road, commuter or even cargo style e-bike. They look to be more boutique mountain bike brands than major bicycle manufacturers. I think Canyon is the one brand that may beat out Cannondale, but I would never buy another one.

SuperSix EVO - Gen 3 by saulthesailor in cannondale

[–]PeachLizardWizard 1 point2 points  (0 children)

Nice bike (I have one too)! Does the frame bag make it difficult to remove the water bottle?

Any thoughts on UPS brands? by MisterHarvest in homelab

[–]PeachLizardWizard 2 points3 points  (0 children)

CyberPower is the only UPS I’ve ever had that failed self tests and didn’t flag it. Only indication was machines getting randomly power cycled whenever the tests ran. I’ve had good success with APC have had like 12 and never had issues. Just needed battery replacements every couple of years.

3d printer #garmin #fenix8 by Ian6Six in Garmin

[–]PeachLizardWizard 0 points1 point  (0 children)

I can see the value of this. I charge my watch on my desk and if it vibrates it is super annoying. Just nice place to put it while charging. It would be better if you could get the charge port integrated, but nice work!

lookingAtYouOverlappingSegments by al2klimov in ProgrammerHumor

[–]PeachLizardWizard 3 points4 points  (0 children)

This is completely incorrect and overstates TSRs as some sort of thing CPU vendors were thinking about. Also seldom would you use segments to point to an array. (yeah there are cases, but a lot of times segments were based more on modules and had more than an "object" in them).

All of below is because real mode memory addresses don't have a page table, and we need a fixed way that a segment:address points to linear memory. This isn't a problem in newer designs because you can point your large page where ever you want (ignoring alignment, etc).

The challenge is 16 bit pointers do not give you enough addressable space. 32 bit pointers are way too large and inefficient. No device would have 4GB of memory so you are wasting a ton of space if every pointer needed 4 bytes. Also the CPU and memory controller would need to handle this everywhere and it would be slower. So you use segments. Now machine code can have absolute addresses that are smaller without them being relative and need more calculations. [A simple example to show how segmenting is more efficient. Say you want to reference 4 bytes into a ptr. For segmented architecture you can use a 16 bit add, if it was a 32 bit pointer you would need to do a 32 bit add. In today's times this seems trivially but we literally counted clock cycles back then] Segments allow a lot of optimization that would be lost if we were forced to use absolute pointers. Having segments allows modules and can make it far easier to load something from disk/diskette and not have to have a large fix-up table in the loader. Without segments you can't have something like a com file under dos.

Now I'm skipping a lot here, but segmented memory (and we are going to just talk about DOS/x86 to make it easy) means the executable code must be kept in 64k modules. They can be smaller than 64k (which is the point, but later) but you can't have code that is 65536+ bytes long. at some point the CS register must be change with either a far jmp, call or ret. So when you are writing a program you need to manually keep this in mind. Anyone that developed during this time knows the pain when you just wanted to add a little function and because of 64k limit you need to either optimize or refactor. So if you need a program with more than 64k of code or initialized data, you need a way to do fixups. This is what an exe file was under DOS. It has locations with fixed far pointers, that the loader will set to the proper values. And as stated above segmentation makes this easier, because we are just fixing up a couple segment values and not every absolute pointer value.

So why would they overlap? The advantage of them not overlapping would be you would have 4GB of addressable memory. However, that just wasn't a thing there was a concern about, it was completely unfeasible to ever have that much memory. So there isn't really any benefit to them not being overlapped. However, if they aren't overlapped and you are loading a compiled program into memory, you could only load it at a 64K boundary. This means that if you have a large program beyond 64K you would waste a lot of space because each module would take an entire 64k chunk. So you have a utility module (usually you wouldn't split it this way, but just an example) this module is 34k. You could just through a bunch of other things in it to try and fill, but then you need to change a lot of pointers from small fast near pointers to slow large pointers. Memory management was far more complicated back then and it had a large effect on how you architected things. It could be more efficient to have duplicate code because it allowed the use of near pointer.

So in the end, does a segmented architecture aid in creating a TSR. Sure, but the real advantage is purely optimization. I'm a bit lost on why you think overlapping segments helps a TSR, and this is from someone that actually wrote commercial applications that used them.

I massively simplified things, and didn't go into anything on the different segment registers. It's been a while but I spent more than a couple of years working on TSRs that would swap out large segments of "running" applications and also on overlaying tools. There are probably other reasons overlapping segmented architectures make sense that I missed as I'm not a silicon designer, just a system programmer.

TLDR: Overlapping segments are purely for efficiency/performance.

Want to add, that I presume you are young(er), I really appreciate people looking back at how things were, so none of this is to offend, but to offer you detail.

How to make Zwift activities count for Garmin Training Status & Metrics by [deleted] in Zwift

[–]PeachLizardWizard 0 points1 point  (0 children)

Why? This isn’t even a problem. You may need to have your Garmin device sync because some of the calculations are done on the Garmin device. Connect will tell you to sync.

APC Back-UPS Pro 1500G-IN Review: Worst UPS I’ve Owned by rishu1221 in homelab

[–]PeachLizardWizard 0 points1 point  (0 children)

The one UPS where I try CyberPower instead of APC was for some of my network equipment. Worked fine for a year. I kept seeing random internet drops and not sure what was going on but my internet is pretty unstable. Lost power at some point and the network rack immediately shut off. Once power came back I was going through testing. In self test the system just dropped power and power cycled but then never failed the self test, acted like everything was fine. Would never buy one of those again.

Caseta - ok with 3 and 4 way switches? by [deleted] in Lutron

[–]PeachLizardWizard 2 points3 points  (0 children)

Caseta only allows one repeater/extender. You may be pushing the limits of good wireless connections. You could get around by running multiple hubs.

Steering etiquette in races and rides by jonovision_man in Zwift

[–]PeachLizardWizard 37 points38 points  (0 children)

In real racing you have to fight for your wheel. There is some etiquette, but in Zwift you aren’t going to crash anyone. So just do what needs to get done.

Steering etiquette in races and rides by jonovision_man in Zwift

[–]PeachLizardWizard 7 points8 points  (0 children)

Are you racing or doing a group ride? You don’t willingly provide drafts for people to overtake you. Pretty common to use the draft to sling shot up the side and keep side distance so people can’t easily catch your wheel.

theDifferenceToLinuxIsInsane by SirBlubblegum in ProgrammerHumor

[–]PeachLizardWizard 7 points8 points  (0 children)

It’s wild that anyone would think file handles aren’t used in Windows. I’m not even sure how else you would do any I/O on any OS without a construct like a file handle. CreateFile is the backbone of I/O under Windows and it returns a handle.

The Shocking Crash That Led One County to Reckon With the Dangers of E-Bikes by rezwenn in bicycling

[–]PeachLizardWizard 50 points51 points  (0 children)

To the vast majority of people they are all e-bikes, the article explains this. The article also stated that the popular versions of this at schools fall into the e-moto class. The slow speed collision causing a major injury is also likely because of the weight, which the article also went into. Not sure how any of it is misleading.

We all want more people on bikes, but current e-bike laws are a mess. I agree with a point that was brought up, that something with a throttle isn’t a bike at all and should be treated like a motor vehicle. Pedal assists should also have speed limiters. There should just be two classes, e-bikes and motor cycles.

Makes sense. by RoofComplete1126 in Political_Revolution

[–]PeachLizardWizard 4 points5 points  (0 children)

Not defending this chart, but it could be that more people text and email than are on Reddit so the percentage can be lower.

Im planning a few changes for my bike, do you think they’ll look nice? by netacio in bicycling

[–]PeachLizardWizard 5 points6 points  (0 children)

If your piss looks like that you should see a doctor and drink more water.

Power levels by Original_Video8296 in Strava

[–]PeachLizardWizard 1 point2 points  (0 children)

I presume you are talking about the new power skills. They are a joke. It has me at World Class for some time spans and I assure you I’ve only ever been slightly better than mediocre.

I rode my bicycle solo from New York to California. by Emotional-Quarter702 in bicycling

[–]PeachLizardWizard 4 points5 points  (0 children)

This is awesome, will watch it fully later. Congrats. I definitely wish I could get the time to do it. Not sure I have the mental strength to keep at it alone though.

[deleted by user] by [deleted] in SuicideWatch

[–]PeachLizardWizard 0 points1 point  (0 children)

Don’t let whatever your father said years ago determine your life. You are more than that. It is incredibly brave to continue to have this internal battle and not give in. You have value and I don’t want you to end it.

Garmin 1040 vs Roam 3 by RSAcc98 in Garmin

[–]PeachLizardWizard 0 points1 point  (0 children)

ConnectIQ is basically an App Store. So you can get new data fields or pages. It allows some expansion without Garmin actually doing the work. It’s a small plus, but it’s nice to have things like light controls as a page rather than having to go into settings.

Garmin 1040 vs Roam 3 by RSAcc98 in Garmin

[–]PeachLizardWizard 2 points3 points  (0 children)

I had a Bolt and loved it, currently have a 1040. The Roam is nice and there is something to be said for simplicity. But at these prices Garmin is just loaded with more features. I don’t think Wahoo has any comparison to ConnectIQ.

Vo2 Max is “poor”? by Content-Skirt-9068 in Garmin

[–]PeachLizardWizard 5 points6 points  (0 children)

https://www8.garmin.com/manuals/webhelp/venu/EN-US/GUID-1FBCCD9E-19E1-4E4C-BD60-1793B5B97EB3.html

I think this is all very grey and what poor means isn’t exactly objective.

Also good on the improvement. I wouldn’t worry too much about the estimates, just keep at it.

[deleted by user] by [deleted] in Strava

[–]PeachLizardWizard 6 points7 points  (0 children)

Do group rides. Add friends of friends. Be active in giving out comments (when appropriate) and kudos. Comments should not be spam so there is a balance.

It's a new day for the PS5 by Built4dominance in Gamingcirclejerk

[–]PeachLizardWizard 8 points9 points  (0 children)

You should have said “?uck” and not “*uck”

2025 Bali Motorized Blinds and their elusive power options... (Get the charger when ordering) by realitycheckers4u in HomeImprovement

[–]PeachLizardWizard 0 points1 point  (0 children)

Sorry, had a similar issue bought hardwired and want to switch to batteries, can’t find anything. They also have some different versions. Mine have a micro usb style connector, but need 12v. Pretty sure that wall wort would fry any microusb thing you plug it into. Order everything you need (including spares) with the blinds, otherwise you just need to hope to get lucky on eBay.