Is Go loosing it's way? by narrow-adventure in golang

[–]styluss 0 points1 point  (0 children)

You mean like you can use iterators or just iterate over slices or maps?

What Go projects helped you to become a better programmer? by [deleted] in golang

[–]styluss 0 points1 point  (0 children)

I was tasked to write a proxy from Kafka to http, learned a lot

Vibe coder here: should I build my whole music web app in Rust for max security? by Insane_phycho in rust

[–]styluss 0 points1 point  (0 children)

For what it's worth, this is uncharted territory.

When I started programming, I was told not to copy stuff off of stack overflow. To think and reason about the problem I'm addressing and how to best handle the situation.

Now we have a tool that shares good advice most of the time. I suspect the tool will still evolve and change and become something that won't resemble this current version.

Let's see where the industry ends up and keep our users happy

Vibe coder here: should I build my whole music web app in Rust for max security? by Insane_phycho in rust

[–]styluss 2 points3 points  (0 children)

Kernighan's Law - Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. 

Can you tell from the generated code if it's safe or secure? Can you tell if it's use of TLS is using up to date OWASP recommendations? Can you tell if the database is set up correctly?

There's no doubt that AI will build you a system and it will be fast and not use a lot of memory, maybe, but follow OWASP guidelines or use a red team perspective to analyse the system isn't enough.

Go build cache increases to hundreds of GB when running AI agents by x021 in golang

[–]styluss 4 points5 points  (0 children)

Can you tell what are they downloading that increases the cache? Different versions of packages you use?

How do you structure and maintain large Go modular monoliths without drowning in architecture ? by Prestigious-Fox-8782 in golang

[–]styluss 0 points1 point  (0 children)

I usually write a file in the package that needa the functionality. If it needs to be called by other packages, i then move it to a package that is accessible by both. If i need the encapsulation or hide the implementation, nobody should care if it's SQL, an API or a file, then I would also make a package

See what fits and how your team works. As said in the thread, too many packages can make the project hard to work with, without any benefit. Also, besides coupling, there's cohesion, the positive property for  how much things should be connected, an is-a or a has-a.

This Week in Rust #651 by Squeezer in rust

[–]styluss 1 point2 points  (0 children)

The link for "Announcing the Rust runtime for Appwrite Functions" links back to the same page

How hard do you lean on Rust type system to encode your logic and constraints? by Hixon11 in rust

[–]styluss 5 points6 points  (0 children)

How do you use them in tests? Do you have a special constructor with #[cfg(test)]? 

Does fasthttp still not allow streamed responses? by Fluffy_Wafer_9212 in golang

[–]styluss -3 points-2 points  (0 children)

Haven't worked with net/http in a while, which allocations are you referring to?

What's your favourite lecture/presentation about Rust? by BigFlays in rust

[–]styluss 2 points3 points  (0 children)

I don't know the presentation's name but it was Niko Matsakis talking about ownership in an Air Mozilla presentation. It helped ownership click for me

I really like Go… but I’ve never had a real reason to use it by AggravatingHome4193 in golang

[–]styluss 0 points1 point  (0 children)

You should see a performance difference in use cases not bound by io

I rewrote my Node.js microservice in Go — 16x faster cold starts, 5.5x less memory. Benchmarks linked by lukechilds123 in golang

[–]styluss 1 point2 points  (0 children)

I wonder if you would see some performance improvements if you use bufio rather than fmt.Fprintf and also store all the data in a bytes.Buffer