Skip to content

Explain disj #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d7c6c78
Refactor to define tutorial in single HTML page and generate metadata…
ray1729 Jun 29, 2014
70a58b7
Increase max-defs limit on the sandbox.
ray1729 Jun 29, 2014
edd4e3a
Increase width.
ray1729 Jun 29, 2014
3c4d180
More content.
ray1729 Jun 29, 2014
4833184
CSS tweaks
ray-metail Jul 1, 2014
488e227
Strip whitespace around code blocks; add more content.
ray-metail Jul 8, 2014
00ffe5b
More content.
ray-metail Jul 8, 2014
a295c53
Update links
ray-metail Jul 8, 2014
791e732
Almost done...
ray-metail Jul 9, 2014
e6e12a4
Minor tweaks
ray-metail Jul 9, 2014
5b06fb7
Bump dependency versions; minor corrections to tutorial text.
ray1729 Jul 9, 2014
80ba840
Log page views.
ray1729 Jul 9, 2014
3a4d023
Store logs in subdir.
ray-metail Jul 10, 2014
7341460
EC2 setup notes added to README
ray-metail Jul 10, 2014
32e18a0
Add EC2 URL to README
ray-metail Jul 10, 2014
746aff3
Moved buttons to less prominent position
MrJaba Jul 10, 2014
3fa20bb
Added in tutorial button
MrJaba Jul 10, 2014
d3ccf3c
Added slightly darker background to non evaluatable code
MrJaba Jul 10, 2014
7cce47f
added explanation of 'for' and fixed partition typo
Jul 10, 2014
f015849
Merge pull request #1 from MrJaba/move_buttons
ray1729 Jul 10, 2014
ee9d576
Merge pull request #3 from MrJaba/background_css_change
ray1729 Jul 10, 2014
d7055c8
Merge pull request #4 from jat45/master
ray1729 Jul 10, 2014
dd43215
Fix markdown.
ray1729 Jul 10, 2014
183febc
Distinguish original from extended online versions.
ray1729 Jul 10, 2014
a005086
Specify cell-index function better.
ray1729 Jul 10, 2014
38f2bb5
More explanation of recur.
ray1729 Jul 10, 2014
5e5f5d2
More explanation of for.
ray1729 Jul 11, 2014
58b542f
Add missing bracket to example.
ray-metail Jul 11, 2014
89b6714
Merge pull request #2 from MrJaba/tutorial_button
ray1729 Jul 11, 2014
a14e0d2
Style tweaks
ray-metail Jul 11, 2014
30fec79
Address Jim's comments.
ray1729 Jul 12, 2014
60ce0b1
Added in tutorial button
MrJaba Jul 10, 2014
59892e7
More explanation of for.
ray1729 Jul 11, 2014
6b71f19
Add missing bracket to example.
ray-metail Jul 11, 2014
1b30ed4
Style tweaks
ray-metail Jul 11, 2014
9d6837a
Address Jim's comments.
ray1729 Jul 12, 2014
e04fba5
Intro expanded, signposting
jimdowning Jul 12, 2014
070e794
More content
ray1729 Jul 12, 2014
52b7c4f
Merge pull request #6 from jimdowning/master
ray1729 Jul 12, 2014
b3c7f95
Merge
ray1729 Jul 12, 2014
46cf8ac
Fix layout, linkify links.
ray1729 Jul 12, 2014
2cdf9d3
CSS for changer ul
ray1729 Jul 12, 2014
9831c94
Fix typos and formatting.
ray1729 Jul 12, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ lib
classes
*~
.lein-deps-sum
target/
.nrepl-port
logs/
44 changes: 42 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,50 @@ TryClojure is a online Clojure REPL written using Noir and Chris Done's jquery c

## Usage

http://tryclj.com

To run it locally, use `lein ring server`.

## Online

The original version of the tutorial is available at: http://tryclj.com

We are running an instance of the extended tutorial on EC2:

http://ec2-54-77-13-3.eu-west-1.compute.amazonaws.com:8801/

## Amazon EC2 setup notes

Installed Ubuntu 14.04 LTS 64-bit AMI, login and:

sudo apt-get install openjdk-7-jdk
cd $(mktemp -d)
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod 0755 lein
sudo cp lein /usr/local/bin
lein version
sudo apt-get install git
sudo adduser --system tryclj --group --disabled-login --home /opt/tryclojure
cd /opt/tryclojure
sudo -u tryclj git clone https://github.com/ray1729/tryclojure.git
sudo -u tryclj mkdir tryclojure/logs
sudo sh -c 'cat > /etc/init/tryclj.conf' <<EOT
# tryclj - Try Clojure Ring Server
#

description "TryClojure Ring Server"

start on filesystem or runlevel [2345]
stop on runlevel [!2345]

respawn
respawn limit 10 5
umask 022

#console none

exec su tryclj -s /bin/bash -c "cd /opt/tryclojure/tryclojure && lein ring server-headless"
EOT
sudo service tryclj start

## Credits

