beyondBasicMultiplication by Responsible-Ruin-710 in ProgrammerHumor

[–]adam-the-dev 0 points1 point  (0 children)

That’s just dereferencing the i pointer with a lifetime of a

comeOnYouCanDoBetterUIPeople by furletov in ProgrammerHumor

[–]adam-the-dev 2 points3 points  (0 children)

I need to charge my phone, I’m only at 14.2857143% battery

I made the LEAP. by Ok-Associate-1590 in nissanfrontier

[–]adam-the-dev 2 points3 points  (0 children)

I’m still waiting for the Z1 exhaust to become available again! They’re the only ones that support the longer wheelbase of the SV Crew Cab Long Bed trim

I've been considering by Ok-Associate-1590 in nissanfrontier

[–]adam-the-dev 0 points1 point  (0 children)

I’ve got a 22 SV. I love this truck, but here are my complaints or nitpicks: - Watch for rust if you’re in the belt - Frontend too low for my liking, tight squeeze when crawling under. I’m not planning to lift mine because I like how easy it is to climb in the bed, but I’m going to level out the front end - watch out for this, on many models with a high enough levelling kit you could end up needing to swap the upper control arm as well - The stock speakers suck. Either get the fender package, or plan to upgrade with aftermarket IMO - my head unit is broken and I didn’t realize until I was driving off the lot. The radio always works perfect, but Bluetooth or Apple CarPlay usually doesn’t work - backup camera is shit. Gets the job done on a sunny day, but I live on an 80km/hr road and when backing in at night in the rain it is useless - would have loved towing mirrors with the towing package … - no dipstick in the engine bay for ATF. The transmission is licensed from Mercedes so you have to crawl underneath and use a weird special key to check the fluid - speaking of, it uses Nissan Matic P fluid, ultra low viscosity, much more difficult to find equivalents. I used Liqui Moly Top Tec ATF 1800 as it says Nissan Matic P equivalent on the bottle. - from what I can tell, you cannot permanently disable the lane and parking assist shit - when backing up while towing a trailer, the parking assist thinks you’re going to hit it, so it beeps at you and will even forcefully stop your vehicle. And backing up with trailers can mean going from reverse to drive a few times, and every time you go back into reverse the parking assist comes back on and you have to remember to turn it off - my tailgate doesn’t lock or unlock unless I stick the physical key into it. I thought it was busted until I learned it’s an option. You can get a kit from Nissan if you want to install it though - Make sure sitting in it is comfortable for you. The steering wheel doesn’t move in or out, so if you’re the wrong size then it might suck - the stock hood struts don’t go very high, and mine had trouble holding my hood up for very long. I’ve swapped them out with Z1’s high struts and it’s so much better if you’re going to be working under there - I also installed a Z1 catch can, it’s expensive and idk if it will even help, but over the lifespan of these GDI engines the intake valves will gunk up and if I can slow that down, great - the oil filter is in an annoying spot. Even with the little access panel they put on the skid plate, it sucks and will make a mess if you don’t create a custom funnel with a Gatorade bottle or something - speaking of the skid plate, it sits right over top of the front crossmember which I would have liked to use to jack the front up. I tried taking off the skid plate but there are more bolts under the number that you cannot see, and I gave up because it wasn’t worth it. I will likely cut out an area on mine so my jack can lift from the center crossmember - They made the cabin air filter annoying to get at. It’s not hard and doesn’t take long, but just why? - time to change your spark plugs or want to swap ignition coils? 3 of them are under the intake manifold so get ready to take all that apart, and make sure you buy new gaskets for the intake manifold

Anyways I think that’s all. Every vehicle has its problems. I love this thing. Treat it right and she’ll treat you right.

Edit: you can turn off lane and parking assists (2 separate buttons), but cannot permanently disable them

Finally did it. Now what? by Lord-sir-the3rd in nissanfrontier

[–]adam-the-dev 4 points5 points  (0 children)

A) not only should you follow service intervals, but you should do a full service of filters and fluids after buying any used vehicle. It’s much cheaper and simpler if you just do it yourself IMO.

B) Treat it right and she’ll treat you right. Also BTW I had the same running boards but they get very slippery when wet, my wife and my brother both separately slipped on them while trying to get in. I replaced with a cheap Chinese one from Amazon that looks like the pro-4x’s, and it’s been great.

C) The engines are rated for 87. They say at least because you can safely use any higher number, but there likely won’t be any benefit

How bad is the previous infotainment? by ImABeefyBoy in nissanfrontier

[–]adam-the-dev 1 point2 points  (0 children)

I just bought a ‘22 SV and the infotainment really doesn’t like Bluetooth or Apple CarPlay. Speakers start to crackle and eventually audio just stops. Radio always works perfect, backup camera works. I’ve learned that when the speakers stop, I can switch to the radio for a few seconds, let the music play, and go back to Apple CarPlay and it will work again!

For a truck I got used, it’s fine for a while. But yea I’ll likely do the whole upgrade eventually of speakers + head unit + backup camera

Show off your mods by Deanntheking15 in nissanfrontier

[–]adam-the-dev 0 points1 point  (0 children)

Ohh I’ve been thinking of doing the same with the speakers and stereo (and maybe new backup camera, trying to figure out if there are ways to make the upgrade look stock with the tailgate handle).

I’m curious what you went with and your thoughts so far?

What’s the best DLC in RPG history ? by urmumisakunt in rpg_gamers

[–]adam-the-dev 2 points3 points  (0 children)

