Readit News logoReadit News
pbohun commented on A million ways to die from a data race in Go   gaultier.github.io/blog/a... · Posted by u/ingve
izend · a month ago
Meaning similar to Erlang style message passing?
pbohun · a month ago
Not quite. Erlang uses the Actor model which delivers messages asynchronously to named processes. In Go, messages are passed between goroutines via channels, which provide a synchronization mechanism (when un-buffered). The ability to synchronize allow one to setup a "rhythm" to computation that the Actor model is explicitly not designed to do. Also, note that a process must know its consumer in the Actor model, but goroutines do not need to know their consumer in the CSP model. Channels can even be passed around to other goroutines!

Each have their own pros and cons. You can see some of the legends who invented different methods of concurrency here: https://www.youtube.com/watch?v=37wFVVVZlVU

There's also a nice talk Rob Pike gave that illustrated some very useful concurrency patterns that can be built using the CSP model: https://www.youtube.com/watch?v=f6kdp27TYZs

pbohun commented on A million ways to die from a data race in Go   gaultier.github.io/blog/a... · Posted by u/ingve
hmry · a month ago
> people insist on using the dangerous way and then blame it on the language

Can you blame them when the dangerous way uses 0 syntax while the safe way uses non-0 syntax? I think it's fine to criticize unsafe defaults, though of course it would not be fair to treat it like it's the only option

pbohun · a month ago
They're not using the dangerous way because of syntax, they're using it because they think they're "optimizing" their code. They should write correct code first, measure, and then optimize if necessary.
pbohun commented on A million ways to die from a data race in Go   gaultier.github.io/blog/a... · Posted by u/ingve
pbohun · a month ago
The first Go proverb Rob Pike listed in his talk "Go Proverbs" was, "Don't communicate by sharing memory, share memory by communicating."

Go was designed from the beginning to use Tony Hoare's idea of communicating sequential processes for designing concurrent programs.

However, like any professional tool, Go allows you to do the dangerous thing when you absolutely need to, but it's disappointing when people insist on using the dangerous way and then blame it on the language.

https://www.youtube.com/watch?v=PAAkCSZUG1c

pbohun commented on APT Rust requirement raises questions   lwn.net/SubscriberLink/10... · Posted by u/todsacerdoti
petcat · a month ago
Interesting how instead of embracing Rust as a required toolchain for APT, the conversation quickly devolved into

"why don't we just build a tool that can translate memory-safe Rust code into memory-unsafe C code? Then we don't have to do anything."

This feels like swimming upstream just for spite.

pbohun · a month ago
That's not what the comment said. It said, "How about a Rust to C converter?..." The idea was that using a converter could eliminate the problem of not having a rust compiler for certain platforms.
pbohun commented on Programming with Less Than Nothing   joshmoody.org/blog/progra... · Posted by u/signa11
pbohun · 2 months ago
Haha! You know, I think this is a perfect illustration between something being mathematically beautiful verses pragmatically beautiful. The beauty of one often looks ugly by the standards of the other.
pbohun commented on rlsw – Raylib software OpenGL renderer in less than 5k LOC   github.com/raysan5/raylib... · Posted by u/fschuett
YesBox · 2 months ago
Edit: I missed this was software rendered. I’m one gen-iteration ahead. Prob would still be possible to render my game cpu side provided I use the most efficient sprite depth ordering algorithm possible (my game is isometric pixel art like rollercoaster tycoon)

Ha! That’s what I’m stuck with for Metropolis 1998. I have to use the ancient OpenGL fixed function pipeline (thankfully I discovered an AB extension function in the gl.h file that allows addition fields to be passed to the GPU).

I’m using SFML for the graphics framework which I think is OpenGL 1.x

Game to show what’s possible: https://store.steampowered.com/app/2287430/Metropolis_1998/

pbohun · 2 months ago
Whoah! That's so cool!
pbohun commented on rlsw – Raylib software OpenGL renderer in less than 5k LOC   github.com/raysan5/raylib... · Posted by u/fschuett
pbohun · 2 months ago
What's cool about this is that computers are so fast that you could probably make a decent 2D game using only this software-rendered OpenGL 1.1 library.
pbohun commented on Discord says 70k users may have had their government IDs leaked in breach   theverge.com/news/797051/... · Posted by u/PaulKeeble
pbohun · 3 months ago
The Principle of Least Privilege is one of the foundational aspects of security. Governments should be enforcing that not requiring companies to collect very sensitive information like they are currently doing. Things like "prove your age", digital ID, and Chat Control are actively malicious when it comes to safety, security, and privacy.
pbohun commented on Why the hell does Android even exist anymore?   fireborn.mataroa.blog/blo... · Posted by u/microsoftedging
pbohun · 3 months ago
I know right now there are some privacy-focused distros of Android, but it might be time to just have a fork that moves off in a different direction. I think the only way to have success is create a distro that is very friendly to developers. If you get enough devs creating software for the fork, you can start to get users. I imagine the fork would only be popular with enthusiasts and devs at first.
pbohun commented on Show HN: I recreated Windows XP as my portfolio   mitchivin.com/... · Posted by u/mitchivin
pbohun · 4 months ago
This is cool! I like how you can toggle the pixel effect. A lot of great attention to detail.

u/pbohun

KarmaCake day475November 3, 2015View Original