summary refs log tree commit diff stats
path: root/INSTALL
blob: 8ba89921e59643f16564e9e9c806ffe1cd1ddac4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Installing
==========

Use the package manager of your operating system to install ranger.

To install ranger manually, use either:
sudo ./setup.py install --optimize=1 --record=install_log.txt

or for short:
sudo make install


Uninstalling
============

Again, use your package manager to uninstall ranger.  No other way for
automatically removing ranger is supported!

However, if you installed ranger with the command above, all installed files
have been recorded to "install_log.txt".  This information can be used to remove
ranger by hand, e.g.:

cat install_log.txt | sed s/\^/\\// | xargs -d "\n" sudo rm --
dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
;;; plus one function

(defvar *number-units-at-beginning* nil)

(defun next-digit (numerals digit)
  "Given a list of a numeral system and a digit, it returns the next digit."
  (cond
    ((eq (car (last numerals)) digit) (car numerals))
    ((not (eq (car numerals) digit)) (next-digit (cdr numerals) digit))
    (t (cadr numerals))))

(defun may-reverse (number)
  "If units is placed on the end, reverse; else keep it."
  (if *number-units-at-beginning*
	number
	(reverse number)))

(defun explode-to-symbol (number)
  "Given a number (which can have letters), it returns a list of the symbols of this number"
  (loop for letter across (write-to-string number) collect (intern (string letter))))

(defun implode-from-symbol (number)
  "Given a list of the symbols of a number (which can have letters), it returns the symbol of this number"
  (intern (apply #'concatenate 'string (mapcar #'symbol-name number))))

(defun explode-string (string)
  "Given a string of a number (which can have letters), it returns a list of strings of the number"
  (loop for letter across string collect (string letter)))

(defun implode-string (string)
  "Given a list of strings of a number (which can have letters), it returns the string of this number"
  (apply #'concatenate 'string string))

(defun next-list-number (numerals number-list)
  "Given a list of a numeral system and a list of a number, it returns a list of the next number."
  (cond
    ((null number-list)
     (cons (if (eq (car numerals) '|0|)
	       (cadr numerals)
	       (car numerals)) nil))
    ((eq (car number-list) (car (last numerals)))
     (cons (car numerals) (next-list-number numerals (cdr number-list))))
    (t (cons (next-digit numerals (car number-list)) (cdr number-list)))))

(defun previous-digit (numerals digit)
  "Given a list of a numeral system and a digit, it returns the previous digit."
  (next-digit (reverse numerals) digit))

(defun previous-list-number (numerals number-list)
  "Given a list of a numeral system and a list of a number, it returns a list of the previous number."
  (cond
    ((and
      (null (cdr number-list))
      (eq (car number-list)
	   (if (eq (car numerals) '|0|)
	       (cadr numerals)
	       (car numerals))))
     nil)
    ((and
      (eq (car number-list) (car numerals))
      (not (null (cdr number-list))))
     (cons (previous-digit numerals (car number-list)) (previous-list-number numerals (cdr number-list))))
    (t (cons (previous-digit numerals (car number-list)) (cdr number-list)))))

(defun plus-args-list (numerals a b)
  "Given a list of a numeral system and 2 lists of numbers, it returns the list of it's sum."
  (cond
    ((and
      (null (cdr b))
      (eq (car b) (if (eq (car numerals) '|0|)
				(cadr numerals)
				(car numerals))))
     (next-list-number numerals a))
    (t (plus-args-list numerals (next-list-number numerals a) (previous-list-number numerals b)))))

(defun plus (numerals a b)
  "Given a list of a numeral system and 2 numbers, it returns the list of it's sum."
  (may-reverse (plus-args-list numerals (may-reverse (explode-to-symbol a)) (may-reverse (explode-to-symbol b)))))

(defun plus-string (numerals a b)
  "Given a list of a numeral system and 2 strings, it returns the list of it's sum."
  (may-reverse (plus-args-list numerals (may-reverse (explode-string a)) (may-reverse (explode-string b)))))

(defun symbol-to-number (symbol)
  "Given a symbol, returns it's number."
  (nth-value 0 (parse-integer (symbol-name symbol))))

(defun plus-decimal (&rest args)
  "Given decimal numbers, it returns the symbol it's sum."
  (nth-value 0 (implode-from-symbol (reduce (lambda (a b) (plus '(|0| |1| |2| |3| |4| |5| |6| |7| |8| |9|) a b)) args))))

(defun plus-earth (&rest args)
  "Give earthal numbers, it returns it's sum."
  (symbol-to-number (nth-value 0 (implode-from-symbol (reduce (lambda (a b) (plus '(|1| |2| |3| |4| |5|) a b)) args)))))