summary refs log tree commit diff stats
path: root/README.org
blob: 470a2ee7e8e174369d52741273b1527cb3b1ef66 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#+title: Exercism
#+export_file_name: index
#+html_link_up: ./index.html
#+setupfile: ~/.emacs.d/org-templates/level-1.org

My solutions for [[https://exercism.io][Exercism]] exercises.

- Source: https://git.tilde.institute/andinus/exercism
- GitHub: https://github.com/andinus/exercism

- Note: The license only applies to my solutions.

* C [16/18]

- [X] Hello World
- [X] Armstrong Numbers
- [X] Resistor Color
- [X] Isogram
- [X] Gigasecond
- [X] Pangram
- [X] Hamming
- [X] Grains
- [X] Space Age
- [X] Nucleotide Count
- [X] RNA Transcription
- [X] Two Fer
- [ ] Square Root
- [X] Difference of Squares
- [ ] Sum of Multiples
- [X] Leap
- [X] Acronym
- [X] Binary Search

* Clojure [3/4]

- [X] Hello World
- [X] Two Fer
- [X] Raindrops
- [ ] Reverse String

* Emacs Lisp [3/4]

- [X] Hello World
- [X] Two Fer
- [X] Leap
- [ ] Anagram

* Go [4/7]

- [X] Hello World
- [X] Two Fer
- [ ] Space Age
- [X] Hamming
- [ ] Leap
- [X] Raindrops
- [ ] Nucleotide Count

* JavaScript [4/8]

- [X] Hello World
- [ ] Square Root
- [X] Two Fer
- [X] Resistor Color
- [X] Raindrops
- [ ] Hamming
- [ ] Luhn
- [ ] Triangle

* Python [3/3]

- [X] Hello World
- [X] Two Fer
- [X] Raindrops

* Raku [14/15]

- [X] Hello World
- [X] Two Fer
- [X] Leap
- [X] Bob
- [X] Nucleotide Count
- [X] Pangram
- [X] Clock
- [X] Hamming
- [X] Anagram
- [X] Word Count
- [X] Raindrops
- [X] Luhn
- [X] Phone Number
- [X] RNA Transcription
- [ ] Acronym
- [ ] Allergies

* Rust [4/5]

- [X] Hello World
- [X] Lucian's Luscious Lasagna
- [X] Armstrong Numbers
- [X] Assembly Line
- [ ] Semi Structured Logs
s="nv">contents:&:source:char <- start-reading resources, [a] 1:char/raw <- read contents 2:char/raw <- read contents 3:char/raw <- read contents 4:char/raw <- read contents _, 5:bool/raw <- read contents memory-should-contain [ 1 <- 120 # x 2 <- 121 # y 3 <- 122 # z 4 <- 10 # newline 5 <- 1 # eof ] ] scenario write-to-fake-file [ local-scope assume-resources [ ] sink:&:sink:char, writer:num/routine <- start-writing resources, [a] sink <- write sink, 120/x sink <- write sink, 121/y close sink wait-for-routine writer contents-read-back:text <- slurp resources, [a] 10:bool/raw <- equal contents-read-back, [xy] memory-should-contain [ 10 <- 1 # file contents read back exactly match what was written ] ] scenario write-to-fake-file-that-exists [ local-scope assume-resources [ [a] <- [] ] sink:&:sink:char, writer:num/routine <- start-writing resources, [a] sink <- write sink, 120/x sink <- write sink, 121/y close sink wait-for-routine writer contents-read-back:text <- slurp resources, [a] 10:bool/raw <- equal contents-read-back, [xy] memory-should-contain [ 10 <- 1 # file contents read back exactly match what was written ] ] scenario write-to-existing-file-preserves-other-files [ local-scope assume-resources [ [a] <- [] [b] <- [ |bcd| ] ] sink:&:sink:char, writer:num/routine <- start-writing resources, [a] sink <- write sink, 120/x sink <- write sink, 121/y close sink wait-for-routine writer contents-read-back:text <- slurp resources, [a] 10:bool/raw <- equal contents-read-back, [xy] other-file-contents:text <- slurp resources, [b] 11:bool/raw <- equal other-file-contents, [bcd ] memory-should-contain [ 10 <- 1 # file contents read back exactly match what was written 11 <- 1 # other files also continue to persist unchanged ] ] def slurp resources:&:resources, filename:text -> contents:text [ local-scope load-ingredients source:&:source:char <- start-reading resources, filename buf:&:buffer <- new-buffer 30/capacity { c:char, done?:bool, source <- read source break-if done? buf <- append buf, c loop } contents <- buffer-to-array buf ]