Programmer Humor

32733 readers
516 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
1
2
 
 
3
51
submitted 18 hours ago* (last edited 18 hours ago) by sebastiancarlos@lemmy.sdf.org to c/programmerhumor@lemmy.ml
 
 
% Piano Axioms

% Axiom 1: Law of Excluded Gray
key_type(white).
key_type(black).

% Axiom 2: The C Postulate
key_color(c, white).

% Axiom 3: The Diatonic Scale
next_white_key(c, d).
next_white_key(d, e).
next_white_key(e, f).
next_white_key(f, g).
next_white_key(g, a).
next_white_key(a, b).
next_white_key(b, c).

% Axiom 4: The Semitone Anomaly
semitone_gap(e, f, 1).
semitone_gap(b, c, 1).
semitone_gap(X, Y, 2) :- 
    next_white_key(X, Y),
    X \= e,
    X \= b.

% Axiom 5: Black Key Entropy
has_black_key_between(X, Y) :-
    next_white_key(X, Y),
    semitone_gap(X, Y, 2).

% Axiom 6: The "8 is 12" Principle.
octave_size(12).

% Axiom 7: Out of Bounds Exception
total_keys(88).

% Theorem 1: Conservation of "Wrong Notes"
style(jazz) :-
    wrong_notes > 0,
    write('All wrong notes are now intentional').
4
 
 
5
162
submitted 3 days ago* (last edited 3 days ago) by sebastiancarlos@lemmy.sdf.org to c/programmerhumor@lemmy.ml
 
 

How to write a programming novel?

  • Cover: CSS
  • Copyright Page: GNU GPLv3
  • Intentionally Blank Page: Whitespace
  • Notes For The Second Edition: Kotlin
  • Notes for The First Edition: Java
  • Front Matter: Markdown
  • Dedication: Rust
  • Prologue: Prolog
  • Chapter 1: C
  • Chapter 2: C++
  • Chapter 3: C3
  • Chapter 4: Forth
  • Pull Quotes: Git
  • Unexpected Sex Scene: LaTeX
  • Dream Sequence: APL
  • Cliffhanger Ending: Python 2
  • Index: IndexedDB
  • Errata: PHP
  • Sequel: SQL
6
 
 
7
 
 
8
 
 
9
 
 
10
 
 
11
 
 
12
 
 

Ah, just what I needed.

13
 
 
14
 
 

The rendered output looks like this:

It even sounds half-decent.

I would also like to congratulate German for having the most fucked up notation system, according to the LilyPond documentation. ๐Ÿ™ƒ

Source code

15
16
 
 
17
 
 

18
 
 
19
 
 
20
 
 

My computer build now includes a piece of structural 8.5x11 printer paper.

I tracked the tapping noise to the case fan, poked at it a bit, and realized it got perfectly happy with just a bit of upward support. So, a bit of bridging between that and the top of the card cutouts just below, and I have a near-silent computer again! (Ignore the dust, that's the next task.) #lowtechtech

Via: @programmerhumor@lemmy.ml

21
22
 
 
23
 
 
24
25
 
 
view more: next โ€บ