Re: [go-nuts] Re: Race in table driven tests with httptest server

2025-01-31 Thread Chris Burkert
outines > > On Friday, January 31, 2025 at 10:22:38 AM UTC-5 Chris Burkert wrote: > >> I meanwhile found a way by using a sync.Map for the responses like this: >> https://go.dev/play/p/KMZ7v63Ht6t >> thanks - Chris >> >> Am Fr., 31. Jan. 2025 um 09:06 Uhr

[go-nuts] Re: Race in table driven tests with httptest server

2025-01-31 Thread Chris Burkert
I meanwhile found a way by using a sync.Map for the responses like this: https://go.dev/play/p/KMZ7v63Ht6t thanks - Chris Am Fr., 31. Jan. 2025 um 09:06 Uhr schrieb Chris Burkert < burkert.ch...@gmail.com>: > Dear all, > > I have the following test: https://go.dev/play/p/fQgnvboml

[go-nuts] Race in table driven tests with httptest server

2025-01-31 Thread Chris Burkert
variable response in each test case function and read the same variable in the handler function. My goal is to define the response of the handler for each test case in the table. How can I achieve that without a race? thanks - Chris -- You received this message because you are subscribed to the

Re: [go-nuts] deadcode: unreachable func which is exclusively used in tests

2024-11-19 Thread Chris Burkert
Well, the init() function in the test package leads to an additional complaint: $ deadcode ./... test/test.go:8:6: unreachable func: init#1 test/test.go:14:6: unreachable func: SkipIfIntegration It works it I import the test package in my main package and fake call it there: if false { test.SkipI

Re: [go-nuts] deadcode: unreachable func which is exclusively used in tests

2024-11-19 Thread Chris Burkert
Hi Axel, Maybe you can add something like `var _ = SkipIfIntegration` to your > package? i.e. trick the linter to stop it from complaining? > I already tried this, but it did not help. I even added the following, which made things worse: func init() { _ = SkipIfIntegration } $ deadcode ./... t

[go-nuts] deadcode: unreachable func which is exclusively used in tests

2024-11-19 Thread Chris Burkert
ackages. My workaround: I run deadcode -test ./... but then I may miss unused code, which may have an old test. Is there a better way? PS: I want to follow https://www.konradreiche.com/blog/how-to-separate-integration-tests-in-go/ thanks Chris -- You received this message because you are s

[go-nuts] xrealwd() in unix.c in Go 1.4

2024-07-18 Thread Chris Guthrey
t directory without trying to get a canonical path to goroot/src... Cheers, Chris -- 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+unsubsc

[go-nuts] Go AWS SDK v1 entering maintenance mode

2024-06-28 Thread Chris Vitale
Support ends in a year. https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/ -- 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, sen

Re: [go-nuts] is running interactive or not

2023-06-08 Thread Chris Burkert
Hi, there are cases when this does not work. I tend to use a flag like -batch or -noninteractive to trigger the correct behavior from within scripts. Less magic, more control. Rich schrieb am Do. 8. Juni 2023 um 20:19: > Hi, > > I have a program I am writing that stops and asks the user for inpu

[go-nuts] Output format of IRNode.

2023-04-26 Thread Chris Zhang
in advance! Best, Chris -- 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 discuss

Re: [go-nuts] Learning Go on internal server

2023-02-16 Thread Chris Burkert
Go can be run on a regular Mac or PC. Maybe you don’t need a tools server for this at all. However, in a corporate environment caching dependencies may be a good thing. With modules this is done by running your own Go proxy. Take a look at https://github.com/gomods/athens or https://github.com/go

Re: [go-nuts] extract VCS branch name used during build

2023-02-06 Thread Chris Burkert
You can use go:generate and go:embed to achieve this. In our CI/CD pipeline we generate a json file with a lot of information like vcs, branch, tag, date and time, hash and a lot more. Then we embed this json into the binary. I became aware of this technique from https://levelup.gitconnected.com/a

Re: [go-nuts] Silly question about parentheses

2023-02-01 Thread Chris Burkert
Looking into the spec: https://go.dev/ref/spec#Return_statements ReturnStmt = "return" [ ExpressionList ] . ExpressionList = Expression { "," Expression } . ... no () here https://go.dev/ref/spec#Function_types FunctionType = "func" Signature . Signature = Parameters [ Result ] . Result

Re: [go-nuts] Underscore symbol

