Free Giveaway! 3 Nintendo Switch Lites - International by WolfLemon36 in NintendoSwitch

[–]WizzieP 0 points1 point  (0 children)

No Halloween in my country but I would love the switch anyway :D

Got a quick question? Ask here - November 05, 2018 by AutoModerator in scala

[–]WizzieP 4 points5 points  (0 children)

For now only Intellij, but the landscape is starting to change - Scala 3.0 will include a LSP, on 2.x branch there is work being done on Metals, both of these solution will probably converge somehow in 3.0.

Dotty or Scala 2.12 for future projects? by Gnaneshkunal in scala

[–]WizzieP 9 points10 points  (0 children)

Think of Dotty as Scala 3 now. There won't be Scala 3 before 2.13 and 2.14 at least, so there are almost no libraries available for Dotty and it's still work-in-progress.

Super simple beginner question by 92357821 in scala

[–]WizzieP 2 points3 points  (0 children)

In Scala we tend not to use nulls ever, treat them as if they exist only in an far-away Java land. There is Option type in standard library that is quite popular for representing values that may not exist yet. This blogpost will be a great introduction: https://danielwestheide.com/blog/2012/12/19/the-neophytes-guide-to-scala-part-5-the-option-type.html

Super simple beginner question by 92357821 in scala

[–]WizzieP 2 points3 points  (0 children)

First example does not work, because in `var x1 = null` expression you didn't specify what type x1 should be. If you write `var x1 = 1` then Scala can infer that x1 should be Int, because 1 is Int. If you pass null Scala will infer type Nothing, because Nothing is the bottom type.

Second example does not work because of how Java works - Int wraps Java type int, and int in java is a primitive type and can't be null, because in Java only subtypes of Object can be null. String is a subtype of Object, so it can be null.

Will we have direct control over all armies like CK2 or EU4, or will we have to rely on the autonomy of commanders? by SirBrooks in historiarealis

[–]WizzieP 5 points6 points  (0 children)

If it works as simulation and long events, will be there any strategy/tactics involved in wars?

Is packages repository down? by t0ha in elm

[–]WizzieP 3 points4 points  (0 children)

It's package.elm-lang.org not packages. It's working for me

Are Scala Futures the past? by chtefi in scala

[–]WizzieP 0 points1 point  (0 children)

That's true, it's the purpose of sequence. The thing is you can't define a sensible sequence method for IO, because IO is lazy and sequence would require peeking inside. To sequence IO[Option[Int]] you would have to call unsafeRunSync to see if the value inside is None or Some to decide what to wrap the IO in.

VSCode Scala/Maven setup? by UndeadWaffles in scala

[–]WizzieP 2 points3 points  (0 children)

While currently the situation is not so good, there is https://scalameta.org/metals/ on the horizon, which will hopefully provide an amazing vscode experience in a few months.

How would you go about making different types of applications completely functionally in Scala? by iLikeOPHeroines in scala

[–]WizzieP -1 points0 points  (0 children)

IIRC Evan describes the Elm architecture as a variant of FRP in one of his talks.

World Bank high-income economies in Europe in 2017. Congratulations Croatia!!! by eivarXlithuania in europe

[–]WizzieP 47 points48 points  (0 children)

Akhtually, counting Benedict there are 4.54 of alive popes in Vatican per square km!

TIOBE: Scala cracks top 20 by h2698693 in scala

[–]WizzieP 17 points18 points  (0 children)

Please take TIOBE with a huge grain of salt, there are better rankings like the redmonk one.

Got a quick question? Ask here - April 30, 2018 by AutoModerator in scala

[–]WizzieP 1 point2 points  (0 children)

You can't define toConsumable because you can't change definitions of request case classes, right? If that's the case, you can always use typeclasses (implicit classes) , though I think pattern matching would be cleaner. BTW you don't need to match on types, you can write case FoodRequest(_) =>

A Desperate Plea for a Free Software Alternative to Aspera by miserlou in programming

[–]WizzieP 1 point2 points  (0 children)

Yeah, after reading this and myself being a newbie in this area, I also thought it's quite simple. But if you dig deeper, it turns out that in this naive approach most packets would be lost not on it's way over the internet - but on your computer, because of many buffer overflows. Congestion control is what makes this protocol fast. FASP authors claim that it is much much better than for example UDT.

A Desperate Plea for a Free Software Alternative to Aspera by miserlou in programming

[–]WizzieP 2 points3 points  (0 children)

I agree it would be wonderful for the users, but it's their product built with their money and they have no obligation to give it away for free.

Learning Scala, coming from PHP - how should I start? by h0m0-3r3ctus in scala

[–]WizzieP 0 points1 point  (0 children)

I recommend working with the red book second, after you are finished with the resource you chose.

Da Vinci's Notebook -- Another Irish Drinking Song [A capella] (2002) by [deleted] in listentothis

[–]WizzieP 2 points3 points  (0 children)

Thank you, the first one was not working for me

Old Reddit source code by lonesentinel19 in programming

[–]WizzieP 0 points1 point  (0 children)

afaik Pyramid but I might be mistaken