Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Santhosh T
If it is not in stadnard library, then i will use the approach taken by json.Number in stdlib that seems simpler, let the users decide how to use it. thanks Santhosh On Wed, Feb 17, 2021 at 3:02 AM Brian Candler wrote: > Not in the standard libraries. See (declined): > >

[go-nuts] Re: embed.FS and memory limitations

2021-02-16 Thread 'Kevin Chowski' via golang-nuts
If you had a simple test program or microbenchmark which put some numbers behind your concerns, I think you'll get a bit more traction. Have you tried to measure the effect of page faults on reading data from embedded files (or, I guess, any sort of data that has fallen out of the pagecache)?

[go-nuts] Re: go get not working in Go 1.16

2021-02-16 Thread 'Carla Pfaff' via golang-nuts
On Tuesday, 16 February 2021 at 22:57:07 UTC+1 pkle...@xs4all.nl wrote: > Also, you can't use local packages without a dot in the name. > I do this all the time. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] Re: go get not working in Go 1.16

2021-02-16 Thread Peter Kleiweg
Op dinsdag 16 februari 2021 om 21:40:52 UTC+1 schreef Ian Lance Taylor: > On Tue, Feb 16, 2021 at 12:34 PM Peter Kleiweg wrote: > > > > `go get` is broken. It doesn't download packages. > > Tell us what you did, what you expected to happen, and what happened > instead. Thanks. > > Note that

Re: [go-nuts] Re: SQLite3 Support without CGo

2021-02-16 Thread ben...@gmail.com
Jan, is there any write-up about modernc.org/sqlite? I've dabbled in automated conversion, and I'm very curious if there's more information about how it works, any pitfalls / unsupported stuff, etc, but having trouble finding anything like that in the repos. On Sunday, January 24, 2021 at

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Brian Candler
Not in the standard libraries. See (declined): https://github.com/golang/go/issues/12127 https://github.com/golang/go/issues/12332 However there are links to third-party libraries in those tickets. On Tuesday, 16 February 2021 at 21:04:30 UTC Santhosh T wrote: > is there java's BigDecimal

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread 'Dan Kortschak' via golang-nuts
On Wed, 2021-02-17 at 02:33 +0530, Santhosh T wrote: > is there java's BigDecimal equivalent in golang ? There is, for example https://github.com/shopspring/decimal. But you should ask yourself why you need this. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Santhosh T
is there java's BigDecimal equivalent in golang ? thanks Santhosh On Wed, Feb 17, 2021 at 2:05 AM Brian Candler wrote: > You compared Golang's BigFloat with Java's BigDecimal. They are not the > same. > > On Tuesday, 16 February 2021 at 20:30:28 UTC Santhosh T wrote: > >> in Java, this is not

Re: [go-nuts] Re: Go 1.16 is released

2021-02-16 Thread Fernando Meyer
$ go get -u github.com/boyter/scc/ go: downloading github.com/boyter/scc v1.12.1 go: downloading github.com/boyter/scc v2.12.0+incompatible go: downloading github.com/spf13/cobra v1.1.3 go: downloading golang.org/x/text v0.3.5 go: downloading gopkg.in/yaml.v2 v2.4.0 go: downloading

Re: [go-nuts] Re: Go 1.16 is released

2021-02-16 Thread Brad Fitzpatrick
Elaborate? On Tue, Feb 16, 2021 at 12:34 PM Peter Kleiweg wrote: > `go get` is broken. It doesn't download packages. > > Op dinsdag 16 februari 2021 om 20:56:37 UTC+1 schreef Alex Rakoczy: > >> Hello gophers, >> >> We just released Go 1.16 >> >> To find out what has changed in Go 1.16, read the

[go-nuts] go get not working in Go 1.16

2021-02-16 Thread Ian Lance Taylor
On Tue, Feb 16, 2021 at 12:34 PM Peter Kleiweg wrote: > > `go get` is broken. It doesn't download packages. Tell us what you did, what you expected to happen, and what happened instead. Thanks. Note that module support is now on by default (https://golang.org/doc/go1.16#go-command), which can

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Brian Candler
You compared Golang's BigFloat with Java's BigDecimal. They are not the same. On Tuesday, 16 February 2021 at 20:30:28 UTC Santhosh T wrote: > in Java, this is not case. > > BigDecimal v = new BigDecimal("123.4"); > System.out.printf("%.20f\n", v); // prints

