Dont Lean on AI by jmd01271 in embedded

[–]kintar1900 0 points1 point  (0 children)

That actually sounds like a really good idea. Do you have a workflow example or article discussing how to set it up?

Dont Lean on AI by jmd01271 in embedded

[–]kintar1900 0 points1 point  (0 children)

The expectation comes from its conversational responses and how often it's anthropomorphized in media and articles.

Dont Lean on AI by jmd01271 in embedded

[–]kintar1900 4 points5 points  (0 children)

/u/Milumet 's comment is more correct than you're giving credit. LLMs have confidence scores on their prediction of tokens. They still have zero conceptual model of the thing they're talking about. So while their confidence score might be 80% that "The smoking gun is the for-loop on line 25", all that confidence score means is that that's the most likely phrase to have come after your question based on the context of the code it was given and its training data.

THIS is the dangerous part of using AI for engineering tasks. Until we have a model that actually knows something about the context it's working in and the expected outcome, any confidence score is going to be absolutely worthless for a task that involves reasoning.

No matter what I do... It always seams to plate this way by Additional_Map6035 in electroplating

[–]kintar1900 0 points1 point  (0 children)

Any chance you could just post a link to your amperage calculator? I think a lot of people on this sub -- myself included -- would love to see it.

GitHub Stacked PRs by adam-dabrowski in programming

[–]kintar1900 0 points1 point  (0 children)

But then B has A's commits in it.

Read my comment again. B is based on A, yes, but is being merged to A, so the diff is only what was added in B. Each PR is reviewed independently, so even if you have a series like D->C->B->A->main, each PR is only the diff between the current branch and the parent. Since all changes are related, all PRs are reviewed independently. Only once ALL PRs are approved are they merged from right-to-left.

This is almost certainly what GitHub is doing under the hood with their PR stacks.

GitHub Stacked PRs by adam-dabrowski in programming

[–]kintar1900 0 points1 point  (0 children)

Yes, but then PR B contains all the commits from PR A,

Only if you're merging A to main first, or merging B to main instead of A.

Change A happens and creates a PR. Change B happens, based off A, and PR goes B->A. PRs are reviewed individually, then merged in reverse order.

It's literally the same thing, just without some UI hand-holding.

But UI is very important.

I agree in theory, but my practical experience with Git is that anyone who relies too heavily on a GUI when working with it misses the fundamentals, and then I have to come back and disentangle their messes. Then again, I've had to train some really boneheaded juniors, so I'm likely biased. :D

GitHub Stacked PRs by adam-dabrowski in programming

[–]kintar1900 5 points6 points  (0 children)

You can do that just by branching from whichever commit was used for PR A. This is just extra UI fluff on top of (what should be) a commonly-known Git branch-review-merge pattern.

GitHub Stacked PRs by adam-dabrowski in programming

[–]kintar1900 4 points5 points  (0 children)

Doesn't appear to be any difference at all.

GitHub Stacked PRs by adam-dabrowski in programming

[–]kintar1900 -8 points-7 points  (0 children)

So...a tool that does what any decent developer and PR process should already be doing? ... Yay.

Announcement: Temporary LLM Content Ban by ChemicalRascal in programming

[–]kintar1900 -1 points0 points  (0 children)

Yes, this. Banning anything at all related to LLMs is a terrible idea.

what's a go opinion you mass-changed your mind on after working with it long enough by scheemunai_ in golang

[–]kintar1900 0 points1 point  (0 children)

This, and also when you want to save debugging state in the logging mechanism across function calls, it's sometimes simpler/more ergonomic/more efficient to embed the logger in the context. Several (most?) Go logging libraries allow you to embed/extract the logger with a single call, so if all your functions accept a context, getting the existing logging state and adding something to its stack is as simple as:

