oleg_log
1.76K subscribers
1.86K photos
130 videos
9 files
2.79K links
Shelter for antisocial programmers "Oleg"

halp: @olegkovalov
web: https://olegk.dev
fov: @oleg_fov
chat: @oleg_log_blabla
podcast: @generictalks
Download Telegram
Forwarded from Karim Iskakov - канал (Karim Iskakov)
This media is not supported in your browser
VIEW IN TELEGRAM
OpenAI showed a dexterous human-like robot hand solving Rubik's Cube. Trained entirely in simulation with so-called Automatic Domain Randomization.
🔎 openai.com/blog/solving-rubiks-cube
📉 @loss_function_porn
oleg_log
В #go опять занялись ускорением defer. Вот пропозал https://github.com/golang/proposal/blob/master/design/34481-opencoded-defers.md А вот такие результаты планируется достичь: 1я сейчас, 2я цель, 3я "недостежимый" идеал. With normal (stack-allocated) defers…
Прикольные новости из #go Ускорили дефер (34ns -> 6ns), но при этом паники стали медленнее (62ns -> 255ns) из-за сканирования стека вызовов.

На самом деле это приятные изменения, быстрый дефер это конечно круто, но лишний раз некоторым намекнуть, что кидать паники просто так не стоит.

А еще Go-C-Go ускорили (443ns -> 347ns)

Патч https://go-review.googlesource.com/c/go/+/190098
(пропозал в прикрепленном посте)
Ой как красиво и интересно.
Forwarded from Go Дайджест
Ребята из 99designs рассказывают про уязвимость в AWS ALB за которым стоит Go приложение со стандартным муксом из net/http. 😱

https://99designs.com/blog/engineering/request-smuggling
Я опять полез в стд вещи жавы и узнал забавную вещь. Смотрим класс String, оказывается replaceAll принимает строку и компилит её в регулярку (уже неочевидно из названия, да и странное хотение).

public String replaceAll(String regex, String replacement) {
return Pattern.compile(regex).matcher(this).replaceAll(replacement);
}


Но если пойти в метод compile, то попадём в приватный конструктор с лаконичными именами. Все, лишь бы не писать мерзотные this.foo