[go-nuts] Re: Go 1.16 is released

2021-02-16 Thread Peter Kleiweg
`go get` is broken. It doesn't download packages. Op dinsdag 16 februari 2021 om 20:56:37 UTC+1 schreef Alex Rakoczy: > Hello gophers, > > We just released Go 1.16 > > To find out what has changed in Go 1.16, read the release notes: > https://golang.org/doc/go1.16 > > You can download binary and

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Jan Mercl
On Tue, Feb 16, 2021 at 9:30 PM Santhosh T wrote: > in Java, this is not case. That compares decimal vs floating point representations. Those have very different properties, for different usage patterns. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Santhosh T
in Java, this is not case. BigDecimal v = new BigDecimal("123.4"); System.out.printf("%.20f\n", v); // prints 123.4000 System.out.printf("%.40f\n", v); // prints 123.4000 you can see that it is represented exactly. I

[go-nuts] Go 1.16 is released

2021-02-16 Thread Alex Rakoczy
Hello gophers, We just released Go 1.16 To find out what has changed in Go 1.16, read the release notes: https://golang.org/doc/go1.16 You can download binary and source distributions from our download page: https://golang.org/dl/ If you have Go installed already, an easy way to try go1.16 is

Re: [go-nuts] The Generics Proposal has been accepted!

2021-02-16 Thread David Skinner
I have been so very much looking forward to Go 2.0 and generics. Getting it in 1.18 is the icing on the cake. I seriously did not think you could do it considering that everyone was pulling you in different directions. Well Done! Defining the job is 90% of the project. The coding and testing

Re: [go-nuts] Error handling

2021-02-16 Thread David Skinner
I wanted to express my thanks to Mickael McKinnus for his research. I am someone who is quite happy with the error handling in Go as it lets me implement whatever I like, I must say it is obviously flawed from the standpoint that the proper constructs are not part of the language but part of

Re: [go-nuts] big.Float.Cmp does not work as expected

2021-02-16 Thread Brian Candler
On Sunday, 14 February 2021 at 21:57:31 UTC kortschak wrote: > 123.4 cannot be represented in binary with a finite number of bits. > > See: https://0.30004.com/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] embed.FS and memory limitations

2021-02-16 Thread Carlo Alberto Ferraris
Was going through the implementation of embed.FS and started wondering about the lack of WriteTo - specifically about the implications in case the embedded data is not present in memory e.g. because it got evicted due to memory pressure - or simply due to outright not fitting in memory. Won’t

[go-nuts] [ANN] star-tex: a Go engine for TeX

2021-02-16 Thread Sebastien Binet
hi there, I'd like to introduce star-tex[1], a (Work In Progress) TeX engine. it wraps the output of the official texlive tex.w WEB file (ie: C/C++ files) as a CGo package. the idea is to replace in an adiabatical fashion the C bits with their Go equivalent. there's already code that can

Re: [go-nuts] type checking custom interface{} is not working as expected

2021-02-16 Thread Santhosh Kumar T
I change it to following: type JSON struct{ Val interface{} } thanks Santhosh On Tuesday, February 16, 2021 at 1:58:58 PM UTC+5:30 arn...@gmail.com wrote: > You need you Json type to be a concrete type, e.g. (if the underlying type > is a string) > > type Json string > > Then users can try to

Re: [go-nuts] type checking custom interface{} is not working as expected

2021-02-16 Thread Arnaud Delobelle
You need you Json type to be a concrete type, e.g. (if the underlying type is a string) type Json string Then users can try to assert that what they get is of concrete type Json Cheers, Arnaud On Tue, 16 Feb 2021, 08:20 Santhosh Kumar T, wrote: > I am not using either json.Marshaler or

Re: [go-nuts] type checking custom interface{} is not working as expected

2021-02-16 Thread Santhosh Kumar T
I am not using either json.Marshaler or json.Unmarshaller my project implements mysql binlog replication protocol i have a method: fn nextRow() []interafce{} which returns values in row as slice. the row might contain VARCHAR and JSON type columns in mysql table definition if actual json

Re: [go-nuts] type checking custom interface{} is not working as expected

2021-02-16 Thread 'Axel Wagner' via golang-nuts
An interface type-assertion asserts that the dynamic value in the interface (in this case it's `string`) implements the interface you are asserting (in this case `myinterface`). As `myinterface` has no methods, every value implements that interface. In general, a type-assertion will assert things