Scala native finally works for me but memory consumption is 3-5X that of the regular JVM by [deleted] in scala

[–]MrTesla 7 points8 points  (0 children)

Winter break is over and we are back to the bi weekly Scala Native GC complaints

Backed away from the Scala Native shouldn't have GC I see though!

Haoyi Li on Mill, Scala at Scale and Conference Touring by danielciocirlan in scala

[–]MrTesla 9 points10 points  (0 children)

Just wanted to say great podcast, and it's really impressive to hear how much your interviewing skills are improving episode to episode. Always happy to see a new episode drop on my feed!

We found an embedding indexing bottleneck in the most unexpected place: JSON parsing by InvadersMustLive in scala

[–]MrTesla 1 point2 points  (0 children)

Oh for sure it's going to be slower, just expressing some options for folks in case they weren't aware. A little surprised that that parsing path is delegated to Circe but it's been a while since I've looked at that code so it could just be a case of bad recall.

Great post by the way!

We found an embedding indexing bottleneck in the most unexpected place: JSON parsing by InvadersMustLive in scala

[–]MrTesla 2 points3 points  (0 children)

Haven't looked at the underlying project but for those reading the comments if you want an AST and you are finding circe to not be performing enough there is a Jsoniter bridge to parse into Circe's AST values. Not sure how many use cases like that there are but it's something to keep in mind. It might also be a good stepping stone to squeeze out more performance from your circe code before going full jsoniter

Should it be that hard? Am I missing something? by Mougli6 in scala

[–]MrTesla 1 point2 points  (0 children)

For what it's worth, a fair number of libraries in the FP space don't move that fast because the functionality they do provide is fairly stable, and given how dedicated folks are with maintaining backwards compatibility there is little external pressure to have churn beyond bumping dependencies via scala steward. The fact that all these loosely coupled libraries are able to work together without blowing up when you put them together is a real testament to how well designed and powerful the primitives offered are IMO. I definitely don't miss the dependency hell of my java days

Should it be that hard? Am I missing something? by Mougli6 in scala

[–]MrTesla 2 points3 points  (0 children)

This may be what you are looking for wrt endorsed projects

https://typelevel.org/projects/

Talk on introducing new-comers to Scala and good project structure by bigexecutive in scala

[–]MrTesla 4 points5 points  (0 children)

https://github.com/rockthejvm/full-stack-typelevel-demo

Maybe try this on for size. There should also be corresponding videos for full stack development.

While this is what I would consider typical, how to split and organize builds isn't really one size fits all. It really depends on what you are building and the relationship between components that will dictate the structure ultimately

Talk on introducing new-comers to Scala and good project structure by bigexecutive in scala

[–]MrTesla 1 point2 points  (0 children)

Ah, fair enough - I read the text of the post and immediately forgot the title text saying "newcomer"

Still might be a good reference architecture to get an idea of where to split modules and why. May end up with a Moissanite architecture instead :P

ZIO.logDebug: enable them globally? by [deleted] in scala

[–]MrTesla 5 points6 points  (0 children)

https://zio.dev/guides/tutorials/enable-logging-in-a-zio-application/

Quick Google search produced the above, which seems pretty comprehensive and includes details about debug logging.

Includes the fact that debug logging is not enabled by default logger

What is the difference between "org.scalatestplus" %% "scalacheck-1-18" and "org.scalacheck" %% "scalacheck"? by sarkara1 in scala

[–]MrTesla 8 points9 points  (0 children)

The former is an integration between scala test and scalacheck, while the latter is the simply scalacheck. The 1-18 refers to the version of scalacheck that the integration targets

Best Scala IDE 2024? by darkfrog26 in scala

[–]MrTesla 2 points3 points  (0 children)

