Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:14
    retronym synchronize #9622
  • 01:18
    retronym commented #9622
  • 01:15
    retronym synchronize #9622
  • 01:14
    SethTisue edited #1413
  • 01:13
    SethTisue labeled #1413
  • 01:13
    SethTisue assigned #1413
  • 01:12
    SethTisue opened #1413
  • 01:10

    SethTisue on 2.13.x

    advance akka (#1411) (compare)

  • 01:10
    SethTisue closed #1411
  • 00:57
    SethTisue commented #1409
  • 00:56
    SethTisue commented #1409
  • 00:55
    SethTisue synchronize #1411
  • 00:55

    SethTisue on 2.13.x

    oops (compare)

  • 00:51
    SethTisue milestoned #12395
  • 00:51
    SethTisue labeled #12395
  • 00:51
    SethTisue labeled #12395
  • 00:51
    SethTisue labeled #12395
  • 00:44
    som-snytt opened #12395
  • May 12 23:41
    som-snytt commented #8885
  • May 12 23:25
    SethTisue commented #9258
Rob Norris
@tpolecat
Is bad.
Luis Miguel Mejía Suárez
@BalmungSan
@plokhotnyuk oh I always though you would have defined your own ADT. I should read a bit more about those libraries; I do not like recommending only circe just because is the one l like, but I barely know what the others do.
Rob Norris
@tpolecat
2 replies
Rohan Sircar
@rohan-sircar
woah
Luis Miguel Mejía Suárez
@BalmungSan
:0
:tada:
D. Venkatesh
@VenDurai
Hi need help on calling rest API inside DataFrame to post DataFrame col data and get service response json. The result is single and simple json. I have tried creating udf , df.map both works but the performance is too slow. Please let me know better way to call Rest API inside DataFrame with better performance. Thanks in advance.
Martijn
@martijnhoekstra:matrix.org
[m]
hurray!
D Cameron Mauch
@DCameronMauch
Anyone know what happened to the "FP for Mortals With Cats” book? It used to be here: https://leanpub.com/fpmortals-cats
Rob Norris
@tpolecat
Don’t know. Try Scala with Cats at underscore.io and Practical FP in Scala by Gabriel Volpe
D Cameron Mauch
@DCameronMauch
Cool, thanks
Justin Reeves
@justinallenreeves
I came across some code with some nested eithers but they nest left and it looks like spaghetti. Is there an easier way? I know I can do for comps right biased.
Maybe I should just reverse the parameters.
Adam Rosien
@arosien
they could be trying to have "multiple" error types via nested lefts. alternatively they could make an algebraic data type that contains the set of errors they want
Justin Reeves
@justinallenreeves
That’s what it’s doing, it’s just a mess of left projections and map/flatmaps and indentation that’s hard to follow.
Rob Norris
@tpolecat
It may be easier to pattern-match.
Adam Rosien
@arosien

Either[Either[ErrorA, ErrorB], C] could be

sealed trait CoolError
case class CoolErrorA(e: ErrorA) extends CoolError
case class CoolErrorB(e: ErrorB) extends CoolError

then you have Either[CoolError, C]

Matthias Berndt
@mberndt123
OK, apparently somebody tagged 3.0 earlier. And now the tag's gone again.
trepidacious
@trepidacious
Just doing some archaeology... Scala 2.9.1 was only compatible with JDK up to 6?
Matthias Berndt
@mberndt123
And now the 3.0.0 tag is back, but it's another commit sha :D
econoraptor
@econoraptor
Have any of you run into trouble with debuggers when using the @main annotation? Intellij is ignoring breakpoints.
Rob Norris
@tpolecat
You may be the first person to ever try to run a debugger with Scala 3.
econoraptor
@econoraptor
is this a joke about being able to heavily rely on compiler feedback
velvetbaldmime
@velvetbaldmime:matrix.org
[m]
I think IJ support for Scala 3 is not really in the state where debugging is the only remaining frontier :)
That said, I haven't tried debugging in metals yet.. or, for that matter, debugging scala in general.
Adam Rosien
@arosien
i recently scala 2 tried in vscode (metals), breakpoints worked but the values on the stack and the controls to pause threads were a bit broken. but, then again, debuggers are not very useful imho. i'm also very impatient and a good ol' println and kill -QUIT <pid> usually tells me what i need to know
econoraptor
@econoraptor
I find them very useful when I'm less certain about what the issue might be or when I want to inspect an object I'm unfamiliar with
Rob Norris
@tpolecat
If there were a good Scala debugger I would definitely use it.
Adam Rosien
@arosien
i'm working on a DAP (debug adapter protocol, which VS Code and metals uses) project, and it's quite cool.
Rob Norris
@tpolecat
Huh. For what?
Adam Rosien
@arosien
an apache project that has a fancy data format processor wants a fancy debugger (vs. a janky command-line version)
Eric K Richardson
@ekrich
Where is the project at? What is the difference between this and the normal Java debugger stuff?
Adam Rosien
@arosien
it's http://daffodil.apache.org/. you don't necessarily want to debug at the JVM/Java/Scala-level, you want to debug in terms of your higher-level state machine
DAP is just a spec that lets IDEs use a common protocol for different debugger backends
(don't look at the scala code at daffodil. it needs some help.)
Anton Sviridov
@velvetbaldmime:matrix.org
[m]
Don't we all.
Seth Tisue
@SethTisue

Just doing some archaeology... Scala 2.9.1 was only compatible with JDK up to 6?

@trepidacious 2.9.3 works on 7. no 2.9.x version works on 8

whatever you do, don't drink the sarcophagus juice
econoraptor
@econoraptor
apparently intellij can't break in top-level scala methods in general https://youtrack.jetbrains.com/issue/SCL-18490?_ga=2.112362820.1787344824.1620772442-1110478992.1614126432
Maksim Levental
@makslevental

is there a way to make this class generic in SInt

class Matrix(rows: Int, cols: Int, bitWidth: Int) extends Bundle {
    val data: Vec[Vec[SInt]] = Vec(rows, Vec(cols, SInt(bitWidth.W)))
}

note the SInt.apply

Luis Miguel Mejía Suárez
@BalmungSan
Maksim Levental
@makslevental
cool thanks
Luis Miguel Mejía Suárez
@BalmungSan
The typeclass would provide everything you would need, from that factory method to all the operations on values.
Then users that would like to use your Matrix with their own types only need to provide the instance of the typeclass for that type.
Maksim Levental
@makslevental
there's an associated type floating around in this concept right? I'm familiar with traits in Rust that have associated types
Luis Miguel Mejía Suárez
@BalmungSan
Rust traits are typeclasses (or at least equivalent) AFAIK.
Dermot Haughey
@hderms
Is there any consensus on where your imports should live in Scala files? Like if something is being imported only in the context of a given function, does it make sense to import it there? same with a class or object
Rob Norris
@tpolecat
It's most common to put them all up at the top.
zeroexcuses
@zeroexcuses
news
Seth Tisue
@SethTisue
I like local imports
Eric K Richardson
@ekrich
Local can be an extra constraint where code goes. @tpolecat, I would think you would like.