by chrchr on 9/7/23, 3:52 PM with 79 comments
by jaykru on 9/7/23, 4:56 PM
lmfao, anywhere I can read more about McCarthy's plans for this?
by dkbrk on 9/7/23, 9:09 PM
by agnosticmantis on 9/7/23, 6:56 PM
Nowadays (god-)fathers of AI are Geoff Hinton and Yann LeCun and others, but 20 years ago things were very different…
by Bostonian on 9/7/23, 5:35 PM
;;; multiplying a matrix by a column vector (defun mvmult (matrix vector) (list (scap (nth 0 matrix) vector) (scap (nth 1 matrix) vector)))
;;; sum of two vectors (defun vplus (vec1 vec2) (list (+ (nth 0 vec1) (nth 0 vec2)) (+ (nth 1 vec1) (nth 1 vec2))))
;;; difference of two vectors (defun vminus (vec1 vec2) (list (- (nth 0 vec1) (nth 0 vec2)) (- (nth 1 vec1) (nth 1 vec2))))
;;; scalar product of two vectors (defun scap (vec1 vec2) (+ (* (nth 0 vec1) (nth 0 vec2)) (* (nth 1 vec1) (nth 1 vec2))))
;;; product of scalar and vector (defun svmult (sca vec) (list (* sca (nth 0 vec)) (* sca (nth 1 vec))))
;;; sum of a list of vectors (defun addup (veclist) (if (null veclist) zerovec (vplus (car veclist) (addup (cdr veclist)))))
(defconst zerovec '(0 0) "zero vector with two components"1)
;;; length of a vector (defun length (x) (sqrt (+ (expt (nth 0 x) 2) (expt (nth 1 x) 2))))
(defconst Imatrix '((1.0 0.0) (0.0 1.0)) "unit 2x2 matrix")
(defun smmult (sca matrix) (list (svmult sca (nth 0 matrix)) (svmult sca (nth 1 matrix))))
(defun mplus (mat1 mat2) (list (vplus (nth 0 mat1) (nth 0 mat2)) (vplus (nth 1 mat1) (nth 1 mat2))))
(defun mminus (mat1 mat2) (list (vminus (nth 0 mat1) (nth 0 mat2)) (vminus (nth 1 mat1) (nth 1 mat2))))
(defun mmult (mat1 mat2) (list (list (scap (nth 0 mat1) (col 0 mat1)) (scap (nth 0 mat1) (col 1 mat1))) (list (scap (nth 1 mat1) (col 0 mat1)) (scap (nth 1 mat1) (col 1 mat1)))))
(defun multiplyup (matlist) (if (null matlist) Imatrix (mmult (car matlist) (multiplyup (car matlist) (multiplyup (cdr (matlist)))))))
by mckn1ght on 9/7/23, 7:50 PM
Also saw someone else just added it to one of theirs: https://github.com/bbarclay7/bb-emacs/blob/5858823bb033be113...
by nxobject on 9/7/23, 7:57 PM
by bitwize on 9/7/23, 6:41 PM
by shric on 9/8/23, 1:11 PM
> (setq avogadro 6.0221367e23) ; Avogadro number
This is now standardized to exactly 6.02214076e23
by thsksbd on 9/7/23, 8:23 PM
(setq foot (* 0.3048 m))
And not
(setq foot (* 12 inch))
It comes to the same thing, but inch is defined in metric as 2.54 cm and the foot is a derived unit of the inch. But this way it clearly spells out the dependency.
Im not criticizing, it was his library for his use, I'm just wondering if there is there a deeper meaning beyond "God enough"?
by Exuma on 9/8/23, 3:09 AM
Ive seen this in dennis richie code, doom code, etc
Am i the only person who sees these things stand out like a sore thumb? It would drive me mad. They either all have to be not aligned, or aligned, but not 90%
by aj7 on 9/7/23, 7:09 PM
by kagevf on 9/8/23, 7:07 AM
I did an experiment to double check it's still true in a recent-ish emacs:
(defun my-fun ()
(setq test-123-456 'this-is-a-test))
(my-fun)
test-123-456 => this-is-a-test
There is some information in the info file under elisp about lexical binding, but you can just use let to keep variables in a lexical scope. (defun my-other-fun ()
(let ((test-789 'this-is-another-test))
test-789))
(my-other-fun)
test-789 => *** Eval error *** Symbol’s value as variable is void: test-789
by CyberDildonics on 9/8/23, 3:51 AM
by Exuma on 9/8/23, 3:18 AM
jigger := 1.5 floz