|
🔗 Stories, Tutorials & Articles |
|
|
|
Introduction to GoLang generics and advanced usage |
|
|
This article discusses generics in the Go programming language, which allow code to work with multiple types of data without the need for separate versions of the code for each type. The article explains how to define type parameters, which are placeholders for the types that the code will work with, and how to use them in code. The article also discusses some of the restrictions on the use of generics in Go and how they are implemented using code generation. The article provides examples of advanced uses of generics in Go, including creating reusable code that can work with multiple types of data and creating type-safe code that enforces constraints on the types that can be used. |
|
|
|
|
|
|
Writing a toy compiler with Go and LLVM |
|
|
This article discusses the LLVM (Low Level Virtual Machine) project, a collection of tools that can be used to build programming languages. It explains the role of a compiler in translating a program from one language to another and the typical structure of a compiler, including the frontend, optimizer, and backend. The article then introduces LLVM IR, the intermediate representation used by the LLVM compiler framework, and explains its structure, including the concepts of a module, function, and basic block. Finally, the article provides an example of LLVM IR generated from a simple C code snippet. |
|
|
|
|
|
|
Highlights from Git 2.39 |
|
|
Another new release of Git is here to end the year! Take a look at some of our highlights on what's new in Git 2.39. |
|
|
|
|
|
|
Resources/Classes to Learn Golang ✅ |
|
|
A long list of resources (websites, tutorials, interviews, and more) to learn Golang and dive into its ecosystem. |
|
|
|
|
|
|
Writing a disk-based key-value store in Golang |
|
|
Bitcask is a disk-based key-value storage engine designed for fast read and write operations. It writes to the file in an append-only mode, avoiding the need for random disk I/O seek. The data is stored in fixed-width records that include metadata about the data such as a checksum, timestamp, and expiry. Bitcask can have multiple datafiles, with only one being active at a time. When the active datafile reaches a certain size, it is rotated and becomes a stale file. Stale files are merged in a process called compaction. Bitcask also has a hash directory that allows for fast key-value lookups and a log file that stores information about the key-value pairs in the database. |
|
|
|
|