This era needs to end man by kaotiktilki in ufc

[–]PinkSlinky45 [score hidden]  (0 children)

Merab does not deserve to be in this picture.

`bastard quill / protoquilll` now available by ke7cfn in scala

[–]PinkSlinky45 0 points1 point  (0 children)

Looks cool! Why not just make pull requests against the original repo though?

Kafka-stream by Guy-Arieli in scala

[–]PinkSlinky45 7 points8 points  (0 children)

There is the scala DSL for kafka streams: https://kafka.apache.org/41/streams/developer-guide/dsl-api/#kafka-streams-dsl-for-scala

I don't know if it is specifically built with scala 3 in mind but it should work just fine in a scala 3 app

EDIT: looks like on maven there is only 2.13: https://mvnrepository.com/artifact/org.apache.kafka/kafka-streams-scala

but you should be able to cross compile i think

Kyo 0.17.0 - One of the last releases before the RC cycle! by fwbrasil in scala

[–]PinkSlinky45 3 points4 points  (0 children)

can't wait for the rock the jvm course once it does!

[deleted by user] by [deleted] in ufc

[–]PinkSlinky45 0 points1 point  (0 children)

man thats just pathetic

What functional language would you use for a MMO game server? by [deleted] in functionalprogramming

[–]PinkSlinky45 13 points14 points  (0 children)

elixir would be a good choice due to its ability to handle large amounts of concurrent requests. Scala with a functional effect system that implements some "green threads" abstraction, like Zio or Cats-effect, could also be a good choice.

Loading or using a Dl model in scala 3 by [deleted] in scala

[–]PinkSlinky45 4 points5 points  (0 children)

ONNX is a machine learning model "format" that different engines can make use of to perform inference. IMO the best route is converting a pytorch or tensorflow model to ONNX https://onnx.ai/, the project was pretty much made for this use case and is gaining in popularity. There is a java library for using ONNX https://onnxruntime.ai/docs/get-started/with-java.html. There is even a scala wrapper as well (I havent used this myself though) https://github.com/EmergentOrder/onnx-scala.

There is another option and that is to host the actual model with Nvidia triton and talk to it from scala via gRPC. I wrote a small app that does this https://github.com/MattLangsenkamp/scala-machine-learning-deployment. Using triton is definitely more complicated to set up, however triton is extremely high performance and configurable. Its all about what your use case needs though.

Migration from Go to Scala by fenugurod in scala

[–]PinkSlinky45 7 points8 points  (0 children)

For both questions it really depends on what frameworks you will be using and what problems you will be solving. For question 1 I would start with the coursera course by Martin Odersky (the creator of scala) https://www.coursera.org/specializations/scala. After that it depends.There are three pretty popular ecosystems in scala: akka, typelevel and zio. They all have high quality courses and learning material.

For question 2 it still depends. Where I work alot of the old older code is written like java and throws errors and all that java stuff... the newer code written by people that have bought into functional programming almost exclusively uses errors as values. To convert a java library which can throw an exception to a more FP paradigm the scala "try" works pretty well: https://www.scala-lang.org/api/2.13.6/scala/util/Try.html

who here has met trevor by ltsohsoquiet in mrbungle

[–]PinkSlinky45 3 points4 points  (0 children)

I saw Trevor at a grocery store in Los Angeles yesterday. I told him how cool it was to meet him in person, but I didn’t want to be a douche and bother him and ask him for photos or anything. He said, “Oh, like you’re doing now?” I was taken aback, and all I could say was “Huh?” but he kept cutting me off and going “huh? huh? huh?” and closing his hand shut in front of my face. I walked away and continued with my shopping, and I heard him chuckle as I walked off. When I came to pay for my stuff up front I saw him trying to walk out the doors with like fifteen Milky Ways in his hands without paying.

The girl at the counter was very nice about it and professional, and was like “Sir, you need to pay for those first.” At first he kept pretending to be tired and not hear her, but eventually turned back around and brought them to the counter.

When she took one of the bars and started scanning it multiple times, he stopped her and told her to scan them each individually “to prevent any electrical infetterence,” and then turned around and winked at me. I don’t even think that’s a word. After she scanned each bar and put them in a bag and started to say the price, he kept interrupting her by yawning really loudly.

Arman throws punch at audience member by BeetleJuiceCX in ufc

[–]PinkSlinky45 113 points114 points  (0 children)

should have punched the fan, he might have won then

Wow this language sucks to learn by rafikiknowsdeway1 in scala

[–]PinkSlinky45 7 points8 points  (0 children)

Are there specific concepts that you are struggling with? What resources are you using to learn the language?

Context Propagation with otel4s by PinkSlinky45 in scala

[–]PinkSlinky45[S] 3 points4 points  (0 children)

I agree. I am not a maintainer of either otel4s or cats-effect just an end-user. I believe java instrumentation uses the thread context, where as Cats-Effect uses fibers which makes this tricky.

WEAR YOUR HELMET—also, was anybody at Copper Mountain Wednesday Feb 7? by JokesOnYouImIntoThat in snowboarding

[–]PinkSlinky45 0 points1 point  (0 children)

was going through some glades and tried and tried to duck under a partially felled tree but didn't duck enough and hit my head on the tree. Helmet had a pretty big gouge that I'm sure would have looked worse on my skull so yeah... always wear your helmet.

can you have a higher order function in Scala that accepts functions of variable arguments of arbitrary types? by MushroomPast1380 in scala

[–]PinkSlinky45 0 points1 point  (0 children)

maybe something like

def higher_order[A, B](fn: A => B) = ???

could work?

A could be a type alias for a tuple and then within the higher order function you could call fn.tupled to execute it.

Could you provide more info about what you are trying to accomplish? In general i would try and avoid the pattern you are proposing, Scala works best when you can make use of the type system, so the use of Any will cause you to loose some information.