(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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.
Listing pods with kubectl get pods
, then select a pod name and copy paste it into kubectl logs [pod name]
#define WIN32_LEAN_AND_MEAN // just say no to MFC | |
#define INIT_GUID | |
#include "hge.h" | |
#include <hgesprite.h> | |
#include <hgefont.h> | |
#include <hgecolor.h> |
;; This sets the Emacs "PATH" environment variable and the `exec-path` | |
;; variable to the same value your login shell sees. The reason this | |
;; is necessary is because of this: | |
;; | |
;; http://developer.apple.com/library/mac/#qa/qa1067/_index.html | |
;; | |
;; Basically apps launched from Finder inherit their environment from | |
;; a .plist file rather than the shell environment. | |
(defun set-exec-path-from-shell-PATH () |
We want to port Remacs to use a regex crate implemented in Rust. The Rust implementations are highly optimised, and this would simplify the Remacs codebase.
The two major crates are Rust’s regex crate, and the fancy-regex crate.
(defvar *var-plist* (list)) | |
(defmacro platform-var (name &rest plist) | |
(let ((plist-keys (mapcar 'car (seq-partition plist 2))) | |
(platforms '(:gnu :gnu/linux :gnu/kfreebsd :darwin :ms-dos :windows-nt :cygwin))) | |
(mapcar (lambda (key) | |
(when (not (member key platforms)) | |
(error "Platform `%s' doesn't exist. Possible values: `%s'" key platforms))) | |
plist-keys) | |
(setq *var-plist* (plist-put *var-plist* name plist)) |
#!/bin/bash | |
if [ "$#" -ne 2 ]; then | |
echo "Usage: $0 <version> <revision>" | |
echo "for example for Java 1.8.0.92 it would be:" | |
echo "$0 8 92" | |
exit 1 | |
fi | |
VERSION="$1u$2" |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import time | |
from ecs import Component, Entity, EntityManager, System, SystemManager | |
class MovementSystem(System): | |
"""Movement system to update position of Movable components.""" |
#! /usr/bin/python | |
import curses | |
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN | |
import random | |
from random import randrange, randint | |
def printRobot(win, pos_x, pos_y, size): | |
''' Prints the Robot ''' | |
for i in range(size): |