Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 03:36
    som-snytt commented #9269
  • 03:00
    som-snytt synchronize #9275
  • 01:00
    som-snytt commented #727
  • Oct 23 22:23
    NthPortal commented #9242
  • Oct 23 22:11
    SethTisue edited #9274
  • Oct 23 22:11
    SethTisue ready_for_review #9274
  • Oct 23 22:10
    SethTisue review_requested #9274
  • Oct 23 22:10
    SethTisue synchronize #9274
  • Oct 23 22:06
    dwijnand commented #9242
  • Oct 23 22:05
    dwijnand commented #1265
  • Oct 23 22:04

    dwijnand on 2.13.x

    Allow forks to run bootstrapped… Merge pull request #9268 from d… (compare)

  • Oct 23 22:04
    dwijnand closed #9268
  • Oct 23 22:04
    dwijnand closed #663
  • Oct 23 21:38
    som-snytt commented #727
  • Oct 23 21:35
    som-snytt commented #9275
  • Oct 23 21:30
    scala-jenkins milestoned #9275
  • Oct 23 21:30
    som-snytt opened #9275
  • Oct 23 21:28
    SethTisue commented #9273
  • Oct 23 21:27
    SethTisue commented #9273
  • Oct 23 21:27
    SethTisue opened #727
sinanspd
@sinanspd
common hashing for pwds, Basic Auth tokens combined with Redis for sessions
The book doesn't cover the security implications of these choices in detail, if that's what you are looking for
Drew Boardman
@drewboardman
ok thanks for the info
how can i run just a simple program with a build.sbt and a single scala file?
do I really need to include a main class?
Luis Miguel Mejía Suárez
@BalmungSan
Wdym?
Drew Boardman
@drewboardman
i want to run the SKunk tutorial on this page
it's just running an IOApp
Luis Miguel Mejía Suárez
@BalmungSan
Ah yeah you need a main
IOApp is a main.
Drew Boardman
@drewboardman
hmm
Luis Miguel Mejía Suárez
@BalmungSan
However I was about to suggest using ammonite.
Drew Boardman
@drewboardman
sbt run is throwing
Luis Miguel Mejía Suárez
@BalmungSan
For single file programs it works pretty well, specially since you can include libraries.
Uhm can you share the error?
Drew Boardman
@drewboardman
sure sec
sinanspd
@sinanspd
IOApp in that example provides implicits that are needed for the program to run btw. It is more than marking a runnable
Drew Boardman
@drewboardman
sbt:doobie_tutorial> run
[warn] build source files have changed
[warn] deleted files:
[warn]   /home/drew/code/samples_and_examples/doobie_tutorial/build.sbt
[warn]   /home/drew/code/samples_and_examples/doobie_tutorial/project/metals.sbt
[warn] Apply these changes by running `reload`.
[warn] Automatically reload the build when source changes are detected by setting `Global / onChangedBuildSource := ReloadOnSourceChanges`.
[warn] Disable this warning by setting `Global / onChangedBuildSource := IgnoreSourceChanges`.
[error] java.lang.RuntimeException: No main class detected.
[error]         at scala.sys.package$.error(package.scala:30)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] (Compile / bgRun) No main class detected.
[error] Total time: 1 s, completed Oct 23, 2020 8:31:42 PM
off formatting
sinanspd
@sinanspd
what's your project structure ?
Luis Miguel Mejía Suárez
@BalmungSan
Have you tried reloading?
Drew Boardman
@drewboardman
it's just a build.sbt and this file basically
Luis Miguel Mejía Suárez
@BalmungSan
Ah yeah that is the problem.
sinanspd
@sinanspd
^
Drew Boardman
@drewboardman
so i need it in src/main?
Luis Miguel Mejía Suárez
@BalmungSan
Sbt expects the files in src/main/scala
You can change the location.
But again, ammonite may be easier.
Drew Boardman
@drewboardman
ammonite is a console right?
Luis Miguel Mejía Suárez
@BalmungSan
Yeah it is another Scala REPL.
Drew Boardman
@drewboardman
trying again with src/main/scala
it worked!!!
sinanspd
@sinanspd
nice
Luis Miguel Mejía Suárez
@BalmungSan
:tada:
Rob Norris
@tpolecat
You should be able to have a build.sbt and source in the same directory. Sbt used to allow that anyway.
Your IDE might not understand.
Drew Boardman
@drewboardman
i'm just using vim/metals for this
Luis Miguel Mejía Suárez
@BalmungSan
Yeah but you have to change the source setting, don't you?
Drew Boardman
@drewboardman
this is your tutorial btw. its great!!
i am swapping doobie for skunk
Rob Norris
@tpolecat
Cool, please open an issue if you find mistakes or things that are unclear.
Drew Boardman
@drewboardman
ok maybe i'll add an MR with instructions for how to run the program
i didnt mean that sarcastically, it's a great tutorial
Zhenhao Li
@Zhen-hao
hi, it seems that type MyFun = implicit In => Out is invalid in Scala 2. is there a way for me to define a function that returns a function that takes implicit arguments?
Martijn Hoekstra
@martijnhoekstra
no, functions can't have implicit arguments in scala 2, only methods can
Zhenhao Li
@Zhen-hao
clear. thanks! one more reason to look forward to Scala 3 ;)
Martijn Hoekstra
@martijnhoekstra
indeed!
functions become quite a bit more powerful in scala 3.
many of the restrictions listed in https://tpolecat.github.io/2014/06/09/methods-functions.html won't apply anymore