html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!-- Clojure Course written by Tibor Santa, Part 1 -->
<!-- Feel free to copy for learning and experimentation -->
<!DOCTYPE html>
<html>
<head>
<title>Clojure Course - Introduction</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Kufam&display=swap">
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css">
</head>
<body>
<article class="clojure-course">
<h1><a href="https://clojure.org/" target="_blank"><img src="https://clojure.org/images/clojure-logo-120b.png"/></a>Clojure Course</h1>
<h2>Part 1 - Introduction</h2>
<p><em>Clojure</em> is a modern, mature, functional programming language, created by Rich Hickey in 2007.</p>
<p>Main features:</p>
<ul>
<li>Clojure is a dialect of <em>LISP</em> (List Processor). This language family was first introduced by John McCarthy in 1958, and it has several notable variants, including <em>Common Lisp</em>, <em>Scheme</em>, <em>Racket</em> and <em>Emacs Lisp</em>. Clojure is one of the more recent members of the family.</li>
<li>Lisp syntax is characterized (and often mocked) by extensive use of <em>parenthesis</em>. Lisp programmers consider this a gift, rather than an annoyance - you'll learn how to embrace it too :)</li>
<li>Clojure has a powerful <em>macro system</em>, which provides insane extensibility to the language.</li>
<li>The Lisp philosophy that treats <em>code as data</em>, grants Clojure the ability to change programs at runtime, and supports live coding. The <em>REPL</em> (read-eval-print loop) as an interactive development tool, is an important component of the Clojure programming experience.</li>
<li>Clojure commands a full arsenal of FP features, such as <em>immutability</em>, <em>function composition</em>, <em>lazy evaluation</em> and a preference for <em>pure functions</em>. Tons of useful tools are already implemented in the standard library.</li>
<li><em>Dynamic</em> - this applies not only to the type system (as opposed to static typing), but also to dynamic polymorphism, flexible heterogenous collections, and the explicit aim to make developers more productive.</li>
<li>Clojure's built-in <em>data types and collections</em> are versatile, fast and efficient.</li>
<li>Great support for <em>concurrency</em>.</li>
<li>Clojure is a compiled, hosted language. It was designed to take advantage of the platform's features for optimization and garbage collection. Originally it was written for the <em>JVM</em> (Java Virtual Machine). Hence it provides great <em>inter-operability</em> with Java and other JVM languages, including seamless integration with OOP features, and access to Java's huge library ecosystem.</li>
<li>Clojure code can also be compiled to Javascript via <em>ClojureScript</em>, hence it can be used as a full stack development language. Another implementation is <em>ClojureCLR</em>, targeting the .NET platform.</li>
<li>Clojure has been in stable release for several years, currently on version 1.10.1. Developer community and <em>library ecosystem</em> are improving rapidly, and the language is gaining adoption in large companies too, for example Walmart and Atlassian.</li>
<li><em>Rich Hickey</em>, the language creator and BDFL is a feature himself. Just listen to his talks on Youtube and you'll see why.</li>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
body {
font-family: 'Kufam', cursive;
font-size: smaller;
background-color: #5881D8;
color: white;
}
h1 {
text-shadow: 4px -4px 8px #8FB5FE, -4px 4px 8px #91DC47;
font-size: xx-large;
}
h1 img {
vertical-align: middle;
width: 60px;
height: 60px;
padding-right: 0.5em;
}
h2, h3 {
text-shadow: 2px -2px 4px #8FB5FE, -2px 2px 4px #91DC47;
}
p {
text-shadow: 1px 1px 2px #8FB5FE;
}
em {
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
window.klipse_settings = {selector: '.language-klipse'};
window.settings = {selector: '.language-klipse'};
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run