Scala is a general purpose programming language principally targeting the Java Virtual Machine. Designed to express common programming patterns in a concise, elegant, and type-safe way, it fuses both imperative and functional programming styles.
3
votes
1answer
60 views
Apache log4j in play framework
I have converted this code from Java to Scala, and I need reviews. This works fine, but I am sure that something is wrong with this coding pattern.
...
2
votes
1answer
44 views
Testing Promises vs Lock performance
I'm not sure if my lock usage is correct and safe. I wanted to know what will be best approach to deal with situation when one thread have to wait for being initialized by another so I written this ...
1
vote
1answer
73 views
Converting object oriented style code to functional in Scala
I came across Java like Scala code that I am trying to refactor to make it functional and immutable. The first obvious flaw is that it's violating thread safety by using mutable public class level ...
4
votes
0answers
44 views
Scala heap implementation
I'm Scala beginner, so if anyone would be so kind and give some feedback.
...
4
votes
0answers
68 views
Binary Search Tree Monad Implementation
I've written a Binary Search Tree Monad in Scala. I would like to hear your thoughts on how to improve it (e.g. making insertion/deletion/search faster and more scalable). Also, is there a better way ...
4
votes
0answers
39 views
Neatly Transforming Anorm ResultSet Into Map[Parent , (Set[Child1], Set[Child2]))]
I have a table Bill containing Bills with 0...n relationships to Material and ...
3
votes
0answers
34 views
Custom Scala implementation of generic Future.sequence
I'm trying to make sure I understand how to write clean and robust idiomatic Scala, so I wrote a custom generic implementation sequence of type ...
2
votes
0answers
56 views
Slick database throttling trait based on the Playframework Slick plugin
I implemented a throttled database service trait for wrapping my service code in a future, supplying a slick session and throttling the # of requests in accordance to the length of the thread pool ...
2
votes
0answers
447 views
How to configure JMS Component in akka-camel?
I'm trying to write JMS Consumer using Akka-Camel.
For now, I'm using FFMQ as JMS server. I want to listen on JMS queue myqueue.
Creating JMS consumer actor is quite straightforward:
...
1
vote
0answers
35 views
VerbalExpressions in Scala
I forked the original implementation of VerbalExpressions in Scala here: https://github.com/pathikrit/ScalaVerbalExpressions
I am looking forward to these things in the code review:
...
1
vote
0answers
142 views
Scalaz state monad exercise
I can't tag this with scalaz and state-monad yet since I don't have sufficient reputation to add tags.
Below is a self imposed exercise and solution to learn Scalaz state monad. How can I ...
1
vote
0answers
179 views
Testing Scala code which depends on objects
I am writing a small oauth2 library for Play! 2.1 scala. As I am still learning I got stuck trying to TDD and ended up writing the code first, then refactoring for testability. By testability I mean ...
1
vote
0answers
160 views
Basic XML template
Currently exploring the play framework, I'm about to replace the proposed templating system, using the powerful XML processing of the Scala library. Here is what I have come with:
...
0
votes
0answers
24 views
Rabbitmq connection creation and reusing in Scala
The below is the code for rabbitmq, which works fine, but needs reviews because I am afraid of the connection keyword.
...
0
votes
0answers
109 views
Scala: Pointillism
I'm relatively new to Scala and tried to copy one of the language examples of Processing: Pointillism. The original image can be retrieved here. I've used the Standard Widget Toolkit for drawing. ...