Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:44

    47erbot on scalafmt-core-3.5.4

    Update scalafmt-core to 3.5.4 (compare)

  • May 20 05:33

    47erbot on scalafmt-core-3.5.4

    Update scalafmt-core to 3.5.4 (compare)

  • May 18 05:43

    47erbot on scalafmt-core-3.5.3

    (compare)

  • May 18 05:43

    47erbot on main

    Update scalafmt-core to 3.5.3 (compare)

  • May 18 05:43
    47erbot closed #1138
  • May 18 05:39
    47erbot opened #1138
  • May 18 05:39

    47erbot on scalafmt-core-3.5.3

    Update scalafmt-core to 3.5.3 (compare)

  • May 16 05:28

    47erbot on scalafmt-core-3.5.3

    Update scalafmt-core to 3.5.3 (compare)

  • May 13 06:04
    47erbot commented #1085
  • May 13 06:04
    47erbot commented #1058
  • May 13 06:04
    47erbot opened #1137
  • May 13 06:04

    47erbot on scalajs-dom-2.2.0

    Update scalajs-dom to 2.2.0 (compare)

  • May 11 10:28

    47erbot on main

    Update files from `.github` to … (compare)

  • May 09 05:28

    47erbot on monix-3.4.1

    (compare)

  • May 09 05:28

    47erbot on main

    Update monix to 3.4.1 (compare)

  • May 09 05:28
    47erbot closed #1136
  • May 09 05:23
    47erbot opened #1136
  • May 09 05:23

    47erbot on monix-3.4.1

    Update monix to 3.4.1 (compare)

  • May 03 08:15
    artemkorsakov opened #1135
  • May 02 05:38

    47erbot on upickle-2.0.0

    (compare)

Elliot V Pourmand
@ElliotVilhelm
Evaluation failed : Evaluation failed : org.http4s.client.UnexpectedStatus: unexpected HTTP status: 503 Service Unavailable
is back ))):
Elliot V Pourmand
@ElliotVilhelm
its gone!
Ben McAllister
@benomac
What is the correct answer for "Character Literals can be an escape sequence, including hexidecimal:". I've tried passing everything as strings (which is what they evaluate to in the repl) but it never passes!?,
I've also tried putting them in as char's and without any quotes, still doesn't work?
Ok Got it now.
Anna
@Koala4ka

hello i am new here please can someone explain what do i do wrong? 1 + 2 shouldBe
3

"Hello, " ++ "Scala!" shouldBe
Hello, Scala!
Evaluation failed : Compilation Error ; ERROR -> too many arguments (found 3, expected 2) for method evaluation: (res0: Int, res1: String): Unit at [227, 227, 227]

ml10
@ml10
The REPL and some online tools will remove quotes when displaying strings sometimes, but on scala-exercises you need quotes around the result strings in your answers.
skjain116
@skjain116

I have data in 4 fields - addressId, customerId, fromDate, toDate

I have multiple addresses and for each addresses, multiple customers would have stayed there

