Code of Conduct

LLVM adopted a code of conduct. Previously here and here.
When will the craze end? I predict three years.

Advertisements

The Psychopath Code

The Psychopath Code is a short fun read. Hintjens’ model of the world doesn’t match with mine. I sum it up with “not everybody is your friend” plus the good faith assumption once lost can’t be regained.

Only mothers love unconditionally. Understanding circumstances and motives whether it’s sex, work, power, or money makes life easier. It’s a hard thing to know thy self.

Dan Lyons’ Disrupted: My Misadventure in the Start-Up Bubble is a hilarious and insightful look into the world of fake.

Old Project – TexGame

I uploaded a project, TexGame, from when I was 17 & 18 years old to github, it’s at https://github.com/bjwbell/texgame.

The code is in Python and uses PyGame for the graphics and sound.

The purpose of the game is to get as high a score as possible. To achieve this lines are eaten away. There is an eater block that goes across the screen. The rate at which it eats blocks depends on how many spaces it encounters. The more open spaces it eats the slower it moves, which is bad.

Menu Screen:

Playing:

Old Project – World Racer

I uploaded a project, World Racer, from my teenager years to github. I apologize for the terrible spelling in the code, back then I had no idea how to spell almost anything.

I’ve looked at the code and it’s not bad. I’m surprised by how good of a C++ & 3d graphics programmer I was for the very first project I ever did.

The code is on github at https://github.com/bjwbell/WorldRacer.

Screenshot:
World-Racer Screenshot

Emacs Rust Debugging

Rust-GDB

Use rust-gdb to launch gdb with the Rust-specific pretty-printers enabled, PR#19954 – add rust-gdb for Rust pretty printers.

GDB Rust Breakpoints

In gdb use break FILENAME:LINE_NUM instead of rbreak FUNCTION_NAME.
Rust has lifetime parameters, which can cause the gdb error umatched quote.

Example
Code: struct Foo<‘a> {num: i32} impl<‘a> Foo<‘a> { fn add_one(self) {} }
GDB:
    (gdb) rbreak add_one
     unmatched quote
    (gdb)

Emacs GUD

  1. To Launch: M-x gdb
  2. Instead of gdb enter rust-gdb, add -args to pass arguments to the proccess being debugged.
  3. Example: rust-gdb --i=mi --args PATH_TO_EXECUTABLE EXECUTABLE_ARGS

Emacs GUD – Keybindings

I never remember the Emacs GUD keybindings, instead my .emacs includes:

(global-set-key [f5] 'gud-cont)
(global-set-key [f7] 'gud-tbreak)
(global-set-key [S-f11] 'gud-finish)
(global-set-key [f9] 'gud-break)
(global-set-key [f10] 'gud-next)
(global-set-key [f11] 'gud-step)