This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Source Centric Editing (No Dispersed UI-Only State) | |
We found that encoding large amounts of app structure and state in the IDE | |
itself was both highly convenient and also a strong anti-pattern for | |
understanding, maintanance, and evolution of the app code. It is trivial for | |
the IDE interface to cause deviations from standard coding practices (for | |
example, initializer data held only in an IDE instead of the source code), | |
for the IDE to produce garbage in its representation when the underlying code | |
changes, and for the IDE to be poor at telling you when this has happened. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct person person; | |
struct person | |
{ | |
/* The data fields */ | |
char *first_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VIRALITY-EXAMPLES> (disassemble #'foo) | |
; disassembly for FOO | |
; Size: 54 bytes. Origin: #x53DDD5EC ; FOO | |
; 5EC: 498B4510 MOV RAX, [R13+16] ; thread.binding-stack-pointer | |
; 5F0: 488945F8 MOV [RBP-8], RAX | |
; 5F4: 488BC6 MOV RAX, RSI | |
; 5F7: 4801F8 ADD RAX, RDI | |
; 5FA: 7220 JB L2 | |
; 5FC: 488BD0 MOV RDX, RAX | |
; 5FF: 48C1C202 ROL RDX, 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
int main(void) | |
{ | |
int16_t x = 0xc783; | |
int16_t bitsA = 0, bitsB = 0; | |
int16_t k = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
int main(void) | |
{ | |
int16_t x = 0xc783; | |
int16_t bitsA = 0, bitsB = 0; | |
int16_t k = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
int main(void) | |
{ | |
short x = 0xc783; | |
short bitsA = 0, bitsB = 0; | |
short k = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; skel example | |
;; Ordering semantics. | |
;; Engine config must come before anything else. | |
;; v:define-texture have no ordering dependencies between themselves. | |
;; v:define-texture must come before define-material | |
;; v:define-materials have no ordering dependencies between themselves. | |
;; v:define-prefab / v:define-model DOES have an ordering between themselves! | |
(asdf:defsystem #:skel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun %generalized-iterate (gen-idx gen-size) | |
;; side effect into the vector gen-idx an increment of that index vector. | |
;; Then return | |
;; gen-idx if it is valid and we should cont. | |
;; or | |
;; NIL if we can't continue iterating over the generalized | |
;; index because we covered all of the indicies. | |
(let ((idx-size (length gen-idx))) | |
(loop | |
;; a propagation carry loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmethod fire ((ship ship) spawn-class context (muzzle muzzle) | |
(turret n-shot-turret)) | |
(let ((shot-name (shot-instance-name muzzle))) | |
(flet ((spawn-the-shot (loc/ent) | |
(let* ((spread-angle (spread-angle n-shot-turret)) | |
(num-sectors (num-sectors n-shot-turret)) | |
;; Clean up the inputs to be always valid. | |
(spread-angle (mod (abs spread-angle) (* pi 2d0))) |