2022-11-05 Thread Chris Burkert
I am curious: from a compiler perspective, does that mean that by using _ simply less assembler instructions are created by not handling those registers which relate to _? Marcel Huijkman schrieb am Sa. 5. Nov. 2022 um 09:18: > When I explain it during my training I always say it is a trashcan >

Re: [go-nuts] Re: about upstream?

2022-11-04 Thread Chris Burkert
I am also not a native speaker, but having a stream/river in mind, then upstream seems to be where the water comes from and downstream where the water is going to. However, the OP mentioned that one micro service called the other which tells me something about how the connection is established, but

Re: [go-nuts] How do I set a pkg's version?

2022-11-02 Thread Chris Burkert
We used the traditional way for a long time. But with the embed package we stopped this. This is a good blog post on the topic: https://levelup.gitconnected.com/a-better-way-than-ldflags-to-add-a-build-version-to-your-go-binaries-2258ce419d2d . Am Mi., 2. Nov. 2022 um 09:54 Uhr schrieb Jakob Borg

Re: [go-nuts] How do I set a pkg's version?

2022-11-01 Thread Chris Burkert
During CI/CD we create a json file with a few details (git tag, branch, hash, date, time). Afterwards we compile Go Code which embeds this file into the binary. During runtime flags like --version print the json. Note that this is about the version of some binary - not the version of a package. Ho

Re: [go-nuts] Re: Go implementation of CLP

2022-10-02 Thread Chris Lu
Thanks! CLP is great! I am working on a distributed file system, SeaweedFS, https://github.com/seaweedfs/seaweedfs I am interested in a pure-go implementation to store the log files more efficiently. Chris On Sun, Oct 2, 2022 at 6:45 PM david lion wrote: > Hi Chris, > > I'm

Re: [go-nuts] Re: Any package implementing FIFO mutex?

2022-09-10 Thread Chris Lu
ex" is not FIFO. Has any package implemented a dropping for FIFO >> mutex? >> >> One similar solution is to use buffered channel, but it is limited by the >> buffer size, and requires non-trivial re-architecturing. >> >> Chris >> > -- > You received t

[go-nuts] How to single step into runtime code

2022-07-18 Thread &#x27;chris zhang' via golang-nuts
level. Thanks for your time and I appreciate your help! Best, Chris -- 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...@googlegrou

Re: [go-nuts] How to distribute database connection across all golang file ?

