<commit_before>## starting

Create a `profiles.clj` that looks something like
```clojure
{:chat
 {:env {:rafal-password "<PASSWORD>"
        :james-password "<PASSWORD>"
        :mailgun-domain "braid.mysite.com"
        :mailgun-password "<PASSWORD>"
        :site-url "http://localhost:5555"
        :hmac-secret "<PASSWORD>"
        :aws-domain "braid.mysite.com"
        :aws-access-key "my_aws_key"
        :aws-secret-key "my_aws_secrete"
        :db-url "datomic:free://localhost:4334/chat-dev"
        }}}
```
(quick note until we clean this up:
   you can probably get by with only db-url and hmac-secret)

```bash
# start datomic db elsewhere
# then:
lein with-profile +chat repl
```

```clojure
(chat.server.db/init!) ; first time only

(chat.server.seed/seed!) ; optional

(chat.server.handler/start-server! 5555)
(chat.server.sync/start-router!)
```

# compiling js + figwheel

rlwrap lein run -m clojure.main script/figwheel.clj

# compiling css

lein lesscss auto

# running tests

`lein with-profile test quickie "chat.*"`

<commit_msg>add notes re: permgen issues<commit_after>## starting

Create a `profiles.clj` that looks something like
```clojure
{:chat
 {:env {:rafal-password "<PASSWORD>"
        :james-password "<PASSWORD>"
        :mailgun-domain "braid.mysite.com"
        :mailgun-password "<PASSWORD>"
        :site-url "http://localhost:5555"
        :hmac-secret "foobar"
        :aws-domain "braid.mysite.com"
        :aws-access-key "my_aws_key"
        :aws-secret-key "my_aws_secrete"
        :db-url "datomic:free://localhost:4334/chat-dev"
        }}}
```
(quick note until we clean this up:
   you can probably get by with only db-url and hmac-secret)

```bash
# start datomic db elsewhere
# then:
lein with-profile +chat repl
```

```clojure
(chat.server.db/init!) ; first time only

(chat.server.seed/seed!) ; optional

(chat.server.handler/start-server! 5555)
(chat.server.sync/start-router!)
```

# compiling js + figwheel

rlwrap lein run -m clojure.main script/figwheel.clj

# compiling css

lein lesscss auto

# running tests

`lein with-profile test quickie "chat.*"`



# permgen issues?

if you're having the following error:

`java.lang.OutOfMemoryError: PermGen space`

try:

1: add the following to project.clj or profiles
`:jvm-opts ["-XX:MaxPermSize=128m" "-XX:+UseConcMarkSweepGC" "-XX:+CMSClassUnloadingEnabled"]`

2: if you have lots of plugins in your lein user profile (`~/.lein/profiles.clj`), remove them

3: switch to java 1.8


{'fraction_non_alphanumeric': 0.14021695460024106, 'fraction_numerical': 0.012856568903173965, 'mean_word_length': 3.45438282647585, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1246873', 'n_tokens_mistral': 910, 'n_tokens_neox': 851, 'n_words': 228}