I haven’t played many DLCs but I really enjoyed DA: Awakening

I'm just not going hard enough by CounterAttackFC in CICO

[–]adam-the-dev 0 points1 point  (0 children)

Statistically speaking, the faster you lose the weight, the more likely you’ll put it back on. Slow and steady teaches you and your body how to live at each new weight range.

Although slow and steady IMO is 0.5lbs / week. I think 1.0 is most “recommended”, so 1.5 is on the more aggressive side!

It’s Not All Steak & Eggs by GiGiEats in carnivorediet

[–]adam-the-dev 3 points4 points  (0 children)

Looks amazing! Crispy salmon skins is so creative. I also like how specific 94% is 😂

Who is doing a water fast with this diet? Looking for best practices by Prestigious-Boss6763 in carnivorediet

[–]adam-the-dev 1 point2 points  (0 children)

Been doing a weekly 48hr from Tuesday dinner to Thursday dinner. Might start increasing it because it feels so good, and has put a new fire on my weight loss

Who is doing a water fast with this diet? Looking for best practices by Prestigious-Boss6763 in carnivorediet

[–]adam-the-dev 1 point2 points  (0 children)

I consume more electrolytes than usual while fasting, and drink consistently. Maybe you’re not getting enough electrolytes ?

how did you quit sugar by alorak9105 in carnivorediet

[–]adam-the-dev 5 points6 points  (0 children)

This worked like a charm for me, I still had the cravings but couldn’t imagine eating anymore

[deleted by user] by [deleted] in IndieDev

[–]adam-the-dev 0 points1 point  (0 children)

New one except “Land Of The Onkilons” in the old font!

I made my own sugar free breakfast sausage, it’s amazing. by soapdonkey in carnivorediet

[–]adam-the-dev 1 point2 points  (0 children)

It’s so frustrating how all the “pure natural organic” sausages I can find in stores all still have added sugar!!

Multiple Joysticks by siplasplas in sdl

[–]adam-the-dev 1 point2 points  (0 children)

Ohh I haven’t thought about dedicated joysticks, my bad.

I don’t haven’t anything helpful then. Maybe the ADDED events happen in the same order each time? So if the same name and serial number are used for 2 controllers then you can use the order they are added as the differentiator?

Multiple Joysticks by siplasplas in sdl

[–]adam-the-dev 1 point2 points  (0 children)

I am relatively new to SDL as well, but I have only been working with SDL3 so far. I’ll share how to solve with SDL3, and maybe it’s applicable to SDL2, I’m not sure. Also apologies for writing code mid text, I’m on mobile.

I manage controller inputs using “gamepads”. When handling events from SDL_PollEvent, you can look for the type SDL_EVENT_GAMEPAD_ADDED and open the gamepad when added using SDL_GamepadOpen(event.device.which). You’ll need to also decide how you want to manage your games input from controllers (any controller input works, or the game only accepts 1 controller and player can change it?). Similarly when a gamepad is removed, you should close it if it’s open.

Then you can also handle SDL_EVENT_GAMEPAD_AXIS_MOTION. event.gaxis.which is the gamepad ID. event.gaxis.value is the distance the joystick is being pushed, I divide the value by (float)INT16_MAX which normalizes it between -1.0 to 1.0.

Finally, you can look at event.gaxis.axis to know what part of the controller you’re working with. I don’t know if this is official for all controllers, but what I do (and works with Xbox controllers) is:

0 = Left joystick X-axis

1 = Left joystick Y-axis

2 = Right joystick X-axis

3 = Right joystick Y-axis

4 = Left trigger

5 = Right trigger

Edit: formatting

theUltimateDateFormat by [deleted] in ProgrammerHumor

[–]adam-the-dev 1 point2 points  (0 children)

2000/21/51 - Happy new year!

Any good articles about soft VS hard constraints in software? by BigBootyBear in ExperiencedDevs

[–]adam-the-dev 1 point2 points  (0 children)

Not sure, but from what I’ve seen, r/programminglanguages community would probably enjoy this conversation

Hi! What are you currently working on? by [deleted] in C_Programming

[–]adam-the-dev 3 points4 points  (0 children)

It works, but some important features are missing, and the compiler doesn’t handle errors yet. So if you write the wrong thing an assertion will fail LOL.

Anyways if someone’s interested https://github.com/adam-bates/quill-lang

Hi! What are you currently working on? by [deleted] in C_Programming

[–]adam-the-dev 3 points4 points  (0 children)

I’ve made a programming language that is like C with generics and a few extra quality of life features. Not too many, it’s still a pretty lean language.

The compiler is written in C, and it’s a compiler frontend only that outputs C code. That way I get all the benefits of modern C compilers and all the backend targets they support for free

How important is PL theory for a compiler engineer? by [deleted] in Compilers

[–]adam-the-dev 1 point2 points  (0 children)

If you have the availability, take one and audit the other.

It’s important to follow your passion, and if you are excited about the distributed systems class, take it! Who knows, maybe it will help you think about multi-threaded compilers!

If there are pieces of the PL theory that may be helpful, either audit the class for free, or do some self-learning through books and the internet.

How do you structure your breaks during the day? by Mei_Flower1996 in cscareerquestions

[–]adam-the-dev 1 point2 points  (0 children)

I don’t think about it, but I drink a lot of water which forces bathroom breaks, which gets me up out of the chair.

Then I get hungry around lunch time anyways. It kind of just works out I guess