Skip to content

Commit 97fd8fb

Browse files
authored
Structure change (#69)
* structure change
1 parent 40c20fa commit 97fd8fb

17 files changed

Lines changed: 285 additions & 0 deletions

book/SUMMARY.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,20 @@
215215

216216
* [Conclusion](languages/jvm/java/conclusion.md)
217217

218+
* [Clojure](languages/jvm/clojure/README.md)
219+
220+
* [Introduction](languages/jvm/clojure/intro.md)
221+
222+
* [History](languages/jvm/clojure/history.md)
223+
224+
* [Advantages](languages/jvm/clojure/advantages.md)
225+
226+
* [Disadvantages](languages/jvm/clojure/disadvantages.md)
227+
228+
* [Some interesting facts](languages/jvm/clojure/misc.md)
229+
230+
* [Conclusion](languages/jvm/clojure/conclusion.md)
231+
218232
## End
219233

220234
* [Credits](credits.md)

book/languages/jvm/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Hi
2+
3+
> This chapter was made by Skayo.
4+
5+
Welcome to the JVM part!
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Hi
2+
3+
> This chapter was made by Skayo.
4+
5+
Welcome to the Clojure part!
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Advantages of Clojure
2+
3+
## What makes Clojure cool
4+
5+
* all the benefits of functional programming
6+
7+
* alllws dynamic, compact code with macros, multimethods and late binding
8+
9+
* Java interoperability
10+
11+
* portability and fast garbage collection
12+
13+
* functional data structures, software transactional memory, all the concurrency goodies
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Conclusion
2+
3+
Well, it's nice to know Clojure.
4+
Around 200 companies use Clojure, including Adobe, Amazon, Apple, Cisco and many more.
5+
And the incomes are not that bad.
6+
7+
## Sources
8+
9+
* [**Wikipedia**](https://en.wikipedia.org/wiki/Clojure)
10+
11+
* [**Official Clojure Page**](https://clojure.org/)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Disadvantages of Clojure
2+
3+
## What makes Clojure uncool
4+
5+
* Not a memory efficient language
6+
7+
* Lacks a reliable static typing layer
8+
9+
* It can't be used for highly perfomant low level code
10+
11+
* It warms up slowly
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# History
2+
3+
## The begginings
4+
5+
**Rick Hickey** is the creator of Clojure. Before Clojure he developed a similar language, **dotLisp**, but it was based on the .NET platform and three earlier attempts to provide interoperability between JVM and Lisp (**jfli, FOIL and Lisplets**).
6+
7+
He spent *around* 2.5 years working on the language before realeasing it to the public and much of that time without outside funding. At the end of that time, Hickey sent an email to some of his friends in Lisp community announcing the Clojure language.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Inception
2+
3+
**Clojure** is dynamic, modern and functional dialect of Lisp on the Java platform.
4+
Clojure has a Lisp macro system. Just like the other Lisps, code is treated as data.
5+
6+
Clojure supports immutable data structures and immutability. It does encourage programmers to be explicit about managing identity and its states.
7+
It's intended to facilitate developing more robust, especially concurrent programs that are fast and simple.
8+
9+
Commercial support for Clojure is provided by Cognitect.
10+
11+
Clojure was developed because the creator wanted kinda modern Lisp for functional programming, designed for concurrency and symbiotic with the Java platform.
12+
13+
> File extensions for Clojure code are .clj .cljs .cljc and .edn

book/languages/jvm/clojure/misc.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Interesting facts about Clojure
2+
3+
## Clojure code compared to other languages
4+
5+
> Example of Hello World app in some languages
6+
7+
### Clojure
8+
9+
```clojure
10+
(ns clojure.examples.hello
11+
(:gen-class))
12+
(defn hello-world []
13+
(println "Hello World"))
14+
(hello-world)
15+
```
16+
17+
### Java
18+
19+
```java
20+
class HelloWorld {
21+
public static void main(String[] args) {
22+
System.out.println("Hello, World!");
23+
}
24+
}
25+
```
26+
27+
### Ruby
28+
29+
```Ruby
30+
puts "Hello world!"
31+
```

book/languages/jvm/intro.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Inception
2+
3+
**JVM**, Java Virtual Machine, is, as the name suggests, a virtual machine that enables your computer to run Java code and code in other languages that does compile to Java bytecode.
4+
5+
## Execution of JVM
6+
7+
Java Code (.java) → JAVAC Compiler → Byte Code (.class) → JVM ⇌ Windows/Linux/Mac
8+
9+
## Features
10+
11+
* JVM is cross-platform
12+
13+
* JVM is designed to provide security to host computer in terms of their data
14+
15+
## JVM Languages
16+
17+
The most popular JVM languages are:
18+
19+
* [Java](./java/intro.md)
20+
21+
* [Clojure](./clojure/intro.md)

0 commit comments

Comments
 (0)