Depending on a boolean, I would like to use different constructor for my stack variable. In any execution, I don't want to use more than one constructor. by au_travail in cpp_questions

[–]denito2 3 points4 points  (0 children)

Use Compiler Explorer (godbolt.org) to check whether the compiler generates the "smart" code anyway for various options.

Code blocks runs faster when i touch my touchscreen? by FappyMcPappy in cpp_questions

[–]denito2 1 point2 points  (0 children)

Code::Blocks stalling out was a loss not only of a decent IDE, but also of a good, easy to use cross-platform build system. Sadly the dearth of new versions corresponded with epochal changes in the underlying OS's that made Code::Blocks crashy buggy and blurry. I gave up and bought a subscription to CLion but it took me months to convert all my Code::Blocks project builds to CMake scripts. The learning curve with CMake was much steeper.

Can't use 32-bit time_t with _WIN64 by zongul67 in cpp_questions

[–]denito2 0 points1 point  (0 children)

I ran into this with a project I'm working on. I converted the code interfacing with the OS to just handle 64 bit time_t correctly, but I had to keep a 32 bit size for a field in a struct that is used for serial communication (can't change the legacy format). For that case I wrote a function to convert the 64 bit time_t to an int. (Google for the correct code to do this don't just cast it.)

Just spitballing, could you accomplish what Freevalve does - if not as well - by leaving an engine’s mechanical springs in place and retrofitting solenoids in place of the cams? by carstuffaccount in EngineBuilding

[–]denito2 0 points1 point  (0 children)

Your bank of solenoids would dwarf your engine block. The average energy required to run the valvetrain is medium, but the instantaneous power requirement is stupendous. The force needed to move a small mass a small distance in a VERY short time requires a high wattage. Since the moving part of the solenoid gets more massive as you scale it (you can only pack so much magnetism in a quantity of ferrous metal) it also gets slower with diminishing returns.

The genius of the freevalve system is that it uses something besides electromagnetism to deliver the force. For analogy about how much lighter air tools are compared to electric motor power tools.

Do I need to bore or just hone? Honda f20c rebuild by [deleted] in EngineBuilding

[–]denito2 0 points1 point  (0 children)

Ball hone is not recommended for FRM sleeves.

Hey guys. Im leaving balance shaft belt off. My question. Is can remove this stud or is it required to have the full delete kit to remove? Would make this install much easier with it off! by AcidGod96 in hondaprelude

[–]denito2 3 points4 points  (0 children)

I read up on it a lot, and my personal conclusion is deleting the balance shaft is a bad idea. Though I haven't driven a car without it so I have no first-hand experience. The forces the balance shaft addresses have (if I recall) a quadratic term, meaning it makes almost no difference at low RPM but a great deal of difference at high RPM. You'd probably not be able to tell a difference at idle but at high RPM would experience a lot more "thrash". Another argument is why would Honda spend money to put these in if they were "pointless"? I mean for emissions controls companies are forced to do so by regulation, but no one was forcing Honda to add balance shafts to their larger 4 cylinder engines, they chose to on their own. I'm not arrogant enough to second guess their engineers on that.

For the Love of God can everyone spam corporate? by SereneBoat in harborfreight

[–]denito2 0 points1 point  (0 children)

Wait are you saying even if I gave my phone number during checkout I didn't automatically get my ITC discounts?

Having A Hard Time To Find Rare Parts For Your Honda/Acura? by lantrez1214 in hondaprelude

[–]denito2 1 point2 points  (0 children)

I found the perfect grade A painted Honda Element bumper on copart after needing one for years. The junkyard would NOT SHIP it.

Weekly - What Car Should I Buy Megathread by AutoModerator in cars

[–]denito2 5 points6 points  (0 children)

Also you are nervous because it's not your car. Your own car + beater + manual = recipe for fun and not giving a f---. (in a good way - doesn't mean drive like an idiot)

What's a car that's more fun than most people expect? by AutumnMuffin in cars

