Re: [go-nuts] Can I play with go1.18 beta while keeping my stable 1.17 version around for production code?

2021-12-15 Thread fgergo
Sure: https://go.dev/doc/manage-install#installing-multiple On 12/15/21, Travis Keep wrote: > This may be silly question, but is there a way for me to download and play > with 1.18 while keeping my existing 1.17 installation for production code? > > Is there a way to have multiple versions of g

Re: [go-nuts] Threats found on Win 10 21H1 64 bit computer

2021-12-15 Thread Ian Lance Taylor
On Wed, Dec 15, 2021 at 4:55 PM rob wrote: > > I am compiling my own code using Go 1.17.5 (also happens w/ other versions) > > When I compile this code on my computer running win 10 21H1 64-bit > system using "go install", the resulting exe file bothers windows > anti-virus a lot. This is what I

[go-nuts] Threats found on Win 10 21H1 64 bit computer

2021-12-15 Thread rob
I am compiling my own code using Go 1.17.5 (also happens w/ other versions) When I compile this code on my computer running win 10 21H1 64-bit system using "go install", the resulting exe file bothers windows anti-virus a lot.  This is what I see    Behavior:Win32/Execution.A!ml  Severe

[go-nuts] Re: generics: what can we do with an any type?

2021-12-15 Thread Brian Candler
NewThing[int, int]() returns a map[int]int, and therefore that's the type of MySet in func runInt. You can think of NewThing[T1, T2] as a family of functions, like func NewThing_int_int() map[int]int { ... } func NewThing_int_byteslice() map[int][]byte { ... } ... etc On Wednesday, 15 Decembe

[go-nuts] Bend time to your will and make your gray-t escape in MONOVANIA (powered by Ebiten)

2021-12-15 Thread Trevor Slocum
MONOVANIA[0] was created for the Metroidvania Month 14 game jam.[1] Its source code is freely available.[2] Players start the game with the ability to rewind time. The objective of MONOVANIA is to collect the three exit keys and make your gray-t escape. What is a Metroidvania video game? > Me

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Ian Lance Taylor
On Wed, Dec 15, 2021 at 3:24 AM Leonard Mittmann wrote: > > I just learned that type constraints, which are defined as interfaces are > actually not usable in all the places "normal" interfaces can be used in. > E.g., why can a constraint interface not be uses as a struct type? > > Let's say I h

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Ian Lance Taylor
On Wed, Dec 15, 2021 at 8:29 AM Brian Hatfield wrote: > > I read that and I genuinely do not understand why interfaces now mean two > distinct incompatible things. I think this is going to confuse a lot of > people. This is perhaps pedantic, but the two meanings are not incompatible. The set of

[go-nuts] Introducing TimeMate - How to make time & microservices work for you with Golang and GRPC

2021-12-15 Thread X Technology
Have you ever heard of a Pomodoro technique? 🍅 It helps stay in the flow and focused even when activities are overwhelming. We believe that everyone has it's own time management style and it's just a matter of time to find a right tracker. Maybe a better idea, to write a new one! This time we

Re: [go-nuts] Re: Go 1.18 Beta 1 is released

2021-12-15 Thread Jan Mercl
On Wed, Dec 15, 2021 at 7:41 PM Austin Clements wrote: > Jan, assuming you're running on an AMD CPU, this is go.dev/issue/34988 (if > you're not running on an AMD CPU, that would be very interesting to know!) > The TL;DR is that this appears to be a kernel bug, and we have a C > reproducer, bu

Re: [go-nuts] Re: Go 1.18 Beta 1 is released

2021-12-15 Thread 'Austin Clements' via golang-nuts
Jan, assuming you're running on an AMD CPU, this is go.dev/issue/34988 (if you're not running on an AMD CPU, that would be very interesting to know!) The TL;DR is that this appears to be a kernel bug, and we have a C reproducer, but we do not yet have a fix or a workaround. On Wed, Dec 15, 2021 a

Re: [go-nuts] Can I play with go1.18 beta while keeping my stable 1.17 version around for production code?

2021-12-15 Thread Brian Hatfield
Yes! If you see the release email, there's some steps included: If you have Go installed already, the easiest way to try go1.18beta1 is by using the go command: $ go install golang.org/dl/go1.18beta1@latest $ go1.18beta1 download On Wed, Dec 15, 2021 at 12:03 PM Travis Keep wrote: > This may be

Re: [go-nuts] Can I play with go1.18 beta while keeping my stable 1.17 version around for production code?

