A beginner-friendly REPL that combines:
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
; | |
; Copyright © 2024 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
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
; | |
; Copyright © 2023 Peter Monks | |
; | |
; This Source Code Form is subject to the terms of the Mozilla Public | |
; License, v. 2.0. If a copy of the MPL was not distributed with this | |
; file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
; | |
; SPDX-License-Identifier: MPL-2.0 | |
; |
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
; | |
; Copyright © 2021 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
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
;/********************************************************************* | |
;* Copyright (c) 2021-01-12 Peter Monks | |
;* | |
;* This program and the accompanying materials are made | |
;* available under the terms of the Eclipse Public License 2.0 | |
;* which is available at https://www.eclipse.org/legal/epl-2.0/ | |
;* | |
;* SPDX-License-Identifier: EPL-2.0 | |
;**********************************************************************/ |
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
; | |
; Copyright © 2020 Peter Monks | |
; | |
; Licensed under the Apache License, Version 2.0 (the "License"); | |
; you may not use this file except in compliance with the License. | |
; You may obtain a copy of the License at | |
; | |
; http://www.apache.org/licenses/LICENSE-2.0 | |
; | |
; Unless required by applicable law or agreed to in writing, software |
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
(defn file-seq | |
"A tree seq on java.io.Files that doesn't follow symlinks" | |
[dir] | |
(tree-seq | |
(fn [^java.io.File f] (and (.isDirectory f) (not (java.nio.file.Files/isSymbolicLink (.toPath f))))) | |
(fn [^java.io.File d] (seq (.listFiles d))) | |
dir)) |
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
#!/usr/bin/env bb | |
; | |
; Copyright © 2020 Peter Monks Some Rights Reserved | |
; | |
; This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. | |
; To view a copy of this license, visit https://creativecommons.org/licenses/by-nc-sa/4.0/ or send a | |
; letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. | |
; | |
; Inspired by https://github.com/ChrisPenner/wc - this code diverges from the remaining Haskell examples |
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
; Start a REPL with `lein try quil`, on JDK 1.8 (quil is not yet functional on JRE 9+) | |
(require '[quil.core :as q]) | |
; Tunables (feel free to play with these) | |
(def window-size [1000 1000]) ; Initial size of the window | |
(def num-dimensions 9) ; Number of "dimensions" (spokes) to draw | |
(def num-circles 10) ; Number of circles in the chart | |
(def save-image (atom true)) ; Save the image (to a PNG) once, after it's first drawn | |
; Other constants (do not touch!) |
I hereby claim:
- I am pmonks on github.
- I am pmonks (https://keybase.io/pmonks) on keybase.
- I have a public key ASCxXap2ro4H4RZvS9DP6oEMvE4uCx-z-eOCBZZj5aj5SQo
To claim this, I am signing this object:
NewerOlder