Pavel Skripkin's blog Random notes from OS developer

Subset of JSON parser in 150 lines of Haskell code

Intro

Recently I have started to learn Haskell at my spare time by solving codewars problems time-to-time. This post is about my solution for this kata, since I was impressed by power of applicative parsing and want to document things I have learned during solving.

NOTE: I am no way an expert in Haskell or FP languages, so my solution might be not the best/cleanest/etc.

The task

The task is simple: implement a parser for a subset of JSON. The only big difference from real json is no support for exponential numbers and unicode characters.

Language task suggest to implement has following (BNF)[https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form]:

How to fix a bug in the Linux kernel

Intro

Since the only thing I can do is fixing random kernel bugs, I’d like to show how to understand and fix bugs reported by syzkaller by example. There are a lot of open bugs, so anyone who is looking for first contribution should try it! Most of the bugs really common, but in most cases maintainers do not have much time to fix bugs. It’s great chance to step in and join kernel community by just adding missing validation check or something

Configuration

To fix a bug in the Linux kernel you should at least download the sources. The official tree locates here and you can download it like this