Go Language Library for Python: Time Handling

Go Language Library for Python: Time Handling

1. Introduction to the LibraryIn Python, we treat time as a first-class citizen using datetime and pandas.Timestamp; in Go, time is divided into three components: time.Time, time.Duration, and time.Location. Consider Go’s time package as the “Swiss Army knife of time for Python programmers,” capable of performing tasks in a zero-dependency binary:• Parsing ISO-8601 timestamps from … Read more

The Rust Safety Declaration: Breaking the 30-Year Memory Management Dilemma

The Rust Safety Declaration: Breaking the 30-Year Memory Management Dilemma

1 Blood and Tears: The Tragedy of 30 Years of Memory Management1.1 Dangling Pointers: The Ghostly Code KillerIn 2014, a financial trading system experienced a memory leak in C++ that caused daily trading delays to soar from 200ms to 15 seconds, resulting in a direct loss of 230 million. Post-analysis revealed that an unreleased std::vector … Read more

Introduction to C++ Multithreaded Concurrent Programming

Introduction to C++ Multithreaded Concurrent Programming

Introduction: Why Do We Need Concurrency? In today’s world, where Moore’s Law is slowing down, the improvement of single-core performance has reached a bottleneck. CPU manufacturers have turned to multi-core architectures, which means modern computers generally have multiple cores capable of executing multiple computational tasks simultaneously. To fully utilize these hardware resources, concurrent programming has … Read more

Introduction to Multithreading in C++11 (Part 1)

Introduction to Multithreading in C++11 (Part 1)

Introduction This series is written because I found my programming skills to be lacking, so I wanted to create a blog to help myself review. I hope it can help everyone (and not mislead too much). If you have any questions, feel free to point them out in the comments. The environment for this article … Read more

Complete Guide to FreeRTOS Mutexes: A Deep Dive from Concurrency Crisis to Priority Inheritance

Complete Guide to FreeRTOS Mutexes: A Deep Dive from Concurrency Crisis to Priority Inheritance

In embedded systems, concurrent access to shared resources by multiple tasks is a common challenge. Without proper synchronization mechanisms, issues such as data inconsistency and deadlocks can lead to system crashes.Mutex (Mutual Exclusion) provides an effective way to address this issue, ensuring that only one task can access shared resources at any given time. Today, … Read more

Switching from Python to Go: Here Are 9 Reasons We Found

Switching from Python to Go: Here Are 9 Reasons We Found

Excerpt from Stream Author: Thierry Schellenbach Translated by: Machine Heart Contributors: Huang Xiaotian, Li Yazhou Switching to a new programming language is often a significant decision, especially when only one member of your team has experience with it. This year, the Stream team transitioned its primary programming language from Python to Go. This article explains … Read more

C++ Concurrency Programming Series (Part 2): Data Synchronization Between Threads

C++ Concurrency Programming Series (Part 2): Data Synchronization Between Threads

In a multithreaded environment, concurrent read and write operations on shared data (global variables, heap memory, static resources, etc.) can lead to the following issues: Data Race resulting in inconsistent logical values after value modification: When multiple threads modify the same data simultaneously, due to non-atomic operations, the final result may be unpredictable.For example, if … Read more