Skip to content

Commit 562fe12

Browse files
committed
update readme, add intentions
1 parent d61c5b8 commit 562fe12

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ This is a library with Scala utilities for Computer Science teaching. The librar
1010

1111
This repo in used in this course *(in Swedish)*: http://cs.lth.se/pgk with course material published as free open source here: https://github.com/lunduniversity/introprog
1212

13-
## How to use this library
13+
14+
## How to use introprog-scalalib
1415
### Using sbt
1516

1617
If you have the [Scala Build Tool](https://www.scala-sbt.org/download.html) then you can put this text in a file called `build.sbt`
1718
```
1819
scalaVersion := "2.12.6"
19-
libraryDependencies += "se.lth.cs" %% "introprog" % "0.1.5"
20+
libraryDependencies += "se.lth.cs" %% "introprog" % "1.0.0"
2021
```
2122

2223
When you run `sbt` in terminal the `introprog` package is automatically downloaded and made available on your classpath.
@@ -28,27 +29,47 @@ scala> val w = new introprog.PixelWindow()
2829
scala> w.fill(100,100,100,100,java.awt.Color.red)
2930
```
3031

31-
#### Manual download
32+
### Manual download
3233

3334
Download the latest jar-file from here: https://github.com/lunduniversity/introprog-scalalib/releases
3435

3536
Put the jar-file on your classpath when you run the Scala REPL, for example:
3637
```
37-
> scala -cp introprog_2.12-0.1.5.jar
38+
> scala -cp introprog_2.12-1.0.0.jar
3839
scala> val w = new introprog.PixelWindow()
3940
scala> w.fill(100,100,100,100,java.awt.Color.red)
4041
scala>
4142
```
4243
Put the jar-file on your classpath when you run your Scala app, for example:
4344
```
44-
> scala -cp "introprog_2.12-0.1.5.jar:." Main
45+
> scala -cp "introprog_2.12-1.0.0.jar:." Main
4546
```
4647
If on Windows cmd/powershell use `;` instead of `:` before the period.
4748

48-
## How to build this library
49+
## How to build introprog-scalalib
4950
With [`sbt`](https://www.scala-sbt.org/download.html) and [`git`](https://git-scm.com/downloads) on your path type in terminal:
5051
```
5152
> git clone git@github.com:lunduniversity/introprog-scalalib.git
5253
> cd introprog-scalalib
5354
> sbt package
5455
```
56+
57+
## Intentions and philosophy behind introprog-scalalib
58+
59+
This repo includes utilities to empower learners to advance from basic to intermediate levels of computer science by providing easy-to-use constructs for creating simple desktop apps in terminal and using simple 2D graphics. The utilities are implemented and exposed through an api that follows these guidelines:
60+
61+
* Use as simple constructs as possible.
62+
* Follow Scala idioms with a pragmatic mix of imperative, functional and object-oriented programming.
63+
* Don't use advanced functional programming concepts and magical implicit.
64+
* Prefer a clean api with single-responsibility functions in simple modules.
65+
* Prefer immutability over mutable state, `Vector` for sequences and case classes for data.
66+
* Hide/avoid threading and complicated concurrency.
67+
* Inspiration:
68+
- [Talk by Martin Odersky: Scala the Simple Parts](https://www.youtube.com/watch?v=ecekSCX3B4Q) [Slides here](https://www.slideshare.net/Odersky/scala-the-simple-parts)
69+
- [Principle of least power](http://www.lihaoyi.com/post/StrategicScalaStylePrincipleofLeastPower.html)
70+
71+
Areas currently in scope of this library:
72+
73+
* Simple 2D graphics.
74+
* Simple IO.
75+
* Simple, modal GUI dialogs.

0 commit comments

Comments
 (0)