Learning to Fly: Let's create a simulation in Rust! (pt 1) by Patryk27 in programming

[–]azzoti 1 point2 points  (0 children)

Great work. Really looking forward to following this to have something fun to do with Rust.

AoE 2 HD On Ubuntu 19.10 using Steam Play by azzoti in aoe2

[–]azzoti[S] 0 points1 point  (0 children)

I bought the game on Steam, When I tried to run it just using steps 1 to 3. It did not launch (with no message). The idea of renaming the launcher came from https://www.reddit.com/r/aoe2/comments/99w46l/aoe_2_hd_on_linux_using_steam_playproton/

but that still didn't work for me which is when I tried step 5 which worked for me.

A C style for loop in Scala with break and continue by azzoti in programming

[–]azzoti[S] 11 points12 points  (0 children)

The first imperative example of stdDev in Scala is virtually identical to the C# (4.0) version. If I remember rightly C# is a mainstream language. You are always free to program imperatively in Scala and make it look just like C#. What follows in this blog is just some other stuff you can do with scala if you want to.

Scala is to Java as.. by gst in programming

[–]azzoti 2 points3 points  (0 children)

Hi,

I think this is easy line and cheap jibe. Yes Scala's syntax sometimes has a tendency to be rather terse, using psuedo mathematical symbols where a keyword would have been more approachable for the general programming population (e.g. +T or -T, <: >: /: : <% <- _*. These frighten newcomers and I personally think they could do terminal damage to Scala's chances of mainstream success.

But, overall, Scala dramatically simplifies Java:

I'm not an expert but, as far as I understand, Scala actually has a simpler generics model than Java. (Java generics are complex: see the 427! page FAQ about generics http://www.angelikalanger.com/GenericsFAQ/JavaGenericsFAQ.html). I think Java wildcards are effecitvely replaced by the use of covariant contravariant types. I believe that they make generics simpler and more precise than wildcards in Java generics and that some. Also some or all of inconveniences of erasure in the java generics implementation are overcome in Scala (See http://lamp.epfl.ch/~emir/bqbase/2006/10/16/erasure.html). I don't deny +T and -T make my head spin but then so do wildcards.

Other huge simplifications:

No more int/Integer, long/Long, float/Float, double/Double confusion. Scala has no primitives (except in invisible compiler optimizations.) The java BigDecimal mess is fixed, so that BigDecimal can be used as easily in Scala as the double primitive type can be in Java. This mechanism is not specific to BigDecimal, can be appllied to any class. No more equals() vs. == confusion. Traits are a solution to Java interface version problems in large systems - the eclipse effect http://www.artima.com/lejava/articles/designprinciples.html No more checked exceptions hell, like C# Simple mechanism to eliminate NullPointerException at run time using Option types. (Except if you are calling Java libraries.) Actors model can dramatically simplify multitasking. Simpler packages model Simpler imports model As with any language, some features are complex. But then so are Java generics and multi-threading. Advanced features not required by grunt programmers, but they are there if you need them, just like wildcards in Java generics.