2022-01-11 Thread Chris Burkert
Hi, The standard sql package (https://pkg.go.dev/database/sql) comes with a connection pool. I think it is the DB struct handling the pool. The drivers which implement the details for a specific database product usually come with plenty of documentation and examples. See https://github.com/golang/g

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

2021-09-02 Thread Chris Burkert
Would it help to set up your own module proxy e.g. with https://github.com/gomods/athens or https://github.com/goproxy/goproxy? K Prayogo schrieb am Do. 2. Sept. 2021 um 03:54: > I'm trying to make docker build faster for software that are built with > golang > tried to cache layer but it still

Re: [go-nuts] Re: vendoring related question/issue

2021-06-18 Thread Chris Burkert
I believe you should distinguish between the build and the run environment. Your build environment is largely defined by the language and its ecosystem, e.g. the vendor folder has a semantic for the Go tools. After the build you deploy the resulting artifacts to your run environment. That may be th

Re: [go-nuts] Releasing a V2 module and interacting with git branches

2021-04-07 Thread Chris Burkert
I have good experiences with trunk based development meaning that “master” (we use “main”) is the main development line and you down-port to release branches with cherry picking and tags. So as soon as you commit something which is considered a major change (requiring a new version) then also appen

[go-nuts] Thanks

2021-03-24 Thread Chris Burkert
Several messages during the last weeks irritated me and I guess I was not the only one. Eventually we are all humans but often enough we don’t treat ourselves like that. Let’s treat machines like machines and humans like humans - not the other way round. That’s why I want to say “Thank you Gophers

Re: [go-nuts] mount remote storage without FUSE

2020-11-26 Thread Chris Lu
This Rust fuse-rs project is equivalent to the Go basizl/fuse project that I am using. Chris On Thu, Nov 26, 2020 at 9:05 AM Bakul Shah wrote: > This may help: https://github.com/zargony/fuse-rs > > The kernel driver is provided by the FUSE project, the userspace > implementation

Re: [go-nuts] mount remote storage without FUSE

2020-11-25 Thread Chris Lu
Hi, Axel, Thanks for answering! I was checking CEPH, Lustre, etc. Here is one example: https://github.com/ceph/ceph/blob/3931b21ae8ae508f2cd826a1e6cc89c9b2f64f97/src/libcephfs.cc Chris https://github.com/chrislusf/seaweedfs On Wed, Nov 25, 2020 at 3:17 AM Axel Wagner wrote: > Can you l

Re: [go-nuts] Any recommendation for structured logging library in Golang?

2020-11-18 Thread Chris Lu
On Tue, Nov 17, 2020 at 11:20 PM Gopal M wrote: > go.uber.org/zap > > I have tried uber/zap, which has a verbose json: {time="...", file="abc.go", line="32", message="xafasdfasdf", k1=v1, k2=v2} The extra "time=" and "file=" on every single log line are what I want to avoid. Do you have some wa

Re: [go-nuts] mksyscall.pl bug?

2020-10-27 Thread Chris Keller
Never mind, I was able to file https://github.com/golang/go/issues/42241 On Tue, Oct 27, 2020 at 6:55 PM Chris Keller wrote: > Hi folks, > > I'm involved in developing an amateur radio email application called Pat; > Pat uses this library <https://github.com/albenik/go-seri

[go-nuts] mksyscall.pl bug?

2020-10-27 Thread Chris Keller
particular low-level symbol (unix.SYS_IOCTL), but mksyscall.pl is still using it. I'm not sure where to file an issue against that, so I'm asking for help here. Is that perl script still maintained? Thanks, Chris -- You received this message because you are subscribed to the Google Groups &q

Re: [go-nuts] Exec and write data to stdin of new process

2020-10-01 Thread Chris Tierney
Thanks for the info and suggestions, especially the interesting detail about why Go has no `syscall.Fork`. Although I did get it working as desired, the solution is complicated enough that I'll probably just live with `exec.Command`. But it was a fun puzzle to work out. :) -- You received this

Re: [go-nuts] Exec and write data to stdin of new process

2020-09-30 Thread Chris Tierney
that > occurs when the process terminates due to a signal. > > On Wed, Sep 30, 2020 at 3:33 PM Chris Tierney wrote: > >> I'm looking for a way to exec a process (as in, `execve(2)`) and write >> something to its stdin. >> >> Context: I am writing a tool t

[go-nuts] Exec and write data to stdin of new process

2020-09-30 Thread Chris Tierney
I'm looking for a way to exec a process (as in, `execve(2)`) and write something to its stdin. Context: I am writing a tool that does some argument processing and then executes another (arbitrary) program, and passes the processed data to that other program's stdin. The processed data cannot be

[go-nuts] Re: [ generics] Moving forward with the generics design draft

2020-08-21 Thread Chris Hines
type switches on type parameters. I look forward to trying that out because I believe it plugs a hole in the design I had felt in my earlier experiments. Well done and thanks to everyone who has helped provide feedback leading to these improvements. Chris On Thursday, August 20, 2020 at 8:28:

[go-nuts] Help? Looking for info on how net/http and net/http2 are supposed to interact in the context of noDialClientConnPool

2020-06-30 Thread Chris Friesen
ed* to work, so that I can figure out what's going wrong. The code comment says, "We let the HTTP/1.1 client dial and use its TLS connection instead." Anyone have any pointers? Is there any documentation on this? Thanks, Chris -- You received this message because you are subscrib

[go-nuts] Re: Build Issues on Ubuntu

2020-06-16 Thread Chris Hopkins
. Thanks! On Tuesday, 16 June 2020 10:33:16 UTC+1, Brian Candler wrote: > > On Monday, 15 June 2020 21:59:21 UTC+1, Chris Hopkins wrote: >> >> The ubuntu default 1.14.4 >> https://dl.google.com/go/go1.14.4.src.tar.gz >> > > What about the 1.14.4 precompiled binary?

Re: [go-nuts] Build Issues on Ubuntu

2020-06-16 Thread Chris Hopkins
Yep, the asyncpreempt has definitly made it work.(But for how long Dun Dun Dun!!!) Humm, interesting. Thanks I can do some more investigation now. Kind Regards Chris On Monday, 15 June 2020 22:27:00 UTC+1, Ian Lance Taylor wrote: > > On Mon, Jun 15, 2020 at 1:59 PM Chris Hopkins &

[go-nuts] Build Issues on Ubuntu

2020-06-15 Thread Chris Hopkins
this would be greatly appriciated. (The OS is Ubuntu 20.04 LTS) Kind Regards Chris -- 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

Re: [go-nuts] I am facing goroutine leak issue. I am using cloudfoundary goclient libary to do some operations - Create service/Lastoperation/Update/Delete service instance.

2020-05-30 Thread Chris Burkert
Most of us do not own a crystal ball but with some code reproducing the issue (http://sscce.org/) you may get helping answers. schrieb am Mi. 27. Mai 2020 um 19:07: > goroutine profile: total 12 > 3 @ 0x1032760 0x10420bb 0x1309343 0x105fc71 > # 0x1309342 net/http.(*persistConn).writeL

Re: [go-nuts] Why I fear Go

2020-05-09 Thread Chris Burkert
Don't be afraid of the term "senior". The process prior to signing a contract is mutual application. The company advertises itself like the candidate advertises himself. Of course companies want the best developers so they attract these with "senior" and other terms. But sometimes you don't get wha

Re: [go-nuts] Re: flags package: shared flags and flag sets

2020-05-07 Thread Chris Burkert
t' > > The '-d' option is a shared flag, and `-rt' is dedicated for the > subcommand 'stream'. > > > On Wednesday, May 6, 2020 at 8:08:25 PM UTC+8, Chris Burkert wrote: >> >> Dear all, >> >> I'd like to mix shared flags with fl

[go-nuts] flags package: shared flags and flag sets

2020-05-06 Thread Chris Burkert
ry or can this be done with package flag from the standard library? Thanks - Chris -- 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 golan

Re: [go-nuts] Re: marshal multiple json documents which may have different format versions into the latest struct version

2020-04-29 Thread Chris Burkert
That sounds like a good plan. I'm going to try that. Thank you Manlio! Am Di., 28. Apr. 2020 um 15:11 Uhr schrieb Manlio Perillo < manlio.peri...@gmail.com>: > On Tuesday, April 28, 2020 at 10:52:56 AM UTC+2, Chris Burkert wrote: >> >> Dear all, >> >>

[go-nuts] marshal multiple json documents which may have different format versions into the latest struct version

2020-04-28 Thread Chris Burkert
Dear all, my application users shall be able to provide multiple json documents (files and urls) which I'd like to marshall into one structure. Additionally these json documents may have different versions. I know how to marshal a document into a version specific struct if I know the format versio

Re: [go-nuts] the size of the files compiled in GO

2020-04-18 Thread Chris Burkert
https://golang.org/doc/faq#Why_is_my_trivial_program_such_a_large_binary schrieb am Sa. 18. Apr. 2020 um 19:25: > Why does the simple Hello world program take 2 MB after compilation? > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To un

Re: [go-nuts] libgo is more fast that grouting.

2020-03-19 Thread Chris Burkert
Do people ask for a Tesla with a combustion engine? No because they value what Tesla is doing and why they are doing it. And neither Tesla nor Kubernetes or Docker are research projects. So please don’t whine about how things are. Instead (as Ian said) participate in a positive manner and contribut

Re: [go-nuts] Re: McAfee and the module cache on WSL: rename : permission denied

2020-03-13 Thread Chris Burkert
learned something new. many thanks to both of you Am Fr., 13. März 2020 um 19:47 Uhr schrieb brainman : > On Friday, 13 March 2020 08:58:24 UTC+11, Chris Burkert wrote: >> >> Dear all, >> >> besides other environments I have a company laptop running Windows 10 >> E

[go-nuts] McAfee and the module cache on WSL: rename : permission denied

2020-03-12 Thread Chris Burkert
here and just don't see my fault? thanks - Chris -- 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 th

Re: [go-nuts] Preserving extra properties using JSON unmarshal / marshal?

2020-02-21 Thread Chris Burkert
Take a Look at https://blog.golang.org/json-and-go: The json package uses map[string]interface{} and []interface{}values to store arbitrary JSON objects and arrays; it will happily unmarshal any valid JSON blob into a plain interface{} value. The default concrete Go types are: - bool for JSON

Re: [go-nuts] Help with Oauth2 "grant_type=client_credentials"

2020-02-11 Thread Chris Broadfoot
Try this package: https://pkg.go.dev/golang.org/x/oauth2/clientcredentials?tab=doc On Tue, Feb 11, 2020, 4:43 PM andrey mirtchovski wrote: > i would strongly advise against implementing advice received online > for something as important as auth. my suggestion is to work with curl > from the com

Re: [go-nuts] Sybase SQLAnywhere driver for Unix systems

2020-01-16 Thread Chris Burkert
Hello, we are working on a pure Go implementation of the TDS protocol for https://github.com/SAP/go-ase (which is currently just a cgo driver). I am not sure if TDS is also understood by SQLAnywhere but if so, then this may help. I will see if I find more in the company and let you know. reda laan

Re: [go-nuts] Mocked method not working in golang while running the test cases

2020-01-11 Thread Chris Burkert
You could inject your dependencies. There is a funny talk by Liron Levin [1] which helped me a lot. 1: https://youtu.be/_B_vCEiO4mA prakash sharma schrieb am Sa. 11. Jan. 2020 um 16:24: > Need help: > > https://stackoverflow.com/questions/59693971/mocked-method-not-working-in-golang-while-runni

Re: [go-nuts] How do I initialize extemplate (a template engine in golang) so that I can use with Echo minimalist framework

2020-01-08 Thread Chris Burkert
xt := &Template{} leaves the templates field nil. Ehioje Henry Erabor schrieb am Mi. 8. Jan. 2020 um 15:59: > I am having issues using extemplate library in my echo framework project. > Library :https://github.com/dannyvankooten/extemplate > > My Code is below: > > Enter code here...package main

Re: [go-nuts] Simple worker pool in golnag

2019-12-28 Thread Chris Burkert
(the task was to limit the whole thing to about 10% of cores) > > I still don't think you needed a worker pool here. Like OP mentioned > above, you could just limit the number of goroutines executed to 10% of > total cores. > > > On Saturday, 28 December 2019 18:02

Re: [go-nuts] Simple worker pool in golnag

2019-12-28 Thread Chris Burkert
There are Pros and Cons for everything in life. Some time ago I wrote a database tool which does something per table where the runtime largely depends on the table size. I started with one goroutine per table because it was easy. But that put a high load on the database (the task was to limit the w

[go-nuts] Re: main() cannot call method in another file

2019-10-24 Thread Chris Hines
go run works now too and pulls in all the files in the package at so "go run ." is a nice shortcut that works more like the other subcommands of the go tool. On Thursday, October 24, 2019 at 8:17:54 AM UTC-4, Guy Allard wrote: > > Use: > > go run *.go > > or > > go build *.go > > > On Wednesda

[go-nuts] Re: trace tool showing goroutines moving between procs after LockOSThread

2019-10-07 Thread Chris Hines
h one of the scheduler's Ps in order to execute the goroutine's code. There are always GOMAXPROCS # of Ps in the scheduler. See the comment block starting at line 19 in this code for more detail. https://golang.org/src/runtime/proc.go Hope that helps, Chris On Sunday, October 6, 201

Re: [go-nuts] Re: go mod dependency hell is real

2019-09-13 Thread Chris Broadfoot
Is this the issue you came across the other day, Jean? On Fri, Sep 13, 2019, 11:32 PM Antoine Mercadal wrote: > Hey, > > Then why is it called mvs? I don't understand what package system would > give me 1.3.49, if I require 1.2.0 and my dependency requires 1.1.0. > > I'll read a bit more about i

Re: [go-nuts] How to execute a command using root?

2019-08-31 Thread Chris Burkert
- Chris Kevin Chadwick schrieb am Fr. 30. Aug. 2019 um 13:13: > On 8/30/19 7:49 AM, Benjamin wrote: > > Do anyone have any suggestions on this? Thanks > > Sudo is an option. I prefer to have a master root process that spawns > workers > processes that drop privileges

[go-nuts] Re: how to create path/v2 and path/v3 and path/v4 in same repo

2019-08-27 Thread Chris Hines
You might be able to find an answer to your question in this article: https://github.com/go-modules-by-example/index/tree/master/016_major_version_repo_strategy On Tuesday, August 27, 2019 at 6:31:57 AM UTC-4, Jason E. Aten wrote: > > With an eye towards implementing semantic import path versioni

[go-nuts] Re: Open Source audit of go package dependencies for security vulnerabilities?

2019-08-15 Thread Chris Hines
Have you seen: https://github.com/sonatype-nexus-community/nancy "A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index" On Wednesday, August 14, 2019 at 1:02:03 AM UTC-4, Eric Johnson wrote: > > And then, it also occurs to me that perhaps I can answer m

Re: [go-nuts] time.Format vs. fmt.Sprintf

2019-07-24 Thread Chris Hornberger
Well, I got here on topic #2 on a google search for golang date sprintf, soo. Relevant, topical, easily found. > On Jul 23, 2019, at 9:38 PM, Dan Kortschak wrote: > > I couldn't find the thread in my go-nuts box, so I looked for it on > google groups. > > Chris,

Re: [go-nuts] Go 2018 Survey "Error handling 5%"

2019-07-08 Thread Chris Broadfoot
t busy work. The Go error handling is worse than C in > that at least in C, the api doc clearly spells out which error codes can be > returned, and why. With the Go error interface, and the 'minimal api doc', > what is returned when is anybody's guess. > > > > -Orig

Re: [go-nuts] Go 2018 Survey "Error handling 5%"

2019-07-08 Thread Chris Passas
and change existing > code, but it is just busy work. The Go error handling is worse than C in > that at least in C, the api doc clearly spells out which error codes can be > returned, and why. With the Go error interface, and the 'minimal api doc', > what is returned when

Re: [go-nuts] Go 2018 Survey "Error handling 5%"

2019-07-08 Thread Chris Passas
Number 4,5,6 on the list all are listed at 5% so that's why I said "tied" for 4th. Not sure this is an important point of discussion. On Monday, July 8, 2019 at 9:39:10 AM UTC-4, Jan Mercl wrote: > > > > On Mon, Jul 8, 2019 at 3:33 PM Chris Passas > wrote:

[go-nuts] Go 2018 Survey "Error handling 5%"

2019-07-08 Thread Chris Passas
We are all aware error handling was tied for 4th most common challenging when working with Go in the 2018 survey. There is not description of what about error handling. I'm sure I missed the conversation but how did we get to the point of deciding it was the if err!=nil that was the "challengin

[go-nuts] try? how about try {} curious if anyone thinks this might be better.

2019-07-04 Thread Chris Holland
Problems with try: 1 - hiding the return 2 - error decoration The motivation behind this "issue" seems somewhat suspect. I get the consensus the idea that people think the current state of the art `if err != nil { .. }` its verbose. I'd argue that isn't the issue with it. If we want to

[go-nuts] Re: the Dominance of English in Programming Languages

2019-05-04 Thread Chris Burkert
intrinsically motivated the English language is not a hurdle for them. That’s why I was wondering about the article. Thanks for all your comments. Reading the different perspectives about the topic fascinates me a lot. Chris Burkert schrieb am Mo. 29. Apr. 2019 um 07:35: > I recently read an arti

[go-nuts] the Dominance of English in Programming Languages

2019-04-28 Thread Chris Burkert
is because it is the language of the compiler. However I find the topic interesting and want to hear about your opinions. thanks - Chris 1: https://www.derstandard.de/story/2000101285309/programmieren-ist-fuer-jeden-aber-nur-wenn-man-englisch-spricht -- You received this message because you

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-24 Thread Chris Broadfoot
On Wed, Apr 24, 2019 at 4:22 AM Robert Engels wrote: > Though to the ops point, not sure why Go doesn’t have the ternary operator > - which is pretty ubiquitous. > https://golang.org/doc/faq#Does_Go_have_a_ternary_form > > On Apr 23, 2019, at 9:56 PM, Robert Engels wrote: > > Why? You have sa

Re: [go-nuts] why is this not ascending?

2019-04-08 Thread Chris Hopkins
am much mistaken the scheduler is architecturally free to swap between active routines at any time. I believe the current design will normally only evaluate the swap (cooperatively multi-task) on function calls (I could be mis-remembering this though). HTH Chris On Monday, 8 April 2019 14

[go-nuts] Who uses GoDS (Go Data Structures) ?

2019-03-12 Thread Chris FractalBach
So, I wanted to mess around with some algorithms and needed a priority queue. I've written one from scratch before but I wanted to try using the container/heap package. I found it pretty confusing TBH. After trying to recreate my own version of the example ( https://golang.org/pkg/container/heap

Re: [go-nuts] Different Languages of a Program Project

2019-03-04 Thread Chris Burkert
John, the Web Browser communicates with the Web Server using the http protocol. So http is the definition how they interact with each other. It’s not a language but a protocol. The Web Browser can display (or render) stuff which has been transferred via http. This could be some HTML with the help

[go-nuts] Re: Why Go? What is the most important feature that led to you becoming a Go programmer?

2019-02-27 Thread Chris Hopkins
fluttering my eyelashes at Halide...) What made me stay is the clarity and simplicity. So many languages seem to be an exercise in showing off how clever you are, by using x clever pattern. Go doesn't seem to suffer this. If I could just use it for the embedded stuff i do... Chris On Tuesd

Re: [go-nuts] Good metaphor for differentiating Go from other languages?

2019-02-23 Thread Chris Burkert
For me Go is the small but complete toolbox you need to build anything. Tim Allens Home Improvement and Binford comes to my mind :-) Randall O'Reilly schrieb am Sa. 23. Feb. 2019 um 05:40: > On the topic of “selling” the advantages of Go vs. other languages such as > Python and C++, has anyone u

[go-nuts] saving files on google app engine

2019-01-17 Thread Chris FractalBach
So I noticed this post: https://blog.golang.org/appengine-go111 And especially noticed this part: Furthermore, the application code is completely portable—there are no ties > to the infrastructure that your application is deployed on. So I wanted to try it out! Just to keep things simple, I r

Re: [go-nuts] Are defered function calls executed?

2019-01-03 Thread Chris Burkert
In case of a non-nil error Close will not be executed and that is exactly what you want. The power of defer becomes obvious with more code after the defer which does not have to deal with any cleanup of previous steps because of the defer. Am Fr., 4. Jan. 2019 um 07:09 Uhr schrieb 伊藤和也 : > In the

Re: [go-nuts] What are the reasonable reasons to use pointers?

2019-01-02 Thread Chris FractalBach
"I do consider assignment statements and pointer variables to be among computer science's "most valuable treasures."" Donald Knuth, Structured Programming with go to Statements -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: Announcing a Fyne GUI toolkit

2019-01-01 Thread Chris FractalBach
I've been experimenting with writing games in Go ever since webAssembly came out. Are games a possible use case for the GUI? I saw u mention you were working on... "basically a canvas that can draw line/rect/text/images(including svg) and some basic window handling." Which sounds like all you'

[go-nuts] Re: WebAssembly: Auto-generating Go bindings for javascript/DOM from the Web Standards.

2019-01-01 Thread Chris FractalBach
Are the # channels on slack? -- 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.goog

Re: [go-nuts] What are the reasonable reasons to use pointers?

2019-01-01 Thread Chris Burkert
Pointers are useful to pass around shared state. Values are usually copied so changes on one copy are not visible on the other. Pointers on the other hand are an address to some value (and the address is also copied by passing it around) but the value these addresses point to is exactly one same va

[go-nuts] WebAssembly: Auto-generating Go bindings for javascript/DOM from the Web Standards.

2018-12-28 Thread Chris FractalBach
This is in the context of compiling Go to webassembly that will be used with javascript. *Currently:* We have`syscall/js` which has stuff like this: ```go js.Global().Get("document").Call("createElement", "div") ``` What it could be: ```go js.document.createElement("div") ``` *Why?* This w

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
st because the logger was slow > > For the performance aspect, you are essentially increasing the > parallelism, since any “block/wait” degrades this > > Hope that helps. > > > > On Dec 18, 2018, at 1:49 PM, Chris Burkert > wrote: > > Robert, > it seems to

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
be you are not and it s up to you to work around. > This becomes a problem when the code can t be rationalized via an api that > is able to wrap those behaviors. > > On Tuesday, December 18, 2018 at 8:50:20 PM UTC+1, Chris Burkert wrote: >> >> Robert, >> it seem

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
rker) > for i := 0; i < worker; i++ { > go do(i, rc, dc) > } > for done < worker { > r := <-rc > fmt.Println(r) > <-dc > done++ > } > } > > > On Tue, Dec 18, 2018 at 5:35 AM Chris Burkert > wrote: > >> Dear all, >> >> I have a couple

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
correct me if I am wrong. Chris Justin Israel schrieb am Di. 18. Dez. 2018 um 19:08: > > > On Wed, Dec 19, 2018, 5:31 AM Chris Burkert > wrote: > >> Hello Ian, all, >> yes, the workers generate multiple results. I was able to use your >> proposal with the w

Re: [go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
} } } return n } Am Di., 18. Dez. 2018 um 15:50 Uhr schrieb Ian Lance Taylor : > On Tue, Dec 18, 2018 at 5:35 AM Chris Burkert > wrote: > > > > I have a couple of goroutines sending multiple results over a channel - > a simple fan-in.

[go-nuts] Channels: selecting the last element

2018-12-18 Thread Chris Burkert
c: done++ case r := <-rc: fmt.Println(r) } } } many thanks Chris -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] Force pointer at compile time to interface{} parameter

2018-11-19 Thread Chris Burkert
Hello Hay, with interface{} you explicitly allow everything. Instead you may consider to restrict the accepted input in the first place - e.g. with a non-empty interface. Chris hay schrieb am Mo. 19. Nov. 2018 um 15:37: > Hi, > > I've the following example code of correct ver

[go-nuts] Joke in the air :D

2018-11-15 Thread Chris FractalBach
It reached it's "golden years" -- 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.g

Re: [go-nuts] Directory Structure in Markdown Synax

2018-10-29 Thread Chris Burkert
Maybe episode #35 from justforfunc (https://youtu.be/XbKSssBftLM) answers what you’re searching for. Alex Dvoretskiy schrieb am Mo. 29. Okt. 2018 um 20:21: > Looking for a Go code or algorithm, in general, to print out directory > structure. > > Example: https://jekyllrb.com/docs/structure/ > >

