I would agree with Axel, that while gob is convenient, it never claims to
be optimal.
And if you care about size and speed of encoding then it may be worth
looking at
other serialisation formats.
See https://ugorji.net/blog/benchmarking-serialization-in-go for some
alternatives
On Sunday,
On Sun, Apr 4, 2021 at 6:13 AM Sam Whited wrote:
>
> In a library I have a `func(context.Context, net.Conn)' (more or less,
> https://godoc.org/mellium.im/xmpp#NewSession). The context is used
> throughout the function to eg. break out of loops, gets passed into
> other functions, etc. and the con
It's not official or Go-specific, but you could try:
https://codereview.stackexchange.com/
—Sam
On Sun, Apr 4, 2021, at 09:20, Tong Sun wrote:
> I remember I've been to a page/site where people can ask for review for
> their open source projects, commits, etc.
>
> Is there such site/service,
You could try the Slack channel #reviews on gophers.slack.com
-alex
On Sun, 4 Apr 2021, 09:20 Tong Sun, wrote:
> I remember I've been to a page/site where people can ask for review for
> their open source projects, commits, etc.
>
> Is there such site/service, or my memory has fainted (e.g., it
Since Dimension can hold any instance type it needs to encode each type for
each element of the slice. I would file an enhancement to use RLE when encoding
interface slices. It won’t be backwards compatible though.
> On Apr 4, 2021, at 10:22 AM, 'Axel Wagner' via golang-nuts
> wrote:
>
>
>
On Sun, 4 Apr 2021 at 00:48, Eltjon Metko wrote:
> I was fully expecting for floodgates of comments to open again but it
> seems we have reached a point of maturity in the generics proposal.
> The new proposal really makes the intent much clearer both on the exact vs
> underlying type match front
manlio@gmail.com schrieb am Sonntag, 4. April 2021 um 19:03:48 UTC+2:
> Thanks, it is really interesting.
>
Thanks.
> Do you know if there is a similar module that use the DOM API as target
> instead of the Canvas API?
>
I haven't looked for it, so I don't know if something like that exi
Il giorno domenica 4 aprile 2021 alle 10:32:36 UTC+2 Frederik Zipp ha
scritto:
> I often find myself wanting to visualize simple graphics or even
> interactive animations from a Go program without resorting to
> platform-dependent or Cgo-based libraries, so I created this Go module:
>
> https:/
Oh, I should also not, to be fair: You *can* decode the gob into an
`[]Dimension`, but you *can't* do the same with json. So, the comparison
with json is unfair insofar, as the encoded json is actually incomplete -
it doesn't hold the type-information of *which* `Dimension` implementation
to use.
I believe it is expected behavior (well… given that the gob format is
pretty much defined as "whatever the gob package does", it surely is, at
this point).
gob is able to decode types completely, without having a "framework" to
work on - you need to pass a pointer to `json.Unmarshal`, so that the
d
On Sun, 4 Apr 2021 20:16:15 +0700
Shulhan wrote:
> Hi all,
>
> I found an error that instantiate with type that have field cannot be
> compared with the instance of the same type. Here is the test code,
>
>
> type typeErrorWithoutField struct{}
>
> func (te *typeErrorWithoutF
Hi,
Gob in general is pretty efficient however I am seeing, what seems to be an
anomaly in its behavior when it comes to serilazing interfaces.
To elaborate, I have a program defining a simple interface called Dimension
and a struct Point.
*type Dimension interface{}*
*type Point struct {*
* X,
I remember I've been to a page/site where people can ask for review for
their open source projects, commits, etc.
Is there such site/service, or my memory has fainted (e.g., it's for go
core only etc)?
thanks
--
You received this message because you are subscribed to the Google Groups
"gola
Hi all,
I found an error that instantiate with type that have field cannot be
compared with the instance of the same type. Here is the test code,
type typeErrorWithoutField struct{}
func (te *typeErrorWithoutField) Error() string {
return "typeError"
In a library I have a `func(context.Context, net.Conn)' (more or less,
https://godoc.org/mellium.im/xmpp#NewSession). The context is used
throughout the function to eg. break out of loops, gets passed into
other functions, etc. and the conn is read from. If the user creates and
passes in a context
Hi all,
Does anyone know where the Display profile from x/net/idna [1] is
defined?
I thought it corresponded to the rules defined in RFC 5895 [2], but it
also appears to apply the Bidi rule and some other things not defined
there. Unlike the other profiles the Display one has no comment saying
wh
On Sun, Apr 4, 2021 at 2:18 PM K. Alex Mills wrote:
> This seems like a welcome change and leaves the door open for the future
> inclusion of type unions. Nicely done!
>
> Regarding this approximation operator, I have a question about the
> intended meaning of:
>
> ~struct{
> F int
> A string
This seems like a welcome change and leaves the door open for the future
inclusion of type unions. Nicely done!
Regarding this approximation operator, I have a question about the intended
meaning of:
~struct{
F int
A string
}
Would this match the following types?
type A struct{
F int
A
I often find myself wanting to visualize simple graphics or even
interactive animations from a Go program without resorting to
platform-dependent or Cgo-based libraries, so I created this Go module:
https://github.com/fzipp/canvas
It streams drawing operations and keyboard/mouse/touch events to
19 matches
Mail list logo