Blogs / Personal blogs

Peteris Krumins

catonmat.net

catonmat.net

Popular posts
57
Total points
9,150
HN comments
3,576
Rank
#90 personal

Visit catonmat.net → RSS feedOn Hacker News May 2008 – Nov 2024

Software Engineering 42Tools & Productivity 18Math & Algorithms 9Web & Frontend 7Systems & Performance 7Startups 5

5

Low Level Bit Hacks You Absolutely Must Know

I decided to write an article about a thing that is second nature to embedded systems programmers – low level bit hacks. Bit hacks are ingenious little programming tricks that manipulate integers in a smart and efficient manner. Instead of performing operations (such as counting the number of 1 bits in an integer)…

8

My favorite regex of all time

I thought I'd share my favorite regex of all time. [ -~] Any idea what this regexp matches? Scroll down for the answer. . . . . . . . . It matches all ASCII characters from the space to tilde. What are these characters? These are all printable characters! Take a look at this ASCII table. Printable characters start…

13

ldd arbitrary code execution (2009)

The `ldd` utility is more vulnerable than you think. It's frequently used by programmers and system administrators to determine the dynamic library dependencies of executables. Sounds pretty innocent, right? Wrong! In this article I am going to show you how to create an executable that runs arbitrary code if it's...

17

A proof that Unix utility sed is Turing complete

Many people are surprised to learn that `sed`, a seemingly simple text filtering program, is actually Turing complete. This realization prompts the question: how can a text processing utility achieve such computational power? The answer lies in sed's fundamental operations. Essentially, sed functions as a miniature...

20

Top Ten One-Liners from CommandLineFu Explained

I love working in the shell. Mastery of shell lets you get things done in seconds, rather than minutes or hours, if you chose to write a program instead. In this article I'd like to explain the top one-liners from the commandlinefu.com. It's a user-driven website where people get to choose the best and most useful...

21

Something about functions in Bash (2017)

Here's something you didn't know about bash functions. Usually when you write a function you do this: function name () { ... } Right? I know you do, because that's how everyone writes functions. Well, here's the thing. In bash { ... } doesn't mean "function's body" or "function's scope" as in JavaScript or C. It's...

23

A Unix Utility to Know About: lsof (2009)

This is the third post in the article series about Unix and Linux utilities that you should know about. In this post I will take you through the useful lsof tool. If netcat was called the Swiss Army Knife of Network Connections, then I'd call lsof the Swiss Army Knife of Unix debugging. Lsof follows Unix philosophy...

27

Frameworks Don't Make Much Sense

Frameworks are one of the hugest anti-patterns in software development. They're hard to learn. They limit your creativity. They increase your project's complexity and dependencies. They go out of business and get abandoned. You have to maintain and upgrade your code to match the latest framework versions for no good...

28

My Job Interview at Google (2008)

A while ago I had an on-site job interview at Google. The position I was interviewing for was a Google SRE. SRE stands for Site Reliability Engineering. Site reliability engineers (SREs) are both software engineers and systems administrators, responsible for Google's production services end-to-end. I interviewed…