Skip to content

Commit 14d5c2d

Browse files
reorg namespaces to ideas and libs
1 parent ca5d24c commit 14d5c2d

File tree

25 files changed

+242
-120
lines changed

25 files changed

+242
-120
lines changed

clay.edn

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,36 @@
77
:branch "main"}
88
:hide-info-line true
99
:hide-ui-header true
10-
:aliases {:markdown {:render true
11-
:base-target-path "site"
12-
:format [:quarto :html]
13-
:run-quarto false
14-
:hide-info-line false}}}
10+
:aliases
11+
{:markdown
12+
{:render true
13+
:base-target-path "site"
14+
:format [:quarto :html]
15+
:run-quarto false
16+
:hide-info-line false
17+
:quarto {:format {:html {:theme nil}}}
18+
:quarto/expansions
19+
{:affiliation
20+
{:clojure.core {:name "Clojure.core" :url "https://clojure.org"}
21+
:scicloj {:name "Scicloj" :url "https://scicloj.github.io/"}
22+
:clojurecamp {:name "Clojure Camp" :url "https://clojure.camp/"}
23+
:hummi {:name "Hummi" :url "https://hummi.app"}}
24+
:author
25+
{:chouser
26+
{:name "Chris Houser"
27+
:url "https://chouser.us/"
28+
:links [{:icon "github" :text "GitHub" :href "https://github.com/chouser"}]}
29+
:daslu
30+
{:name "Daniel Slutsky"
31+
:affiliation [:scicloj]
32+
:links [{:icon "github" :text "GitHub" :href "https://github.com/daslu"}]}
33+
:alexmiller
34+
{:name "Alex Miller"
35+
:affiliation [:clojure.core]
36+
:links [{:icon "github" :text "GitHub" :href "https://github.com/puredanger"}]}
37+
:timothypratley
38+
{:name "Timothy Pratley"
39+
:email "timothypratley@gmail.com"
40+
:url "https://timothypratley.blogspot.com/p/httpswww.html"
41+
:affiliation [:hummi :scicloj]
42+
:links [{:icon "github" :text "GitHub" :href "https://github.com/timothypratley"}]}}}}}}

content/_quarto.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ website:
1010
right:
1111
- posts.qmd
1212
- ideas.qmd
13-
- talks.qmd
14-
- tutorials.qmd
15-
- pages.qmd
13+
- libs.qmd
1614
- about.qmd
1715
- icon: github
18-
href: https://github.com/timothypratley/clojurecivitas
16+
href: "https://github.com/timothypratley/clojurecivitas"
1917

2018
format:
2119
html:

content/about.qmd

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ Exploramus, Communicamus, Crescimus<br>
5959
<small style="font-size: 1rem; color: #555;">We explore, we share, we grow.</small>
6060
</div>
6161

62+
Civitas Clojure offers a hassle-free way to host and share your notebooks without the overhead of creating a new project each time.
63+
By providing a shared, well-organized platform, it lets you focus on your ideas and code while automatically publishing your work to GitHub Pages.
64+
This streamlines collaboration, increases visibility, and makes contributing simple and efficient—so you can spend less time on setup and more time creating.
65+
6266
Learning technical subjects involves navigating complex webs of concepts.
6367
Currently, resources for learning Clojure exist as isolated articles, unconnected tutorials, or flat lists that do not
6468
capture how ideas relate to each other.
@@ -93,28 +97,24 @@ ClojureCivitas can be used as a library to simplify publishing your own garden o
9397

9498
### File system organization
9599

96-
| Directory | Description |
97-
|---------------------|-------------------------------------------------------------|
98-
| `src` | Code for building a website and database |
99-
| `content` | Notebooks (Clojure and Markdown), images, data files |
100-
| `content/posts` | Time-anchored content (blog posts, announcements, analyses) |
101-
| `content/pages` | Timeless or evolving content related to this site |
102-
| `content/tutorials` | Learning materials (tutorials, workshops, guides) |
103-
| `content/talks` | Presentation slides and related materials |
104-
| `content/ideas` | Drafts, experiments, and work-in-progress content |
105-
| `site` | Quarto configuration for the website |
106-
107-
Each of `posts`, `pages`, `tutorials`, `talks`, `ideas` is a source-root.
108-
These directories make it easier to distinguish blog posts from everything else.
100+
| Directory | Description |
101+
|----------------|----------------------------------------------------------------------|
102+
| `src` | Code for building a website and database |
103+
| `content` | Source root for notebooks (Clojure and Markdown), images, data files |
104+
| `content/idea` | The `idea` namespace hosts explorations, concepts and insights |
105+
| `content/lib` | The `lib` namespace is tied to libraries, tools, and projects |
106+
| `site` | Temporary build target for the Quarto website |
109107

