[-] CameronDev@programming.dev 2 points 2 hours ago

That's fair enough, and a good way to learn. Still, in this day and age with Claude etc, I respect the effort you're putting in.

In the interests of proposing alternatives, you could also make the pin list a global variable. I'll let you work out why its a bad idea though :)

[-] CameronDev@programming.dev 2 points 3 hours ago

Pass the history array into your new function via a pointer.

I don't know what you mean by "without researching", but that is a very hardcore way to learn C. Respect!

[-] CameronDev@programming.dev 5 points 7 hours ago* (last edited 7 hours ago)

Looks at us, doing self care :D

[-] CameronDev@programming.dev 2 points 7 hours ago

Or norovirus, or covid or...

Its definitely whataboutism, but I think its important to keep things in perspective. A couple percent efficiency improvement across the global shipping industry would near enough offset the entire cruise industry, and I'd prefer that efforts were focused there.

Just existing produces carbon, and I'd rather people spend carbon on travel and broadening their minds instead of running a 4th fridge like my mate... If only it were that simple...

[-] CameronDev@programming.dev 18 points 9 hours ago

You've posted nothing meaningful at all.

[-] CameronDev@programming.dev 3 points 12 hours ago

Its the Australia version of a truck.

[-] CameronDev@programming.dev 2 points 1 day ago

This feels like a nonissue. There are dozens of ways an untrustworthy repo can cause code execution, from this to build.rs.

Expecting Claude to list every possible risk is a bit silly.

[-] CameronDev@programming.dev 2 points 1 day ago* (last edited 1 day ago)

The else is definitely not needed, you can delete it.

As for the best way to climb out of a nested loop, this is one of the occasions that a goto is reasonable. The jump would be relatively short and localised, which is exactly what GOTO should be used for:

What's with the getchars slapped everywhere? I think its an attempt to flush stdin, but I think you need to do it repeatedly until you hit a newline or EOF.

I think your next step is to refactor the code into some functions, you have two nearly identical code sections for adding a new pin, you can make that a function and simplify it.

[-] CameronDev@programming.dev 4 points 1 day ago

I am actually surprised its that high, there aren't many cruise lines, and they don't have that many boats. I would have guessed <100.

[-] CameronDev@programming.dev 10 points 1 day ago

There are ~370 cruise ships currently: https://cruisemarketwatch.com/capacity/

There are ~100000 cargo ships. https://www.virtuemarine.nl/post/top-maritime-nations-largest-fleets-worldwide

Cruise ships certainly aren't great, but they are a rounding error, not a significant driving force.

[-] CameronDev@programming.dev 6 points 1 day ago* (last edited 18 hours ago)

Its a kernel exploit, so probably. But I just checked my arch installs,and I don't have any of the kernel modules loaded. ~~Loading requires root anyway, so I think this may be fairly limited in reality?~~

Edit: seems the modules get loaded automatically :(

31

Hi All, I have a Sony A9, which I have been using for Aurora photography. The last time I went out, I shot at 6400iso, 2s exposures, and nearly all of the photos I got have a ton of "stuck" pixels. See the video, skip halfway in, and look at the rocks in the bottom right.

I have had a play with the the camera with the lens cap on, and at low isos, there are no stuck pixels, it's only once I go past 640 (the second iso range) that the issue appears. Has anyone seen this kind of thing before? Is it repairable? I'm guessing most of you shoot at iso100, but for aurora it was nice to get the shorter shutter speeds.

12

I made this to help my partner with her WFH setup.

Some of her cameras will over-expose when left on auto, and the settings to tweak the exposure aren't super easy to get to.

With this tool, we have bound the spare knobs on her macropad (https://www.aliexpress.com/item/1005003500083583.html) to increase/decrease the exposure easily.

Disclosure: I used AI for the initial draft of the Windows api, and also to generate the README. Both have been manually reviewed and extensively refactored, although I am sure that there are some AI-isms that I probably missed (or accepted).

35

Congrats to everyone who took part, and thank you to everyone who contributed here, in the solutions and visualization threads.

If anyone knows of a similar event that runs during the year, please do reach out, I would be happy to run more events like this.

Happy new year!

39
Yearly firework tradition (programming.dev)

Every year, I grab my camera and head out to try take a photo of a firework. Every year I get a blurry mess of poorly exposed photos. This is the best one I got this year.

33
0
submitted 4 months ago* (last edited 4 months ago) by CameronDev@programming.dev to c/openwrt@lemdro.id

Hi all, I have a Netgear D7800 that I have run openwrt on for a long time. Does anyone else have one (or similar) and how do I get sysupgrades working? They error out when I upload a sysupgrade image, with an error about unsupported partition layout.

But as far as I can tell, I have a v2.0 layout, as I flashed a factory openwrt image manually. Is sysupgrade just not supported at all anymore (and if so, why do the images still exist?), or do I need to do something to reenable it?

16
Merry Christmas! (programming.dev)

Just letting everyone know that I'll post the final leaderboard new years day, so get your final solves in over the new few days!

14

Day 12: Christmas Tree Farm

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

16

Day 11: Reactor

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

13

Day 10: Factory

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

18

Day 9: Movie Theater

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

21

Day 8: Playground

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

view more: next โ€บ

CameronDev

0 post score
0 comment score
joined 2 years ago
MODERATOR OF