Account Share

Discover and read the best of Twitter Threads about #golang

Most recents (9)
Another packed room for @xaprb's #golang databases talk at #AllThingsOpen
Go is great for building services! Its syntax is pretty lightweight and easy to use. - @xaprb #AllThingsOpen
Go uses interfaces, which allows you to compose functionality, which is nice. #AllThingsOpen
Read 25 tweets
Adapted from @_rsc's swtch.com/~rsc/talks/thr… , which contains a prime sieve written in shell, but it's broken. I fixed it:
#!/bin/sh

filter()
{
read p || exit
echo $p
while read x; do
if [ `expr $x % $p` != 0 ]; then
echo $x
fi
done | filter
}

seq 2 100 | filter
Compare to the Go program: golang.org/doc/play/sieve… . #golang

Same idea.

Note: This is not the Sieve of Eratosthenes. It's much more expensive. But cool anyway.
Read 3 tweets
i'm finally ready to share my personal story about this whole #golang dependency management process.
Consider it a counterpoint to the story Russ shared last month: . (Please note that he also publicizes private communications in that thread.)
Two weeks ago, i published a screencast that distills the single most essential technical issue (information loss) with the module system that shipped with Go 1.11.

Reasonable fixes should still be possible.
Read 88 tweets
Did Thread Reader help you today?
Support us: We are indie developers! Read more about the story
Become a 💎 Premium member ($30.00/year) and get exclusive features!
Too expensive?
Make a small donation instead. Buy us a coffee ($5) or help for the server cost ($10):
Donate with 😘 Paypal or  Become a Patron 😍 on Patreon.com
The Data Engineering group at The New York Times is hiring for multiple roles #dataengineering @nytdevs
Read 4 tweets
Thrilled by the announcement (blog.golang.org) of the portable #golang cloud APIs, but I feel the hard-fought lessons and wins from portability are being forgotten.
It was an immeasurably great improvement when my code would run anywhere, unedited. Unix and C pioneered that (really dmr and scj).
But now there are a million incompatible Unix variants and clones.
Read 10 tweets
Potential client: You have 1 hour to implement this concurrent #golang program in any language you choose.
Me: uhmm ANY language?
PC: well we have to be able to understand it so no BrainF*ck, no obscure Perl, no AWK
Me: Ok what about shell?
PC: you mean bash?
Me: No I mean shell
PC: isnt’ that BASH?
Me: no.. shell is.. *sigh* that’s like asking me if I mean a DeLorean when I say I want a sports car. In this case “sports car” == “shell” and “DeLorean” == “bash”.
PC: ok so what ZSH?
Me: uhmm something like that but different
PC: sure
Me: for the channels stuff can I use named pipes?
PC: what?
Me: fifos?
PC: You mean writing to the file system? No!
Me: <<debates explaining how named pipes actually work and decides to go another route>>
Me: can I do this in Korn Shell?
PC: isn’t that the same thing?
Read 7 tweets
learn How Compiler Works in 20 minutes xahlee.info/parser/compile…
What's the Difference Between BNF, EBNF, ABNF?
xahlee.info/parser/bnf_ebn…
#golang #haskell #lisp #python
this, still the best book on writing a compiler. Though, not as clear and broad as i thought.
there are thievery pdf versions online, but all code/formula are screwed. You better buy the real thing.
Dragon Book Table of Contents
xahlee.info/parser/dragon_…
Read 46 tweets
Whenever someone from Java or C++ or C# comes to Go, they look for "class", find "struct", and stop looking. #golang
This misses two fundamental differences between Go and "traditional" OO languages. (But for "traditional" read "recent, mostly C-derived".)
The first is that it's not only structs: Any concrete type can have methods: ints, bools, slices, even funcs: golang.org/pkg/net/http/#…
Read 6 tweets
For every fave this tweet gets, I will give you one #golang fun fact
Fact #1: according to the go spec, build tools should resolve imports in alphabetical order in order to ensure initialization remains the sa
Fact #2: -128/-1=-128 in #golang, but only sometimes.
Read 51 tweets
Related hashtags
Did Thread Reader help you today?
Support us: We are indie developers! Read more about the story
Become a 💎 Premium member ($30.00/year) and get exclusive features!
Too expensive?
Make a small donation instead. Buy us a coffee ($5) or help for the server cost ($10):
Donate with 😘 Paypal or  Become a Patron 😍 on Patreon.com