Re: [go-nuts] Visual Studio for Mac Retirement, replacement ?

2023-09-15 Thread Haddock
One good replacement is Jetbrains Rider which works on Windows and Mac. I think on Linux as well. gbarr schrieb am Samstag, 2. September 2023 um 19:29:55 UTC+2: > Well that is a relief that I simply misread it. > > Thanks, > Graham > > On Saturday, September 2, 2023 at 5:14:13 PM UTC+1 Björn Gra

[go-nuts] Looking for some Go library or application as blueprint for concurrency stress tests

2022-11-01 Thread Haddock
tools, libraries or applications written in Go making heavy use of Goroutines and channels from which I could extract the concurrent operations going on as a blueprint for building the stress tests for my own little concurrency library. Any hints greatly appreciated. Regards, Haddock -- You r

[go-nuts] Re: Idea extending xerror.As

2021-09-23 Thread Haddock
Brian Candler schrieb am Sonntag, 19. September 2021 um 20:46:45 UTC+2: > > I'm not sure how useful that is though, especially because "return" inside > that anonymous function will return from that anonymous function, not the > outer function. > https://go2goplay.golang.org/p/h6ZRnqM5cRx > Y

[go-nuts] Re: Idea extending xerror.As

2021-09-19 Thread Haddock
Brian Candler schrieb am Sonntag, 19. September 2021 um 13:38:49 UTC+2: > Also, I may be missing the point, but does the following do what you want? > https://play.golang.org/p/86DQD5QMbJ3 > > _, err := os.Open("non-existing") > if pe := (&os.PathError{}); errors.As(err, &pe) { > fmt.Println("Fai

[go-nuts] Idea extending xerror.As

2021-09-19 Thread Haddock
I like the way error handling is done in the xerror package. Things become more concise, but remain very easy to read and understand as in plain Go errorhandling. Here is the example of how to use xerror.As: _, err := os.Open("non-existing") if err != nil { var pathError *os.PathEr

[go-nuts] Re: Still "missing" priority or ordered select in go?

2021-05-12 Thread Haddock
> In addition to htq and ltq you have a third queue into which you also > insert a token once one has been added to htq or ltp. The thread/goroutine > that serves htq, ltp, hq, lq is blocked by this additional queue. When it > is empty, htq and ltq are also empty. So when the goroutine is blo

[go-nuts] Re: Still "missing" priority or ordered select in go?

2021-05-12 Thread Haddock
Brian Candler schrieb am Mittwoch, 12. Mai 2021 um 10:34:31 UTC+2: > On Wednesday, 12 May 2021 at 08:40:36 UTC+1 Haddock wrote: > >> I once implemented something to solve the same problem in Java. So I have >> a high priority queue (hq) and a low priority queue (lq). Whene

[go-nuts] Re: Still "missing" priority or ordered select in go?

2021-05-12 Thread Haddock
I once implemented something to solve the same problem in Java. So I have a high priority queue (hq) and a low priority queue (lq). Whenever an item is atted to the hq a token is also added to some associated high priority token queue (htq). Same for the lq and ltq. Some thread or goroutine tak

Re: [go-nuts] Is there a final document on generics?

2021-03-16 Thread Haddock
> One addition to my last mail: There are some drafts of generic packages in > the > dev.go2http://dev.go2gohttps://github.com/golang/go/tree/dev.go2go/src/cmd/go2go/testdata/go2path/srcgo > > > > branch. > Th

[go-nuts] Is there a final document on generics?

2021-03-16 Thread Haddock
Hello, I have lost a bit oversight how generics will look now in the final proposal that was accepted and is serving as the guideline to implement generics for Go 1.18 or later. There were too many proposals and discussions about them that I lost track. Is there some final document that descr

[go-nuts] Re: [ANN] New german translations

2021-03-16 Thread Haddock
Anyhow, if I hear how young people are talking nowadays, it makes me sick. Die Funktion wurde "gecalled" und die Exception "gethrown". Sometimes I fear the next generation will not have learned to watch what their mind is doing. I might be wrong. I hope so. Haddock schrieb

[go-nuts] Re: [ANN] New german translations

2021-03-15 Thread Haddock
ave a look at the "Wörterliste". The link is in >>> the box at the top. >>> About Spelling: that seems to be a question of age. I learnt the word >>> "Kode" long before I came across computers (but I do use "Computer" in >>> german

[go-nuts] Re: [ANN] New german translations

2021-03-10 Thread Haddock
I don't know about using the word "Kode" in German. I've never seen it different than with c as in English. Whatever, you took a big effort and did a very nice job. Thank you! HaWe schrieb am Dienstag, 9. März 2021 um 17:26:48 UTC+1: > Just finished german translation of the two new tutorials:

Re: [go-nuts] Re: How does the Golang compiler handle dependencies?

2020-11-17 Thread Haddock
Here is an article by Walter Bright that explains what the C++ compiler is doing: https://www.digitalmars.com/articles/b54.htm l Walter Bright is the creator of the first C++ compiler (if I remember right this was the Zortech C++ compiler, later ac

[go-nuts] Re: Go is easy to lean. But other languages are hard to forget

2020-10-05 Thread Haddock
"It takes many months of immersion in idiomatic Go for these scars to have a chance to heal." Well, those other languages were also good at specific things that Go might not be specifically designed for. So all the things you learned from other languages was not simply waste. It was good for s

Re: [go-nuts] A few thoughts on type parameters

2020-08-04 Thread Haddock
>> That is an experiment. We don't seem to need the type keyword for >> generic functions. But we do need it for generic types, I'm used for years to look at code with generics in Java. The additional type keyword as proposed for generics in Go in IMHO make reading the declaration containing g

Re: [go-nuts] pure function on golang

2020-07-07 Thread Haddock
> the name "pure" may be debatable, but the characteristic is the same with "constexpr" in C++, although I also don't have a strong reason why this is important beside separation IO and non-IO D is a lange that has true pure functions, see https://dlang.org/spec/function.html#pure-functions

Re: [go-nuts] Re: non-local return?

2019-03-08 Thread Haddock
As the Dalai Lama likes to say: "No, you must search". Am Freitag, 8. März 2019 14:58:40 UTC+1 schrieb Robert Engels: > > I understand that, but can you point to a real world example that doesn’t > use them in handling some sort of “async” network request? > > On Mar 8,

Re: [go-nuts] Re: non-local return?

2019-03-08 Thread Haddock
Non-local returns are not about anything with concurrency or threads. It is about return from a closure where the thread of execution jumps out of the closure and out of the function that calls it. See this article

[go-nuts] Re: non-local return?

2019-03-08 Thread Haddock
I guess there is no way to get it accomplished. Non-local returns also don't work on the JVM. What the Kotlin guys were doing to work around it was to use inlining, see https://kotlinlang.org/docs/reference/inline-functions.html. In Scala if the Scala compiler sees a non-lucal return, in the ge

[go-nuts] Re: Performance comparison of Go, C++, and Java for biological sequencing tool

2019-03-06 Thread Haddock
Benchmarks are always limited, I know. But this might indicate some direction: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/go-gpp.html Am Mittwoch, 6. März 2019 14:07:03 UTC+1 schrieb JuciÊ Andrade: > > That doesn't surprises me at all. > > A couple years ago I worked for

[go-nuts] Re: Go - logo commercial use

2019-02-14 Thread Haddock
Nice work, you need to add Kotlin, Scala, Hadoop, Redis, MongoDB, Kafka, Spark, ... :-))) Am Donnerstag, 14. Februar 2019 00:15:49 UTC+1 schrieb agabo...@gmail.com: > > I would love to be able to include your logo as part of our inventory > (sticker site) but aren’t sure of the restrictions rega

