Bookmarks

From miki
Revision as of 16:28, 21 June 2022 by Mip (talk | contribs) (→‎Hacking)
Jump to navigation Jump to search
Show how many times frustrated Linux kernel developers have put four letter words into the source code.
An online tool to provide custom-sized placeholder images of Bill Murray! http://fillmurray.com/200/300.
I like the humor and layout of the page. Images are superb.
Check also PlaceCage (Nick Cage Filler Images) and Steven SeGALLERY (Steven Segal Filler Images) :-D
An amazing video from A Capella Science on biology science. Amazing song. More to see on the YouTube channel.

AI / ML

Student's post about replicating OpenAI's GPT2 1.5B dataset, and is about to release it, and long explanation why. GPT2 generates very interesting samples. Humanity success is more because of collaboration / trust, than intelligence, and our ability has human to identify trustable information. If we have a system charged with detecting what we can and can’t trust, we aren’t removing our need to invest trust, we are only moving our trust from our own faculties to those of the machine.
A book praised by HN [1].
Amazing page detailing the mathematics behind gaussian processes.
A report on how fly brain compares and processes different colors, and solves the problem of locality-sensitive hash. Very clear and simple explanations.
Nice animations. Looks simple to understand...
Generate new images (portraits, landscapes, album covers...) by mixing together images to generate new ones.
New word invented and defined by an AI, using GPT-2.
Suggested on HN.
An interactive room where you can build your own custom music.
Beyond the subject, what I like is the nice animations, and the simple explanation.
Very nice article on how to use projection-based hashing to very quickly find neighbours in a dataset
The world’s largest openly available image-text-pair dataset with 400 million samples. There is an online browser: https://rom1504.github.io/clip-retrieval/. Enter any query (a bicycle in the wood), and it returns relevant pictures.
A ML experiment to generate "lowest" and "uppest" case letter from standard pairs of lowercase / uppercase letter. The ML engine is trained to generate the corresponding lower or upper case letter from any letter. Using that engine we can generate the lowercase variant of an already lower case letter, giving a "lowestcase" letter, etc ;-)

Mathemathics

Correlation is not causation.
  • Tangente n°182, p34-35, "Les excès de la corrélation".
Nous allons vers un changement épistémologique majeur. S'en remettre à ce type de calcul traduit un renoncement aux ambitions de la raison moderne, qui liait les phénomènes à leurs causes. Ces ambitions de la raison permettaient d'envisager la prévention, d'agir sur les causes pour changes les effets. Au lieu de cela, on se dirige vers un système de pures corrélations. [...] On ne cherche plus à comprendre l'environnement, on cherche à le prédire. Notre rapport au savoir change, mais aussi notre rapport au monde: on se focalise davantage qu'auparavant sur les risques. "Voir et comprendre" sont supplantés par détecter et prévenir". On passe d'une civilisation du signe, qui était porteur de sens, à une civilisation du signal, qui est une donnée qui ne signifie rien en soi..
How to cut fairly a cake in three (and more) pieces.
The evolution of trust — a fun lecture for understanding game theory in a broader context.
Interesting post about big numbers, including Ackerman series (tetration, etc), and Busy Beaver function (maximum number of steps than a valid n-state turing machine would execute -- that is roughly the execution time of the most complex machine excluding non-halting ones). Updated post here and also discussion on HN.
A very fast web application showing particle movements in force field. Very fast. See example.
Answer from Terrence Tao about properties of good notation systems (taking dot/scalar product as example).
Rendering equation (LaTeX) in Jupyter, with value substitution. Nice examples, and lots of features.
A nice explanation on the Monty Hall problem (2 goats and one car behind a door, pick a door, have presentator pick another one with goat, and ask whether to switch or not)
A nice detailed explanation of the Gödel proof regarding consistency and completeness.
A javascript plotter using random sampling to plot solutions of any f(x,y)=0, including pathological ones.

Sciences

Many exercices in Python on the theme of bioinformatics.
The 10 phases you go through when reading a scientific papers. More tips to read these papers here.
All Maxwell equations in a single space-time oneliner (see also WP).

Tools

  • oclif, an open source framework for building a command line interface (CLI) in Node.js.
  • Mosh, a mobile SSH client.
  • Live Chat online typing test
  • Warp, create self-contained single binary applications.
  • Goosh.org, an unofficial Google shell.
  • Jit.si, an open-source videoconferencing service.
  • Mumble, an open-source VoIP solution (alternative to TeamSpeak and Discord).
  • Jumpfiles, a framework to setup jumpfiles in Shell, to quickly record/edit/recall long commands with shorthand equivalent.

Services

  • Guerrilla Mail, a service to create easily temporary mail addresses for use on (untrusted) web site for registration, etc.

Apps

  • Krita 4.0 released, Krita is a professional FREE and open source painting program.
  • Draw.io — a free alternative to Visio, very powerful and that integrates nicely in many online platforms (GitLab...). Available offline, and as stand-alone executable as well.
  • Excalidraw — A nice drawing tool, making handwriting-like drawings. Nice for presentations.
  • Mermaid — lets you create diagrams and visualizations using text and code (flowchart, sequence diagram, gantt diagram, class diagram, git graph) (also discussed here)

Books

A book on algorithmic problem solving, the art of formulating efficient methods that solve problems of a mathematical nature.
Online digital book on typography from Matthew Butterick, including tips to learn typography in ten minutes.
OpenGL, WebGL, 3D, Blender...
prime numbers, probabilities, logarithms, graph theory, gcd/lcm...
  • Recommended books for development (source HN):
  • The Practical Programmer,
  • Code Complete,
  • Design Patterns, from the Gang of Four,
  • Refactoring, from Martin Flower,
  • The Practice of Programming, from Kernighan and Pike’s,

Dev

Crystal-clear tutorial on how to use strace, lsof and gdb to debug inter-process issues on Linux.
open source Python graphing library, with Javascript interaction.
An optimization guide for assembly programmers and compiler makers By Agner Fog. Technical University of Denmar.
Nine reasons why Lisp and Racket are good programming languages. From Matthew Butterick, author of the book Practical Typography and of Pollen, a digital book publishing system.
Don't reinvent the wheels. Reference solutions to common problems in *many* languages.

Rust

Many interesting comments on RUST, and how to write / debug programs with concurrency/performance in mind.

Methodology

5 reasons not to rewrite an existing code.
About the mistake of full rewrite (Netscape 6, Borland Quattro Pro). Instead refactor, rename,
Instead of rewriting, write a strangler application, that will progressively replace the old system.
Tesler's Law, also known as The Law of Conservation of Complexity, states that for any system there is a certain amount of complexity which cannot be reduced.
About Semantic Versioning and tips / pits to introduce new functionality, and fixing security bugs.
Don't build technology unless you feel the pain of not having it. Then: First make it possible. Then make it beautiful. Then make it fast. Use cases are everything in suffering-oriented programming.
Nice write-up from a designer at Uber on why simple and clean design is better than applying patterns or using architecture tools.
Many nice quotes:
  • "I no longer think about code lines as an asset to be accumulated, but rather as an expenditure to be avoided."
  • Edsger Djikstra: If we wish to count lines of code, we should not regard them as “lines produced” but as “lines spent”: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger.
  • Bill Gates: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight."
  • Old military saying: “Slow is smooth, and smooth is fast”
  • A mom / Lewis Caroll: "The hurrie(de)r I go, the behinder I get!", aka "more haste, less speed".
  • Motorcycle racing: "a fast rider has slow hands".
