Profile cover photo
Profile photo
Raymond Tay
355 followers -
Software Developer in Scala, GPU Researcher whose interests are in GPGPU Stochastic Applications
Software Developer in Scala, GPU Researcher whose interests are in GPGPU Stochastic Applications

355 followers
About
Raymond's posts

Pretty happy with the Scala Dsl i build for GPGPUs using second-order array combinators. #scala 

Post has attachment

Post has attachment
Bamboo - A Big Data Analytics Platform
Hi all, it's been a while since i last blogged about stuff and the main reason was that i was busy with putting a team together, getting that team to build a big data platform system. I believe that work is iconic in the respect that no company i'm aware of...

Post has attachment
Today marks the last official day for the public whom poured in the thousands to mourn our founding father, Mr. Lee Kuan Yew.
http://www.channelnewsasia.com/news/singapore/singapore-s-first-prime/1720740.html #RIPLKY

Post has shared content
Learning Concurrent Programming in Scala - a brief review

The preface of the book says “Its goal is to introduce important concurrency abstractions, and at the same time show how they work in real code”. The book is indeed a detailed one with 366 pages discussing concurrency paradigms in Scala. The author has organized the book very carefully, starting with the basics of concurrency and then building advanced materials on top of them. 

Chapter 2 discusses all concurrency primitives on the JVM - processes, threads, monitors and synchronization, atomicity, reordering and the Java Memory Model. Even if you are not very familiar with these concepts, a run through this chapter will serve you good to know the basics. I liked this approach very much.

Chapter 3 builds on top of chapter 2 and teaches you how the bigger building blocks are built on top of the primitives. It discusses topics like the Executor framework, atomic variables, lazy values and concurrent collections. There is a section dedicated to lock free programming where the author discusses CAS based implementations and lock free operations. I think this section could have been a bit more detailed with comparisons of lock free programming and wait free programming or designing a lock free data structure.

Chapter 4 is perhaps the core chapter of the book which discusses the various asynchronous abstractions that Scala standard library offers like Futures, Promises, importance of non blocking operations and the scala async framework. The discussion on Futures and Promises is fairly comprehensive and contains code snippets illustrating the usage of each of them. However the examples shown in this chapter are quite basic ones - may be the book targets a basic learning of the tools (in fact the title of the book also says so). But adding a section for the advanced learners where we develop some interesting combinators that can be used for concurrent composition would have been great.

Chapter 5 discusses parallel collections and chapter 6 details the reactive extensions. Both of these chapters are well written and covers the basics pretty well. In chapter 6 the author discusses reactive programming and event driven programming. The sections on Observables, composing observables and writing custom observables give a very detailed account of the programming model. The reader should benefit from these discussions.

Chapter 7 discusses software transactional memory, though I am not sure how many people use that in Scala. The chapter discusses all the basics of STM as implemented in Scala. But a section on gotchas and pitfalls would have been very useful. In the summary section of this chapter there are a few good references on STM, but the performance issues that are there in the Scala STM needed to be highlighted a bit more.

Chapter 8 is all actors and Akka. Again the author discusses as much as possible to elaborate the features in one chapter. It’s fairly comprehensive as an introduction to the framework.

The core strength of the book is the breadth of topics that it covers. The reader should get an idea of the overall space of concurrency on the JVM in general and Scala in particular. In some parts of the book, the discussion may seem a bit prosaic and mechanical, sometimes you get the feeling that you are reading a text book. In some of the chapters I would have liked to see specific sections dedicated to discussing design patterns and idioms for using the techniques, and also gotchas and pitfalls. But overall the book looks quite comprehensive and is possibly the best reference material out there that touches upon so many topics of concurrency on the JVM. 

Post has shared content
Don Stewart is giving a talk on FP in Google; you should go listen if you are in that area
Giving a Google tech talk next week in London about Haskell and software engineering. Exciting to talk about FP at Google!
Photo

Haskell is quite fun once you get the hang of it. Lots of code reusability.

Post has attachment
When learning Haskell, mastery of typeclasses was really necessary if you wish to be a craftsman and i did this article from FPComplete really helpful.
https://www.fpcomplete.com/school/starting-with-haskell/introduction-to-haskell/5-type-classes

Post has attachment

Post has shared content
Echoing James's message and i hope you do the same as well, for obvious reasons. Flight travel safety needs to be re-examined with much urgency.
How can we help? The airline industry refuses to get together to put tracking electronics aboard all aircraft. The regulatory agencies sit on their hands, refusing to do anything that might cost the airlines any money. The only reason the latest missing aircraft was found at all is that it went down in a sea only 46 meters deep. The Java Sea is one of the shallowest in the world. We've all got to stand up and protest to the airlines. I emailed United, American and Southwest and I'm following up with hard copy. You do the same. The families of people aboard missing aircraft deserve better. We all do!
Photo
Wait while more posts are being loaded