[go-nuts] Re: Understanding the doc (why can't I?)

2018-10-15 Thread Chris Hopkins
il you want to). Yes it's a good bit of computer science to understand how it works, but it's also good computer science to accept that you don't need to know how things work under the hood either. If that overly wordy version helps? Chris On Monday, 15 October 2018 15:06:58

[go-nuts] Casting Back from nested Struct

2018-10-10 Thread Chris Hopkins
od reason, but it escapes me at the moment. Any ideas? Thanks Chris -- 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...@go

Re: [go-nuts] Error Handling Best Practice (error wrapping)

2018-10-08 Thread Chris Hopkins
tions would encourage, not discourage that behaviour. Sorry, my short post ended up quite long too! Regards Chris On Monday, 8 October 2018 16:46:28 UTC+1, Robert Engels wrote: > > I read the proposal and the only knock against including a stack trace by > default is one google problem c

Re: [go-nuts] Error Handling Best Practice (error wrapping)

2018-10-08 Thread Chris Hopkins
ith Marvin-like intellects. That's way less scary than the generics proposals that worry me so much. Thanks again On Monday, 8 October 2018 15:33:07 UTC+1, Ian Lance Taylor wrote: > > On Mon, Oct 8, 2018 at 3:38 AM, Chris Hopkins > wrote: > > Hi, > > Could I plea

