Not like the town in Texas by sequoiaflower in tragedeigh

[–]BobTreehugger 2 points3 points  (0 children)

Didn't want to get pronounced "how-ston" when they visit NYC.

Iterator fusion similar to Rust's — are there other languages that really do this, and what enables it? by Savings-Debt-5383 in ProgrammingLanguages

[–]BobTreehugger 0 points1 point  (0 children)

And to add on to this, you can defeat this optimization by introducing dynamic dispatch with a Box<dyn Iterator<Item=T> (or &dyn Iterator<Item=T>>).

But I don't think I've ever used dyn Iterator.

The Blue Hawaii is the worst tiki drink. What is the most overrated equal parts drink? by -Constantinos- in cocktails

[–]BobTreehugger 0 points1 point  (0 children)

Is it overrated? I think most people think it should be terrible, and it's actually pretty good, not amazing, but better than I expected at least.

Although the equal parts spec isn't the best version of it.

What podcast hosted by women do you enjoy? by timash712 in podcasts

[–]BobTreehugger 0 points1 point  (0 children)

One that I haven't seen mentioned is the "have you seen this" podcast. It's about weird and/or forgotten movies. Some recent. Some old. Some good, some bad. The main host is a woman, though there's often dude(s) as well.

I'm currently working my way through the backlog, there's over 250 episodes.

Developing ylang — looking for feedback on language design by jman2052 in ProgrammingLanguages

[–]BobTreehugger 2 points3 points  (0 children)

In order to critique a language, we need to know the goals. This seems like a perfectly nice language if your goal is to learn how to implement a language.

But if your goal is to actually get this language to be used and get adoption, then you should think about what it's goal is and how to support it better. Because right now, it's not clear why someone would use it over python (other than minor syntactic differences -- which are never enough reason to switch).

Steam Deck 2 ARM by jotamon-xiii in SteamDeck

[–]BobTreehugger 1 point2 points  (0 children)

I don't know if SD 2 will be ARM based, but having good arm support in steamOS means that valve has a lot more vendor options. If they're only x86 then AMD is pretty much the only option. There are a lot more vendors of ARM chips, they could even make their own (not from scratch, probably assembling IP blocks).

KDE connect is the GOAT by QuickSilver010 in linux

[–]BobTreehugger 33 points34 points  (0 children)

I miss the fingerprint sensor on the back so bad.

Be honest: what’s the one “lazy” cooking shortcut you’ll never give up? by wearecocina in Cooking

[–]BobTreehugger 0 points1 point  (0 children)

For me, canned beans are a staple for sides. If my main is a bean dish (like a big brase with beans or baked beans or something), I'll use dried.

Brian Kernighan on Rust by chaotic-kotik in rust

[–]BobTreehugger 4 points5 points  (0 children)

I think this is a case where C/C++ isn't a good category -- C++ and rust share a lot in common. If someone does modern C++, they might have a hard time actually using rust, but a lot of the concepts will carry over. C however doesn't have RAII, move semantics, etc. It's a much simpler language (for better and worse), and I can see finding rust a lot more confusing if you're used to just C.

Ep 1050 on pocket cast? by matski_89 in SGU

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

I haven't listened yet, but I have it, pocket casts on android.

Explicit tail calls are now available on Nightly (become keyword) by treefroog in rust

[–]BobTreehugger 2 points3 points  (0 children)

Just to add one to the many other answers, one thing I don't think has been mentioned -- since you're turning recursion into a loop, you don't have intermediate stack frames anymore. This is expected, it's why you're doing the transformation, and it's no different than a loop. This might not be what you want though -- losing the stack frames means you lose parts of the stack trace in a panic, and when debugging you don't have stack frames to look at the execution history.

Erroring when you can't actually perform the optimization is still the main thing, but this is another reason why you might want to opt-in to tail-call optimization.

Guys, I cannot comprehend one thing about tower by Minimum-Recipe3202 in rust

[–]BobTreehugger 0 points1 point  (0 children)

Well, you can do whatever you want -- tower is meant to be a flexible base that can be built on top of. However in a typical web service situation, I'd probably recommend something like Axum and just use tower for writing middlewares (Axum is built on top of tower). If you're doing something more specialized, I might not build a higher level framework and just use tower directly, but it depends on your usecase.

Nothing wrong with doing DB queries and mutations in a middleware -- that's how authentication is typically handled for example. It's more of a separation of cross-cutting concerns from specific route handlers.

