Skip to content

Instantly share code, notes, and snippets.

View lagagain's full-sized avatar

lagagain lagagain

View GitHub Profile
var A = function() {}
A.prototype.value = 'a'
var B = function() {}
B.prototype = new A()
B.prototype.value = 'b'
new B().value // return 'b'
@lagagain
lagagain / send-regrion-to-term.el
Created November 19, 2018 16:33
[practice] emacs elisp send-regrion-to-term
(defun send-region-to-term nil
(interactive)
(send-string "*terminal*" (buffer-substring-no-properties (region-beginning) (region-end)))
(send-string "*terminal*" "\n"))
(local-set-key (kbd "C-c C-r")
'send-region-to-term)
@majkrzak
majkrzak / snake.asm
Created August 1, 2014 16:38
Snake like game writen in x86 real mode assembly.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; ;;;;;; ;;;;;; ;;
;; ;; ;; ;; ;;
;; ;; ;; ;;;;;; ;;; ;; ;; ;; ;; ;;; ;; ;; ;;;;;; ;;
;; ;;;;;; ;; ;; ;; ;; ;;;;;;; ;;; ;; ;; ;; ;; ;; ;; ;;
;; ;; ;; ;;;;; ;; ;; ;; ;; ;; ; ;; ;; ;; ;;;; ;;;;;; ;;
;; ;; ;; ;; ;;;;;;; ;; ;; ;; ;;; ;;;;;;; ;; ;; ;; ;;
;; ;; ;; ;;;;;; ;; ;; ;;;;;; ;;;;;; ;; ;; ;; ;; ;; ;; ;;;;;; ;;
;; ;;
@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active April 29, 2024 09:09
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@edokeh
edokeh / index.js
Last active May 3, 2024 08:18
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \