Skip to content

Instantly share code, notes, and snippets.

Okay, let's trace the history of tech hype cycles, keeping in mind that while the term "Hype Cycle" was popularized by Gartner in 1995, the underlying pattern of excitement, disillusionment, and eventual productivity has existed for much longer.

Understanding the Gartner Hype Cycle Model (Briefly)

Before diving into history, it's helpful to remember the typical stages Gartner defined:

  1. Technology Trigger: A potential technology breakthrough kicks things off. Early proof-of-concept stories and media interest emerge.
  2. Peak of Inflated Expectations: Early publicity produces success stories—often accompanied by scores of failures. Much enthusiasm and unrealistic projections. Investment pours in.
  3. Trough of Disillusionment: Interest wanes as experiments and implementations fail to deliver. Producers of the technology shake out or fail. Investments continue only if the surviving providers improve their products to the satisfaction of early adopters.
  4. Slope of Enlightenment: More

Okay, let's break down why this happens in Scala 3 (and largely in Scala 2 as well). The core reason lies in the distinction between name resolution and overloading resolution.

  1. Name Resolution First: When the compiler encounters a name like normalMeth, its first job is to figure out what that name refers to in the current scope. It looks at:

    • Local definitions
    • Members of the enclosing class/object/trait
    • Inherited members
    • Imported names
  2. Imports Bring Names:

  • import A.* brings the name normalMeth (which refers specifically to the method A.normalMeth) into the current scope.
package app.utils
import app.data.{AppPushNotificationsState, PushNotificationData}
import cats.Applicative
import com.raquo.airstream.state.StrictSignal
import framework.utils.JSLogger
import retry.syntax.*
import retry.{HandlerDecision, RetryPolicies}
import typings.tauriAppsApi as tauri
import typings.tauriAppsPluginProcess.tauriAppsPluginProcessRequire
/*
* Decompiled with CFR 0.151.
*/
package cats.effect.resource_shared_memoized;
import cats.effect.kernel.Resource;
import java.io.Serializable;
import scala.Function0;
import scala.Function1;
import scala.None$;
#!/usr/bin/env ruby
# Run this file to generate `.kamal/secrets`.
# List of secrets to generate
# Either:
# - String: the secret name
# - Array: [secret_name, note_id]
secrets = [
["RAPIDRX_POSTGRESQL_PASSWORD", "RAPIDRX_DEV_POSTGRESQL_PASSWORD"],
"RAPIDRX_KAMAL_REGISTRY_PASSWORD"
package app.prelude.utils
import neotype.Newtype
import io.scalaland.chimney.PartialTransformer
import alleycats.Empty
import app.prelude.Prelude.upickle_
import io.scalaland.chimney.partial.Result.Errors
import io.scalaland.chimney.Transformer
package app.webclient_prelude.utils
import com.raquo.airstream.core.Signal
import com.raquo.airstream.split.SplittableSignal
import com.raquo.airstream.state.Var
/** Like [[Var.zoom]] but is not required to have an [[com.raquo.airstream.ownership.Owner]]. */
trait UpdatableSignal[A] { self =>
/** The [[Signal]] which is most likely mapped from a [[Var]]. */
@arturaz
arturaz / Actor.scala
Last active November 8, 2023 09:50
Simple Actor implementation using cats effect and FS2
package app.utils
import cats.effect.Concurrent
import cats.effect.kernel.{DeferredSink, DeferredSource}
import fs2.concurrent.Channel
/**
* An actor that processes messages one at a time.
*/
trait Actor[F[_], Message] {
@arturaz
arturaz / EchoMacro.scala
Created November 2, 2023 10:00
Implementation of an echo macro in Scala 3
extension [A](inline value: A) {
/**
* Echoes the value of the given expression.
*
* Example:
* {{{
* val foo = "Hi"
* foo.echo // "foo=Hi"
* }}}
*/
@arturaz
arturaz / CommandLineArgsParser.scala
Last active July 10, 2023 20:19
A parser written with cats-parse that turns a string into a list of command line arguments, similar to how a shell would do it.
package app.utils
import cats.parse.{Parser as P, Parser0 as P0}
import cats.syntax.show.*
import scala.util.control.NonFatal
/**
* A parser that turns a string into a list of command line arguments, similar to how a shell would do it.
*