[go-nuts] Practical OpenAPI in Go

2025-02-12 Thread Alex Pliutau
Curious to know how many of you are using it in your projects. https://packagemain.tech/p/practical-openapi-in-golang -- 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

Re: [go-nuts] LLM development toolkit.

2025-01-28 Thread alex-coder
Hi All ! Recently I have made a step towards to the first letter in LLM abbreviation - Large. That means that soft now could work with LLM data model is located in file system and only take into RAM data which one is necessary to compute result. But unfortunately so far I'm not able to pass 2FA

[go-nuts] Random Art Algorithm

2025-01-12 Thread Alex Pliutau
Implementing Random Art algorithm in Go. https://youtu.be/TgftD-xrNeo -- 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. T

[go-nuts] AI Go code generation and reviewing.

2025-01-04 Thread Alex Dvoretskiy
Is there AI service to generate and review specifically Go code? -- 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

[go-nuts] Re: Working with release candidates

2024-12-19 Thread Alex Bozhenko
You missed go: go 1.24rc1 toolchain go1.24rc1 Go toolchain names¶ The standard Go toolchains are named go*V* where *V* is a Go version denoting a beta release, release candidate, or release. For example, go1.21rc1 and... Once you build, you can verify whic

Re: [go-nuts] LLM development toolkit.

2024-11-24 Thread alex-coder
Hi All ! http port has been added to the llm, so now you may communicate with llm via the http client. Thank you. суббота, 9 ноября 2024 г. в 12:19:21 UTC+3, alex-coder: > Thanks everyone ! > I forgot to provide the checksum for the archive. Sorry. > > пятница, 8 ноября 2024 г

[go-nuts] Share your TUIs built with Go

2024-11-18 Thread Alex Pliutau
I personally love Bubble Tea for building interactive TUIs. Have you used it, or something else? Here is the video I made about building a note-taking app with Bubble Tea - https://www.youtube.com/watch?v=_gzypL-Qv-g -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] LLM development toolkit.

2024-11-09 Thread alex-coder
adme. >> >> regards >> >> On Fri, Nov 8, 2024 at 3:43 PM alex-coder wrote: >> >>> Hi All ! >>> >>> I recently finished coding the initial version of the llm development >>> toolkit. You may touch the toolkit there: GitHub - gussev

[go-nuts] LLM development toolkit.

2024-11-08 Thread alex-coder
Hi All ! I recently finished coding the initial version of the llm development toolkit. You may touch the toolkit there: GitHub - gussev/llm: large language model Thank you. -- You received this message because you are subscribed to the Google Groups "golang-n

[go-nuts] Are you actively using fuzz testing?

2024-10-28 Thread Alex Pliutau
Do you use fuzz testing, and if yes, what are you testing with it? Our latest article shows how to do fuzz testing in Go, specifically for HTTP services. https://packagemain.tech/p/fuzzing-http-services-golang -- You received this message because you are subscribed to the Google Groups "golang

Re: [go-nuts] How to Implement Server-Sent Events in Go

2024-10-23 Thread Alex Pliutau
Yes, I prefer SSE when only server to client comm is needed. Really easy and works well on a single HTTP connection. On Wednesday, October 23, 2024 at 4:45:07 PM UTC+2 Zane Attahri wrote: > Second this, and go ever further. > > If you don’t need bi-directional communication, SSE are almost alwa

[go-nuts] How to Implement Server-Sent Events in Go

2024-10-23 Thread Alex Pliutau
Does anyone use Server-Sent Events in their projects? If yes, for which use cases? https://youtu.be/nvijc5J-JAQ -- 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

[go-nuts] Have you built desktop apps in Go?

2024-10-21 Thread Alex Pliutau
Have you built desktop apps in Go? For example using something like Wails? Share if you have any. My old but still relevant video about Wails - https://www.youtube.com/watch?v=Dg9rUXxNV-c -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsu

[go-nuts] What are your use cases for Fuzz Testing?

2024-10-20 Thread Alex Pliutau
Hey folks, do you use Fuzz Testing in Go? And if yes for which use cases. p.s. I made this video a while back on this topic - https://www.youtube.com/watch?v=w8STTZWdG9Y -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] How to work with GitHub API in Go