Re: [go-nuts] The performance comparation of Golang and Java

2019-01-25 Thread Haddock
This algorithm is quite fast and corect: public static int fibo(int n) { int t = 1; int result = 0; while (n-- > 0) { result = t - result; t = t + result; } return result; } Am too busy to convert the code to Go, but it should be easy. Am Freitag, 25. Januar

[go-nuts] Re: Using "er" and "able" for interfaces

2019-01-18 Thread Haddock
Am Mittwoch, 16. Januar 2019 15:42:38 UTC+1 schrieb Victor Giordano: > > Hello all! > I don't know very well what is the topic about using "er" or "able" or any > other suffix for the single method interfaces (a.k.a. "funcitonal > interfaces"), but i would like to address some thoughts, hope y

[go-nuts] Re: Ternary ... again

2018-08-16 Thread Haddock
If you think this discussion is taking a lot of time have a look at the same discussion for Kotlin in their user group: https://discuss.kotlinlang.org/t/ternary-operator/2116/95 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fro

[go-nuts] Re: Go Games

2018-03-13 Thread Haddock
I guess for gaming applications Go is used for games played through the Internet (web browser or other frontend) to develop the server-side backend system that processes the game data received from clients. Am Montag, 5. März 2018 01:16:47 UTC+1 schrieb Chris FractalBach: > > I'm still new to Go

Re: [go-nuts] Re: Channels vs Actors

2018-03-08 Thread Haddock
> > > >> Actors have an advantage when used for distributed systems. If two actors >> on different boxes communicate with each other it is not a problem to make >> communication work without data loss through the principle of supervision. >> Supervision is the idea Joe Armstrong (the creator of

Re: [go-nuts] Re: Channels vs Actors

2018-03-08 Thread Haddock
Am Donnerstag, 8. März 2018 10:17:02 UTC+1 schrieb Anto Aravinth: > > Thanks everyone and thanks Haddock for such a detailed response. Few > questions: > > On Thu, Mar 8, 2018 at 2:32 PM, Haddock > > wrote: > >> The main difference is that goroutines do blocking t

[go-nuts] Re: Channels vs Actors

2018-03-08 Thread Haddock
The main difference is that goroutines do blocking takes from channels whereas actors receive asynchronous events. This means that actors have to deal with all the situations in asynchronous programming that are inherently difficult to deal with (inherently means there is no general way to solv

[go-nuts] Re: Inheritance and OOP: Go one better

2018-02-13 Thread Haddock
Hi Stefan, your solution falls short on addressing the underlying problem of how to implement inheritance using dynamic dispatch through using interface. In the article "Inner Pattern to mimic Method Overwriting in Go "

[go-nuts] Re: “Design Patterns: Elements of Reusable Object-Oriented Software” in Go

2018-02-08 Thread Haddock
This might be of interest for you: "Evaluating the Go Programming Language with Design Patterns ". Am Freitag, 2. Februar 2018 18:03:54 UTC+1 schrieb matthe...@gmail.com: > > I’m looking at patterns summarized on Wikipedia from “Design Patterns

[go-nuts] Re: Generics are overrated.

2017-08-09 Thread Haddock
Am Mittwoch, 9. August 2017 23:29:13 UTC+2 schrieb DV: > > > > On Tuesday, August 8, 2017 at 5:37:42 AM UTC-6, Haddock wrote: >> >> In my opinion generics added to Go would make Go really take off. >> Currently Java developers would not change to Go. With Go

[go-nuts] Re: "find" for Slices like "append"

2017-08-09 Thread Haddock
You can create your own generic List struct using one of the existing code generators like: https://github.com/cheekybits/genny https://github.com/taylorchu/generic https://github.com/joeshaw/gengen https://github.com/clipperhouse/gen https://github.com/ncw/gotemplate https://github.com/droundy/g

[go-nuts] Re: "find" for Slices like "append"

2017-08-09 Thread Haddock
Yio -- 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 options, visit https://groups.google.com/d/optout.

[go-nuts] Re: Generics are overrated.

2017-08-08 Thread Haddock
In my opinion generics added to Go would make Go really take off. Currently Java developers would not change to Go. With Go having generics this would change and more people would consider Go also when not coming from Java/C#/etc. -- You received this message because you are subscribed to the

[go-nuts] Re: Go channels overused and hyped?

2017-08-08 Thread Haddock
CSP style concurrency in Go is the killer feature in Go. It makes concurrent programming so much easier. To understand this you need to have done some years of concurrent programming using asynchronous calls, threads, locks, semaphores and all that stuff. I have done that and I can say that CSP

[go-nuts] Re: genmap: Generate thread-safe, type-safe maps easily

2017-07-12 Thread Haddock
I once played a bit with thread-safe collections I wrote using Java. With the number of threads increasing throughput did not just decline a bit, it completely plummeted that I was baffled. Class ConcurrentHashMap, which is part of Java since JDK 1.5 is divided in segments. Segments help great

[go-nuts] Re: thread safety of map when each goroutine access a different key

2017-03-13 Thread Haddock
Forgot to mention that ConcurrentHashMap has 256 segments (if I remember right). So you can have 256 map operations going on concurrently. Am Montag, 13. März 2017 11:58:15 UTC+1 schrieb Haddock: > > You can download Java (JDK5 or later) and have a look at class > ConcurrentHashMap.

[go-nuts] Re: thread safety of map when each goroutine access a different key

2017-03-13 Thread Haddock
You can download Java (JDK5 or later) and have a look at class ConcurrentHashMap. This will give you a blueprint about how this can be implemented using segments. After segment lookup for a given hash code only the segment needs to be locked, but not any more the entire map. Note, that you stil

Re: [go-nuts] Sample code with races needed for presentation

2017-03-09 Thread Haddock
Thanks, Ian. There is plenty of stuff there ;-). Am Donnerstag, 9. März 2017 00:20:33 UTC+1 schrieb Ian Lance Taylor: > > On Wed, Mar 8, 2017 at 2:51 PM, Haddock > > wrote: > > > > I'm working on a comparison between concurency in Go and on the JVM. For > &g

[go-nuts] Sample code with races needed for presentation

2017-03-08 Thread Haddock
myself in reasonable time. So that's why I wrote this post. Thanks in advance, Haddock -- 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] Re: 2016 Go User Survey results

2017-03-08 Thread Haddock
Thanks for the interesting results. I was astonished to see that the most wanted new feature were generics. I don't want to rub this in again. I was just surprised to see that I wasn't one of the lone riders in this matter as I used to think ;-). Am Sonntag, 22. Januar 2017 13:26:00 UTC+1 schri

[go-nuts] Re: Arguments for writing fast, high-load servers in Go instead of Scala?

2017-02-20 Thread Haddock
I would say that CSP in Go using channels and goroutines make concurrent programming a lot easier than with actors in Scala (Akka). Reason is that it is easier to detect races and deadlocks in Go at development time (code using CSP easier to understand than code using asynchronous calls) and at

[go-nuts] Re: How has your company adopted Go ?

2017-01-03 Thread Haddock
hammer is needed for in that situation and just keep repeating the same recipes. So, then let's stick with the small companies without architects ;-). -- Haddock Am Montag, 2. Januar 2017 17:32:04 UTC+1 schrieb oju...@gmail.com: > > Poor man, you are out of luck. Unfortunatelly tod

Re: [go-nuts] Re: How has your company adopted Go ?

2016-12-29 Thread Haddock
all service > that either is yet to be written, or is performing badly in its current > Java implementation. > > Eric > > On Dec 29, 2016, at 12:35 AM, Haddock > wrote: > > This thread is very interesting to me as I'm working exclusively with Java > and am looking

[go-nuts] Re: How has your company adopted Go ?

2016-12-29 Thread Haddock
nting in order to show some use cases to my boss. Thanks, Haddock -- 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...@googlegroup

Re: [go-nuts] Thinking OO virtual function in Go

2016-11-24 Thread Haddock
resorting to a shared function. This does not really cover overwriting in the OO sense. The article I mentioned shows how to do this: http://objectscape.blogspot.de/2013/09/inner-pattern-to-mimic-method.html Cheers, Haddock -- You received this message because you are subscribed to the Google

[go-nuts] Re: Thinking OO virtual function in Go

2016-11-23 Thread Haddock
Am Dienstag, 22. November 2016 22:16:27 UTC+1 schrieb Tong Sun: > > Hi, > > How to architect the OO's virtual function in Go? > > Here is another blog that shows a way how to do this: http://objectscape.blogspot.de/2013/09/inner-pattern-to-mimic-method.html -- You received this message beca

Re: [go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-26 Thread Haddock
Am Mittwoch, 26. Oktober 2016 11:50:08 UTC+2 schrieb Dave Cheney: > > I am agreeing with Haddocks post, sorry if the groups interface did not > respect the thread of discussion. What about a versioning experiment as with the vendor experiment? -- You received this message because you are su

Re: [go-nuts] Re: Golang should have a center packages index hosting like npm, rust crates

2016-10-25 Thread Haddock
Am Samstag, 22. Oktober 2016 01:57:59 UTC+2 schrieb Axel Wagner: > > > > On Fri, Oct 21, 2016 at 11:08 PM, Ronny Bangsund > wrote: > >> On Thursday, October 20, 2016 at 5:45:03 AM UTC-0:8, zixu mo wrote: >>> >>> Golang should have a center packages index hosting like npm, rust crates. >>> >> It

[go-nuts] Re: A simple question - Can C++ and goLang coexist in the same ecosystem?

2016-10-24 Thread Haddock
Am Sonntag, 23. Oktober 2016 07:36:50 UTC+2 schrieb Carlos Ferreira: > > C++ is evolving. C++14 is out and used in production. C++17 is almost > ready. > > But because it seems that goLang is quite efficient (near C performance), > I'm just wondering... > > Just to be precise: Go has currentl

Re: [go-nuts] what's the difference between Golang and Java about interface?

2016-10-10 Thread Haddock
Am Samstag, 8. Oktober 2016 17:31:27 UTC+2 schrieb Pietro Gagliardi (andlabs): > > In Java, if an interface contains exactly one method, and that method is > not already part of java.lang.Object, the syntax > > Interface i = (arguments) -> { > code > }; > > will make an object i of that interfa

[go-nuts] Re: Static race detector?

2016-09-14 Thread Haddock
> > One WIP http://www.doc.ic.ac.uk/~cn06/pub/2016/dingo/ > Man, this is cool! Thanks for the link. They say their deadlock detector only works for unbounded buffers. Nevertheless, this closes a very important gap. If I only think of the years I spent reproducing deadlocks and race conditions

[go-nuts] Re: Save to store encryption key in Go executable?

2016-06-13 Thread Haddock
hen locally not present. Regards, Haddock Am Montag, 13. Juni 2016 18:01:48 UTC+2 schrieb Haddock: > > Hello, > > I'm developing my own little encryption application in Go. The Go > application needs to know the key used for encryption and decryption. My > question is whether

[go-nuts] Save to store encryption key in Go executable?

2016-06-13 Thread Haddock
thing. I'm a complete Go beginner and know nothing about its memory layout. So that's why I thought it's better to ask. Thanks, Haddock -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and