惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
L
Lohrmann on Cybersecurity
Google DeepMind News
Google DeepMind News
Schneier on Security
Schneier on Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
The Last Watchdog
The Last Watchdog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News and Events Feed by Topic
P
Proofpoint News Feed
H
Heimdal Security Blog
云风的 BLOG
云风的 BLOG
H
Hacker News: Front Page
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LINUX DO - 最新话题
F
Full Disclosure
小众软件
小众软件
Martin Fowler
Martin Fowler
Security Latest
Security Latest
The Cloudflare Blog
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
I
InfoQ
AI
AI
Blog — PlanetScale
Blog — PlanetScale
I
Intezer
H
Hackread – Cybersecurity News, Data Breaches, AI and More
M
MIT News - Artificial intelligence
V
Vulnerabilities – Threatpost
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
V2EX
N
News and Events Feed by Topic
C
Cybersecurity and Infrastructure Security Agency CISA
T
Troy Hunt's Blog
大猫的无限游戏
大猫的无限游戏
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Register - Security
The Register - Security
Forbes - Security
Forbes - Security
Recent Announcements
Recent Announcements
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cisco Talos Blog
Cisco Talos Blog
Microsoft Azure Blog
Microsoft Azure Blog
A
About on SuperTechFans
S
SegmentFault 最新的问题
S
Securelist
Cloudbric
Cloudbric
T
Tenable Blog
D
Docker

blag

SQLite prefixes its temp files with `etilqs_` - blag Setsum - order agnostic, additive, subtractive checksum - blag Oldest recorded transaction - blag Replacing a cache service with a database - blag SQLite commits are not durable under default settings - blag PSA: SQLite WAL checksums fail silently and may lose data - blag Rickrolling Turso DB (SQLite rewrite in Rust) - blag Collection of insane and fun facts about SQLite - blag How bloom filters made SQLite 10x faster - blag In search of a faster SQLite - blag Galloping Search - blag Building a distributed log using S3 (under 150 lines of Go) - blag Zero Disk Architecture - blag PSA: Most databases do not do checksums by default - blag PSA: SQLite does not do checksums - blag Disaggregated Storage - a brief introduction - blag Why does SQLite (in production) have such a bad rep? - blag SQLite Slaps - blag Now - blag Learning C - blag Snapshot Testing - blag Win: contribution to libSQL (SQLite) codebase - blag Errata in Hekaton MVCC paper - blag Internet is wholesome: MVCC edition - blag It is becoming difficult for me to be productive in Python - blag MongoDB secondary only index - blag Introducing CaskDB – a project to teach you writing a key-value store - blag Recurse Center: Winter Break - blag Recurse Center Day 24: Hacking Go compiler to add a new keyword - blag Recurse Center Day 20: Django v4 upgrade (from v1) - blag Recurse Center Day 19 - blag Recurse Center Day 18 - blag Recurse Center Day 17 - blag Recurse Center Day 16: Open Source - blag Recurse Center Day 15: B Tree Algorithms - blag Recurse Center Day 14: NoSQL Transactions - blag Recurse Center Day 13: Why 'Raft'? - blag Recurse Center Day 12: Isolation Anomalies - blag Recurse Center Day 11: B Tree Insertions - blag Recurse Center Day 10: Learning Distributed Systems - blag Recurse Center Day 9: Papers We Love - blag Recurse Center Day 8: B Tree Fill Factor (Part 2) - blag Recurse Center Day 7: Basics of ncurses - blag Recurse Center Day 6: B Tree Root - blag Recurse Center First Week - blag Recurse Center Day 4: B Tree fill factor - blag Recurse Center Day 3: Hammock Driven Development - blag Recurse Center Day 2: BTree Node - blag Recurse Center Day 1: init - blag What I want to do at Recurse Center - blag Accepted to the Recurse Center! - blag Towards Inserting One Billion Rows in SQLite Under A Minute - blag Marshaling Struct with Special Fields to JSON in Golang - blag I ended up adding duplicate records on a unique index in MongoDB - blag Setting up Github Actions for Hugo - blag Moving to Hugo - blag Catching SIGTERM in Python - blag Git/Github fork-pull request-update cycle - blag Using uWSGI with Python 3 - blag When is my Cake Day? - blag Staying Ahead of Amazon, in Amazon Treasure Hunt Contest - blag How I Am Maintaining Multiple Emails For Git On A Same Machine - blag An exploit on Gaana.com gave me access to their entire User Database - blag Flashing Asus-WRT Merlin by XVortex on NetGear NightHawk R7000 - blag Install Windows 8 UEFI on Legacy BIOS with Clover (and Dual boot with Yosemite) - blag Scraping Javascript page using Python - blag Installing Transmission (remote and CLI) client on Raspberry Pi - blag About - blag Projects - blag
Recurse Center Day 5: Garbage Collection Algorithms - blag
2021-11-06 · via blag

This is a draft post that I have prematurely published. Currently, I am attending RC and I want to write as much as possible, log my daily learnings and activities. But, I also don't want to spend time on grammar and prose, so I am publishing all the posts which usually I'd have kept in my draft folder.

Meet & Greets

We had another meet and greet session! I had one on one with a few, break out room chat with a few others. This is the last session arranged by RC, however, if people are interested there can be more. I am hoping we will have a few more of these and do them more often. I enjoy these because it’s fun to meet new people, learn their experiences and hear about all the interesting things they want to do at RC.

I also found a few people who are interested in my database project. I am hoping to talk with them more and collaborate.

Today I learned about the basics of garbage collection algorithms, from the Crafting Interpreters by Bob Nystrom. It seems there are two kinds of them, Conservative and Precise, but I don’t think I fully understood the distinction. Crafting Interpreters implements a precise garbage collector.

One of the easy algorithms is Mark and Sweep, which was introduced by John McCarthy (who also coined the term garbage collection) in the seminal Lisp paper. The algorithm is fairly simple, which involves two phases:

  1. Mark: Find all the root things and mark them. Recursively find all the things which are pointed by the roots, mark them
  2. Sweep: Anything which is unmarked, should be freed and garbage collected

The book does an amazing job explaining the basics and the algorithm, so go check it out!

B Tree

I spent some time thinking about the B Tree, nodes, and paging. It suddenly dawned on me that I need to write a memory management system too, which

  1. Maintains a list of empty, not full and full pages
  2. Does garbage collection of pages (?)
  3. Does defragmentation of pages, to fill the gaps

My background is in writing web services. Most web programming languages do all these with in-memory data structures. Now I am writing an on-disk data structure, I need to do all of these chores.

Are there any programming languages that come with built in support for disks too?

I also found two good resources which teach about data structures for external memory:

  1. Algorithms and Data Structures for External Memory by Jeffrey Scott Vitter - (pdf)
  2. A data structures book which has two chapters specifically for external storage - link

People

I paired with David today who is writing a compiler for Lisp in C. He was re-implementing the garbage collector. This was a precise garbage collector and this article provided a good starting point. While all these things were new to me, David was kind and incredibly patient, explained new things and provided enough context.

Few things I learned:

  1. A hack to find current stack pointer
  2. Tagged pointers which were used in marking the objects in the mark phase

Presentations

I attended the Presentation session, which happens every Friday (at 1:30 am. my sleep: 😐) where everyone gets five minutes to present on things. This event is open to the current batch of RC and also to alumni. People are free to present to anything, as long as it is technical, it can be about the project they are working on, a tricky bug they run into or something new they learned.

This was a great session, had people talking about a variety of things: someone built a custom keyboard, CSS/Design, meme generator, elixir, handmade hero etc.

I was fully inspired and pumped up to work on my projects.

…and that wrapped my first week at the Recurse Center.