2024-10-14 Thread Alex Pliutau
Just published a new video on working with GitHub API in Go. Let me know what you think - https://youtu.be/Dnyu0JkKSQc -- 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 emai

[go-nuts] Re: Map with expiration

2024-10-08 Thread Alex Pliutau
s the example: https://go.dev/play/p/rba6HCJe-4X > > Thanks. > > > Em segunda-feira, 7 de outubro de 2024 às 16:37:53 UTC-3, Alex Pliutau > escreveu: > >> In some cases your application doesn’t need Redis, and internal in-memory >> map with locks and expiration will suff

[go-nuts] Re: Map with expiration

2024-10-08 Thread Alex Pliutau
on to make sure old >> stuff is freed up, eventually. >> >> On Monday 7 October 2024 at 21:37:53 UTC+2 Alex Pliutau wrote: >> >>> In some cases your application doesn’t need Redis, and internal >>> in-memory map with locks and expiration will suffice

[go-nuts] Go projects for Hactoberfest

2024-10-07 Thread Alex Pliutau
With Hacktoberfest approaching I prepared a few repositories for people to contribute to. It's mostly Go, but other no-code contributions are welcome as well. - https://github.com/plutov/formulosity - https://github.com/plutov/ultrafocus - https://github.com/plutov/paypal - https://g

[go-nuts] Map with expiration

2024-10-07 Thread Alex Pliutau
In some cases your application doesn’t need Redis, and internal in-memory map with locks and expiration will suffice. For example you already know the size of the map and you don’t need to store a lot of data. Use cases could be IP rate limiting, or any other short-lived data. Here is how you

[go-nuts] Re: Iterator handling error

2024-09-09 Thread alex-coder
Hi, Java is certainly not Go, now we have a great simplification to develop code, but you can clarify the context for making a decision in the description of the ValueListHandler J2EE pattern. Regards, пятница, 6 сентября 2024 г. в 02:11:39 UTC+3, cpasmaboiteaspam: > Hello, > > I would defini

[go-nuts] Conditional compilation in Go ?

2024-08-18 Thread alex-coder
Hi All ! Please advice me : 1. Where to see how Go calls or compiles (detects ) the corresponding runtime (windows, linux etc) in Go code. 2. Where to read about and if there is a conditional compilation in Go. Thanks to everyone -- You received this message because you are subscribed to the G

Re: [go-nuts] Memory operations hung in semacquire state, GC routine parked while holding semaphore?

2024-05-30 Thread 'Alex Kristiansen' via golang-nuts
I've seen so far in this bug, I'm more convinced of a > deadlock bug than the application failing to make progress. Lots of > goroutines lining up on gcMarkDone just sounds too specific to me. > > > On May 29, 2024, at 10:00 AM, 'Alex Kristiansen' via gol

Re: [go-nuts] Memory operations hung in semacquire state, GC routine parked while holding semaphore?

2024-05-29 Thread 'Alex Kristiansen' via golang-nuts
ng more memory, so it is slowing > the allocators to a rate that makes them appear hung. > > It may be that the process has consumed nearly all of the OS memory too - > so the OS is having a hard-time responding to malloc requests. > > i.e. The system is not making progress. > >

[go-nuts] Memory operations hung in semacquire state, GC routine parked while holding semaphore?

