There is certainly no reason why pointer semantic meaning cannot be
supported in encode/decode tools for Go. It does not seem hard to do, but
there was a choice not to do it. I shared my understanding of the reason,
but that's not a suggestion of difficulty or impossibility.
The most natural imple
You can use "-ldflags='-s -w'" to reduce the size, but it is expected that
wasm files will be in the order of MBs (see
https://golang.org/doc/go1.11#wasm).
> So I was wondering if there are tools that parse the .wasm and prune
unused pkgs?
The size is not due to unused packages being imported
On Mon, Mar 25, 2019 at 11:04 AM Matt Layher wrote:
>
> I've been doing low-level networking work in Go for a few years now, but I
> had a realization the other day:
>
> With the addition of the SyscallConn method in Go 1.9 to several
> net.Conn/PacketConn types, what is the advantage of using t
Yes, when using pointers and cycles you need to either use ids in the encoding
or break the cycle by dropping the cyclic fields (for example, a simple
‘parent’ field causes an infinite cycle so drop it and make it implicit)
> On Mar 26, 2019, at 2:27 PM, Thomas Bushnell, BSG
> wrote:
>
> I me
On Tue, Mar 26, 2019 at 11:48 AM Liam Breck wrote:
>
> Could anyone clarify the difference between these two?
>
> r := rand.New(rand.NewSource(...))
>
> var r rand.Rand; r.Seed(...)
Well, it's not a complete program, and maybe I'm missing something,
but it seems to me that the difference is that
Indeed this one is nice too. And quite simple to use compared to several
other solutions :)
I'm always astonished by the incredible number of code generation solutions
that Go developers have implemented to emulate strongly-typed generics in
Go.
In my own case, I've opted for an all-in-one to
I mean, everything except the things that are not pointers.
On Tue, Mar 26, 2019 at 2:45 PM Robert Engels wrote:
> This is not really true. In Java everything is a pointer (reference) and
> has no problem with the semantics of passing a reference, it is built into
> the serialization. They may b
On Tue, Mar 26, 2019 at 12:45 PM Robert Engels wrote:
>
> This is not really true. In Java everything is a pointer (reference) and has
> no problem with the semantics of passing a reference, it is built into the
> serialization. They may be in fact passed as a pointer (local rpc) or passed
> as
Could anyone clarify the difference between these two?
r := rand.New(rand.NewSource(...))
var r rand.Rand; r.Seed(...)
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an ema
This is not really true. In Java everything is a pointer (reference) and has no
problem with the semantics of passing a reference, it is built into the
serialization. They may be in fact passed as a pointer (local rpc) or passed as
a copy of the object graph, or something in between (custom).
godoc doesn't work in module mode yet. The workaround is to create a
directory resembling a GOPATH and put your project there and set the GOPATH
variable to that.
Tracking issue here - https://github.com/golang/go/issues/26827
On Tuesday, 26 March 2019 18:07:23 UTC+5:30, Weerasak Chongnguluam
When we think of pointers as what they literally are, an address to a space
in memory, it sounds reasonable for Gob to not support them. Things get
more unclear when we consider that, in practice, Go programmers often use
pointers as a replacement for option types. Without pointers, I don't know
ho
To be clear here as educators, it is important to point out that exporting
/ persisting / sending a pointer is an awkward concept.
The normal meanings of sending data beyond an executing program have no
direct use for the pointer’s literal value; “the thing at location 12345 in
the memory of a pro
On Mon, 25 Mar 2019 at 14:45, Glen Huang wrote:
> Thanks for the reply, Sameer.
>
> Being able to directly send go types is a really big plus for me, I wonder
> if I really want to use gob, are there any recommended rpc choices?
>
Note that gob has at least one significant limitation when encodi
On Tue, Mar 26, 2019 at 4:05 AM wrote:
>
> Hi,
>
> Am using mongodb as database. Am able to query the database from the command
> line using the command
>
> db.nfinstances.distinct("ipv4Addresses",{"nfType":"AMF", "amfInfo.amfSetId":
> "3fa85f64-5717-4562-b3fc-2c963f66af33"})
>
> and this give m
On Tue, 26 Mar 2019, at 12:37 PM, XiaoBing Jiang wrote:
> Hi, all:
>
> in src/cmd/compile/internal/syntax/nodes.go, why need the aNode() function in
> the interface?
>
> type Node interface {
> // Pos() returns the position associated with the node as follows:
> // 1) The position of a node repr
I try to use `godoc` to render package's documentation of module. But
`godoc` parsing only packages in `GOPATH`. How to use `godoc` with Go's
module or have alternative tool to render document of Go's module?
--
You received this message because you are subscribed to the Google Groups
"golang-
Hi, all:
in src/cmd/compile/internal/syntax/nodes.go, why need the aNode() function
in the interface?
type Node interface {
// Pos() returns the position associated with the node as follows:
// 1) The position of a node representing a terminal syntax production
//(Name, BasicLit, etc.) is th
I know that the Go wasm support is still experimental, although it seems to
be working great here! :) but are there any tools for pruning the .wasm
output? I'm only using about 3 pkg imports but end up with a 2.6MB .wasm
file. I've seen the suggestion for using tinygo, but I didnt get that
wo
Hi,
Am using mongodb as database. Am able to query the database from the
command line using the command
db.nfinstances.distinct("ipv4Addresses",{"nfType":"AMF",
"amfInfo.amfSetId": "3fa85f64-5717-4562-b3fc-2c963f66af33"})
and this give me ipaddress [x.x.x.x] output that i want.
mongo command
You may be also interested in https://github.com/mmatczuk/go_generics (the
credit goes to Google).
With it you can write a generic code that actually compiles and change the
types later ex. https://github.com/scylladb/go-set/tree/master/internal/set
W dniu poniedziałek, 25 marca 2019 15:58:03 U
Hi there,
I'm looking for a tool to help create a RestFUL interface on a MariaDB
database with many several tables.
There are plenty of tutorials on this topic like that of
https://github.com/kelvins/GoApiTutorial [1] however it's _very_ labourious
to do this for anything more than a couple of
22 matches
Mail list logo