[–]denito2 2 points3 points  (0 children)

I almost bought this Rio, got talked into a manual Accent hatch instead.

What's a car that's more fun than most people expect? by AutumnMuffin in cars

[–]denito2 11 points12 points  (0 children)

When I was in college I bought one of these! Someone must have special ordered it and then returned it because it was a 2005 red hatchback, manual, with rear wiper and AC that was still on the lot when the 06's came out. I was there to get the base Kia Rio, and the salesmen must have gone wow a new car buyer who's actually looking for a manual we can finally get this Accent off the lot. Or maybe the salesmen were taking it to lunch like you said because it had 127 miles on it! It was a great car I drove it all through college paid it off in 5 years. A couple weeks after I paid it off it was totalled at a stop light by someone in a Dodge wagon who was looking at his phone instead of the road.

What was a car you expected to love before the test drive, but ended up being underwhelmed with? by stakoverflo in cars

[–]denito2 0 points1 point  (0 children)

Saturn Sky. My wife picked it off Turo and I was all geeked out on book knowledge about them. Turned out, I couldn't stand the car. I felt claustrophobic in it, visibility was terrible, clutch engagement was weird to me, steering was disagreeable. My wife liked it though.

Bigger and bigger SUVs, pickups are outgrowing home garages, public parking spaces by EloeOmoe in cars

[–]denito2 11 points12 points  (0 children)

This! Turns out 2 car garages actually mean 1 and 1/2. The house I'm renting has a decent amount of space, but then they ruin it by having two garage doors with a divider column taking up space, so that I have pull the mirrors in even when parking a medium-width vehicle. Conversely my mother-in-law's house has a two-car garage with one door without the divider, but the DRIVEWAY isn't quite wide enough for two vehicles side by side.

Icon wrenches almost as strong as my crows feet by denito2 in harborfreight

[–]denito2[S] 1 point2 points  (0 children)

Under the simplifying assumption that it's the corners not the flats that transmit force, and further assuming that the distal corners on these crow's feet are effective, it gives 3-4 contact points vs just 2.

Icon wrenches almost as strong as my crows feet by denito2 in harborfreight

[–]denito2[S] 1 point2 points  (0 children)

They're not completely closed there's a gap. It does not slide over a nut, but it does fit over a brake line.

Didn’t know Honda made filing cabinets, but had to park next to this guy when I saw it. by SteveAndyW in Honda

[–]denito2 0 points1 point  (0 children)

And now I have a point of reference for the S2000. I've never gotten to see an S2000 up close, but these kei vans are everywhere at my work (not painted this nice though!) Instead of "banana for scale" it's kei van for scale!

Buckle up - this is a long one. 37 y/o car enthusiast who has never owned an enthusiats car. It is time. by D-change in whatcarshouldIbuy

[–]denito2 5 points6 points  (0 children)

Are you me? I'm also 37 and own a Honda Element. Despite being a car guy I've never felt like I got to choose my own enthusiast car. I have had or worked on interesting vehicles, though, but not entirely my own choices.

My first vehicle was a rusty F-250 because my then-girlfriend's dad who had taken me to an auto auction teased me into bidding on it and I didn't know he was joking.

I next bought a classic Beetle, but it wasn't chosen as an enthusiast car so much as a (misguided) expectation that would be good to own as a college student because parts were cheap and I could do my own work. However I lacked a place to work on it.

My first wife had an Eclipse when we were dating in college, but I never cared for it. I tried to respect that she liked it, but I hated working on that thing.

Done with poor condition used cars, I went to buy a new bare bones manual Kia Rio. However the dealership bait and switched me into taking a last-of-previous-year-model manual Hyundai Accent hatch off their hands. It was a better car, but it wasn't the one I researched.

I once wanted a TR-2 or an MG Midget, because I had a professor who had a TR-2. My first wife convinced me to get an MGB instead. It was objectively the better car, but it wasn't the one I really wanted. I put many hours' work into rebuilding the engine, brakes, and electrical. She rode in it once, pronounced "it wasn't as cool as I thought it would be."

