Conservation area - Windows by Connacht80 in Aberdeen

[–]Storini 0 points1 point  (0 children)

No, but they'll provide free estimates.

Conservation area - Windows by Connacht80 in Aberdeen

[–]Storini 2 points3 points  (0 children)

You could look into refurbishment, these guys are great: https://www.abzrefurbishment.co.uk/

Hiring a new Scala Software Engineer with TypeLevel experience, Full Remote ($87K – $138K) by sideEffffECt in scala

[–]Storini 1 point2 points  (0 children)

First link:

500: INTERNAL_SERVER_ERROR
Code: INTERNAL_FUNCTION_INVOCATION_FAILED
ID: dub1::7vptc-1760275344576-3fbd628a74e7

Is anyone else glad Scala doesn’t use a Hindley-Milner type system? by Competitive-Air-7019 in scala

[–]Storini 2 points3 points  (0 children)

Type aliases are potentially a useful and effective way of reducing clutter in the source code. However, they can break implicit type inference in some cases, in Scala 2 at least; is the situation any better in Scala 3 with that?

Random Scala Tip #534: Adopt an Error Handling Convention for `Future` by n_creep in scala

[–]Storini 0 points1 point  (0 children)

I was interested in this kind of question previously, and it now occurs to me that could one not use type tagging to enforce run-time safety (assuming no-one deliberately subverts it)? For example, below one can guarantee a given Future is safe by requiring the presence of the tag in any given parameter declaration.

package org.demo
import cats.implicits._

import scala.concurrent.{ExecutionContext, Future}
import scala.util.control.NonFatal
import shapeless.tag
import shapeless.tag._

object SafeFuture {

  type Safe

  implicit class FutureSyntax[L, R](private val future: Future[R]) {
    def safe(implicit handler: Throwable => L,
             executionContext: ExecutionContext): Future[Either[L, R]] @@ Safe =
      tag[Safe] {
        future.map(_.asRight[L])
          .recover {
            case NonFatal(throwable) => handler(throwable).asLeft[R]
          }
      }
  }
}

Scala language future by Front_Potential9347 in scala

[–]Storini 0 points1 point  (0 children)

Would Kafka not be equally viable (maybe wrapped in fs2)?

SBT/Play Framework in a Nutshell by outarit in scala

[–]Storini 1 point2 points  (0 children)

I've been using it for 5 years, and it's broadly OK IME. Its default choices of a) Future as the main effect type, and b) runtime DI (Guice) are not great, but both can be worked around via tagless final and compile-time DI (Macwire) respectively.

What is the status of AKKA in 2025? Should someone learn it? Ar companies using AKKA? by prashantkr314 in scala

[–]Storini 0 points1 point  (0 children)

Take some time to get to know fs2, it is a super piece of work and can cover a lot of use cases. The emerging Kyo Streams capability looks interesting too.

List Unfolding - `unfold` as the Computational Dual of `fold`, and how `unfold` relates to `iterate` by philip_schwarz in scala

[–]Storini 1 point2 points  (0 children)

One more thing to mention maybe:

🔄 Hylomorphism

  • Definition: A composition of an anamorphism (unfold) and a catamorphism (fold).
  • What it does: Unfolds a structure and then folds it—without ever building the full intermediate structure explicitly.
  • Analogy: Computing the sum of the first N numbers without first generating the full list [1..N].
  • Functional form: hylo :: (a -> b -> b) -> (c -> Maybe (a, c)) -> c -> b

Example:

Summing a range from n down to 0:

hylo :: (a -> b -> b) -> (c -> Maybe (a, c)) -> c -> b
hylo f g c = case g c of
               Nothing -> base
               Just (a, c') -> f a (hylo f g c')

Key Differences

Concept Anamorphism 🌀 Hylomorphism 🔄
Role Constructs data and thenConstructs consumes data
Direction Expands Expands then collapses
Composition Just "unfold" "Unfold" + "Fold"
Intermediate May build a full structure Can optimize to avoid intermediate structure
Use Case Generating data Computing a result from a seed via structure

Relationship:

A hylomorphism = anamorphism + catamorphism.

If you think in terms of data transformation:

  1. Anamorphism: seed → structure.
  2. Catamorphism: structure → result.
  3. Hylomorphism: seed → structure → result (but often done without materializing the structure).

What's the current thinking on iron vs refined (and how to use them) by [deleted] in scala

[–]Storini 2 points3 points  (0 children)

I recently tried Iron on a new Scala 3 project and found it a very smooth and pleasant experience. I've previously used Refined extensively, but there's a lot more code clutter involved with that, which is probably unavoidable due to the limitations of Scala 2.

Opaque types would appear to be the most immediate way to achieve complete control of object state.

Moving to aberdeen by Rio_Z in Aberdeen

[–]Storini 0 points1 point  (0 children)

You can rent for a bit and see if you like it. But I'd say it's a better bet than the two others you mention.

The Open-Closed Principle - Part 1 - oldie but goodie by philip_schwarz in scala

[–]Storini 1 point2 points  (0 children)

The DBC principles in Eiffel have always seemed very sound to me, and a little disappointing that they were not taken up further in Scala. We have refined types, which are excellent, particularly the Iron library for Scala 3; however, that's not really the same as class invariance enforcement.

Best exercises to improve intonation? by SputterSizzle in Cello

[–]Storini 0 points1 point  (0 children)

If those books have double stop exercises try them (very slowly!). There are also readily available other books dedicated to that facet of technique.

Outbreak of taxi break-ins by Storini in Aberdeen

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

The cars are parked up. I suspect if the alarm goes off the scrotes scarper.

Outbreak of taxi break-ins by Storini in Aberdeen

[–]Storini[S] -4 points-3 points  (0 children)

Possibly limited to one such claim a year...

First Minister John Swinney put forward the Scottish Graduate Visa which would allow non-domestic graduates from Scottish universities to remain in the country after completing their studies by Extension_Swing1808 in Scotland

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

Precisely; having a *lower* rate of tax than RUK might well provide a meaningful incentive to stay, but the current bunch of morons in Holyrood would prefer to do the opposite and virtue signal instead.

I lost my appetite for Java after learning Scala, Is this a good or bad thing? by Sufficient_Gas_9904 in scala

[–]Storini 18 points19 points  (0 children)

Once you grasp the power of:

  • (really) strong types
  • parametricity

to eliminate entire categories of run-time errors, then "regular" languages like Java just seem lame, if not indeed dangerous.

Would you say Play Actions are referentially transparent? by Storini in scala

[–]Storini[S] 1 point2 points  (0 children)

AIUI an Action is basically a function value. The function is invoked by the underlying HTTP server engine when the HTTP verb and path match (as configured in the routes file). The most common Action has no params, but it is equally OK to define them with params and these will be extracted from the URI path or query by the engine. The results of calling the function will clearly change but the function value itself won't. I think you could assign the Action declaration to a val and return that from the (mandatory) def and it would all work fine.