2024-05-28 Thread 'Alex Kristiansen' via golang-nuts
This is an odd one. For reference, this is a customer machine, Windows server 2016, compiled with go1.20.11. The application just hangs after a number of days; windows minidump reveals that most threads are doing this: Goroutine 462 - User: unicode/utf16/utf16.go:106 unicode/utf16.Decode (0xe

Re: [go-nuts] Re: Design patterns in Go

2024-04-04 Thread alex-coder
Hi All, in case someone is in interest of the subject I repost here what I have found in the internet some time ago. >>I apologize for being so intrusive. >>I will only provide links to educational resources, in case it would be interesting for anyone. >>GitHub - AlexanderGrom/go-patterns: Desig

[go-nuts] logout/end session

2024-02-29 Thread Alex Kiprono
Using token and the log in request struct i.e (userId, sessionId, timestamp) i generated a login/auth for log in process by creating and merging the request payload to generate the signature thus comparing for varification so the user is active in the system how will i end the session using ses

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-22 Thread 'Alex Efros' via golang-nuts
Hi! One more thing to keep in mind for the proposal: sometimes we need to merge two contexts. https://github.com/golang/go/issues/36503 https://github.com/golang/go/issues/57928 -- WBR, Alex. -- You received this message because you are subscribed to the Google Groups

[go-nuts] Re: What is the idiomatic way to create dynamic clients for Firestore in Go

2023-12-27 Thread Alex Breadman
There is no clear way to specify a database On Thursday, December 28, 2023 at 4:51:02 AM UTC Alex Breadman wrote: > I want multi-tenancy but there is no clear documentation. > > Is it supported yet in the firebase/firestore packages yet? > > Thanks > -- You received this m

[go-nuts] What is the idiomatic way to create dynamic clients for Firestore in Go

2023-12-27 Thread Alex Breadman
I want multi-tenancy but there is no clear documentation. Is it supported yet in the firebase/firestore packages yet? 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

[go-nuts] Re: Any option to substitute plug-in package ?

2023-10-28 Thread alex-coder
Hi all. Of course, in case if anyone is in interest to write plugins for Go. I found another option for writing plugins by use Lua. I haven't touched the example yet, but I'm giving out the link. https://github.com/yuin/gopher-lua/ Thank you. четверг, 3 августа 2023 г. в 15:47:26 U

[go-nuts] Re: Best IDE for GO ?

2023-08-23 Thread alex-coder
. Question: is there any IDE or plugin which one support that kind of dependencies in a graphical mode ? Thank you. вторник, 22 августа 2023 г. в 18:22:52 UTC+3, Mike Schinkel: > On Saturday, August 19, 2023 at 5:27:34 AM UTC-4 alex-coder wrote: > > What I'm looking for is the abi

[go-nuts] Best IDE for GO ?

2023-08-19 Thread alex-coder
Hi All ! Gophers, there is at least 10 years as GO on a market, Good job ! I found a list of the best IDE and Plugins there: https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins As I remember Java came around 1995 and within 3-4 years several companies developed really great IDEs successfu

[go-nuts] Re: Any option to substitute plug-in package ?

2023-08-03 Thread alex-coder
bly comes to mind - see, for example, https://wazero.io/ > > A plugin would then be a .wasm binary that can be compiled in any language > that supports WebAssembly as target. > > Disclaimer: I have not yet tried this approach. > > On Wednesday, August 2, 2023 at 12:14:15 P

[go-nuts] Re: Any option to substitute plug-in package ?

2023-08-02 Thread alex-coder
corate" >containers with additional labels, such as in Docker compose contexts, or >k8s contexts, or ... > > > On Wednesday, August 2, 2023 at 12:14:15 PM UTC+2 alex-coder wrote: > >> Hi All ! >> Plug-in package is very interesting, but in case the de

[go-nuts] Any option to substitute plug-in package ?

2023-08-02 Thread alex-coder
Hi All ! Plug-in package is very interesting, but in case the development under windows it does not work, So, any hint to use some option instead will be highly appreciated. Thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscr

[go-nuts] Re: How to run extra routine for http server properly ?

2023-07-07 Thread alex-coder
//localhost:8080";) > http.ListenAndServe(":8080", nil) > } > > func sendEmail() { > log.Printf("would send an email here") > time.Sleep(time.Second) > log.Printf("done sending email") > } > > On Thursday, July 6, 2023 at 2:03:47 AM UTC+12

[go-nuts] How to run extra routine for http server properly ?

2023-07-05 Thread alex-coder
Hi All ! So, http server looks like is a request / response processing. But in case it is nesessary to do something else after the response has been sent to the client, how to do it properly ? Is there any example to read ? Thank you. -- You received this message because you are subscribed to

[go-nuts] Re: tool for ast graph visualization

2023-06-15 Thread alex-coder
Thank you so much ! четверг, 15 июня 2023 г. в 13:28:52 UTC+3, Vraj Reshamdalal: > Hi alex-coder, > To get ast for GO code in a json format you can try a web tool: > https://astexplorer.net/ > or > https://github.com/asty-org/asty > > Thanks, > Vraj > > On Thursda

[go-nuts] Re: tool for ast graph visualization

2023-06-14 Thread alex-coder
Xa, context is the king on a field :-) You gave a good sample, and I would like to get ast for GO code in a json format for further processing. четверг, 15 июня 2023 г. в 01:45:20 UTC+3, ben...@gmail.com: > Hi Alex, could you please give a bit more context about what language or > k

[go-nuts] tool for ast graph visualization

2023-06-13 Thread alex-coder
Hi All ! Could you please advice me a tool to visualize an ast graph. Thank you. -- 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...@googleg

[go-nuts] Hosting to deploy && run exe ?

2023-06-11 Thread alex-coder
Hi All ! Could you please advise me the simple hosting to deploy && run a small exe assembled from go. Thank you ! -- 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

[go-nuts] ast package design / improvement discussion. where to read ?

2023-03-19 Thread alex-coder
Hi All ! Is there any discussion, which one possible to read, especially with rationale ? Very interesting to read about walk.go file and callback of the custom code. Thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-18 Thread alex-coder
Ian and Andy, looks like the to string conversion works and even does not look ugly. :-) Thank you so much. пятница, 17 марта 2023 г. в 15:01:31 UTC+3, alex-coder: > Andy, thank you. > > In case there would be a choice between ugly and achievable, I must take > the last one:-)

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-17 Thread alex-coder
In that case, you > should use the pointers to the nodes as your map keys. > > If the *values* truly are what you care about, use the go/format package > to convert the node back to source code, and use the resulting string as > your map key. > > On Thursday, March 16, 202

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-16 Thread alex-coder
>> Sure, convert to a string and use that as a map key. :-) no, no, no. it looks very very ugly. четверг, 16 марта 2023 г. в 00:26:35 UTC+3, Ian Lance Taylor: > On Wed, Mar 15, 2023 at 2:16 PM alex-coder wrote: > > > > Ian, thank you. > > but may be the is any workar

Re: [go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread alex-coder
f them there. What do I whant is to use those types of interfaces or structures as a key to access to a value in a map. So, the question is: what type of a key for a map I must use ? Thank you. среда, 15 марта 2023 г. в 23:55:03 UTC+3, Ian Lance Taylor: > On Wed, Mar 15, 2023 at 9:17 AM a

[go-nuts] Re: Help to choose the right type of the key for a map.

2023-03-15 Thread alex-coder
the ast package it is possible to find there: ast package - go/ast - Go Packages <https://pkg.go.dev/go/ast#pkg-types> thank you. среда, 15 марта 2023 г. в 19:16:59 UTC+3, alex-coder: > Hi All ! > > There is a package named ast, inside there are a lot of structures like

[go-nuts] Help to choose the right type of the key for a map.

2023-03-15 Thread alex-coder
Hi All ! There is a package named ast, inside there are a lot of structures like: ast.Comment, ast.Field, ast.Node and so on. And I whould like to use types of those structure as a keys. So, I could not figure out what type of the key I should use in order to store in a map something under the key

Re: [go-nuts] How to encode/decode string to binary in golang

2023-03-13 Thread Alex Howarth
o raw binary and then decode the raw > binary > back to s1 and s2. > > > On Friday, March 10, 2023 at 11:36:09 PM UTC+2 Alex Howarth wrote: > >> If s1 and s2 are a fixed length then you can just slice up the decoded >> string based on the lengths. If they are of a vari

Re: [go-nuts] How to encode/decode string to binary in golang

2023-03-10 Thread Alex Howarth
If s1 and s2 are a fixed length then you can just slice up the decoded string based on the lengths. If they are of a variable length, you'll need a separator in the input string to later split on when decoded (s3 := s1 + ":" + s2 etc)? On Fri, 10 Mar 2023 at 10:33, Van Fury wrote: > Hi, > > I ha

[go-nuts] Re: etcd, how to stop it ?

2023-01-16 Thread alex-coder
s page useful: > http://www.catb.org/~esr/faqs/smart-questions.html#intro > > On Sunday, 15 January 2023 at 18:30:09 UTC alex-coder wrote: > >> Hi All ! >> >> I do understand that my question is not quite in the right arrea, >> but frankly, I'm totally lo

[go-nuts] etcd, how to stop it ?

2023-01-15 Thread alex-coder
Hi All ! I do understand that my question is not quite in the right arrea, but frankly, I'm totally lost. I'm not able to find the answer for the looks like very simple question. How to run - yes there is a sample, but how to stop it ? Thank you. -- You received this message because you are sub

Re: [go-nuts] Re: Design patterns. builder ?

2023-01-12 Thread alex-coder
of the template pattern to implement command/fasade pattern. And to say everything above a little bit simpler: package is used to build CLI. Sorry, English is not native for me. :-) Thank you. суббота, 3 апреля 2021 г. в 14:13:39 UTC+3, alex-coder: > Hi, > thank you for everyone! > &

