Zykino

joined 8 months ago
[–] Zykino@programming.dev 1 points 3 months ago

Collecting the traces can cost some performance, but that is a small price to pay for the advantages and could even be turned off in production builds.

They clearly intend this post for developers.

But yeah I want my stacktraces… in my IDE/debugger where I can see them and jump the stack. Most of the time I just need the head, where the breakpoint (or crash) is.

They also complain about rust where you can RUST_BACKTRACE=1 <program>. The default error tells you so !

[–] Zykino@programming.dev 2 points 3 months ago

I'm with the others: fd default syntax is easier to remember.

And for the interactive search I'm using skim. With it I cd to the dir I want and Alt t to trigger fuzzy finding. There are also bindings to search for dir or in the history. The neat part is that results are inserted as is in the command line, no need to xargs or copy them. It also make the history look like I always know where the files I want are when in reality they are just fuzzy-found

[–] Zykino@programming.dev 2 points 4 months ago (1 children)

First time I hear about checked exceptions. How do you use them ? Are you forced to handle them explicitly ? Is the handling checked at compile time ?

[–] Zykino@programming.dev 1 points 4 months ago (4 children)
  1. Is a modern language with a good build system (It's like night and day compared to CMake)

Meson exists ... as do others.

But they are not the default option. And your new job may not use them.

  1. And I just like how the language works (errors as values etc.)

Fair enough; though why? What's wrong with exceptions?

Exceptions is a non standard exit point. And by "non standard" I'm not talking about the language but about its surprise appearance not specified in the prototype. Calling double foo(); you don't know if you should try/catch it, against which exceptions, is it an internal function that may throw 10 level deep ?

By contrast fn foo() -> Result<f64, Error> in rRst tell you the function may fail. You can inspect the error type if you want to handle it. But the true power of Result in Rust (and Option) is that you have a lot of ergonomic ways to handle the bad case and you are forced to plan for it so you cannot use a bad value thinking it's good:

  • foo().unwrap() panic in case of error (see also expect)
  • foo().unwrap_or_default() to ignore the error and continue the happy path with 0.0
  • foo().unwrap_or(13.37) to use your default
  • foo()? to return with the error and let the parent handle it, maybe
[–] Zykino@programming.dev 3 points 4 months ago

I'm using helix with arrows. On a standard layout its not so great, but on my main keyboard I have a layer with arrow keys near hjkl. So I can use that on all software even on my BÉPO (DVORAC like) layout.

[–] Zykino@programming.dev 5 points 4 months ago

From the article's own summary.

False Load Output Prediction and Speculative Load Address Prediction allow for data leaks without malware infection

But I guess "IA summary" did its best ¯\_(ツ)_/¯

[–] Zykino@programming.dev 2 points 5 months ago (1 children)

Why should I use a sudo alternative?

[–] Zykino@programming.dev 2 points 5 months ago (1 children)

-g is not documented, what does it do?

Note: this made me discover topless (SFW) and its Caveat section.

[–] Zykino@programming.dev 1 points 5 months ago (1 children)

From your example, I have a hard time inferring what is it doing.

[–] Zykino@programming.dev 3 points 5 months ago (1 children)

--single-branch

[–] Zykino@programming.dev 1 points 5 months ago

Most of the time the fix is: put quotes around your strings (especially when they may contains globing patterns). Sometimes its using newer syntax available in bash but not on the snippet.

[–] Zykino@programming.dev 1 points 5 months ago

I only have to "quotes" strings that contains globs. The rest mostly work or use the newer/recommanded way to do things for posix shells.

But I must admit, I only use it interactively. For scripts I #!/bin/{,ba}sh. I will use something else once it won some/most the distro preinstalls (either nu, elvish, fish, but for now it's sadly python).

view more: ‹ prev next ›