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 syndicate | |
(require racket/set | |
racket/list) | |
(require/activate syndicate/drivers/timestate) | |
#| | |
Goal: researchers organize themselves into conversations based on mutual interests |
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 turnstile | |
(define-base-type Int) | |
(define-type-constructor → #:arity >= 1 | |
#:arg-variances (λ (stx) | |
(syntax-parse stx | |
[(_ τ_in ... τ_out) | |
(append | |
(stx-map (λ _ contravariant) #'[τ_in ...]) | |
(list covariant))]))) |
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 (for-syntax racket/syntax) | |
(for-syntax racket/base) | |
(for-syntax racket/match)) | |
(begin-for-syntax | |
(define (aux pat-stx trie-exp outer-stx) | |
(match-define (list temp1 temp2) (generate-temporaries #'(tmp1 tmp2))) | |
(datum->syntax |
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
module Kata where | |
import Data.Char (isLower, toUpper) | |
kata :: String -> String | |
kata = unwords . reverse . fst . foldl helper ([], False) . words | |
where | |
helper (xs, True) word = (word : xs, True) | |
helper (xs, False) word@(w:ws) | |
| isLower w = ((toUpper w : ws) : xs, True) |
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
enum test_enum { | |
one = 1, | |
two = 2 | |
}; | |
struct test_struct { | |
enum test_enum e; | |
u32 foo; | |
u8 baz[4]; |
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
Excerpt from Le Ton beau de Marot by Douglas Hofstadter: | |
Cloaked in "You Guys", Old "Man" Resurfaces in New Guise | |
In my view, the most pervasive -- and, for that reason, by far the most | |
serious -- disease of sexist usage infecting contemporary American English is | |
the to-many-people-innocuous-sounding phrase "you guys" (and related ways of | |
using "guys" in directly addressing a group of people), which is by far more | |
popular than the now-taboo sexist terms "man/men" ever were, in terms of | |
applicability to a mixed-sex or even all-female group. I find it an amazing |
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
import Data.List (intercalate) | |
n `divides` x = x `mod` n == 0 | |
crackle x | |
| 3 `divides` x = "Crackle" | |
| otherwise = "" | |
pop x | |
| 5 `divides` x = "Pop" |