Skip to content

Instantly share code, notes, and snippets.

View spdegabrielle's full-sized avatar
🏠
Working from home

Stephen De Gabrielle spdegabrielle

🏠
Working from home
View GitHub Profile
@spdegabrielle
spdegabrielle / current-value-fancy.rkt
Created July 23, 2022 19:17 — forked from alex-hhh/current-value-fancy.rkt
Interactive overlays with the Racket Plot Package
#lang racket
(require racket/gui mrlib/snip-canvas plot pict racket/draw)
(define (pie-slice w h angle)
(define nangle (let ((npi (floor (/ angle (* 2 pi)))))
(- angle (* 2 pi npi))))
(define (draw dc dx dy) (send dc draw-arc dx dy w h (- (/ nangle 2)) (/ nangle 2)))
(dc draw w h))
(define item-font (send the-font-list find-or-create-font 12 'default 'normal 'normal))
@spdegabrielle
spdegabrielle / paint.rkt
Created October 17, 2020 15:18 — forked from Metaxal/paint.rkt
A very simple painting program
#lang racket/gui
;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require pict)
(define line-width-init 1)
(define my-canvas%
@spdegabrielle
spdegabrielle / cer.md
Created September 26, 2020 19:49 — forked from amyjko/cer.md

Computing education research (CER), also known as computer science education (CSEd), is the study of how people learn and teach computing, broadly construed. This FAQ will teach you more about the field and how you might contribute to it.

What is computing education research?

First, CER is not teaching. Teaching is helping people acquire knowledge, skills, attitudes, beliefs, identities. Research is discovery and invention. Teachers teach computing, whereas computing education researchers make discoveries about this teaching and learning, and invent new ways for these teaching and learning to occur. CER is an example of discipline-based education research, like math education research or science education research, all of which are part of the broader field of education and learning sciences research.

CER is also not educational technology. Computing education researchers often create educational technologies to support the learning and teaching of computing, but CER is not explicitly concerned with the

#lang racket/base
(require racket/match racket/list racket/port racket/string
flomat)
;;;
;;; Homogeneous coordinates for 3 dimensions
;;;
; Follow the tutorial
; http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/
@spdegabrielle
spdegabrielle / racket-logo-plot.rkt
Created September 3, 2019 10:31 — forked from Metaxal/racket-logo-plot.rkt
Lambda logo with Racket's plot
#lang racket
(require plot)
(let ([blue '(0 0 164)] [red '(164 0 0)])
(parameterize ([plot-decorations? #f])
(plot3d
(list
(surface3d (λ(x y)(/ x 10)) 0 5 0 1 #:color red #:line-color red)
(surface3d (λ(x y)(- 1 (/ (+ 1 (exp (- 5 x)))))) 0 10 0 1 #:color blue #:line-color blue))
@spdegabrielle
spdegabrielle / standard-lightbulb.rkt
Created September 3, 2019 09:54 — forked from LiberalArtist/default-lightbulb.png
A Racket lightbulb for the Standard Fish Summer Competition 2019
#lang racket/base
;; License: Apache-2.0
(require racket/draw
pict
racket/class
racket/math
racket/list
racket/contract)
@spdegabrielle
spdegabrielle / world-map.rkt
Created August 20, 2019 03:01 — forked from alex-hhh/world-map.rkt
World Map, standard-fish competition 2019
#lang racket
(require json racket/draw math/base)
(define (lat-lon->map-point coordinates)
(match-define (list lon lat _ ...) coordinates)
(define-values (x y) (values (degrees->radians lon) (asinh (tan (degrees->radians lat)))))
(list (/ (+ 1 (/ x pi)) 2) (/ (- 1 (/ y pi)) 2)))
(define (draw-polygon dc polygons)
(define path
@spdegabrielle
spdegabrielle / fizzbuzz.rkt
Last active September 26, 2020 18:43 — forked from nilp0inter/fizzbuzz.rkt
The first beautiful implementation of FizzBuzz?
#lang 2d racket
(require 2d/match)
(define (fizz? n)
(zero? (modulo n 5)))
(define (buzz? n)
(zero? (modulo n 3)))
@spdegabrielle
spdegabrielle / standard-cat.rkt
Created July 20, 2019 14:11 — forked from deeglaze/standard-cat.rkt
working out the definition of Racket's to-be standard-cat
#lang racket
(require pict/color)
(provide
(contract-out
[cat-silhouette
(->i ([width positive?] [height positive?])
(#:left-ear-extent [left-ear-extent (>=/c 0)]
#:left-ear-arc [left-ear-arc (real-in 0 (* 2 pi))]
#:left-ear-angle [left-ear-angle (real-in 0 (* 2 pi))]
http://chronos-st.blogspot.com/2007/12/smalltalk-in-one-page.html
http://www.csci.csusb.edu/dick/samples/smalltalk.syntax.html
Formal EBNF Specification of Smalltalk Syntax
1. Character = ? Any Unicode character ?;
2. WhitespaceCharacter = ? Any space, newline or horizontal tab character ?;
3. DecimalDigit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9";
4. Letter = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | "J" | "K" | "L" | "M"
| "N" | "O" | "P" | "Q" | "R" | "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z"