Where communities thrive


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

    github-actions[bot] on gh-pages

    deploy: a9ac5d6b7be337d0f00d5d6… (compare)

  • Dec 05 16:57

    armanbilge on main

    migrate caliper to jmh Merge pull request #1122 from i… (compare)

  • Dec 05 16:57
    armanbilge closed #1122
  • Dec 05 06:39

    github-actions[bot] on gh-pages

    deploy: 8758de53f15da92a37045aa… (compare)

  • Dec 05 06:33

    armanbilge on main

    Update sbt-scalafmt to 2.4.5 Merge pull request #1121 from s… (compare)

  • Dec 05 06:33
    armanbilge closed #1121
  • Dec 04 11:52
    armanbilge commented #1119
  • Dec 04 06:54
    i10416 opened #1122
  • Dec 04 06:29
    i10416 closed #1119
  • Dec 04 06:29
    i10416 commented #1119
  • Dec 04 05:33
    scala-steward opened #1121
  • Dec 04 02:39
    armanbilge commented #1119
  • Dec 04 02:13
    i10416 commented #1119
  • Dec 03 17:59

    github-actions[bot] on gh-pages

    deploy: d558de7374faabb60fb193e… (compare)

  • Dec 03 17:52

    armanbilge on main

    Update scalafmt-core to 3.2.1 Merge pull request #1120 from s… (compare)

  • Dec 03 17:52
    armanbilge closed #1120
  • Dec 03 17:10
    scala-steward opened #1120
  • Dec 03 15:18
    armanbilge commented #1119
  • Dec 03 15:17
    armanbilge commented #1119
  • Dec 03 14:57
    i10416 synchronize #1119
Soren
@srnb_gitlab
Is there a good way to send Reals over the wire?
Soren
@srnb_gitlab
Spire Matrices are mutable?
Luka Jacobowitz
@LukaJCB
there’s circe-spire, but I think it might be missing instances for Real
Valeriy Avanesov
@akopich
Hi. Does spire define a type for positive integers? Looks like Naturals include zero.
Feels like it would be extremely useful in combination with non-empty collections.
Paul Snively
@paul-snively
Hi everyone! I'm looking at Erik Osheim's wonderful https://www.youtube.com/watch?v=O78hnJuzQwA and wondering whether that elist library is out there somewhere I should be aware of?
I'm asking here because I figure Erik is likely to see it, sooner or later, but if anyone knows a better way to contact him, I'd appreciate knowing about it.
Carlos Quiroz
@cquiroz
Hello, I’m thinking to use UInt but I noted there is no ConvertableFrom nor ConvertableTo Uint unlike, e.g. Natural
Is there a reason for that?
Denis Rosset
@denisrosset
@akopich Why not use BigInt with https://github.com/fthomas/refined ? Natural is kind of a weird type
@cquiroz The whole ConvertableFrom, ConvertableTo business is not necessarily very principled. That said, using UInt with those typeclasses is likely to lead to boxing if the JIT is not clever enough.
Carlos Quiroz
@cquiroz
Thanks @denisrosset I have an entity that only takes positive numbers, I’ll take a look at refined
Valeriy Avanesov
@akopich
@denisrosset that would be an option, but I want to have at least some basic arithmetics on that type. E.g. positive plus positive should be also positive. Refined types don't give that.
Denis Rosset
@denisrosset
Why not a wrapper that only defines the + operation? Also, are you planning to have collections whose size is bigger than 2^63? You could use a wrapper around a Long then
I'd be wary of introducing a dependency on Spire if you don't have further need for the library
Valeriy Avanesov
@akopich

Why not a wrapper...

that's how i've implemented it eventually.

In fact, I wrapped Int.
Thanks for your input.
Soren
@srnb_gitlab
Does Spire have an equivalent in the Haskell world?
Paul Snively
@paul-snively
There are various numerical libraries for Haskell, but I don’t know of a kind of single umbrella that’s equivalent.
Soren
@srnb_gitlab
What are the uhh... Big O for Real#ceil, Real#floor, Real#log2?
Bro I hate this "i before e" rule because "ceiling" always feels like it shouldn't count even though it is after C but you have words like "ancient"
Martijn Hoekstra
@martijnhoekstra
there is no "i before e" rule
Soren
@srnb_gitlab
Well "ceiling" is the really hard one because it's like "see-əl-ing" so the first thought that comes to mind is "cieling" but that's a misspelling
:)
Denis Rosset
@denisrosset
Mmh, I have no idea about the asymptotics of "Real". Maybe @non would know?
Soren
@srnb_gitlab
Is there a typeclass meant to capture things that should "overflow"/have periods?
I.e. something I could use to represent a type usable in a LCG
Soren
@srnb_gitlab
(It's probably obvious but my brain hasn't been working this week)
Denis Rosset
@denisrosset
A LCG would be built out of the ring of integers modulo n, I guess?
Soren
@srnb_gitlab
So I should just need a Ring then? @denisrosset
I mean technically an LCG is just a + and a * and two elements right?
Denis Rosset
@denisrosset
Just use BigInt? you're probably not looking at generalizing LCG beyond integers, right?
Soren
@srnb_gitlab
hmm
Yeah, I guess so
Time to do more thinking. Seems like 128-bit numbers would be useful. Gonna look at how to implement them efficiently
Denis Rosset
@denisrosset
Good luck! a UInt128 type would be a nice addition to Spire
Mark de Jong
@Fristi
Is there a Enum type class like in Haskell http://learnyouahaskell.com/types-and-typeclasses ?
Enum members are sequentially ordered types — they can be enumerated. The main advantage of the Enum typeclass is that we can use its types in list ranges.
succ 'B'  
'C'
Luka Jacobowitz
@LukaJCB
@Fristi there’s one in cats-core
cats-kernel actually
Mark de Jong
@Fristi
Thanks that is great :)
Luciano
@lJoublanc
Hi guys, I recall asking whether there existed extensions for handling date/time/durations using a special cagetory/algebra, using a similar implementation approach to what spire has. And somebody pointed me to an experimental library. I think it may have been https://github.com/non/spire-time, but I can't remember for sure. This was a couple of years ago. Any other suggestions?
3 replies
Jakob Schikowski
@jakoschiko

Hi! I have some questions about Jet.

I'm working with a quite large codebase that uses Field for numeric calculations. It wasn't written with Jet in mind, but it seems to work and the performance is reasonable. However, I'm worried about some edge cases. There are a lot of divisions that check if the denominator is zero and as far as I can tell this won't work with Jet. Do you have any advice how to handle this situation?

Other question, does spire allows to use Jet with Rational? The JetAlgebra requires a lot of type classes, some of them are not implemented for Rational.

wqazi
@Wasiuddin
Hi, I am upgrading org.spire-math library to org.typelevel.spire . In org.typelevel.spire BigDecimalAlgebra are not supporting gcd function while as it was supporting in org.spire-math:0.13 version. Can someone please help me reason for removing and any subtitute method provided.
cquiroz
@cquiroz:matrix.org
[m]
You may want to ask on the typelevel discord channel for spire
Though at least I don’t have information though I seen to recall some of the Gcd code was commented out