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

推荐订阅源

云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
P
Proofpoint News Feed
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
美团技术团队
D
Docker
博客园 - Franky
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

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 7: Basics of ncurses - blag
2021-11-10 · 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.

Ask stupid questions!

I read this lovely article on asking stupid questions by Nikita Kazakov. A TLDR would be:

B Tree

I started hand drawing the B Tree algorithm (I will add the pictures shortly), it immensely helped to understand the basics. Right now, I updated my code to do inserts in root and handle root splits.

B Tree Invariants

I started making a small comic/drawing explaining the properties of B Tree. I will update it here.

I paired with Sarah today to work on her 2D ‘Snake’ game which is being written in C. We worked on a bug where it was not detecting the arrow keys properly. While doing that, I learned a couple of new things about ncurses and the terminal:

  1. When arrows keys are pressed, they are displayed as \033[A (up), \033[B (down) etc. They are not multiple characters and the keyboard sends a single integer value representing them e.g. 259 (up), 258 (down) etc. These values could be OS specific, so better use the values from ncurses to match. Here is a sample program:

     #include <curses.h>
     int main() {
       initscr();
       keypad(stdscr, TRUE);
       int c = getch();
       if (c == KEY_UP) { // notice this KEY_UP? this comes from ncurses
         printf("you pressed UP! (%d)\n", c);
       }
     }
    
  2. No need to load the key presses into char or any other data structure. Loading it into int is enough, it can capture the arrow keys

  3. If you are on macOS, you need to call the keypad method, like shown in the snippet earlier. I found this info in this Stackoverflow post

  4. I found this nice article called Interfacing with the key board which was very helpful. It comes with a sample program, that was enough to write my own