Golang Insights – Telegram
Golang Insights
760 subscribers
116 photos
7 videos
47 files
131 links
Stay ahead in Golang development with Golang Insights, your go-to for the latest news, tips, tricks, and code examples tailored for Golang enthusiasts and professionals.

Group: https://news.1rj.ru/str/GolangEngineers
Download Telegram
A Crash Course on Distributed Systems.pdf
4.7 MB
A Crash Course on Distributed Systems

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
CrowdStrike Patch 😂😂

https://news.1rj.ru/str/thezoomit/78161


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
7
Scaling_to_1_2_Billion_Daily_API_Requests_with_Caching_at_RevenueCat.pdf
4 MB
Scaling to 1.2 Billion Daily API Requests with Caching at RevenueCat

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
1
دروغ سنج توییتری 😂😂


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
31
This media is not supported in your browser
VIEW IN TELEGRAM
نظر شرکت ها و ارگان های مهم در خصوص آپدیت های ویندوز 😂😂

#bsod #crowdstrike

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
21
تحلیل BSOD پتچ امنیتی CrowdStrike

مشکل اصلی که در نرم‌افزار CrowdStrike رخ داد، به دلیل دسترسی نادرست به حافظه از طریق یک اشاره‌گر تهی (NULL pointer) در زبان برنامه‌نویسی C++ بود. حافظه در کامپیوتر به صورت یک آرایه بزرگ از اعداد سازماندهی شده است. اگر برنامه‌ای تلاش کند به یک آدرس حافظه نامعتبر دسترسی پیدا کند، سیستم‌عامل بلافاصله برنامه را متوقف می‌کند و این موضوع منجر به خرابی سیستم می‌شود.

در این حالت خاص، برنامه سعی کرد به آدرس حافظه 0x9c (که معادل 156 در مبنای 10 است) دسترسی پیدا کند. این آدرس حافظه نامعتبر است و دسترسی به آن باعث می‌شود که سیستم‌عامل برنامه را متوقف کند. این مسئله به دلیل عدم بررسی اشاره‌گر تهی توسط برنامه‌نویس اتفاق افتاد.

برای مثال:

struct Obj {
int a;
int b;
};

Obj* obj = NULL;

print(obj->a);


در این مثال، اشاره‌گر obj تهی (NULL) است. هنگامی که برنامه سعی می‌کند به عضو a از شیء obj دسترسی پیدا کند، به دلیل تهی بودن اشاره‌گر، به یک آدرس نامعتبر دسترسی پیدا می‌کند و باعث خرابی برنامه می‌شود.

این مشکل به‌خصوص خطرناک بود زیرا در یک درایور سیستمی رخ داد. درایورهای سیستمی دسترسی‌های سطح بالایی به منابع سیستم دارند و خرابی در این درایورها می‌تواند منجر به توقف کل سیستم‌عامل و نمایش صفحه آبی مرگ (BSOD) شود.

برای جلوگیری از چنین مشکلاتی، برنامه‌نویسان باید همیشه قبل از دسترسی به اشاره‌گرها، آن‌ها را بررسی کنند. استفاده از زبان‌های برنامه‌نویسی مدرن مانند Rust که از دسترسی‌های نادرست به حافظه جلوگیری می‌کنند، می‌تواند به کاهش این خطرات کمک کند.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
542
☄️ موتور جستجوی سریع و خوش ساخت Meilisearch


میلی سرچ یک موتور جستجوی متن‌باز است که برای ایجاد تجربه‌های جستجوی سریع و مرتبط طراحی شده است. این موتور به‌طور ساده‌ای در برنامه‌ها و وب‌سایت‌ها ادغام می‌شود و راه‌حلی قدرتمند برای جستجو ارائه می‌دهد که هم استفاده از آن آسان است و هم قابلیت تنظیم بالایی دارد.


ویژگی‌های کلیدی

- مناسب برای پروژه های کوچک و متوسط
- بدون هیچ پیچیدگی راه اندازی کنید و سرچ انجین خود را کانفیگ کنید.
- پشتیبانی از هوش مصنوعی برای هوشمند سازی نتایج سرچ
- پشتیبانی از زبان های برنامه نویسی مختلف در قالب کلاینت
- داکیومنت ساده کانفیگ و راه اندازی
- میلی سرچ نتایج جستجو را در کمتر از 50 میلی‌ثانیه نمایش می‌دهد که تجربه‌ای فوری و کاربرپسند را فراهم می‌کند.
- این موتور جستجو در برابر اشتباهات تایپی و غلط‌های املایی مقاوم است و نتایج مرتبط را حتی در صورت وجود اشتباهات جستجو نمایش می‌دهد.
- کاربران می‌توانند با استفاده از فیلترهای سفارشی و رابط‌های جستجوی چندوجهی، تجربه جستجوی خود را بهبود بخشند و نتایج مورد نظر خود را سریع‌تر پیدا کنند.
- میلی سرچ از دیتاست‌های زبان‌های مختلف پشتیبانی می‌کند و برای زبان‌هایی مانند چینی، ژاپنی، فارسی, عبری و زبان‌های لاتین بهینه‌سازی شده است.


