Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 19 06:44
    aeons closed #116
  • Jun 19 06:44
    aeons commented #116
  • Jun 13 19:27
    ochrons commented #115
  • Jun 13 18:33

    ochrons on master

    Update CHANGES.md (compare)

  • Jun 13 10:18
    aeons opened #116
  • Jun 12 13:24

    ochrons on master

    Update utest to 0.6.8/0.6.9 Update scala 2.12.6 to 2.12.8 Update scalajs to 0.6.28 and 2 more (compare)

  • Jun 12 13:24
    ochrons closed #115
  • Jun 12 13:24
    ochrons commented #115
  • Jun 12 12:50
    tOverney commented #115
  • Jun 10 18:56
    Philippus opened #115
  • May 11 15:29

    ochrons on master

    Release 1.3.1 (compare)

  • May 11 15:28
    ochrons commented #113
  • May 11 15:27

    ochrons on master

    Release 1.3.1 (compare)

  • May 11 15:26

    ochrons on master

    Release 1.3.1 (compare)

  • May 11 15:25

    ochrons on v1.3.1

    (compare)

  • May 11 15:25

    ochrons on master

    Release 1.3.1 (compare)

  • May 11 15:25

    ochrons on v1.3.0

    (compare)

  • May 11 11:22

    ochrons on master

    Update scalajs to 0.6.27 Update utest to 0.6.7 Support scala 2.13.0-RC1 and 5 more (compare)

  • May 11 11:22
    ochrons closed #114
  • May 11 11:22
    ochrons closed #113
Otto Chrons
@ochrons
:+1:
Brandon Elam Barker
@bbarker
look forward to using it when I can finally try 2.13 ;-) thanks
Bjørn Madsen
@aeons
@ochrons looks like the last build failed https://travis-ci.org/suzaku-io/boopickle/builds/544741984
there's no released version for 2.13 at least :)
Otto Chrons
@ochrons
that failure was just some jdk9 thing, works on jdk10
elyphas
@elyphas

Hi, someone could tell me? please, why I get this error:

Cannot materialize pickler for non-case class: Either[String,T]. If this is a collection, the error can refer to the class inside.
[error]             val unPickle = Unpickle[Either[String, T]].fromBytes(value)

with this code:

  def searchDescripCatalog[T](id: String, component: Handler[String], resource: String) = {
    val payload = Pickle.intoBytes[String](id)
    val respondWS = client.send(resource :: Nil, payload, SendType.WhenConnected, 30 seconds)
    respondWS.failed.foreach(println)
    respondWS.onComplete {
      case Success(value) =>
        value match {
          case Right(value) =>
            val unPickle = Unpickle[Either[String, T]].fromBytes(value)
            unPickle match {
              case Right(value) => component.onNext(value.descripcion.getOrElse(""))
              case Left(error) =>
                org.scalajs.dom.window.prompt(error)
            }
          case Left(value) =>  org.scalajs.dom.window.prompt(value)
        }
      case Failure(exception) => org.scalajs.dom.window.prompt(exception.getMessage)
    }
  }
Otto Chrons
@ochrons
you don't provide a Pickler[T]
elyphas
@elyphas
Ah, ok thank you
Bjørn Madsen
@aeons
@ochrons ah ok, is there a release on 2.13 on the way?
Otto Chrons
@ochrons
will do tonight
Bjørn Madsen
@aeons
great, thanks! :)
Otto Chrons
@ochrons
published 1.3.1 for 2.13 now :)
Bjørn Madsen
@aeons
:rocket:
Nils Kilden-Pedersen
@nilskp
Does anyone have an example of how to create a pickler for a collection, in my case immutable.TreeMap that contain types that don't already have a pickler?
In other words, I can't seem to pickle any case class that contains a collection with a type not doesn't have default pickler.
Otto Chrons
@ochrons
did you look at the Boopickle source code on how the collection picklers are implemented?
Nils Kilden-Pedersen
@nilskp
No, I was hoping there was an example. Do you have a specific file I should look at?
note the collections changed a lot in 2.13, so there is a different implementation for that version
Nils Kilden-Pedersen
@nilskp
@ochrons is it a known/deliberate limitation, that case classes containing collections with certain types, won't generate automatically? In my case, it's a TreeMap with LocalDate as key and a case class as value. I assume it's the LocalDate that's causing the issue, but even having a LocalDate pickler in scope doesn't seem to resolve the issue.
Otto Chrons
@ochrons
yea, it's a long standing issue, but not something that can be easily resolved
sometimes you just need to supply the pickler manually
Nils Kilden-Pedersen
@nilskp
Is it also an issue with TreeMap, due to the Ordering going along? It cannot use a simple collection.Map pickler for that, as the ordering would be lost.
Otto Chrons
@ochrons
could be, can you make a scalafiddle.io sample of the problem?
jhegedus42
@jhegedus42
can boopickle serialize a Map[String,SomeCaseClass[Any]] ?
Andriy Plokhotnyuk
@plokhotnyuk
Is Any for scala.Any?
jhegedus42
@jhegedus42
hmmm
good question
let's say
more like Map[String,ReferencedValue[_]]
I am not sure what is the difference betwen the two
but basically
actuall
yes
but you know what
i think i just store Map[String,JSON]
and then problem is solved :)
and use circe
Andriy Plokhotnyuk
@plokhotnyuk
Is it required to work with scala.js?
jhegedus42
@jhegedus42
will
well
yeah
ideally :)
Otto Chrons
@ochrons
same as all other serialization libraries, it needs to know the types at compile time and you need to provide picklers for them
Dermot Haughey
@hderms
anyone have any idea how much faster boopickle would be than circe?
especially if boopickle was using binary codecs
we are trying to serialize like 200MB of data
Andriy Plokhotnyuk
@plokhotnyuk
it depends a lot on payload and environment... as an example jsoniter-scala can serialize with speed up to 3Gb/sec... please see the full picture here
Dermot Haughey
@hderms
@plokhotnyuk thanks I'll give it a look
Otto Chrons
@ochrons
for text, Boopickle is not faster, but for something like numbers, especially floating point, it can be much much faster than any JSON codec
Boopickle comes with a performance test suite that you can easily modify to match your data and see the differences