Algo- I | 31 Mar 08:48 2015
Picon

For all algorithm enthusiasts

We are building community for algorithm lovers,users and learners.
Please fill the form in the link below and help the community grow
Please share it as much as possible

http://goo.gl/forms/CsfA9BxWa8

fb page: https://www.facebook.com/algorithm.i

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Simon Schäfer | 25 Mar 20:26 2015
Picon

object.getClass is still an error in annotation

scala> object O
defined object O

scala> classOf[O.type]
<console>:9: error: class type required but O.type found
              classOf[O.type]
                       ^

It is broken. Therefore

scala> :paste
// Entering paste mode (ctrl-D to finish)

<at> pickling.directSubclasses(Array(classOf[O1.type]))
sealed abstract class C(val a: Int)
object O1 extends C(1)

// Exiting paste mode, now interpreting.

<console>:7: error: class type required but O1.type found
       <at> pickling.directSubclasses(Array(classOf[O1.type]))
                                                  ^

is also broken. There is another thing broken:

scala> :paste
// Entering paste mode (ctrl-D to finish)

<at> pickling.directSubclasses(Array(O1T))
sealed abstract class C(val a: Int)
object O1 extends C(1)
final val O1T = O1.getClass

// Exiting paste mode, now interpreting.

<console>:7: error: annotation argument needs to be a constant; found: this.O1T
       <at> pickling.directSubclasses(Array(O1T))
                                        ^

One workaround is:

scala> :paste
// Entering paste mode (ctrl-D to finish)

<at> pickling.directSubclasses(Array(classOf[O1]))
sealed abstract class C(val a: Int)
case class O1() extends C(1)

// Exiting paste mode, now interpreting.

defined class C
defined class O1

Not that awesome. Does anyone know another workaround? I don't even ask if anyone has the time to fix these - I don't know - 10 year old bugs (one ticket is https://issues.scala-lang.org/browse/SI-2453).

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

adam kozuch | 22 Mar 11:39 2015
Picon

Continue working on MongoDB dirver for Slick GSOC 2015

Hello,
My name is Adam Kożuch and I am master degree student of IT in University of Gdansk(Poland). I prepared sketch of proposition  for GSOC 2015 and I would like to get some feedback. This is not a final version but still I would like to know what do you think about it. Even if you are not interested in slick it would be grate if you could give me some general advice and point out some mistakes. (proposition in attachment) 
Thank you very much for help,
Adam

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attachment (proposition.pdf): application/pdf, 71 KiB
Simon Adameit | 19 Mar 18:15 2015
Picon

Unexpected productIterator order

Hello,

we noticed some strange behaviour of productIterator in Scala 2.11.5:

case class Data(a: String, b: String, `a-some`: String)
val m = Data("1", "2", "3")
assert(m.productIterator.mkString(", ") == "1, 2, 3")

Result: "1, [3, 2]" did not equal "1, [2, 3]"

"a-some" can be any mangled symbol with an "a" prefix.

Is the order of productIterator on case classes guaranteed to be in parameter order? If so, this seems to be a bug. Can anyone reproduce it?

Regards,
Simon Adameit

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Milap Bhojak | 19 Mar 17:44 2015
Picon

GSOC - Implement other backends for Scaladoc

Hey Christopher,

Milap here from India. I'm pursuing my engineering in last year. I'm into open source since 2 years. I've been a contributor to VideoLAN, OpenStack Foundation and contributing as a managing member of Python Software Foundation. 

I've decided to spend my summer as a participant of Google Summer of code 2015. I've explored various projects from various organizations at the end I've found Implement other backends for Scaladoc project from Scala team. 

I've worked with Sphinx - Python documentation generator. So I'm familiar with plain PDF, single page HTML, multi page HTML things. I would really like to work on this project.

My skills: Python, Django, Scala, Java, angularJS, MongoDB, REST APIs, Google App engine.

Else I can adopt/Learn new things quickly. :) 

Please give me right arrows for this project so I can make it happen.

Thanks. 

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Muhammad Mohsin Khan Niazi | 17 Mar 09:14 2015
Picon

Improving IDE support for scala GSOC 2105

Hi everyone,

I am thinking to improve IDE support for Scala by pointing out improvements (inside code editor) that can help in writing better code. The main idea is inspired by what Resharper does for C# or IntelliJ/Netbeans does for Java 8. Take a simple example where anonymous method can be replaced by lambda expression Idea IDE will point out that this method can written in more concise way.

Similarly resharper points out many instances where single line LINQ can replace many lines of traditional code.

(image source: www.jetbrains.com)

