#prog #rust #article
Making Rust binaries smaller by default
TL;DR: в не-debug профилях теперь по умолчанию убираются отладочные символы из std. С ними hello world в профиле release весит ≈4.3MiB, без них — на порядок меньше.
Смешное:
Funnily enough, this change also made compilation time of tiny crates (like helloworld) up to 2x faster on Linux! How could that be, when we’re doing more work, by including stripping in the compilation process? Well, it turns out that the default Linux linker (bfd) is brutally slow, so by removing the debug symbols from the final binary, we actually reduce the amount of work the linker needs to perform, which makes compilation faster.
Making Rust binaries smaller by default
TL;DR: в не-debug профилях теперь по умолчанию убираются отладочные символы из std. С ними hello world в профиле release весит ≈4.3MiB, без них — на порядок меньше.
Смешное:
Funnily enough, this change also made compilation time of tiny crates (like helloworld) up to 2x faster on Linux! How could that be, when we’re doing more work, by including stripping in the compilation process? Well, it turns out that the default Linux linker (bfd) is brutally slow, so by removing the debug symbols from the final binary, we actually reduce the amount of work the linker needs to perform, which makes compilation faster.
Kobzol’s blog
Making Rust binaries smaller by default
Have you ever tried to compile a helloworld Rust program in --release mode? If yes, have you seen its binary size? Suffice to say, it’s not exactly small. Or at least it wasn’t small until recently. This post details how I found about the issue and my attempt…
🔥9👍1😁1
#prog #rust #article
Writing your own Rust linter
Из-за завязанности на внутренности компилятора по понятным причинам итоговый линтер требует конкретную версию nightly, из-за чего несколько страдает UI, но в целом процесс довольно прямолинейный.
Writing your own Rust linter
Из-за завязанности на внутренности компилятора по понятным причинам итоговый линтер требует конкретную версию nightly, из-за чего несколько страдает UI, но в целом процесс довольно прямолинейный.
blog.guillaume-gomez.fr
Writing your own Rust linter
Blog of Guillaume Gomez (Writing your own Rust linter)
👍3
Forwarded from basicoldi
скажите честно, а вы тоже считаете себя самым охренительным в мире инженером, а не average айтишником?
👎21👍10🫡7👌6❤1🤡1💯1
Ruby vs Python, the Definitive FAQ
Наконец-то, по настоящему полезная статья
Наконец-то, по настоящему полезная статья
Hackernoon
Ruby vs Python, the Definitive FAQ | HackerNoon
“<a href="https://hackernoon.com/tagged/python" target="_blank">Python</a> or Ruby” is the one of the most hotly debated topics in the <a href="https://hackernoon.com/tagged/programming" target="_blank">programming</a> world, ranking just behind “emacs or…
Forwarded from Дневник ChatGPT
Если бы наша жизнь была телесериалом, то последний сезон был бы таким странным, что даже создатели 'Твин Пикс' сказали бы: 'Это уже чересчур'.
😢4😭1
#prog #go #article
What’s New in Go 1.22: slices.Concat
<...>
Early versions of the
The issue goes back to what is called the problem of aliasing. <...> But what if you are concatenating the parts of a slice onto itself? Take this example:
A naïve implementation of
<...>
In the end, it was decided that just always returning a new slice would keep the implementation of
(thanks @golang_for_two)
What’s New in Go 1.22: slices.Concat
<...>
Early versions of the
Concat proposal included a destination slice argument, like append. (Concat(dest []T, ss ...[]T) []T.) Why doesn’t the final version of slices.Concat have a destination argument to allow users to reuse an existing slice as backing?The issue goes back to what is called the problem of aliasing. <...> But what if you are concatenating the parts of a slice onto itself? Take this example:
s := []int{1, 2, 3, 4}
_ = slices.ConcatWithDestination(s[:0], s[3:4], s[2:3], s[1:2], s[0:1])
// What is s now?A naïve implementation of
slices.ConcatWithDestination would clobber the 1 at the start of the slice with 4 before copying it onto the end of the slice, so that you end up with 4, 3, 3, 4 instead of 4, 3, 2, 1 as intended.<...>
In the end, it was decided that just always returning a new slice would keep the implementation of
slices.Concat simpler and help prevent any issues with accidentally aliasing a slice and getting unexpected results, so the destination slice argument was dropped.(thanks @golang_for_two)
blog.carlana.net
What’s New in Go 1.22: slices.Concat
The backstory on a new function in the slices package of Go 1.22.
💩10🤡9❤3😁3
#prog #shell #article
The Five Meanings of #. And What Does ${####} Mean?
На тот случай, если вы считаете синтаксис bash простым.
The Five Meanings of #. And What Does ${####} Mean?
На тот случай, если вы считаете синтаксис bash простым.
👍4🥴4
#gamedev #pixelart #video
Пиксель-арт, как и любая двухмерная графика — это не риггинг, в случае изменения внешности персонажа анимацию нужно делать с нуля.
Или нет? В этом видео автор показывает, как можно сделать для пиксель-арта аналог натягивания материалов на трёхмерные модели.
TL;DR: пиксели в анимации вместо того, чтобы описывать непосредственно цвет пикселя при рендеринге, описывают UV-координаты на текстуре, откуда берутся итоговые цвета.
youtu.be/HsOKwUwL1bE
P. S.: можете посмотреть его shorts, человек очень хорош в анимации персонажей в пиксель-арте.
Пиксель-арт, как и любая двухмерная графика — это не риггинг, в случае изменения внешности персонажа анимацию нужно делать с нуля.
Или нет? В этом видео автор показывает, как можно сделать для пиксель-арта аналог натягивания материалов на трёхмерные модели.
TL;DR: пиксели в анимации вместо того, чтобы описывать непосредственно цвет пикселя при рендеринге, описывают UV-координаты на текстуре, откуда берутся итоговые цвета.
youtu.be/HsOKwUwL1bE
P. S.: можете посмотреть его shorts, человек очень хорош в анимации персонажей в пиксель-арте.
YouTube
Pixel Art Animation. Reinvented - Astortion Devlog
In this indie game devlog™, we're taking a look at a simple feature that allows us to easily change the appearance of our characters - without the need to recreate every animation.
=== Wishlist Astortion on Steam ===
https://store.steampowered.com/app/1…
=== Wishlist Astortion on Steam ===
https://store.steampowered.com/app/1…
👍8❤🔥2🔥2
Блог*
#prog #rust #shell #article Обзор года развития Nu. nushell.sh/blog/2020-08-23-year_of_nushell.html
#prog #rust #shell #article
Nushell turns 4 years old!
Вместо обзора развития — истории того, как пользователи используют nu для своих задач.
(а было это в августе. Я тормоз, да)
Nushell turns 4 years old!
Вместо обзора развития — истории того, как пользователи используют nu для своих задач.
(а было это в августе. Я тормоз, да)
www.nushell.sh
Celebrating 4 years of Nushell | Nushell
A new type of shell.
👍9❤1