Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
dafyddcrosby committed Dec 28, 2023
1 parent 50109f9 commit 5afee79
Show file tree
Hide file tree
Showing 17 changed files with 1,416 additions and 1,016 deletions.
104 changes: 76 additions & 28 deletions books.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,119 @@ I know there's more good books out there, this is just a list of stuff I've read

## Code / Systems

- Code Complete - Steve McConnell
- Systems Performance - Brendan Gregg
- DTrace - Brendan Gregg and Jim Mauro
- The Art of Unix Programming - Eric S. Raymond
- Programming Pearls - Jon Bentley
- Modern Operating Systems - Andrew S. Tanenbaum

### General


#### Code Complete - Steve McConnell


#### Systems Performance - Brendan Gregg


#### DTrace - Brendan Gregg and Jim Mauro


#### The Art of Unix Programming - Eric S. Raymond


#### Programming Pearls - Jon Bentley


#### Modern Operating Systems - Andrew S. Tanenbaum


### Bash

- Bash Cookbook - Carl Albing

#### Bash Cookbook - Carl Albing


### C

- The C Programming Cookbook - Brian Kernighan and Dennis Ritchie

#### The C Programming Cookbook - Brian Kernighan and Dennis Ritchie


### Python

- High Performance Python - Micha Gorelick & Ian Ozsvald

#### High Performance Python - Micha Gorelick & Ian Ozsvald


## Computer Science / Algorithms

- The Pattern on the Stone: The Simple Ideas That Make Computers Work - William Daniel Hillis
- The Algorithm Design Manual - Steven Skiena

### The Pattern on the Stone: The Simple Ideas That Make Computers Work - William Daniel Hillis


### The Algorithm Design Manual - Steven Skiena


## Design

- The Design of Everyday Things - Donald A. Norman
- Don't Make Me Think - Steve Krug
- Presentation Zen: Simple Ideas on Presentation Design - Garr Reynolds

### The Design of Everyday Things - Donald A. Norman


### Don't Make Me Think - Steve Krug


### Presentation Zen: Simple Ideas on Presentation Design - Garr Reynolds


## Business

- The Phoenix Project - Gene Kim
- The E-Myth Revisited - Michael E. Gerber

### The Phoenix Project - Gene Kim


### The E-Myth Revisited - Michael E. Gerber


## Computer History

- Turing's Cathedral: The Origins of the Digital Universe - George Dyson
- Hackers - Steven Levy
- The Cuckoo's Egg - Clifford Stoll
- Man and the Computer - John G. Kemeny

### Turing's Cathedral: The Origins of the Digital Universe - George Dyson


### Hackers - Steven Levy


### The Cuckoo's Egg - Clifford Stoll


### Man and the Computer - John G. Kemeny


## System Administration

- The Practice of System and Network Administration - Thomas Limoncelli

### The Practice of System and Network Administration - Thomas Limoncelli


## Life in IT

- Peopleware - Tom DeMarco and Timothy Lister
- Mythical Man-Month - Fred Brooks
- Being Geek - Michael Lopp

### Peopleware - Tom DeMarco and Timothy Lister


### Mythical Man-Month - Fred Brooks


### Being Geek - Michael Lopp


## Productivity

- The Productive Programmer - Neal Ford
- Time Management for System Administrators - Thomas Limoncelli
- Hell Yeah or No - Derek Sivers
- Deep Work - Rules for Focused Success In A Distracted World

### The Productive Programmer - Neal Ford


### Time Management for System Administrators - Thomas Limoncelli


### Hell Yeah or No - Derek Sivers


### Deep Work - Rules for Focused Success In A Distracted World
59 changes: 43 additions & 16 deletions coding.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ C = A + (B-A) * k

## matching syntax