Similarly for Scala we can replace a pattern matching solution: (Example from http://reactive.xploregroup.be/blog/9/Scala-tips:-Improving-the-imperfect-part-1)

val result: Option[String] = person.contactDetails match { case Some(details) => details.address match { case Some(address) => address.street match { case Some(street) => Some(street.capitalize) case _ => None } case _ => None } case _ => None }

with the flat map solution to get more concise code:

val result = person.contactDetails.flatMap { details => details.address.flatMap { address => address.street.map { street => street.capitalize } } }


But this is just the start we can have a look at other IDEs and think of our own ideas to
improve the IDE support for Scala including bug fixes. So what do you guys think of this idea?
Is it suitable for GSOC?

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan Chayat | 15 Mar 23:01 2015
Picon

scalac does not infer super types when implicit for super type exists.

Hi all,

I'm reposting this after posting on scala-internals where it did not get much traction.

It seems that currently when inferring a type T which requires some implicit evidence R[T], 
scalac will start by inferring the most specific T possible, and upon failing to find evidence for that type
it will give up, even if evidence is present for a super type. 

Here's an example from SO (tinyurl.com/hmap-so-question):  


trait R[T] case class A(i: Int) object A { implicit object RA extends R[A] } class B(i: Int) extends A(i) def foo[T](x : T)(implicit ev: R[T]) = 0 println(foo(new B(1))) // infers T as B and fails to find implicit R[B] println(foo(new B(1) : A)) // Works, but undesirable


Another Example  (using spire):


import spire.algebra.AdditiveSemigroup
import spire.implicits._
 
sealed abstract class A(val j: Int)
 
object A {
 
implicit val ev: AdditiveSemigroup[A] = new AdditiveSemigroup[A] {
override def plus(x: A, y: A): A = (x, y) match {
case (B(l), B(r)) => B(l + r)
case _ => C(x.j + y.j)
}
}
 
}
 
case class B(i: Int) extends A(i)
 
case class C(i: Int) extends A(i)
 
B(1) + B(2) // Does not work because no evidence of AdditiveSemigroup[B]
 
(B(1) : A) + (B(2) : A) // Works - each B is also an A



IMO, this seriously undermines usage of subtyping to encode co-products, which is very idiomatic in scala.

I would like to propose the following change to type inference/implicit resolution: 
When trying to infer a type T which appears in some implicit parameter, the compiler should successivelt try inferring supertypes of the type it starts from only failing if it reaches Any without finding suitable implicits.

In my opinion, this should not violate any type system rules, given that all type rules must still be satisfied. I could always add type annotations which make things work - so there is no correctness problem here.  

I understand that this is not a formal enough definition, but my goal here is to start a discussion of this issue.

WDYT?

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tamer Tas | 15 Mar 20:24 2015
Picon

GSOC 2015: Scala Library Build Tool

Hello Everyone, 

I'm a senior year computer engineering student in Turkey. 

I've been using Scala for the past couple of months along with Apache Spark. I enjoyed using Scala since it is a modern language that increases productivity. 
Particularly, the functionality of Scala, scala-test library and SBT tool. In the past I've had a few years of experience with Haskell, so it was a smooth transaction.
SBT plays a big role in productivity. It decreases compilation time, resolves dependencies, sets up necessary libraries. As good as it is, SBT was a bit confusing at first. 
And I can definitely understand how it might be a bit intimidating to newcomers(Even though SBT documentation is excellent). 

I was excited to see a project idea about a new build tool that can be used inside Scala. 
I think Scala as a language can benefit a lot from such a tool. I would be delighted to work on developing it.
I've been researching what could be done to improve SBT and what's necessary for these past days.
I've also been working on a design proof-of-concept as to how this library tool might look, you can find it here(https://github.com/TamerTas/Liberty)
Your feedback would be most appreciated.

I'll submit a proposal to give more details about the library architecture, dependencies, the design and a timeline.
If you have any questions please feel free to ask. 
Looking forward to hear from you.

Tamer Tas 

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Philip Schwarz | 15 Mar 01:06 2015

[scala-language] Understanding Java 8 Lambdas and Streams - Part 1 - λ Calculus, λ Expressions, Syntactic Sugar, 1st Class Functions

Hello everyone,

anyone care to comment on the Scala aspects of my talk? 




Thanks,

Philip Schwarz

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kelum Deshapriya | 14 Mar 20:09 2015
Picon

GSOC-2015 - Implement other backends for Scaladoc

Hi all,

I am Kelum Deshapriya. i am a final year student of Dept of Computer Science and Engineering at University of Moratuwa. i had done last summer gsoc project with The Eclipse Foundation GeoTrellis project which has implemented using scala. also i have done last year "functional programming with Scala" coursera.org course. i am very excited about scala programming language. also i have good knowledge of scala. I like to work on project Backends for Scaladoc in this summer. can some one give me guide to start working on this project?

Thanks,
Kelum Deshapriya,
Undergraduate,
Dept Computer Science and Engineering,
Faculty of Engineering,
University of Moratuwa,
Sri Lanka.

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
László Mérő | 14 Mar 19:21 2015
Picon

GSoC2015

Hello!

I am 2nd year IT student at Budapest University of Technology and Economics and I would like to participate in GSoC this year. I am also a Scala fan, so I'm eager to help the Scala community. I have a good experience with Scala, I use it since 2011. I have some smaller projects on github. I would like to ask some questions about the project ideas, so I can choose which one to propose to. I also have an own idea to propose.

Library-style build tool
If I understand well this library should help you to write a simple Scala application that can compile a Scala project. So compiling a project from code would look like first compiling the application that will compile the full project, and then run the application. The other use I see in this build tool is to be able to compile a project with the REPL. Did I understand the job well?

ScalaMeter extensions
This project would be interesting because I could learn a lot about benchmarking. My question is that is it a problem that I know little about benchmarking and profiling?

Improved Scala scripts
This is my own idea.  I want to improve the usability of Scala as a scripting language. The main limiting factors are as I see right now the long time it take to bootstrap the JVM for the REPL and the compilation time. I would like to write a program that keeps the REPL alive and when I execute a scala script from bash it runs the script. To improve the compilation time the REPL should cache compiled scripts. 

I would much appreciate some comments on these project ideas, and on whether I should develop them more. I'm looking forward to your answer.

Best regards,
László Mérő 

--
You received this message because you are subscribed to the Google Groups "scala-language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-language+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane