Forwarded from Tech Crimes (Architector #4)
🤡12
#культурнаяпрограмма
They're Made out of Meat
(короткий научно-фантастический рассказ, читается за пару минут)
They're Made out of Meat
(короткий научно-фантастический рассказ, читается за пару минут)
www.mit.edu
They're Made out of Meat
👍4🔥1
Почему так много людей интеллектуально деградируют прямо на глазах при виде маленьких детей?
🤡22💯6❤2💩2🤨2🥰1
#game #abnormalprogramming #article
Simulating Rule 110 in Opus Magnum
Ввиду того, что симуляция сколько-нибудь большого пространства в игре затруднена, решение делается для закольцованного поля в 6 клеток. Но даже так это очень впечатляет.
Simulating Rule 110 in Opus Magnum
Ввиду того, что симуляция сколько-нибудь большого пространства в игре затруднена, решение делается для закольцованного поля в 6 клеток. Но даже так это очень впечатляет.
a blog by biggiemac42
Simulating Rule 110 in Opus Magnum - a blog by biggiemac42
As part of the 2022 Opus Magnum tournament, players had to design a machine to simulate the famous Rule 110 cellular automaton.
Знаешь, в чём разница между тобой и ChatGPT?
ChatGPT обучается при помощи интернета.
ChatGPT обучается при помощи интернета.
😁1
Блог*
Причины переехать в Армению: 1. Можно читать twitter без VPN
Причины переехать в Армению:
1. Можно смотреть YouTube без замедления.
1. Можно смотреть YouTube без замедления.
🤡22👌3👍1🤮1💩1😭1
Блог*
#prog #rust #article Лодочник пишет о Pin. Именно, в первой статье — Pin — автор объясняет, для чего нужен Pin и почему решения, предлагаемые на замену, не подходят и были в конечном счёте отброшены при дизайне async/await. В конце автор расписывает проблемы…
#prog #rust #article
What is a place expression?
Раз уж Лодочник оперирует термином place, имеет смысл прочитать текст от Ральфа о том, что это из себя представляет. Заодно он отвечает на вопрос, почему
является UB, а
— не является.
If you only remember one thing from this blog post, then remember that * dereferences a pointer but does not load from memory; instead, all it does is turn the pointer into a place—it is the subsequent implicit place-to-value conversion that performs the actual load.
What is a place expression?
Раз уж Лодочник оперирует термином place, имеет смысл прочитать текст от Ральфа о том, что это из себя представляет. Заодно он отвечает на вопрос, почему
let _x = *std::ptr::null::<i32>();
является UB, а
let _ = *std::ptr::null::<i32>();
— не является.
If you only remember one thing from this blog post, then remember that * dereferences a pointer but does not load from memory; instead, all it does is turn the pointer into a place—it is the subsequent implicit place-to-value conversion that performs the actual load.
www.ralfj.de
What is a place expression?
One of the more subtle aspects of the Rust language is the fact that there are actually two kinds of expressions: value expressions and place expressions. Most of the time, programmers do n...
👍3
Самое тяжёлое животное в мире — это Felis catus.
Потому что невозможно встать, когда кошка лежит у тебя на коленях.
Потому что невозможно встать, когда кошка лежит у тебя на коленях.
🥰14💯1
Дано:
У kubernetes aka k8s есть REST API.
API при успешном выполнении запроса возвращает JSON.
JSON-ы могут быть большими, хочется запрашивать только нужные поля, чтобы меньше гонять трафика по сети.
k8s написан на Go, в котором есть рефлексия, что позволяет получать доступ к полям структур по рантайм-именам.
Вопрос: почему, не смотря на всё вышеперечисленное, в k8s до сих пор можно выборочно запрашивать только очень ограниченный набор полей у каждого вида ресурса?
#бомбёжкипост
У kubernetes aka k8s есть REST API.
API при успешном выполнении запроса возвращает JSON.
JSON-ы могут быть большими, хочется запрашивать только нужные поля, чтобы меньше гонять трафика по сети.
k8s написан на Go, в котором есть рефлексия, что позволяет получать доступ к полям структур по рантайм-именам.
Вопрос: почему, не смотря на всё вышеперечисленное, в k8s до сих пор можно выборочно запрашивать только очень ограниченный набор полей у каждого вида ресурса?
#бомбёжкипост
Kubernetes
Field Selectors
Field selectors let you select Kubernetes objects based on the value of one or more resource fields. Here are some examples of field selector queries:
metadata.name=my-service metadata.namespace!=default status.phase=Pending This kubectl command selects all…
metadata.name=my-service metadata.namespace!=default status.phase=Pending This kubectl command selects all…
#prog #article
Why I Threw Away Perfectly Good Code
One of my recent responsibilities was to improve how Dolt stores JSON documents internally, in order to speed up complicated queries. <...>
And then we scrapped the whole thing. The PR never got merged. We replaced it instead with a different design that shared a lot of the same high-level ideas, but had almost no code reuse. We spent a lot of engineer-hours on the original design, just to throw it all out. Where did we go wrong?
Except... I don't think we did go wrong. I believe that designing and implementing the original prototype was the right call.
I believe that scrapping it was also the right call.
<...>
Scrapping the prototype code and building the final implementation from scratch freed us from any constraints that the old code imposed and kept us from being locked into undesirable trade-offs.
Кстати, как оказалось, несмотря на то, что представление JSON в виде таблицы с JSON-путями в качестве ключей, строго говоря, довольно расточительно, на практике из-за сжатия для формата на диске это не было проблемой.
Why I Threw Away Perfectly Good Code
One of my recent responsibilities was to improve how Dolt stores JSON documents internally, in order to speed up complicated queries. <...>
And then we scrapped the whole thing. The PR never got merged. We replaced it instead with a different design that shared a lot of the same high-level ideas, but had almost no code reuse. We spent a lot of engineer-hours on the original design, just to throw it all out. Where did we go wrong?
Except... I don't think we did go wrong. I believe that designing and implementing the original prototype was the right call.
I believe that scrapping it was also the right call.
<...>
Scrapping the prototype code and building the final implementation from scratch freed us from any constraints that the old code imposed and kept us from being locked into undesirable trade-offs.
Кстати, как оказалось, несмотря на то, что представление JSON в виде таблицы с JSON-путями в качестве ключей, строго говоря, довольно расточительно, на практике из-за сжатия для формата на диске это не было проблемой.
Dolthub
Why I Threw Away Perfectly Good Code
Throwing out code doesn't mean that it wasn't worth writing.