Skip to content

Instantly share code, notes, and snippets.

View dungsaga's full-sized avatar
👻
ghost in the machine

DungSaga dungsaga

👻
ghost in the machine
View GitHub Profile

Program Analysis, a Big Happy Family

The idea behind program analysis is simple, right? You just want to know stuff about your program before it runs, usually because you don't want unexpected problems to arise (those are better in movies.) Then why looking at Wikipedia gives you headaches? Just so many approaches, tools, languages 🤯

In this article I would like to give a glimpse of an overarching approach to program analysis, based on ideas from abstract interpretation. My goal is not to pinpoint a specific technique, but rather show how they have common core concepts, the differences being due mostly to algorithmic challenges. In other words, static analysis have a shared goal, but it's a challenge to make them precise and performant.

Code is meant to be executed by a computer. Take the following very simple function:

fun cantulupe(x) = {
@yoavg
yoavg / stochastic-critique.md
Last active January 5, 2025 10:43
A criticism of Stochastic Parrots

A criticism of "On the Dangers of Stochastic Parrots: Can Languae Models be Too Big"

Yoav Goldberg, Jan 23, 2021.

The FAccT paper "On the Dangers of Stochastic Parrots: Can Languae Models be Too Big" by Bender, Gebru, McMillan-Major and Shmitchell has been the center of a controversary recently. The final version is now out, and, owing a lot to this controversary, would undoubtly become very widely read. I read an earlier draft of the paper, and I think that the new and updated final version is much improved in many ways: kudos for the authors for this upgrade. I also agree with and endorse most of the content. This is important stuff, you should read it.

However, I do find some aspects of the paper (and the resulting discourse around it and around technology) to be problematic. These weren't clear to me when initially reading the first draft several months ago, but they became very clear to me now. These points are for the most part

@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active April 8, 2025 07:50
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@lostintangent
lostintangent / flood-the-valley.markdown
Last active December 15, 2023 19:58
🌊 Flood the Valley
@d0lfyn
d0lfyn / 20210103-computational-counterpoint-(original).rb
Last active November 9, 2023 09:16
'Computational Counterpoint' for Sonic Pi (dedicated to Steve Reich)
##| computational organisms (computational counterpoint, dedicated to Steve Reich)
##| v0.0.3 (20210103)
##| by d0lfyn (twitter: @0delphini)
##|
##| a development of "pattern-oriented" music, this program creates
##| worlds in which patterns live, evolve, and interweave
##|
##| history:
##| v0.0.1 (20210102)
##| + initial implementation
@d0lfyn
d0lfyn / 20210102-computational-organisms.rb
Last active November 9, 2023 09:16
Computational Organisms for Sonic Pi
##| computational organisms
##| environment
use_bpm 480;
# t = Time.new;
# use_random_seed ((t.to_i * 1000000000) + t.nsec);
use_random_seed Time.new.to_i;
# use_random_seed 0;
<!DOCTYPE html>
<html lang="en">
<body>
<button id="button">play greeting</button>
<script>
const greeting = () => {
window.speechSynthesis.onvoiceschanged = function () {
window.speechSynthesis.cancel();
window.speechSynthesis.getVoices();
@lostintangent
lostintangent / codeswing.json
Last active August 21, 2023 08:39
Happy Birthday JavaScript!
{
"scripts": [
"react",
"react-dom"
],
"styles": []
}