apgwoz: Design
Expand Down
14 changes: 9 additions & 5 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
(defproject tryclojure "0.1.0-SNAPSHOT"
:description "A simple web-based Clojure REPL for trying out Clojure without having to install it."
:dependencies [[org.clojure/clojure "1.4.0"]
[lib-noir "0.8.1"]
[compojure "1.1.6"]
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/tools.logging "0.3.0"]
[log4j/log4j "1.2.17"]
[enlive "1.1.5"]
[lib-noir "0.8.4"]
[compojure "1.1.8"]
[ring-server "0.3.1"]
[commons-lang/commons-lang "2.5"]
[clojail "1.0.6"]]
:jvm-opts ["-Djava.security.policy=example.policy" "-Xmx80M"]
:min-lein-version "2.0.0"
:uberjar-name "tryclojure-standalone.jar"
:plugins [[lein-ring "0.8.10"]]
:ring {:handler tryclojure.server/app :port 8801})
:plugins [[lein-ring "0.8.11"]]
:ring {:handler tryclojure.server/app :port 8801}
:profiles {:dev {:ring {:nrepl? true}}})
10 changes: 10 additions & 0 deletions resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
log4j.rootLogger=INFO, console, file
log4j.logger.example=DEBUG
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%-5p %c: %m%n
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=logs/server.log
log4j.appender.file.Append=true
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d %p %m%n
80 changes: 54 additions & 26 deletions resources/public/css/tryclojure.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body {

#wrapper {
text-align: left;
width: 620px;
width: 820px;
margin: 0 auto;
border-radius: 5px;
border: 5px solid #eee;
Expand Down Expand Up @@ -48,43 +48,43 @@ body {
border: 1px solid #aaa;
}

#console div.jquery-console-inner {
width:580px;
height:200px;
#console div.jquery-console-inner {
width:780px;
height:200px;
margin: 10px 10px;
overflow:auto;
overflow:auto;
text-align:left;
}
#console div.jquery-console-message-value {
color:#0066FF;
color:#0066FF;
font-family:monospace;
padding:0.1em;
padding:0.1em;
}
#console div.jquery-console-prompt-box {
color:#444; font-family:monospace;
color:#444; font-family:monospace;
}
#console div.jquery-console-focus span.jquery-console-cursor {
background:#333; color:#eee; font-weight:bold;
}
#console div.jquery-console-message-error {
color:#ef0505; font-family:sans-serif; font-weight:bold;
padding:0.1em;
padding:0.1em;
}
#console div.jquery-console-message-success {
color:#187718; font-family:monospace;
padding:0.1em;
padding:0.1em;
}
#console span.jquery-console-prompt-label {
#console span.jquery-console-prompt-label {
font-weight:bold;
}

.bottom {
background-color: white; color: #333;
.bottom {
background-color: white; color: #333;
}
.bottom a,a:visited {
color: #111;
.bottom a,a:visited {
color: #111;
}
table.bottom {
table.bottom {
width: 100%; border: 1px solid black;
}

Expand All @@ -93,13 +93,13 @@ table.bottom {
text-align: center;
margin-top: 10px;
}
#buttons a {
#buttons a {
/* color: #4881d8;*/
color: #3D5B99;
padding: .3em 1em;
margin-right: .7em;
font-family: Helvetica, sans-serif;
font-size: 16px;
font-size: 14px;
font-weight: bold;
background: #90b4fe;
border-radius: 5px;
Expand All @@ -110,10 +110,10 @@ table.bottom {
}
#buttons a:hover {
color: #5881d8;
cursor: pointer;
cursor: pointer;
}

#changer {
#changer {
margin: 10px;
padding: 0.25em 0.5em 0.25em 0.5em;
background: #EAF2F5;
Expand All @@ -128,12 +128,20 @@ table.bottom {

#changer p {
background: transparent;
line-height: 1.3em;
line-height: 1.5em;
font-family: Arial, serif;
font-size: 16px;
font-size: 14px;
color: #555;
}

#changer li {
background: transparent;
line-height: 1.5em;
font-family: Arial, serif;
font-size: 14px;
color: #555;
}

#changer code {
background-color: #eee;
border: 1px solid #aaa;
Expand All @@ -142,17 +150,37 @@ table.bottom {
padding: 0.1em 0.25em 0.1em 0.25em;
}

#changer code.expr{
background-color: #D8ACDB;
}

div#tuttext {
}

div.continue {
width: 100%;
text-align: center;
padding-top: 0.5em;
padding-top: 0.5em;
}

div.footer {
text-align: center;
div.footer {
text-align: center;
}

pre.codeblock {
background: #eee;
border: 1px solid #aaa;
font-size: 14px;
padding: 10px 0;
}

pre.codeblock.expr {
background: #D8ACDB;
}

#changer pre.codeblock code{
background-color: transparent;
border: none;
}

/* Coderay alpha style */
Expand Down Expand Up @@ -204,7 +232,7 @@ table.code td { padding: 2px 4px; vertical-align: top; }

/* operator */
#changer .code span.cl {

}

/* number */
Expand Down
Loading