Skip to content

Commit 255d4a6

Browse files
committed
Merge branch 'master' of https://github.com/scala/scala-lang
2 parents 739ab1b + 4a43008 commit 255d4a6

File tree

3 files changed

+189
-10
lines changed

3 files changed

+189
-10
lines changed

blog/_posts/2016-03-14-announcing-the-scala-center.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ improve the language, its tools and its documentation. It will also help develop
1212
learn the language through massive open online courses, seminars and other activities.
1313

1414

15-
## Why A Center?
15+
## Why a Center?
1616

1717
Scala has seen a steady rise in adoption. This is reflected in the
1818
[number of open Scala jobs](http://www.indeed.com/jobtrends/scala.html) and in Google's
@@ -21,15 +21,15 @@ In the [Redmonk rankings](http://sogrady-media.redmonk.com/sogrady/files/2016/02
2121
the language currently ranks 14th. Overall, we estimate that more than
2222
half a million developers are using Scala.
2323

24-
Scala is the technology of choice for vibrant open-source ecosystem,
24+
Scala is the technology of choice for a vibrant open-source ecosystem,
2525
including popular platforms and frameworks such as
2626
[Spark](http://spark.apache.org/), [Kafka](http://kafka.apache.org/),
2727
[Akka](akka.io), [Finagle](https://twitter.github.io/finagle),
2828
[Cats](http://typelevel.org/cats/), and
2929
[Play](https://www.playframework.com/), to name just a few.
3030

3131
The large user base and the diversity of projects built on Scala mean
32-
that there are many demands on the language and its tool set. There is also a large pool of capable and motivated contributors. The first mission of the Scala center is to consult with
32+
that there are many demands on the language and its tool set. There is also a large pool of capable and motivated contributors. The first mission of the Scala Center is to consult with
3333
the user community, define common goals, and organize contributions
3434
and its own resources to achieve these goals.
3535

@@ -39,7 +39,7 @@ from other languages and requires some conscious investment in
3939
learning the language to reap most of it benefits. Learning Scala, if
4040
done right, is much more than just internalizing syntax. It usually
4141
deeply affects the way developers think about their activity. We have
42-
pioneered open online education, with more than 400'000 registrations
42+
pioneered open online education, with more than 400,000 registrations
4343
to our MOOCs on Coursera. The Scala Center will take over and enlarge
4444
these efforts, integrating them in a specialization that teaches
4545
functional programming and data analysis using Scala and Spark.
@@ -50,17 +50,17 @@ The Scala Center is a designated unit at EPFL, independent from the
5050
Scala research group (LAMP). Its first two officers are executive director Heather Miller,
5151
and principal engineer Jon Pretty. The Center is funded by EPFL and a group of industrial
5252
members. The initial industrial founding members of the center are:
53-
Goldman Sachs, IBM, Lightbend, Nitro, Verizon. We are keen to
53+
Goldman Sachs, IBM, Lightbend, Nitro, and Verizon. We are keen to
5454
welcome other members in the future.
5555

56-
## Relationship with the Community
56+
## Relationship with the community
5757

5858
The Center aims in helping and complementing existing entities in the
5959
Scala ecosystem. In particular:
6060

6161
Lightbend (formerly Typesafe) will continue to maintain and evolve the
6262
stable Scala distribution. Lightbend is a founding member of the
63-
center and its engineers are looking forward to participate in its
63+
center and its engineers are looking forward to participating in its
6464
projects.
6565

6666
Existing open source projects and platforms will work as before. The
@@ -70,14 +70,16 @@ of projects of common interest, subject to its available resources.
7070

7171
One specific project where it looks like we have enough interest and
7272
pledges of funding is [Scala.js](http://www.scala-js.org/). Scala.js
73-
is developed so far by my lab at EPFL (specifically Sebastien Doeraene
73+
is developed so far by the lab at EPFL (specifically Sébastien Doeraene
7474
and Nicolas Stucki) with the help of outside contributors, including Lightbend.
7575
The Scala Center should be a
7676
logical platform to put this great work on a more stable basis.
7777

78-
## Please Contribute!
78+
## Please contribute!
7979

80-
We are starting out now with a rough direction and expect that most details of the Center’s working will become clearer once we have gained some experience in our activities. For now, we are soliciting the community for help. If you have time or funding to contribute, and would like to work on a project that is useful to the community at large, please join us in the [Scala Center gitter channel](https://gitter.im/scala/center) and get involved!
80+
We are starting out now with a rough direction and expect that most details of the Center’s working will become clearer once we have gained some experience in our activities. For now, we are soliciting the community for help.
81+
82+
If you have time or funding to contribute, and would like to work on a project that is useful to the community at large, please join us in the [Scala Center gitter channel](https://gitter.im/scala/center) and get involved!
8183

8284

8385

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
layout: blog
3+
post-type: blog
4+
by: Felix Mulder
5+
title: Getting into Scaladoc Development
6+
disqus: true
7+
---
8+
9+
Over the past months I've been working on the new Scaladoc - and it's coming
10+
along nicely. Together with
11+
[@heathercmiller](http://twitter.com/heathercmiller) and
12+
[@vladureche](http://twitter.com/vladureche) we've overhauled the overall look
13+
of Scaladoc as well as having added a bunch of useful features - like complete
14+
member search!
15+
16+
With the new Scala Center recently announced, one of the things discussed has
17+
been how to lower the entry barrier on important open source projects. This blog
18+
post aims to do exactly that for Scaladoc. There are a lot of things we want
19+
to do with the docs - and we'd love help! If that piques your interest - read on.
20+
21+
## Scaladoc for 2.12.x ##
22+
The new major version of Scala is scheduled for later this year, and currently
23+
its doc tool generates sites like this one:
24+
25+
![Scala Collections](http://i.imgur.com/TOkD4JF.png)
26+
27+
The new search functionality allows you to not only look for so called
28+
"top-level entities" (`class`, `trait`, `object` and `package`) but members like
29+
methods and even `val` and `var`s. The new search is not at all taxing, on a
30+
big library like the collections - the results are shown almost
31+
instantaneously. Nevertheless, we've got a progress bar showing you something's
32+
actually happening:
33+
34+
![Scala Collections](http://imgur.com/jLxcRpx.png)
35+
36+
## How does Scaladoc work? ##
37+
The Scaladoc tool is quite easy to understand - there are basically three things
38+
that happen once you've specified what you want documented:
39+
40+
1. Scaladoc compiles the sources using the first step of the compiler (the
41+
frontend). This will fill a tree structure known as `Universe` with all the
42+
information about the sources (classes, members, doc string etc).
43+
44+
**See:** [DocFactory.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/DocFactory.scala)
45+
46+
2. Copy all needed assets to out location (i.e. scripts and CSS-files)
47+
48+
**See:** [HtmlFactory.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/HtmlFactory.scala).
49+
50+
3. Traverse the `Universe` tree and for each top-level entity create an
51+
HTML-page using the `Entity` class.
52+
53+
**See:** [Entity.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala)
54+
55+
The bulk of these steps are carried out inside the `HtmlFactory` class in
56+
[HtmlFactory.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/HtmlFactory.scala).
57+
Have a look there for a more complete overview.
58+
59+
## How do I generate the docs? ##
60+
61+
Simple:
62+
63+
$ git clone [email protected]:scala/scala.git && cd scala
64+
$ ant docs # "ant docs.lib" if you just want the standard library
65+
66+
## Where to begin ##
67+
68+
The markup of the entity page is defined in
69+
[Entity.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/page/Entity.scala).
70+
If you're looking to change the HTML that's where you will want to look first.
71+
72+
If you want to add some static asset, remember that `HtmlFactory` needs to copy
73+
it to the destination. So be sure to add your new resource to `libResources` in
74+
[HtmlFactory.scala](https://github.com/scala/scala/blob/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/HtmlFactory.scala).
75+
76+
All the current static assets are located in the
77+
[lib](https://github.com/scala/scala/tree/2.12.x/src/scaladoc/scala/tools/nsc/doc/html/resource/lib) directory.
78+
That's where you'd want to put new things (it is also where `index.js` etc live!)
79+
80+
**How can I see my changes?** You have two options, if you changed the markup -
81+
you'll need to regenerate the docs:
82+
83+
$ ant docs.clean && ant docs
84+
85+
When the changes are to scripts or style sheets I use a small `Makefile` in the
86+
root of the project. This makefile will simply copy the resources to the same location
87+
as the generated docs:
88+
89+
all:
90+
cp src/scaladoc/scala/tools/nsc/doc/html/resource/lib/{index.css,index.js,template.css,template.js,diagrams.css,diagrams.js} build/scaladoc/library/lib/
91+
92+
Regenerating the docs all the time is a pain - if you just want to generate
93+
them for a single file, do this:
94+
95+
$ ant quick.bin
96+
$ build/quick/bin/scaladoc path/to/source/File.scala
97+
98+
Lastly, before you open your pull request - test your changes!
99+
100+
$ ant test.scaladoc
101+
102+
## Where to really begin ##
103+
104+
There's still a lot of things to do before this can be considered release ready.
105+
Here's a laundry list of things we need to do:
106+
107+
* General
108+
- Async all the things! We should be able to parallelize the generation of
109+
the doc pages
110+
- CSS cleanup! There are a lot of things not necessary anymore, these could
111+
simply be deleted
112+
* Mobile, the docs look decent on mobile - but there's still a ton to do!
113+
- Landscape kills some of our layout
114+
- There is no good package overview (list on the right) - ideas welcome!
115+
* Desktop
116+
- Keyboard navigation on entity pages (i.e. between members)
117+
- Better keyboard navigation on search results
118+
- Minor layout issues
119+
- Showing existence of companion `class`/`trait`/`object` (maybe *"You
120+
won't believe who* `Companion object Boolean` *is going home with
121+
tonight!"*)
122+
123+
The full list of ideas and things to do can be found on
124+
[scala-dev](https://github.com/scala/scala-dev/issues/84). Comment on the issue
125+
or reach out to one of us (@felixmulder, @heathermiller, @vladureche) on the
126+
[scala/contributors gitter](https://gitter.im/scala/contributors) if you're
127+
interested in knowing more!

gsoc/2016.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,56 @@ construction.** Ideally, it should point to a compiler project you have written
208208

209209
Supervised by [@sjrd](https://github.com/sjrd/)
210210

211+
### Scala Compiler Plugin for Parser Combinators
212+
213+
Parsing can be found everywhere in computing today: from log analysis to
214+
computer languages. Functional programming offers concise approach to
215+
parser generators development: a parsing grammar for generator is composed
216+
via higher-order functions -- [parser combinators](http://www.cs.nott.ac.uk/~pszgmh/monparsing.pdf).
217+
218+
As a program, parser generator should be programmed easily and work fast.
219+
Popular parser generators in Scala ([Scala Combinator Parsers](https://github.com/scala/scala-parser-combinators),
220+
[parboiled2](http://parboiled2.org), [FastParse](https://github.com/lihaoyi/fastparse ),
221+
[PapaCarlo](http://lakhin.com/projects/papa-carlo/), etc.) can be much faster
222+
or have complications in development.
223+
224+
Scala Combinator Parsers library is most concise. It is implemented as plain
225+
library in Scala. And because of that has few facilities for optimizations.
226+
227+
parboiled2 drops off most of algebraic sanity, and leaves a programmer with
228+
imperative-style parsing and Value Stack. That causes type soundness bugs,
229+
clumsy code that is hard to debug, and bad error reporting. FastParse fixes
230+
most critical issues of parboiled2. But both lacks can’t perform cross-rules
231+
analysis and deep optimisations.
232+
233+
The proposed solution requires users to use SBT build system with external plugin.
234+
Scala compiler plugin should rewrite Scala AST of a parser: compile high-level
235+
concise monadic Scala Combinator Parsers to highly-effective runtime code.
236+
237+
The plugin would be written in Scala. Existing projects written in Scala
238+
are expected. Ideally you should have understanding of compilers in
239+
general and Scala compiler inner parts.
240+
241+
Supervised by [@alexander-myltsev](https://github.com/alexander-myltsev),
242+
[a core contributor to parboiled2 during GSoC'2013](https://github.com/sirthias/parboiled2/commits?author=alexander-myltsev)
243+
and [biological names parser based or parboiled2](https://github.com/GlobalNamesArchitecture/gnparser/commits?author=alexander-myltsev)
244+
writing [notes sometimes in his blog](http://myltsev.com/tags/#parboiled2).
245+
246+
### New XML for Scala
247+
248+
This project is going to be about new platform-independent (i.e. cross-compile to both JVM
249+
and Scala.js) implementation of XML library based on fastparse parser combinators.
250+
251+
- Finish the XML 1.0 parser
252+
- Refine the AST model
253+
- Implement quasiquotes based on the parser and AST model
254+
255+
Original prototype is available at:
256+
257+
[https://github.com/densh/scala-nxml](https://github.com/densh/scala-nxml)
258+
259+
Supervised by [@densh](https://github.com/densh)
260+
211261
## ENSIME project ideas
212262

213263
ENSIME is a JVM process that indexes your dependencies and understands your source code

0 commit comments

Comments
 (0)