Ephera

joined 4 years ago
[–] [email protected] 3 points 23 hours ago

You don't want to use exceptions in normal control flow, because they're extremely slow. Every time you throw an exception, it has to collect a stacktrace, which is hundreds, if not thousands, of calculations, compared to a handful of calculations for returning a boolean or an enum variant.

[–] [email protected] 1 points 3 days ago

hobbyists

Not so sure about that plural...

[–] [email protected] 42 points 4 days ago (3 children)

I, unfortunately, have to use GitHub at $DAYJOB and this is me. I navigate most of the webpage via the URL bar now.

Basically, let's say I'm working on a repo github.com/tomato/sauce/ and want to navigate to the Releases page.

Via the webpage:

  1. Type github.com into the URL bar.
  2. Don't find tomato/sauce/ in the list of recent repos, even though it's the only repo I work on.
  3. Click on some other repo that's at least in the tomato/ org.
  4. Navigate up to the tomato/ org.
  5. Find the sauce/ repo in the list.
  6. Traverse half the fucking screen to hit the "Releases" heading in the middle of the About-section.

Via the Firefox URL bar:

  1. Type gi→t→s→r→.
  2. Hit Enter.

I admit, it's hard to compete with the latter, but I wouldn't know how to navigate that way, if the former wasn't so terrible.

 
[–] [email protected] 34 points 6 days ago

I hear, it actually significantly increases the chance of the miracle occurring when you pass the array into multiple threads. It's a very mysterious algorithm.

[–] [email protected] 8 points 1 week ago

Might be a song from Kevin MacLeod? His songs get used a lot on the YouTubs.

https://incompetech.com/music/royalty-free/music.html

When I just searched "Kevin MacLeod jazz", the first result was "Acid Trumpet", which seems like it could fit your description.

[–] [email protected] 5 points 1 week ago (1 children)

I enjoy anise-fennel-caraway tea. It doesn't taste as watery as many of the fruit-based teas and not as bitter as black tea and such. I find, it's also decent at clearing out my throat.

Peppermint tea is second place for me, for very much the same reasons. 🙃

[–] [email protected] 16 points 1 week ago (1 children)

Not sure, if I stopped listening to mainstream music around that time, but uh, both of my examples are from 2011, apparently:

  • Kind of a classic response to this question, is "Pumped Up Kicks" from Foster The People. It's got that upbeat melody, and the lyrics are this:

All the other kids with the pumped up kicks
You’d better run, better run, outrun my gun
All the other kids with the pumped up kicks
You’d better run, better run, faster than my bullet.

  • And my other example is "The A Team", apparently originally from Ed Sheeran, and apparently also with an upbeat melody. I think, I only ever listened to a cover version. But yeah, it's about drug use and sex work, and how those kind of necessitate each other...
[–] [email protected] 7 points 1 week ago

We've got a WebAssembly web-UI at $DAYJOB. Implementation language is Rust, we use the Leptos framework (although other mature frameworks are available for Rust).

Pros:

  • Same language and similar tooling as in the backend. Most libraries work the same way (obviously excluding libraries that read from the filesystem, for example). This is especially good, if you've got lots of "full stack" devs.
  • Same model classes as in the backend. If you change a field, the compiler will force you to fix it on both sides. It is compile-time guaranteed that backend and frontend are compatible.
  • Rust is a nicer language than JS/TS. I find especially Rust's error handling via Result and Option types + pattern-matching works really well for UI stuff. You just hand the Result value over to your rendering stack and that displays either the value or the error. No unset/null variables, no separate error variable, no ternaries.
  • Having a strict compiler makes it less bad when you're lax on testing, and frontend code is a pain to test.

Cons:

  • If you've got pure frontend folks, or people who are deep into React or Angular or whatever, those are not going to be as productive.
  • The JS ecosystem is massive, you just won't find as many component libraries for Rust, which can definitely also reduce productivity.

With me being in a team with few frontend folks, I would definitely opt for it again.

[–] [email protected] 11 points 1 week ago

Well, for reasons, I happen to know that this person is a student, who has effectively no experience dealing with real-world codebases.

It's possible that the LLM produced good results for the small codebases and well-known exercises that they had to deal with so far.

I'm also guessing, they're learning what a PR is for the first time just now. And then being taught by Microsoft that you can just fire off PRs without a care in the world, like, yeah, how should they know any better?

[–] [email protected] 283 points 1 week ago (14 children)

Tangentially related rant: We had a new contributor open up a pull request today and I gave their changes an initial look to make sure no malicious code is included.
I couldn't see anything wrong with it. The PR was certainly a bit short, but the task they tackled was pretty much a matter of either it works or it doesn't. And I figured, if they open a PR, they'll have a working solution.

...well, I tell the CI/CD runner to get going and it immediately runs into a compile error. Not an exotic compile error, the person who submitted the PR had never even tried to compile it.

Then it dawned on me. They had included a link to a GitHub Copilot workspace, supposedly just for context.
In reality, they had asked the dumbass LLM to do the change described in the ticket and figured, it would produce a working PR right off the bat. No need to even check it, just let the maintainer do the validation.

In an attempt to give them constructive feedback, I tried to figure out, if this GitHub Copilot workspace thingamabob had a Compile-button that they just forgot to click, so I actually watched Microsoft's ad video for it.
And sure enough, I saw right then and there, who really was at fault for this abomination of a PR.

The ad showed exactly that. Just chat a bit with the LLM and then directly create a PR. Which, yes, there is a theoretical chance of this possibly making sense, like when rewording the documentation. But for any actual code changes? Fuck no.

So, most sincerely: Fuck you, Microsoft.

[–] [email protected] 16 points 1 week ago

Business intelligence is in the context of analytics. It means something very different from "business logic", in case you're thinking they're synonyms...

https://en.wikipedia.org/wiki/Business_intelligence

[–] [email protected] 14 points 1 week ago (1 children)

I'm curious to see, how long it'll last. Much like with a support hotline, there's no directly obvious financial benefit to having such a chatbot, so if the hype has died down and the price is increased, I could see those being axed pretty quickly...

 

So, this uses a macro, but if you're thinking anything is possible with a macro, it's actually not in Rust. The input does still need to parse as valid Rust tokens.

Which means the authors asked themselves at some point: Is the Rust syntax a superset of the Python syntax?
And well, it's not. In particular, some Python keywords will just be tokenized as an identifier (like a variable name).

But it is close enough that the authors decided against requiring a massive string to be passed in, which does amuse me. 🙃

 
 

Real screenshot from (crappy) personal project...

 
 
 
 
 

Hi, the default Roboto font is boring me out of my mind and I'd like to change it.

In the past, I've done so by just replacing the font file in the OS, which worked well, but meant that it would reset after every OS update.
I'm considering scripting that with ADB to make it less of a pain, but figured I should ask, if there's a better way.

I'm on LineageOS which has a font styling system, but it only applies to the OS, not the user-installed apps...

 
 
view more: next ›