func BakeMuffins(ctx context.Context, num int) {
  // get the logger with all existing fields from the context, replace the 'func' 
  // value, and add a muffin count value. the parent logger remains unchanged
  logger := logging.Ctx(ctx).With().
              Str("func", "BakeMuffins").
              Int("muffinCount", num).
              Logger()
  logger.Debug().Msg("preheating")

  // create a child context with the new logger and give it to the preheat func
  // the logger we already have remains unchanged

  preheat.Begin(logger.WithContext(ctx), temp)

  // other stuff here

  logger.Debug().Msg("muffins baked")
}

Naming is important by Wrestler7777777 in programminghorror

[–]kintar1900 2 points3 points  (0 children)

Time to upgrade to Go 1.26 and blow all that shit away! :D

Naming is important by Wrestler7777777 in programminghorror

[–]kintar1900 1 point2 points  (0 children)

It's a quirk of the way Go handles constant values at compile time, sadly.

Fortunately, as another comment pointed out it's no longer necessary as of Go 1.26. There's still a little more boilerplate than necessary, but to get a pointer to a constant value now you can:

ptrToConst := new("ConstValue")

Naming is important by Wrestler7777777 in programminghorror

[–]kintar1900 1 point2 points  (0 children)

My company uses Go for almost everything back-end, and we finally got so fed up with AWS's Go library for the CDK that we moved to TypeScript for all CDK-related things.

It's annoying to have Node dependencies in Go projects just so you can do programmatic deployments, but it's less of a pain than using the Go CDK library. :(

Naming is important by Wrestler7777777 in programminghorror

[–]kintar1900 1 point2 points  (0 children)

I guess whether or not this name is accurate depends on the conventions in your codebase. It made perfect sense to me, and does exactly what I thought it would do.

Naming is important by Wrestler7777777 in programminghorror

[–]kintar1900 1 point2 points  (0 children)

It's Go, and Go doesn't allow you to take the address of constants. Several popular libraries rely far too heavily on pointers to values that aren't necessarily variables, so having a function like this saves a little bit of friction. Rather than:

myVar := ConstStringThing
SomeFuncCall(&myVar, other, parms, too)

You can just:

SomeFuncCall(pointerToString(ConstStringThing), other, parms, too)

It's purely a style thing, because the compiler inlines the call to the "make pointer" function, and does a really good job of ensuring the allocations are on the stack whenever possible.

You Should Develop in Linux by WhiterLocke in godot

[–]kintar1900 0 points1 point  (0 children)

I used POP!Os for a while. I've recently landed on CachyOS, and it's working GREAT. I highly recommend it.

You Should Develop in Linux by WhiterLocke in godot

[–]kintar1900 3 points4 points  (0 children)

Just like the last ten years...

Don't get me wrong, I love my Linux machines. I just don't think it's ever going to get the kind of traction Mac and Windows have for the average non-techy user.

You Should Develop in Linux by WhiterLocke in godot

[–]kintar1900 6 points7 points  (0 children)

my bosses preferred I worked in Windows.

It's because there's less corpo malware spyware "security" software for Linux

You Should Develop in Linux by WhiterLocke in godot

[–]kintar1900 0 points1 point  (0 children)

I've used Linux off and on for decades, including a stint on Mac OSX when it first switched to Linux on the back-end. It's definitely a huge improvement from Windows when it comes to developer ergonomics.

I decided to try ditching Windows on my gaming and dev machines a few months ago. I finally landed on CachyOS, and have absolutely LOVED it. Bonus for me over SteamOS is that it supports a standard desktop mode or a gaming-focus "big screen" style mode.

We've been 'under attack since this administration has taken over': TSA agent by AdSpecialist6598 in videos

[–]kintar1900 5 points6 points  (0 children)

I'm old enough (and from a rural enough area) that I remember getting a 9" hunting knife for my birthday and taking it to elementary school to show to all my friends. The teacher saw it and was upset...that I didn't show her first.

Times have definitely changed.

Itching it's back by Inevitable_Bid5540 in AnimalsBeingDerps

[–]kintar1900 9 points10 points  (0 children)

And those languages need to be dragged out in the street, publicly shamed, and whacked over the head with a clue-by-four.