110-
Namespace selection for notebooks follow standard Clojure namespace conventions to avoid conflicts.
108+
Shared images can go in `content/images`, but prefer images and data files as siblings to your namespace.
111109

112-
Library-related notebooks: Use the library’s namespace prefix (e.g., scicloj.clay.v2.guide.getting-started).
110+
The difference between a posts and a page is identified by the presence or absence of `date` metadata.
113111

114-
Disambiguation: If a topic exists, qualify with additional context (e.g.,
115-
scicloj.clay.v2.guide.getting-started.intellij).
112+
Namespace selection for notebooks follow standard Clojure namespace conventions to avoid conflicts.
113+
Choose namespaces that fit with the content-first hierarchy.
114+
Files are grouped by what they’re about (not who wrote them or where they were presented).
115+
Author, date, tags and categories are included in metadata and will be used for grouping, filter of views.
116116

117-
Dependent utils/modules: Nest under a parent namespace (e.g., ...getting-started.index, ...getting-started.utils).
117+
Disambiguation: If a topic exists, qualify with additional context.
118118

119119
Civitas invokes [Clay](https://github.com/scicloj/clay) to convert Clojure notebooks into Markdown files, placing them
120120
in the `site` directory.
@@ -132,18 +132,13 @@ Goal: Align with Clojure’s code organization while allowing organic, practical
132132

133133
### Topic organization
134134

135-
Notebooks are tagged with a primary topic (first in list) and optional additional topics.
136-
137-
Fixed top-level topics: `:community`, `:core`, `:data`, `:system`, `:tooling`, `:web`.
138-
139-
Subtopics: Semi-open (e.g., :web/frontend implies :web). Expect these to evolve.
140-
141-
Topics are one tagging method; others may emerge.
142-
143-
Tags want to be free:
144-
https://gwern.net/doc/philosophy/ontology/2005-04-shirky-ontologyisoverratedcategorieslinksandtags.html
135+
Follow the Quarto convention of categories, tags, and keywords.
136+
Fixed categories; `community`, `clojure`, `data`, `system`, `tooling`, `web`.
137+
Tags; flexible, open-ended for finer-grained labeling (e.g. `frontend`, `reagent`).
138+
Keywords; for SEO or search indexing; typically fewer and focused on discoverability.
145139

146-
But also we can help curate the content with a good set of top-level topics.
140+
Tags and metadata are the preferred organization principle:
141+
[Categories, Links, and Tags](https://gwern.net/doc/philosophy/ontology/2005-04-shirky-ontologyisoverratedcategorieslinksandtags.html)
147142

148143
Goal: Constellations, not cabinets.
149144

content/db.edn

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,35 @@
1-
{:topics
1+
{:author
2+
[{:id :chouser
3+
:name "Chris Houser"
4+
:url "https://chouser.us/"
5+
:links [{:icon "github" :text "GitHub" :href "https://github.com/chouser"}]}
6+
{:id :daslu
7+
:name "Daniel Slutsky"
8+
:affiliation [:scicloj]
9+
:links [{:icon "github" :text "GitHub" :href "https://github.com/daslu"}]}
10+
{:id :alexmiller
11+
:name "Alex Miller"
12+
:affiliation [:clojure.core]
13+
:links [{:icon "github" :text "GitHub" :href "https://github.com/puredanger"}]}
14+
{:id :timothypratley
15+
:name "Timothy Pratley"
16+
:email "timothypratley@gmail.com"
17+
:url "https://timothypratley.blogspot.com/p/httpswww.html"
18+
:affiliation [:hummi :scicloj]
19+
:links [{:icon "github" :text "GitHub" :href "https://github.com/timothypratley"}]}]
20+
21+
:affiliation [{:id :clojure.core :name "Clojure.core" :url "https://clojure.org"}
22+
{:id :scicloj :name "Scicloj" :url "https://scicloj.github.io/"}
23+
{:id :clojurecamp :name "Clojure Camp" :url "https://clojure.camp/"}
24+
{:id :hummi :name "Hummi" :url "https://hummi.app"}]
25+
26+
:topics
227
[{:id :core
328
:desc "Fundamental language concepts"
429
:color "#E2F0CB"
530
:direction 0}
631
{:id :core/syntax
7-
:desc "Data structures, special forms, and syntax"}
32+
:desc "Data structures special forms and syntax"}
833
{:id :core/fp
934
:desc "Functional programming patterns"}
1035
{:id :core/async

content/explore.qmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: "Explore Notebooks"
3+
listing:
4+
contents: .
5+
type: default
6+
sort: "date desc"
7+
filter-ui: true
8+
fields: [title, author, date, categories, tags, description]
9+
---
10+
Explore all notebooks. Use the filters below to narrow by topic, author, or tag.
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
^:kindly/hide-code
2-
^{:clay {:quarto {:format {:html {:page-layout :full}}}}}
3-
(ns civitas.view.index
1+
^{:kindly/hide-code true
2+
:clay {:title "Civitas Explorer"
3+
:quarto {:author :timothypratley
4+
:format {:html {:page-layout :full}}}}}
5+
(ns idea.civitas.explorer
46
(:require [scicloj.kindly.v4.kind :as kind]
57
[civitas.db :as db]
68
[civitas.geometry :as geom]
@@ -70,14 +72,14 @@
7072

7173
#_^:kindly/hide-code
7274
#_(kind/hiccup
73-
(hex-grid
74-
(for [topic (db/topics)]
75-
(merge topic {:position 1
76-
:url nil
77-
:direction 1
78-
:color (or (:color topic)
79-
(keyword (name (:id topic))))
80-
:title (:desc topic)}))))
75+
(hex-grid
76+
(for [topic (db/topics)]
77+
(merge topic {:position 1
78+
:url nil
79+
:direction 1
80+
:color (or (:color topic)
81+
(keyword (name (:id topic))))
82+
:title (:desc topic)}))))
8183

8284
^:kindly/hide-code
8385
(kind/table (db/topics)

content/posts/timothypratley/beating_code_interviews_with_stupid_stuff/z_combinator_gambit.clj renamed to content/idea/code_interview/beating/with_stupid_stuff/z_combinator_gambit.clj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
^{:clay {:quarto {:title "The Z-Combinator Gambit"
2-
:author "Timothy Pratley"}}}
3-
(ns timothypratley.beating-code-interviews-with-stupid-stuff.z-combinator-gambit)
1+
^{:kindly/hide-code true
2+
:clay {:quarto {:title "The Z-Combinator Gambit"
3+
:author [:chouser :timothypratley]
4+
:date "2025-05-25"
5+
:category :clojure
6+
:tags [:lambda-calculus :code-interview]
7+
:keywords [:z-combinator]}}}
8+
(ns idea.code-interview.beating.with-stupid-stuff.z-combinator-gambit)
49

510
;; Welcome back code champs, number ninjas, and data divers to our first episode of Beating Code Interviews with Stupid Stuff.
611
;; People often send me emails asking, "How can I use lambda calculus to impress people?"
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
(ns util.elk
1+
^{:kindly/hide-code true
2+
:clay {:title "Eclipse Layout Kernel"
3+
:quarto {:author :timothypratley
4+
:category :clojure
5+
:tags [:graphs :graph-layout]}}}
6+
(ns idea.graph.layout.elk
27
(:require [clojure.data.json :as json]
3-
[util.elk-svg :as elk-svg])
8+
[idea.graph.layout.elk-svg :as elk-svg])
49
(:import (org.eclipse.elk.core RecursiveGraphLayoutEngine)
510
(org.eclipse.elk.core.util BasicProgressMonitor)
611
(org.eclipse.elk.graph ElkNode)
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
(ns util.elk-svg
1+
^{:clay {:title "ELK SVG"
2+
:quarto {:author :timothypratley
3+
:category :clojure
4+
:tags [:graphs :svg :visualization]}}}
5+
(ns idea.graph.layout.elk-svg
26
(:require [clojure.string :as str]
37
[scicloj.kindly.v4.kind :as kind]))
48

content/posts/util/print.clj renamed to content/idea/print/object/remove_extraneous.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
(ns util.print
1+
^{:clay {:title "Clean object printing by removing extraneous"
2+
:quarto {:author :timothypratley
3+
:category :clojure
4+
:tags [:print-method :objects]}}}
5+
(ns idea.print.object.remove-extraneous
26
(:require [clojure.string :as str])
37
(:import (clojure.lang MultiFn)
48
(java.io Writer)))

0 commit comments

Comments
 (0)