🇺🇦 Go for two :)
1.18K subscribers
22 photos
3 files
184 links
Telegram channel about tricks and engineering practices in the Go programming language over a cup of coffee ☕️.

author: @a_soldatenko
personal blog: https://asoldatenko.org

#golang #go #kubernetes #debugging
加入频道
Forwarded from 🇺🇦 Go performance channel (Oleg Kovalov)
In #Golang 1.20 the Go team introduced an experimental new method of memory management called Go arenas.

In this blog post we show how we combined continuous profiling with memory arenas to improve performance of one of our cloud services by ~8% !

https://pyroscope.io/blog/go-1-20-memory-arenas/
Slides of my talk: "Debugging concurrent programs in Go" in go dev room

https://drive.google.com/file/d/1GoGuQNndiubchq5AjdaHjbaeg29hn6R7/view?usp=sharing
My talk has been highlighted in #golang weekly 🤘 https://golangweekly.com/issues/448
Forwarded from Max
Друзі! Ви, напевно, пам'ятаєте, як я робив збори для хлопців із ЗСУ та інших підрозділів. Хлопців, яких знаю особисто.

Не так давно ми разом з вами вже зробили велику справу — зібрали на два Mavic 3 Combo, Starlink і інші, не меньш важливі на війні штуки. Військові за це ДУЖЕ вдячні вам всім! Але добрих справ в такий час не буває забагато.

Маємо запит на автівку для наших воїнів ССО. Ціль — 260 000 гривень. Допоможемо хлопцям створити для окупанта пекло на нашiй землі.

Кожна гривня, кожен репост — ще один крок до нашої перемоги. Дуже вам вдячний!

🔗Посилання на банку
https://send.monobank.ua/jar/13NzQaQmS

💳Номер картки банки
5375 4112 0530 6157

Paypal: [email protected]
Finally we can use it without many lines of / and &&


Tl;dr:
With all that out the way, we can use a heredoc, executing two commands in the same RUN!:

RUN <<EOF
echo "Hello" >> /hello
echo "World!" >> /hello
EOF

->
https://www.docker.com/blog/introduction-to-heredocs-in-dockerfiles/
Discussion of 1BRC in Go https://github.com/gunnarmorling/1brc/discussions/67

Context: https://twitter.com/gunnarmorling posted a problem https://www.morling.dev/blog/one-billion-row-challenge/ the idea is pretty simple and from another side not so simple:

>write a Java program for retrieving temperature measurement values from a text file and calculating the min, mean, and max temperature per weather station. There’s just one caveat: the file has 1,000,000,000 rows!
Go’s CompareAndSwap is not always Compare-and-swap

>Go's standard package sync/atomics provides programmers with functions to use the underlying CPU-level atomic operations such as compare-and-swap (CAS), through atomic.CompareAndSwapT (where T is an integer type).

> Problem: Not all CPU architectures offers a CAS instruction to rely on to implement atomic.CompareAndSwapT. However, Go must compile that function code to something semantically equivalent—let's see what.

https://lu.sagebl.eu/notes/go-cas/