[go-nuts] x/mobile: Extend support for non Android java platform

2023-02-24 Thread K
- Change all auto-generated files to match the correct platform. Personally I want to use Go with the Kotlin Desktop Compose. I want to ask before I start, are any of it interesting to the "x/mobile" team or not? K -- You received this message because you are subscribed to the Go

[go-nuts] Any golang ORM that supports Vertica VSQL?

2018-04-18 Thread Big K
Does anyone know of a ORM library for golang that supports Vertica VSQL? Thanks -- 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 email to golang-nuts+unsubscr...@googlegro

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
\0, Pablo, IMHO although the runtime and VM both provide facilities such as garbage collection, scheduling ect they are not alike at all. Actually that is the ONLY way they are alike. VM run compiled bytcode like others stated, but the VM is a whole program on its own, which is run, and handled

[go-nuts] Re: Go’s runtime vs virtual machine

2018-09-05 Thread K Davidson
Please give my seemingly redundant post. I got stiffled by the moderation process, and by the time my post was approved, others had said pretty much everything I had. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this grou

[go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
it on the internet? Thanks in advance, -K -- 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 email to golang-nuts+unsubscr...@googlegroups.com. For more

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-14 Thread K Davidson
This seems to work, thanks. On Friday, September 14, 2018 at 6:38:15 PM UTC-7, Sam Whited wrote: > > On Fri, Sep 14, 2018, at 20:32, K Davidson wrote: > > Is there a way that I can build my package as a module without having to > > host it on the internet? > > I'v

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-15 Thread K Davidson
tried things like: "." (yielding error: unknown import path "_/home/k/code/go/delete": internal error: module loader did not resolve import" upon build (but it let me initialize the module without issue). What finally did work, was when I used a GitHub repo URL that I

Re: [go-nuts] Is it possible to build a module without a hosted repository?

2018-09-15 Thread K Davidson
tried things like: "." (yielding error: unknown import path "_/home/k/code/go/delete": internal error: module loader did not resolve import" upon build (but it let me initialize the module without issue). What finally did work, was when I used a GitHub repo URL that I

[go-nuts] Re: Binary module and security reasons

2018-09-18 Thread K Davidson
Have you seen cgo? (more here and some examples ) On Friday, September 14, 2018 at 7:39:35 AM UTC-7, Vitold S wrote: > > Hello my friends, > > Right now I review go ui module ( https://github.com/andl

[go-nuts] Re: Are C allocated memory completely isolated to Go memory in any cases?

2018-09-29 Thread K Davidson
Not sure if it would be of any help, but maybe you can gleem some insight from the way these packages did things? https://github.com/mattn/go-gtk https://github.com/gotk3/gotk3 -K -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To u

[go-nuts] Re: Constraints for generics

2018-09-30 Thread K Davidson
Hi, Just a couple of friendly notes / impressions: I couldn't help but notice how many new gramars, or additions would need to be added to the language in order to support a feature aiming to be simple, in a language where one of the top driving goals it to be as simple as possible. Also no bui

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
One way to accomplish this may be to use embedding to wrap both Templates into a new type: package main import ( txt "text/template" "html/template" ) // CsvTemplate wraps a html/template.Template and adds a text/template.Template // field for CSV output. type CsvTemplate struct {

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
for CSV output. type CsvTemplate struct { template.Template t txt.Template } -K On Monday, December 31, 2018 at 1:51:34 PM UTC-7, Renee Jylkka wrote: > > Hello, > > The project that I am working on is a web app written on a custom web > server using Go and Go templates. I sto

[go-nuts] Re: A single type to wrap text/template.Template and html/template.Template

2018-12-31 Thread K Davidson
ut. type CsvTemplate struct { template.Template t txt.Template } -K - show quoted text - On Monday, December 31, 2018 at 1:51:34 PM UTC-7, Renee Jylkka wrote: > > Hello, > > The project that I am working on is a web app written on a custom web > server using Go and Go templates.

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-03 Thread K Davidson
I read somewhere that you can do some of the needed work using swig++, but like others have said, I don't think it would produce perfectly ported idiomatic code out of the box... -kdd -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscr

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread K Davidson
My original comment was in regaurd to c++11, but seeing as the discussion has drifted towards c, you may want to take a look at https://github.com/xlab/c-for-go, it is based off of its based off of https://github.com/cznic/cc, and has been used to create go bindings for portaudio, libvpx, and a few

[go-nuts] gotcha: don't take the address of a for-range loop variable

2019-01-08 Thread K Davidson
You could also do: https://play.golang.org/p/zjNVeQNbCq5 -- 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 email to golang-nuts+unsubscr...@googlegroups.com. For more option

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
Hi, Just wanted to put it out there, that one way of handling a situation where you try to close on a chanel which may already be closed is to catch the panic with a recover like so: https://play.golang.org/p/8uRq8J2TH2i -K -- You received this message because you are subscribed to the

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
Hi, Just wanted to put it out there, that one way of handling a situation where you try to close on a chanel which may already be closed is to catch the panic with a recover like so: https://play.golang.org/p/nEeZ6ddXRR_O <https://play.golang.org/p/8uRq8J2TH2i> -K -- You receive

[go-nuts] Re: Persistence of value, or Safely close what you expected

2019-03-13 Thread K Davidson
You may have to copy-paste the playground link as clicking appears to load a previous version of the message that I deleted. (Not sure if this is just a bug on my end) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

[go-nuts] Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
Hello Everyone, I'm new to Golang and I am trying to figure out how to retrieve multiple unknown columns and rows from a table. I have an example table called ANIMALS . I am trying to follow the example at the bottom of this GUID

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
Thank you so much for your response! The code you added probably works, but I'm getting held up by something else. I'm running into a set of errors when I execute this on the command line...It seems the "rows" value I'm creating doesn't have the functionality that the guide says it would

Re: [go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
compile error suggests. > > I'm guessing you want rows, if so have a look at: > https://golang.org/pkg/database/sql/#DB.Query > > On 15/09/2017 03:10, Alexandre K wrote: > > Thank you so much for your response! > > The code you added probably works, but I'm getting he

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
// Now you can check each element of vals for nil-ness, > if err != nil { > log.Fatal(err) > } > for i := range cols { > fmt.Println(vals[i]) > } > } > } > > > On Friday, September 15, 20

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-14 Thread Alexandre K
err = rows.Scan(vals...) > // Now you can check each element of vals for nil-ness, > if err != nil { > log.Fatal(err) > } > for i := range cols { > fmt.Println(vals[i]) > } > } > } > > >

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
tal(err) } //The below Println command prints values, but //it prints them as memory addresses like this => "[0xc42000c600 0xc42000c620]" //How can I print the string values retrieved from MySQL??? fmt.Println(vals) } } On Thursday, September 1

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
nil { log.Fatal(err) } //The below Println command prints values, but //it prints them as memory addresses like this => "[0xc42000c600 0xc42000c620]" //How can I print the string values retrieved from MySQL??? fmt.Println(vals) } } On Thursday, Se

[go-nuts] Re: Retrieve Unknown Rows & Columns From a MySQL Table (Golang)

2017-09-15 Thread Alexandre K
So, I'm really close to accomplishing my goal. Can anyone help me with the very last command IN THIS CODE??? <https://gist.github.com/akalaj/a8087ef8a23f21de3240717862624f58> On Thursday, September 14, 2017 at 4:59:59 PM UTC-7, Alexandre K wrote: > > Hello Everyone, > >

[go-nuts] LiteIDE 32.2 Trojan?

2017-10-02 Thread Ben K
My colleague and I have noticed that windows defender is reporting one of the DLLs in IliteIDE v32.2 (lib/liteide/plugins/litebuild.dll) contains a Trojan (Win32/Azden.A!cl) . Also virustotal reports a couple of engines are detecting as well (https://www.virustotal.com/#/file/aa1fe49e7e5e6c4e4f

[go-nuts] Re: Is there a best way to use a global httpclient but with a different timeout setting per request?

2017-11-02 Thread K Wang
ctx, cancel = context.WithTimeout(context.Background(), client.Timeout) On Tuesday, October 31, 2017 at 5:52:29 AM UTC-7, 慕希颜 wrote: > > Is there a way to add a timeout setting for per request if i declare a > global var? Because in my case i need different timeout setting for per > request.

[go-nuts] Sort a huge slice of data around 2GB

2017-11-29 Thread Subramanian K
have any sort package which can sort huge data swiftly? Regards, Subu. K -- 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 email to golang-nuts+unsubscr...@google

[go-nuts] Re: Sort a huge slice of data around 2GB

2017-11-30 Thread Subramanian K
to do this. Thanks all for your time and suggestions. Regards, Subramanian. K On Thursday, 30 November 2017 19:53:01 UTC+5:30, Slawomir Pryczek wrote: > > It should be very simple if you have additional 2G of memory. You divide > the data to X parts where X is power of 2 and X needs to be

[go-nuts] Re: if i catch resp.StatusCode != http.StatusOK and return early from my function, do i still have to close resp.Body??

2018-01-28 Thread K Wang
I would do put it right after resp, err := client.Do(req) if err!=nil{ // wrap a an err return return errWrap(err) } defer resp.Body.Close() log.Printf("resp: %+v\n", resp) if resp.StatusCode != http.StatusOK { } Some linter may also suggest you catch the body.Close() err as well

[go-nuts] Re: Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-23 Thread K Davidson
g against needs to be on the right. Like: err = incrval.SetValStr(tptoken, errstr, &incr) if err != nil { panic(fmt.Sprintf("YDB: Unexpected error with SetValStr(): %s", err)) } } It may be helpful to take a look at https://golang.org/ref/spec. Best of luck, -K -- You

[go-nuts] Re: Aggressive Golang Garbage Collection Issues When Using cgo?

2019-05-23 Thread K Davidson
Since this is a mailing list, not sure if my comment could be deleted. If not, please disreguard my reply, it was a case of unchecked presumptions meets foot-in-mouth-disease ;/ Thanks, -K -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Distributing task execution

2019-08-09 Thread Thiru k
Hi, We have used goLang for developing the web based application using micro service pattern. Each and every service will be scale as per demand. here, few of the functionality have to be worked periodically as *cron* , it is easy on the server is just one but if it is scaled then the problem ar

[go-nuts] do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
If the Go toolchain is upgraded to a newer version, do the existing packages in $GOPATH need to be recompiled? If so, how? Just delete $GOPATH/pkg and go install everything? What about the binaries in $GOPATH/bin? What's the easiest way to make sure that everything in $GOPATH is compiled with t

[go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
OK, so all that should happen is just re-install the binaries in $GOPATH/bin. Does anyone have any tips or helper scripts that help automate re-installing all these binaries? There's a pile of them which makes it a bit difficult to find out what exact package path they came from so they can be

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
, 'go list all', and also > how to query individual folders inside GOPATH. > > "go build -i" will ensure that prerequisite library dependencies are > also installed, which will populate the entire pkg/* directory. > > On Wed, Sep 28, 2016 at 9:30 AM, Tim K >

Re: [go-nuts] Re: do packages need to be recompiled when Go is upgraded?

2016-09-28 Thread Tim K
On Wednesday, September 28, 2016 at 2:31:44 PM UTC-7, andrey mirtchovski wrote: > > > If I want to start from the executables in $GOPATH/bin and recompile > only > > those, is there a way to tell what package an executable comes from so I > can > > easily automate the process? E.g. goimports

[go-nuts] Re: Can searchbox on golang.org be improved?

2016-12-15 Thread Tim K
Instant search would be nice, in particular for APIs. Google surely has the technology to improve the search box on golang.org Meanwhile, for API searches you can use: http://devdocs.io/go/ Or desktop apps such as Dash (Mac) or Zeal (Win/Linux). On Thursday, December 15, 2016 at 7:59:44 AM UTC

[go-nuts] Handling panics in go_kafka_client

2016-06-21 Thread chandradeepak . k
Hi, We are trying to build an application using the go_kafka_client, for managing the consumer creation etc. We find it very convenient and easy to use. Thanks for building! But in the go_kafka_client code we see a lot of panics. For example we created a consumer for a topic that doesn't exis

Re: [go-nuts] calling file.Write() concurrently

2016-07-06 Thread Daniel K
Looks good, but you could take advantage of the io writer interface. I made a quick example, not sure if it runs (did not test) https://play.golang.org/p/cYcz2ktoiG Den onsdag den 6. juli 2016 kl. 11.44.33 UTC+2 skrev Pierre Durand: > > My solution: https://play.golang.org/p/f5H0svLFE0 > What do

[go-nuts] Re: Something like Java OSGi in Go language?

2017-02-06 Thread Vimal K
After the support for plugins in Go 1.8 is there any effort in community towards Go OSGi. thanks, Vimal -- 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 email to golang-

Re: [go-nuts] memory gc when slice shortcut

2017-03-09 Thread Tim K
On Thursday, March 9, 2017 at 2:48:05 AM UTC-8, Jan Mercl wrote: > > On Thu, Mar 9, 2017 at 11:45 AM 代君 > > wrote: > > > I have a []*Struct, at some times it length grow to 1000, after that, > the slice be shortcut to length of 10, and never grow to 1000 again. > > dose the memory of *Struct at

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Tim K
gofmt documentation says: Gofmt formats Go programs. It uses tabs (*width = 8*) for indentation and > blanks for alignment. > https://golang.org/cmd/gofmt/ Just curious, any reason why it needs to specify the tab width = 8? Should that be removed if it's not relevant? Thanks! On Sunday, Mar

Re: [go-nuts] Re: deadlock with a empty select{} in main goroutine.

2020-04-08 Thread Aravindhan K
elect{}, doesn't the coder purposely wishes to block forever? Thanks, Aravindhan K On Wed, Apr 8, 2020 at 10:13 PM 'Vikram Ingawale' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Hi Manlio , > > The select statement will block until one of its cases is

Re: [go-nuts] Re: deadlock with a empty select{} in main goroutine.

2020-04-08 Thread Aravindhan K
Thanks Ian. Aravindhan K On Thu, Apr 9, 2020 at 3:21 AM Ian Lance Taylor wrote: > On Wed, Apr 8, 2020 at 10:19 AM Aravindhan K > wrote: > > > > If that is the case, in below code main go routine will a reach a > situation where no other go routines running to wake it up

Re: [go-nuts] Re: What's the best IDE for golang?

2020-05-28 Thread Bhaskar K
How about vim + vim-go ? On Fri, May 29, 2020 at 8:02 AM Richard Masci wrote: > Yep you got that right. Best IDE hands sown is Goland, second is vscode. > At least In my opinion. I personally write all in vscode, goland is too > expensive for someone who is not

Re: [go-nuts] political fundraising on golang.org!

2020-06-15 Thread K Davidson
This mailing list is for the Go Programming Language, there are other places on the internet to discuss unrelated topics. Please keep posts limited to things about go. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

Re: [go-nuts] Generics and parentheses

2020-07-19 Thread K Davidson
as `reset!`, or ? for boolean return values, like `iszero?`) Not to mention most of us already overload our keys nowdays anyways; I have yet to see a keyboard with a leader key ;] -k -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To u

[go-nuts] Any embedded scripting language for Go

2020-10-20 Thread Aravindhan K
bindings to arbiratory go packages back and forth? and I could embed it in Go App as well. Thanks, Aravindhan K -- 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

Re: [go-nuts] Any embedded scripting language for Go

2020-10-21 Thread Aravindhan K
Thanks for the suggestions, I will check it out. Go as interpreted language seems an interesting idea, I will surely try that. https://goplay.space#draw wonderful idea! to teach programming to kids. Thanks, Aravindhan K On Wed, Oct 21, 2020 at 11:48 PM Wojciech S. Czarnecki wrote: > D

Re: [go-nuts] WMI and Go... where to get started?

2021-02-08 Thread Aravindhan K
Hi, I don't think there exists WMI client implementation in Go. You could try cgo with samba WMI implementation https://github.com/greenbone/openvas-smb Thanks, Aravindhan K On Mon, Feb 8, 2021, 1:49 AM Tom Limoncelli wrote: > I've been using Unix for decades (and Go since the

[go-nuts] Where to copy vendor to the go docker builder?

2021-09-01 Thread K Prayogo
I'm trying to make docker build faster for software that are built with golang tried to cache layer but it still slow when dependency changed since go mod download have to redownload whole dependency again and again. how to make use vendor directory on docker build? (where to copy? so go build

[go-nuts] Basic question on Channels

2022-07-27 Thread Aravindhan K
wrong about. Thanks, Aravindhan K -- 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 email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion o

Re: [go-nuts] Re: Basic question on Channels

2022-07-27 Thread Aravindhan K
xpecting both Write 5 and Write 3 to be printed. But only Write 5 >>> was printed. I couldn't reason out the behaviour, can somebody point out >>> what I am assuming wrong about. >>> >>> Thanks, >>> Aravindhan K >>> >> -- > You received th

Re: [go-nuts] Re: Basic question on Channels

2022-07-27 Thread Aravindhan K
t;>> On Wednesday, 27 July 2022 at 08:13:34 UTC+1 aravind...@gmail.com >>>> wrote: >>>> >>>>> Hi All, >>>>> When I was explaining basics of channels to newcomers, I was using the >>>>> below example >>>>> ht

[go-nuts] Re: Unable to create Api | Go Operator | Go issue

2022-11-04 Thread B K
Any fix for this yet? On Thursday, 18 November 2021 at 20:19:36 UTC+2 Dinesh kumar Ramasamy wrote: > I do see the same issue - No fix yet. > > On Monday, November 1, 2021 at 11:30:30 AM UTC-5 Vaishali Gupta wrote: > >> Hello Team >> >> getting below error while using below command >> could you

[go-nuts] Error on installing package

2024-02-06 Thread Smit K
With this command: go install 154.pages.dev/google@v1.4.0 It is not installing: [image: Screenshot 2024-02-06 180047.png] -- 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 em

[go-nuts] Re: Error on installing package

2024-02-07 Thread Smit K
M UTC-5 Jason Phillips wrote: > >> There's no Go package at the root of that repo/module, and thus nothing >> to install. "go install" only works on main packages. >> >> On Tuesday, February 6, 2024 at 8:34:07 AM UTC-5 Smit K wrote: >> >>> With t

[go-nuts] Making a post call with multiple instances of the same struct

2024-08-05 Thread G K
Hi, I'm trying to create an HTTP rest api end where a POST method will be able to accept and deserialize (unmarshall) a same data structre into numerous instances. For the sake of example, lets say I have json struct: type Lock struct { Key uint `json:"key"` } Nom Im trying to post uns

Re: [go-nuts] Making a post call with multiple instances of the same struct

2024-08-05 Thread G K
into a Go value. It unmarshals fine you define the var Lock model.Lock as just a struct. On Monday, August 5, 2024 at 11:37:26 AM UTC-5 Ian Lance Taylor wrote: > On Mon, Aug 5, 2024 at 6:55 AM G K wrote: > > > > I'm trying to create an HTTP rest api end where a POST method wi

[go-nuts] Initializing aliased map

2017-07-07 Thread krishnan . k . iyer
I was coding something and I just realized that I have a rookie question: type aliased map[string]*Concept type element struct { a bool b aliased } temp := &element{ a: false, b: ?? } How do I initialize `b` here to have the zero value of `aliased`? -- You received this me

[go-nuts] Packet parsing in Go

2020-04-21 Thread Rakesh K R
Hi, I am new to Go and I am trying to parse the network packets received. In C, we used to typecast this array of uint8_t to predefined structure. Is there a way I can do this similarly in Go? or any better approach to do this in Go? i.e. I need to parse the packet to store them to respective l2/

Re: [go-nuts] Packet parsing in Go

2020-04-21 Thread Rakesh K R
at 11:44 PM, Jan Mercl <0xj...@gmail.com> wrote: > On Tue, Apr 21, 2020 at 6:08 PM Rakesh K R wrote: > > > In C, we used to typecast this array of uint8_t to predefined structure. > > Go has no casts. Regardless, one can do something similar using > unsafe. But then

Re: [go-nuts] Re: political fundraising on golang.org!

2020-06-16 Thread K Richard Pixley
On 6/16/20 09:04, 'Thomas Bushnell, BSG' via golang-nuts wrote: On Tue, Jun 16, 2020 at 11:51 AM 'K Richard Pixley' via golang-nuts mailto:golang-nuts@googlegroups.com>> wrote: I do not agree with the Rust team.  I would prefer to make my technology decisi

[go-nuts] class is invalid in multicast dns record for srv and txt

2020-06-28 Thread Rakesh K R
Hi, I am using gopacket for parsing mDNS packet. following things are missing in the decode logic of mDNS packets: 1. cache flush field is not present in DNSResourceRecord struct 2. cache flush bit and class is combine as Class struct member. Due to point 2, Class variable will be getting invalid

[go-nuts] The GitHub Vet Project

2020-12-20 Thread K. Alex Mills
ct line 'GitHub Vet Expert' and include your GitHub username and a brief outline of your experience with Go. It's my hope that this project can provide some data that can help to move Go forward. To that end, I'm also interested in any and all feedback and suggestions. Co

Re: [go-nuts] The GitHub Vet Project

2020-12-21 Thread K. Alex Mills
On Sun, Dec 20, 2020, 2:01 PM Jan Mercl <0xj...@gmail.com> wrote: > > I expressed my concerns at the issue tracker in 2017 when I still had > a Github account. That's no more the case, so I'll take the > opportunity to make a comment here. I still believe that the intent to > change the behavior t

Re: [go-nuts] Re: Generics, please go away!

2020-12-23 Thread K. Alex Mills
On Wed, Dec 23, 2020, 6:17 AM Martin Hanson wrote: > > After generics gets added, it's going to be something else next time, and > again and again. The list goes on and on about changes people want to > make to Go. Not real life problems, just so-called "nice to have". > > No, the added and incre

Re: [go-nuts] Generics - please provide real life problems

2020-12-24 Thread K. Alex Mills
On Thu, Dec 24, 2020, 1:18 AM Martin Hanson wrote: > I'm sorry, but this is not real life problems. This is exactly the problem > with this proposal. It's based on nothing but small theoretical examples. > Sorry, I don't understand. Here are some of the example applications which Ian mentions i

[go-nuts] [generics] go2go snippets -- repository of example solutions to problems using generics

2020-12-24 Thread K. Alex Mills
For my part, I see some value in maintaining a source of example solutions to problems that generics could solve. Since I was not aware of any resource that attempts to gather together several example implementations in one place (and couldn't find one after a couple minutes of searching), I decide

Re: [go-nuts] Re: [generics] Print[T Stringer](s []T) vs Print(s []Stringer)

2020-12-26 Thread K. Alex Mills
While it depends on the final generics implementation, my understanding of how things stand now is that Print would compile down to a separate chunk of binary for each type T that is used. For instance, if you used Print[A] and Print[B] in your code, they would each refer to separate binary impleme

Re: [go-nuts] Re: [generics] Print[T Stringer](s []T) vs Print(s []Stringer)

2020-12-27 Thread K. Alex Mills
ck the whole thing as far as I am concerned. > > Cheers > > On Sun, 27 Dec 2020, 05:25 K. Alex Mills, wrote: > >> While it depends on the final generics implementation, my understanding >> of how things stand now is that Print would compile down to a separate >> chun

Re: [go-nuts] [generics] Print[T Stringer](s []T) vs Print(s []Stringer)

2020-12-27 Thread K. Alex Mills
n can have significant performance > implications for low-level/tight-loop functions as it will avoid the > indirection required for interface method dispatching (at the expensive of > code explosion for common calls with lots of types). > > On Dec 27, 2020, at 11:31 AM, K. Alex Mi

[go-nuts] Re: The GitHub Vet Project

2020-12-29 Thread K. Alex Mills
s which loopclosure misses which VetBot is able to find, and the community's effort will still be needed to help sift through false-positives once the project has stabilized. On Sun, Dec 20, 2020 at 12:08 PM K. Alex Mills wrote: > Hello Gophers! > > During a Q&A session at t

Re: [go-nuts] Re: The GitHub Vet Project

2020-12-30 Thread K. Alex Mills
> It's worth mentioning that there are issues which loopclosure misses >> which VetBot is able to find, and the community's effort will still be >> needed to help sift through false-positives once the project has stabilized. >> >> >> On Sun, Dec 20, 2020 at 12:0

Re: [go-nuts] The GitHub Vet Project

2020-12-30 Thread K. Alex Mills
-loop pointer. Tim King has just pointed out a few other concerns like pointer comparison and finalizers for which analyzers have yet to be written. My perception is that these two features aren't very widely used, so I wouldn't expect to find a large number of instances like these.

Re: [go-nuts] Signature Switch - third path to Go generics

2020-12-31 Thread K. Alex Mills
At a glance, this feels to me like it is more complicated than the current generics proposal. That said, it also seems very original so I have to give credit there. This proposal seems to put the responsibility for monomorphizing generic code onto the programmer. I'm not sure why it would be simpl

Re: [go-nuts] Re: The GitHub Vet Project

2021-01-01 Thread K. Alex Mills
> Technically, I believe a range loop variable can be used in a goroutine >> safely. A very contrived example: https://play.golang.org/p/jgZbGg_XP6S . >> In practice I can not see much use for this kind of pattern, but it does >> exist. >> > > It is correct that the range loop variable can be used

Re: [go-nuts] Thread safe tree library?

2021-01-05 Thread K. Alex Mills
That is the simplest and most conservative way go about it, but ultimately it depends on what you need out of your concurrency semantics. If you're willing to settle for a linearizable execution, you can gain some performance improvements by only checking the lock for write operations. So long as

Re: [go-nuts] Thread safe tree library?

2021-01-05 Thread K. Alex Mills
On Tue, Jan 5, 2021, 6:59 PM Nathan Fisher wrote: > Does write only locking provide read correctness? I would’ve thought based > on the memory model it could cause issues? > > https://golang.org/ref/mem#tmp_2 > It depends on your notion of "read correctness", specifically when you consider each

Re: [go-nuts] Thread safe tree library?

2021-01-08 Thread K. Alex Mills
> I was thinking of potential issues if you rebalance the tree as an example. > > I’m not certain what issues could arise as I’ve never considered a > concurrent data structure that lacks some kind of synchronisation for both > read and writes unless it’s immutable copy-on-write or similar. > > Do

[go-nuts] Type-checking from Memory?

2021-01-20 Thread K. Alex Mills
packages without reinventing a large part of what packages provides? Thanks, K. Alex Mills -- 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 email to golang-nuts+u

[go-nuts] Re: Type-checking from Memory?

2021-01-23 Thread K. Alex Mills
ware the loader package predates Go modules, so this approach may miss something important for some use-cases. For my purposes, I want to avoid downloading / type-check module dependencies anyway. Sincerely, K. Alex Mills On Wed, Jan 20, 2021 at 8:03 PM K. Alex Mills wrote: > Hi All, &g

Re: [go-nuts] Update to generics proposal

2021-04-04 Thread K. Alex Mills
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

Re: [go-nuts] go text://protocol client?

2021-04-11 Thread K. Alex Mills
On Sun, Apr 11, 2021, 5:15 AM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > On Sun, Apr 11, 2021 at 5:11 AM Kurtis Rader wrote: > >> >> It is nice that the specification allows for an efficient implementation. >> But I agree with Dan that your documentation is opaque, obtuse,

Re: [go-nuts] HTTP request reading

2021-04-29 Thread K. Alex Mills
Partial responses inline, HTH. On Thu, Apr 29, 2021, 6:09 AM Amit Saha wrote: > Hi all, when an incoming request comes in, does the ListenAndServe() > function read the first line (as explained in > https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages) to figure > out whether there is a ha

Re: [go-nuts] ast.NewPackage errors for built in types

2021-10-12 Thread K. Alex Mills
It's been several months since I used these packages but IIRC, go/ast only requires code to parse correctly, while go/types actually runs the type-checker. Running the type checker implies having a complete picture of all the types used in a Go program, which, in my recollection, usually means rea

Re: [go-nuts] ast.NewPackage errors for built in types

2021-10-15 Thread K. Alex Mills
FWIW: I'm not surprised that it's slower because it's handling significantly more of the compilation. The parser is very fast. Adding in type-checking is going to be less fast. IIRC, the packages package also has to make network calls and do filesystem I/O behind the scenes in some cases. The pars

Re: [go-nuts] ast.NewPackage errors for built in types

2021-10-17 Thread K. Alex Mills
I'm guessing here, but you probably do need the full type-checker for that, depending on what you mean by "a native type". In go we can alias types in two ways. type A uint8 type B = uint8 There are subtle differences between the two which I don't claim to understand... In any case, AFAIK both a

[go-nuts] in-memory caching in golang

2021-12-09 Thread Rakesh K R
Hi, In my application I have this necessity of looking into DBs to get the data(read intensive application) so I am planning to store these data in-memory with some ttl for expiry. Can someone suggest some in-memory caching libraries with better performance available to suit my requirement? --

[go-nuts] Re: in-memory caching in golang

2022-03-09 Thread Rakesh K R
.Order[1:] >> } >> } >> >> If you really need a Time To Live and want to allow memory to balloon >> uncontrolled, then MaxSize would change from an int to a time.Time, and the >> deletion condition would change from being size based to being >> tim

[go-nuts] Pod memory keeps on increasing and restart with error OOMKilled

2022-03-09 Thread Rakesh K R
HI, I have a micro service application deployed on kubernetes cluster(with 1gb of pod memory limit). This app receive continuous messages(500 message per second) from producer app over kafka interface(these messages are encoded in protobuf format.) *Basic application flow:* 1. Get the message o

[go-nuts] Re: Pod memory keeps on increasing and restart with error OOMKilled

2022-03-10 Thread Rakesh K R
tes > > says it uses cgo, hiding it's memory usage from Go. I bet that 900MiB of > memory is there... > > > Rakesh K R a következőt írta (2022. március 10., csütörtök, 7:26:57 UTC+1): > >> HI, >> I have a micro service application deployed on kubernetes cluster(wi

Re: [go-nuts] Re: Pod memory keeps on increasing and restart with error OOMKilled

2022-03-10 Thread Rakesh K R
ome other option to store on disk. > > On Mar 10, 2022, at 10:07 AM, Rakesh K R wrote: > > Tamas, > > Thanks you. So any suggestion on how to make application release this > 900MiB memory back to OS so that pod will not end up in OOMKilled state? > > On Thursday, March 1

Re: [go-nuts] Re: Pod memory keeps on increasing and restart with error OOMKilled

2022-03-10 Thread Rakesh K R
configuration. so I am confused now On Friday, March 11, 2022 at 1:34:23 AM UTC+5:30 ren...@ix.netcom.com wrote: > Look at log.retention.hours and log.retention.bytes > > You should post this in the Kafka forums not the Go ones. > > On Mar 10, 2022, at 11:04 AM, Rakesh K R wrote: >

[go-nuts] Pipelining with Go and Generics

2022-08-11 Thread K. Alex Mills
tps://kalexmills.com/journal/pipelines/>. I'm open to any of your thoughts, suggestions, and issue reports. Sincerely, K. Alex Mills -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop recei

Re: [go-nuts] Pipelining with Go and Generics

2022-08-11 Thread K. Alex Mills
ecause chaining is impossible with error returns. > > A streams api with panic/recover is needed. > > On Aug 11, 2022, at 12:55 PM, K. Alex Mills > wrote: > >  > Hello Gophers, > > I recently had an opportunity to try out Go generics on a small pipelines > packag

  1   2   >