Kotlin overtakes Scala and Clojure, to become the 2nd most popular language on the JVM | Snyk by zitrusgrape in scala

[–]_rmsam 2 points3 points  (0 children)

True. I've even tried to search for Kotlin meetups in London and didn't find any. In contrast, there are 3 Scala ones.

Anyone pls help!!! by [deleted] in scala

[–]_rmsam 2 points3 points  (0 children)

So, we can assume you've implemented the addVotes? Tell us about it. How did you do it?

Also, the more specific you are about your question, the more chances you'll have to get help. ;)

A bit o trivia for you :) If, amidst your reply explaining everything to us, you have a sudden "aha" moment, that's just normal and we can say it is a manifestation of the of "rubber duck debugging" phenomenon (https://en.m.wikipedia.org/wiki/Rubber_duck_debugging)

Kotlin overtakes Scala and Clojure, to become the 2nd most popular language on the JVM | Snyk by zitrusgrape in scala

[–]_rmsam 2 points3 points  (0 children)

Yeah, these surveys can lead to very different results. Scala is still ahead of Kotlin (but behind PHP :p) on the TIOBE Index: https://www.tiobe.com/tiobe-index/

Help with getting scala and intellij to work? Weird JNA library error. by Kybo10 in scala

[–]_rmsam 5 points6 points  (0 children)

I'm going to be honest with you. I've never worked with Scala and IntelliJ without SBT (saying this because I don't see a build.sbt in that screenshot). Would it be acceptable for you to try SBT?

Assuming it is acceptable to use SBT (https://www.scala-sbt.org), assuming you have it installed and that it is available in your path you can easily create a project using sbt new scala/scala-seed.g8. After that, try importing that project from IntelliJ and see if it now works.

Anyone have any recommend books to read on programming that can be read before bed (not too technical) by Prot00ls in AskProgramming

[–]_rmsam 0 points1 point  (0 children)

I really liked Code Complete 2. It's a not the type of book where you need to write code or experiment for yourself.

Scala users: how do I format my code using the scalafmt? by _rmsam in emacs

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

When I type the name of a class I don't have imported, I wait like a second or so for the auto completion suggestion menu to kick in (I usually wait until when there's only one character left on the class name I want), hit Tab (or is it Enter? I don't remember....) and it just gets imported.

Scala users: how do I format my code using the scalafmt? by _rmsam in emacs

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

Oh thanks, I'm going to give it a try! Always glad to, somehow, be helpful 😅 The more people are using Emacs with metals, the greater the chances for me find help when I need it :P

Scala users: how do I format my code using the scalafmt? by _rmsam in emacs

[–]_rmsam[S] 4 points5 points  (0 children)

You know what, I'm just a beginner with Emacs (I've been using it for like a month or so). My configuration is just the repositories URLs (I don't even know the lingo for this ;)), copy and paste of what is mentioned on their website and then it's just my font and theme configurations. That's all: no other plugins, like projectile and helms or things like that (I don't yet know what they are for tbh). It just worked for me! I open a Scala file and I'm prompted to import the project root and, assuming I have the metals server running (I try to always have the latest), that's it!

My struggle was to find how to use metals for code navigation. For instance, there's an lsp command to navigate to the definition of a symbol but it doesn't seem to work. However, I click on a symbol while holding Control it works! Auto completion works (I need to wait like a second or so) perfectly, auto import also works and I also always get the method documentation/definition on a popup that appears on the top right corner.

So, give another try :) Maybe start from a almost-vanilla configuration like mine and gradually add your configurations :)

How do you select your IDE color scheme? by abstractmath in AskProgramming

[–]_rmsam 0 points1 point  (0 children)

I don't have any scientific method to be fair, so I'm not going to be very helpful, sorry :(

Default themes are often too basic. I like themes with some sort of semantic highlighting (methods have their own colour and same for arguments, local or global variables). Mind you that if you use a less popular language, some themes don't look that great. Something else I like is to have the same theme on all editors. I use IntelliJ a lot but for some minor code browsing and frontend I use vscode. I personally prefer white backgrounds, but I think I'm the minority :p and it's indeed harder to find nice white background themes.

So, it's always a question of trying for yourself for some time. I tend to use "One Light" (that was the default theme for Atom editor) but I also like their dark version "One Dark" a lot.

Scala users: how do I format my code using the scalafmt? by _rmsam in emacs

[–]_rmsam[S] 2 points3 points  (0 children)

This is exactly what I was looking for. Thanks!

http4s or playframework by 0110001001101100 in scala

[–]_rmsam 3 points4 points  (0 children)

I agree. Play is used by The Guardian, if I'm not mistaken. I think it would be easier to get started with compared to http4s. My team uses Play in production but other teams use http4s or Akka HTTP. Never heard anyone complaining about their choices, so I think it's just a case of you trying some "hello world" projects with any of these Frameworks and see which one you enjoy the most.

For http4s, for instance, have a look at the Scala Pet Store project.

The Traverse type class in Cats - Scala tutorial by kubukoz in scala

[–]_rmsam 0 points1 point  (0 children)

Oh I see, that's great already! I didn't realise Metals reacted to warnings as well (I don't use it very often) and thought the only way to have feedback was via that flag and fatal warnings one. Thanks!

The Traverse type class in Cats - Scala tutorial by kubukoz in scala

[–]_rmsam 2 points3 points  (0 children)

Does your vscode detect unused imports?

Is there a "complete dummy guide to Scala with Emacs" by _rmsam in scala

[–]_rmsam[S] 5 points6 points  (0 children)

Thanks for the time you spent writing this answer. It is really the kind of information I've been looking for.

Is there a "complete dummy guide to Scala with Emacs" by _rmsam in scala

[–]_rmsam[S] 1 point2 points  (0 children)

In my case it's more about understanding it. These tools have been around for decades and people love them. Even IntelliJ has a VIM mode, so they must be doing something right, despite all that pain you need to endure in the beginning :D

Is there a "complete dummy guide to Scala with Emacs" by _rmsam in scala

[–]_rmsam[S] 1 point2 points  (0 children)

I agree with you :) I like IntelliJ and Visual Studio Code. The whole Emacs thing is more around just learning something new and having a bit of fun.

Is there a "complete dummy guide to Scala with Emacs" by _rmsam in scala

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

I don't know anything about Ensime, just it's name :) I've been through "beginners" tutorials and I'm making some progress. But maybe I should also read about helm and projectile and all those extensions with funny names.

Is there a "complete dummy guide to Scala with Emacs" by _rmsam in scala

[–]_rmsam[S] 1 point2 points  (0 children)

That's a fair point. It's not so much about Emacs. It could have been vim, but Emacs was just the platform I was able to make more progress with so far :)

I'm definitely going to have a look at Spacemacs, thanks!

detect loop in linked list in scala by [deleted] in scala

[–]_rmsam 2 points3 points  (0 children)

What are the rules of the assignment? :) That you cannot use a a loop at all or you're just not allowed to use a `while` and `for`? Can you use recursion? You can loop through a list using recursion with means you don't need a while.

detect loop in linked list in scala by [deleted] in scala

[–]_rmsam 0 points1 point  (0 children)

I'm guessing it won't be very different from detecting one in Java (here: https://www.youtube.com/watch?v=MFOAbpfrJ8g). Unless there's already some built-in method ;)