private Pattern(String p, int f) {
pattern = p;
flags = f;
...


мда......................................................
Forwarded from DevPassion
Write once. Run away 🏃
DevPassion
Write once. Run away 🏃
от названия канала шутка становится ток глубже
Я про это слышал от пары людей, что много опенсурщины от Uber сделано лишь бы сделать, и вот теперь, после увольнений они начнут умирать (я о проектах).

Как жаль, что погоня за привлекательностью нанесёт пятно на опенсурс.
Forwarded from HN Best Comments
Re: Uber lays off around 350 more across Eats, self-dr...

I worked at Uber from 2014-2018.

Can confirm this. It was a very poorly managed org because it was extremely grassroots driven—leadership was underempowered to say no to front line teams or hold groups accountable.

The overlaps and poorly considered projects described above are not an exaggeration. Many of them were designed for building the lead engineer's open source brand, not for company needs. Half of the projects described above have since been canceled.

Google:

- Hyperbahn

- Cherami

- Schemaless

- Peloton

- uDeploy

- m3db

- piper

- XYS

Contrary to their glossy open source and tech blog presentations, these projects were highly contentious internally and widely viewed as inferior to industry counterparts. Each of these projects had 5-20 engineers working on them for over a year; many of them are being EOLed or phased out currently. And this is just the list that I can publicly talk about. This development came at extraordinary cost for the org and, in the case of the people who were laid off, cost to people's careers.

mooted1, 6 hours ago
HN Best Comments
Re: Uber lays off around 350 more across Eats, self-dr... I worked at Uber from 2014-2018. Can confirm this. It was a very poorly managed org because it was extremely grassroots driven—leadership was underempowered to say no to front line teams or…
И там же соседний пост(коммент) о Uber-scale (https://xn--r1a.website/hn_best_comments/951)

Меня всегда удивляло, как они (на самом деле многие) хвастаются тем, как это сложно создать гео-ориентед продукт, и что там прям супер скейл.

Так, стоп. Гео подразумевает назависимые гео-зоны (в большинстве случаев). Шард на Париж, шард на Берлин, шард на Воронеж и вот у вас 3 мелких проекта, где не надо дебажить рантайм го, потому что у вас трафика 152 рпс, хоть ты на Scaleway хостись.

Да, все конечно детали, но если есть возможность гарантированно разделить проект/данные/трафик на независимые части, то почему бы и нет?
В #go 1.14 могут завести фиксы на goroutine preemption и tight loops. И собственно такой хитрый тест начнет проходить.

Оч надеюсь что это будет под флагом GODEBUG=asyncpreemptoff=1 как сейчас и планируется.

Ишусы о которых речь
https://github.com/golang/go/issues/24543
https://github.com/golang/go/issues/10958
Хорошая статья о sync vs async коммуникации.

Конечно же больше речь о том, как сделать ремоут сотрудников продуктивными (шо, опять?). Статья смотрится как хороший туду-лист, чтобы поправить свои процессы.

https://doist.com/blog/asynchronous-communication/
(Jens Axboe это крутой чел из ФБ который работает над io_uring для ядра Линукса)
твит https://twitter.com/dvyukov/status/1184013909046497280
I think the surprising thing is that people are surprised.
It took basically until now for the bloom to come off the rose. Think about that. For 20 years Google has been supposedly hiring the smartest guys in the room and all it took was free food, some ball pits and slides, contributing some tech to open source, and working on a handful of "moonshots" that haven't gone anywhere to keep the sheen of innovation going. And it worked. For 20 years.

People have been saying Google is the new Microsoft for a few years but it basically took until now for that to become consensus. Microsoft, who's been on the back foot until recently, has recast themselves as the new Open Source Champion, basically using the Google playbook from 20 years ago. And it's working!

If you think about it Apple is the only company that hasn't changed. There's never been a bait and switch. It's always been proprietary. It's always been confident, others would say arrogant about its products. They've never tried to cloak themselves with the mantle of open source. The only reason the tech industry uses their products is because of its inherent qualities. No one had to be tricked into liking them. And they've always been honest about this.

<абзац про прайваси а потом и коменты>

https://news.ycombinator.com/item?id=21049743
oleg_log
Оказывается постгрес не улавливает ручное изменение sequence/serial/etc CREATE TABLE foo ( id SERIAL PRIMARY KEY, content TEXT ); INSERT INTO foo (id, content) VALUES (1, 'bar'); INSERT INTO foo (id, content) VALUES (2, 'baz'); INSERT INTO foo (content)…
Я тут последние вечера допиливал pgstats, эт простенькая либка, котора вытаскивает системные таблицы Постгреса, и конечно же на го.

Мысль родилась еще во времена прикрепленного поста, но покрытие всех таблиц заглохло. Но вот, таки закончил. Стоит еще warmup сделать и докинуть тестов для вменяемости (оказывается тима Постгреса поддерживает каждую версию 5 лет, не знал, думал там LTS есть).

Репка https://github.com/cristalhq/pgstats #hq
А тут конфиг для Github Actions с подниманием Постгреса, пришлось немного подебажить все это, в итоге подключаюсь к 127.0.0.1, хост postgres почему-то не подхватило.

https://github.com/cristalhq/pgstats/blob/master/.github/workflows/build.yml

UPD: уже смотрю доки mysql и clickhouse, почему бы и нет?
В короткой беседе с @itgram_channel я сморозил неплохую фразу: "чтение конфига линтера это чтение кода между строк" (речь шла про golangci-lint).

Чтож я имел в виду? Почитав какие есть проверки, как они настраиваются и какой код они ищут, можно неплохо углубится в язык. Какие бывают конструкции, какие вещи опасны, какие могут трактоваться в разный способ.

Поэтому советую почитать ваш _линтер-нейм_ на наличие конфига, и в неочевидных частях языка покопаетесь, и выключите то, что не надо (к примеру вам).