technom

joined 2 years ago
[–] technom@programming.dev 13 points 1 year ago* (last edited 1 year ago) (3 children)

That's misinformation. There's no overestimation. The problem is so bad that even the US government advocates the use of memory safe languages (including GC languages).

I have used C and C++. You need laser sharp focus to avoid memory safety errors even after you learn what causes them and how to avoid them. It's significantly easier to write programs in Rust because any lapse in care to avoid memory safety bugs are caught by the compiler.

[–] technom@programming.dev 6 points 1 year ago* (last edited 1 year ago)

You never reach a phase when you can confidently say that you understand git. But it's certainly possible to go from "When something goes wrong, I just delete the repo and clone it again" to "Aha! Now I can deal with most of the issues".

Mine was when I realized that git commands come in two flavors. Those that deal with commits as snapshots (commit, checkout, switch, reset, etc) and those that deal with commits as changes/diffs/deltas (merge, rebase, cherrypick, revert, etc). (Note: This isn't about how git stores commits on disk). I believe that this is actually the main source of confusion for beginner and intermediate git users.

[–] technom@programming.dev 2 points 1 year ago

That blame must go to github. Not Torvalds.

[–] technom@programming.dev 3 points 1 year ago

possibly several parents, like 8 parents

Fun fact. Such merges with more than 2 parents are called 'octopus merges'. The Linux repo has a single merge with 66 parents that Torvalds named the 'Cthulhu merge'.

Git never deletes a commit that is less than 90 days old.

On its own, that is. Not if you do a git gc.

Deleting a branch removes a reference to a commit, but the commits in the branch are still there.

but you can see them using “reflog” related commands

Reflog - one of the most underrated git commands that has the potential to save your life some day. At least one team member must learn it.

[–] technom@programming.dev 2 points 1 year ago

Another aha moment was learning that an easy way to squash commits is just to do a git reset followed by git commit -am “whatever”

You can do that in a single step instead with git commit -a --amend.

[–] technom@programming.dev 7 points 1 year ago* (last edited 1 year ago)

Peter Thiel is insolent enough to say out loud what these companies practice - 'competition is for losers'. These quasi-monopolies aren't here to provide the best value - quite the opposite. They want to kill all competition by any dirty tactic and then use the diminished choice to wring the customers of every penny they have. They want to extract maximum revenue by making sure that their inferior solution is the only option customers have.

This problem isn't solvable by market regulation alone. The world has enough a*****es around who will climb to the top of successful companies and find ways around the regulations. They're being as bad as they can, while skirting the limits of what's illegal. My main gripe is with the engineers, programmers, technicians and all technical creators who enable these scumbags. It's not hard to see that supporting a proprietary solution amounts to yielding the consumers' bargaining power to a monopoly. Despite that, they keep making these choices. For example, it's not uncommon to hear senior engineering managers or technical-lead level employees saying, "I know that Chrome is spyware and I want to quit it. But this works only on Chrome". I feel like screaming at them that if they're too incompetent to demand a change at the level they're at, they're in the wrong profession.

If you're a technical creator, your choices matter. It affects a lot more people than you alone. But more often than not, I see such creators surrendering principles in exchange for convenience. They hold as much responsibility as the market-abusers in making the world the way it is now.

[–] technom@programming.dev 40 points 1 year ago (1 children)

Interesting that they started dictating what you can and can't do with YOUR program! Consumer rights are a joke to these quasi-monopolies.

[–] technom@programming.dev 1 points 1 year ago* (last edited 1 year ago) (2 children)

CUDA is an API to run high performance compute code on Nvidia GPUs. CUDA is proprietary. So CUDA programs run only on Nvidia GPUs. Open alternatives like vulkan compute and opencl aren't as popular as CUDA.

Translation layers are interface software that allow CUDA programs to run on non-Nvidia GPUs. But creating such layers require a bit of reverse engineering of CUDA programs. But they are prohibiting this now. They want to ensure that all the CUDA programs in the world are limited to using Nvidia GPUs alone - classic vendor lock-in by using EULA.

[–] technom@programming.dev 3 points 1 year ago (1 children)

What's ironic is that rebases aren't as hard as many consider it to be. Once you've done it a couple of times, you just do it everyday as easily as you commit changes.

[–] technom@programming.dev 2 points 1 year ago* (last edited 1 year ago)

A big group of Apple fanbase are not ignorant, rather willing accomplices. Just look at the downvotes here. They will do anything to defend Apple's rogue behavior - like resorting to whataboutery, blaming the EU or even claiming that PWAs are bad.

My theory is that by defending Apple, they're trying to make themselves feel important with their overpriced products.

[–] technom@programming.dev 7 points 1 year ago* (last edited 1 year ago)

I find myself passing copies of values around and things like that, it might be that the compiler just takes care of that,

Rust prefers explicitness over magic. So it does what you tell it and doesn't just take care of that.

If you're copying a lot of values around (I.e cloning. Not moving or borrowing), then you're definitely doing it inefficiently. But you don't have to worry too much about that. If there are too many difficulties in borrowing, it may be because those borrows are problematic with respect to memory safety. In such cases, sacrificing performance through cloning may be an acceptable compromise to preserve memory safety. In the end, you end up with the right balance of performance (through borrowing) and safety (through cloning). That balance is hard to achieve in C/C++ (lacking in safety) or in GC languages (lacking in performance).

If that's the friction you're facing in Rust, then I would say that you're already in a good position and you're just trying too hard.

[–] technom@programming.dev 5 points 1 year ago* (last edited 1 year ago) (1 children)

So are Haskell and Idris (well, if you consider a singing dragon as a person).

view more: ‹ prev next ›