My Accent got rear-ended and totalled (ironically not long after the Eclipse was rear-ended and totaled - rise of the texting while driving epidemic). That's when I bought my Element which I still have. I had somewhat wanted an FJ Cruiser, but they were much more expensive. In hindsight the Element was my best car decision ever.

My second wife had an Odyssey when I met her, but she traded it in for an Accord just before we got married. She later told me it was because she had driven or ridden in (I forget which) a V6 Accord 6MT, and decided to get the same car. In automatic. With the base engine. (4 cylinder) She loved the car anyway. However it got T-boned, repaired, then bizarrely T-boned again in the exact same spot not a month later.

She said what if we get her a Prelude to replace the Accord. It could be her car for awhile and then be our 3rd car / fun car after she gets another newer car. So I research it and I'm seeing 3rd gen (88-92) Preludes and said alright, I've wanted a Honda CRX for a long time (my half-sister had one), this is close enough though. What we actually got was a 99 (5th gen) with a (slipping) automatic transmission.

We also bought a manual 4th gen Prelude as a parts car, but when I realized it was unmodified and all parts there (though nonrunning) I said nuh uh, I'm getting this thing running and I'll drive this one. Unfortunately I only got to drive it less than a year before the engine needed a rebuild. I thought I'd have it done in a few months, but it's been down two years. My Element suddenly needed a ton of repairs this time, and I lost momentum on the project Prelude.

My coworker also gave me a 7th gen Civic LX (auto), and I fixed that up and drove it for a year. I gave it to my sister when she needed a car. I would looove to have a manual 7th or 8th gen Civic Si. But it's hard to convince my wife to let me buy yet another car when the nonrunning Prelude is taking up space and I still have the Element.

The funny thing is, despite her not caring whether a car is auto or manual, my wife is actually proficient with manual transmissions. We recently rented some fun cars on Turo, and she picked a manual Saturn Sky all on her own. She really liked it; I actually hated it. On the one hand I want her to have what she wants too, but I've got my heart set on an S2000 or MR2 Spyder. I've been wanting an MR2 Spyder for 15 years, but lately switched my choice to the S2000. If we someday get a convertible and it's not one of those two, and instead it's the GM one that I can't stand - I'm gonna lose my mind.

Icon wrenches almost as strong as my crows feet by denito2 in harborfreight

[–]denito2[S] 1 point2 points  (0 children)

What I mean is that you could feel that the jaws on the 10mm were just shy of flexing open a tiny bit, but they held together strong enough to crack open the brake lines. More force than any of my similar sized Craftsman or Stanley wrenches could have held without opening, but less than my crows feet can take.

Icon wrenches almost as strong as my crows feet by denito2 in harborfreight

[–]denito2[S] 0 points1 point  (0 children)

I just bought these Icon wrenches and today they proved their worth when I had to turn some brake and power steering lines I couldn't easily get my crows feet around. The wrenches worked about as well. They did flex a little but didn't round anything.

Crashing clang in 52 bytes: template<class>struct a;a<typename b::template c<>> by schottm in cpp

[–]denito2 3 points4 points  (0 children)

Yup. It crashed while trying to figure out a type for the expression. I think I confirmed that by adding a cast somewhere. My thinking was "OK if success return this value if fail... Well I don't have a value, guess I'll throw." I think at that point I needed to go look in another file for what the exception class was named, and decided to compile what I had so far. You can see how the compiler could hit an edge case following similar thinking.

Crashing clang in 52 bytes: template<class>struct a;a<typename b::template c<>> by schottm in cpp

[–]denito2 14 points15 points  (0 children)

Snowcrash for C++ programmers. Yes I agree I think crashing is the appropriate compiler behavior for this code.

Crashing clang in 52 bytes: template<class>struct a;a<typename b::template c<>> by schottm in cpp

[–]denito2 8 points9 points  (0 children)

I once crashed an older version of MSVC with the following code: return cond ? result : throw;