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
Write a program that does what it’s supposed to do | |
Write idiomatic code | |
Debug a program that you wrote | |
Debug a program someone else wrote | |
Debug the interaction between a system you wrote and one you didn’t | |
File a good bug report | |
Modify a program you didn’t write | |
Test a program you wrote | |
Test a program you didn’t write | |
Learn a new programming language |
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
;;; -*- lexical-binding: t -*- | |
(require 'dash) | |
(defun var (c) (vector c)) | |
(defun var? (x) (vectorp x)) | |
(defun var=? (x1 x2) (= (elt x1 0) (elt x2 0))) | |
(defun assp (pred l) | |
(-first (lambda (i) (funcall pred (car i))) l)) |
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
#lang racket | |
;; | |
;; These are some examples of different ways to compute factorials | |
;; using various paradigms and features provided by Racket. There | |
;; are more options available in packages which are not imported | |
;; by default, but that rabbit hole goes very deep indeed. | |
;; | |
;; Comments and suggestions welcome! | |
;; leo@lwh.jp |
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
#!/bin/bash | |
set -e | |
SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) | |
# the location of a clean racket repo which will be copied to avoid "git clone"-ing | |
REPO=$SCRIPT_DIR/../tools/racket | |
PLATFORM=linux-x86_64 |
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
#lang racket | |
(require racket/draw (for-syntax syntax/parse) pict unstable/gui/pict) | |
(define-syntax defv (make-rename-transformer #'define-values)) | |
(define-syntax defm (make-rename-transformer #'match-define)) | |
(define-syntax def (make-rename-transformer #'define)) | |
(define-match-expander color: | |
(λ (stx) | |
(syntax-parse stx |
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
#lang racket | |
;; Experiment: interaction between compiled code and a tool. | |
;; | |
;; Typically, 3d syntax is often used here. But let's say we don't | |
;; want 3d syntax. Is there another way? | |
;; | |
;; Idea: when evaluating code, attach a module to the evaluating | |
;; namespace that the code and the tool share. | |
;; |
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
#lang racket | |
(define (f x) | |
(* x x)) | |
(provide f) | |
(module* foo racket/base | |
;; External test of the function | |
(require rackunit |
Demonstrates the use of Racket's custodians and namespaces to create enough isolation to "reboot" programs without restarting the whole of Racket, including possibly recompiling and reloading code.
To experiment with this:
$ racket ~/src/racket-experiments$ racket
Welcome to Racket v5.3.1.4.
-> (require "reloader.rkt")
-> (load-and-foo)
Starting worker...
test-mod: "foo"
Maybe you're comfortable with Git, but haven't made a pull request before.
Maybe you've made one-off pull requests, but haven't tried to contribute to the same project over time and stay in sync with the upstream project.
This guide may help. DRAFT
NewerOlder