[go-nuts] Generics in gollvm

2022-12-11 Thread Alex Markin
Hello. What is the status of generic programming (I mean the generics added in go-1.18) in the gollvm project? Are there any plans to support it or maybe someone already working on it? -- You received this message be

Re: [go-nuts] what is the origin of Go's reference time system?

2022-10-26 Thread Alex Besogonov
> > -rob > > > On Thu, Oct 27, 2022 at 5:15 PM Alex Besogonov <mailto:alex.besogo...@gmail.com>> wrote: >> Can we perhaps get a bit more unambiguous reference date for it? >> >> On Wednesday, October 26, 2022 at 1:06:36 PM UTC-7 Rob 'Commander' P

Re: [go-nuts] what is the origin of Go's reference time system?

2022-10-26 Thread Alex Besogonov
Can we perhaps get a bit more unambiguous reference date for it? On Wednesday, October 26, 2022 at 1:06:36 PM UTC-7 Rob 'Commander' Pike wrote: > I believe it's unique. I thought of it one day while walking home. It is > inspired by the way Cobol picture clauses represent number formats. (That

Re: [go-nuts] gollvm build fails

2022-10-26 Thread Alex Markin
respectively). After that, the cmake worked fine. Then the build failed with other problem: /home/alex/test/gollvm/build-debug/./bin/llvm-goc -o /home/alex/test/gollvm /build-de bug/tools/gollvm/gotools/go go_.o -I /home/alex/test/gollvm /build-debug/tools/gollvm/libgo -L /home/alex/test/gollvm/build-debug

Re: [go-nuts] gollvm build fails

2022-10-25 Thread Alex Markin
cd /x/llvm-project/build-relwithdbg/tools/gollvm/libgo && > /usr/bin/cmake -E copy_if_different > /x/llvm-project/build-relwithdbg/tools/gollvm/libgo/zgoarch.go.tmp > /x/llvm-project/build-relwithdbg/tools/gollvm/libgo/zgoarch.go > > Thanks, Than > > > > > On Wed, Oct 1

Re: [go-nuts] gollvm build fails

2022-10-19 Thread Alex Markin
m build process, e.g. here > > > https://go.googlesource.com/gollvm/+/253c122ed62d5e9a32a9806e83c47a389a6435bf/cmake/modules/AutoGenGo.cmake#63 > > What does the zgoarch.go file look like in your build area? > > Thanks, Than > > > On Wed, Oct 19, 2022 at 8:20 AM Alex Ma

[go-nuts] gollvm build fails

2022-10-19 Thread Alex Markin
Hello. I'm trying to build gollvm on my gentoo system and get the following error: FAILED: tools/gollvm/libgo/internal/.pic/goarch.o /home/alex/test/gollvm/build-debug/tools/gollvm/libgo/internal/.pic/goarch.o cd /home/alex/test/gollvm/build-debug/tools/gollvm/libgo && /usr/

Re: [go-nuts] How to call sort.Search in a loop

2022-10-11 Thread K. Alex Mills
Ah, my last post had a small mistake. A small modification to upper should be all you need. The function should use >= instead of >. See below. upper := sort.Search(len(haystack), func(i int) bool { return haystack[i].name >= needle.name }) On Tue, Oct 11, 2022, 7:38 AM K. A

Re: [go-nuts] How to call sort.Search in a loop

2022-10-11 Thread K. Alex Mills
sort.Search runs binary search. It's only guaranteed to work when you provide it with a function which is monotonic -- true at index i implies true at all indices greater than i. Your loop style search does not provide a monotonic function, whereas your "upper" function is monotonic. However, sinc

[go-nuts] Re: go program import ?

2022-09-30 Thread alex-coder
Hi, I have found data necessary to me there: go/build.Default.GOROOT in case someone is in interest. Thank you. четверг, 29 сентября 2022 г. в 20:59:50 UTC+3, alex-coder: > Hi All, > > How I could detect programmatically that import in a go code > belongs to a go distribution ? &

[go-nuts] go program import ?

2022-09-29 Thread alex-coder
Hi All, How I could detect programmatically that import in a go code belongs to a go distribution ? thank you very much for the answer. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails fro

Re: [go-nuts] Is there a better way to write this?

2022-09-15 Thread K. Alex Mills
The only alternatives that I see would each introduce an extra call to Add, like the below. I'm not sure if this is much less "clunky", but it at least avoids the reassignment to s. func collectStringsetMap(m map[string]*stringset.Set, key string, value ...string) *stringset.Set { if s, ok := m[

[go-nuts] Detachable context.Context?

2022-09-03 Thread Alex Besogonov
Hi! Let me give you some context. context.Context in Go serves two main purposes: 1. Cancellation and timeout support. 2. A carrier of values, as a de-facto replacement for thread-local variables. I have a problem with the first item. Cancellation and timeouts automatically propagate to child

[go-nuts] Re: Java to Go converter - 2

2022-08-22 Thread alex-coder
GoLang. I > think > > I did it in the past, and writting code in a new language make de new code > more maintenable. > > Em domingo, 22 de maio de 2022 às 03:49:42 UTC-3, alex-coder escreveu: > >> So, channels. >> Converter can now convert Java classes to Go ch

[go-nuts] github.com/splunk/pipelines hits v1.0.0

2022-08-20 Thread K. Alex Mills
t and combine pipeline stages as pairs. * Handle fatal and non-fatal errors from any pipeline stage. * Sinks for draining the result of a pipeline computation. Some future enhancements are planned. Please leave any suggestions or issues in the issue tracker. Thanks K. Alex Mills -- You received

Re: [go-nuts] Re: Why declaring multiple variable at once for same type feature exists in Golang?

2022-08-18 Thread K. Alex Mills
Yes. Declaring i and j on the same line is certainly cleaner. We should all do it like that. Am I missing something? On Thu, Aug 18, 2022, 9:25 PM Yasser Sinjab wrote: > Thanks, I don't object it personally, but I had a debate about "grouping > variables is considered a clean code". > > Let's s

Re: [go-nuts] gofmt 1.19 reformats comments in a way which breaks go-swagger

2022-08-17 Thread K. Alex Mills
I would hesitate to call this a bug in gofmt. Go released new godoc features as part of Go 1.19, along with reformatting of comments. Those features were entirely intentional. The decision made in the go-swagger project to place its comments alongside godoc comment blocks was a risky one in case o

Re: [go-nuts] Application Monitoring

2022-08-16 Thread K. Alex Mills
Monitoring and observability are best practices regardless of what language you use. We use a combination of Prometheus / Grafana and metrics exported by runtime/metrics. We also include custom metrics tailored to our application's use-case. Prometheus is not a standard Linux tool, but it is open

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

2022-08-11 Thread K. Alex Mills
rs to methods, so a method like Map() on a stream instance can’t be > written - because the stream is of type T, and the Map() produces a stream > of type R. > > psuedo code: > > type Stream[T any] interface { > ... > Map[R any](func (T) R) Stream[R] // syntax not su

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

2022-08-11 Thread K. Alex Mills
Ah, my apologies, I was wrong. Panicking in the midst of a func passed to one of these pipeline stages most certainly *will not* shut down the entire pipeline and cannot be recovered like I had suggested. Sorry about that. Sincerely, K. Alex Mills On Thu, Aug 11, 2022 at 4:56 PM K. Alex Mills

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

2022-08-11 Thread K. Alex Mills
hing stopping you from doing so with this library. Just use recover at the top of the func that spins up the pipeline and use context.WithCancel to shut the rest of the pipeline down in that case. Let me know if that's unclear and I'll do my best to provide an example. Sincerely, K. Ale

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

[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

[go-nuts] Is this algorithm viable? its faster than AES256 upto 50KB

2022-08-02 Thread Alex Breadman
package mod import ( "testing" ) func TestEncrypt(t *testing.T) { password := []byte("*RTFUGIHOD&TUGGIYKl") data := []byte("This encryption algorithm is faster than aes256 up to 40kb but how secure is it?") for x, _ := range data { p := (password[x%len(password)]) data[x] = data[x] + byte(p) } p

[go-nuts] Re: How do you make a ReadCloser?

2022-07-03 Thread Alex Shi
Note. For ioutil#NopCloser, as of Go 1.16, this function simply calls io.NopCloser. On Friday, July 1, 2022 at 1:09:15 PM UTC+8 Ansuraj Khadanga wrote: > Thats great! Thanks for sharing. > > req.Body = ioutil.NopCloser(bytes.NewReader([]byte("foo"))) > > works! > > On Wednesday, 27 June 2018 at

[go-nuts] Re: Java to Go converter - 2

2022-05-21 Thread alex-coder
ime.Duration(rand.Intn(n)) } type Thread struct { Runnable } func (t *Thread) run(wg *sync.WaitGroup) { t.Runnable.run(wg) } type Runnable interface { run(wg *sync.WaitGroup) } You can run code there: Go Playground <https://go.dev/play/p/-y6f_rOa4EX> Now I'll take a break, I need to d

[go-nuts] Re: Java to Go converter - 2

2022-05-18 Thread alex-coder
essing the > same model/algorithm. You need to identify all these possibilities, parse, > and convert them to Go. I could be wrong about this, but it may be easier > to convert Java bytecode to Go. > > On Tuesday, May 17, 2022 at 9:49:09 PM UTC+7 alex-coder wrote: > >>

[go-nuts] Re: Java to Go converter - 2

2022-05-17 Thread alex-coder
ad struct { Runnable } func (t *Thread) run(wg *sync.WaitGroup) { t.Runnable.run(wg) } type Runnable interface { run(wg *sync.WaitGroup) } The Go Playground, you can run code there: Go Playground. <https://go.dev/play/p/o7tXt8p2m_3> Thank you to all very much. четверг, 28 апреля 2022 г.

[go-nuts] Re: Java to Go converter - 2

2022-04-28 Thread alex-coder
be about channel's. If anyone has an interesting example, write me, I'll think about how to solve it. I just can't promise that it will be quickly. :-) Thank you to all ! четверг, 7 апреля 2022 г. в 18:52:25 UTC+3, alex-coder: > Thanks for the comments about generating code to

[go-nuts] Re: Java to Go converter - 2

2022-04-07 Thread alex-coder
c (throwException *ThrowException) runme() { panic(Exception{"Exception"}) } type Exception struct { msg string } понедельник, 4 апреля 2022 г. в 14:12:37 UTC+3, alex-coder: > > > > > *Another use case for automatically translating codewritten in Java to > Golang is

[go-nuts] Re: Java to Go converter - 2

2022-04-04 Thread alex-coder
t it") default: fmt.Println("No, something is not right") } } fmt.Println("finally processing") }() (&ThrowException{}).runme() } type ThrowException struct{} func (throwException *ThrowException) run

[go-nuts] Java to Go converter - 2

2022-03-27 Thread alex-coder
After several months of switching from Java to Golang, it seemed to me that it would be interesting to make the translation of Java code into Golang automatically. The text below shows what has been done so far. The work is not a prototype, but rather indicates the possibility of achieving a res

Re: [go-nuts] IsNil check. How?

2022-03-16 Thread Alex Besogonov
> The reflect code panics, because you are comparing a struct value to nil. >> Struct values can not be nil. >> >> No. I’m comparing AN INTERFACE, not a struct. >> > You are using `reflect` to inspect the dynamic value of that interface. > That dynamic value is a struct. > No. It should be a PO

Re: [go-nuts] IsNil check. How?

2022-03-16 Thread Alex Besogonov
> Here's a simplified version of the real code: > https://go.dev/play/p/8LfgIGhd8GR - it > compiles without any issues. > > Yes it compiles. Plenty of buggy Go code will compile. Here is another > example of buggy interface

Re: [go-nuts] IsNil check. How?

2022-03-16 Thread Alex Besogonov
On Wednesday, March 16, 2022 at 12:29:07 PM UTC-7 axel.wa...@googlemail.com wrote: > On Wed, Mar 16, 2022 at 7:02 PM Alex Besogonov > wrote: > >> Nope. Your solution doesn't work either: >> https://go.dev/play/p/DSik2kJ-gg4 (it doesn't crash, just falsely &

Re: [go-nuts] IsNil check. How?

2022-03-16 Thread Alex Besogonov
pe. That's a stupid part of the language and there's no good justification why this hasn't been yet fixed. On Wednesday, March 16, 2022 at 10:36:48 AM UTC-7 axel.wa...@googlemail.com wrote: > On Wed, Mar 16, 2022 at 6:21 PM Alex Besogonov > wrote: > >> I'm trying

[go-nuts] IsNil check. How?

2022-03-16 Thread Alex Besogonov
Hi! I'm trying to solve the eternal "interface == nil" problem and I can't find a solution in this case: https://go.dev/play/p/DSik2kJ-gg4 It looks like casting to the base pointer type confuses the reflection package. Is there a way to solve this? PS: PLEASE do add "nilptr" to the language pr

[go-nuts] Fuzz Testing in Go 1.18

2022-02-21 Thread Alex Pliutau
Hi, I recently made a video on fuzzing support in Go 1.18. I'd like to hear your feedback if that's possible - https://youtu.be/w8STTZWdG9Y Best, Alex -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Go 1.18 Beta 2 is released

2022-01-31 Thread Alex Rakoczy
Hello gophers, We have just released go1.18beta2, a beta version of Go 1.18. It is cut from the master branch at the revision tagged go1.18beta2. Please try your production load tests and unit tests with the new version. Your help testing these pre-release versions is invaluable. Report any prob

[go-nuts] Jobs

2022-01-12 Thread Alex Dvoretskiy
What is a good way to find Go developers and Go jobs nowadays? -- 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 t

[go-nuts] Re: Java to Golang converter

2021-12-16 Thread alex-coder
The topic is very interesting, is anyone being worked on a subject ? Thank you. четверг, 11 мая 2017 г. в 21:19:13 UTC+3, dtr...@gmail.com: > > Java has vast number of libraries. > > Good thing is Golang is catching up with its own style. > > There are cases though where there is no equivalent l

[go-nuts] [security] Go 1.17.5 and Go 1.16.12 are released

2021-12-09 Thread Alex Rakoczy
b site: https://golang.org/dl/ To compile from source using a Git clone, update to the release with "git checkout go1.17.5" and build as usual. Thanks to everyone who contributed to the releases. Cheers, Alex and Filippo for the Go team -- You received this message because you are s

Re: [go-nuts] UML && Golang, part 2 ?

2021-11-15 Thread alex-coder
After all, I found that plantuml is more suitable for code visualization. If anyone is interested, you will find it there: https://plantuml.com/ Thank all for participation. суббота, 13 ноября 2021 г. в 19:43:20 UTC+3, alex-coder: > Satyendra, > >> https://github.com/ofabr

Re: [go-nuts] UML && Golang, part 2 ?

2021-11-13 Thread alex-coder
Satyendra, >> https://github.com/ofabry/go-callvis very interesting, but looks like a little bit out of date. Thank you. воскресенье, 4 июля 2021 г. в 18:57:46 UTC+3, satyendra...@gmail.com: > Alex you can try this. > > https://github.com/ofabry/go-callvis > > Thanks and

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

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-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

  1   2   3   4   5   >