https://github.com/vlaaad/tweet-def
Tweet as a dependency 🤪
https://github.com/vlaaad/tweet-def
Last synced: 11 days ago
JSON representation
Tweet as a dependency 🤪
- Host: GitHub
- URL: https://github.com/vlaaad/tweet-def
- Owner: vlaaad
- License: mit
- Created: 2021-11-22T11:42:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T19:07:12.000Z (over 3 years ago)
- Last Synced: 2025-03-26T20:51:26.343Z (28 days ago)
- Language: Clojure
- Size: 5.86 KB
- Stars: 56
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Use tweets as a dependency
## Rationale
Clojure is so concise and expressive some libraries can fit in a tweet. Tweets are also immutable —
this makes them a very safe and reliable dependency source. Why go through the hassle of setting up a repo
for a one-liner when you can tweet it?## Usage:
Here is an example [tweet library](https://twitter.com/gigasquid/status/557897741511454724) authored by @gigasquid:
> Today's word of the day is "penultimate".
>
> Clojure definition: (defn penultimate [x] (last (butlast x)))
>
> #wordOfTheDayDefinedInClojureYou can now depend on this library in your code:
```
$ clj -Sdeps '{:deps {io.github.vlaaad/tweet-def {:git/tag "v2" :git/sha "134a803"}}}'
Clojure 1.10.3
user=> (require '[io.github.vlaaad.tweet-def :as tweet])
nil
user=> (tweet/def "https://twitter.com/gigasquid/status/557897741511454724")
#'user/penultimate
user=> (penultimate [1 2 3])
2
```