2021-12-15 Thread Bruno Albuquerque
Yes, see instructions on how to download/install go1.18beta1. It explicitly suggests a way that will allow this. On Wed, Dec 15, 2021 at 9:03 AM Travis Keep wrote: > This may be silly question, but is there a way for me to download and play > with 1.18 while keeping my existing 1.17 installatio

[go-nuts] Hiring Go Lang Developers - Spenmo (Leading Fintech)

2021-12-15 Thread Daily Job Alert
Spenmo hiring Engineers for below job roles from Fintech or B2B Startup or Product based companies. *Job 1: Golang Developer (Backend)* Experience: 3 - 5 years Prog Lang : Golang Must,Laravel (advantage) Frame Work: Unit, Integration and E2E test Design Pattern : REST, Pub/Sub Preferable Skills:

[go-nuts] Can I play with go1.18 beta while keeping my stable 1.17 version around for production code?

2021-12-15 Thread Travis Keep
This may be silly question, but is there a way for me to download and play with 1.18 while keeping my existing 1.17 installation for production code? Is there a way to have multiple versions of go installed on the same computer? -- You received this message because you are subscribed to the G

[go-nuts] Re: generics: what can we do with an any type?

2021-12-15 Thread Sean Liao
when writing type parameterized code, it has to work with anything that could be passed to it. but once instantiated, the type is known and it can be used with its concrete type like `map` can be thought of as declared to be `map[comparable]any` but when you use it, the type is always known, eg

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Brian Candler
A function which takes a value of an interface type, and a function which takes a value of a constrained generic type, are certainly two different things. In the first case, it gets a dynamic boxed value which at runtime may contain a value of any type that implements that interface - or no val

[go-nuts] generics: what can we do with an any type?

2021-12-15 Thread 'Johannes Kohnen' via golang-nuts
Hello folks, I've stumbled over a thing and I don't understand if what I've found is intentionally possible by design... https://go.dev/play/p/SIxOV1FnTzX?v=gotip Why can I compare int with == when it was instantiated from the "any" type parameter? The origin of my question is my implementation

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Brian Hatfield
I read that and I genuinely do not understand why interfaces now mean two distinct incompatible things. I think this is going to confuse a lot of people. On Wed, Dec 15, 2021 at 11:09 AM Jason Phillips wrote: > As to _why_ this is the case, the generics proposal has a section about > that: > > h

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Jason Phillips
As to _why_ this is the case, the generics proposal has a section about that: https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#permitting-constraints-as-ordinary-interface-types On Wednesday, December 15, 2021 at 11:05:36 AM UTC-5 Jason Phillips wrote: > @

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Jason Phillips
@Leonard, type constraints can only be used as type parameters, using them as normal interfaces is currently not allowed. See the notes in the draft release notes[1] or the draft 1.18 spec[2]. > Such interfaces may only be used as type constraints. > Interfaces that contain non-interface types,

Re: [go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Kurtis Rader
This was asked 15 hours ago in the thread with the subject line "Go 1.18 beta1: Embedding Type Parameter in struct definition is an error". :-) See https://golang.org/issue/49030. On Wed, Dec 15, 2021 at 3:24 AM Leonard Mittmann wrote: > I just learned that type constraints, which are defined a

[go-nuts] Re: Go 1.18 Beta 1 is released

2021-12-15 Thread Jan Mercl
On Tue, Dec 14, 2021 at 8:51 PM Cherry Mui wrote: > We have just released go1.18beta1, a beta version of Go 1.18. > It is cut from the master branch at the revision tagged go1.18beta1. > > Please try your production load tests and unit tests with the new version. > Your help testing these pre-rel

Re: [go-nuts] Memory usage

2021-12-15 Thread Gareth Owenson
Thanks both, immensely helpful in narrowing the problem. On Tue, Dec 14, 2021 at 7:12 AM Miha Vrhovnik wrote: > And if you are using a cgo and didn't replace the standard malloc with > jemaloc you are probably suffering from memory fragmentation or whatever > the hell happens. > We had to resta

[go-nuts] Go 1.18. Type Constraints are (not) interfaces!?

2021-12-15 Thread Leonard Mittmann
I just learned that type constraints, which are defined as interfaces are actually not usable in all the places "normal" interfaces can be used in. E.g., why can a constraint interface not be uses as a struct type? Let's say I have the func `func Smallest[T constraints.Ordered](s []T) T`. How d