[go-nuts] Error Handling Best Practice (error wrapping)

2018-10-08 Thread Chris Hopkins
o make sure I am spotting errors correctly and checking that I am getting the correct error from the correct place is really quite clunky at the moment, if I could test that an error checker in location X was triggered by it being passed an error that would save me a lot of code. Any suggestion

[go-nuts] x/mobile: should I expect pprof CPU profiling to work in iOS?

2018-10-03 Thread chris
this is just a limitation of the runtime in iOS? (Alternatively, if anyone knows how to get Xcode profiler to symbolicate calls into a gomobile library, that would be an extremely useful alternative.) Thanks! Chris -- You received this message because you are subscribed to the Goog

[go-nuts] Re: I am not in favor of generics.

2018-09-18 Thread Chris Hopkins
me from people writing "clever" code. Chris On Tuesday, 18 September 2018 12:04:15 UTC+1, alan...@gmail.com wrote: > > Although I respect the opinions expressed here, I think you might be > pleasantly surprised by how the proposed design would dovetail with the > rest of Go a

[go-nuts] Re: I am not in favor of generics.

2018-09-18 Thread Chris Hopkins
re than people wanting to neither use an empty interface, nor declare their interfaces isn't it? Chris On Monday, 17 September 2018 17:04:26 UTC+1, jucie@zanthus.com.br wrote: > > Go core team is working hard to bring generics to the language because > several people asked for it.

Re: [go-nuts] cgo and time.After

2018-05-20 Thread Chris Burkert
t from %d\n", remaining, amount) case <-donChan: remaining-- case res := <-resChan: fmt.Println(res) } } thanks all! Chris On Saturday, May 19, 2018 at 9:16:19 PM UTC+2, Jakob Borg wrote: > > On 19 May 2018, at 16:25, Chris Burker

  1   2   3   >