@englishmeta1 · Post #44 · 15.02.2022 г., 15:06
#Basics #Teamjimmy #sirjimmy
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #335 · 29 мар.
В Linux стандартными средствами можно использовать часть оперативной памяти как диск. Для этого требуется указать тип монтирования tmpfs в команде mount mount -t tmpfs -o size=5G tmpfs /mnt/ram Теперь путь /mnt/ram можно использовать как обычный каталог. Для чего это может быть нужно? ▫️ Скорость работы с таким каталогом выше чем многие SSD и тем более HDD. ▫️ Если у вас очень быстрый SSD на NVMe M.2 то такой способ особо не прибавит вам скорости, но поможет сохранить ресурс SSD когда требуется обрабатывать очень много мелких файлов и оперативка позволяет выделить нужный объем. ▫️ Оперативка это энергозависимая память, поэтому выключении питания все файлы безвозвратно теряются. Такой "non persistent" каталог гарантирует удаление временных файлов. Я написал небольшой скрипт для условного теста и сравнения скорости копирования файлов между SSD и RAM. Вот мои результаты: Single File Size: 30.0Gb ssd > ssd: 0:00:12.850 / 2.3Gb/s sdd > ram: 0:00:06.453 / 4.6Gb/s ram > ram: 0:00:06.995 / 4.3Gb/s ram > sdd: 0:00:06.217 / 4.8Gb/s Dir size: 32.7Gb, File count: 11127 ssd > ssd: 0:00:15.063 / 2.2Gb/s sdd > ram: 0:00:08.486 / 3.9Gb/s ram > ram: 0:00:08.032 / 4.1Gb/s ram > sdd: 0:00:07.026 / 4.7Gb/s Скрипт для теста ↗️ На моём железе прирост скорости ~2x. Плюс экономия ресурса SSD. В Windows такой фишки по умолчанию нет, но обязательно найдутся аналогичные решения #linux#triks
Пребарај: #basics
@englishmeta1 · Post #44 · 15.02.2022 г., 15:06
#Basics #Teamjimmy #sirjimmy
Hashtags
@golang · Post #67 · 20.07.2018 г., 18:47
Generally I don’t like aliases but in some cases they might be helpful 😀 #development#basics https://codeburst.io/learn-how-to-create-custom-bash-commands-in-less-than-4-minutes-6d4ceadd9590
Hashtags
@golang · Post #35 · 06.02.2018 г., 07:38
Do you know the difference between “go build” and “go install” commands? Now I sure you will 🙂 #development#basics https://pocketgophers.com/go-install-vs-go-build/
Hashtags
@golang · Post #26 · 27.01.2018 г., 16:15
In the GoLang we use interfaces everywhere. But we also should understand the rules and idioms how GoLang interfaces works. Let’s read about them 😉; part one: #development#basics https://medium.com/golangspec/interfaces-in-go-part-i-4ae53a97479c
Hashtags
@golang · Post #69 · 24.08.2018 г., 10:05
A good reading list with a knowledge base about Golang, based on blog posts and Golang books. Inside of the link: - 3 categories of stages: Beginner, Intermediate, Advanced; - Common questions like “Why should you learn Go?” and “How to Write Go Code” - Web, Concurrency, Code style, Testing and other GoLang related topics. #language#development#basics Add to bookmarks and enjoy the reading! https://github.com/enocom/gopher-reading-list
Hashtags
@golang · Post #46 · 05.03.2018 г., 20:39
Simple and good for understanding tutorial about Golang’s channels. It can help beginners to meet with them and learn to use it without problems 🙂 Keys of the article: - What is a channel, goals, and functions of it; - Deadlocks and other problems; - Channel ranging and closing. When, why and how? #development#basics#language http://guzalexander.com/2013/12/06/golang-channels-tutorial.html
Hashtags
@golang · Post #52 · 22.03.2018 г., 14:57
How to work and use field tags in GoLang? Inside of this article Michał Łowicki from Opera company explains basics and features of tagging; include examples and best practices 🙂 #development#practice#basics https://medium.com/golangspec/tags-in-golang-3e5db0b8ef3e
Hashtags
@golang · Post #47 · 07.03.2018 г., 07:42
One of popularly questions is: How to handle errors correctly? GoLang best practices on the Medium will help with it. Of course, code examples are included 🙂 #development#practice#basics https://medium.com/@sebdah/go-best-practices-error-handling-2d15e1f0c5ee?source=linkShare-b636419a57de-1520408380
Hashtags
@golang · Post #61 · 21.05.2018 г., 19:17
Hi 👋 there! This article is meant for those who’re new to Go and want to start learning about Go’s concurrency primitives: go routines and channels. #development#manual#basics https://medium.com/@trevor4e/learning-gos-concurrency-through-illustrations-8c4aff603b3
Hashtags
@golang · Post #27 · 28.01.2018 г., 12:44
Everybody use dependencies and third-party packages but what is the best way to use it? GopherAcademy helps to understand best practice for the vendor folder organization. Of course, code examples and theory points are included 🙂 #development#basics#manual https://blog.gopheracademy.com/advent-2015/vendor-folder/
Hashtags
@golang · Post #34 · 05.02.2018 г., 08:41
New post about concurrency problems and solutions. Main points with examples: - Blocking Channels; - Blocking Channels Buffer; - Wait Group (run multiple async tasks and wait for them execution); #development#basics#algorithms https://hackernoon.com/concurrency-how-it-can-help-you-and-how-you-can-use-golang-to-reach-it-easily-ae3e070b3d2c
Hashtags
@golang · Post #49 · 11.03.2018 г., 11:39
Top GoLang features that you don’t know or don’t hear so much 🙂 If you want some main points of this article they are here: - GoDoc; - Static code analysis; - Built-in testing and profiling framework; - Race condition detection; - Learning curve; - Reflection; - Opinionatedness; - Culture. #manual#development#basics#language https://medium.freecodecamp.org/here-are-some-amazing-advantages-of-go-that-you-dont-hear-much-about-1af99de3b23a?source=linkShare-b636419a57de-1520768034