Scala Genie!

Scala 3 at the speed of lightning

Benefits

Look at the source code of this file

index.scala
import cats.effect.*
import scalatags.Text.all.*
import java.nio.file.*

object Page {

  def page = for {
    now <- IO.delay(java.time.Instant.now())
    theScala <- IO.blocking(
      Files.readString(Paths.get(implicitly[sourcecode.File].value))
    )
    defaultSc <- IO.blocking(
      Files.readString(
        Paths.get(implicitly[sourcecode.File].value).getParent.resolve("default.scala")
      )
    )
  } yield html(
    head(
      link(rel := "stylesheet", href := "/style.css"),
      List(
        "highlight.min.js",
        "languages/scala.min.js",
        "styles/intellij-light.min.css"
      ).map { file =>
        val theLink =
          s"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/${file}"
        if (file.endsWith("js")) script(src := theLink, "")
        else link(rel := "stylesheet", href := theLink)
      }
    ),
    body(
      h2("Scala Genie!"),
      h3(i("Scala 3 at the speed of lightning")),
      h4("Benefits"),
      ul(
        li("PHP-like rapid development experience"),
        li("Instant Scala file reload & redeployment"),
        li(
          "Use the fantastic ",
          a(href := "https://com-lihaoyi.github.io/scalatags/", "ScalaTags"),
          " library for rapid templating & HTML production"
        )
      ),
      h4(
        "Look at the source code of this file"
      ),
      tag("details")(
        tag("summary")(
          code(
            Paths.get(implicitly[sourcecode.File].value).getFileName.toString
          )
        ),
        pre(code(`class` := "language-scala", theScala))
      ),
      tag("section")(
        id := "download",
        h4("Get started now!"),
        p("Download the guided launchers for your OS:"),
        ul(
          li(a(href := "/guider.dmg", "macOS (Apple & Intel Silicon)")),
          li(a(href := "/guider.exe", "Windows (x64)"))
        ),
        img(src := "screenie.png")
      ),
      raw("""<script>hljs.highlightAll();</script>"""),
      p(
        "See also: "
      ),
      ul(
        li(a(href := "/csv/", "Genie CSV")),
        li(a(href := "/json/", "Genie JSON")),
        li(a(href := "/oswald/", "Oswald IDL")),
        li(a(href := "/singletondb/", "Genie SingletonDB"))
      ),
      ul(
        li(
          a(href := "https://twitter.com/ScalaGenie", "@ScalaGenie on Twitter")
        ),
        li(
          a(
            href := "https://www.linkedin.com/company/89654950/admin/",
            "Scala Genie on LinkedIn"
          )
        )
      )
    )
  )
}

Get started now!

Download the guided launchers for your OS:

See also: