Buttons

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

Deno looks interesting.

But Bun choosing Zig makes me think their priorities are not my priorities. As of now, you choose Zig (a not-yet-stable language) because you want to learn Zig and make a neat side-project. Those are not my priorities. Zig offers no unique advantages other than neat new syntax.

Deno chose Rust, which, like Zig, is new, but Rust has reached 1.0 and offers a unique advantage with its safety features. I'm not saying anything about the greatness of Rust here, only that Rust does offer unique advantages, and Rust could be chosen because of general priorities.

Bun chose Zig and then worked backwards and formed their priorities around Zig. Deno formed their priorities and their priorities lead them to Rust.

That's how I feel anyway.

[–] Buttons@programming.dev 19 points 1 year ago (7 children)

Were just waiting on WASM to be able to access the DOM APIs directly, and then all languages will be first class citizens on the web, and then RIP JavaScript.

[–] Buttons@programming.dev 35 points 1 year ago (9 children)

Fortran is still a good language for some purposes I think.

And I feel the same way, C++ tries to solve the problem of having too many features by adding more features.

[–] Buttons@programming.dev 7 points 1 year ago (1 children)
[–] Buttons@programming.dev 3 points 1 year ago (2 children)

What if I specify the wrong type? let retrieved = storage.get::<SomeOtherType>();?

Is it a runtime error or a compile time error?

[–] Buttons@programming.dev 37 points 1 year ago (2 children)

I'd rather believe it's a bunny than acknowledge snails that large exist.

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

I abandoned poetry after it was unable to install a specific version of pytorch I was using.

In pip I would do something like pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118, but IIRC poetry didn't support the --index-url option.

[–] Buttons@programming.dev 4 points 1 year ago (1 children)

I wouldn't consider Julia statically-typed; am I wrong?

[–] Buttons@programming.dev 4 points 1 year ago

The question mine as well be "what is your favorite compiled language?". There is a lot of overlap between the possible answers.

[–] Buttons@programming.dev 5 points 1 year ago

I hear you. It's no good to just cede ownership of a word and allow others to define it however suits them. But... it's Twitter, getting into a good faith philosophical discussion about the definitions of words ain't going to happen, so in many cases it's better to just not bring up the controversial words at all. Guess there's pros and cons to each.

[–] Buttons@programming.dev 2 points 1 year ago (1 children)

I agree. That's why I suggest (or more like implied) that when we know we have different definitions of a word, we avoid using that word. It's a good thing to at least try if two people really care about understanding.

[–] Buttons@programming.dev 5 points 1 year ago (4 children)

"Woke" is a problem because people have different definitions, and no matter what Webster or any other authority says the definition is, people will continue to have differing definitions.

How can we reach understanding when we don't even agree on the definition of words?

This is way to nuanced to deal with on fucking Twitter. If you use the word "woke" on Twitter, expect a lot of misunderstanding, talking past each other, and bad faith arguments to follow.

 

Git repos have lots of write protected files in the .git directory, sometimes hundreds, and the default rm my_project_managed_by_git will prompt before deleting each write protected file. So, to actually delete my project I have to do rm -rf my_project_managed_by_git.

Using rm -rf scares me. Is there a reasonable way to delete git repos without it?

 
 

I like most things I see about Godot, and I'm going to try making some games with it.

Whenever I imagine programming a game though, I imagine the game logic and simulation being separate from the display. For instance, if I was to make a game like FTL, I would plan to simulate all the ship interactions and the movement of the characters purely in code, and then write a separate module to render that simulation. The simulation could be rendered with graphics, or with text, or whatever (of course, a text render wouldn't be human friendly, but could act as a dedicated server for some games, or I could use it for machine learning, etc).

I'm not an expert at Godot, but it seems this mindset is not going to fit well into Godot. Is this correct? It seems like the same object that is responsible for tracking the players health is going to also be responsible for drawing that player on the screen and tracking their location on the screen, etc. Will my player class have to end up being a subclass of some complicated Godot class? (Also, I'm a fan of functional programming and don't always use a lot of classes if given the choice.)

What are your thoughts about this. Would you recommend another engine? No other engine seem to be in the same sweet spot that Godot is currently in.

 

My first experience with Lemmy was thinking that the UI was beautiful, and lemmy.ml (the first instance I looked at) was asking people not to join because they already had 1500 users and were struggling to scale.

1500 users just doesn't seem like much, it seems like the type of load you could handle with a Raspberry Pi in a dusty corner.

Are the Lemmy servers struggling to scale because of the federation process / protocols?

Maybe I underestimate how much compute goes into hosting user generated content? Users generate very little text, but uploading pictures takes more space. Users are generating millions of bytes of content and it's overloading computers that can handle billions of bytes with ease, what happened? Am I missing something here?

Or maybe the code is just inefficient?

Which brings me to the title's question: Does Lemmy benefit from using Rust? None of the problems I can imagine are related to code execution speed.

If the federation process and protocols are inefficient, then everything is being built on sand. Popular protocols are hard to change. How often does the HTTP protocol change? Never. The language used for the code doesn't matter in this case.

If the code is just inefficient, well, inefficient Rust is probably slower than efficient Python or JavaScript. Could the complexity of Rust have pushed the devs towards a simpler but less efficient solution that ends up being slower than garbage collected languages? I'm sure this has happened before, but I don't know anything about the Lemmy code.

Or, again, maybe I'm just underestimating the amount of compute required to support 1500 users sharing a little bit of text and a few images?

view more: next ›