https://meilisearch.com/


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
4
ابزار همگام‌سازی دیتابیس با میلی سرچ: Meilibridge


ابزار Meilibridge ابزاری قدرتمند برای همگام‌سازی داده‌ها از دیتابیس‌های SQL و NoSQL به Meilisearch است. این ابزار به شما امکان می‌دهد تا جستجوی سریع و کارآمدی بر روی داده‌های خود داشته باشید.

ویژگی ها
- پشتیبانی از دیتابیس‌های مختلفی مانند MongoDB، MySQL، و PostgreSQL پشتیبانی می‌کند. این انعطاف‌پذیری به شما اجازه می‌دهد تا از منابع داده متنوعی استفاده کنید.
- این ابزار امکان همگام‌سازی داده‌ها بصورت real-time را فراهم می‌کند.
- با Meilibridge می‌توانید داده‌های خود را به صورت عمده (Bulk) همگام‌سازی کنید و انتخاب کنید که آیا فرآیند همگام‌سازی ادامه یابد یا مجدداً ایندکس شود.
- شما می‌توانید فیلدهای مختلفی را برای ایندکس کردن انتخاب کنید و کلید اصلی را برای هر ایندکس تنظیم کنید. همچنین، قابلیت تنظیمات پیشرفته‌ای مانند نمایش فیلدها، فیلترهای قابل استفاده، و قوانین رتبه‌بندی وجود دارد.
- امکان ایجاد چندین bridge برای همگام سازی داده بین دیتابیس به meilisearch های مختلف در یک زمان
- همگاسازی بصورت همزمان

https://github.com/Ja7ad/meilibridge

اگر مایل به مشارکت در پروژه های متن باز هستید در meilibridge تسک هایی داریم که بهبود امکان و ویژگی هایش کمک می کند.

https://github.com/Ja7ad/meilibridge/issues


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
91
Don't forget stop and clear time.Ticker

دقت کنید ()ticker.Stop فقط تایمر را متوقف می کند اما آبجکت ticker باقی می ماند بهتر است پس از توقف آبجکت را nil بزارید.

// Defer the stop of the ticker, help GC to cleanup
defer func() {
// we might want to revist this, go.mod now is 1.16
// however I still encouter the issue on go 1.22.2
// there are 2 issues regarding tickers
// https://go-review.googlesource.com/c/go/+/512355
// https://github.com/golang/go/issues/61542

ticker.Stop()
ticker = nil
}()


#tips

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
9🔥1👏111
A Crash Course on Relational Database Design.pdf
2.6 MB
A Crash Course on Relational Database Design

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
A Crash Course on Domain-Driven Design.pdf
3.2 MB
A Crash Course on Domain-Driven Design

#bytebytego #tips #pro_guide

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
9
Forwarded from 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798
با پیشرفت فنّاوری و توسعه روزافزون استفاده از نرم‌افزارها و هوش مصنوعی، استفاده از ابزارها و مکانیزم‌های مختلفی برای توسعهٔ سریع و باکیفیت نرم‌افزارها ضروری است. در این کتاب مجموعه مواردی بیان شده است که به معرفی و پیاده‌سازی این روش‌ها می‌پردازند. چه برای افزایش دانش در حوزه نرم‌افزار و چه برای آشنایی با ابزارها و روش‌های پیاده‌سازی نرم‌افزارهای مدرن و چه برای آمادگی برای مصاحبه‌های شغلی برای مهندسی نرم‌افزار، این کتاب برای شما بسیار مناسب است.

لینک دانلود کتاب

آدرس گیتهاب این کتاب برای بروزرسانی‌ها

https://system-design.ir
6

☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
33
MeiliShell is a interactive shell for manage Meilisearch

Feature:
- Interactive shell
- Connection check when connect to shell
- Connect to other Meilisearch server with connect command
- Help commands with example
- Meilisearch management with shell
- Standard result of responses

https://github.com/Ja7ad/meilishell


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
🎊 Go 1.22.6 and 1.21.13 are released!

🔈 Announcement: https://groups.google.com/g/golang-announce/c/X4q_-Wf-5g4

⬇️ Download: go.dev/dl/#go1.22.6


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
3
GoLand 2024.2 is Out!