Explain a three-pass technique to read scientific paper (1st intro and conclusion and sub-section titles, 2nd read deeper but skip details like proof but pay attention to graphs, 3rd virtually redo the paper).
Some advices on how to accept and deal with breaks. Maintain a continuous context in notes (at least every 30min). Focus on one current task, other are distraction. Current task must be clearly identified. Plan next task using negative priority (don't include every task, only consider the one with worst consequence if not included).
An anti-coding style guideline.
Several wise quotes about coding. Some of them:
  • Premature optimization is the root of all evil. Donald Knuth
  • Rules of optimization: 1. Don’t! 2. Don’t… yet. 3. Profile before optimizing. Michael Jackson
  • As a programmer, never underestimate your ability to come up with ridiculously complex solutions for simple problems. Thomas Fuchs
  • Get your data structures correct first, and the rest of the program will write itself. David Jones
  • The #1 rule of distribute computing: Don’t distribute your computing! At least if you can in any way avoid it. DHH (David Heinemeier Hanson)
  • Scalability. The #1 problem people don’t actually have but still solve. Eberhard Wolff
  • Shared + Mutable = Danger! Andrey Breslav
  • Prefer duplication over the wrong abstraction. Sandi Metz
  • Compassionate Tech Values: Ego < Humility. Elitism < Inclusion. Competition < Cooperation. Being Smart < Learning. Being a Rockstar < Being a Mentor. April Wensel

/* KISS > DRY

Pick a stable language (C, Ada...). Avoid/wrap compiler language extensions.
Use / learn the standard library (see here for C std lib), and know the gotchas.
Use POSIX (must define _POSIX_C_SOURCE).
Deal with OS extras (use config.mk in Makefile. See link for example of configure script to test compiler features). Wrap OS functions behind our own.
Deal with third-party libraries. Use pkg-config to find and deal with dependency libraries (or create your own). Use POSIX search.h for simple collection libraries, or C Algorithms for a small and clean library. See also Uthash.
For user interface, there is readline ncurses and SDL2.
Define your Minimal Viable Product. Don't fear refactoring, we cannot avoid it (too many unknowns). Minimize your dependencies (external libs)
Detailed but clear explaination on how the lead maintainer of Curl uses git everyday. No merge but rebase. Commit rewrite. Scripts for release note. CI. We should do the same.

Learn

From Xv6, a simple Unix-like teaching operating system
All participants spent most of their time studying examples, rather than reading the language documentation.
Illustrate the Shlemiel the painter’s algorithm when concatenating C strings where performance is n^2 because of the lack of efficient strlen() operator.
With lots of links, recommended books, languages (Racket, C, Javascript...), discrete mathematics...
A technique to learn complex concepts in record time, retain knowledge, and study more efficiently. First, write the name of the concept. Second, write out an explanation of the concept, as if explaining to a layman. Then pinpoint gaps into the explanation, and go back to source material, and repeat previous step. Finally, put the editor's hat, and rewrite the whole (filter wordy / confusing / complex language).
The fastest way to learn a new language from example code. Has course for MANY languages.
An interactive page to learn using D3.
Cassidy Williams is a well-known dev with lots of quality screencast. Here teaching React, using codesandbox.io as a platform.
An instant IDE and prototyping tool for rapid web development.
Interesting comment on how to learn to code, making a difference between learning to code and learning a programming language. Refer to http://htdp.org/ How To Design Program, a subsest of Racket, and the 34 paradigms and 18 concepts identified by Pr. Peter Van Roy (UCL) in http://www.info.ucl.ac.be/~pvr/paradigms.
(link to the book in PDF) A set of exercises once available on a website, teaching Python. Recommended on HN.
A set of lessons. Recommended on HN. Do 1 lesson a day.
An adventure game to learn the linux commands.
Learn languages interactively.
Nice engine to make nice little program in js, with animation, etc.

Web

Delay non-critical task to idle thread, while forcing their execution if some user event depend on that task being executed first.
A detailed post on some techniques to make front-end web apps load faster and provide a good user experience.
Bring user-generated content to static sites.
Fullscreen API, Clipboard async API...
No need for a long post ;-)
A search engine to find colors best corresponding to word or sentence.
  • emscripten and V86, that provide a compiler and x86 virtual machine to Web Assembly, that allows running x86 machine in the browser!!!
See x86 assembly doesn’t have to be scary (interactive) for a demo, and nice write up on x86 asm.
Set of tools, services, solutions to allow scraping content from the internet without being detected (including proxy services...).
This uses WebRTC. See HN comments. Alternatives are https://wormhole.app/, https://www.sharedrop.io/, and https://file.pizza/.
  • HUGO, A fast and lightweight static web site builder.
Advertised on this page, which also shows nice way to make analysis / analytics of web engine (nginx, using goaccess).

Network

Every byte of a TLS connection explained and reproduced.
Clear, simplified explanation on how to setup a server when facing more and more users (split out DB, split out client/API, add load balancer, add CDN, add database cache and read replica). More discussions on Hacker News.
Detailed but clear description of the handshake at the start of HTTPS, including crypto details, etc.
A detailed analysis of how NAT works and impact on connections like SSH. Provide some tools to inverstigate such as tcp-send-test, tcp-recv-test and tcp-keepalive-test. Setting ServerAliveInterval fixed his problem.
Using PiHole, installed in a Docker container.

Game

Detailed explanation on how to make a fast tile-based game engine. Tricks used:
  • Use LEA instruction, most efficient to move bytes, but requiring modifying the stack pointer.
  • Pre-process the tiles to cancel effect of fast rendering loop
  • Reverse display order to cancel graphical corruption when interrupt occurs and load registers on the stack.
Detailed explanation on 2D game optimization for a Super-Mario-like game. Various tricks are explained about fast scrolling, fast sprite handling...
  • Background is generated by a LEA-field, basically a sequence of code generated by the game engine, and when executed, draw pixel to the screen buffer. The LEA-field is organized into sequence of code, each drawing a given scanline.
  • Scrolling is obtained by a different offset in the scanline.
  • When scrolling, the code in leftmost/rightmost columns of the LEA-field must be updated. This update is done by a code, which is also generated by the engine. This column-update code is generated to avoid duplicate register loading (typ. occurs when the scene has many duplicated pixels, like a blue sky).
  • Sprite is also generated by a code, generated from sprite data.
A very fast tile engine for the Apple IIGS, using advanced techniques to achieve 1 pixels every 1.25 cycles.
Amazing tutorial on how to create light & shadow effect in 2D games.
A detailed review of how Another World was ported on different platform, here on Amiga (original port) and IBM PC. On Amiga, this explains the essential features of the blitter to reach the 20FPS. On PC, it explains how the VGA latch registers are used to perform masked copy, and allow a 4x / 8x speed up.
Interesting blog about alternative ranking system than ELO/Glicko/TruSkill, that gives less complaints from user. HN comments.
  • On multi-player game design:

CVS

Explain how to obtain perfect patch using digle (directed graph file) instead of files, as used in pijul, with some mathematical background.

Languages

A Scheme/Lisp language.
A language for pipe-based programming. Amazing master thesis, clearly written!
A Python library to write games with zero boilerplate.
Many pages on Haskell on different subjects.
Some advanced stuff on Lisp I need to read someday when I retire (HN comments).

Design

  1. Contrast — Elements of your design (colour, size, weight, style) should be either exactly the same, or significantly different.
  2. Consistency — Make sure similar elements appear in similar ways.
  3. Occam's Razors (aka Reduce Visual Noise) — The fewer the number of elements you use in your design, the better.
  4. Space — The way things are positioned sends a meta-level message about their meaning. This deals with proximity (= relatedness), with negative space, and with importance and order.
What’s faster, incrementing a std::vector of uint8_t or of uint32_t? This is analyzed carefully, with surprising results. It turns out that uint8_t is much slower because of pointer aliasing issues that prevent the compiler to use vector instructions. To fix it, one much avoid any reference to std::vector data in the loop:
for (auto i = v.begin(), e = v.end(); i != e; ++i) {
    (*i)++;
}
Or another solution is to use keyword __restrict.
"Good design is as little design as possible." - some German motherfucker
Google product director: "obvious always win." Example: explicit bottom navigation menu better than hamburger button; segmented control menu better than toggle menu; text better than icon. Also, copying does not guarantee obvious design.
Accessibility rules require a minimum contrast ratio of 4.5+ for small text and 3.0+ for text. It can be very difficult to design a color palette that fits these requirement, while still keeping rich and vivid colors. Color systems like RGB or HSL don't integrate human color perception. In this post, authors explained how they designed their own tool to define the best palette with accessible colors.
Four books on open source programs (500-line example programs, performance, architecture). Very clear.
Comparing switch with polymorphism regarding extensibility / flexibility (and readability), and also performance, on Scala. Turns out switch is more flexible and more performant.
Focus on content, then center, font family, spacing, color & contrast, balance... See also CSS in 44 minutes (44-page pdf]

Graphism

An interesting dive into dithering techniques, with examples and code.

Tools

Inline tool to analyze / compare the assembly code produced by many compilers in many languages.
Nice and very detailed write-up on how to use GitHub actions, that can trigger on various events (push, issue creation). Using Typescript, YAML, Node.js...
Amazing web integration platform built for developers. Develop any workflow, based on any trigger. Workflows are code, which you can run for free. No server or cloud resources to manage. Very easy to develop.
A free book on reverse engineering, more than 1000 pages!
jq is to json file what sed is to text file. Example of use here.
A nice summary of how to use Graphviz to produce diagrams from code.
inal-based presentation tool with colors and effects.
A resilient, scalable tracing and analysis system for SW development. Report various metrics. Seems quite powerful.
A simple application of netpbm library to visualize easily some data using only printf/echo command.
About a general package manager called Nix. Looks very powerful. Crystal clear post.
A build system with focus on speed.
An alternative to ls with better defaults, to list files in the terminal.
A simple and effective cron job monitoring. Provide dashboard and notifications when period jobs are not completed. Seems very easy to use.
A docker image to easily deploy nginx proxy, to protect self-hosted application (from here).
linkding is a simple bookmark service that you can host yourself. It's designed be to be minimal, fast and easy to set up using Docker (from here).
Feather Wiki is an app for creating personal non-linear notebooks, databases, and wikis that is entirely self-contained and runs in your browser.
redbean is a webserver in a zip executable that runs on six operating systems.

Functional programming

Detailed post on the differences between functor, applicative and monad (using OCaml and Haskell).
An overview of koka, a research language that tries to formalize effects (exception, divergence). Discussion over composition, monads, etc. See also this article (perceus) about advanced reference counting.

Concurrency / multi-threading

Clear description of locking issues (incl. priority inversion), and tips on concurrency when using an audio thread: Don't lock, don't call lib with unbounded exec time (like malloc), use only (aligned) byte/half-word/word assiment (which are atomic), use lock-less data structures (eg. TPCircularBuffer). And a goodies: Billy Joel and Jimmy Fallon Form 2-Man Doo-Wop Group Using iPad App.
More advices on real-time programming techniques.
The danger of not using locks. Compiler are free to reorder memory access because of the as if rule. Some CPU are also allowed to reorder these accesses. volatile cannot be reordered, but only versus other volatile access. Using lock-free programming is usually not portable. We can use MemoryBarrier() in VC2005, or _ReadWriteBarrier, but they are expensive. Better solution is to use C++11 std::atomic:
// Producer thread:
Data_t g_data1, g_data2, g_data3;
std::atomic<bool> g_flag // Look at this!

g_data1 = calc1();
g_data2 = calc2();
g_data3 = calc3();
// g_flag = true; // Indicate that the data is ready for consumption.
// ... or better:
g_flag.store(true, std::memory_order_release);

// Consumer thread:
if (g_flag.load(std::memory_order_acquire)) {
  DoSomething(g_data1, g_data1, g_data2, g_data3);
Busy loop is usually very bad: wasted power, live lock, CPU starvation, CPU or GPU perf loss, increased cache usage.
  • If busy waiting: cap it, do normal read, and use YieldProcessor().
  • Don't use sleep(0).
  • Don't use smalllock.
  • Use a CRITICAL_SECTION, a futex or a lightweight mutex such as benaphore.

Algorithms / libraries

Detailed explanation of how TimSort works, why it is so fast on real arrays with natural runs.
μPlot is a very fast and memory-efficient time series chart based on Canvas 2D (javascript).
Amazing interactive page demonstrating the effect of a picture smoothing algorithm, with detailed explanation and variations, with running code (observablehq.com).
Very nice introduction to Three.js, a WebGL-powered visualization library. Very powerful library, for 3D rendering in browser, in javascript, and generating WebGL.
a library for designing GUI in C++, with support of a variety of platforms.
A list of single file libraries in many different categories (AI, argv, audio, compression, crypto, data structures, debugging, math, pictures, video...).
Efficient, single-machine system for performing data mining tasks on large graphs. Presentation is very cool, with nice animations.
An impressive study on how to generate random-looking sequence with better sampling properties than uniform distribution while less regular than lattice.
An efficient hash / PRNG function.
Analysis and implementations of Knuth Algorithm D, on unsigned integer division.
Pixie is a 2D graphics library similar to Cairo and Skia written (almost) entirely in Nim.
A very detailed blog on how the VSCode team managed to make a bracket colorization extension 10,000x faster, using advanced algorithms, (2,3)-Trees, recursive descent parser, Abstract Syntax Tree, with detailed complexity evaluation.
A nice write-up in Rust on how to solve NP-hard problem efficiently, using algorithm techniques like State tracking (don't scan the same state twice), Entropy reduction (identify states that are symmetric, and scan only one of them), A* Search (scan next states according to an heuristic, which gives an estimate of the minimum distance to a solution but never overestimate it), and implementation techniques like reducing allocations (avoid allocating objects on the heap), profiling, container pre-sizing. Also it is recommended to benchmark the optimization regularly to evaluate the real gain.
Other mentionned algorithms are Linear bottleneck assignment problem, and Assignment problem.
A compact way to encode n-choose-k on the minimal binary form. This uses the Combinatorial Number System. It practically means to assign an index to each possible choice, and decode the index for the given n (recursively). A dense formulation of the method is available on HN:
0. set y = 1. set x = 0.
1. How many possible choices are there _given what we've picked so far_? Call it N.
2. Pick one of them. Call it 'a'.
3. set x = x + a * y. set y = y * N.
4. Repeat steps 1-3 until the number of choices drops to be less than 2.

Testing

A library in Haskell to generate test patterns automatically based on logical properties that a function should fulfill. Equivalent libraries are available for other languagues.
Alternatives: Hypothesis.
Generate tests automatically from output of any program / scripts, for comparing again later, using git and make.
A nice tutorial showing how to use the Test Anything Protocol for unit testing.
Lot of recommendations for writing unit / integration tests in Java, but also applicable to other language. Worth a read when writing tests and having no idea how to proceed. Summary: write simple and clear tests (all main test elements must be clearly visible), use meaningful naming ("actual", "expected"...), KISS > DRY, avoid overuse of variables, don't mock too much (favor integration tests), favor composition over inheritance (wrong abstraction), use (parameterized) helper functions to reduce repeat...
A detailed analysis of car crash caused by SW, and the required level of quality needed by safety critical application (also covers Fault Containment Regions).

System

An interesting post detailed the inner working of RAMFS and boot sequence on Linux / kernel.
An interesting investigation post on an issue in Docker, to understand a bit better how docker works. Also relate to some docker zine, that might be interesting to read.
Example on how to use kernel tracepoints, dt, bt, btrace.
An overview of the nice feature of FreeBSD (stable unique base system, ZFS boot environment, simplicity...)

Benchmarks / optimisation

Nice detailed post on how to track performance evolution across multiple commits to locate regressions in build/compilation time.
A detailed performance analysis of toupper in standard C or C++, which turns out to be a "feature" in the compiler headers. Nice Jitter Performance Scatter Plot, that shows the importance of collecting many many data points when doing benchmarks. Post is very clear, and many things well explained. Use a static website, but with staticman to support user comments.
Impressive optimization of QSort implementation.
Story around a bug report on Windows Terminal slowness, and how someone could make 100x - 1000x faster on a couple days work. [2], [3]. Very interesting to learn fast the basic working of a terminal renderer.
Incredible implementation of FizzBuzz on codegolf, where all data exchange is mostly done in CPU cache.
An example to show incredible performance delivered by Bloom filters, which can test whether an element is in a set, with definitive no and probable yes.
A framework to measure performance of code snippets. See Google benchmark.

Multimedia

Generate simple PPM video and separate WAV audio in a file. Easy to play with mplayer / mpv / vlc. Simple but powerful. Audio generation.
An impressive set of examples on how to generate very nice SVGs.
A method to get rid of the Moiré effect by patching the image in the frequency domain (using FFT).

3D

Step-by-step training on how to build a raytracer. Nice explanations.
The incredible design of an amazing-looking portrait of a girl taking a selfie, in amazing 3D, only with mathematics formula. See more raymarching distance fields. Code available here.
Building up equations from a simple fluid case, towards Navier-Stoke equations.

Debug

segfault due to name conflict between dyn. linked library (socket_send, available from libusbmuxd but also samba library). Show usage of ldd, readelf, lddtree.

Dev - Miscellaneous

Example of how to evaluate quickly firewall kind-of rules (rule combining type:value pairs with or, and... operators), using dynamically-generated FSM. To be compared with Binary Decision Diagram.
Very clear, practical and detailed description of the Linux executable.
A large survey about the qualities of great SW engineers.
It's how the software will be used that is important. Performative craftmanship elitism is bullshit. From HW, "toxicity of a culture of elitism and a fetishizing of language purity". See also other post from same author about fascism [4], and some recommendation regarding BLM [5].
A list of tools to show a GUI from a shell script (Sixtyfps.io, bottle (py server)+AlpineJS, Zenity, YAD, Tcl/Tk...)
Tutorial on terminal ANSI codes, and advanced / recommended techniques to make a modern TUI out of them (without using ncurses).
Here an alternative to ncurses, notcurses. See also HN comments.
A c implementation of tic-tac-toe in a single call to printf. Written for IOCCC 2020. Nice explanations.

Dev - Examples

Example on how to design a 3D globe in WebGL, with dotted texture and animations. Very detailed analysis.
Example on how to design a pedometer, with lot of explanation on how accelerometers work, the mathematics behind, etc.
Many coding problems and solutions from coding sites or interviews, mostly solved in Python. A must read!

Security

Detailed description of Trinity, a fully chained exploit for the PS Vita consisting of six unique vulnerabilities, describing how it works, how it was found and built.
Summary of issues around PGP, and alternatives (Signal, Whatsapp, magic wormhole, tarsnap).
A nice animation to explain how RAFT works, which is a protocol to establish distributed consensus.
Some very complex mechanism to allow recovery of the signal app data from a small PIN. Not sure this works / is reliable nor if it is going into the right direction, but it refers to some interesting security technologies (Intel SGX, Raft...).
Goal is to hide a backdoor in SW while pretending it is a genuine bug.

Hacking

A tool to analyze image files. Can for instance reveal hidden pixels in files.
Paper on decompiling binaries using neural networks.
A small device to collect WiFi PCAP captures, for latter cracking. Uses aircrack-ng and rockyou dictionary file.
A very clear explanation on how to profile the performance of a game startup sequence, reverse it and patch it. Use Luke Stackwalker for profiling closed source applications. Using IDAPro to disassemble (however speaks of ghidra). Use Process-Dump to dump the content of code being executed, after it has been deobfuscated. Dump some dynamic data from execution using x64dbg. Using minhook to hook a DLL in a code. The slow-down was due to parsing JSON with sscanf(p, "%d") that happens to call strlen a lot repeatedly, and using a useless hash table (useless because no duplicates).
An interesting post on how to reverse some binary file, using import zlib in Python.
Binwalk is a fast, easy to use tool for analyzing, reverse engineering, and extracting firmware images.
A curated list of Unix binaries that can be used to bypass local security restrictions in misconfigured systems (eg. by issuing !/bin/sh in pager (less) when doing apt-get changelog apt).
Practice security concepts in the for mof fun-filled games.
A nice write-up on exploiting a double-free bug on ARM (due to weak memory model in ARM, that allows reordering of store, which is not allowed on x86]
Another nice write-up on analyzing Fuchsia, an open-source OS from Google, how to use it, compile it, run it, debug it, fuzz it, exploit it.
Powerful reverse tool, all in terminal. See Radare2.

Management

Mission is the boss. Refer to SemCo, a company whose young CEO promoted decentralized and collaborative management.
Trap 1: Mediocrity signals (e.g. promotove innovation but focus on cost down). Trap 2: Strategic ‘attention deficit disorder’. Trap 3: Corporate Keystone Kops. Trap 4: Misbegotten ‘big, hairy, audacious goals’
How to feedback as a manager to a direct. 1. Ask (“Can I give you some feedback?”). 2. State the behavior (“When you X…”) 3. State the impact (“…the result is Y.”) 4. Encourage effective future behavior (“Keep it up!” for positive feedback or “Can you change that?” for negative feedback).
Don't: Don't feedback if you are angry. Don't feedback on the past. Don't feedback if you can't let it go.
... reality is maybe not that simple, HW comments.
Stop arguing about the past! We recommend that you give in when a direct argues or gets defensive. Don’t get drawn into a discussion about what happened. That’s unrelated to the future you want to focus on.
Once you’ve given the feedback and the direct has pushed back, pause, smile, apologize, and walk away. You’ve made your point. Don’t let the direct try to win her argument simply because you’ve shown her the courtesy of letting go.
  • Perform an effort/impact analysis — make a 3x3 matrix 'impact' vs 'difficulty'. Implement easy but strong impact first, and avoid hard with low impact, and do a couple of the middle ones. Very useful for planning.
  • Timebox hard-to-estimate work — for instance, work for a task for two weeks and see how much progress is done. Or allocate a part of worktime on some task (like 1d/wk on PR solving).
  • Write playbooks before automation — that means first write small procedure for humans first, possibly completed with some source code for scripts, etc.

Life hack

Life hacks, ebooks, resources, learning...
The 10/10/10 rule when taking a decision: what would you think about the outcome in 10 minutes from now, in 10 months from now, in 10 years from now?
Suspension of (value-)judgement, awareness of the mode of thinking...
Keeping one's mouth shut
Tell people what they want to hear and you can be wrong indefinitely without penalty. Most fields have only a few laws. ...
An example of "getting things done", about giving advices.
Impressive list of tools / things to do. Buy your life back.
Detailed post about how to host everything yourself, how to preserve your privacy, quit Google, etc. Very nice write-up.
Another example of high-quality notes by Adam Kelly.
A detailed description of self-hosting various applications, web servers, blogging app... securely and in virtual environment.
An interesting list of applications that can be hosted as docker container (sometimes even on Raspberry Pi). Link to Nginx Proxy Manager, Linkding, proxmox VE.
An alternative to Todo.txt
A review of various keyboards, and advanced tweaking tips for typing. Nice tips include how to use SAME key for TWO different actions depending on whether it is PRESSED or HOLD (eg. CAPSLOCK key), and also how to teach correct usage of LEFT / RIGHT SHIFT keys.
A free and opensource video conferencing system. Works very well under Firefox (and Chromium). Video, chat, screen sharing... Escape Teams and Zoom ;-)

Resources

photos
icons and fonts
svg icons
  • Unsplash Beautiful, free images and photos that you can download and use for any project. Better than any royalty free or stock photos.
  • FlatIcon Download Free Vector Icons and Stickers for your projects. Resources made by and for designers. PNG, SVG, EPS, PSD and CSS formats
Books / musics / movies / torrents /

Science & Tech

The most complete and detailed description on how our eyes perceive colors.
Just wow.
A nice dynamic periodic table of elements.
Great video on the cycle of the sun regarding the number of spots and magnetic activity, how it does protect us from galactic radiation, and how it influences on space debris around earth.
Amazing page detailing how lights and shadows work, with interactive models we can play with. More interesting stuff on the archives page. See HN.
From same author, amazing explanations on how cameras and lenses works, with many scientific details on light propagation, etc.
Comes from the definition of distance in the Minkowski spacetime, ds=sqrt((c.dt)^2 - dx^2 - dy^2 - dz^2), where c is the speed of massless particle. ds=0, invariant for all observers, gives that speed c is a constant. If an observer does not move in space coordinates, the speed he computes gives that he's moving at speed c in time. See also HN, also speaking of four-vectors, and in particular the four-velocity, which has always a constant magnitude (equal to the speed of light).
An explanation on quantum physics, trying to debunk confusing myths (in particular confusion between the existence of separate classical world and quantum world).
A nice explanation on why we can't go faster than the speed of light, based on the fact that moving charge sees a magnetic force, whereas a non-moving one doesn't.
A 25-hour course on faster-than-light physics within the context of currently established science.
Entropy S is defined as the measure of the number of possible microscopic arrangements (microstates) Ω of a system that comply with the macroscopic condition of the system (observed macrostate), e.g., temperature, pressure, energy. So entropy is a measure of hidden information. 2nd thermodynamic law states that When a thermally isolated system has passed from one thermodynamically equilibrium state A to another thermodynamically equilibrium state B, increase of its thermodynamic entropy S is greater than or equal to 0., which means that entropy is only well defined in thermodynamical equilibrium. But it emerges naturally from the H-theorem reasoning, stating that A system will spend most of its time in its most probable state, i.e. the ones compatibles with the highest number of possible microstates.
An open-source web app to simulate the reflection and refraction of light. Suitable for education and demonstration. Nicely written.

Success stories

With good tips about launching new business online.
The success story on how a grad student and his professor worked together to write a 500p text book, and the tools and methodology they used.
Example on how to deploy / develop a successful web application, by one person.
Many short tips on how to build a successful project / how to write README / how to pick the problem to solve / ...

Miscellaneous

A detailed explanation about color harmony, what makes some painting rich in colors...
Tips about creating a custom color palette.
A repository of fonts patched with lots of glyphs (icons). Include patches for Fantasque Sans Mono, Iosevka...
... animated for the internet.
Beautiful animated pages explaining how various things work, like sewing machine, engines, human eye, lcd screen...
Amazing set of interactive pages to learn how synthesizers work.
Example: shop with one cashier, 10 min processing time, 5.8 job/hour will have an average waiting time of 5 hours! This document explains why and tips to improve. And explains why it is very hard to use the last 15% of anything (wait time double at 50% capacity, and double again at 75%, and so on).
A phonic-based reading method, with direct instructions. Much more efficient than whole-word system, at least on kids of all backgrounds [6].
Elegant Python programs to generate 3D objects in SVG.
An alternate floating points representation, claimed to be better than IEEE 754 [7].
On how Netflix and Disney are reproducing the old schema of consolidation that happened before with movie studio, and that we should go again for a split into separate production, distribution, and retailing.
The idea is that there is lot of overlap with previous users. But some concerns on HN.
All tags in the browser are editable with attribute contenteditable="true".
Some insights from someone at Uber who've been building and operating a large distributed system (basically: monitoring not average but 99% percentile, monitor *business* metrics, mitigate first and fix later...)
A mere wrapper around Google, but the only website that returned as 2nd hit the correct song matching paradise "you and me" (ie. Gangsta's Paradise from Coolio).
Article on using statistics in medicine / police investigation. On average, every human has one breast and one testicle! Besides looking at statistical significance, we must also look at the size of the effect (Like save 1 in 130 lives with p=0.001, high significance but risk of adverse side effects may compensate occurence of the wanted effect)
Nice posts about the problem of text rendering and editing issues (style change mid-ligature, emoji, sub-pixel and caching, text animation, caret positioning and movement).
A small but impressive demo in Javascript that renders 3D graphics using text in a terminal.
A piece of Chopin explained by a music conductor. Some important quotes, like "It's one of the characteristics of a leader that he not doubt for one moment the capacity of the people he's leading to realize whatever he's dreamer", "success is measured by the number of shining eyes around you", "I will never says anything that couldn't stand as the last thing I ever say".
Small book on tips on how to better price your products. Clear and concise.
Some ideas on how to apply moderation in forums using hierarchical whitelists, shared between participants.
An interesting approach on how we make sense of the world. First we have first and second order facts (1st = immediately relevant to a narrative, high = influence an opinion about subject). Then we have first and second order thinking (1st = correlations, ie. given a fact what argument can be made via correlation, high = causation, ie why facts emerge). Then we have four options: 1st fact and 1st thinking = Utility, 1st fact and high thinkng = Wisdow, high fact and 1st thinking = manipulation, high fact and high thinking = conspiracy theory.
Excellent write-up detailing how to analyze the network activity of a device using WireShark (no success because of https), then Burp Suite (with custom TLS cert and adding Burp CA cert to PC trusted certificates).
More excellent write-up from the same author:
A discussion on the best pricing scheme for API services, which is usage-based pricing with automatic volume discounts, and why other schemes are bad.
The fastest and best shoelace knot on the planet.
Fun error messages in Haiku.
A new (2010) keyboard layout that shows better stats than Colemak (and much better than Dvorak) when comparing finger movements, and in particular lateral movement. Nice stats.
A thought experiment where a trolley on railway tracks with five people on the rails ahead, and a lever to change the trailway course to another rail where only one person lies.
The imagery of internet criminals: drug-dealers, money-launderers, terrorists, and pedophiles.
Some nice explanations on how rockets and fireworks work.
Banks does not create money, but "IOU" (I Owe You), ie promise that some debt can be redeemed at some given time. Also explain the role of the Central Bank, which allows banks to settle their exchange accounts when money are transfered between accounts from different banks, avoiding the need to send the real cash at each transaction, or even daily. Only the Central Bank can create money.
List of some puzzles, riddles, problems and their solutions. New problems published regularly.
(1) Good writing is clear. Tell it like a story, with characters and actions (verb). Don't use nominalisation too much. (2) Good writing is cohesive. Focus on one concept at a time. (3) Good writing has emphasis. Prefer closing the sentence with the emphasis, rather than in the middle of the sentence. When introducing new technical term, locate them at the end. (4) Good writing is concise. Compress what you mean into the fewest words. Don’t state what your reader can easily refer.
A very interesting and detailed explanation of the network infrastructure behind Teams. Teams mostly rely on MS own private infrastructure, the 2nd biggest in the world.
Many objectives reasons on why Linux is better than Windows.
On the unfair competitive advantages of Apple/Google/... market places.
Also http://zoomquilt2.com/, and http://arkadia.xyz/. Impressive and beautiful journey in the zoom world.
An amazing and hypnotising visualisation of 16 sorting algorithms, where distance to center indicates how far from being sorted each element is, with color and sound. See also https://nullprogram.com/blog/2017/11/03/.
On distributed systems conference, there is always talk about Byzantine fault tolerance, that are saddening, because mostly irrelevant.
A ruling about bakery that didn't want to produce a cake with a particular message (pro-gay marriage message). Bakery was finally found right because it was not discriminatory to the customer himself. Issue isn't that the customer was gay (bakery did serve him already in the past), the issue was the bakers didn't want to make this particular cake for anybody.
  • Illusions:
Interesting illusion. Note there was also another site with lot of categorized illusions, also found via HN.
More incredible illusions. See also impossible objects, [9], [10].
A podcast containing (at the beginning) a short noise audio snippet, then later a cue telling how to make sense of the noise. Once the cue is heard, the brain will always make sense of that noise snippet forever. This is an illustration of confirmation bias, and the podcast also covers the advantage of it from an evolution perspective.
An example on how to use qemu / zfs.
A monospace font for developers that looks cool, but costs >50€.
A monospace font a bit like MonoLisa, and free ;-)
To compare various programming fonts...
Discussion on the puzzle "I don't know the numbers" [11], and several implementations, and links to other puzzles (including the famous blue eyes puzzle a funny one).
Another puzzle with rational numbers.
A discussion on common knowledge
Interesting financial analysis of the profitability of bitcoin miners, linked to fact that mining equipment are depraciated using a straightline when actually they should be depraciated as a curve. Lack of profitability is currently hidden because BC are also gaining value over time, but in truth investing directly in BC would have been equally if not more profitable.

Climate Change

A very detailed page, with lots of infographics.
A nice write-up on how birds / dinosaurs got their lung, and on the origin of fossil fuel, and the impact of current climate change.

Greta Thunberg

Impressive talk from 16-year old Greta Thunberg on the urge to act now to face the climate crisis.
Greta receiving a prize and calling celebrities for action.
Another powerful speech by Greta Thunberg. In presence of UN Secretary General António Guterres, Arnold Schwarzenegger and a great number of heads of states.
Interview of Greta Thunberg by Democracy Now! during the 24th U.N. climate summit, explaining a bit how she came aware of climate changes issue. We are also joined by her father, Svante Thunberg, a Swedish actor.
Speech of Greta at the UN summit 2019.
Greta urging MEPs to “start panicking about climate change” rather than “waste time arguing about Brexit”.
Another great interview with Greta and how she deals with criticisms.
Great speech, also about the opposition Greta's movement is getting by some people not liking her.
Greta at EU saying EU ‘sweeping their mess under the carpet for our generation to clean up. [...] If you say we are wasting valuable lesson time, let me remind you, our political leaders have wasted decades through denial and inaction and since our time is running out we have started to take action.’
News on The Guardian, where Greta also answers a few questions.
An interview describing the life of Greta, how she started the movement...
20190927 - Summary of various speeches Greta made.
Greta joining strike in Canada, and answering a few questions from the media.
Interview in New York by Scandinavian talk show Skavlan, covering her last speech at U.N, how she lives...
Interview follow up with Michael Moore.
16 year old climate activist Greta Thunberg explains why her Asperger's is helpful in her fight to save the world.
Greta's speech during the global climate strike in New York, Sep. 20th 2019.
Greta's speech during the global climate strike in Montreal, Sep. 27th 2019.
This is the year 2019. This is not the time and place for dreams. This is the time to wake up' — Here's every statement Greta Thunberg made during Climate Week.
Speech from Greta at Davos (January 2019)
Short interview of Greta about the movement started (March 2019).
Interview with Greta and climate scientist, by Democracy Now! (December 2018)
Millions around the world took part in a global climate strike, all following the lead of 16-year-old Greta Thunberg. The Swedish teenager spoke to Kelly Cobiella before she sailed to New York City. “When a child says, ‘You are stealing my future,’ then people feel very guilty,” Thunberg said.
May 2019 - Upon realizing her generation won’t have a future unless the world’s politicians act now on climate change, then 15-year-old Greta Thunberg skipped school in August 2018 to protest outside the Swedish parliament. What started as a one person strike soon gained global momentum.
Dec 2018 - Fifteen-year-old activist Greta Thunberg talks to CNN's Fareed Zakaria about her speech at the UN climate change conference, her protest at the Swedish parliament, and what she is planning to do going forward.
Apr 2019 - Yet another (short) documentary on Greta Thunberg.
Feb 2019 - Speech from Greta at event "Civil Society for rEUnaissance" on 21/02/2019.
Sep 2019 - There is a natural solution to the climate breakdown: protecting forests. Climate activist Greta Thunberg and writer and climate activist George Monbiot explain.
Apr 2019 - The 16-year-old Swedish climate activist Greta Thunberg and Anna Taylor from the UK Student Climate Network join the Green party MP, Caroline Lucas, and the Guardian's Zoe Williams to discuss how to address the climate crisis and where to go from here for Guardian Live
Mar 5, 2019 - Interview of Greta by Luca Jahier, President of the European Economic and Social Committee.
Sep 2019 - Greta Thunberg est devenue, en très peu de temps, un symbole de la lutte contre les changements climatiques. Comment est-elle perçue chez elle, en Suède? Que pensent ses compatriotes de cette ascension extraordinaire? Le reportage de notre envoyée spéciale Alexandra Szacka.
Oct 2019 - Global climate activist Greta Thunberg spoke during the strike for a "Town-Gown Climate Accord" hosted by the Iowa City Climate Strikers on Friday, Oct. 4, 2019.
Sep 14, 2019 - Interview with Greta, Although more Americans than ever are worried about climate change, less than 40 percent expect to make “major sacrifices” to tackle the problem. But according to Greta Thunberg, a Swedish teenager and climate activist, drastic action is exactly what's needed to address the problem.
Aug 29, 2019 - Following weeks of anticipation, Swedish climate justice activist Greta Thunberg arrived on the shores of Lower Manhattan Wednesday afternoon after a 15-day voyage across the Atlantic Ocean in an emissions-free yacht. She was welcomed on land by hundreds of supporters at the North Cove.
Sep 20, 2019 - Interview of Greta by USA TODAY.
Sep 20, 2019 - Greta's interview at Good Morning America, “I think this is something very big that is growing, and it will not stop.” (interview).
Apr 24, 2019 - Speech from Greta at UK parliament (bad audio quality however).
Feb 15, 2019 - Nice original interview from GMB, with original photos. Some students in the UK are set to miss school today as they strike in a fight against climate change. The protest is inspired by 16-year-old Swedish schoolgirl, Greta Thunberg, who speaks to GMB about the story behind her activism.
Sep 13, 2018 - Greta announcing that after 3 weeks striking, they'll keep striking every friday in front of the Swedish parliament.
Feb 18, 2019 - Via a live video link from Stockholm to Melbourne, Greta Thunberg was the opening speaker at a sold-out Great Debate event at the National Sustainable Living Festival in Australia on 8 February 2019.
feb 22, 2019 - Another version of Greta's speech at EU. With some nice intro.
Apr 22, 2019 - (Greta's speech in UK) Greta Thunberg, 16, was greeted with chants of "we love you" as she took to the stage in front of thousands of people at the rally in Marble Arch.
Apr 22, 2019 - Greta's interview before her speech in front of the Marble Arch in UK, recommending a book to read, James Hansen's Storms of my Grandchildren (interviewer suggested Joanna Macy's Active Hope).
Apr 23, 2019 - Nice excerpts from Greta's speeches all around the world. Greta Thunberg is a 16 year old Swedish climate activist who is a role model for worldwide environmental activism.
Jun 23, 2019 - Another brilliant speech from Greta at a conference.
Greta's full speech at the COP24 in Katowice 2018.
Sep 14, 2018 - Probably the first interview of Greta when she started her movement in front of the Swedish parliament.
Sep 20, 2019 - Greta's interview before the strike in New York.
Sep 21, 2019 - part of Greta's speech during New York strike, seen from someone in the crowd, including cut scene due to situation in the crowd due to the hot temperature that day.
Sep 16, 2019 - Swedish teen climate activist Greta Thunberg receives the Amnesty International Ambassador of Conscience award at George Washington University in Washington, D.C.
Jun 29, 2019 - Original interview with Greta Thunberg on how she started the movement, how it was at the beginning.
Sep 13, 2018 - Clip showing Greta the last day of her three week strike, with lot of people. I will go on with the school strike. Every Friday as from now I will sit outside the Swedish parliament until Sweden is in line with the Paris agreement.
Jan 26, 2019 - Press interview after Greta's speech at Davos.
Feb 21, 2019 - Press conference with all the young activists from Belgium, Germany... (38 min).
Oct 25, 2019 - Greta's speech in Vancouver friday strike.

On Greta Thunberg:

Secretary Hillary Clinton saying Greta Thunberg is one of the gutsy women who impressed her the most.
Oct 8th, 2019 - Awesome remix of Greta's speech at UN.
Dec 14th, 2019 - Containing video of Greta calling for strike after her speech at COP24, and students striking in Poland, singing Michael Jackson's song "Earth" - Great video on Gret'a https://democracynow.org - Fifteen-year-old Swedish climate activist Greta Thunberg has called for a global climate strike today to protest inaction at the U.N. climate summit. Greta made international headlines after she refused to go to school in August and began a School Strike for Climate. Greta made the call for today’s strike in a video posted on Twitter.

On Extinction Rebellion:

Presentation of the climate change crisis and the Extinction Rebellion movement.

Music ft Greta Thunberg:

Courses

Learn jQuery. Recommended here.
Teach you how to manage state in your React application with Redux. Recommended here as a good introduction to functional programming.
A detailed course on how C is translated to assembly.
A set of interactive course on various subjects.
Several books on ray-tracing. For when I'll be retired, or dead.
Course on category theory, mathematical tool to organize key abstractions, using Haskell.
Harmony, when waves are simple fractions of each other.
Pentatonic scale, five note scale that always sound nice.
Chromatic scale, 12 note scale, richer, but not always sounding nice. Note that the frequency of starting note does not matter, and that all melody can be shifted up or down on a scale also.
Chords (major, minor, diminished), 3 notes that play together nicely.
Keys, group of notes (seven in the twelve) used in a song and that play nice. Turns out that the C major key are simply the 7 white keys on a piano.
... premium course available.
An impressive course from MIT Open Course. Must see.

Talks

Talk from Joe Armstrong, co-author of Erlang language, about the complexity of SW and how to fix it.