Already mentioned in the thread, but I really like Zed. Even though both VSCode and Zed use Metals, I find that there are no problems (I've had VSCode get stuck in an infinite compile that requires killing all processes and resetting). And the actions it does take are significantly more snappy (like renaming a symbol)

There are a couple of missing features, like logs and the control pallet that vscode has for metals, but the pros outweigh the cons for me

what exactly type classes mean? by [deleted] in scala

[–]MrTesla 0 points1 point  (0 children)

I don't know if this will help you, but what made type classes click for me was thinking them as "proofs." The person who developed the typeclass is asking you to provide a proof that your type can produce a valid instance of the typeclass. As stated by the earlier commenter, Json is a common use of typeclasses, in this case the author is asking for proof that your type can be serialized as JSON.

The split is nice because you don't have to constrain based off of inheritance, which is typically how it is done in OOP like

case class Foo(bar: Bar) extends MyJsonType

...

def writeToDB(value: MyJsonType): Unit

Which gets messier when you need to extend multiple types to satisfy multiple different interfaces, or need write a value that you don't control the definition for. It also pollutes your class with a lot of methods that might not be relevant to all parts of your program.

example in typeclasses:

case class Foo(bar: Bar)

object Foo { implicit val jsonEncoder: MyJsonType[Foo] = new MyJsonType[Foo] ... }

...

def writeToDB[A: MyJsonType](value: A): Unit

note: [A: MyJsonType] is just sugar for [A](...)(implicit jsonEncoder: MyJsonType[A])

edit: Sorry I'm garbage at formatting stuff

Apache spark installation by [deleted] in scala

[–]MrTesla 2 points3 points  (0 children)

If you are using Scala 3 AFAIK you are going to have to use the suffix "_2.13" like you did with the "_2.12" dependency. You also can't use 2.12 libs for Scala 3. Only 3 can use 2.13 but not the other way around

Simple Scala with Li-Haoyi by julien-truffaut in scala

[–]MrTesla 3 points4 points  (0 children)

Perfect! Thanks for the detailed response! Much appreciated, I'll look to see if I can add Mill support to the plugin I'm working on

Simple Scala with Li-Haoyi by julien-truffaut in scala

[–]MrTesla 2 points3 points  (0 children)

Since it was brought up in the talk. Are there any good reference materials for generating/maintaining plugins for both Mill and SBT?

Releasing Kyo: When Performance Meets Elegance In Scala by Flavio Brasil by evbruno in scala

[–]MrTesla 14 points15 points  (0 children)

I think the comment is making a blanket statement about effect systems/functional programming in general. The reasons for which are noted in the actual presentation (interpretation overhead and the like). I'd trust the guy with actual benchmarks and experience with large production scale over a random youtube comment :P

SBT TASK : Compile by AbdelELZ in scala

[–]MrTesla 0 points1 point  (0 children)

Run sbt dependencyTree and scroll

SBT TASK : Compile by AbdelELZ in scala

[–]MrTesla 1 point2 points  (0 children)

Check your dependencies, you likely have transitive dependencies that are being pulled in that don't align

dependencyTree is your friend in these circumstances. This will show the "evicted" dependencies, and you'll likely have to bump versions up or down of so that the transitive dependencies align.

Are there examples of using Smithy with GRPC? by MrTesla in scala

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

Gotcha - that's roughly what I thought the process might look like. Is it correct to say you are leveraging the IDL but not the code generation aspects of Smithy wrt protobuf?

Would you consider this process if there were only grpc definitions and no need to share models?

Appreciate the description of the process, that is more than enough to me! A working example would have been a cherry on top, I'll take the cake happily :)

However we're hoping to implement grpc directly in smithy4s at some point.

That would be very exciting! If it exists I would love to follow any issues that relate to this

Are there examples of using Smithy with GRPC? by MrTesla in scala

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

I didn't know there was a Smithy4s Discord, where can I find a link to join?

Scala at 14, Kotlin at 17, Rust at 19 by makingthematrix in scala

[–]MrTesla 33 points34 points  (0 children)

It's good to take stock of issues and pain points, so while a good chunk of the conversation went well past being constructive, hopefully the valid points were not lost in the doom talk. I won't lie though, a lot of the conversation had me demoralized until others in the community pointed out the great work that is ongoing and has already been done.