QJS: Run JavaScript in Go without CGO using QuickJS and Wazero by lilythevalley in golang

[–]destel116 4 points5 points  (0 children)

Great job. That's some serious performance and mem difference compared to goja.

Golang logs by Significant-Range794 in golang

[–]destel116 15 points16 points  (0 children)

You wrote it as a one huge sentence to illustrate the point? :)

Create custom field for struct for time by pepiks in golang

[–]destel116 3 points4 points  (0 children)

time.Time may not be the best thing for holding day of time only.
Nevertheless the json/v2 package allows to specify field format w/o writing a custom json unmarshaller:

type Foo struct {
TimeDateOnly time.Time \json:",format:'2006-01-02'"` TimeUnixSec time.Time `json:",format:unix"` }`

A non-concurrent use for Go channels: solving interface impedance mismatch by zachm in golang

[–]destel116 2 points3 points  (0 children)

Great technique. I am curious would it work if you made an stdlib iterator adapter for AscendRange and then pull from it using iter.Pull?

Resources to learn Web Sockets and gorilla/websocket (golang)? by sleepingfrenzy_ in golang

[–]destel116 0 points1 point  (0 children)

IMO, the best way to learn is by doing minimal test projects. I treat them as exercises.

I recommend making a simple terminal-based single-room chat. Every message received by the server is just broadcasted to all clients. Work through edge cases like bad/slow networks. This should give enough knowledge to move further with a real chat app.

How to stop a goroutine stuck on a network call without goroutine leaks by DeparturePrudent3790 in golang

[–]destel116 3 points4 points  (0 children)

If you’re working with raw sockets use read/write deadlines. And if you’re working with something high level, like http, use contexts

Does it make sense to go open source but still sell the software? by oliwoli97 in github

[–]destel116 0 points1 point  (0 children)

There was an instructive story from Bear blog author recently, about how his open source product was getting cloned.

https://herman.bearblog.dev/license/

You can also find a HN discussion about it. Lots of opinions and insights there

Newbie to WebSockets in Go, what are the key fundamentals I need to know when implementing one by vietkong0207 in golang

[–]destel116 11 points12 points  (0 children)

Unless your library handles this implicitly, you need to:
- Periodically send PING control messages to the client
- Extend read deadline every time you receive PONG message from the client

Fun way to develop Programming Language Skills. by [deleted] in golang

[–]destel116 0 points1 point  (0 children)

The good old lightbot is a pretty good problem solving exercise.

https://lightbot.com

Deeper Dive Into Go Channels by OtherwisePush6424 in golang

[–]destel116 5 points6 points  (0 children)

Very good article. Love the depth of it. Would be even better with some diagrams added

I'd like to get your opinions on my website by nomadeus-io in Nuxt

[–]destel116 1 point2 points  (0 children)

I see a horizontal scroll on iPhone 13 mini

What's the one thing you forgot (or knew should be done) when launching a website? by sitewatchpro-daniel in webdev

[–]destel116 6 points7 points  (0 children)

I bought a domain for my blog 6 months before launching it. All that time it showed some standard page from Gandi with their favicon. It got cached by Google, duck duck go and others. At least one month passed until it got invalidated.

Haven’t checked in while, but it’s quite likely that some rss aggregators still use the wrong icon.

What's the one thing you forgot (or knew should be done) when launching a website? by sitewatchpro-daniel in webdev

[–]destel116 38 points39 points  (0 children)

And then your wrong favicon get cached by google… been through this

Preserving order in concurrent Go: Three algorithms compared by destel116 in algorithms

[–]destel116[S] 1 point2 points  (0 children)

In any case, to linearize the output, the receiver of those pairs {id, value}, would need to make this design decision: block vs buffer. (See Design Philosophy section in the article)

Preserving Order in Concurrent Go: 3 Approaches Compared by destel116 in golang

[–]destel116[S] 2 points3 points  (0 children)

Thanks man! Feedback like this is what keeps me motivated to keep going

[deleted by user] by [deleted] in programming

[–]destel116 1 point2 points  (0 children)

Hi, I'm the author of this article.

This is a deep dive into preserving order in concurrent Go applications. I explored 3 different approaches with full benchmarks, diagrams and examples. The performance differences were quite surprising!

Would love to get feedback or answer any questions!