⚙️ New refactoring
📦 Many fixes for remote development and dev containers
🚀 Performance improvements
🚄DX and UX upgrades
🛰️ Better support for Go frameworks and Go language features

Learn more: https://blog.jetbrains.com/go/2024/08/05/goland-2024-2-is-out/


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
3
الگوریتم PickByNestedKey


با استفاده از این الگوریتم شما می توانید value مورد نظر خود را از داخل map های تو در تو بکشید بیرون.

این الگوریتم برای مواقعی که شما میخواهید بصورت implicit با دیتا کار کنید و هیچ اطلاعی از تایپ های داخل map ندارید اما value را میخواهید کمک میکند.


https://gist.github.com/Ja7ad/8fd3b33518f571fbe82caa50ec90385f

تست بنچمارک عملکرد:

goos: linux
goarch: amd64
pkg: github.com/Ja7ad/meilisitemap/utils
cpu: AMD Ryzen 7 5700U with Radeon Graphics
Benchmark_PickByNestedKey
Benchmark_PickByNestedKey/foo.bar.x.y.z
Benchmark_PickByNestedKey/foo.bar.x.y.z-16 8992422 133.7 ns/op 80 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar.x.y.a.0.noscript
Benchmark_PickByNestedKey/foo.bar.x.y.a.0.noscript-16 6467626 182.4 ns/op 112 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar.x.y.a.0.domain
Benchmark_PickByNestedKey/foo.bar.x.y.a.0.domain-16 6328083 188.8 ns/op 112 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar.x.y.a.1.noscript
Benchmark_PickByNestedKey/foo.bar.x.y.a.1.noscript-16 6277484 185.9 ns/op 112 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar.x.y.a.1.domain
Benchmark_PickByNestedKey/foo.bar.x.y.a.1.domain-16 6407796 185.7 ns/op 112 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar.x.y
Benchmark_PickByNestedKey/foo.bar.x.y-16 10424744 111.4 ns/op 64 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo.bar
Benchmark_PickByNestedKey/foo.bar-16 15783884 75.94 ns/op 32 B/op 1 allocs/op
Benchmark_PickByNestedKey/foo
Benchmark_PickByNestedKey/foo-16 22246024 52.19 ns/op 16 B/op 1 allocs/op
PASS



☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
6
🥳 Go 1.23.0 is released!

📝 Release notes: go.dev/doc/go1.23

⬇️ Download: go.dev/dl/#go1.23.0


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM
422
7 must-know runtime complexities for coding interviews:

1. 𝐎(1) - 𝐂𝐨𝐧𝐬𝐭𝐚𝐧𝐭 𝐭𝐢𝐦𝐞
- The runtime doesn't change regardless of the input size.
- Example: Accessing an element in an array by its index.

2. 𝐎(𝐥𝐨𝐠 𝐧) - 𝐋𝐨𝐠𝐚𝐫𝐢𝐭𝐡𝐦𝐢𝐜 𝐭𝐢𝐦𝐞
- The runtime grows slowly as the input size increases. Typically seen in algorithms that divide the problem in half with each step.
- Example: Binary search in a sorted array.

3. 𝐎(𝐧) - 𝐋𝐢𝐧𝐞𝐚𝐫 𝐭𝐢𝐦𝐞
- The runtime grows linearly with the input size.
- Example: Finding an element in an array by iterating through each element.

4. 𝐎(𝐧 𝐥𝐨𝐠 𝐧) - 𝐋𝐢𝐧𝐞𝐚𝐫𝐢𝐭𝐡𝐦𝐢𝐜 𝐭𝐢𝐦𝐞
- The runtime grows slightly faster than linear time. It involves a logarithmic number of operations for each element in the input.
- Example: Sorting an array using quick sort or merge sort.

5. 𝐎(𝐧^2) - 𝐐𝐮𝐚𝐝𝐫𝐚𝐭𝐢𝐜 𝐭𝐢𝐦𝐞
- The runtime grows proportionally to the square of the input size.
- Example: Bubble sort algorithm which compares and potentially swaps every pair of elements.

6. 𝐎(2^𝐧) - 𝐄𝐱𝐩𝐨𝐧𝐞𝐧𝐭𝐢𝐚𝐥 𝐭𝐢𝐦𝐞
- The runtime doubles with each addition to the input. These algorithms become impractical for larger input sizes.
- Example: Generating all subsets of a set.

7. 𝐎(𝐧!) - 𝐅𝐚𝐜𝐭𝐨𝐫𝐢𝐚𝐥 𝐭𝐢𝐦𝐞
- Runtime is proportional to the factorial of the input size.
- Example: Generating all permutations of a set.


☄️ @GoInsights | @GolangEngineers
Please open Telegram to view this post
VIEW IN TELEGRAM