Typesafe raises $14M to commercialize Scala
techcrunch.com
techcrunch.com
It's interesting to watch hybrid open-source/commercial enterprises develop. Getting the revenue stream right is tricky. I could really see the Typesafe Console growing to offer a whole host of monitoring around distributed computing. If Typesafe provided a wrapper around Hadoop that would be a welcome addition.
http://gigaom.com/cloud/typesafe-gets-14m-to-push-scala-as-a...
And there's the Typsafe blog from the source:
That said, I write Scala at my current job and am super excited that Typesafe got this funding. Please, Typesafe, follow Rich's lead. Make a real product backed by a technology, not a bunch of libraries! I want you to be around for years to come.
p.s. we're hiring. You don't even have to be super smart, just be passionate. owreese AT gmail DOT com
Make a real product backed by a technology
Correct me if I'm wrong, but I believe that they tried that with "Cloud Akka". I do not know the details as to why, but I believe that tech is now open source.That's definitely one reason. I'm willing to bet the other reason is that he believes that the world needs Datomic. Because it really, really does. His talks make it clear that he deeply understands that.
My number one rule for infrastructure software: never, ever build your business on closed source software. Doesn't matter if it's free, or costs tens of thousands of dollars per month to operate, or is written by a superhuman like developer. You will be hurt Every. Single. Time. if you do.
No, the world needs a modernized view of the relational database model.
> an obscure language
The APIs are Java-first, Clojure-second. The implementation is a mix of the two. Java isn't that obscure...
> never, ever build your business on closed source software.
I agree with that. Ask any one of my new coworkers how they feel about this company's dependency on Oracle and they'll tell you that they learned that lesson.
I'm not proposing that you take a dependency on Datomic for your startup. I'm saying that there are a lot of enterprises who have no choice, but to take dependencies on things they don't understand because they aren't software companies. Microsoft's entire enterprise business depends on people who want to outsource infrastructure to somebody else, and those customers pay enough money to secure the future and direction of that infrastructure. Rich Hickey & co can capitalize on that group of people. He gets to help them and they'll pay him for it. Along the way, database systems will adopt the improvements and new ideas that Datomic is leading the way with.
http://freegeek.in/blog/2011/06/10-clojure-one-liners/
Tell me that is not Perl all over again.
The Perl one-liners that actually resemble line-noise get far more done than any of the examples given above. Perl one-liners that do the same as the above examples are actually quite legible.
use List::Util qw(sum max min);
# 1
map { $_ * 2 } 1..10;
# 2
sum 1..1000;
# 3
my @wordlist = ("scala", "akka", "play framework", "sbt", "typesafe");
my $tweet = "This is an example tweet talking about scala and sbt.";
grep { $tweet =~ m/\b$_\b/ } @wordlist;
# 4
my $file_text = do { local $/ = undef; open my $fh, '<', 'data.txt'; <$fh> };
chomp( my @file_lines = do { open my $fh, '<', 'data.txt'; <$fh> } );
# 5
say "Happy Birthday " . ($_ == 3 ? "dear Barry" : "to You") for 1..4;
# 6
my ($passed, $failed) = do {
my @p; \@p, [map { $_ > 60 ? push(@p, $_) && () : $_ } (49,58,76,82,88,90)]
};
# 8
min(14, 35, -7, 46, 98);
max(14, 35, -7, 46, 98); my $file_text = do { local $/ = undef; open my $fh, '<', 'data.txt'; <$fh> };
I have absolutely no idea what this line does. local? undef? '<'?, <$fh>? This is how you read a file in Perl?Nope. I use Path::Class from CPAN...
use Path::Class 'file';
my $file_text = file('data.txt')->slurp;If you don't know Perl, why should you expect to? I didn't know that #(...) represented a lambda in Scala until a moment ago.
Yes, lots of tutorials explain it badly, and yes, lots of people say "Why should a programming language take cues from natural language?", but implicit variables and context are concepts that primary school children have mastered. They're not that difficult.
Seriously, in what other language don't you ever finish discovering what's on the default namespace, what side-effects any given statement, or hell, expression has, or which syntactic forms are supported, and on and on?
Well, PHP, but we know what the connotations of that are.
And by the way, I'm doing rather 'fine' in Perl, if not for the ever-present worrying about type mismatches (particularly arrays), the frustration of how dirty many operations are (unless you are using a recent version, regex substitution must mutate a variable), the laboriousness of the stock error handling mechanisms (make your own stack trace!) and so on.
Those are neither line-noise, nor fickle one-line imperative solutions.
On the contrary, they are elegant and easy to read --you just have to understand the basics of functional programming, map, reduce, filter and the like (which, in themselves are trivial concepts).
Stuff like those in the article:
(pmap process-line lines)
(dotimes [n 4] (println "Happy Birthday " (if (= n 2) "dear Rich" "to You")))
(reduce max [14 35 -7 46 98])
(def file-text (slurp "data.txt"))
(partition-by #(> % 60) [49 58 76 82 88 90])
(clojure.xml/parse "http://search.twitter.com/search.atom?&q=clojure)
are so easy and clutter-free that what I cannot even begin to comprehend how someone would accuse them of the bad readability that characterises the "Perl one-liner".
(partition-by #(> % 60) [49 58 76 82 88 90])
to so-called line noise code seems reasonable enough. As with Perl, if you immediately know what all the punctuation means and what the underlying structure of the language is, it’s concise, but if you don’t, it’s quite a mess of random-looking symbols.For comparison, here’s a Haskell version, which in this case has a more intuitive syntax, IMHO:
filter (>60) [49, 58, 76, 82, 88, 90]
And here’s a version in Scala, with a more explicit function value: List(49, 58, 76, 82, 88, 90).filter(n => n > 60)The Haskell version doesn't actually do the same thing. The Haskell returns [76, 82, 88, 90]; the Clojure returns ((49 58) (76 82 88 90))---it groups the input according to the result of the function, it doesn't just filter it.
In any case, my point here was about syntax, so I used a standard and easily recognisable function in the other languages instead of getting bogged down in trying to reproduce the exact same behaviour. Apologies if this wasn’t clear.
Yeah, a less noisy way to do it in Clojure would be
(partition-by (partial < 60) [49 58 76 82 88 90])
in Perl:
grep { $_ > 60 } ( 49, 58, 76, 82, 88, 90)
Sorry, hate is such a strong word.
I mean that I still find the language's typographic irregularities hopelessly distracting to the point where I won't touch it with a bargepole.
They compare to perl one liners more than they do to Lisp one-liners due to their greater syntactic cruft.
FYI, the square brackets are not an arbitrary deviation from lisp syntax. Square brackets are Clojure's vector syntax, the use of square brackets in function and macro definitions reflects the fact that they are actually vectors.
Not sure what you meant with your objection to slashes though.
a) already is using Scala
b) already is using Akka, and
c) wanted a monitoring tool for both (which is part of the "Typespace Stack")
and contacted Typesafe about their subscription, I can tell you that none of this matters for people on HN, product-wise. Their "console" is an obscene amount of money per node per year. Yes, PER NODE.
With just a few nodes, it's literally cheaper to just build it yourself, even if you had to hire a Scala contractor to do it.
So forget scaling linearly up with Typesafe's actual product – you can't afford it.
That said, Scala and Akka are awesome and at least they'll continue to be developed for awhile now.
Play! 2 is cool as well, but being limited to one Play! app per JVM is something we couldn't live with, so we've moved on to Socco.
There would be teams that could have used it and thrived but overall the complexity of the language seemed to outweigh any reasons I could give to use it.
I wish them the best but I think they will have a hard time getting Scala into the enterprise. For smaller companies it probably would make sense.
Ah well not trying to be a downer. :)
Before you answer question about whether Scala is complex, try to answer the following questions first:
Is JEE complex? Is Spring Framework complex? Is Maven complex? Are webservices complex? Is C# complex?
They are, they introduce new concepts and in many ways they have much more rough edges than Scala (remember JEE 2.1?). Somehow all of them have been widely used in enterprise software development in many successful projects.
I'm surprised by how much flexibility Scala offers with so few simple concepts. Ok, you have to take some time to learn them. But this is the same as learning just any new API.
It seems to me that the JVM community has moved on from Scala and is actively looking for a language that offers most of the benefits that Scala offers without the downsides.
Kotlin (from JetBrains) and Ceylon (from RedHat) seem to be the first two languages with a really interesting take on this problem. Gosu and Fantom are similar attempts, although I think these two already failed to gain traction.
On the other hand, for programmers doing some more serious stuff than just moving data from database to the website, they offer too little to be attractive, and they actually haven't solved any problem that Scala hasn't solved (Ceylon's generics reification - a good joke, man). They are nowhere near Scala in expressiveness and flexibility and being only slightly better than Java is not enough for power-coders. There were some languages targeted as "better Java", e.g. Nice long time ago and they also failed.
From the alternative languages for JVM, currently only Clojure and Scala (and probably Groovy too) got some serious usage in industry. All others are still in kindergarden.
Now I might be mistaken, but Scala is one of rare languages that actually has compiler commands that disable parts of it syntax (or there was a plan to do so). To me that yells - Too complex. I'm quite sure it is powerful. But it doesn't look like something I'd enjoy using.
My main gripes about Scala is that the trait system is way less elegant than the Smalltalk variant [1], there seems to be a hundred different ways to do a thing (as opposed to a more unified way of doing things) and the overall "automagical" implicit. Not to mention the overall verbosity and ways the different features mesh together.
[1]http://www.cs.cmu.edu/~aldrich/courses/819/Scha03aTraits.pdf
As for verbosity: I coded a lot in Python, in Perl and then in Scala, and found Scala code to be sometimes even shorter. Note Scala is statically typed, it is harder for statically typed language to be terse. It does pretty well in this area, for a statically typed language.
As for doing things in different ways: in Python they say there should be one obvious way to do it. But it really isn't. Lots of things in Python could be done in different ways. This is inherent to programming, and it is a good thing, making programming more art than craft.
Say, I have a group of developers who have been trained to use Java (both best-practices, idioms, tools, etc).
Let's say that JEE 6 shows up (no, I don't remember JEE 2.1, what is that? is that thing even exist?).
JEE 5/6 introduces a few things on top of my head (please pardon me of the syntaxes):
1) Dependency Injection via annotation (CDI in JEE6, EntityManager in JEE5)
Introduction: annotate the instance property you'd like to inject and GlassFish will magically give the class to you.
Example:
@Inject
AccountService accountService;
2) JAX-RS
Introduction: A class, that works like servlet, but without doGet() or doPost(), instead you have methods that maps to the request-path based on the annotation.
Example:
@Path("/account/{id}")
public Account get(@PathParam("id") final long id)
3) Transaction (in EJB3 which appears in JEE5)
Introduction: Sprinkle annotation in your class or method, you get transaction magically.
Example:
@TransactionAttribute(REQUIRED)
public class AccountRepository
or
@TransactionAttribute(REQUIRED)
public Account updateAccount(final Account toUpdate) {...}
So I'm not sure how complex all of these to grok, granted if you need to do something out of the ballpark, you may have to learn a bit more of each individual component but to get started and be productive seems quite easy for me.
Now let's compare that with picking up Scala from zero (given that you know Java already) and get comfortable and productive with Scala, its tools, and its libraries to build web-application with the similar setting of that in JEE (web-service, REST, persistence/db/orm/transaction layer, unit-test, integration-test, etc).
No cheating though: no calling/utilizing JEE. Has to use all-things Scala libraries.
It is so easy only if you don't try to write some serious production level stuff using it. You must be insane to start a project in JEE knowing only some basic tutorials and without deep understanding how the full stack works. I worked for a company that do JEE trainings. It was near impossible to teach a team using full JEE stack in 5 days (7 hour / day) - no, actually each single component is like 1-2 days of training, given that everything is preconfigured and ready to go. And after training they usually ask for consulting, because they still have some technical problems with it.
This is similar to Scala. You have to probably have someone on the team with deep understanding, but most of the coders just need to know how to do basic things in it.
We used Scala for a project in the company, and the only concern then was poor tooling (that was 2 years ago - it is much much better now), not the language itself. Most programmers just jumped right into it as a Java with slightly simplified syntax - "oh, I don't need to know when to use Integer and int, cool!".
// Errata: I meant EJB 2.1, not JEE 2.1, sorry for the mistake.
Had two production issues in a year and they are all JPA.
From all of the modules, JPA seems to be the more complex piece of the puzzle with EJB/JMS probably trailing. (Granted we did not have to use JMS yet).
While I do understand your side of the story (you may be aiming for JEE full-stack from JSP, JSF, Servlet, JPA, EJB and tons of its quirk, JMS, transaction, etc), if you focus to the essential: JEE 6 web-profile, it is much easier compare to starting with Scala from zero to knowing best-practices and idioms of the language.
BTW: on the last training in databases I led we used Scala as a language in which some sample programs were created. The group was not specifically prepared for that. Actually they were even not all Java developers. They had no problems in understanding Scala code and modifying it for the purpose of the excercises.
Really, the "unsuitability" of Scala for the enterprise says as much about the common problems with enterprise development (What, expect developers to learn something new?) as it does about Scala.
I say that as someone who currently does C# work in an enterprise environment in which there is a ban on using "var" to declare variables with type inference.
Apparently
Dictionary<string,List<string>> dictionary = new Dictionary<string,List<string>>();
makes it really clear what the variable type is, but var dictionary = new Dictionary<string,List<string>>();
makes people's brains hurt.Sigh.
Scala is just a large leap from Java. It just is. I thought it was ok but the reality was it would hurt productivity. I would say the same thing about Clojure. I like clojure a lot but it would be hard to recommend to a large established biz.
Scala is really very easy to start for someone who knows mainstream languages like C++ or Java or C# - you just start writing in it like in a better Java, then slowly learn new concepts... For me it took two weeks to feel comfortable with it. Actually much faster than with Python.
You can contrast with Groovy which while still not perfect, has an awesome eclipse plugin and SpringSource offers a whole customised eclipse version for working with their stuff.
When you give developers a new set of tools they are inevitably going to use them. Some will understand and use them well. The overwhelming majority won't. And in an enterprise environment where you have a higher turnover of developers and tight deadlines it will be the equivalent of a ticking time bomb.
And because the framework is centered around Play which has/had a good reputation it won't invoke that suspicious, foreign language feeling in developers that it probably should.
I very much suspect that the future of Scala is going to rest in the hands of Guillaume Bort's ability to wrap any of the nastiness.
The "foreign language feeling" is a good thing in a developer? Who would have thought...
Talk about narrow horizons...
Reminds me of the Blues Brothers joke: "We play both kinds of music at this bar, country AND western".
So, TechCrunch, is Akka a programming language or a middleware framework? High-quality reporting as usual from TC.
You can have 100% type safety in a straight jacket, but scala pushes what it tries to type check to an extreme limit; "safe" but then also not as conservative as Haskell or ML. I see scala as the c++ of statically typed languages, filling that niche where you need more from your managed language and are willing to take a leap, but this is controversial and a personal opinion.
We are glad you got funded and wish you all the best
Signed: Oracle's legal department
(Not to imply I'm condoning Oracle's attempted legal smashing of Dalvik)
Oracle could change their mind at any time. Some people at Sun appeared to be Ok with Android and sometimes even encouraged it.
http://en.wikipedia.org/wiki/List_of_JVM_languages
http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-1.htm...
Congratulations! Now, please do something about your language's godawful syntax and semantics.
Signed: a frustrated Lisp programmer.
thanks for the laugh :)