| pattern | desc |
|---------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :[hole] | match zero or more characters (including whitespace, and across newlines) in a lazy fashion. When :[hole] is inside delimiters, as in {:[h1], :[h2]} or (:[h]), matching stops inside them. Holes can be used outside of delimiters as well. |
| :[\\[hole] | match one or more alphanumeric characters and \_ |
| :[hole.] | (with a period at the end) matches one or more alphanumeric characters and punctuation (like ., ;, and -) |
| :[hole\n] | (with a \n at the end) matches one or more characters up to a newline, including the newline. |

:[ ] (with a space) matches only whitespace characters, excluding newlines. To assign the matched whitespace to variable, put the variable name after the space, like :[ hole]. :[?hole] | (with a ? before the variable name) optionally matches syntax. Optional holes work like ordinary holes, except that if they fail to match syntax, the variable is assigned the empty string ““. Optional hole support is currently an experimental feature.
| pattern | desc |
|---------- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| :[hole] | match zero or more characters (including whitespace, and across newlines) in a lazy fashion. When :[hole] is inside delimiters, as in {:[h1], :[h2]} or (:[h]), matching stops inside them. Holes can be used outside of delimiters as well. |
| :[\\[hole] | match one or more alphanumeric characters and \_ |
| :[hole.] | (with a period at the end) matches one or more alphanumeric characters and punctuation (like ., ;, and -) |
| :[hole\n] | (with a \n at the end) matches one or more characters up to a newline, including the newline. |
| :[ ] | (with a space) matches only whitespace characters, excluding newlines. To assign the matched whitespace to variable, put the variable name after the space, like :[ hole]. |
| :[?hole] | (with a ? before the variable name) optionally matches syntax. Optional holes work like ordinary holes, except that if they fail to match syntax, the variable is assigned the empty string ““. Optional hole support is currently an experimental feature. |


## templates
Expand Down Expand Up @@ -168,13 +168,40 @@ digraph U {

# Refactorings

- Extract method -> move block of code into a separate function
- Move method -> move function to class that uses it most, removing or delegating it in the old class
- Replace temp with query -> Replace a temporary variable with a query
- Form template method -> Get the steps of two similar subclasses into methods with the same signature (to reduce duplication)
- Replace type with state/strategy -> Replace type code with a state object
- Replace conditional with polymorphism -> Move each leg of the conditional to an overriding method in a subclass. Make the original method abstract.
- Self encapsulate field -> Using get and set methods to access variables

## Extract method

move block of code into a separate function


## Move method

move function to class that uses it most, removing or delegating it in the old class


## Replace temp with query

Replace a temporary variable with a query


## Form template method

Get the steps of two similar subclasses into methods with the same signature (to reduce duplication)


## Replace type with state/strategy

Replace type code with a state object


## Replace conditional with polymorphism

Move each leg of the conditional to an overriding method in a subclass. Make the original method abstract.


## Self encapsulate field

Using get and set methods to access variables


# 12 Factor App
Expand Down Expand Up @@ -217,4 +244,4 @@ digraph U {
- Treat logs as event streams

- Admin processes
- Run admin/management tasks as one-off processes
- Run admin/management tasks as one-off processes
45 changes: 26 additions & 19 deletions compilers.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
[Github](https://github.com/llvm/llvm-project)


## Intermediate Representation


## List available targets

```shell
Expand Down Expand Up @@ -161,25 +158,35 @@ Add `/hotpatch` to the compiler flags.
<https://godbolt.org/>


# Papers/books

# Linkers

## A Nanopass Framework for Compiler Education

Dipanwita Sarkar, Oscar Waddell, R. Kent Dybvig
## The GNU linker

<https://legacy.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf>
- `/etc/ld.so.conf` configures directories to search
- `/etc/ld.so.cache` is the binary cache used by ld.so

Each pass of a micropass compiler performs a single specific task:

- simplify (eg relaxing the AST)
- verify (eg check compiler invariants that are hard to express in grammar)
- convert (eg makes abstractions explicit into lower-level target language)
- analyze (eg collect program information and annotate the output program)
- improve (eg decrease run time/resource utilization)
```shell
# Reload ld cache
ldconfig
# See which libraries are utilized
ldconfig -v

# See what an executable links to
ldd ./executablefile

# Specify an alternate library path
export LD_LIBRARY_PATH=/path/to/dir ...

# Link object file into an executable file
ld -o example example.o
# Strip all binary symbol information
ld -s ...
# Strip debug binary symbol information
ld -S ...
# Mark stack as non executable
ld -z noexecstack
```

A nanopass compiler differs from a micropass compiler in three ways:

1. the intermediate-language grammars are formally specified and enforced
2. each pass needs to contain traversal code only for forms that undergo meaningful transformation
3. the intermediate code is represented more efficiently as records, although all interaction with the programmer is still via the s-expression syntax
## LLD
5 changes: 2 additions & 3 deletions console_fun.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## Mail

- [Mutt](email.md)
- [Alpine](http://www.washington.edu/alpine/)
- [Alpine](https://alpineapp.email/)
- Elm


Expand Down Expand Up @@ -67,7 +67,6 @@
- links
- w3m
- elinks
- [http](http.md)


## spreadsheet
Expand Down Expand Up @@ -117,4 +116,4 @@

- Vim
- Emacs
- nano
- nano
11 changes: 4 additions & 7 deletions email.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# EMail


## See also


## Videos

- [Email Hatest the Living (Ricardo Signes, rjbs)](https://www.youtube.com/watch?v=4s9IjkMAmns)
Expand Down Expand Up @@ -96,21 +93,21 @@ tls_fingerprint <fingerprint>
# Postfix


# Retry delivery
## Retry delivery

```
postqueue -f
```


# Drop queue
## Drop queue

```
postsuper -d ALL
```


# Print non-default configuration values
## Print non-default configuration values

```
postconf -n
Expand Down Expand Up @@ -138,4 +135,4 @@ Mailing list
| go to inbox | gi |
| go to all mail | ga |
| go to previous | gp |
| go to next | gn |
| go to next | gn |
Loading

0 comments on commit 5afee79

Please sign in to comment.