Solemarc

joined 2 years ago
[–] Solemarc 11 points 1 year ago

When I went rooting around to find it. I figured it was some QA process that starts 5 seconds after the video loads (the timer seems to be async and the code sends a promise off while it waits). Of course, it's all minified JS so it's a huge pain to read.

[–] Solemarc 6 points 1 year ago* (last edited 1 year ago) (1 children)

I generally say, "I want to make X" then I slowly work up to it. Currently I'm making a pathfinding algorithm.

I input a map with my starting point and finishing point and it has to get there. It has to know where to go back to if it goes the wrong way, when it's allowed to stop, etc.

The next steps will be getting it to only show the finished path, then to work out the fastest path when it has multiple possible paths etc.

[–] Solemarc 23 points 1 year ago* (last edited 1 year ago) (2 children)

Why do you need to spend a "considerable amount of time crafting commit messages?" That feeding your code into an LLM and getting it to summarise for you is faster? I don't understand how this could possibly streamline anyone's workflow? What do your commit messages normally look like?

[–] Solemarc 11 points 1 year ago

Yes but no. Modern PHP lets you put types in function signatures and it will then attempt to convert your inputs to those types at runtime.

JS/TS and Python don't do this. They have optional type annotations that's treated as syntactic sugar. You can use static checkers against this but if you get an error like "expected string got int" you can still run the code. It won't behave any differently because you have annotations.

[–] Solemarc 7 points 1 year ago

Ahh yes memoization, the complicated way to say "remember this, I might need it again"

[–] Solemarc 1 points 1 year ago

Ahh, thank you for the corrections.

[–] Solemarc 1 points 1 year ago (3 children)

If you want inheritance you can add structs as parameters of other structs. This will also allow them to use impl functions for that struct.

As far as I understand it Arc<> is just the Async version of RC<>.

I'm not entirely sure about Box<> and a lot of its API's are still unstable but I believe it's primarily used as an owner for unsafe things.

[–] Solemarc 49 points 1 year ago

ez! I work for a company that builds a SaaS end to end product.

Myself and my coworker were asked to build exports for a single client. They were json exports. To start the client would take weeks/months to get back to us, their spec was very vague and their exports had some really complex logic to sort data. We'd been going back and forth with them for almost a year when they said we should give it to them "as is". They now are the proud owners of 2 complex broken exporters.

[–] Solemarc 4 points 1 year ago

^ Couldn't possibly agree with this anymore!

I think it's a common issue with rust in general that a lot of its big impressive libraries/frameworks are still in 0.x with variable degrees of documentation and ease of use. Axum, Rocket, Dioxus, Leptos, Bevy, Servo, the list goes on. A lot of cool things are being built in Rust but very few of them are mature yet.

[–] Solemarc 10 points 1 year ago* (last edited 1 year ago) (2 children)

Aside from the usual recommendations of: The Rust Book and Rustlings.

I'd also recommend you try porting things you've made previously into rust. The amount of times I've ported something over and realised I could've done it better originally is too damn high.

[–] Solemarc 5 points 1 year ago (6 children)

Maybe I'm dumb because I'm a backend dev, but if we can't offload these tasks to Async tasks and we need to block the main thread, why can't we just put up a loading screen? "Don't turn off the application we are saving" games have been doing this for a decade and you can't convince me that your enterprise application is heavier than a AAA game.

view more: ‹ prev next ›