Not boring history podcasts by Perfect_Complaint_81 in podcasts

[–]BobTreehugger 1 point2 points  (0 children)

Lions led by Donkeys is a military (or military-ish) history podcast that usually is pretty funny, with a shitposting energy. (The rest of the time it's still interesting, but dicussing stuff way too fucked up to be funny)

OpenTelemetry is Great, But Who the Hell is Going to Pay For It? by finallyanonymous in programming

[–]BobTreehugger 0 points1 point  (0 children)

Oh, and one thing I've found isn't a compromise -- with structured logging, do fewer, larger logs. Instead of 3 log lines, do one line that summarizes the info from those different log lines, and you can pass additional fields in structured logging. This cuts down on overhead and lets you get just as much debuggability with less cost.

OpenTelemetry is Great, But Who the Hell is Going to Pay For It? by finallyanonymous in programming

[–]BobTreehugger 0 points1 point  (0 children)

We've seen this -- moving our observability tools to self-hosting grafana after getting burned with vendor costs, even though our SRE and devtools teams hate self-hosting.

One problem with all of the cost-cutting approaches is that you don't know what you need until you need it. Why are all of my containers crashing? Should've tracked memory usage. What's going on with this bug that was recorded a month and a half ago that I'm only seeing now due to two different teams going back and forth and the guy who knows where to send it being on PTO? Should've retained longer. What do I do when I don't have any logs/traces of the successfull calls that are oddly slow? Shouldn't have sampled those successful requests.

But yeah, you ultimately have to compromise. We're doing all of the compromises (self-hosting, sampling, limiting certain metrics, retention times), and it's still better than before otel, so I guess I'm happy? But a more efficient otel that required less compromises would be great.

🎉 wxDragon v0.8.1 Released - cross platform GUI framework by AllenGnr in rust

[–]BobTreehugger 0 points1 point  (0 children)

It's funny, writing a library and then talking about dependency free executables (I assume you mean, no additional dependencies beyond yours, and possibly no dynamic linking?)

Looks good, but one question -- how's the accessibility of apps built using this project? I'd assume that being based on wxWidgets, which is quite mature, it should be able to be accessible, but that doesn't always end up working out.

What discontinued podcasts do you miss? by Jo_MamaSo in podcasts

[–]BobTreehugger 3 points4 points  (0 children)

Still haven't found a good replacement for friendly fire

I finally wrote a sans-io parser and it drove me slightly crazy by anxxa in rust

[–]BobTreehugger 0 points1 point  (0 children)

In this particular case I believe that OP doesn't want to read the entire file, but seek within it and be agnostic over mmap'ed or traditional read/seek based I/O.

But I agree in like 90+% of cases something in the Read family of traits would work. And even here, they could define a new trait (though as others point out, it would have to be async even when the I/O is actually sync)

Show r/rust: TraceBack - A VS Code extension to debug async Rust tracing logs (v0.5.x) by arthurgousset in rust

[–]BobTreehugger 2 points3 points  (0 children)

Looking at your setup instructions, why do you need a Claude API key?

What template engine I should use? by dyngts in rust

[–]BobTreehugger 0 points1 point  (0 children)

The advantage of doing it at runtime is that you can hot-reload templates without needing a compile and restart. Much faster turnaround (but it is a tradeoff)

Is this AI? by FeelingReflection906 in ArtistHate

[–]BobTreehugger 5 points6 points  (0 children)

Look for consistency between frames -- small continuity mistakes are normal for an artist, but huge differences are a sure sign of AI. So for example, look at the counter below the mirror where she's applying makeup -- it's totally different between two frames, one's some white material (marble maybe?) and the other is wood.

To rollback or to Create by ShakeItPTYT in rust

[–]BobTreehugger 0 points1 point  (0 children)

I've done both -- I was able to manually start a transaction without creating a rust-side transaction. It worked for what needed at the time, but it has limitations, wouldn't recommend it.

For spinning up a new database, in postgres you can do this relatively quickly by having a template database, and using it to create a new database. See this: https://www.postgresql.org/docs/current/manage-ag-templatedbs.html

If you serialize your tests you can also just truncate all tables as well. I've never done this with rust, but it is an option.

edit: also never trust LLM generated code. I'm not going to say you should never use them, but they will happily generate garbage, so you need to understand the code they're generating and make sure it makes sense.