Skip to content

Instantly share code, notes, and snippets.

⁉️
Authenticating

Stephen De Gabrielle spdegabrielle

⁉️
Authenticating
Block or report user

Report or block spdegabrielle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@spdegabrielle
spdegabrielle / racket-logo-plot.rkt
Created Sep 3, 2019 — forked from Metaxal/racket-logo-plot.rkt
Lambda logo with Racket's plot
View racket-logo-plot.rkt
#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 Sep 3, 2019 — forked from LiberalArtist/default-lightbulb.png
A Racket lightbulb for the Standard Fish Summer Competition 2019
View standard-lightbulb.rkt
#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 Aug 20, 2019 — forked from alex-hhh/world-map.rkt
World Map, standard-fish competition 2019
View world-map.rkt
#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
Created Aug 7, 2019 — forked from nilp0inter/fizzbuzz.rkt
The first beautiful implementation of FizzBuzz?
View fizzbuzz.rkt
#lang 2d racket
(require 2d/match)
(define (fizz? n)
(= 0 (modulo n 5)))
(define (buzz? n)
(= 0 (modulo n 3)))
@spdegabrielle
spdegabrielle / standard-cat.rkt
Created Jul 20, 2019 — forked from deeglaze/standard-cat.rkt
working out the definition of Racket's to-be standard-cat
View standard-cat.rkt
#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))]
View Smalltalk Grammar
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"
View task-7.rkt
#! /usr/bin/env gracket
#lang at-exp racket/gui
;; a simple spreadsheet (will not check for circularities)
;; ---------------------------------------------------------------------------------------------------
(define LETTERS "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#; {Index : N in [0,99]}
#; {Reference is a Letter followed by an Index}
#; {Expression = Reference || Integer || (+ Expression Expression)}
View spreadsheet.mli
module type CELL = sig
type 'a cell
type 'a exp
val return : 'a -> 'a exp
val (>>=) : 'a exp -> ('a -> 'b exp) -> 'b exp
val cell : 'a exp -> 'a cell exp
val get : 'a cell -> 'a exp
View FavouritesPlugin.pm
###########################################################################
#
# FavouritesPlug.pm -- Plugin for Internet Explorer Favourites files
# By Stephen De Gabrielle
#
# A component of the Greenstone digital library software
# from the New Zealand Digital Library Project at the
# University of Waikato, New Zealand.
#
# Copyright (C) 2005 New Zealand Digital Library Project
View Metaxal-bazaar-math.rkt
#lang racket/base
;;; Copyright (C) Laurent Orseau, 2010-2013
;;; GNU Lesser General Public Licence (http://www.gnu.org/licenses/lgpl.html)
(require racket/list
racket/math)
(provide (all-defined-out))
;; DEPRECATED: Use the `sgn` function in racket/math or math/flonum
You can’t perform that action at this time.