So, for example, just for address1, I have the 5 values, i.e. 5 tenants (101,102,103,104,105) - (address1, (101, 250, 350), (address1, (101, 100, 220),(address1, (101, 50, 90),(address1, (101, 175, 400), (address1, (101, 420, 500).

I am trying to group all the tenants who stayed in a given property for overlapping time and provide the overall start and end date of this overall overlapping date range.

For example, accounting for the overlapping dates and using the above values for address "address1" , answer would be

Adress. Customers. Start End
address1 [103] 50 90
address1 [101,102,104]. 100. 400
address1. [105] 420 500

I am currently facing a similar problem. I am undergoing scala spark training and this is part of my training. Any solution that works???

1 reply
Djoa Spring
@djoa
Hi all! Here https://www.scala-exercises.org/scala_tutorial/definitions_and_evaluation in section "CHANGING THE EVALUATION STRATEGY" there is missed step: it should be "9 + 16" before "25".
JuanFerreyra
@JuanFerreyra1
hello, can anybody help me on this exercise?
Dmitry Pevunov
@Darkest
Do exercises actually compile and run? The run button is inactive... and no error is given
ml10
@ml10
I was just able to submit an answer successfully. Make sure there aren’t any script or ad blockers on the page. That has caused issues for some folks in the past.
JuanFerreyra
@JuanFerreyra1
thank you very much
MercedesMonti
@MercedesMonti
hi, which is the result of this exercise: 16.toHexString shouldBe?
fhinze
@fhinze
Should be "10"
The service that validates the results seems to be down. Getting 503 errors.
Hernancito
@hernansaab
How do I reset the answers?
Randall Lionel Kharkrang
@bahbah94
How does this work?
i want to code on chrome
Andrew Ribeiro
@Andrewnetwork
Cool site. Thanks for making it!
Christoph Knabe
@christophknabe
How can I delete all my accepted answers for the exercises?
Christoph Knabe
@christophknabe
After a successful run of an exercise you can at least re-edit the answer fields and delete each answer individually.
Solomon Yu
@sqr00t
Hi, I'm unable to login to github using Brave browser due to "invalid code" error. Works fine with other browsers though.
Capitan Empanada
@ivanlp10n2
I had errors with the last one of Higher Order function so I changed the browser, It was compiling ok on my repl. I had to rewrite it in chrome to make it work :)
Capitan Empanada
@ivanlp10n2
I can't see any field to complete in cats/Eval section :(
Ruslan Krivoshein
@ruslankrivoshein
Could anyone explain me, what is the function sum in the exercise of "Higher Order Functions"? I solved it, but can't understand why so
Fernando
@nandotorterolo
Hi, how are you?
Is is expected that if I do a clean fork, and clone, and compile.

compile task works?
(Compile-generated-exercises / generateExercises) java.lang.ClassCastException: class sbt.internal.inc.MappedVirtualFile cannot be cast to class java.io.File (sbt.internal.inc.MappedVirtualFile is in unnamed module of loader sbt.internal.MetaBuildLoader @40f08448; java.io.File is in module java.base of loader 'bootstrap')

tried with:

  • "sbt-exercise" % "0.6.7"
    -"sbt-exercise" % "0.7.1"
Fernando
@nandotorterolo
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
[error] at scala.collection.Iterator.foreach(Iterator.scala:943)
[error] at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error] at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error] at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error] at scala.collection.TraversableLike.map(TraversableLike.scala:286)
[error] at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
[error] at scala.collection.AbstractTraversable.map(Traversable.scala:108)
[error] at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$13(ExerciseCompilerPlugin.scala:214)
[error] at cats.syntax.EitherObjectOps$.catchNonFatal$extension(either.scala:338)
[error] at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.invokeCompiler$1(ExerciseCompilerPlugin.scala:209)
[error] at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$33(ExerciseCompilerPlugin.scala:247)
[error] at cats.instances.ListInstances
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲1.$anonfun$trav…: anon$1.$anonfun$traverse$2(list.scala:78)
[error]         at cats.instances.ListInstances
anon$1.loop$2(list.scala:68)
[error] at cats.instances.ListInstances
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲1.$anonfun$fold…: anon$1.$anonfun$foldRight$2(list.scala:70)
[error]         at cats.Eval$.advance(Eval.scala:271)
[error]         at cats.Eval$.loop$1(Eval.scala:350)
[error]         at cats.Eval$.cats$Eval
evaluate(Eval.scala:368)
[error] at cats.Eval$Defer.value(Eval.scala:257)
[error] at cats.instances.ListInstances
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲1.traverse(list…: anon$1.traverse(list.scala:77)
[error]         at cats.instances.ListInstances
anon$1.traverse(list.scala:16)
[error] at cats.Traverse$Ops.traverse(Traverse.scala:19)
[error] at cats.Traverse$Ops.traverse$(Traverse.scala:19)
[error] at cats.Traverse$ToTraverseOps
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲2.traverse(Trav…: anon$2.traverse(Traverse.scala:19)
[error]         at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$32(ExerciseCompilerPlugin.scala:247)
[error]         at scala.util.Either.flatMap(Either.scala:341)
[error]         at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$30(ExerciseCompilerPlugin.scala:246)
[error]         at scala.util.Either.flatMap(Either.scala:341)
[error]         at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$27(ExerciseCompilerPlugin.scala:243)
[error]         at scala.util.Either.flatMap(Either.scala:341)
[error]         at org.scalaexercises.plugin.sbtexercise.ExerciseCompilerPlugin$.$anonfun$generateExercisesTask$1(ExerciseCompilerPlugin.scala:240)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun
u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform
KaTeX parse error: Can't use function '$' in math mode at position 5: anon$̲4.work(Transfor…: anon$4.work(Transform.scala:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions
anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.uti
Christoph Knabe
@christophknabe
@nandotorterolo I suppose you have to run it on a Java 8 JDK which is still unmodularized. That was a major break in Java development. The ClassCastException details mention two different Java modules (unnamed vs java.base).
On https://github.com/scala-exercises/scala-exercises I see you should run in on a JDK 8.
Fernando
@nandotorterolo
Thanks for the quick response @christophknabe , using JDK11.
My bad: Prerequisites are in scala-exercises, but they are not on exercises-template. I did not notice this information.
Many thanks
Christoph Knabe
@christophknabe
@nandotorterolo Glad that I could help.
Fernando
@nandotorterolo

Hi, it's me again.
Doing local development, I need a turn around to run exercises, without being signed in on Github, is it possible?
I reviewed all the documentation but unfortunately did't find nothing related
Many thanks

http://localhost:9000/_oauth-callback?error=redirect_uri_mismatch&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.&error_uri=https%3A%2F%2Fdocs.github.com%2Fapps%2Fmanaging-oauth-apps%2Ftroubleshooting-authorization-request-errors%2F%23redirect-uri-mismatch&state=bd3d1ef4-f435-4d63-b93e-46244195983f

Fernando
@nandotorterolo
body: Missing code or state
1 reply
JamezMercier
@JamezMercier
Hi Scala devs, I see that ScalaFiddle is down, can you suggest any other Scala Fiddle ?
JamezMercier
@JamezMercier
Fanpeng Kong
@fanpeng-kong
Hi, working on the last exercise in the "SCALA TUTORIAL" (https://www.scala-exercises.org/scala_tutorial/type_classes), how could I refer to the unnamed parameters in val compareRationals: (Rational, Rational) => Int = _1.numer*_2.denom - _2.numer*_1.denom while _1 and _2 apparently are not the right ones to use?
1 reply
Fanpeng Kong
@fanpeng-kong
turned out this piece of information is hard to search than I expected
JamezMercier
@JamezMercier
@fanpeng-kong try that ? https://stackoverflow.com/a/14608449 the idea is to match it but I'm not sure if in your exercise it will work
JamezMercier
@JamezMercier
@fanpeng-kong it does compile
val compareRationals: (Rational, Rational) => Int = {case (x, y) => x.numer*y.denom - y.numer*x.denom}
1 reply
Christoph Knabe
@christophknabe
@fanpeng-kong The key to understanding this is, that compareRationals is a function with two parameters of type Rational, not with one parameter of a pair of Rationals. You can use the function literal syntax, or a case expression as it denotes a partial function, which is also a function. As the case expression was already given by @JamezMercier, here the alternative function literal (aka lambda expression).
val compareRationals: (Rational, Rational) => Int = (x, y) => x.numer*y.denom - y.numer*x.denom
mdolata
@mdolata
Hello all, I contributed to this project last November, will it ever be released? It looks like there are more similar small fixes to the tutorials and IMO would have been useful to deploy them.
Peter Pfister
@peter-pfister
Hi, taking the Cats Scala Exercises and the last topic, Eval, is broken. All of the questions have an answer already filled in and the Submit button is grayed out.
Navjot Singh Chahal
@navjotschahal
Hi everyone is there any Scala lang deve Meetup groups which are actually active and discuss latest developments inscala and host boot camps and organize events.
Prasad Mokkapati
@prasadmokkapati_twitter
Why is
val a = List(1, 3, 5, 7, 9)
// get the length of the list
a.length should equal(5)
failing ?
I get an error
error: value should is not a member of Int
Christoph Knabe
@christophknabe
@prasadmokkapati_twitter Please give the link to the exercise where you have this problem. I did not find it.
2 replies