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

2019-04-29 Thread Sebastien Binet
On Mon, Apr 29, 2019 at 8:08 AM Reto wrote: > In my view you don't necessarily need to speak English, although it helps > a lot. > Go uses utf-8 for all identifiers, so assuming you treat the keywords as > blobs and just remember when to use which you should be fine. > > The issue being more that

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

2019-04-29 Thread yvan . godin
just for fun In France we have WINDEV where you can write code either in English or French ;-) but no German :-( unfortunately not free product giving something like ''' // Le document sera enregistré en noir et blanc SI TwainVersJPEG("C:\Temp\MaPhoto.JPEG", 0, Faux, TwainNoirBlanc) = Vra

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

2019-04-29 Thread Max
I am Italian, and I learned to program quite early - before really knowing English. In my experience, the fact that most programming languages use English keywords is not a big obstacle - for two reasons: 1) each programming language has very few reserved keywords - dozens at most, compared to

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-29 Thread Nitish Saboo
Hi, void match(const gchar *pattern, size_t pattern_len, const gchar *program, size_t program_len) { LogMessage *msg = log_msg_new_empty(); PDBInput input; log_msg_set_value(msg, LM_V_MESSAGE, pattern, pattern_len); log_msg_set_value(msg, LM_V_PROGRAM, program, program_len); pattern_db_process(pa

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

2019-04-29 Thread Wojciech S. Czarnecki
On Mon, 29 Apr 2019 07:35:56 +0200 Chris Burkert wrote: > I recently read an article (German) about the dominance of English in > programming languages [1]. It is about the fact that keywords in a language > typically are English words. Thus it would be hard for non English speakers > to learn pr

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

2019-04-29 Thread amnonbc
We would have even more fun if we had non-latin characters in keywords aliases, and supported both left-to-right and right-to-left writing directions. But I doubt that this will make programs more readable for everyone. On Monday, 29 April 2019 10:10:28 UTC+1, Max wrote: > > I am Italian, and I l

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

2019-04-29 Thread John McKown
The solution is simple. Just program in APL. Then _nobody_ can understand your program and so it is "fair" to all. It is a "write only" language. https://en.wikipedia.org/wiki/APL_(programming_language) Game of Life[edit

[go-nuts] Integrate Go Code with Node.js

2019-04-29 Thread Nitish Saboo
Hi, Can someone please guide me with the references or steps to integrate Go Code with Node.js ? Thanks, Nitish -- 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

Re: [go-nuts] Integrate Go Code with Node.js

2019-04-29 Thread Wojciech S. Czarnecki
On Mon, 29 Apr 2019 04:40:51 -0700 (PDT) Nitish Saboo wrote: > Can someone please guide me with the references or steps to integrate Go > Code with Node.js ? Usually you write a go RPC server then you call it from the javascript side. Or vice versa. https://www.google.com/search?q=go+microserv

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

2019-04-29 Thread Volker Dobler
The number of keywords and their "origin language" does not matter much, that is something we probably can all agree to, especially with the very few kewords in Go. But if you try to teach 9 or 10 year old kids to program you cannot do this in the language alone, you need at least to import fmt. A

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

2019-04-29 Thread Wojciech S. Czarnecki
On Mon, 29 Apr 2019 05:07:58 -0700 (PDT) Volker Dobler wrote: > But if you try to teach 9 or 10 year old kids to program you cannot > do this in the language alone, you need at least to import fmt. > And while the handful of keywords are not a problem at all the > packages used to do interesting

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

2019-04-29 Thread fbaube
It's interesting to see this! Back in the early 1970s I wondered what the programming languages in other countries (not-USA) looked like - what were the keywords, etc. Well, it turns out that (AFAIK) they were using the same compilers and the same interpreters, and languages with the same Engl

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-29 Thread Tamás Gulácsi
LogMessage *match(...) { ... return msg; } -- 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

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-29 Thread Nitish Saboo
Hi Tamás, If I return LogMessage type of object from C code, what type of object should be there on Go side to receive the return value because the Go side doesn't have a LogMessage object ? Thanks On Mon, Apr 29, 2019 at 7:14 PM Tamás Gulácsi wrote: > LogMessage *match(...) { > ... > return

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread AndersonQ
Well, I don't have experience in Windows, but I'd suggest you to try: 1) get out of your GOPATH or set GO111MODULES=on 2) go mod init or go mod init hello 3) go mod tidy 4) go run main.go or go build && ./hello Also, have a look at https://github.com/golang/go/wiki/Modules#quick-start good luck!

[go-nuts] Facebook web app and go?

2019-04-29 Thread daniel . r . kegel
I'm a linux / c++ guy with an itch to try writing a tiny scalable web app. I suspect golang and google app engine might be a good fit, and have been looking for an excuse to try them. The app would: - provide a facebook login button - let user specify a facebook page - post a message to that page

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread Uli Kunitz
There is a problem with your C drive. Go uses it to store temporary files. The error messages says it cannot access a file that Go should have created there. It's either a full drive or a permission issues. You can change the location by changing the GOCACHE variable -- You received this mess

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-29 Thread Tamás Gulácsi
2019. április 29., hétfő 17:41:51 UTC+2 időpontban Nitish Saboo a következőt írta: > > Hi Tamás, > > If I return LogMessage type of object from C code, what type of object > should be there on Go side to receive the return value because the Go side > doesn't have a LogMessage object ? > > Thank

Re: [go-nuts] Pass value from C code to GO code(CGO)

2019-04-29 Thread ksbhaskar
Nitish – As noted, you cannot pass to C a pointer to Go structure. However, Go can use pointers C structures that are provided to it. YottaDB passes key-value tuples between C and Go, and you can look at working code that does this at https://gitlab.com/YottaDB/Lang/YDBGo with further documenta

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread Avetis Sargsian
Unfortunately changin GOCACHE variable didn't help > PS F:\GoWorckspace\src\hello> go env > set GOARCH=amd64 > set GOBIN=F:\GoWorckspace\bin > set GOCACHE=F:\temp > set GOEXE=.exe > set GOFLAGS= > set GOHOSTARCH=amd64 > set GOHOSTOS=windows > set GOOS=windows > set GOPATH=F:\GoWorckspace > set G

Re: [go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread andrey mirtchovski
try setting GOTMPDIR. not sure what this corresponds to on windows, but it will change where the go tool will create its temp files: $ go run -x t.go WORK=/var/folders/sp/06p28g2d0vs7gd2vhf26wl9mgn/T/go-build126372523 [...] $ GOTMPDIR=/tmp/go go run -x t.go WORK=/tmp/go/go-build661115935 [...]

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread 'Xiaohua(Tony) Guan' via golang-nuts
What is the output of your "go build" under the dir? Please give a pre and after capture. On Sunday, April 28, 2019 at 6:45:20 AM UTC-7, Avetis Sargsian wrote: > > Hi everyone, as you can see from the topic I am new to Go > > I follow the instruction on this page > https://golang.org/doc/code.ht

[go-nuts] Strange error after adding another sample code

2019-04-29 Thread suntong001
What does the following error really means? can't load package: package ./.: found packages easygen (config.go) and easygen_test (example_execute.go) in /path/to/go-easygen/easygen cmd/easygen/flags.go:12:2: found packages easygen (config.go) and easygen_test (example_execute.go) in /path/to/s

[go-nuts] Re: Strange error after adding another sample code

2019-04-29 Thread vaastav anand
The issue is that you have multiple package names in the same folder. In this specific case it is easygen and easygen_test. You should have 1 package per folder. The reason your test files did not raise this issue is because _test.go files are automatically excluded when packages are being compil

Re: [go-nuts] Facebook web app and go?

2019-04-29 Thread Miguel Angel Rivera Notararigo
Hi! you could use the standard library, take a look at https://golang.org/pkg/net/http and https://golang.org/pkg/html/template/ packages, should be enough with them. It looks like an embedded database fits for your use case, you could use https://github.com/dgraph-io/badger or SQLite if you prefer

Re: [go-nuts] Facebook web app and go?

2019-04-29 Thread Nathan Fisher
If you’re in AppEngine/GCP territory already there’s CloudDatastore (NoSQL), Blockstorage, and Memcache which used to all be available in their free tier. There’s emulators available in the gcloud tool kit that provides a reasonable local development experience. Cheers! Nathan On Mon, Apr 29, 201

[go-nuts] Re: Strange error after adding another sample code

2019-04-29 Thread suntong001
Ah, that's 2nd condition to use tests in package with the "_test" as package, which I've forgotten. Thanks! On Monday, April 29, 2019 at 9:04:15 PM UTC-4, vaastav anand wrote: > > The issue is that you have multiple package names in the same folder. In > this specific case it is easygen and ea

[go-nuts] There is definitely a race condition, why it can't be detected by race condition detector?

2019-04-29 Thread jackinwhat
On line 85 in https://github.com/golang/go/blob/release-branch.go1.12/src/sync/mutex.go , the code " old := m.state " is weired because m.state is read and write by different goroutine. Why it can't be detected by race condition detector. I write a function Test with race condition problem. I

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
On Thursday, November 29, 2018 at 6:22:56 PM UTC+13, Justin Israel wrote: > > > > On Thu, Nov 29, 2018 at 6:20 PM Justin Israel > wrote: > >> On Thu, Nov 29, 2018 at 5:32 PM Ian Lance Taylor wrote: >> >>> On Wed, Nov 28, 2018 at 7:18 PM Justin Israel >>> wrote: >>> > >>> > I've got a service

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread Avetis Sargsian
> > I set GOTMPDIR to E:\temp folder > and here is the result PS F:\GoWorckspace\src\hello> go install open E:\temp\go-build447177998\b001\exe\a.out.exe: The system cannot find the file specified. PS F:\GoWorckspace\src\hello> go build open E:\temp\go-build140959642\b001\exe\a.out.exe: The sys

[go-nuts] Re: Need help to launch hello.go

2019-04-29 Thread vaastav anand
It could be due to some anti-virus scanner deleting files. Here is the relevant issue : https://github.com/golang/go/issues/26195 On Monday, 29 April 2019 22:02:33 UTC-7, Avetis Sargsian wrote: > > I set GOTMPDIR to E:\temp folder >> > and here is the result > > PS F:\GoWorckspace\src\hello> go i

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread vaastav anand
I'd be very surprised if the anonymous goroutine is the reason behind a SIGBUS violation. So, if I remember SIGBUS correctly, it means that you are issuing a read/write to a memory address which is not really addressable or it is misaligned. I think the chances of the address being misaligned ar

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
On Tue, Apr 30, 2019 at 5:43 PM vaastav anand wrote: > I'd be very surprised if the anonymous goroutine is the reason behind a > SIGBUS violation. > So, if I remember SIGBUS correctly, it means that you are issuing a > read/write to a memory address which is not really addressable or it is > misa

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread vaastav anand
Ok, so in the 2nd piece of code you posted, is some request being pushed onto some OS queue? If so, is it possible that you may be maxing the queue out and then pushing something else into it and that could cause a SIGBUS as well This seems super farfetched tho but it is hard to debug withou

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
On Tue, Apr 30, 2019 at 6:09 PM vaastav anand wrote: > Ok, so in the 2nd piece of code you posted, is some request being pushed > onto some OS queue? If so, is it possible that you may be maxing the queue > out and then pushing something else into it and that could cause a SIGBUS > as well Th

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread vaastav anand
I have encountered a SIGBUS with go before but I was hacking inside the runtime and using shared mem with mmap. goroutines are assigned IDs incrementally and each goroutine at bare minimum has 2.1KB stack space in go1.11 down from 2.7KB in go1.10 if I recall correctly. So, at the very least at

Re: [go-nuts] Cause of SIGBUS panic in gc?

2019-04-29 Thread Justin Israel
On Tue, Apr 30, 2019 at 6:33 PM vaastav anand wrote: > I have encountered a SIGBUS with go before but I was hacking inside the > runtime and using shared mem with mmap. > > goroutines are assigned IDs incrementally and each goroutine at bare > minimum has 2.1KB stack space in go1.11 down from 2.7