I've been thinking about the best approach to implement pure function verification in the Scala compiler. An approach similar to the one in D would fit a lot better than the one used in Haskell (which would break all existing code and cause some problems due to strict evaluation). A solution using annotations would be quite simple to implement:
FACTORIE is a toolkit for deployable probabilistic modeling, implemented as a software library in Scala. It provides its users with a succinct language for creating relational factor graphs, estimating parameters and performing inference.
Here at Sumo Logic we write a lot of Scala code. We also have a lot of data, so some of our code has to go really, really fast. While Scala allows us to write correct, clear code quickly, it can be challenging to ensure that you are getting the best performance possible.
This article explores some of Java 8’s new features, using both Java’s proposed syntax and Scala. We cover lambda expressions, higher-order functions, parallel collections and virtual extension methods aka traits. Besides this, we will provide insights into the new paradigms integrated in Java 8, such as functional programming.
Spark is a fast, in-memory cluster computing framework with a language-integrated interface in Scala. It shines at iterative MapReduce (e.g. machine learning) and interactive data mining, where keeping data in memory provides substantial speedups.
He CC'ed Martin Odersky, the lead designer of Scala and Typesafe’s Chief Architect. Given that the two people best-situated to improve Scala had just asked me about my experience over the past two years of using Scala, I wrote a long, considered, brutally honest response.
Typesafe provides an easy-to-use packaging of the Scala programming language, Akka middleware, and developer tools via the open source Typesafe Stack, as well as commercial support and maintenance via the Typesafe Subscription. Typesafe also provides training and consulting services to accelerate the commercial adoption of Scala and Akka.
Apache ESME (Enterprise Social Messaging Environment) is a secure and highly scalable microsharing and micromessaging platform that allows people to discover and meet one another and get controlled access to other sources of information.
You can hardly turn a web page these days without seeing a story that describes how people are using social networks, whether it is Twitter, Facebook or some other service to develop and build their personal communities.
When solving problems, how useful might it be if a user was able to tap into the collective knowledge of her peers or surrounding groups of people with whom she might naturally network in the workplace setting? How much quicker and with greater precision might she be able to solve daily problems? What if there was a communications mechanism that takes the best of what services like Twitter offers and co-mingled that with readily recognizable business processes? That solution is Apache ESME.
The Manifests. A Manifest is class whose instances are objects representing types. Since these instances are objects, you can pass them around, store them, and generally call methods on them. With the support of implicit parameters, it becomes a very powerful tool
With the advent of multi-core processors concurrent programming is becoming indispensable. Scala's primary concurrency construct is actors. Actors are basically concurrent processes that communicate by exchanging messages. Actors can also be seen as a form of active objects where invoking a method corresponds to sending a message. The Scala Actors library provides both asynchronous and synchronous message sends (the latter are implemented by exchanging several asynchronous messages). Moreover, actors may communicate using futures where requests are handled asynchronously, but return a representation (the future) that allows to await the reply. This tutorial is mainly designed as a walk-through of several complete example programs Our first example consists of two actors that exchange a bunch of messages and then terminate. The first actor sends "ping" messages to the second actor, which in turn sends "pong" messages back (for each received "ping" message one "pong" message).
All of these samples perform essentially the same task: traverse an array of strings and print each value to stdout. Of course, the C++ example is actually using a vector rather than an array due to the evil nature of C/C++ arrays, but it comes to the same thing. Passing over the differences in syntax between these four languages, what really stands out are the different ways in which the task is performed. C++ and Java are both using iterators, while Ruby and Scala are making use of higher order functions. Ruby and C++ both use lowercase variables separated by underscores, while Java and Scala share the camelCase convention. This is a bit of a trivial example, but it does open the door to a much more interesting discussion: what are these idioms in Scala’s case? Scala is a very new language which has yet to see truly wide-spread adoption. More than that, Scala is fundamentally different from what has come before.
That should be it. You now be able to boot up you Lift app, launch the Flex app, click the “Subscribe to ‘notifications’” to start the Notifier Actor and subscribe to the Consumer to the notifications destination. You should then see id number and the time in the text input field get automatically updated every 0.5 seconds. You can the click the “Unsubscribe from ‘notifications’” to stop the Notifier actor and the Consumer to unsubscribe from the notifications destination. Pretty exciting. With these three technologies it’s really easy to automatically push data from the server to the client in real time. This is obviously a trivial example, but I think it should be relatively straight forward to scale this approach up for more sophisticated apps.
Once you start thinking about structuring your code to use Option in languages which have built-in support for it, you’ll find yourself dreaming about such patterns in other, less fortunate languages. It’s really sort of bizarre how much this little device can open your mind to new possibilities. Take my code, and give it a try in your project. Better yet, implement something on your own which solves the problem more elegantly! The stodgy old Java “best practices” could use a little fresh air. P.S. Yes, I know that the original implementation of this was actually the Maybe monad in Haskell. I picked Option instead mainly because a) I like the name better, and b) it’s Scala, so it’s far more approachable than Haskell.
For some reason, I suddenly felt like playing around with Scala for a couple of days, and having gotten over my perceived difficulty of the language vs Groovy, and after actually trying to write something in it - I really like it :) At first glance, advanced functional programming in Scala can look a little freaky to someone who’s only been writing Java for the last few years. But if you start slowly, it all slides into place. I started to get into it by reading this is a really good series of articles introducing the language What follows are two examples of Scala. The first, LoveGame is a demonstration of programming a simple algorithm in Scala along with a little comarpison with Java. The second is a little toying around i did with Scala to create a front end for JScience with the “Pimp my library” pattern.
M. Steindorfer, and J. Vinju. Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, page 783--800. New York, NY, USA, ACM, (2015)
M. Odersky, and A. Moors. IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, volume 4 of Leibniz International Proceedings in Informatics (LIPIcs), page 427--451. Dagstuhl, Germany, Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, (2009)
V. Ureche, C. Talau, and M. Odersky. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 73--92. ACM, (2013)
A. Sewe, M. Mezini, A. Sarimbekov, and W. Binder. Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, page 657--676. ACM, (2011)
Y. Hayduk, A. Sobe, and P. Felber. Distributed Applications and Interoperable Systems, volume 9038 of Lecture Notes in Computer Science, Springer, (2015)