Scala
fromMedium
2 months agoScala, 12 years later
Reflecting on Scala's evolution reveals a shift in personal interest and the language's development over years.
In this talk, Kannupriya Kalra, Scala Center mentor and co-creator of LLM4S, demonstrates how Scala's strong types and functional patterns enable safer and more scalable AI development.
//> using dep com.softwaremill.sttp.client3::core:3.10.3 import sttp.client3.quick.* import sttp.model.Uri val url = Uri.parse(args(0)).toOption.get def go(): Unit = { val getResult = simpleHttpClient.send(quickRequest.get(url)) if (getResult.code.isSuccess) { println("Success") } else { println("Failure, continue to try...") Thread.sleep(3000) go() } } go() This Scala script checks the availability of an HTTP service by continuously sending requests until it receives a successful response from the specified URL.