[-] nous@programming.dev 6 points 6 months ago

Someone once told me somewhere, that if I am trying to learn rust, I should learn C first, so that I know how to shoot myself in the foot, learning to avoid doing so

This is stupid advice. If you want to learn rust then learn rust.

So thats what I did (somewhat) for the past 6 months. I wrote some stuff in C

In that time you are no closer to learning rust. If you started with rust you would know it by now. Rust is not harder to learn then C. If anything C is harder to learn as it's compiler doesn't guide you at all.

You don't need to learn C to appreciate the borrow checker. I find beginners just accept whatever they are first taught. It is only really those that come from C the put up a bigger fight when learning rust.

And 6 months in a language without a borrow checker is not really long enough to learn the reasons why a borrow checker is useful. Not without a good guide that focuses on that. Which most c books don't. The best way to learn it is with rust that actually tells you when you mess up.

[-] nous@programming.dev 5 points 2 years ago

Transactions should be short lived, they block data on the database side from acessing those tables or rows. Best to not jole onto a transaction that long and instead gather your data first or rethink your access patterns to your data base.

But arc does give you a try_unwrap which returns the inner type if there is only one strong copy left. And mutex gives you an into_inner to move out of it. But really transactions should not be held for a long period of time.

[-] nous@programming.dev 5 points 2 years ago

Can when the specific situations are reached in very micro benchmark situations. But overall on aggregate you find even JIT languages don't strictly outperform pre compiled languages for general workflows when looking at languages of a similar class. When you compare them to compiled languages like C/C++/rust/zip (aka ones without a GC or much of a runtime at all) then JIT languages fall behind like all other GCed languages.

[-] nous@programming.dev 6 points 2 years ago

GUIs tend to only cover the common/basic usage. Which is easy to remember without a cheat sheet. When you need more advanced stuff then GUIs tend to become more of a sticking point I find. And with common workflows it is far easier to automate with the CLI then with a GUI.

[-] nous@programming.dev 5 points 2 years ago

Konsole can display images, as can kitty alacritty, western, iterm2, etc.

They can now? I know it was possible in some niche terminals but never knew it was as wide spread as that.

but it’s not exactly game changing

None of these features on their own are game changing I agree. But lots of small nice to haves can end up being game changing overall. Again - I don't think these terminals offer anywhere near enough to warrant their IMO massive downsides though. But I would love to see more innovation in the terminal emulator space.

Lastly, searching explicitly your last command for a term with context would be much better suited to the shell to solve as it’d be terminal independent.

I had a similar thought TBH. But the more I thought about it the more I came to see that in order to do this nicely - ie with inline scroll back or being able to collapse command output like these terminals do then you would basically need to implement a terminal emulator into the shell. Either way you are breaking down the wall between what a shell and a terminal emulator are doing. I would be interesting in exploring this from the shell side, though I cannot fault them from doing it from the emulator side either.

couldn’t be solved at the shells level or with supplementary applications

I think the key benefit here is integration rather than technical ability to do something. Making it easy and convenient to do goes a long way. There is a lot that can be made much nicer with things more tightly integrated together than trying to string up a bunch of disparate applications together - even if you can do it the integrated approach will give you a much more refined experience.

I doubt they’re outright rejecting any idea of progress

It sounds like an outright dismissal of new features to me.

[-] nous@programming.dev 6 points 2 years ago

Never seen anyone change it for the mouse, but I think for a joystick and especially gyro it is more common to have them different. Same basic principal applies to all three inputs though.

In first person games the distance you need to move horizontally is often far more then the distance you need to move vertically, quite often only needing to look up/down a small amount. So you can get better accuracy in the vertical direction by turning down the sensitivity without sacrificing the ability to move quickly up and down. But in the horizontal direction being able to move quickly is generally more important than better accuracy.

Not sure how important the difference is for the mouse though, likely why people don't use it. But it is an easy setting to split up for the developers so why not give players control over it and set it however they like? Would be nice if you could lock them together, but that is a little more complex and requires more thought to do. And I don't see game devs giving that much thought about the minor user experience improvements in their games settings when they have a load of gameplay still to worry about.

[-] nous@programming.dev 6 points 2 years ago

You assume they are even going to justify the bare minimum... it is so far in the future they are just hoping everyone will forget about it.

[-] nous@programming.dev 6 points 2 years ago

I just wish it would stop leaking out everywhere.

[-] nous@programming.dev 6 points 3 years ago

A new diffraction-gated real-time ultra-speed mapping technology threatens to undercut cameras costing $100,000 with off-the-shelf parts.

The threatens to undercut part. Rather than talking about how it is going to make things more affordable, it talks about how it is going to ruin the exiting markets pricing. At least that is how that reads to me. Note, I am not talking about the whole article - just that one abstract, which is what is shown here and leads a completely different tone to how the article is actually worded.

[-] nous@programming.dev 6 points 3 years ago

What do you mean separate them from each other?

[-] nous@programming.dev 6 points 3 years ago

There is also no loss for McDonald's central, but they have a old and close business relationship with Taylor that they seem to care about more than their own franchise owners.

[-] nous@programming.dev 6 points 3 years ago* (last edited 3 years ago)

There are quite a few web frontend frameworks for rust now that are reasonably mature. Though you might still find a few rough edges they are usable for projects now.

All of these can work without you needing to write any JS code. Though there is JS glue code involved, it is generated and you don't need to worry about it.

But the JS eco system is still quite large and hard to completely avoid.

view more: ‹ prev next ›

nous

0 post score
0 comment score
joined 3 years ago