├── case ├── .gitkeep ├── badger2040_bottom.stl ├── badger2040_top_mirrored.stl └── README.md ├── src ├── .gitkeep ├── main.py ├── badges │ ├── badge.bin │ ├── badge.png │ └── badge.txt ├── images │ ├── census.bin │ ├── census.png │ ├── clippy.bin │ ├── clippy.png │ ├── background.bin │ └── background.png ├── qrcodes │ └── qrcode.txt ├── README.md ├── launcher.py ├── badge_app.py ├── qr_app.py ├── fortune_app.py ├── badger_os.py ├── widgets.py └── fortune │ └── cookie.txt ├── docs ├── files-uploaded.png ├── thonny-select-board.png ├── boot-mode-flash-firmware.png └── upload-files-to-badger.png └── README.md /case/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- 1 | import launcher -------------------------------------------------------------------------------- /src/badges/badge.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/badges/badge.bin -------------------------------------------------------------------------------- /src/badges/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/badges/badge.png -------------------------------------------------------------------------------- /src/badges/badge.txt: -------------------------------------------------------------------------------- 1 | Kirill Timofeev 2 | Engineering Team 3 | Census 4 | oneearedrabbit 5 | badge.bin 6 | -------------------------------------------------------------------------------- /docs/files-uploaded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/docs/files-uploaded.png -------------------------------------------------------------------------------- /src/images/census.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/census.bin -------------------------------------------------------------------------------- /src/images/census.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/census.png -------------------------------------------------------------------------------- /src/images/clippy.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/clippy.bin -------------------------------------------------------------------------------- /src/images/clippy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/clippy.png -------------------------------------------------------------------------------- /src/images/background.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/background.bin -------------------------------------------------------------------------------- /src/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/src/images/background.png -------------------------------------------------------------------------------- /case/badger2040_bottom.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/case/badger2040_bottom.stl -------------------------------------------------------------------------------- /docs/thonny-select-board.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/docs/thonny-select-board.png -------------------------------------------------------------------------------- /case/badger2040_top_mirrored.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/case/badger2040_top_mirrored.stl -------------------------------------------------------------------------------- /docs/boot-mode-flash-firmware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/docs/boot-mode-flash-firmware.png -------------------------------------------------------------------------------- /docs/upload-files-to-badger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oneearedrabbit/badger-system-ii/HEAD/docs/upload-files-to-badger.png -------------------------------------------------------------------------------- /src/qrcodes/qrcode.txt: -------------------------------------------------------------------------------- 1 | https://getcensus.com/ 2 | Census 3 | * the leading reverse ETL 4 | * no more CSV files 5 | * sync data in real-time 6 | 7 | Scan this code to learn 8 | more about Census. -------------------------------------------------------------------------------- /case/README.md: -------------------------------------------------------------------------------- 1 | # 3D printed case for Badger2040 2 | 3 | A 3D-printed case has a slot for two CR2032 batteries. Badger 2040 runs 4 | on RPi 2040. It is energy efficient, and batteries should last for a 5 | long time. Also comes with a battery toggle switch to shut everything down. 6 | 7 | The device is approximately 12mm thick, see below. I lost my digital 8 | caliper, may replace the side shot later. 9 | 10 | ## Assembly 11 | 12 | Steps: 13 | - 3D print top and bottom panels. PLA plastic is good enough. 14 | - Disassemble & attach a 2xCR2032 battery holder 15 | https://www.adafruit.com/product/783. 16 | - Assemble the badge, use hot glue whenever applicable 17 | 18 | ## Known bugs 19 | 20 | - A 3D model has minor misalignments that I did not bother to fix, 21 | e.g. a LED hole is 0.1-0.2mm off to the left. 22 | 23 | ## Photos 24 | 25 | ![image](https://user-images.githubusercontent.com/198995/219485328-1d66b0d7-2c20-477a-9fee-6ed1c341de5f.png) 26 | 27 | ![image](https://user-images.githubusercontent.com/198995/221962577-9ab8847a-aaa5-4b5d-9cbb-67dff24e7f34.jpeg) 28 | 29 | -------------------------------------------------------------------------------- /src/README.md: -------------------------------------------------------------------------------- 1 | # Badger2040, Apple Macintosh 1984 2 | 3 | ## Overview 4 | 5 | This is a custom UI for Badger 2040 that I built for the Census 6 | engineering offsite in 2022. I aimed to recreate the iconic 1984 7 | Macintosh UI in a compact design. 8 | 9 | ## Known bugs 10 | 11 | I had to cut some corners, so that I could finish the assembly of a small batch 12 | before the event. Here is a list of known bugs: 13 | - If you open the same application twice (e.g. open QR app, open Badge 14 | app, and open QR app again), the device will restart and show a 15 | welcome screen. I shouldn't have tried to build a multi app 16 | experience in the first place. IMO, it is too much to do to 17 | implement this right in Python. I think if it was Lisp environment, 18 | it would have been easier. 19 | - I forgot to adjust the battery voltage to calculate the battery 20 | level. The device may show that a battery is empty or it is not 21 | plugged in. 22 | 23 | ## Upload steps 24 | 25 | - Upload pimonori-badger2040-micropython bootloader 26 | - Upload Python scripts 27 | 28 | ## Edit text 29 | 30 | - Badge: badges/badge.txt 31 | - QR: qrcodes/qrcode.txt 32 | - Clippy: fortune/cookie.txt 33 | 34 | ## Edit images 35 | 36 | 1. Clone https://github.com/pimoroni/pimoroni-pico 37 | 2. `python3 examples/badger2040/image_converter/convert.py --binary image.png image.bin` 38 | 3. cp image.bin badges/badge.bin 39 | 40 | ## User Guide 41 | 42 | - A button opens Badge app 43 | - B button opens QR app 44 | - C button opens Special app. Up/Down buttons randomly load a new 45 | quote 46 | - A + C buttons open Welcome screen 47 | -------------------------------------------------------------------------------- /src/launcher.py: -------------------------------------------------------------------------------- 1 | import badger2040 2 | import badger_os 3 | from widgets import draw_window, pprint, button, wait_for_user_to_release_buttons, draw_ui 4 | 5 | # Reduce clock speed to 48MHz 6 | badger2040.system_speed(badger2040.SYSTEM_NORMAL) 7 | 8 | changed = False 9 | exited_to_launcher = False 10 | woken_by_button = badger2040.woken_by_button() # Must be done before we clear_pressed_to_wake 11 | 12 | if badger2040.pressed_to_wake(badger2040.BUTTON_A) and badger2040.pressed_to_wake(badger2040.BUTTON_C): 13 | # Pressing A and C together at start quits app 14 | exited_to_launcher = badger_os.state_clear_running() 15 | else: 16 | # Otherwise restore previously running app 17 | badger_os.state_launch() 18 | 19 | display = badger2040.Badger2040() 20 | display.led(128) 21 | 22 | state = { 23 | "running": "launcher", 24 | } 25 | 26 | badger_os.state_load("launcher", state) 27 | 28 | def draw_about(): 29 | x = 78 30 | y = 39 31 | width = 144 32 | height = 63 33 | draw_window(display, x, y, width, height, " Welcome ") 34 | 35 | # logo 36 | image = bytearray(int(32 * 32 / 8)) 37 | open("images/{}".format("census.bin"), "r").readinto(image) 38 | display.image(image, 32, 32, 86, 56) 39 | 40 | pprint(display, "Engineering", 125, 56, 0) 41 | pprint(display, "Offsite", 125, 66, 0) 42 | pprint(display, "Brooklyn", 125, 76, 0) 43 | pprint(display, "2022", 125, 86, 0) 44 | 45 | def render(): 46 | display.pen(15) 47 | display.clear() 48 | 49 | draw_ui(display, "About") 50 | 51 | draw_about() 52 | 53 | display.update() 54 | 55 | if exited_to_launcher or not woken_by_button: 56 | wait_for_user_to_release_buttons(display) 57 | display.update_speed(badger2040.UPDATE_NORMAL) 58 | render() 59 | display.led(0) 60 | 61 | display.update_speed(badger2040.UPDATE_NORMAL) 62 | 63 | # Save power, do NOT render screen every time 64 | while True: 65 | if display.pressed(badger2040.BUTTON_A): 66 | changed = True 67 | button(display, badger2040.BUTTON_A) 68 | if display.pressed(badger2040.BUTTON_B): 69 | changed = True 70 | button(display, badger2040.BUTTON_B) 71 | if display.pressed(badger2040.BUTTON_C): 72 | changed = True 73 | button(display, badger2040.BUTTON_C) 74 | 75 | # if display.pressed(badger2040.BUTTON_UP): 76 | # button(display, badger2040.BUTTON_UP) 77 | # if display.pressed(badger2040.BUTTON_DOWN): 78 | # button(display, badger2040.BUTTON_DOWN) 79 | 80 | if changed: 81 | badger_os.state_save("launcher", state) 82 | changed = False 83 | 84 | # Halt the Badger to save power, it will wake up if any of the front buttons are pressed 85 | display.halt() 86 | 87 | -------------------------------------------------------------------------------- /src/badge_app.py: -------------------------------------------------------------------------------- 1 | import badger2040 2 | import os 3 | import badger_os 4 | from widgets import draw_window, pprint, ptitle, plength, button, draw_ui 5 | 6 | IMAGE_WIDTH = 96 7 | IMAGE_HEIGHT = 96 8 | DELTA = 0 9 | 10 | # Check that the badges directory exists, if not, make it 11 | try: 12 | os.mkdir("badges") 13 | except OSError: 14 | pass 15 | 16 | # Load all available badge Code Files 17 | try: 18 | CODES = [f for f in os.listdir("/badges") if f.endswith(".txt")] 19 | TOTAL_CODES = len(CODES) 20 | except OSError: 21 | pass 22 | 23 | print(f'There are {TOTAL_CODES} badges available:') 24 | for codename in CODES: 25 | print(f'File: {codename}') 26 | 27 | display = badger2040.Badger2040() 28 | display.update_speed(badger2040.UPDATE_NORMAL) 29 | 30 | state = { 31 | "running": "badge_app", 32 | } 33 | 34 | def draw_badge(n): 35 | draw_window(display, 6, 26, 182, 94, " Badge ") 36 | 37 | file = CODES[n] 38 | codetext = open("badges/{}".format(file), "r") 39 | 40 | lines = codetext.read().strip().split("\n") 41 | name_text = lines.pop(0) 42 | title_text = lines.pop(0) 43 | company_text = lines.pop(0) 44 | github_text = lines.pop(0) 45 | badge_path = lines.pop(0) 46 | 47 | ptitle(display, name_text, 15, 44, 0) 48 | 49 | if len(github_text.strip()) > 0: 50 | # github icon 51 | display.image(bytearray((0x3c,0x00,0xa5,0x81,0x81,0xc3,0x66,0x84)), 8, 8, 18, 86) 52 | display.image(bytearray((0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xfe)), 8, 8, 18, 78) 53 | display.image(bytearray((0x03,0x03,0x03,0x03,0x03,0x02,0x01,0x00)), 8, 8, 10, 86) 54 | display.image(bytearray((0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x01)), 8, 8, 10, 78) 55 | 56 | pprint(display, title_text, 15, 60, 0) 57 | pprint(display, company_text, 15, 72, 0) 58 | pprint(display, github_text, 30, 84, 0) 59 | 60 | badge_dat = bytearray(int(IMAGE_WIDTH * IMAGE_HEIGHT / 8)) 61 | open(f"badges/{badge_path}", "rb").readinto(badge_dat) 62 | 63 | display.image(badge_dat, IMAGE_WIDTH, IMAGE_HEIGHT, 194, 26) 64 | 65 | 66 | def render(): 67 | display.pen(15) 68 | display.clear() 69 | 70 | draw_ui(display, "Badge") 71 | 72 | draw_badge(0) 73 | 74 | display.update() 75 | 76 | changed = not badger2040.woken_by_button() 77 | 78 | while True: 79 | if display.pressed(badger2040.BUTTON_A): 80 | changed = True 81 | # button(display, badger2040.BUTTON_A) 82 | if display.pressed(badger2040.BUTTON_B): 83 | changed = True 84 | button(display, badger2040.BUTTON_B) 85 | if display.pressed(badger2040.BUTTON_C): 86 | changed = True 87 | button(display, badger2040.BUTTON_C) 88 | 89 | if changed: 90 | display.led(128) 91 | render() 92 | badger_os.state_save("badges", state) 93 | display.led(0) 94 | changed = False 95 | 96 | display.halt() 97 | -------------------------------------------------------------------------------- /src/qr_app.py: -------------------------------------------------------------------------------- 1 | import badger2040 2 | import qrcode 3 | import os 4 | import badger_os 5 | from widgets import draw_window, pprint, ptitle, plength, button, draw_ui 6 | 7 | # Check that the qrcodes directory exists, if not, make it 8 | try: 9 | os.mkdir("qrcodes") 10 | except OSError: 11 | pass 12 | 13 | # Load all available QR Code Files 14 | try: 15 | CODES = [f for f in os.listdir("/qrcodes") if f.endswith(".txt")] 16 | TOTAL_CODES = len(CODES) 17 | except OSError: 18 | pass 19 | 20 | 21 | print(f'There are {TOTAL_CODES} QR Codes available:') 22 | for codename in CODES: 23 | print(f'File: {codename}') 24 | 25 | display = badger2040.Badger2040() 26 | 27 | code = qrcode.QRCode() 28 | 29 | 30 | state = { 31 | "running": "qr_app", 32 | "current_qr": 0 33 | } 34 | 35 | 36 | def measure_qr_code(size, code): 37 | w, h = code.get_size() 38 | module_size = int(size / w) 39 | return module_size * w, module_size 40 | 41 | 42 | def draw_qr_code(ox, oy, size, code): 43 | size, module_size = measure_qr_code(size, code) 44 | display.pen(15) 45 | display.rectangle(ox, oy, size, size) 46 | display.pen(0) 47 | for x in range(size): 48 | for y in range(size): 49 | if code.get_module(x, y): 50 | display.rectangle(ox + x * module_size, oy + y * module_size, module_size, module_size) 51 | 52 | 53 | def draw_qr_file(n): 54 | draw_window(display, 6, 26, 282, 94, " About us ") 55 | 56 | file = CODES[n] 57 | codetext = open("qrcodes/{}".format(file), "r") 58 | 59 | lines = codetext.read().strip().split("\n") 60 | code_text = lines.pop(0) 61 | title_text = lines.pop(0) 62 | detail_text = lines 63 | 64 | display.pen(0) 65 | 66 | code.set_text(code_text) 67 | size, _ = measure_qr_code(128, code) 68 | draw_qr_code(10, 41, 80, code) 69 | 70 | left = 96 71 | 72 | display.thickness(2) 73 | ptitle(display, title_text, left, 40, 0) 74 | display.thickness(1) 75 | 76 | top = 56 77 | for line in detail_text: 78 | pprint(display, line, left, top, 0) 79 | top += 10 80 | 81 | if TOTAL_CODES > 1: 82 | for i in range(TOTAL_CODES): 83 | x = 286 84 | y = int((128 / 2) - (TOTAL_CODES * 10 / 2) + (i * 10)) 85 | display.pen(0) 86 | display.rectangle(x, y, 8, 8) 87 | if state["current_qr"] != i: 88 | display.pen(15) 89 | display.rectangle(x + 1, y + 1, 6, 6) 90 | 91 | def render(): 92 | display.pen(15) 93 | display.clear() 94 | 95 | draw_ui(display, "QR") 96 | 97 | draw_qr_file(state["current_qr"]) 98 | 99 | display.update() 100 | 101 | badger_os.state_load("qrcodes", state) 102 | changed = not badger2040.woken_by_button() 103 | 104 | while True: 105 | if TOTAL_CODES > 1: 106 | if display.pressed(badger2040.BUTTON_UP): 107 | if state["current_qr"] > 0: 108 | state["current_qr"] -= 1 109 | changed = True 110 | 111 | if display.pressed(badger2040.BUTTON_DOWN): 112 | if state["current_qr"] < TOTAL_CODES - 1: 113 | state["current_qr"] += 1 114 | changed = True 115 | 116 | if display.pressed(badger2040.BUTTON_A): 117 | changed = True 118 | button(display, badger2040.BUTTON_A) 119 | if display.pressed(badger2040.BUTTON_B): 120 | changed = True 121 | # button(display, badger2040.BUTTON_B) 122 | if display.pressed(badger2040.BUTTON_C): 123 | changed = True 124 | button(display, badger2040.BUTTON_C) 125 | 126 | if changed: 127 | display.led(128) 128 | render() 129 | badger_os.state_save("qrcodes", state) 130 | display.led(0) 131 | changed = False 132 | 133 | # Halt the Badger to save power, it will wake up if any of the front buttons are pressed 134 | display.halt() 135 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Badger2040 System II 2 | 3 | Tired of boring badges that just blend in with the crowd? You want to show off your quirky personality and love of retro technology? You are looking for a fun project to bond with your engineering team? Look no further than the programmable e-ink badge! 4 | 5 | https://kruzenshtern.org/the-e-ink-badge-the-coolest-badge-you-didnt-know-you-needed/ 6 | 7 | ![image](https://user-images.githubusercontent.com/198995/219474204-890703d2-fb32-4299-a39b-2d434ac3f215.png) 8 | 9 | ## Source code 10 | 11 | Don't expect much, but it works (tm). See in /src. 12 | 13 | ## How to make it work? 14 | 15 | Currently, to make this project work on your Badger2040, it is unfortunately necessary to use an old version of the bootloader provided by Pimoroni (1.19.6). Soon, you will be able to use recent versions. Until then, to make it work, follow the instructions below. 16 | 17 | 1. Download [`bootloader 1.19.6`](https://github.com/pimoroni/pimoroni-pico/releases/tag/v1.19.6) 18 | 2. Initialize Badger2040 in **boot mode** (press the `bootsel` button while connecting the USB-C cable) 19 | 3. Move the `pimoroni-badger2040-v1.19.6-micropython-without-badger-os.uf2` file to the `RPI-RP2` mounted drive ![Boot mode to flash MicroPython firmware](docs/boot-mode-flash-firmware.png) 20 | 4. Open Thonny (the editor used with MicroPython for Raspberry Pi Pico) 21 | 5. Select the correct board, usually `MicroPython (Raspberry Pi Pico)` ![Select correct board on Thonny](docs/thonny-select-board.png) 22 | 6. Select the menu `View` and then `Files` 23 | 1. If any, select all the files from your Badger2040 and delete them 24 | 7. Select all files from this on your computer and right-click 25 | 8. Select `Upload to /` ![Upload files to Badger2040](docs/upload-files-to-badger.png) 26 | 9. After finishing the upload, you should see all your files under the widget `Raspberry Pi Pico` on the bottom-left widget ![Files uploaded to the Badger](docs/files-uploaded.png) 27 | 10. To finish, go to the menu `Run` and then `Send EOF / Soft Reboot` 28 | 29 | You can edit all the files directly from the board using Thonny; however, after saving, it is common to receive an error from Thonny saying:: 30 | `Device is busy -- can't perform this action now. Please wait or cancel current work and try again!` 31 | 32 | If this happens, just re-select the board on the board list (bottom-right). 33 | 34 | ## Components 35 | 36 | 1. Badger 2040: https://shop.pimoroni.com/products/badger-2040 37 | 2. Coin Cell Battery Holder: https://www.adafruit.com/product/783 38 | 3. 2x CR2032: https://www.amazon.com/gp/product/B078GC5K81/ 39 | 4. 4x M2 8mm bolts: https://www.amazon.com/gp/product/B01BNIHG0E/ 40 | 5. 3D-printed case: see /case folder. I was using Prusament PLA: https://www.prusa3d.com/product/prusament-pla-ms-pink-blend-970g/ 41 | 42 | ## A quick glance at assembly steps 43 | 44 | 1. 3D print top and bottom panels. 45 | 2. Disassemble & attach a 2xCR2032 battery holder 46 | 3. Assemble the badge, use hot glue whenever applicable 47 | 4. Upload pimonori-badger2040-micropython bootloader 48 | 5. Upload Python scripts 49 | 50 | ## License & acknowledgements 51 | 52 | Inspiration sources for the case: 53 | 54 | - https://kaenner.de/badger2040 (CC4) 55 | - https://www.thingiverse.com/thing:5320100/files (CC4) 56 | 57 | I ended up using an OpenSCAD blueprint by usedbytes to get measurements of the device. Reconstructed/synthesized a new case in Fusion360. Noticeable changes: 58 | - A different battery holder / back pannel to simplify the assembly to some extent 59 | - Two coin cells vs three 60 | - Added hidden buttons inspired by Känner's design 61 | - Back panel is inspired by Känner's design too, I like that connectors are accessible 62 | - Battery toggle button 63 | - Any mistakes are exclusively mine 64 | 65 | Source code: 66 | - To a large extent based on pimoroni Badger2040 OS example: https://github.com/pimoroni/pimoroni-pico/tree/main/micropython/examples/badger2040 (MIT) 67 | - Font & rendering: custom code, but it is not worth extracting it to a standalone app/library. Let's stick with MIT for simplicity too. 68 | 69 | Assets: 70 | - Font: 16bfZX https://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=246 (Public domain) 71 | - Clippy: hand-drawn, I think the character is trademarked by Microsoft though. 72 | - Other assets: hand-drawn 73 | 74 | What does it mean in terms of license? I guess, it is good for a hobby project. Hire a lawyer to check if it is good for commercial use. 75 | 76 | ## From 77 | 78 | The folks at [Census](http://getcensus.com) originally put this together. Have data? We'll sync your data warehouse with your CRM and the customer success apps critical to your team. 79 | -------------------------------------------------------------------------------- /src/fortune_app.py: -------------------------------------------------------------------------------- 1 | import badger2040 2 | import os 3 | import badger_os 4 | from widgets import draw_window, pprint, ptitle, plength, ppara, button, draw_ui 5 | from random import random 6 | 7 | IMAGE_WIDTH = 96 8 | IMAGE_HEIGHT = 96 9 | DELTA = 0 10 | 11 | # Check that the fortune directory exists, if not, make it 12 | try: 13 | os.mkdir("fortune") 14 | except OSError: 15 | pass 16 | 17 | display = badger2040.Badger2040() 18 | display.update_speed(badger2040.UPDATE_FAST) 19 | 20 | file = "cookie.txt" 21 | cookies = open("fortune/cookie.txt", "r").read().split("%\n") 22 | total_cookies = len(cookies) 23 | 24 | state = { 25 | "running": "badge_app", 26 | } 27 | 28 | IMAGE_WIDTH = 64 29 | IMAGE_HEIGHT = 64 30 | 31 | def render(): 32 | display.pen(15) 33 | display.thickness(1) 34 | display.rectangle(12, 42, 222, 84) 35 | 36 | display.pen(0) 37 | display.thickness(1) 38 | n = int(random()*total_cookies) 39 | print(f"Quote {n}") 40 | text = cookies[n].strip().replace("\n", " ").replace("\t\t", " ").replace("\t", " ") 41 | 42 | ppara(display, text, 12, 42, 222, 0) 43 | display.update() 44 | 45 | def draw_clippy(): 46 | x = 1 47 | y = 21 48 | width = 294 49 | height = 106 50 | draw_window(display, x, y, width, height, " Special ") 51 | 52 | clippy_dat = bytearray(int(IMAGE_WIDTH * IMAGE_HEIGHT / 8)) 53 | open(f"images/clippy.bin", "rb").readinto(clippy_dat) 54 | display.image(clippy_dat, IMAGE_WIDTH, IMAGE_HEIGHT, 212, 56) 55 | 56 | # scrollbars 57 | display.pen(0) 58 | display.thickness(1) 59 | scroll_size = 14 60 | title_height = 11 61 | display.rectangle(x + width - scroll_size - 1, y + title_height, scroll_size + 1, scroll_size) 62 | display.rectangle(x + width - scroll_size - 1, y + height - scroll_size, scroll_size + 1, scroll_size) 63 | display.rectangle(x + width - scroll_size - 1, y + title_height + scroll_size, scroll_size + 1, height - title_height) 64 | 65 | display.pen(15) 66 | display.rectangle(x + width - scroll_size, y + title_height + 1, scroll_size - 1, scroll_size - 2) 67 | display.rectangle(x + width - scroll_size, y + height - scroll_size + 1, scroll_size - 1, scroll_size - 2) 68 | display.pen(12) 69 | display.rectangle(x + width - scroll_size, y + title_height + scroll_size, scroll_size - 1, height - 2 * scroll_size - title_height) 70 | 71 | # arrows 72 | display.pen(0) 73 | # top 74 | display.line(x + width - scroll_size // 2 - 1, y + title_height + 2, x + width - scroll_size // 2 - 7, y + title_height + 8) 75 | display.line(x + width - scroll_size // 2 - 1, y + title_height + 3, x + width - scroll_size // 2 - 6, y + title_height + 8) 76 | display.line(x + width - scroll_size // 2 - 1, y + title_height + 2, x + width - scroll_size // 2 + 5, y + title_height + 8) 77 | display.line(x + width - scroll_size // 2 - 1, y + title_height + 3, x + width - scroll_size // 2 + 4, y + title_height + 8) 78 | display.line(x + width - scroll_size // 2 - 4, y + title_height + 7, x + width - scroll_size // 2 - 4, y + title_height + 12) 79 | display.line(x + width - scroll_size // 2 + 2, y + title_height + 7, x + width - scroll_size // 2 + 2, y + title_height + 12) 80 | display.line(x + width - scroll_size // 2 - 4, y + title_height + 11, x + width - scroll_size // 2 + 3, y + title_height + 11) 81 | 82 | # bottom 83 | display.line(x + width - scroll_size // 2 - 1, y + height - 3, x + width - scroll_size // 2 - 7, y + height - 9) 84 | display.line(x + width - scroll_size // 2 - 1, y + height - 4, x + width - scroll_size // 2 - 6, y + height - 9) 85 | display.line(x + width - scroll_size // 2 - 1, y + height - 3, x + width - scroll_size // 2 + 5, y + height - 9) 86 | display.line(x + width - scroll_size // 2 - 1, y + height - 4, x + width - scroll_size // 2 + 4, y + height - 9) 87 | display.line(x + width - scroll_size // 2 - 4, y + height - 8, x + width - scroll_size // 2 - 4, y + height - 13) 88 | display.line(x + width - scroll_size // 2 + 2, y + height - 8, x + width - scroll_size // 2 + 2, y + height - 13) 89 | display.line(x + width - scroll_size // 2 - 4, y + height - 12, x + width - scroll_size // 2 + 3, y + height - 12) 90 | 91 | def draw_elements(): 92 | display.pen(15) 93 | display.clear() 94 | 95 | draw_ui(display, "Special") 96 | 97 | draw_clippy() 98 | 99 | changed = not badger2040.woken_by_button() 100 | 101 | draw_elements() 102 | 103 | while True: 104 | if display.pressed(badger2040.BUTTON_A): 105 | changed = True 106 | button(display, badger2040.BUTTON_A) 107 | if display.pressed(badger2040.BUTTON_B): 108 | changed = True 109 | button(display, badger2040.BUTTON_B) 110 | if display.pressed(badger2040.BUTTON_C) or display.pressed(badger2040.BUTTON_UP) or display.pressed(badger2040.BUTTON_DOWN): 111 | changed = True 112 | # button(display, badger2040.BUTTON_C) 113 | 114 | if changed: 115 | display.led(128) 116 | render() 117 | badger_os.state_save("fortune", state) 118 | display.led(0) 119 | changed = False 120 | 121 | display.halt() 122 | -------------------------------------------------------------------------------- /src/badger_os.py: -------------------------------------------------------------------------------- 1 | """Keep track of app state in persistent flash storage.""" 2 | 3 | import os 4 | import gc 5 | import time 6 | import json 7 | import machine 8 | import badger2040 9 | 10 | def get_battery_level(): 11 | # Battery measurement 12 | vbat_adc = machine.ADC(badger2040.PIN_BATTERY) 13 | vref_adc = machine.ADC(badger2040.PIN_1V2_REF) 14 | vref_en = machine.Pin(badger2040.PIN_VREF_POWER) 15 | vref_en.init(machine.Pin.OUT) 16 | vref_en.value(0) 17 | 18 | # Enable the onboard voltage reference 19 | vref_en.value(1) 20 | 21 | # Calculate the logic supply voltage, as will be lower that the usual 3.3V when running off low batteries 22 | vdd = 1.24 * (65535 / vref_adc.read_u16()) 23 | vbat = ( 24 | (vbat_adc.read_u16() / 65535) * 3 * vdd 25 | ) # 3 in this is a gain, not rounding of 3.3V 26 | 27 | # Disable the onboard voltage reference 28 | vref_en.value(0) 29 | 30 | # Convert the voltage to a level to display onscreen 31 | return vbat 32 | 33 | 34 | def get_disk_usage(): 35 | # f_bfree and f_bavail should be the same? 36 | # f_files, f_ffree, f_favail and f_flag are unsupported. 37 | f_bsize, f_frsize, f_blocks, f_bfree, _, _, _, _, _, f_namemax = os.statvfs("/") 38 | 39 | f_total_size = f_frsize * f_blocks 40 | f_total_free = f_bsize * f_bfree 41 | f_total_used = f_total_size - f_total_free 42 | 43 | f_used = 100 / f_total_size * f_total_used 44 | f_free = 100 / f_total_size * f_total_free 45 | 46 | return f_total_size, f_used, f_free 47 | 48 | 49 | def state_running(): 50 | state = {"running": "launcher"} 51 | state_load("launcher", state) 52 | return state["running"] 53 | 54 | 55 | def state_clear_running(): 56 | running = state_running() 57 | state_modify("launcher", {"running": "launcher"}) 58 | return running != "launcher" 59 | 60 | 61 | def state_set_running(app): 62 | state_modify("launcher", {"running": app}) 63 | 64 | 65 | def state_launch(): 66 | app = state_running() 67 | if app is not None and app != "launcher": 68 | launch("_" + app) 69 | 70 | 71 | def state_delete(app): 72 | try: 73 | os.remove("/state/{}.json".format(app)) 74 | except OSError: 75 | pass 76 | 77 | 78 | def state_save(app, data): 79 | try: 80 | with open("/state/{}.json".format(app), "w") as f: 81 | f.write(json.dumps(data)) 82 | f.flush() 83 | except OSError: 84 | import os 85 | try: 86 | os.stat("/state") 87 | except OSError: 88 | os.mkdir("/state") 89 | state_save(app, data) 90 | 91 | 92 | def state_modify(app, data): 93 | state = {} 94 | state_load(app, state) 95 | state.update(data) 96 | state_save(app, state) 97 | 98 | 99 | def state_load(app, defaults): 100 | try: 101 | data = json.loads(open("/state/{}.json".format(app), "r").read()) 102 | if type(data) is dict: 103 | defaults.update(data) 104 | return True 105 | except (OSError, ValueError): 106 | pass 107 | 108 | state_save(app, defaults) 109 | return False 110 | 111 | 112 | def launch(file): 113 | state_set_running(file[1:]) 114 | 115 | gc.collect() 116 | 117 | button_a = machine.Pin(badger2040.BUTTON_A, machine.Pin.IN, machine.Pin.PULL_DOWN) 118 | button_c = machine.Pin(badger2040.BUTTON_C, machine.Pin.IN, machine.Pin.PULL_DOWN) 119 | 120 | def quit_to_launcher(pin): 121 | if button_a.value() and button_c.value(): 122 | machine.reset() 123 | 124 | button_a.irq(trigger=machine.Pin.IRQ_RISING, handler=quit_to_launcher) 125 | button_c.irq(trigger=machine.Pin.IRQ_RISING, handler=quit_to_launcher) 126 | 127 | try: 128 | try: 129 | __import__(file[1:]) # Try to import _[file] (drop underscore prefix) 130 | except ImportError: 131 | __import__(file) # Failover to importing [_file] 132 | 133 | except ImportError: 134 | # If the app doesn't exist, notify the user 135 | warning(None, "Could not launch: " + file[1:]) 136 | time.sleep(4.0) 137 | except Exception as e: 138 | # If the app throws an error, catch it and display! 139 | print(e) 140 | warning(None, str(e)) 141 | time.sleep(4.0) 142 | 143 | # If the app exits or errors, do not relaunch! 144 | print("System error, soft reset!") 145 | state_clear_running() 146 | machine.reset() # Exit back to launcher 147 | 148 | 149 | # Draw an overlay box with a given message within it 150 | def warning(display, message, width=badger2040.WIDTH - 40, height=badger2040.HEIGHT - 40, line_spacing=20, text_size=0.6): 151 | if display is None: 152 | display = badger2040.Badger2040() 153 | display.led(128) 154 | 155 | # Draw a light grey background 156 | display.pen(12) 157 | display.rectangle((badger2040.WIDTH - width) // 2, (badger2040.HEIGHT - height) // 2, width, height) 158 | 159 | # Take the provided message and split it up into 160 | # lines that fit within the specified width 161 | words = message.split(" ") 162 | 163 | lines = [] 164 | current_line = "" 165 | for word in words: 166 | if display.measure_text(current_line + word + " ", text_size) < width: 167 | current_line += word + " " 168 | else: 169 | lines.append(current_line.strip()) 170 | current_line = word + " " 171 | lines.append(current_line.strip()) 172 | 173 | display.pen(0) 174 | display.thickness(2) 175 | 176 | # Display each line of text from the message, centre-aligned 177 | num_lines = len(lines) 178 | for i in range(num_lines): 179 | length = display.measure_text(lines[i], text_size) 180 | current_line = (i * line_spacing) - ((num_lines - 1) * line_spacing) // 2 181 | display.text(lines[i], (badger2040.WIDTH - length) // 2, (badger2040.HEIGHT // 2) + current_line, text_size) 182 | 183 | display.update() 184 | -------------------------------------------------------------------------------- /src/widgets.py: -------------------------------------------------------------------------------- 1 | import badger_os 2 | import badger2040 3 | import time 4 | import gc 5 | from badger2040 import WIDTH 6 | 7 | # for e.g. 2xAAA batteries, try max 3.4 min 3.0 8 | MAX_BATTERY_VOLTAGE = 3.4 9 | MIN_BATTERY_VOLTAGE = 3.0 10 | 11 | font_table = { 12 | ' ': (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 ), # 0x20 32 13 | '!': (0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x03,0x00,0x00 ), # 0x21 33 14 | '"': (0x00,0x00,0x1B,0x1B,0x12,0x00,0x00,0x00,0x00,0x00 ), # 0x22 34 15 | '#': (0x00,0x00,0x36,0x7F,0x36,0x36,0x7F,0x36,0x00,0x00 ), # 0x23 35 16 | '$': (0x00,0x0C,0x3E,0x0F,0x1E,0x3C,0x3F,0x1E,0x0C,0x00 ), # 0x24 36 17 | '%': (0x00,0x00,0x63,0x33,0x18,0x0C,0x66,0x63,0x00,0x00 ), # 0x25 37 18 | '&': (0x00,0x00,0x1E,0x33,0x1E,0x3F,0x1B,0x3E,0x00,0x00 ), # 0x26 38 19 | "'": (0x00,0x00,0x03,0x03,0x02,0x00,0x00,0x00,0x00,0x00 ), # 0x27 39 20 | '(': (0x00,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x06,0x00 ), # 0x28 40 21 | ')': (0x00,0x03,0x06,0x06,0x06,0x06,0x06,0x06,0x03,0x00 ), # 0x29 41 22 | '*': (0x00,0x00,0x00,0x33,0x1E,0x1E,0x33,0x00,0x00,0x00 ), # 0x2A 42 23 | '+': (0x00,0x00,0x0C,0x0C,0x3F,0x0C,0x0C,0x00,0x00,0x00 ), # 0x2B 43 24 | ',': (0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x02,0x00 ), # 0x2C 44 25 | '-': (0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00 ), # 0x2D 45 26 | '.': (0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x00,0x00 ), # 0x2E 46 27 | '/': (0x00,0x40,0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00 ), # 0x2F 47 28 | '0': (0x00,0x00,0x1E,0x33,0x33,0x33,0x33,0x1E,0x00,0x00 ), # 0x30 48 29 | '1': (0x00,0x00,0x06,0x07,0x06,0x06,0x06,0x0F,0x00,0x00 ), # 0x31 49 30 | '2': (0x00,0x00,0x1E,0x33,0x30,0x1E,0x03,0x3F,0x00,0x00 ), # 0x32 50 31 | '3': (0x00,0x00,0x1E,0x33,0x18,0x30,0x33,0x1E,0x00,0x00 ), # 0x33 51 32 | '4': (0x00,0x00,0x18,0x1C,0x1E,0x1B,0x3F,0x18,0x00,0x00 ), # 0x34 52 33 | '5': (0x00,0x00,0x3F,0x03,0x1F,0x30,0x33,0x1E,0x00,0x00 ), # 0x35 53 34 | '6': (0x00,0x00,0x1E,0x03,0x1F,0x33,0x33,0x1E,0x00,0x00 ), # 0x36 54 35 | '7': (0x00,0x00,0x3F,0x30,0x18,0x0C,0x0C,0x0C,0x00,0x00 ), # 0x37 55 36 | '8': (0x00,0x00,0x1E,0x33,0x1E,0x33,0x33,0x1E,0x00,0x00 ), # 0x38 56 37 | '9': (0x00,0x00,0x1E,0x33,0x33,0x3E,0x30,0x1E,0x00,0x00 ), # 0x39 57 38 | ':': (0x00,0x00,0x00,0x03,0x03,0x00,0x03,0x03,0x00,0x00 ), # 0x3A 58 39 | ';': (0x00,0x00,0x00,0x03,0x03,0x00,0x03,0x03,0x02,0x00 ), # 0x3B 59 40 | '<': (0x00,0x18,0x0C,0x06,0x03,0x06,0x0C,0x18,0x00,0x00 ), # 0x3C 60 41 | '=': (0x00,0x00,0x00,0x3F,0x00,0x3F,0x00,0x00,0x00,0x00 ), # 0x3D 61 42 | '>': (0x00,0x03,0x06,0x0C,0x18,0x0C,0x06,0x03,0x00,0x00 ), # 0x3E 62 43 | '?': (0x00,0x00,0x1E,0x33,0x18,0x0C,0x00,0x0C,0x00,0x00 ), # 0x3F 63 44 | '@': (0x7E,0xC3,0x3B,0xEF,0xEF,0xFB,0xC3,0x7E,0x00,0x00 ), # 0x40 64 45 | 'A': (0x00,0x00,0x1E,0x33,0x33,0x3F,0x33,0x33,0x00,0x00 ), # 0x41 65 46 | 'B': (0x00,0x00,0x1F,0x33,0x1F,0x33,0x33,0x1F,0x00,0x00 ), # 0x42 66 47 | 'C': (0x00,0x00,0x1E,0x33,0x03,0x03,0x33,0x1E,0x00,0x00 ), # 0x43 67 48 | 'D': (0x00,0x00,0x1F,0x33,0x33,0x33,0x33,0x1F,0x00,0x00 ), # 0x44 68 49 | 'E': (0x00,0x00,0x3F,0x03,0x0F,0x03,0x03,0x3F,0x00,0x00 ), # 0x45 69 50 | 'F': (0x00,0x00,0x3F,0x03,0x0F,0x03,0x03,0x03,0x00,0x00 ), # 0x46 70 51 | 'G': (0x00,0x00,0x1E,0x33,0x03,0x3B,0x33,0x1E,0x00,0x00 ), # 0x47 71 52 | 'H': (0x00,0x00,0x33,0x33,0x3F,0x33,0x33,0x33,0x00,0x00 ), # 0x48 72 53 | 'I': (0x00,0x00,0x0F,0x06,0x06,0x06,0x06,0x0F,0x00,0x00 ), # 0x49 73 54 | 'J': (0x00,0x00,0x30,0x30,0x30,0x30,0x33,0x1E,0x00,0x00 ), # 0x4A 74 55 | 'K': (0x00,0x00,0x33,0x1B,0x0F,0x0F,0x1B,0x33,0x00,0x00 ), # 0x4B 75 56 | 'L': (0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x3F,0x00,0x00 ), # 0x4C 76 57 | 'M': (0x00,0x00,0xC3,0xE7,0xFF,0xDB,0xC3,0xC3,0x00,0x00 ), # 0x4D 77 58 | 'N': (0x00,0x00,0x33,0x37,0x3F,0x3B,0x33,0x33,0x00,0x00 ), # 0x4E 78 59 | 'O': (0x00,0x00,0x1E,0x33,0x33,0x33,0x33,0x1E,0x00,0x00 ), # 0x4F 79 60 | 'P': (0x00,0x00,0x1F,0x33,0x33,0x1F,0x03,0x03,0x00,0x00 ), # 0x50 80 61 | 'Q': (0x00,0x00,0x1E,0x33,0x33,0x33,0x1B,0x36,0x00,0x00 ), # 0x51 81 62 | 'R': (0x00,0x00,0x1F,0x33,0x33,0x1F,0x1B,0x33,0x00,0x00 ), # 0x52 82 63 | 'S': (0x00,0x00,0x1E,0x03,0x1E,0x30,0x33,0x1E,0x00,0x00 ), # 0x53 83 64 | 'T': (0x00,0x00,0x3F,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00 ), # 0x54 84 65 | 'U': (0x00,0x00,0x33,0x33,0x33,0x33,0x33,0x1E,0x00,0x00 ), # 0x55 85 66 | 'V': (0x00,0x00,0x33,0x33,0x33,0x33,0x1E,0x0C,0x00,0x00 ), # 0x56 86 67 | 'W': (0x00,0x00,0xC3,0xDB,0xDB,0xDB,0xDB,0x7E,0x00,0x00 ), # 0x57 87 68 | 'X': (0x00,0x00,0x33,0x1E,0x0C,0x0C,0x1E,0x33,0x00,0x00 ), # 0x58 88 69 | 'Y': (0x00,0x00,0x33,0x33,0x33,0x1E,0x0C,0x0C,0x00,0x00 ), # 0x59 89 70 | 'Z': (0x00,0x00,0x3F,0x38,0x1C,0x0E,0x07,0x3F,0x00,0x00 ), # 0x5A 90 71 | '[': (0x00,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x0F,0x00 ), # 0x5B 91 72 | '\\': (0x00,0x01,0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00 ), # 0x5C 92 73 | ']': (0x00,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0F,0x00 ), # 0x5D 93 74 | '^': (0x00,0x00,0x0C,0x1E,0x33,0x00,0x00,0x00,0x00,0x00 ), # 0x5E 94 75 | '_': (0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00 ), # 0x5F 95 76 | '`': (0x00,0x00,0x03,0x03,0x02,0x00,0x00,0x00,0x00,0x00 ), # 0x60 96 77 | 'a': (0x00,0x00,0x00,0x1E,0x30,0x3E,0x33,0x3E,0x00,0x00 ), # 0x61 97 78 | 'b': (0x00,0x00,0x03,0x1F,0x33,0x33,0x33,0x1F,0x00,0x00 ), # 0x62 98 79 | 'c': (0x00,0x00,0x00,0x1E,0x33,0x03,0x33,0x1E,0x00,0x00 ), # 0x63 99 80 | 'd': (0x00,0x00,0x30,0x3E,0x33,0x33,0x33,0x3E,0x00,0x00 ), # 0x64 100 81 | 'e': (0x00,0x00,0x00,0x1E,0x33,0x1F,0x03,0x1E,0x00,0x00 ), # 0x65 101 82 | 'f': (0x00,0x00,0x0E,0x03,0x0F,0x03,0x03,0x03,0x00,0x00 ), # 0x66 102 83 | 'g': (0x00,0x00,0x00,0x3E,0x33,0x33,0x3E,0x30,0x1E,0x00 ), # 0x67 103 84 | 'h': (0x00,0x00,0x03,0x1F,0x33,0x33,0x33,0x33,0x00,0x00 ), # 0x68 104 85 | 'i': (0x00,0x00,0x03,0x00,0x03,0x03,0x03,0x03,0x00,0x00 ), # 0x69 105 86 | 'j': (0x00,0x00,0x06,0x00,0x06,0x06,0x06,0x06,0x03,0x00 ), # 0x6A 106 87 | 'k': (0x00,0x00,0x03,0x33,0x1B,0x0F,0x1B,0x33,0x00,0x00 ), # 0x6B 107 88 | 'l': (0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x06,0x00,0x00 ), # 0x6C 108 89 | 'm': (0x00,0x00,0x00,0x7F,0xDB,0xDB,0xDB,0xDB,0x00,0x00 ), # 0x6D 109 90 | 'n': (0x00,0x00,0x00,0x1F,0x33,0x33,0x33,0x33,0x00,0x00 ), # 0x6E 110 91 | 'o': (0x00,0x00,0x00,0x1E,0x33,0x33,0x33,0x1E,0x00,0x00 ), # 0x6F 111 92 | 'p': (0x00,0x00,0x00,0x1F,0x33,0x33,0x33,0x1F,0x03,0x00 ), # 0x70 112 93 | 'q': (0x00,0x00,0x00,0x3E,0x33,0x33,0x33,0x3E,0x30,0x00 ), # 0x71 113 94 | 'r': (0x00,0x00,0x00,0x0E,0x03,0x03,0x03,0x03,0x00,0x00 ), # 0x72 114 95 | 's': (0x00,0x00,0x00,0x1E,0x03,0x1E,0x30,0x1F,0x00,0x00 ), # 0x73 115 96 | 't': (0x00,0x00,0x06,0x0F,0x06,0x06,0x06,0x0C,0x00,0x00 ), # 0x74 116 97 | 'u': (0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x1E,0x00,0x00 ), # 0x75 117 98 | 'v': (0x00,0x00,0x00,0x33,0x33,0x33,0x1E,0x0C,0x00,0x00 ), # 0x76 118 99 | 'w': (0x00,0x00,0x00,0xC3,0xDB,0xDB,0xDB,0x7E,0x00,0x00 ), # 0x77 119 100 | 'x': (0x00,0x00,0x00,0x33,0x1E,0x0C,0x1E,0x33,0x00,0x00 ), # 0x78 120 101 | 'y': (0x00,0x00,0x00,0x33,0x33,0x33,0x3E,0x30,0x1E,0x00 ), # 0x79 121 102 | 'z': (0x00,0x00,0x00,0x3F,0x18,0x0C,0x06,0x3F,0x00,0x00 ), # 0x7A 122 103 | '(': (0x00,0x0C,0x06,0x06,0x03,0x03,0x06,0x06,0x0C,0x00 ), # 0x7B 123 104 | '|': (0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00 ), # 0x7C 124 105 | ')': (0x00,0x03,0x06,0x06,0x0C,0x0C,0x06,0x06,0x03,0x00 ), # 0x7D 125 106 | '~': (0x00,0x00,0x00,0x00,0x6E,0x3B,0x00,0x00,0x00,0x00 ) # 0x7E 126 107 | } 108 | 109 | def reverse_mask(x): 110 | x = ((x & 0x55) << 1) | ((x & 0xAA) >> 1) 111 | x = ((x & 0x33) << 2) | ((x & 0xCC) >> 2) 112 | x = ((x & 0x0F) << 4) | ((x & 0xF0) >> 4) 113 | return x 114 | 115 | def get_char(c): 116 | try: 117 | char = font_table[c] 118 | except KeyError: 119 | print(f"Unrecognized char: {c}") 120 | char = font_table[" "] 121 | return char 122 | 123 | def plength(para): 124 | # This could be precalculated, but I am lazy 125 | total = 0 126 | for c in para: 127 | char = get_char(c) 128 | width = sum(1 for i in [sum(1 for i in [x & mask for x in char] if i > 0) for mask in [128, 64, 32, 16, 8, 4, 2, 1]] if i > 0) 129 | total += 5 if width == 0 else width + 1 130 | return total 131 | 132 | def pprint(display, para, x, y, col): 133 | offset = 0 134 | display.thickness(1) 135 | 136 | if col == 0: 137 | display.pen(15) 138 | else: 139 | display.pen(0) 140 | 141 | for c in para: 142 | if col == 1: 143 | char = [~x & 0xFF for x in get_char(c)] 144 | else: 145 | char = get_char(c) 146 | 147 | display.image(bytearray([reverse_mask(x) for x in char]), 8, 10, x + offset, y) 148 | display.rectangle(x + offset - 1, y, 1, 10) 149 | 150 | offset += plength(c) 151 | 152 | def ppara(display, para, x, y, width, col): 153 | line = "" 154 | base_x = x 155 | length = 0 156 | for c in para: 157 | clength = plength(c) 158 | if clength + length > width: 159 | pprint(display, line, x, y, col) 160 | y += 10 161 | length = 0 162 | x = base_x 163 | line = "" 164 | 165 | length += clength 166 | line += c 167 | 168 | pprint(display, line, x, y, col) 169 | 170 | def ptitle(display, para, x, y, col): 171 | pprint(display, para, x, y, 0) 172 | 173 | display.thickness(2) 174 | display.pen(0) 175 | display.line(x, y + 10, x + plength(para), y + 10) 176 | 177 | def draw_background(display): 178 | display.pen(0) 179 | display.thickness(1) 180 | 181 | for y in range(11, 63): 182 | for x in range(1, 147, 2): 183 | display.rectangle(x * 2 + (2 if y % 2 == 0 else 0), y * 2, 2, 2) 184 | 185 | # image = bytearray(int(296 * 128 / 8)) 186 | # open("images/{}".format("background.bin"), "r").readinto(image) 187 | # display.image(image, 296, 128, 0, 0) 188 | 189 | def draw_menu(display, selected): 190 | menu = "Badge QR Special About" 191 | 192 | # logo 193 | display.pen(0) 194 | display.thickness(1) 195 | 196 | x = 12 197 | y = 6 198 | display.line(x + 2, y, x + 8, y) 199 | display.line(x + 6, y + 1, x + 9, y + 1) 200 | display.line(x + 1, y + 2, x + 10, y + 2) 201 | display.line(x + 5, y + 3, x + 10, y + 3) 202 | display.line(x, y + 4, x + 10, y + 4) 203 | display.line(x + 5, y + 5, x + 10, y + 5) 204 | display.line(x + 1, y + 6, x + 10, y + 6) 205 | display.line(x + 6, y + 7, x + 9, y + 7) 206 | display.line(x + 2, y + 8, x + 8, y + 8) 207 | 208 | x = 40 209 | pprint(display, menu, x, 6, 0) 210 | 211 | # selected 212 | display.pen(0) 213 | offset = plength(menu.split(selected)[0]) 214 | display.rectangle(x + offset - 7, 3, plength(selected) + 13, 17) 215 | pprint(display, selected, x + offset, 6, 1) 216 | 217 | display.pen(0) 218 | display.thickness(2) 219 | display.line(1, 21, 295, 21) 220 | 221 | def draw_border(display): 222 | display.pen(0) 223 | display.thickness(2) 224 | 225 | display.line(1, 1, 295, 1) 226 | display.line(1, 1, 1, 127) 227 | display.line(1, 127, 295, 127) 228 | display.line(295, 1, 295, 127) 229 | display.image(bytearray((0xff, 0xff, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0xc0)), 8, 8, 0, 0) 230 | display.image(bytearray((0xff, 0xff, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x03)), 8, 8, 288, 0) 231 | display.image(bytearray((0x03, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0xff, 0xff)), 8, 8, 288, 120) 232 | display.image(bytearray((0xc0, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xff, 0xff)), 8, 8, 0, 120) 233 | 234 | def map_value(input, in_min, in_max, out_min, out_max): 235 | return (((input - in_min) * (out_max - out_min)) / (in_max - in_min)) + out_min 236 | 237 | def draw_battery(display, x, y): 238 | vbat = badger_os.get_battery_level() 239 | level = int(map_value(vbat, MIN_BATTERY_VOLTAGE, MAX_BATTERY_VOLTAGE, 0, 4)) 240 | 241 | # Outline 242 | display.thickness(1) 243 | display.pen(15) 244 | display.rectangle(x, y, 19, 10) 245 | 246 | # Terminal 247 | display.rectangle(x + 19, y + 3, 2, 4) 248 | display.pen(0) 249 | display.rectangle(x + 1, y + 1, 17, 8) 250 | if level < 1: 251 | display.pen(0) 252 | display.line(x + 3, y, x + 3 + 10, y + 10) 253 | display.line(x + 3 + 1, y, x + 3 + 11, y + 10) 254 | display.pen(15) 255 | display.line(x + 2 + 2, y - 1, x + 4 + 12, y + 11) 256 | display.line(x + 2 + 3, y - 1, x + 4 + 13, y + 11) 257 | return 258 | 259 | # Battery Bars 260 | display.pen(15) 261 | for i in range(4): 262 | if level / 4 > (1.0 * i) / 4: 263 | display.rectangle(i * 4 + x + 2, y + 2, 3, 6) 264 | 265 | def draw_window(display, x, y, width, height, title): 266 | display.thickness(1) 267 | 268 | # borders 269 | display.pen(15) 270 | display.rectangle(x, y, width, height) 271 | 272 | display.pen(0) 273 | display.line(x, y, x + width - 1, y) 274 | display.line(x, y, x, y + height - 1) 275 | display.line(x, y + height - 1, x + width - 1, y + height - 1) 276 | display.line(x + width - 1, y, x + width - 1, y + height - 1) 277 | 278 | # shadow 279 | display.line(x, y + height, x + width + 1, y + height) 280 | display.line(x + width, y, x + width, y + height + 1) 281 | display.line(x + 1, y + height + 1, x + width + 1, y + height + 1) 282 | display.line(x + width + 1, y + 1, x + width + 1, y + height + 1) 283 | 284 | # title 285 | display.line(x + 4, y + 3, x + width - 4, y + 3) 286 | display.line(x + 4, y + 5, x + width - 4, y + 5) 287 | display.line(x + 4, y + 7, x + width - 4, y + 7) 288 | 289 | display.line(x, y + 11, x + width, y + 11) 290 | display.line(x, y + 11, x + width, y + 11) 291 | 292 | pprint(display, title, (x + x + width - plength(title)) // 2, y + 1, 0) 293 | 294 | def wait_for_user_to_release_buttons(display): 295 | pr = display.pressed 296 | while pr(badger2040.BUTTON_A) or pr(badger2040.BUTTON_B) or pr(badger2040.BUTTON_C) or pr(badger2040.BUTTON_UP) or pr(badger2040.BUTTON_DOWN): 297 | time.sleep(0.01) 298 | 299 | def launch_app(display, file): 300 | wait_for_user_to_release_buttons(display) 301 | 302 | for k in locals().keys(): 303 | if k not in ("gc", "file", "badger_os"): 304 | del locals()[k] 305 | gc.collect() 306 | badger_os.launch(file) 307 | 308 | def button(display, pin): 309 | if not display.pressed(badger2040.BUTTON_USER): # User button is NOT held down 310 | if pin == badger2040.BUTTON_A: 311 | launch_app(display, "_badge_app") 312 | if pin == badger2040.BUTTON_B: 313 | launch_app(display, "_qr_app") 314 | if pin == badger2040.BUTTON_C: 315 | launch_app(display, "_fortune_app") 316 | 317 | def draw_ui(display, selected): 318 | draw_border(display) 319 | draw_menu(display, selected) 320 | draw_background(display) 321 | draw_battery(display, WIDTH - 28, 6) -------------------------------------------------------------------------------- /src/fortune/cookie.txt: -------------------------------------------------------------------------------- 1 | "You know, of course, that the Tasmanians, who never committed adultery, are 2 | now extinct." 3 | -- M. Somerset Maugham 4 | % 5 | "If it ain't broke, don't fix it." 6 | -- Bert Lantz 7 | % 8 | "The one charm of marriage is that it makes a life of deception a necessity." 9 | -- Oscar Wilde 10 | % 11 | "God is a comedian playing to an audience too afraid to laugh." 12 | -- Voltaire 13 | % 14 | "There are things that are so serious that you can only joke about them" 15 | -- Heisenberg 16 | % 17 | "It takes all sorts of in & out-door schooling to get adapted 18 | to my kind of fooling" 19 | -- R. Frost 20 | % 21 | "Confound these ancestors.... They've stolen our best ideas!" 22 | -- Ben Jonson 23 | % 24 | I just thought of something funny...your mother. 25 | -- Cheech Marin 26 | % 27 | You will be successful in your work. 28 | % 29 | The life of a repo man is always intense. 30 | % 31 | If you're not careful, you're going to catch something. 32 | % 33 | That's the thing about people who think they hate computers. What they 34 | really hate is lousy programmers. 35 | -- Larry Niven and Jerry Pournelle in "Oath of Fealty" 36 | % 37 | Wherever you go...There you are. 38 | -- Buckaroo Banzai 39 | % 40 | Life in the state of nature is solitary, poor, nasty, brutish, and short. 41 | -- Thomas Hobbes, Leviathan 42 | % 43 | Lack of skill dictates economy of style. 44 | -- Joey Ramone 45 | % 46 | Successful and fortunate crime is called virtue. 47 | -- Seneca 48 | % 49 | The only thing necessary for the triumph of evil is for good men to do 50 | nothing. 51 | -- Edmund Burke 52 | % 53 | You may call me by my name, Wirth, or by my value, Worth. 54 | -- Nicklaus Wirth 55 | % 56 | Give a man a fish, and you feed him for a day. 57 | Teach a man to fish, and he'll invite himself over for dinner. 58 | -- Calvin Keegan 59 | % 60 | Prediction is very difficult, especially of the future. 61 | -- Niels Bohr 62 | % 63 | The computer can't tell you the emotional story. It can give you the exact 64 | mathematical design, but what's missing is the eyebrows. 65 | -- Frank Zappa 66 | % 67 | Things are not as simple as they seems at first. 68 | -- Edward Thorp 69 | % 70 | The main thing is the play itself. I swear that greed for money has nothing 71 | to do with it, although heaven knows I am sorely in need of money. 72 | -- Feodor Dostoyevsky 73 | % 74 | It is surely a great calamity for a human being to have no obsessions. 75 | -- Robert Bly 76 | % 77 | Machines take me by surprise with great frequency. 78 | -- Alan Turing 79 | % 80 | Uncertain fortune is thoroughly mastered by the equity of the calculation. 81 | -- Blaise Pascal 82 | % 83 | After Goliath's defeat, giants ceased to command respect. 84 | -- Freema Dyson 85 | % 86 | "It was the Law of the Sea, they said. Civilization ends at the waterline. 87 | Beyond that, we all enter the food chain, and not always right at the top." 88 | -- Hunter S. Thompson 89 | % 90 | ...when fits of creativity run strong, more than one programmer or writer has 91 | been known to abandon the desktop for the more spacious floor. 92 | -- Fred Brooks, Jr. 93 | % 94 | ...computer hardware progress is so fast. No other technology since 95 | civilization began has seen six orders of magnitude in performance-price 96 | gain in 30 years. 97 | -- Fred Brooks, Jr. 98 | % 99 | The complexity of software is an essential property, not an accidental one. 100 | Hence, descriptions of a software entity that abstract away its complexity 101 | often abstract away its essence. 102 | -- Fred Brooks, Jr. 103 | % 104 | Einstein argued that there must be simplified explanations of nature, because 105 | God is not capricious or arbitrary. No such faith comforts the software 106 | engineer. 107 | -- Fred Brooks, Jr. 108 | % 109 | Except for 75% of the women, everyone in the whole world wants to have sex. 110 | -- Ellyn Mustard 111 | % 112 | The only way to learn a new programming language is by writing programs in it. 113 | -- Brian Kernighan 114 | % 115 | Perfection is achieved only on the point of collapse. 116 | -- C. N. Parkinson 117 | % 118 | There you go man, 119 | Keep as cool as you can. 120 | It riles them to believe that you perceive the web they weave. 121 | Keep on being free! 122 | % 123 | Bingo, gas station, hamburger with a side order of airplane noise, 124 | and you'll be Gary, Indiana. - Jessie in the movie "Greaser's Palace" 125 | % 126 | Hoping to goodness is not theologically sound. - Peanuts 127 | % 128 | Police up your spare rounds and frags. Don't leave nothin' for the dinks. 129 | -- Willem Dafoe in "Platoon" 130 | % 131 | "All my life I wanted to be someone; I guess I should have been more 132 | specific." 133 | -- Jane Wagner 134 | % 135 | "Any medium powerful enough to extend man's reach is powerful enough to topple 136 | his world. To get the medium's magic to work for one's aims rather than 137 | against them is to attain literacy." 138 | -- Alan Kay, "Computer Software", Scientific American, September 1984 139 | % 140 | "The greatest warriors are the ones who fight for peace." 141 | -- Holly Near 142 | % 143 | "No matter where you go, there you are..." 144 | -- Buckaroo Banzai 145 | % 146 | Trespassers will be shot. Survivors will be prosecuted. 147 | % 148 | Trespassers will be shot. Survivors will be SHOT AGAIN! 149 | % 150 | "I'm growing older, but not up." 151 | -- Jimmy Buffett 152 | % 153 | Scientists will study your brain to learn more about your distant cousin, Man. 154 | % 155 | "I hate the itching. But I don't mind the swelling." 156 | -- new buzz phrase, like "Where's the Beef?" that David Letterman's trying 157 | to get everyone to start saying 158 | % 159 | Your own mileage may vary. 160 | % 161 | "Oh dear, I think you'll find reality's on the blink again." 162 | -- Marvin The Paranoid Android 163 | % 164 | "Send lawyers, guns and money..." 165 | -- Lyrics from a Warren Zevon song 166 | % 167 | "I go on working for the same reason a hen goes on laying eggs." 168 | -- H. L. Mencken 169 | % 170 | "Remember, Information is not knowledge; Knowledge is not Wisdom; 171 | Wisdom is not truth; Truth is not beauty; Beauty is not love; 172 | Love is not music; Music is the best." -- Frank Zappa 173 | % 174 | I can't drive 55. 175 | % 176 | "And they told us, what they wanted... 177 | Was a sound that could kill some-one, from a distance." -- Kate Bush 178 | % 179 | "In the face of entropy and nothingness, you kind of have to pretend it's not 180 | there if you want to keep writing good code." -- Karl Lehenbauer 181 | % 182 | Badges? We don't need no stinking badges. 183 | % 184 | I can't drive 55. 185 | I'm looking forward to not being able to drive 65, either. 186 | % 187 | Thank God a million billion times you live in Texas. 188 | % 189 | "Can you program?" "Well, I'm literate, if that's what you mean!" 190 | % 191 | No user-servicable parts inside. Refer to qualified service personnel. 192 | % 193 | Do not underestimate the value of print statements for debugging. 194 | % 195 | Do not underestimate the value of print statements for debugging. 196 | Don't have aesthetic convulsions when using them, either. 197 | % 198 | Conceptual integrity in turn dictates that the design must proceed from one 199 | mind, or from a very small number of agreeing resonant minds. 200 | -- Frederick Brooks Jr., "The Mythical Man Month" 201 | % 202 | The evolution of the human race will not be accomplished in the ten thousand 203 | years of tame animals, but in the million years of wild animals, because man 204 | is and will always be a wild animal. 205 | -- Charles Galton Darwin 206 | % 207 | "Jesus may love you, but I think you're garbage wrapped in skin." 208 | -- Michael O'Donohugh 209 | % 210 | ...though his invention worked superbly -- his theory was a crock of sewage 211 | from beginning to end. -- Vernor Vinge, "The Peace War" 212 | % 213 | "It's like deja vu all over again." -- Yogi Berra 214 | % 215 | The last thing one knows in constructing a work is what to put first. 216 | -- Blaise Pascal 217 | % 218 | "Where shall I begin, please your Majesty?" he asked. "Begin at the 219 | beginning," the King said, gravely, "and go on till you come to the end: then 220 | stop." 221 | Alice's Adventures in Wonderland, Lewis Carroll 222 | % 223 | A morsel of genuine history is a thing so rare as to be always valuable. 224 | -- Thomas Jefferson 225 | % 226 | To be awake is to be alive. -- Henry David Thoreau, in "Walden" 227 | % 228 | A person with one watch knows what time it is; a person with two watches is 229 | never sure. Proverb 230 | % 231 | You see but you do not observe. 232 | Sir Arthur Conan Doyle, in "The Memoirs of Sherlock Holmes" 233 | % 234 | A quarrel is quickly settled when deserted by one party; there is no battle 235 | unless there be two. -- Seneca 236 | % 237 | Nothing ever becomes real till it is experienced -- even a proverb is no 238 | proverb to you till your life has illustrated it. -- John Keats 239 | % 240 | The fancy is indeed no other than a mode of memory emancipated from the order 241 | of space and time. -- Samuel Taylor Coleridge 242 | % 243 | What we anticipate seldom occurs; what we least expect generally happens. 244 | -- Benjamin Disraeli 245 | % 246 | Nothing in progression can rest on its original plan. We may as well think of 247 | rocking a grown man in the cradle of an infant. -- Edmund Burke 248 | % 249 | For every problem there is one solution which is simple, neat, and wrong. 250 | -- H. L. Mencken 251 | % 252 | Don't tell me how hard you work. Tell me how much you get done. 253 | -- James J. Ling 254 | % 255 | One friend in a lifetime is much; two are many; three are hardly possible. 256 | Friendship needs a certain parallelism of life, a community of thought, 257 | a rivalry of aim. -- Henry Brook Adams 258 | % 259 | Each honest calling, each walk of life, has its own elite, its own aristocracy 260 | based on excellence of performance. -- James Bryant Conant 261 | % 262 | You can observe a lot just by watching. -- Yogi Berra 263 | % 264 | If the presence of electricity can be made visible in any part of a circuit, I 265 | see no reason why intelligence may not be transmitted instantaneously by 266 | electricity. -- Samuel F. B. Morse 267 | % 268 | "Mr. Watson, come here, I want you." -- Alexander Graham Bell 269 | % 270 | It's currently a problem of access to gigabits through punybaud. 271 | -- J. C. R. Licklider 272 | % 273 | A right is not what someone gives you; it's what no one can take from you. 274 | -- Ramsey Clark 275 | % 276 | The price one pays for pursuing any profession, or calling, is an intimate 277 | knowledge of its ugly side. -- James Baldwin 278 | % 279 | Small is beautiful. 280 | % 281 | ...the increased productivity fostered by a friendly environment and quality 282 | tools is essential to meet ever increasing demands for software. 283 | -- M. D. McIlroy, E. N. Pinson and B. A. Tague 284 | % 285 | It is not best to swap horses while crossing the river. 286 | -- Abraham Lincoln 287 | % 288 | Mirrors should reflect a little before throwing back images. 289 | -- Jean Cocteau 290 | % 291 | In the future, you're going to get computers as prizes in breakfast cereals. 292 | You'll throw them out because your house will be littered with them. 293 | -- Robert Lucky 294 | % 295 | Get hold of portable property. -- Charles Dickens, "Great Expectations" 296 | % 297 | How many hardware guys does it take to change a light bulb? 298 | 299 | "Well the diagnostics say it's fine buddy, so it's a software problem." 300 | % 301 | "Don't try to outweird me, three-eyes. I get stranger things than you free 302 | with my breakfast cereal." 303 | -- Zaphod Beeblebrox in "Hitchiker's Guide to the Galaxy" 304 | % 305 | Uncompensated overtime? Just Say No. 306 | % 307 | Decaffeinated coffee? Just Say No. 308 | % 309 | "Show business is just like high school, except you get paid." 310 | -- Martin Mull 311 | % 312 | "This isn't brain surgery; it's just television." 313 | -- David Letterman 314 | % 315 | "Morality is one thing. Ratings are everything." 316 | -- A Network 23 executive on "Max Headroom" 317 | % 318 | Live free or die. 319 | % 320 | "...if the church put in half the time on covetousness that it does on lust, 321 | this would be a better world." - Garrison Keillor, "Lake Wobegon Days" 322 | % 323 | Outside of a dog, a book is man's best friend. Inside of a dog, it is too 324 | dark to read. 325 | % 326 | "Probably the best operating system in the world is the [operating system] 327 | made for the PDP-11 by Bell Laboratories." - Ted Nelson, October 1977 328 | % 329 | "All these black people are screwing up my democracy." - Ian Smith 330 | % 331 | Use the Force, Luke. 332 | % 333 | I've got a bad feeling about this. 334 | % 335 | The power to destroy a planet is insignificant when compared to the power of 336 | the Force. 337 | -- Darth Vader 338 | % 339 | When I left you, I was but the learner. Now, I am the master. 340 | -- Darth Vader 341 | % 342 | 186,000 Miles per Second. It's not just a good idea. IT'S THE LAW. 343 | % 344 | Stupidity, like virtue, is its own reward. 345 | % 346 | Gee, Toto, I don't think we're in Kansas anymore. 347 | % 348 | Children begin by loving their parents. After a time they judge them. Rarely, 349 | if ever, do they forgive them. 350 | -- Oscar Wilde 351 | % 352 | Single tasking: Just Say No. 353 | % 354 | "Catch a wave and you're sitting on top of the world." 355 | -- The Beach Boys 356 | % 357 | "Bond reflected that good Americans were fine people and that most of them 358 | seemed to come from Texas." 359 | -- Ian Fleming, "Casino Royale" 360 | % 361 | "I think trash is the most important manifestation of culture we have in my 362 | lifetime." 363 | -- Johnny Legend 364 | % 365 | Even if you can deceive people about a product through misleading statements, 366 | sooner or later the product will speak for itself. 367 | -- Hajime Karatsu 368 | % 369 | Memories of you remind me of you. 370 | -- Karl Lehenbauer 371 | % 372 | Life. Don't talk to me about life. 373 | -- Marvin the Paranoid Android 374 | % 375 | On a clear disk you can seek forever. 376 | % 377 | The world is coming to an end--save your buffers! 378 | % 379 | grep me no patterns and I'll tell you no lines. 380 | % 381 | It is your destiny. 382 | -- Darth Vader 383 | % 384 | Hokey religions and ancient weapons are no substitute for a good blaster at 385 | your side. 386 | -- Han Solo 387 | % 388 | How many QA engineers does it take to screw in a light bulb? 389 | 390 | 3: 1 to screw it in and 2 to say "I told you so" when it doesn't work. 391 | % 392 | How many NASA managers does it take to screw in a light bulb? 393 | 394 | "That's a known problem... don't worry about it." 395 | % 396 | To be is to program. 397 | % 398 | To program is to be. 399 | % 400 | I program, therefore I am. 401 | % 402 | People are very flexible and learn to adjust to strange 403 | surroundings -- they can become accustomed to read Lisp and 404 | Fortran programs, for example. 405 | -- Leon Sterling and Ehud Shapiro, Art of Prolog, MIT Press 406 | % 407 | "I am your density." 408 | -- George McFly in "Back to the Future" 409 | % 410 | "So why don't you make like a tree, and get outta here." 411 | -- Biff in "Back to the Future" 412 | % 413 | "Falling in love makes smoking pot all day look like the ultimate in restraint." 414 | -- Dave Sim, author of Cerebrus. 415 | % 416 | The existence of god implies a violation of causality. 417 | % 418 | "I may kid around about drugs, but really, I take them seriously." 419 | -- Doctor Graper 420 | % 421 | Operating-system software is the program that orchestrates all the basic 422 | functions of a computer. 423 | -- The Wall Street Journal, Tuesday, September 15, 1987, page 40 424 | % 425 | People think my friend George is weird because he wears sideburns...behind his 426 | ears. I think he's weird because he wears false teeth...with braces on them. 427 | -- Steven Wright 428 | % 429 | My brother sent me a postcard the other day with this big satellite photo of 430 | the entire earth on it. On the back it said: "Wish you were here". 431 | -- Steven Wright 432 | % 433 | You can't have everything... where would you put it? 434 | -- Steven Wright 435 | % 436 | I was playing poker the other night... with Tarot cards. I got a full house and 437 | 4 people died. 438 | -- Steven Wright 439 | % 440 | You know that feeling when you're leaning back on a stool and it starts to tip 441 | over? Well, that's how I feel all the time. 442 | -- Steven Wright 443 | % 444 | I came home the other night and tried to open the door with my car keys...and 445 | the building started up. So I took it out for a drive. A cop pulled me over 446 | for speeding. He asked me where I live... "Right here". 447 | -- Steven Wright 448 | % 449 | "Live or die, I'll make a million." 450 | -- Reebus Kneebus, before his jump to the center of the earth, 451 | Firesign Theater 452 | % 453 | The typical page layout program is nothing more than an electronic 454 | light table for cutting and pasting documents. 455 | % 456 | There are bugs and then there are bugs. And then there are bugs. 457 | -- Karl Lehenbauer 458 | % 459 | My computer can beat up your computer. 460 | -- Karl Lehenbauer 461 | % 462 | Kill Ugly Processor Architectures 463 | -- Karl Lehenbauer 464 | % 465 | Kill Ugly Radio 466 | -- Frank Zappa 467 | % 468 | "Just Say No." - Nancy Reagan 469 | 470 | "No." - Ronald Reagan 471 | % 472 | Repel them. Repel them. Induce them to relinquish the spheroid. 473 | -- Indiana University fans' chant for their perennially bad 474 | football team 475 | % 476 | If it's working, the diagnostics say it's fine. 477 | If it's not working, the diagnostics say it's fine. 478 | -- A proposed addition to rules for realtime programming 479 | % 480 | In the realm of scientific observation, luck is granted only to those who are 481 | prepared. 482 | -- Louis Pasteur 483 | % 484 | core error - bus dumped 485 | % 486 | If imprinted foil seal under cap is broken or missing when purchased, do not 487 | use. 488 | % 489 | "Come on over here, baby, I want to do a thing with you." 490 | -- A Cop, arresting a non-groovy person after the revolution, 491 | Firesign Theater 492 | % 493 | "Ahead warp factor 1" 494 | -- Captain Kirk 495 | % 496 | Harrison's Postulate: 497 | For every action, there is an equal and opposite criticism. 498 | % 499 | Mr. Cole's Axiom: 500 | The sum of the intelligence on the planet is a constant; 501 | the population is growing. 502 | % 503 | Felson's Law: 504 | To steal ideas from one person is plagiarism; to steal from 505 | many is research. 506 | % 507 | If a person (a) is poorly, (b) receives treatment intended to make him better, 508 | and (c) gets better, then no power of reasoning known to medical science can 509 | convince him that it may not have been the treatment that restored his health. 510 | -- Sir Peter Medawar, The Art of the Soluble 511 | % 512 | America has been discovered before, but it has always been hushed up. 513 | -- Oscar Wilde 514 | % 515 | Unix: Some say the learning curve is steep, but you only have to climb it once. 516 | -- Karl Lehenbauer 517 | % 518 | Sometimes, too long is too long. 519 | -- Joe Crowe 520 | % 521 | When bad men combine, the good must associate; else they will fall one by one, 522 | an unpitied sacrifice in a contemptible struggle. 523 | -- Edmund Burke 524 | % 525 | "Of all the tyrannies that affect mankind, tyranny in religion is the worst." 526 | -- Thomas Paine 527 | % 528 | "I say we take off; nuke the site from orbit. It's the only way to be sure." 529 | -- Corporal Hicks, in "Aliens" 530 | % 531 | "There is nothing so deadly as not to hold up to people the opportunity to 532 | do great and wonderful things, if we wish to stimulate them in an active way." 533 | -- Dr. Harold Urey, Nobel Laureate in chemistry 534 | % 535 | "Athens built the Acropolis. Corinth was a commercial city, interested in 536 | purely materialistic things. Today we admire Athens, visit it, preserve the 537 | old temples, yet we hardly ever set foot in Corinth." 538 | -- Dr. Harold Urey, Nobel Laureate in chemistry 539 | % 540 | I do not believe that this generation of Americans is willing to resign itself 541 | to going to bed each night by the light of a Communist moon... 542 | -- Lyndon B. Johnson 543 | % 544 | Life's the same, except for the shoes. 545 | -- The Cars 546 | % 547 | Adapt. Enjoy. Survive. 548 | % 549 | Were there fewer fools, knaves would starve. 550 | -- Anonymous 551 | % 552 | Humanity has the stars in its future, and that future is too important to be 553 | lost under the burden of juvenile folly and ignorant superstition. 554 | -- Isaac Asimov 555 | % 556 | "Those who believe in astrology are living in houses with foundations of 557 | Silly Putty." 558 | -- Dennis Rawlins, astronomer 559 | % 560 | Doubt is a pain too lonely to know that faith is his twin brother. 561 | -- Kahlil Gibran 562 | % 563 | Doubt isn't the opposite of faith; it is an element of faith. 564 | -- Paul Tillich, German theologian and historian 565 | % 566 | Doubt is not a pleasant condition, but certainty is absurd. 567 | -- Voltaire 568 | % 569 | If only God would give me some clear sign! Like making a large deposit 570 | in my name at a Swiss Bank. 571 | -- Woody Allen 572 | % 573 | To downgrade the human mind is bad theology. 574 | -- C. K. Chesterton 575 | % 576 | Life is a process, not a principle, a mystery to be lived, not a problem to 577 | be solved. 578 | -- Gerard Straub, television producer and author (stolen from Frank 579 | Herbert??) 580 | % 581 | So we follow our wandering paths, and the very darkness acts as our guide and 582 | our doubts serve to reassure us. 583 | -- Jean-Pierre de Caussade, eighteenth-century Jesuit priest 584 | % 585 | Faith may be defined briefly as an illogical belief in the occurrence of the 586 | improbable. 587 | -- H. L. Mencken 588 | % 589 | And do you not think that each of you women is an Eve? The judgement of God 590 | upon your sex endures today; and with it invariably endures your position of 591 | criminal at the bar of justice. 592 | -- Tertullian, second-century Christian writer, misogynist 593 | % 594 | I judge a religion as being good or bad based on whether its adherents 595 | become better people as a result of practicing it. 596 | -- Joe Mullally, computer salesman 597 | % 598 | Imitation is the sincerest form of plagiarism. 599 | % 600 | "Unibus timeout fatal trap program lost sorry" 601 | -- An error message printed by DEC's RSTS operating system for the 602 | PDP-11 603 | % 604 | How many surrealists does it take to screw in a light bulb? 605 | 606 | One to hold the giraffe and one to fill the bathtub with brightly colored 607 | power tools. 608 | % 609 | How many Bavarian Illuminati does it take to screw in a light bulb? 610 | 611 | Three: one to screw it in, and one to confuse the issue. 612 | % 613 | How long does it take a DEC field service engineer to change a light bulb? 614 | 615 | It depends on how many bad ones he brought with him. 616 | % 617 | It does me no injury for my neighbor to say there are twenty gods or no God. 618 | It neither picks my pocket nor breaks my leg. 619 | -- Thomas Jefferson 620 | % 621 | I do not believe in the creed professed by the Jewish Church, by the Roman 622 | Church, by the Greek Church, by the Turkish Church, by the Protestant Church, 623 | nor by any Church that I know of. My own mind is my own Church. 624 | -- Thomas Paine 625 | % 626 | God requireth not a uniformity of religion. 627 | -- Roger Williams 628 | % 629 | I do not find in orthodox Christianity one redeeming feature. 630 | -- Thomas Jefferson 631 | % 632 | The Bible is not my Book and Christianity is not my religion. I could 633 | never give assent to the long complicated statements of Christian dogma. 634 | -- Abraham Lincoln 635 | % 636 | We're here to give you a computer, not a religion. 637 | -- attributed to Bob Pariseau, at the introduction of the Amiga 638 | % 639 | ...there can be no public or private virtue unless the foundation of action is 640 | the practice of truth. 641 | -- George Jacob Holyoake 642 | % 643 | "If you'll excuse me a minute, I'm going to have a cup of coffee." 644 | -- broadcast from Apollo 11's LEM, "Eagle", to Johnson Space Center, 645 | Houston July 20, 1969, 7:27 P.M. 646 | % 647 | The meek are contesting the will. 648 | % 649 | I'm sick of being trodden on! The Elder Gods say they can make me a man! 650 | All it costs is my soul! I'll do it, cuz NOW I'M MAD!!! 651 | -- Necronomicomics #1, Jack Herman & Jeff Dee 652 | % 653 | "I'm a mean green mother from outer space" 654 | -- Audrey II, The Little Shop of Horrors 655 | % 656 | Any sufficiently advanced technology is indistinguishable from a rigged demo. 657 | -- Andy Finkel, computer guy 658 | % 659 | Being schizophrenic is better than living alone. 660 | % 661 | NOWPRINT. NOWPRINT. Clemclone, back to the shadows again. 662 | -- The Firesign Theater 663 | % 664 | Yes, many primitive people still believe this myth...But in today's technical 665 | vastness of the future, we can guess that surely things were much different. 666 | -- The Firesign Theater 667 | % 668 | ...this is an awesome sight. The entire rebel resistance buried under six 669 | million hardbound copies of "The Naked Lunch." 670 | -- The Firesign Theater 671 | % 672 | We want to create puppets that pull their own strings. 673 | -- Ann Marion 674 | % 675 | I know engineers. They love to change things. 676 | -- Dr. McCoy 677 | % 678 | On our campus the UNIX system has proved to be not only an effective software 679 | tool, but an agent of technical and social change within the University. 680 | -- John Lions (University of New South Wales) 681 | % 682 | Those who do not understand Unix are condemned to reinvent it, poorly. 683 | -- Henry Spencer, University of Toronto Unix hack 684 | % 685 | Clothes make the man. Naked people have little or no influence on society. 686 | -- Mark Twain 687 | % 688 | The sooner all the animals are extinct, the sooner we'll find their money. 689 | -- Ed Bluestone 690 | % 691 | He's dead, Jim. 692 | % 693 | New York... when civilization falls apart, remember, we were way ahead of you. 694 | -- David Letterman 695 | % 696 | You can do more with a kind word and a gun than with just a kind word. 697 | -- Al Capone 698 | % 699 | Remember, there's a big difference between kneeling down and bending over. 700 | -- Frank Zappa 701 | % 702 | "There is no statute of limitations on stupidity." 703 | -- Randomly produced by a computer program called Markov3. 704 | % 705 | There is a time in the tides of men, 706 | Which, taken at its flood, leads on to success. 707 | On the other hand, don't count on it. 708 | -- T. K. Lawson 709 | % 710 | To follow foolish precedents, and wink 711 | With both our eyes, is easier than to think. 712 | -- William Cowper 713 | % 714 | It is the quality rather than the quantity that matters. 715 | -- Lucius Annaeus Seneca (4 B.C. - A.D. 65) 716 | % 717 | Nothing ever becomes real until it is experienced. 718 | -- John Keats 719 | % 720 | Your good nature will bring you unbounded happiness. 721 | % 722 | "We can't schedule an orgy, it might be construed as fighting" 723 | --Stanley Sutton 724 | % 725 | Weekends were made for programming. 726 | -- Karl Lehenbauer 727 | % 728 | "Ada is the work of an architect, not a computer scientist." 729 | -- Jean Icbiah, inventor of Ada, weenie 730 | % 731 | I am here by the will of the people and I won't leave until I get my raincoat 732 | back. 733 | -- a slogan of the anarchists in Richard Kadrey's "Metrophage" 734 | % 735 | How many nuclear engineers does it take to change a light bulb ? 736 | 737 | Seven: One to install the new bulb, and six to determine what to do 738 | with the old one for the next 10,000 years. 739 | % 740 | As long as we're going to reinvent the wheel again, we might as well try making 741 | it round this time. 742 | -- Mike Dennison 743 | % 744 | This restaurant was advertising breakfast any time. So I ordered 745 | french toast in the renaissance. 746 | -- Steven Wright, comedian 747 | % 748 | Everyone has a purpose in life. Perhaps yours is watching television. 749 | -- David Letterman 750 | % 751 | e-credibility: the non-guaranteeable likelihood that the electronic data 752 | you're seeing is genuine rather than somebody's made-up crap. 753 | -- Karl Lehenbauer 754 | % 755 | Whenever people agree with me, I always think I must be wrong. 756 | -- Oscar Wilde 757 | % 758 | My mother is a fish. 759 | -- William Faulkner 760 | % 761 | Spiritual leadership should remain spiritual leadership and the temporal 762 | power should not become too important in any church. 763 | -- Eleanor Roosevelt 764 | % 765 | Truth has always been found to promote the best interests of mankind... 766 | -- Percy Bysshe Shelley 767 | % 768 | It is wrong always, everywhere and for everyone to believe anything upon 769 | insufficient evidence. 770 | -- W. K. Clifford, British philosopher, circa 1876 771 | % 772 | Marriage is the only adventure open to the cowardly. 773 | -- Voltaire 774 | % 775 | It is clear that the individual who persecutes a man, his brother, because 776 | he is not of the same opinion, is a monster. 777 | -- Voltaire 778 | % 779 | The man scarce lives who is not more credulous than he ought to be.... The 780 | natural disposition is always to believe. It is acquired wisdom and experience 781 | only that teach incredulity, and they very seldom teach it enough. 782 | -- Adam Smith 783 | % 784 | A fanatic is a person who can't change his mind and won't change the subject. 785 | -- Winston Churchill 786 | % 787 | We're fighting against humanism, we're fighting against liberalism... 788 | we are fighting against all the systems of Satan that are destroying 789 | our nation today...our battle is with Satan himself. 790 | -- Jerry Falwell 791 | % 792 | They [preachers] dread the advance of science as witches do the approach 793 | of daylight and scowl on the fatal harbinger announcing the subversions 794 | of the duperies on which they live. 795 | -- Thomas Jefferson 796 | % 797 | Saints should always be judged guilty until they are proven innocent. 798 | -- George Orwell 799 | % 800 | Nothing is easier than to denounce the evildoer; nothing is more difficult 801 | than to understand him. 802 | -- Fyodor Dostoevski 803 | % 804 | The Messiah will come. There will be a resurrection of the dead -- all 805 | the things that Jews believed in before they got so damn sophisticated. 806 | -- Rabbi Meir Kahane 807 | % 808 | The world is no nursery. 809 | -- Sigmund Freud 810 | % 811 | ...I would go so far as to suggest that, were it not for our ego and 812 | concern to be different, the African apes would be included in our 813 | family, the Hominidae. 814 | -- Richard Leakey 815 | % 816 | "Well, you see, it's such a transitional creature. It's a piss-poor 817 | reptile and not very much of a bird." 818 | -- Melvin Konner, from "The Tangled Wing", quoting a zoologist who has 819 | studied the archaeopteryx and found it "very much like people" 820 | % 821 | "You need tender loving care once a week - so that I can slap you into shape." 822 | -- Ellyn Mustard 823 | % 824 | "It may be that our role on this planet is not to worship God but to 825 | create him." 826 | -Arthur C. Clarke 827 | % 828 | "Why should we subsidize intellectual curiosity?" 829 | -Ronald Reagan 830 | % 831 | "There is nothing new under the sun, but there are lots of old things 832 | we don't know yet." 833 | -Ambrose Bierce 834 | % 835 | "Plan to throw one away. You will anyway." 836 | -- Fred Brooks, "The Mythical Man Month" 837 | % 838 | You need tender loving care once a week - so that I can slap you into shape. 839 | -- Ellyn Mustard 840 | % 841 | "It may be that our role on this planet is not to worship God but to 842 | create him." 843 | -Arthur C. Clarke 844 | % 845 | "Why should we subsidize intellectual curiosity?" 846 | -Ronald Reagan 847 | % 848 | "There is nothing new under the sun, but there are lots of old things 849 | we don't know yet." 850 | -Ambrose Bierce 851 | % 852 | "I have just one word for you, my boy...plastics." 853 | -- from "The Graduate" 854 | % 855 | "There is such a fine line between genius and stupidity." 856 | -- David St. Hubbins, "Spinal Tap" 857 | % 858 | "If Diet Coke did not exist it would have been necessary to invent it." 859 | -- Karl Lehenbauer 860 | % 861 | In space, no one can hear you fart. 862 | % 863 | Brain damage is all in your head. 864 | -- Karl Lehenbauer 865 | % 866 | Wish and hope succeed in discerning signs of paranormality where reason and 867 | careful scientific procedure fail. 868 | -- James E. Alcock, The Skeptical Inquirer, Vol. 12 869 | % 870 | "It is better to have tried and failed than to have failed to try, but 871 | the result's the same." 872 | -- Mike Dennison 873 | % 874 | It is not well to be thought of as one who meekly submits to insolence and 875 | intimidation. 876 | % 877 | "Regardless of the legal speed limit, your Buick must be operated at 878 | speeds faster than 85 MPH (140kph)." 879 | -- 1987 Buick Grand National owners manual. 880 | % 881 | "Your attitude determines your attitude." 882 | -- Zig Ziglar, self-improvement doofus 883 | % 884 | Thufir's a Harkonnen now. 885 | % 886 | "If you want to eat hippopotamus, you've got to pay the freight." 887 | -- attributed to an IBM guy, about why IBM software uses so much memory 888 | % 889 | Parkinson's Law: Work expands to fill the time alloted it. 890 | % 891 | Karl's version of Parkinson's Law: Work expands to exceed the time alloted it. 892 | % 893 | It is better to never have tried anything than to have tried something and 894 | failed. 895 | -- motto of jerks, weenies and losers everywhere 896 | % 897 | "...all the good computer designs are bootlegged; the formally planned products, 898 | if they are built at all, are dogs!" 899 | -- David E. Lundstrom, "A Few Good Men From Univac", MIT Press, 1987 900 | % 901 | "To take a significant step forward, you must make a series of finite 902 | improvements." 903 | -- Donald J. Atwood, General Motors 904 | % 905 | "We will bury you." 906 | -- Nikita Kruschev 907 | % 908 | "Now here's something you're really going to like!" 909 | -- Rocket J. Squirrel 910 | % 911 | "How to make a million dollars: First, get a million dollars." 912 | -- Steve Martin 913 | % 914 | "Language shapes the way we think, and determines what we can think about." 915 | -- B. L. Whorf 916 | % 917 | "For the love of phlegm...a stupid wall of death rays. How tacky can ya get?" 918 | -- Post Brothers comics 919 | % 920 | "Bureaucracy is the enemy of innovation." 921 | -- Mark Shepherd, former President and CEO of Texas Instruments 922 | % 923 | "An organization dries up if you don't challenge it with growth." 924 | -- Mark Shepherd, former President and CEO of Texas Instruments 925 | % 926 | "I've seen it. It's rubbish." 927 | -- Marvin the Paranoid Android 928 | % 929 | Our business is run on trust. We trust you will pay in advance. 930 | % 931 | "Infidels in all ages have battled for the rights of man, and have at all times 932 | been the fearless advocates of liberty and justice." 933 | -- Robert Green Ingersoll 934 | % 935 | I find you lack of faith in the forth dithturbing. 936 | -- Darse ("Darth") Vader 937 | % 938 | "All Bibles are man-made." 939 | -- Thomas Edison 940 | % 941 | "Spock, did you see the looks on their faces?" 942 | "Yes, Captain, a sort of vacant contentment." 943 | % 944 | "The triumph of libertarian anarchy is nearly (in historical terms) at 945 | hand... *if* we can keep the Left from selling us into slavery and the 946 | Right from blowing us up for, say, the next twenty years." 947 | -- Eric Rayman, usenet guy, about nanotechnology 948 | % 949 | "Gravitation cannot be held responsible for people falling in love." 950 | -- Albert Einstein 951 | % 952 | "I think Michael is like litmus paper - he's always trying to learn." 953 | -- Elizabeth Taylor, absurd non-sequitur about Michael Jackson 954 | % 955 | "A verbal contract isn't worth the paper it's printed on." 956 | -- Samuel Goldwyn 957 | % 958 | "We shall reach greater and greater platitudes of achievement." 959 | -- Richard J. Daley 960 | % 961 | "With molasses you catch flies, with vinegar you catch nobody." 962 | -- Baltimore City Councilman Dominic DiPietro 963 | % 964 | "Lead us in a few words of silent prayer." 965 | -- Bill Peterson, former Houston Oiler football coach 966 | % 967 | "I couldn't remember things until I took that Sam Carnegie course." 968 | -- Bill Peterson, former Houston Oiler football coach 969 | % 970 | "Right now I feel that I've got my feet on the ground as far as my head 971 | is concerned." 972 | -- Baseball pitcher Bo Belinsky 973 | % 974 | "Ninety percent of baseball is half mental." 975 | -- Yogi Berra 976 | % 977 | "jackpot: you may have an unnecessary change record" 978 | -- message from "diff" 979 | % 980 | "One lawyer can steal more than a hundred men with guns." 981 | -- The Godfather 982 | % 983 | What's the difference between a computer salesman and a used car salesman? 984 | 985 | A used car salesman knows when he's lying. 986 | % 987 | "Those who will be able to conquer software will be able to conquer the 988 | world." 989 | -- Tadahiro Sekimoto, president, NEC Corp. 990 | % 991 | "There are some good people in it, but the orchestra as a whole is equivalent 992 | to a gang bent on destruction." 993 | -- John Cage, composer 994 | % 995 | "I believe the use of noise to make music will increase until we reach a 996 | music produced through the aid of electrical instruments which will make 997 | available for musical purposes any and all sounds that can be heard." 998 | -- composer John Cage, 1937 999 | % 1000 | "One day I woke up and discovered that I was in love with tripe." 1001 | -- Tom Anderson 1002 | % 1003 | "Most people would like to be delivered from 1004 | temptation but would like it to keep in touch." 1005 | -- Robert Orben 1006 | % 1007 | The rule on staying alive as a program manager is to give 'em a number or 1008 | give 'em a date, but never give 'em both at once. 1009 | % 1010 | An optimist believes we live in the best world possible; 1011 | a pessimist fears this is true. 1012 | % 1013 | "If John Madden steps outside on February 2, looks down, and doesn't see his 1014 | feet, we'll have 6 more weeks of Pro football." 1015 | -- Chuck Newcombe 1016 | % 1017 | Dead? No excuse for laying off work. 1018 | % 1019 | Lead me not into temptation... I can find it myself. 1020 | % 1021 | "When people are least sure, they are often most dogmatic." 1022 | -- John Kenneth Galbraith 1023 | % 1024 | "Nature is very un-American. Nature never hurries." 1025 | -- William George Jordan 1026 | % 1027 | "We learn from history that we learn nothing from history." 1028 | -- George Bernard Shaw 1029 | % 1030 | "Flattery is all right -- if you don't inhale." 1031 | -- Adlai Stevenson 1032 | % 1033 | "Consistency requires you to be as ignorant today as you were a year ago." 1034 | -- Bernard Berenson 1035 | % 1036 | "Summit meetings tend to be like panda matings. The expectations are always 1037 | high, and the results usually disappointing." 1038 | -- Robert Orben 1039 | % 1040 | "A great many people think they are thinking when they are merely rearranging 1041 | their prejudices." 1042 | -- William James 1043 | % 1044 | "Tell the truth and run." 1045 | -- Yugoslav proverb 1046 | % 1047 | "The best index to a person's character is a) how he treats people who can't 1048 | do him any good and b) how he treats people who can't fight back." 1049 | -- Abigail Van Buren 1050 | % 1051 | "Never face facts; if you do, you'll never get up in the morning." 1052 | -- Marlo Thomas 1053 | % 1054 | "Life is a garment we continuously alter, but which never seems to fit." 1055 | -- David McCord 1056 | % 1057 | "The value of marriage is not that adults produce children, but that children 1058 | produce adults." 1059 | -- Peter De Vries 1060 | % 1061 | "It is easier to fight for principles than to live up to them." 1062 | -- Alfred Adler 1063 | % 1064 | "Security is mostly a superstition. It does not exist in nature... Life is 1065 | either a daring adventure or nothing." 1066 | -- Helen Keller 1067 | % 1068 | "Whoever undertakes to set himself up as a judge of Truth and Knowledge is 1069 | shipwrecked by the laughter of the gods." 1070 | -- Albert Einstein 1071 | % 1072 | "Success covers a multitude of blunders." 1073 | -- George Bernard Shaw 1074 | % 1075 | "The mark of an immature man is that he wants to die nobly for a cause, while 1076 | the mark of a mature man is that he wants to live humbly for one." 1077 | -- William Stekel 1078 | % 1079 | "Yes, and I feel bad about rendering their useless carci into dogfood..." 1080 | -- Badger comics 1081 | % 1082 | "Is it really you, Fuzz, or is it Memorex, or is it radiation sickness?" 1083 | -- Sonic Disruptors comics 1084 | % 1085 | "Most of us, when all is said and done, like what we like and make up reasons 1086 | for it afterwards." 1087 | -- Soren F. Petersen 1088 | % 1089 | "You're a creature of the night, Michael. Wait'll Mom hears about this." 1090 | -- from the movie "The Lost Boys" 1091 | % 1092 | "Plastic gun. Ingenious. More coffee, please." 1093 | -- The Phantom comics 1094 | % 1095 | The game of life is a game of boomerangs. Our thoughts, deeds and words 1096 | return to us sooner or later with astounding accuracy. 1097 | % 1098 | If at first you don't succeed, you are running about average. 1099 | % 1100 | "A child is a person who can't understand why someone would give away a 1101 | perfectly good kitten." 1102 | -- Doug Larson 1103 | % 1104 | "The trouble with doing something right the first time is that nobody 1105 | appreciates how difficult it was." 1106 | -- Walt West 1107 | % 1108 | "Silent gratitude isn't very much use to anyone." 1109 | -- G. B. Stearn 1110 | % 1111 | "In matters of principle, stand like a rock; in matters of taste, swim with 1112 | the current." 1113 | -- Thomas Jefferson 1114 | % 1115 | The first sign of maturity is the discovery that the volume knob also turns to 1116 | the left. 1117 | % 1118 | "But this one goes to eleven." 1119 | -- Nigel Tufnel 1120 | % 1121 | "Been through Hell? Whaddya bring back for me?" 1122 | -- A. Brilliant 1123 | % 1124 | "I've got some amyls. We could either party later or, like, start his heart." 1125 | -- "Cheech and Chong's Next Movie" 1126 | % 1127 | "And, of course, you have the commercials where savvy businesspeople Get Ahead 1128 | by using their MacIntosh computers to create the ultimate American business 1129 | product: a really sharp-looking report." 1130 | -- Dave Barry 1131 | % 1132 | SHOP OR DIE, people of Earth! 1133 | [offer void where prohibited] 1134 | -- Capitalists from outer space, from Justice League Int'l comics 1135 | % 1136 | "Roman Polanski makes his own blood. He's smart -- that's why his movies work." 1137 | -- A brilliant director at "Frank's Place" 1138 | % 1139 | "The following is not for the weak of heart or Fundamentalists." 1140 | -- Dave Barry 1141 | % 1142 | "I take Him shopping with me. I say, 'OK, Jesus, help me find a bargain'" 1143 | --Tammy Faye Bakker 1144 | % 1145 | Gary Hart: living proof that you *can* screw your brains out. 1146 | % 1147 | Blessed be those who initiate lively discussions with the hopelessly mute, 1148 | for they shall be know as Dentists. 1149 | % 1150 | "I don't believe in sweeping social change being manifested by one person, 1151 | unless he has an atomic weapon." 1152 | -- Howard Chaykin 1153 | % 1154 | "I mean, like, I just read your article in the Yale law recipe, on search and 1155 | seizure. Man, that was really Out There." 1156 | "I was so WRECKED when I wrote that..." 1157 | -- John Lovitz, as ex-Supreme Court nominee Alan Ginsburg, on SNL 1158 | % 1159 | "Hi, I'm Professor Alan Ginsburg... But you can call me... Captain Toke." 1160 | -- John Lovitz, as ex-Supreme Court nominee Alan Ginsburg, on SNL 1161 | % 1162 | It's great to be smart 'cause then you know stuff. 1163 | % 1164 | "Time is money and money can't buy you love and I love your outfit" 1165 | -- T.H.U.N.D.E.R. #1 1166 | % 1167 | "Can't you just gesture hypnotically and make him disappear?" 1168 | "It does not work that way. RUN!" 1169 | -- Hadji on metaphysics and Mandrake in "Jonny Quest" 1170 | % 1171 | "You shouldn't make my toaster angry." 1172 | -- Household security explained in "Jonny Quest" 1173 | % 1174 | "Someone's been mean to you! Tell me who it is, so I can punch him tastefully." 1175 | -- Ralph Bakshi's Mighty Mouse 1176 | % 1177 | Victory or defeat! 1178 | % 1179 | "Everyone is entitled to an *informed* opinion." 1180 | -- Harlan Ellison 1181 | % 1182 | "It's curtains for you, Mighty Mouse! This gun is so futuristic that even 1183 | *I* don't know how it works!" 1184 | -- from Ralph Bakshi's Mighty Mouse 1185 | % 1186 | "May the forces of evil become confused on the way to your house." 1187 | -- George Carlin 1188 | % 1189 | A university faculty is 500 egotists with a common parking problem. 1190 | % 1191 | "If it's not loud, it doesn't work!" 1192 | -- Blank Reg, from "Max Headroom" 1193 | % 1194 | "Remember kids, if there's a loaded gun in the room, be sure that you're the 1195 | one holding it" 1196 | -- Captain Combat 1197 | % 1198 | Delta: We never make the same mistake three times. -- David Letterman 1199 | % 1200 | Delta: A real man lands where he wants to. -- David Letterman 1201 | % 1202 | Delta: The kids will love our inflatable slides. -- David Letterman 1203 | % 1204 | Delta: We're Amtrak with wings. -- David Letterman 1205 | % 1206 | "Where humor is concerned there are no standards -- no one can say what is 1207 | good or bad, although you can be sure that everyone will. 1208 | -- John Kenneth Galbraith 1209 | % 1210 | "Hello again, Peabody here..." 1211 | -- Mister Peabody 1212 | % 1213 | "It's the best thing since professional golfers on 'ludes." 1214 | -- Rick Obidiah 1215 | % 1216 | "Well, social relevance is a schtick, like mysteries, social relevance, 1217 | science fiction..." 1218 | -- Art Spiegelman 1219 | % 1220 | "And remember: Evil will always prevail, because Good is dumb." 1221 | -- Spaceballs 1222 | % 1223 | Pohl's law: 1224 | Nothing is so good that somebody, somewhere, will not hate it. 1225 | % 1226 | Pig: An animal (Porcus omnivorous) closely allied to the human race by the 1227 | splendor and vivacity of its appetite, which, however, is inferior in scope, 1228 | for it balks at pig. 1229 | -- Ambrose Bierce 1230 | % 1231 | "We don't have to protect the environment -- the Second Coming is at hand." 1232 | -- James Watt 1233 | % 1234 | "I believe that Ronald Reagan will someday make this 1235 | country what it once was... an arctic wilderness." 1236 | -- Steve Martin 1237 | % 1238 | "To YOU I'm an atheist; to God, I'm the Loyal Opposition." 1239 | -- Woody Allen 1240 | % 1241 | Noncombatant: A dead Quaker. 1242 | -- Ambrose Bierce 1243 | % 1244 | "There's only one way to have a happy marriage and as soon as I learn what it 1245 | is I'll get married again." 1246 | -- Clint Eastwood 1247 | % 1248 | A lot of people I know believe in positive thinking, and so do I. 1249 | I believe everything positively stinks. 1250 | -- Lew Col 1251 | % 1252 | Q: How many IBM CPU's does it take to execute a job? 1253 | A: Four; three to hold it down, and one to rip its head off. 1254 | % 1255 | Diplomacy is the art of saying "nice doggy" until you can find a rock. 1256 | % 1257 | Harrisberger's Fourth Law of the Lab: 1258 | Experience is directly proportional to the 1259 | amount of equipment ruined. 1260 | % 1261 | Captain Penny's Law: 1262 | You can fool all of the people some of the 1263 | time, and some of the people all of the 1264 | time, but you can't fool mom. 1265 | % 1266 | "Because he's a character who's looking for his own identity, [He-Man is] 1267 | an interesting role for an actor." 1268 | -- Dolph Lundgren, "actor" 1269 | % 1270 | "If Jesus came back today, and saw what was going on in his name, he'd never 1271 | stop throwing up." 1272 | -- Max Von Sydow's character in "Hannah and Her Sisters" 1273 | % 1274 | "Nietzsche says that we will live the same life, over and over again. 1275 | God -- I'll have to sit through the Ice Capades again." 1276 | -- Woody Allen's character in "Hannah and Her Sisters" 1277 | % 1278 | "Only the hypocrite is really rotten to the core." 1279 | -- Hannah Arendt. 1280 | % 1281 | Quod licet Iovi non licet bovi. 1282 | (What Jove may do, is not permitted to a cow.) 1283 | % 1284 | "I distrust a man who says 'when.' If he's got to be careful not to drink too 1285 | much, it's because he's not to be trusted when he does." 1286 | -- Sidney Greenstreet, _The Maltese Falcon_ 1287 | % 1288 | All extremists should be taken out and shot. 1289 | % 1290 | "The sixties were good to you, weren't they?" 1291 | -- George Carlin 1292 | % 1293 | "You stay here, Audrey -- this is between me and the vegetable!" 1294 | -- Seymour, from _Little Shop Of Horrors_ 1295 | % 1296 | From Sharp minds come... pointed heads. 1297 | -- Bryan Sparrowhawk 1298 | % 1299 | There are two kinds of egotists: 1) Those who admit it 2) The rest of us 1300 | % 1301 | "The picture's pretty bleak, gentlemen... The world's climates are changing, 1302 | the mammals are taking over, and we all have a brain about the size of a 1303 | walnut." 1304 | -- some dinosaurs from The Far Side, by Gary Larson 1305 | % 1306 | "We Americans, we're a simple people... but piss us off, and we'll bomb 1307 | your cities." 1308 | -- Robin Williams, _Good Morning Vietnam_ 1309 | --------------------------------------------------------------------------------