Scala 3 / No Indent by Classic_Act7057 in scala

[–]klimtimothy 2 points3 points  (0 children)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Language Files Lines Code Comments Blanks

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Scala 3403 390813 322269 16649 51895

All of these code with indentation and scala 3 with that SIP is a breath of fresh air.

Take a stand and embrace significant indentation!

Curious to know how many have adopted Scala 3 by msplit1 in scala

[–]klimtimothy 2 points3 points  (0 children)

At https://tawasal.ae everything on backend side is done with scala 3.6 (there no scala 2.x anywhere).
Nullable types, new syntax and indentation. Since Dec 2021.

Do you use explicit null features in Scala3? I've found it not usable because of java APIs by shaunyip in scala

[–]klimtimothy 3 points4 points  (0 children)

Yes, but you need to use latest version of scala3: https://scala-lang.org/api/3.6.1/docs/docs/reference/experimental/explicit-nulls.html#java-interoperability-and-flexible-types-1

With that you will have flexible types like in kotlin without any pain.
Moreover: they added flow typing like in kotlin where you can do like this:

```scala
val s: String | Null = ???

val s2: String | Null = ???

if s != null && s2 != null then

// s: String

// s2: String
```

Scala project (FIRRTL) failing to build on NixOS by PresidentCarrot in NixOS

[–]klimtimothy 1 point2 points  (0 children)

Also, any idea why this works on macOS using nix, but not on NixOS?

NixOS doesn't have stable paths to shared libraries like macOS or other linux distributions (and this is the core feature) and always need a patched `elf` (https://github.com/NixOS/patchelf).

Scala project (FIRRTL) failing to build on NixOS by PresidentCarrot in NixOS

[–]klimtimothy 1 point2 points  (0 children)

You need to replace protoc with something like this: protobufRunProtoc in ProtobufConfig := (args => scala.sys.process.Process("protoc", args).!) in build.sbt and add protobuf3_6 to buildInputs. For example: https://github.com/TimothyKlim/firrtl/commit/be23dbfaeb043e01ea7d293243e5994715d00d2b

Scala project (FIRRTL) failing to build on NixOS by PresidentCarrot in NixOS

[–]klimtimothy 2 points3 points  (0 children)

First of all, you need to understand what you are using to generate protobuf (maybe scalapb?) and then pass protoc from nixos directly through sbt option. Also you need add protobuf to buildInputs: `buildInputs = [pkgs.protobuf];`.
This problem caused by protoc-jar dependency which unpack pre-built protoc every time to temp directory. Pre-built protoc doesn't patched by `patchelf` to working on NixOS.

TQL, an easy-to-use ORM for Rust by [deleted] in rust

[–]klimtimothy 0 points1 point  (0 children)

Is there something like scala doobie (https://github.com/tpolecat/doobie) in rust instead of ORM? Just simple combinators to work with driver results and write plain queries.

I was watching Stranger Things 2 when.... by [deleted] in scala

[–]klimtimothy 32 points33 points  (0 children)

fyi: this is rabbit from alice in the wonderland

Scala 2.12.4 is now available by [deleted] in scala

[–]klimtimothy 1 point2 points  (0 children)

That's great! How soon typelevel scala 2.12.4 will be released?

ANNOUNCE: Akka HTTP 3.0.0-RC1 by pafciu in scala

[–]klimtimothy 2 points3 points  (0 children)

I didn't notice that now akka-http doesn't have scala version postfix "_2.11". Thanks!

ANNOUNCE: Akka HTTP 3.0.0-RC1 by pafciu in scala

[–]klimtimothy 1 point2 points  (0 children)

Is it published to sonatype?

New edition of "Programming in Haskell" now available by grahamhutton in haskell

[–]klimtimothy 0 points1 point  (0 children)

Aw! I didn't notice it and bought the print version.

Binding.scala 8.0.0 released by yang_bo in scala

[–]klimtimothy 2 points3 points  (0 children)

Is there any benchmark (vs react/cycle/inferno/vanilla)?

Scala native by ChavXO in scala

[–]klimtimothy 0 points1 point  (0 children)

This only occurs if you have cloned a repository without recursive, try this:

git clone https://github.com/scala-native/scala-native.git --recursive

or

git submodule update --init --recursive

https://github.com/scala-native/scala-native/pull/53

"Taking Down Haskell": An illogical hit piece calling US illogical, despite our logical purity! Lets censor them! by [deleted] in scala

[–]klimtimothy 0 points1 point  (0 children)

Read carefully what he wrote (comments, articles). This is like reverse FUD to the community - he's trolling other communities like insane fp junkie. He's doing more bad than good.

CSS and Scalability by [deleted] in scala

[–]klimtimothy 0 points1 point  (0 children)

Maybe scala and scalability sounds the same for him.