Skip to content

Commit

Permalink
Updated website and released 0.11.0.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
denisrosset committed Mar 22, 2016
1 parent 6e28990 commit 5b6c305
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 40 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Metal - fast unboxed data structures for Scala

See the [companion website](https://denisrosset.github.io/metal) and the
associated [tutorials](https://denisrosset.github.io/metal/tutorials.html)
Metal provides fast mutable collections whose performance should be close to
hand-written data structures using raw primitive arrays.

Expand Down Expand Up @@ -47,7 +49,7 @@ We currently have a dependency on Spire for two reasons:

## Example

```
```scala
scala> import metal._; import syntax._
import metal._
import syntax._
Expand Down
33 changes: 18 additions & 15 deletions docs/src/main/tut/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,28 @@ section: "tutorials"

# Container types

All container names are prefixed by one of:
Metal has three packages containing collections:

- `M`: the mutable variant,
- `I`: the immutable variant,
- `F`: the generic variant, that can be either mutable or immutable.
- `metal.generic`: a generic base trait, corresponding to an immutable or mutable instance,
- `metal.mutable`: mutable collections,
- `metal.immutable`: immutable collections.

The following set implementations are provided (where `x = M/I/F`):
Mutable collections can be used as builders for their immutable counterparts; the `result()` method
will provide an immutable instance, and clear the original collection.

- `xHashSet[K]`: a set implemented using an open addressing scheme,
- `xSortedSet[K]`: a sorted set, using the `Order` type class from `Spire`,
- `xBitSet[Int]` a bitset implementation with (non-negative) `Int` keys.
The following set implementations are provided:

- `HashSet[K]`: a set implemented using an open addressing scheme,
- `SortedSet[K]`: a sorted set, using the `Order` type class from `Spire`,
- `BitSet` a bitset of implementation with (non-negative) `Int` keys.

Two variants of maps are implemented:

- `xHashMap[K,V]`: an hash map using an open addressing scheme,
- `xHashMap2[K,V1,V2]`: an hash map usin an open addressing scheme, storing
values `(V1, V2)`; however, the values of type `V1` and `V2` are never
stored as a tuple to avoid allocations; individual access methods are
provided instead.
- `HashMap[K,V]`: an hash map using an open addressing scheme,
- `HashMap2[K,V1,V2]`: an hash map using an open addressing scheme, storing
values `(V1, V2)`; however, the values of type `V1` and `V2` are not
stored as tuples, avoiding allocations; individual access methods are
provided.

There is also a work-in-progress implementation of mutable and growable arrays
`Buffer` and an immutable wrapper for arrays `IArraySeq`.
There is also a simple array wrapper called `Buffer`, with immutable and mutable
variants; contrary to the other metal data structures, this class is specialized.
12 changes: 9 additions & 3 deletions docs/src/main/tut/higherorder.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ Several higher-order functions are available on containers, for example `foreach
`exists`, `forall`, `foldLeft` (or `/:`); however, the calling convention is slightly different
from the Scala collections to avoid allocating tuples:

```scala
val m = MHashMap(1 -> 2, 3 -> 4)
```tut:silent
import metal._; import syntax._
val m = mutable.HashMap(1 -> 2, 3 -> 4)
```

```tut
m.foreach { (k, v) => println(s"($k, $v)") }
```

// instead of
instead of

```scala
m.foreach { case (k, v) => println(s"($k, $v)") }
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/tut/ptr.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Thanks to name-based extractors, the code snippet above does not perform any all
Several methods are implemented on `Ptr` and `VPtr`, and can be used to access the pointed
element.

```scala
```tut
import metal._
import metal.syntax._
Expand Down
4 changes: 2 additions & 2 deletions docs/src/site/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ apidocs: /metal/latest/api
githuburl: https://github.com/denisrosset/metal
sources: https://github.com/denisrosset/metal/blob/master/
# logourl: https://pbs.twimg.com/profile_images/3005141692/dc8e1eb36b6cbd2b5726f63c50adf7f2.png # uncomment with a real image
# chatname: Gitter
# chaturl: https://gitter.im/...
chatname: Gitter
chaturl: https://gitter.im/denisrosset/metal
# buildname: Travis
# buildurl: https://travis-ci.org/...
collections:
Expand Down
17 changes: 5 additions & 12 deletions docs/src/site/colophon.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,10 @@ title: "Colophon"
section: "colophon"
---

Fizz has been made possible by the nice documentation effort provided by
the [Cats](https://github.com/typelevel/cats) scala project.
Metal has been made possible by the earlier work done in [Debox](http://github.com/non/debox).
Random frustration with the quirks of Scala specialization led to the current project.

We also thank the maintainers and contributors of the following projects, on which this template is based.
The `core` subproject could be adapted to deal with off-heap memory, see for example:

* [sbt-doctest](https://github.com/tkawachi/sbt-doctest), a plugin for sbt that generates tests from examples in ScalaDoc,
* [sbt-ghpages](https://github.com/sbt/sbt-ghpages), a SBT plugin to publish Github pages,
* [sbt-site](https://github.com/sbt/sbt-site), a site generation plugin for SBT,
* [tut](https://github.com/tpolecat/tut), a type-checker for example code,
* [sbt-unidoc](https://github.com/sbt/sbt-unidoc), a SBT plugin to create a unified API document across projects.

We also mention another very similar project:

* [indoctrinate](https://github.com/stew/indoctrinate), a sample scala project demonstrating a good setup for documentation.
- [LArray](https://github.com/xerial/larray),
- [scala-offheap](https://github.com/densh/scala-offheap).
21 changes: 16 additions & 5 deletions docs/src/site/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,27 @@ layout: default
title: "Home"
section: "home"
---
Fizz is a library written in Scala to pass the FizzBuzz test.
Metal is a Scala library to provide fast unboxed data structures.

<div class="msg warn"> <p><strong> Fizz is currently an experimental
<div class="msg warn"> <p><strong> Metal is currently an experimental
project under active development</strong>. Feedback and
contributions are welcomed as we look to improve the project. </p> </div>

<a name="getting-started"></a>

# Getting Started
# Getting started

Fizz is currently available for Scala 2.11.
Metal is currently available for Scala 2.10 and 2.11.

<div class="msg warn"> <p><strong> Add instructions on how to get started. </strong></p> </div>
```scala

resolvers += "bintray/denisrosset" at "http://dl.bintray.com/denisrosset/maven"

libraryDependencies ++= Seq(
"org.scala-metal" %% "metal-core" % "VERSION",
"org.scala-metal" %% "metal-library" % "VERSION"
)

```

where `VERSION` is the latest published version (see the [Releases](https://github.com/denisrosset/metal/releases)).
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.11.0.1"
version in ThisBuild := "0.11.0.2"

0 comments on commit 5b6c305

Please sign in to comment.