Hacker News new | past | comments | ask | show | jobs | submit | styluss's comments login

To this day, the best way to practice typing, for me, is https://en.m.wikipedia.org/wiki/The_Typing_of_the_Dead


Typing of the Dead Overkill is pretty great too.


data, ok := <-someChan

If ok is false, the channel is closed and data is a zero value.


There is no error here, just a closed channel (e.g. finished successfully is indistinguishable).

You do need to use either two channels (horrible code) or some kind of Result{T,error} wrapper (bad language design).


Whenever I used channels in Go, I regretted it at the end. Always have to look up "what happens when I do x and the channel is closed" kind of stuff. Code becomes weird with all the selects and shit.

I like sync primitives and good old collections.


Oh absolutely, whenever i use anything, I have to see how to integrate cancellation and now context is everywhere just for this.

It gets overly verbose because of "simplicity"


Yeah, where I worked we rarely used channels directly in business logic. Most of our code looked like "do 5 different time consuming operations, some of them optional i.e can fail" and then combine them all appropriately depending on success/failure so we simply made a BoundedWaitGroup primitive using sync.WaitGroup and a channel to ensure the boundedness that gets used everywhere.


I accidentally tried to fly with a small kids juice box and sunscreen. They throw your stuff into a machine.

I would've expect that they take a sample from inside but they just scanned the outside


Nim fits a lot of Go's use cases. It is way more niche though.



In 2030, this algorithm will be expected to optimally solve some leetcode interview question.


can you explain a bit what you mean with

> - Lack of dependency injection/inversion of control. I find it interesting the author lists this as an advantage. With Rails, I was always a little anxious not knowing where things were defined or being implemented.

Rails itself doesn´t have framework/library for DI/IOC but you can use constructors, I understand that a lot of Rails devs won't and just use wtv they need.


Yup. There is no self awareness of how much we got from all our colonial history.

It is also wild seeing how people are reacting to the President talking about reparations.


> Techniques like memory pools, manual memory management, directory compression, and compact file formats reduced metadata memory usage by 90%.

It is interesting that high performance systems in Go end up needing these kind of performance optimizations.


High performance systems in any language require these optimisations. Go provides a solid foundation to create the platform before you start optimising. Not saying it's the best or only choice, but it's not a bad choice.


High performance systems are where these kinds of optimisations make the most difference.

If most of your overhead is due to the low performance of the language/runtime you're using, these kinds of optimisations won't make as much of a difference. That is, if you can even implement them at all. I mean, good luck trying to use memory pools and manual memory management in Python or Javascript.


Wasn't there stuff that only appears in the XML output?


I'm not part of the project but it seems to be generated from this package https://github.com/csnewman/ffmpeg-go/tree/master/internal%2...


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: