Re: [go-nuts] Potential language feature for testing value membership in if statements?

2025-03-20 Thread Wojciech S. Czarnecki
n': return Token }; " will compile happily. Try: echo "package main; func main() { x := func (c rune) int { switch c { case ' ', '\t', '\n': return 1 }; return 0 }; println(x(' ')) }" > foo.go ; go run foo.go Hope this helps, -- W

[go-nuts] Failing unit test in Windows (TestLookupLocalPTR)

2025-02-22 Thread Albert S
*lookupPTR* implementation seems to rely on the output from ping essentially it's this ping command *ping -n -1 -a * and doing a regex matching `(?m)^Pinging\s+([a-zA-Z0-9.\-]+)\s+\[.*$` I tested the ping command in my windows (base) C:\Users\grand>ping -n 1 -a 192.168.1.56 Pinging host.d

Re: [go-nuts] go: go.mod file not found in current directory or any parent directory; see 'go help modules'

2024-03-28 Thread Wojciech S. Czarnecki
Dnia 2024-03-25, o godz. 11:58:57 Kurtis Rader napisał(a): > Please don't use screenshots for plain text. Uhhh... and do delete images on the reply, please. That said: Thank you for reacting to screenshots posted :) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -

Re: [go-nuts] go1.21.0 panics when loading plugin

2023-08-12 Thread Wojciech S. Czarnecki
Dnia 2023-08-08, o godz. 18:11:56 Bernd Fix napisał(a): > After switching from go1.20.7 to go1.21.0 one of my applications > compiles without warnings or errors, but fails at run-time with the > following panic when loading a plugin: IIRC release notes tools now are version aware, so likely yo

[go-nuts] [testing] best practices for the test (client-server)

2023-08-07 Thread sumith s
Hi, Anyone have suggestion for writing test cases (best practices ) for client server communication. -- 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-nut

[go-nuts] The double caret statement

2023-08-02 Thread Wojciech S. Czarnecki
n defer fh.Close() x, e := tryparse(fh) ^^ { logSmth(e) return } // ... return } Reference thread: https://groups.google.com/d/msgid/golang-nuts/18e49891-9012-433d-89ce-3dfcc0625cedn%40googlegroups.com P.S. That is for YetAnotherOfThousandOfGoErrorHandlingIdeas being archived ;) --

Re: [go-nuts] Error handling

2023-08-02 Thread Wojciech S. Czarnecki
matting etc is needed before returning, eg w, err := os.Create(dst) ^^ { return err } P.S — bat operator is easily implementable in an IDE with onFileOpen/onFileWrite hooks. Its the piping of content to tools (VSCode and GoLand) that bars me from personally using it. Hope this helps, --

[go-nuts] [go test] pure Test Classes.

2023-07-26 Thread sumith s
Currently, we do not have pure Test Classes defined by us. We are using Golang specific Test Class structure. Each FILENAME_test.go will have its own test class under "Golang Test". I'm trying to define a pure Test Classes. how can do that? -- You received this message because you are subscrib

[go-nuts] [go test] How to write pure test classes to handle larger execution delay

2023-07-25 Thread sumith s
There will be an issue if we have test cases with larger delay. If one test case executed, then the following has larger execution time , then the whole test framework will fail. Im trying to define a test class to handle these kinds of issues. -- You received this message because you are subs

Re: [go-nuts] Please consider voting to reopen Golang subreddit

2023-06-24 Thread Wojciech S. Czarnecki
robust, IMO, as it would cost. It seems to me that current Reddit's brass has no faintest idea how many $millions monthly mod's work is worth. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups &qu

[go-nuts] Issue with glog https://github.com/golang/glog/releases/tag/v1.1.0

2023-03-16 Thread Chandra S. Rangavajjula (Nokia)
Hi, I am using glog in my application development. With the latest tag (https://github.com/golang/glog/releases/tag/v1.1.0), there started a new panic error with -vmodule. This issue was not there in older version. #

Re: [go-nuts] Best practice for "main.go" to access members of a structure in the real package

2023-02-27 Thread Wojciech S. Czarnecki
res around it. Here is mine's substitute I prefer for simple cmd scripts: https://github.com/ohir/mopt > But I've been using file/package level vars. This is clearly a bad thing. It is perfectly OK if these are set once from the cmdline. Hope this helps, -- Wojciech S. Czarnecki

[go-nuts] Re: pprof : how to dynamically collect profile data from live API server ?

2022-10-02 Thread Theivaraj S
how to profiling for post method for rest api in golang On Thursday, January 14, 2016 at 7:26:42 PM UTC+5:30 Tamás Gulácsi wrote: > You can try https://github.com/rakyll/gom which is almost that: a > continuous pprof. Maybe some persistence shall be added to gom. -- You received this message

Re: [go-nuts] How long does it take to import packages?

2022-08-31 Thread Wojciech S. Czarnecki
> much time were spent on initialization. After removing all init() function > in relevant packages. The speed was still very slow.It even takes dozens of > seconds before entering my real unit test function. hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -

Re: [go-nuts] How Unbuffered channel work

2022-06-05 Thread Manjeet S
Thank you so much Aleksei Perevozov and Jan Mercl On Sunday, June 5, 2022 at 7:49:40 PM UTC+5:30 Jan Mercl wrote: > On Sun, Jun 5, 2022 at 4:06 PM Manjeet S wrote: > > > Can someone help me to understand why this code is not working. I'm > expecting that <-ch wai

[go-nuts] How Unbuffered channel work

2022-06-05 Thread Manjeet S
I just started to learn Go Language, and I'm enjoying writing code in Go. So today, I'm trying to understand how the unbuffered channel works Can someone help me to understand why this code is not working. I'm expecting that <-ch wait until we receive from channel ch func main() { ch := mak

[go-nuts] Re: httptest and gorilla/mux route variables

2021-12-03 Thread Kevin Mathew S
This works perfectly for me func newReq(method, path, body string, vars map[string]string) *http.Request { r := httptest.NewRequest(method, path, strings.NewReader(body)) return mux.SetURLVars(r, vars) } On Tuesday, May 12, 2015 at 7:34:21 PM UTC+5:30 al...@getloopd.com wrote: > Awesome! This

Re: [go-nuts] pkg.go.dev: navigation index is confusing

2021-09-04 Thread Wojciech S. Czarnecki
`go doc net/http | grep -i pref` const TrailerPrefix = "Trailer:" func StripPrefix(prefix string, h Handler) Handler `go doc net/http | grep -i pars` func ParseHTTPVersion(vers string) (major, minor int, ok bool) func ParseTime(text string) (t time.Time, err error) Hope this helps, -- Woj

Re: [go-nuts] pkg.go.dev: navigation index is confusing

2021-09-03 Thread Wojciech S. Czarnecki
ed before hitting "send". :( I misunderstood Markus Heukelom's problem. @Markus: I normally use browser's search function to get to the function and it works well with pkg.go.dev too. @Axel: I sincerely apologize for undeserved and misguided sarcasm. Shame on me. -- Wojciech S. Cz

Re: [go-nuts] pkg.go.dev: navigation index is confusing

2021-09-03 Thread Wojciech S. Czarnecki
w me to find only things I am already intimately familiar with? Uh. Now I am the more glad I got local godoc fork: https://sr.ht/~sircmpwn/godocs.io/ yw, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups &

[go-nuts] Using a local copy of an external package?

2021-08-26 Thread Paul S. R. Chisholm
Hypothetical example: Say I'm writing an application that uses "rsc.io/quote" and I discover a bug in that package that breaks my software. I would of course clone the quote repository, add a test that demonstrates the bug, fix the bug, and submit a patch to the maintainer. After making the fix bu

Re: [go-nuts] Makefiles for Go Programs

2021-08-24 Thread Wojciech S. Czarnecki
nor update again. Make does not come alone for end-users. Usually it comes bundled with several hundreds of megabytes of the devel packages user gets after issuing eg. `sudo apt-get install build-essential`. Then she's left with a bit more more unused stuff than a single mage binary. TC,

Re: [go-nuts] Re: Makefiles for Go Programs

2021-08-23 Thread Wojciech S. Czarnecki
Dnia 2021-08-23, o godz. 19:47:47 Roland Müller napisał(a): > What are the alternatives to Makefile that are used by Go developers? https://github.com/magefile/mage yw. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribe

[go-nuts] Re: How to retrieve content of file uploaded using "curl --upload-file ..." way in Go HttpServer

2021-08-16 Thread Kannan S
etting an error while trying to upload a file using curl error in server is :panic serving 10.10.20.55:62253: runtime error: index out of range [0] with length 0 what is the reason?? On Wednesday, 8 October 2014 at 02:14:13 UTC+5:30 Tobias S. wrote: > Sorry, I misunderstood your problem, so my

Re: [go-nuts] Re: Small number change will affect benchmark results

2021-07-29 Thread Wojciech S. Czarnecki
these threads you omit important facts. This stands! You often post too soon. Please remember that this is MAILING list that just happens to have web interface. You do often "thinkk in loud" and I see an inflow of messages to my mailbox. Just let your question grow for a while before you

[go-nuts] Re: Table-driven benchmarks defeat inlining

2021-06-06 Thread Paul S. R. Chisholm
b *testing.B) { > sum = 0 > > for i := 0; i < b.N; i++ { > sum += PopCount(0x1234567890abcdef) > } > } > > As you can see from the objdump, BenchmarkPopCountAlive code is not > eliminated. > > For details, see the popcount.txt attachment. >

[go-nuts] Table-driven benchmarks defeat inlining

2021-05-31 Thread Paul S. R. Chisholm
This is not a serious problem, but it surprised me. (By the way, how can I post a message with code formatting?) I'd like to create table-driven benchmarks: https://blog.golang.org/subtests. To that end, I started with code from *The Go Programming Language*: // PopCount is based on an examp

Re: [go-nuts] proposal: infer module name via version control when running `go mod init`

2021-05-12 Thread Wojciech S. Czarnecki
t is a sqlite db). Hoe this helps > Best, > Jon -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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] Do not post images of text, please. [Was: doesn't see the function in the same package(pug/jade)]

2021-05-10 Thread Wojciech S. Czarnecki
Dnia 2021-05-09, o godz. 07:47:21 Денис Мухортов napisał(a): > [image: хелп1.PNG][image: хелп2.PNG] Do not post images of text to programmer's list, please. Read rules at https://groups.google.com/g/golang-nuts TiA, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -

Re: [go-nuts] I want to help with polish version of "A Tour of Go", how to start?

2021-05-04 Thread Wojciech S. Czarnecki
com/golang/tour/blob/master/TRANSLATE Proszę uprzejmie :) > Kamil Ziemian (don't try to spell my name ;)) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscri

Re: [go-nuts] Need for clarification on go1.13-errors blog page

2021-05-02 Thread Reha S
s or errors.As, since these functions will > examine the entire chain in a single call." > > This is the intended meaning. I agree that it's a bit janky as it is. > > > On Sun, May 2, 2021 at 7:58 PM Reha S wrote: > >> Hi Everyone, >> >> On http

[go-nuts] Need for clarification on go1.13-errors blog page

2021-05-02 Thread Reha S
Hi Everyone, On https://blog.golang.org/go1.13-errors there's a sentence: "*It is usually better to use errors.Is or errors.As, however, since these functions will examine the entire chain in a single call.*" This sentence sounds like it has more to it, or the word *however *is an extra wor

Re: [go-nuts] what is a &^= b means?

2021-04-24 Thread Wojciech S. Czarnecki
s://yourbasic.org/golang/bitwise-operator-cheat-sheet/ Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving e

Re: [go-nuts] Modules... why it has to be so painfull?

2021-04-09 Thread Wojciech S. Czarnecki
or not — objectively — I can not tell as I am an author. Though I'd like to see other's opinion whether proposed solution would work for them. TC. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Gro

Re: [go-nuts] GIL for Go

2021-04-01 Thread Eric S. Raymond
Amnon : > An exciting announcement from the Go team this morning! PK, that was a pretty good AFJ. You actually achieved weak level 2 on me. Explanation of level 2 (and others) here: http://esr.ibiblio.org/?p=3084 -- http://www.catb.org/~esr/";>Eric S. Raymond -- Y

Re: [go-nuts] [Macos/Apple M1] HTTP client requests to ".local" domain adds 5 seconds overhead

2021-03-31 Thread Wojciech S. Czarnecki
n-fix/ TL;DR do NOT use .local; keep hosts entries under allowed 10 names. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
windows > > ./e_windows.go excluded by name constraint (GOOS != windows) > > package github.com/ohir/buildconstr: build constraints exclude all Go > > files in /path.../buildconstr TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message becaus

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-30 Thread Wojciech S. Czarnecki
raint (GOOS != windows) package github.com/ohir/buildconstr: build constraints exclude all Go files in /path.../buildconstr TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

Re: [go-nuts] explain functionality similar to "go mod why for" to help with message "build constraints exclude all Go files in ..." ?

2021-03-29 Thread Wojciech S. Czarnecki
ng us with short info about the constraint that excluded given file from under build. And I concur. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

Re: [go-nuts] No generic, part -2

2021-03-17 Thread Wojciech S. Czarnecki
ease stop stretching this thread — all its yaks already are hairless. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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

Re: [go-nuts] now that the election is over can we please remove the political ad for golang.org

2021-03-17 Thread Wojciech S. Czarnecki
t some fogged souls can yet be saved. Mankind invented ostracism exactly for such purposes: to correct harmful behaviors in a non-violent way. EOT. This list is not meant for peddling "fake-right" propaganda. "Evil not welcome here" sign is at the right place. Let it stay. [1] htt

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

2021-03-16 Thread Wojciech S. Czarnecki
;> enter the room. They contradict their parents, chatter before company, >>>> gobble up dainties at the table, cross their legs, and tyrannize their >>>> teachers. [https://www.bartleby.com/73/195.html] :) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You recei

Re: [go-nuts] running tests against benchmarks

2021-03-15 Thread Wojciech S. Czarnecki
e this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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

Re: [go-nuts] No generic, part -2

2021-03-15 Thread Wojciech S. Czarnecki
lity. But these are minor disturbances. We just will learn to read and visualize new meanings in the code. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] insane idea to eliminate CGO latency

2021-03-14 Thread Wojciech S. Czarnecki
by the amount of human work not done. Where it nears impossible there we are and we will be using wrappers :) Neither I advocated rewrite of everything — but for small to middle things it can be done and pays almost immediately with lower entry and usage costs (eg. https://www.gonum.org/). >

Re: [go-nuts] insane idea to eliminate CGO latency

2021-03-14 Thread Wojciech S. Czarnecki
//github.com/minio/c2goasm It lets you bootstrap fast, then you may aim at a proper rewrite. Caveats: https://github.com/golang/go/issues/40724 https://github.com/golang/proposal/blob/master/design/27539-internal-abi.md Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIP

Re: [go-nuts] Brook v20210214 Released – cross-platform strong encryption, undetectable proxy. Open Source via GPLv3

2021-02-26 Thread Wojciech S. Czarnecki
Dnia 2021-02-25, o godz. 19:50:24 txthinking com napisał(a): > Document: https://txthinking.github.io/brook/ There is NO document there, the less txt document. This url wants to load a javascript app. Good telltale about "security". -- Wojciech S. Czarnecki << ^oo^ &g

Re: [go-nuts] Error handling

2021-02-22 Thread Wojciech S. Czarnecki
ert, could make a gift for others who'd like to have "lucid happy path view" by amending mainstream IDEs folding code with "fold to finger" functionality. I mean, let the IDE hide every `if err != nil` {; return err }` block and display 👆 (U+1F446) next to the lhs err

Re: [go-nuts] Code markup in golang-nuts

2021-02-21 Thread Wojciech S. Czarnecki
pets on this group. > And I have yet to find an easy way to do this. Put your code on the playground, press [SHARE] then copy url and paste in your message. This is the right way to share Go code. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You rece

Re: [go-nuts] Error handling

2021-02-21 Thread Wojciech S. Czarnecki
in a cases where cost of acquiring a resource is high and a bunch (say 8-10) of such resources is needed to complete the task. It was a waste of time, as new people need to be taught to read and understand it anyway. So it was abandoned due to onboarding issues. It really was not worth the time. `

Re: [go-nuts] How do you test an unpublished module?

2021-02-20 Thread Wojciech S. Czarnecki
nd there are files :) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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

Re: [go-nuts] Error handling

2021-02-20 Thread Wojciech S. Czarnecki
then operated on, then finally released in a consistent state. So we don't throw "something went wrong" (ie. unhandled exception) up. Nor we do "Return if any error". We do check errors, then retry in loops. Go explicit, IN PLACE handling helps with that alot. TC, --

Re: [go-nuts] How do you test an unpublished module?

2021-02-20 Thread Wojciech S. Czarnecki
hints about other hacks people conceived to be able to work on interdependent code. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] gofmt return multiple function closures

2021-02-19 Thread Wojciech S. Czarnecki
Dnia 2021-02-19, o godz. 05:52:38 Neehar Vijay napisał(a): > Does gofmt assume tab width of 4 or 8? Gofmt uses ascii tab characters. It is up to readers to set tabs width as they please. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this

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

2021-02-17 Thread Wojciech S. Czarnecki
Dnia 2021-02-16, o godz. 13:57:06 Peter Kleiweg napisał(a): > So why would you ever want to *not* set `GO111MODULE=auto` ? > Because GOPATH mode is gonna to be slayed soon. It is better to use it less and less to avoid future disruption. Hope this helps, -- Wojciech S. Czarnecki

Re: [go-nuts] Re: How to get VSCode to use different Go env vars for different directories in the same repo?

2021-02-14 Thread Wojciech S. Czarnecki
out (original one) seems good and straightforward, and the need for having per-folder environment settings or build-tags is real. It shouldn't be the IDE that dictates Go project structure, IMO. TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because y

Re: [go-nuts] Error handling

2021-02-14 Thread Wojciech S. Czarnecki
der community considers "boilerplate" as asset. Error handling proposals umbrella: https://github.com/golang/go/issues/40432 > Michael. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Gr

Re: [go-nuts] Possible Go 2 proposal for built-in Remove method for Slices.

2021-02-06 Thread Wojciech S. Czarnecki
operly, my mind wandered near subtle fallacies surrounding slice usage https://blog.allegro.tech/2017/07/golang-slices-gotcha.html Nonetheless, I humbly apologize to whomever wasted time trying to guess what I had on mind. TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- Y

Re: [go-nuts] Possible Go 2 proposal for built-in Remove method for Slices.

2021-02-05 Thread Wojciech S. Czarnecki
-- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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.

Re: [go-nuts] R.I.P. Michael Jones

2021-02-04 Thread Wojciech S. Czarnecki
Dnia 2021-02-05, o godz. 00:12:56 Jan Mercl <0xj...@gmail.com> napisał(a): > https://www.geospatialworld.net/blogs/goodbye-michael-jones-the-man-who-gave-the-power-of-maps-in-our-hands/ Great man of wisdom he was, :( such a sad day. -- Wojciech S. Czarnecki << ^oo^ >&g

Re: [go-nuts] Possible to make base64 pick the decode encoding automatically?

2021-02-03 Thread Wojciech S. Czarnecki
e a flexible decoder that also returns an indicator what unexpected format discrepancy it forgave. This would be easy to do for static data; I see no easy solution for such signaling on streams though. TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this m

Re: [go-nuts] Possible to make base64 pick the decode encoding automatically?

2021-02-03 Thread Wojciech S. Czarnecki
ur systems by an adversary" - as adversaries are known to eagerly and clandestinely interoperate with our software using whatever means we left them to exploit. (Off the hat example: consuming "liberal" JSON input may allow an attacker to disrupt data guarded by a simple MAC sch

Re: [go-nuts] How to improve the parallelism of go routine?

2021-02-01 Thread Wojciech S. Czarnecki
; I'm not sure how to deal with this phenomenon when I find that the parallel > > performance > > using go routine is not very good when writing database(olap) code. First - use recent Go compiler version, current is 1.15, 1.16 is coming soon. Hope this helps, -- Wojciech S. Cz

Re: [go-nuts] go build hangs with 1.15.7 on Windows 10

2021-01-26 Thread Wojciech S. Czarnecki
Add go compiler binaries to AV exemption lists. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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,

[go-nuts] Restrict general type parameter identifiers to be a single uppercase ascii letter.

2021-01-19 Thread Wojciech S. Czarnecki
letters/identifiers: https://go2goplay.golang.org/p/eWgJSLNTZw8 -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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

Re: [go-nuts] Go Create

2021-01-13 Thread Wojciech S. Czarnecki
ees no love from the Team. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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+unsu

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

2020-12-31 Thread Wojciech S. Czarnecki
Nonetheless, it is just an ad-hoc idea stem from the partisan fights I read past year. One to be looked at in leisure time and exercise on the paper, if at all :) Happy New Year! -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscrib

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

2020-12-31 Thread Wojciech S. Czarnecki
the some people who participated in this and former (Gene...away!) firehose threads - I would like to know your opinion about and I hope no one would mind this one doubled mail :) If you do mind - I kindly apologize for the inconvenience. Thank you. And Happy New Year! -- Wojciech S. Czarnecki

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

2020-12-31 Thread Wojciech S. Czarnecki
} return r } More to read at: https://play.golang.org/p/Q1ry4KPoOOJ Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

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

2020-12-25 Thread Wojciech S. Czarnecki
Dnia 2020-12-25, o godz. 11:28:54 "Space A." napisał(a): > What a ridiculous bullshit. Please keep discussion here civilized. This is not a proper place for name-calling and expletives. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message beca

Re: [go-nuts] Obtaining an efficient hash for Go values

2020-12-24 Thread Wojciech S. Czarnecki
properties. https://github.com/golang/go/blob/master/src/runtime/map.go https://dave.cheney.net/2018/05/29/how-the-go-runtime-implements-maps-efficiently-without-generics Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscri

Re: [go-nuts] multicasting with encoding/gob

2020-12-23 Thread Wojciech S. Czarnecki
Dnia 2020-12-23, o godz. 13:45:10 meera napisał(a): I'd use flatbuffers. https://google.github.io/flatbuffers/flatbuffers_guide_use_go.html It is possible to extract gob encoded bytes and copy it over multiple receivers but it would be an overkill, likely. -- Wojciech S. Czarnecki &

[go-nuts] Looking for a Go-Lang Developer

2020-12-23 Thread Kavya S
Hi Everyone, Happy Holidays! Urgent requirement for a GO Language Developer with 7-10 years of experience for Philadelphia, PA. Please share profiles if interested along with contact details. Please send it over to kav...@biz3tech.com and CC urm...@biz3tech.com Regards, Kavya S Biz3TECH

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

2020-12-22 Thread Wojciech S. Czarnecki
ead and *understand* a lot of other's code before you will start to write your part. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and st

Re: [go-nuts] Proposal: New keyword returnif (resolves error handling)

2020-11-11 Thread Wojciech S. Czarnecki
scenarios we never thought may exist. The Go team's "try" proposal (I assume you read) was called off for exact same reason: "try" construct has been encouraging what many Go programmers assumed as a bad practice. Hope this helps, -- Wojciech S. Czarnecki <&l

Re: [go-nuts] Re: use same for/range code on a hash map but it has different result

2020-11-11 Thread Wojciech S. Czarnecki
results. There are people on this (and many other technical lists) to whom ALL pictures sounds the same. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from th

Re: [go-nuts] Licence details of github.com/golang/sync

2020-10-29 Thread Wojciech S. Czarnecki
agency then make sure to be very frank with them about what you did, what you do, and what you plan to do with your implementation. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE P.S. My "Common-sense" advice is this: as whole Go ecosystem is under this

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

2020-10-21 Thread Wojciech S. Czarnecki
could embed it in Go App as > well. Beside mentioned above playspace (that utilizes script that can be understood by 3-4yo kids), there are Go interpreters as well, you might plug in - most recent I am aware of is at https://github.com/traefik/yaegi Hope this helps, > Aravindhan K >

Re: [go-nuts] Re: Proposal to add Index operator methods

2020-10-06 Thread Wojciech S. Czarnecki
go generate. Your OP problem* calls for a transpiling tool - one that from the python/matlab input produces boring Go readable also by general Go audience. *[that matlab/numpy accustomed programmers would be more productive using known or similar to known to them syntax] Hope this helps, --

Re: [go-nuts] ERRORLEVEL issue. Screenshots detected.

2020-09-21 Thread Wojciech S. Czarnecki
@ Kurtis Rader Please DO NOT reply to posts containing screenshots of text. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving em

Re: [go-nuts] alloc vs totalalloc in memory

2020-09-12 Thread Wojciech S. Czarnecki
ver increasing "cumulative counter". Think a cash register - every single item's price is added to "TOTAL" (sum, cumulative) variable. > but HeapAlloc remains the same? > [image: Screenshot from 2020-09-11 17-12-32.png] Please do NOT post screenshots here. -- Wojc

Re: [go-nuts] Generics and parentheses

2020-08-10 Thread Edwin S
is actually `concat(1)(2)` or `tmp := concat(1); result := tmp(2)` Taking this analogy back to the original Type Parameters proposal. We can think of a Type Parameterized func has to be called with a `type` being specified. The Type Parameterized func will return a typed version of it. Then we

Re: [go-nuts] [design] HTTP server serving heavy computing : Handle HTTP request closed prematurely

2020-06-21 Thread Thomas S
y here, but I expect this to be at least a little > faster than a select. > > In any case, these things must happen explicitly: code that wants to be > responsive to cancellation signals must be programmed as such. > > > On Fri, Jun 19, 2020 at 3:58 PM Thomas S > > wrot

[go-nuts] [design] HTTP server serving heavy computing : Handle HTTP request closed prematurely

2020-06-19 Thread Thomas S
Hello, I have an HTTP server providing heavy algorithms. Sometimes, the clients closes the connection prematurely, before the end of computing. Note : Sometimes the client consuming these algorithms want to stop the process if the solution is not found before X minutes for example. This articl

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

2020-06-15 Thread Eric S. Raymond
s have to think about things we would rather not think about. Quite. And we can do it off-list. -- http://www.catb.org/~esr/";>Eric S. Raymond -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe fr

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

2020-06-15 Thread Eric S. Raymond
http://www.catb.org/~esr/";>Eric S. Raymond -- 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

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

2020-06-14 Thread Eric S. Raymond
tb.org/~esr/";>Eric S. Raymond -- 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

Re: [go-nuts] Re: what is the complexity of regexp.MustCompile()?

2020-06-08 Thread Wojciech S. Czarnecki
ong explanations... Axel just posted most of what I was writing regarding trade-offs). Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

Re: [go-nuts] Any solution to hide my source code written in Go and make it a library to develop in Go as well

2020-05-20 Thread Wojciech S. Czarnecki
or IDA Pro disassembler will gladly take at it. P.S. compileable does not mean understandable at first sight. This further step costs magnitudes more, but for the reuse and small "impedance fitting" purposes is not really needed. Nor it is needed for a possible thief. hope this helps,

[go-nuts] Hey Gophers, we have an exiting job offer for you as Senior Go Developer (remote)!

2020-04-24 Thread Amelie S.
*Senior Golang Developer* *LOCATION: REMOTE (within Europe)* If you love databases, distributed systems,and Go this might be a great match. We are looking for smart, dedicated and experienced Back-End engineers to join vChain and help us build an Open Source immutable Database ( https:

Re: [go-nuts] Best design to copy a struct

2020-04-21 Thread Thomas S
I did not know this stylistic guideline. Thank you Ian ! Le mardi 21 avril 2020 00:42:39 UTC+2, Ian Lance Taylor a écrit : > > On Mon, Apr 20, 2020 at 1:56 PM Thomas S > > wrote: > > > > In regexp package, the "copy" function is implemented like this

[go-nuts] Best design to copy a struct

2020-04-20 Thread Thomas S
Hello, In regexp package, the "copy" function is implemented like this : func (re *Regexp) Copy() *Regexp { 118re2 := *re 119return &re2 120 } But most of the time for getting a copy of a struct, I do something like this : func (re Regexp) Copy() *Regexp { 119

Re: [go-nuts] My solution to Web Crawler excercise

2020-04-17 Thread Will S
fetcher.Fetch(url) > if err != nil { > fmt.Println(err) > return > } > fmt.Printf("found: %s %q\n", url, body) > for _, u := range urls { > ch <- struct { > string > int > }{u, depth - 1} > } > } > urlMap := map[string]bool{root: true} > wg.Add(1) >

Re: [go-nuts] [ANN] Unik, a Go unikernel capable of running Gio GUI programs

2020-04-13 Thread Wojciech S. Czarnecki
Dnia 2020-04-13, o godz. 11:42:16 Elias Naur napisał(a): > https://eliasnaur.com/unik Thank you. Respect! :) > -- elias -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Re: Golang and the mobile framework

2020-03-27 Thread Wojciech S. Czarnecki
Dnia 2020-03-26, o godz. 22:18:40 husam alkdary napisał(a): > which one react-native or Flutter ? and how ? https://www.arputer.com/using-go-library-in-flutter hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are su

Re: [go-nuts] Re: Where is the version number for a golang module declared?

2020-03-13 Thread Wojciech S. Czarnecki
ttps://blog.golang.org/pkg.go.dev-2020 [2] https://github.com/golang/go/issues/36747 [3] https://github.com/golang/go/issues/36840 PS. I do not blame the technical team, as IMO this was a "business decission" in upper echelons of Google what dev-team as a G employees, must obey. >

Re: [go-nuts] Re: Where is the version number for a golang module declared?

2020-03-12 Thread Wojciech S. Czarnecki
quot; was not invented at Google, so chances we would ever have sane G-independent setup are miniscule now. Mind also that GOPATH is now led to the guillotine, to force all this "local server / crafted hosts / GOPRIVATE setup" fun on everyone not willing to share her development setup wit

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
> ("Smart tabs" were mentioned by Manilo in other thread. :) Uh, it was in this one, excuse me. Got both my and Manilo's mixed. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "gola

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
posed recipe in fact needs none marker, it could as well used heuristics to set csPos = tsPos +8, or +16. Marker gives an opt-in switch here. > - Dave TC, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Grou

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
the past code in millions of repos. The fixed `csPos := tsPos += 8` would work for most of Go code w/o knob. > most people will not accept code that is not formatted by the > "standard" gofmt. Thats why it can be implemented "by the core team only". TC, -- Wojciech

  1   2   3   4   >