Re: [go-nuts] Go in programming language trends

2020-07-05 Thread Everton Marques
On the brighter side, no other language enjoys a long-term steady growth 
like Go...


Kevin Chadwick:
>
>
> >The fact that JS is top and above TyoeScript says a lot. 
> > 
>
> Really, that is your analysis? 
>
> Assuming valid data and considering js has enjoyed monopoly status for so 
> long, despite an IMO terrible syntax; 
>
> It says a lot that javascript is falling and typescript and Dart are 
> rising. Or maybe that is frameworks choosing for users like js is the 
> browser choosing? 
>
> I definitely prefer Golang function syntax over Dart and Dart function 
> syntax over js though. 
>
>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/55c6bbb1-5075-46a9-b14c-426a21d14c87o%40googlegroups.com.


[go-nuts] Go in programming language trends

2020-07-04 Thread Everton Marques

https://tjpalmer.github.io/languish/

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/36c2bf1b-733f-41b2-bfa3-e38c1165c49eo%40googlegroups.com.


[go-nuts] Why Discord is switching from Go to Rust

2020-02-07 Thread Everton Marques
I think Go is way better than Rust, but it is amusing to see why people pick 
one over another.

"Remarkably, we had only put very basic thought into optimization as the Rust 
version was written. Even with just basic optimization, Rust was able to 
outperform the hyper hand-tuned Go version. This is a huge testament to how 
easy it is to write efficient programs with Rust compared to the deep dive we 
had to do with Go."

https://blog.discordapp.com/why-discord-is-switching-from-go-to-rust-a190bbca2b1f

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c3d9fc18-b750-48d7-b0b8-fd78afdbbf29%40googlegroups.com.


[go-nuts] Re: Go mindshare is low & ~flat, per Google Trends

2020-01-29 Thread Everton Marques
Not a loss of mindshare:

It'd be nice to primarily work in Go rather than work on Go.
https://bradfitz.com/2020/01/27/leaving-google

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f6e5cfd1-5045-4642-9466-723a83d309ce%40googlegroups.com.


[go-nuts] Go mindshare is low & ~flat, per Google Trends

2020-01-16 Thread Everton Marques
See Go steadly growing over the years:

https://madnight.github.io/githut/#/stars/2019/4

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/901f2970-4b78-4624-85cf-5e80125256f5%40googlegroups.com.


[go-nuts] Help em if e else em Go

2019-12-28 Thread Everton Marques
Existe esse grupo em Português:

https://groups.google.com/forum/m/#!forum/golang-brasil

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ffbe7c2e-adfc-424e-9da0-155ce9e2ac92%40googlegroups.com.


Re: [go-nuts] Locking goroutine to "main" thread

2019-12-19 Thread Everton Marques
See also:

https://github.com/faiface/mainthread

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ef7090b7-4060-4834-a285-fec78b826dd4%40googlegroups.com.


[go-nuts] What is the meaning of the "go" line in go.mod

2019-12-11 Thread Everton Marques
https://www.reddit.com/r/golang/comments/b0b8k3/what_version_should_the_gomod_go_directive_be_set/

-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e531957c-d635-453f-bac7-88b4507f6bb9%40googlegroups.com.


Re: [go-nuts] go 1.13 won't compile

2019-09-30 Thread Everton Marques
Your code from playground compiled fine for me on Debian Linux.
Tested with Go 1.13 and 1.13.1.

Just had to include the missing func:

func GetUserGroupStr(f os.FileInfo) (string, string) {
return "foo", "bar"
}



Em segunda-feira, 30 de setembro de 2019 11:34:52 UTC-3, Robert Solomon 
escreveu:
>
> Your experience matches mine when compiled on windows 10.
>
> But linuxmint experience is as I described.   Another responder asked me 
> if it works when I set GO111MODULE=no.
>
> It does work when I do that.   I find it interesting that the linux 
> behavior seems to be different 
>
> On Mon, Sep 30, 2019, 9:17 AM Michael Ellis  > wrote:
>
>> FWIW, I copied your code from Go Playground into ~/go/src/dsrt/dsrt.go on 
>> my OS X machine.  I replaced an undefined function at line 375 (see below) 
>> with direct assignments for usernameStr and groupNameStr. It compiled (with 
>> go build) and ran without reporting an error under go 1.13.
>>
>> // usernameStr, groupnameStr := GetUserGroupStr(f) // util function in 
>> platform specific code, only for linux and windows.  Not needed anymore.  
>> Probably won't compile for foreign computer.
>> // GetUserGroupStr() is undefined, so hardcode a 
>> couple of nonsense strings to test compilation.
>> usernameStr := "foo"
>> groupnameStr := "bar"
>>
>>
>>
>> On Saturday, September 28, 2019 at 2:55:51 PM UTC-4, rob wrote:
>>>
>>> I guess I was not clear enough.  My apologies.  dsrt is my own code.  I 
>>> remember an earlier posting on this list recommended 'go install' instead 
>>> of 'go build'
>>>
>>> ~/go/src/dsrt/dsrt.go, util_linux.go, util_windows.go
>>>
>>> And I have written other small programs in go that I use for myself. I 
>>> put it in https://play.golang.org/p/U7FgzpqCh-B
>>>
>>> It compiles and runs fine on go 1.12.x under linux, and fine on go 1.13 
>>> under windows 10.  I have not yet installed go1.13.1 on my windows 10 box.
>>>
>>> I remember a promise that anything that compiles under go 1.0.0 will not 
>>> be broken.  Not being able to compile using go 1.13 that works fine using 
>>> go 1.12.x, broke my code.
>>>
>>> I'm not a professional programmer.  I don't know what else to include 
>>> here to demonstrate my problem.
>>>
>>> Thanks for your response.
>>>
>>> --rob solomon
>>>
>>>
>>>
>>> On 9/28/19 11:42 AM, Marcin Romaszewicz wrote:
>>>
>>> What was the last version of Go which worked for you? 
>>>
>>> "dsrt" isn't a valid module path in the new module resolution code. Does 
>>> it work if you disable modules - "GO111MODULE=off go install dsrt"?
>>>
>>>
>>>
>>> On Sun, Sep 22, 2019 at 9:56 AM rob  wrote:
>>>
 Hi.  I think I'm having an issue compiling my code w/ go 1.13.  I have 
 not had any issues up until now.  I have my code in the default 
 locations off of ~/go/src w/ a directory for each little bit of code I 
 wrote.

 Running under linuxmint 19.2 amd64, I installed the go binary by first 
 nuking /usr/local/go, and then

  sudo tar -C /usr/local -xf go1.13.linux-amd64.tar.gz.

 When I run go version, I get go version go1.13 linux/amd64

 Now when I run

  go install dsrt

 I'm getting an error message:

  can't load package: package dsrt: mallformed module path "dsrt" : 
 missing dot in first path element.

 I do not have, need or use a go.mod.  In fact, I don't really 
 understand 
 them.  And I don't yet understand what vendoring means.

 As an aside, I also compile on a win10 amd64 computer.  I installed 
 windows binary in the usual way on that computer, compiled my code 
 using 
 go install, and I've not had any issues there.  I only have an issue 
 here on linuxmint and go 1.13.

 What's up?

 --rob solomon


 -- 
 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...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/golang-nuts/3e9c5dad-2fda-9574-d8f9-8cedfb7986e5%40fastmail.com
 .

>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "golang-nuts" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/golang-nuts/5hh--qle2KI/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to 
>>> golan...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/CA%2Bv29LtsWqufQHw%2BmJtAe60KnCHPag9SPVAtjkP2XzkkuHcwyg%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>>> -- 
>> You received this message because you are subscribed to a 

[go-nuts] Re: Need help to learn go lang

2019-07-23 Thread Everton Marques

Em sexta-feira, 19 de julho de 2019 10:39:03 UTC-3, veeres...@gmail.com 
escreveu:
>
> would anyone help me out how to learn go lang more practically , may be 
> some resources . I want to understand go lang more practically , with some 
> great examples.
>
> thank you!
>

If you have basic understanding of Go, you could try Exercism:

https://exercism.io/tracks/go


-- 
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 on the web visit 
https://groups.google.com/d/msgid/golang-nuts/a7376633-ec26-4ab4-b8c6-c052930b692d%40googlegroups.com.


[go-nuts] How can race timing inject io.EOF into bufio.NewReader(os.Stdin) ?

2019-03-08 Thread Everton Marques
I am debugging an issue that randomly makes the code below to hit io.EOF 
instead of reporting first byte 'u' from "ugh":

$ echo "ugh" | eraseme ;# this randomly reports EOF instead of first byte 
'u' from "ugh"

$ more eraseme/main.go
// (snip)
func main() {
input := bufio.NewReader(os.Stdin)
b, err := input.ReadByte()
log.Printf("byte='%c' error=%v", b, err)
if err != nil {
os.Exit(1)
}
}

I suspect the offending code is a variable initialization from an imported 
package:

var Result = newResult() // in imported package

I can suppress the race by not importing that package or by turning 
newResult() into a no-op function.

However, all newResult() does it to allocate/initialize variables and 
log.Printf() messages.

I fail to see how newResult() could directly affect reading from os.Stdin.

Question: Can anyone figure out how initialization timing (?) would insert 
io.EOF in the stream created by bufio.NewReader(os.Stdin) ?

System is: go version go1.12 linux/amd64

The code does NOT launch any goroutine.

Thanks,
Everton

-- 
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] ZXBasic string slicing

2019-02-11 Thread Everton Marques
Funny feature from ZXBasic:

There is a notation called slicing for describing substrings, and this can 
be applied to arbitrary string expressions.

`"abcdef"(2 TO 5)="bcde"`

http://www.worldofspectrum.org/ZXBasicManual/zxmanchap8.html


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


Re: [go-nuts] Host two distinct modules in one git repo?

2018-08-08 Thread Everton Marques
Paul,

Since the issue affected only a specific Linux user running beta2, I 
suspected it was a caching issuen then used "go clean -modcache" (as 
suggested in https://github.com/golang/go/issues/26695) to fix it. And it 
worked.

Unfortunately I don't know how to reproduce the caching (?) issue. I guess 
I should have saved the user's homedir for reference before running "go 
clean -modcache".

I can no longer see the issue in beta2 or beta3... AFAICT modules are 
working like a charm.

Everton


Em quarta-feira, 8 de agosto de 2018 13:25:46 UTC-3, Paul Jolly escreveu:
>
> Everton - apologies, things got rather busy and this thread dropped 
> off my radar. 
>
> Is it possible for you to test with the latest build of go from tip? 
>
> There have been a number of fixes since beta3. 
>
> Thanks 
> On Thu, 26 Jul 2018 at 16:13, Everton Marques  > wrote: 
> > 
> > 
> > Em quinta-feira, 26 de julho de 2018 12:05:18 UTC-3, Paul Jolly 
> escreveu: 
> >> 
> >> Just a quick check: what version of git are you using? 
> > 
> > 
> > $ git --version 
> > git version 2.17.1 
> > 
> > $ go version 
> > go version go1.11beta2 linux/amd64 
> > 
> > 
> > -- 
> > 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...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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: Asymmetrical I/O load on single TCP connection

2018-02-08 Thread Everton Marques
For the archives.

go version go1.10rc2 linux/amd64

The tool uses the same loop code for both sending and receiving data.
Calling runtime.Gosched() in the top of the loop improved the behavior:

2018/02/07 21:26:40 report clientReader rate:   8277 Mbps  51741 calls/s
2018/02/07 21:26:40 report clientWriter rate:   7895 Mbps  49345 calls/s
2018/02/07 21:26:42 report clientReader rate:   8210 Mbps  51322 calls/s
2018/02/07 21:26:42 report clientWriter rate:   7800 Mbps  48753 calls/s
2018/02/07 21:26:44 report clientReader rate:   8347 Mbps  52177 calls/s
2018/02/07 21:26:44 report clientWriter rate:   7734 Mbps  48339 calls/s
2018/02/07 21:26:46 report clientReader rate:   7195 Mbps  44969 calls/s
2018/02/07 21:26:46 report clientWriter rate:   7451 Mbps  46574 calls/s

One can check the workLoop 
here: https://github.com/udhos/goben/blob/master/goben/client.go

Everton


Em quarta-feira, 7 de fevereiro de 2018 17:21:39 UTC-2, Everton Marques 
escreveu:
>
> Hi,
>
> I wrote a simple utility https://github.com/udhos/goben to test TCP 
> throughput between two hosts.
> At each endpoint, the tool spawns two goroutines: one for reading from 
> net.TCPConn as fast as possible, other for writing into it as fast as 
> possible.
> However I'm consistently obtaining uneven rates like these:
>
> 2018/02/06 23:13:47 report clientReader rate:  20089 Mbps 125557 calls/s
> 2018/02/06 23:13:47 report clientWriter rate:417 Mbps   2606 calls/s
> 2018/02/06 23:13:49 report clientReader rate:  18245 Mbps 114039 calls/s
> 2018/02/06 23:13:50 report clientWriter rate:   1295 Mbps   8097 calls/s
> 2018/02/06 23:13:51 report clientReader rate:  19722 Mbps 123263 calls/s
> 2018/02/06 23:13:52 report clientWriter rate:   2179 Mbps  13620 calls/s
> 2018/02/06 23:13:53 report clientReader rate:  15851 Mbps  99077 calls/s
> 2018/02/06 23:13:54 report clientWriter rate:   4274 Mbps  26718 calls/s
>
> Notice the input rate (reader) is way higher than output rate (writer).
>
> For comparison, this is the result from a single-threaded tool written in 
> C (https://github.com/udhos/nepim):
>
>  kbps_in   kbps_outrcv/ssnd/s
>   3 cur 8 8873837.00 8950252.00 47920.50 34142.50
>   3 cur 6 8655077.00 8654946.00 47166.50 33016.00
>   3 cur 4 8773173.00 8772125.00 47800.50 33463.00
>   3 cur 2 8700428.00 8700690.00 47408.50 33190.50
>   3 avg 0 8730680.00 8745727.00 47481.90 33362.30
>   3 min 0 8655077.00 8654946.00 47166.50 33016.00
>   3 max 0 8873837.00 8950252.00 47920.50 34142.50
>
> I guess I'm hitting some goroutine scheduling issue?
>
> How can I improve scheduling fairness (?) in order to get similar loads on 
> both directions?
>
> Thanks,
> Everton
>
>

-- 
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] Asymmetrical I/O load on single TCP connection

2018-02-07 Thread Everton Marques
Hi,

I wrote a simple utility https://github.com/udhos/goben to test TCP 
throughput between two hosts.
At each endpoint, the tool spawns two goroutines: one for reading from 
net.TCPConn as fast as possible, other for writing into it as fast as 
possible.
However I'm consistently obtaining uneven rates like these:

2018/02/06 23:13:47 report clientReader rate:  20089 Mbps 125557 calls/s
2018/02/06 23:13:47 report clientWriter rate:417 Mbps   2606 calls/s
2018/02/06 23:13:49 report clientReader rate:  18245 Mbps 114039 calls/s
2018/02/06 23:13:50 report clientWriter rate:   1295 Mbps   8097 calls/s
2018/02/06 23:13:51 report clientReader rate:  19722 Mbps 123263 calls/s
2018/02/06 23:13:52 report clientWriter rate:   2179 Mbps  13620 calls/s
2018/02/06 23:13:53 report clientReader rate:  15851 Mbps  99077 calls/s
2018/02/06 23:13:54 report clientWriter rate:   4274 Mbps  26718 calls/s

Notice the input rate (reader) is way higher than output rate (writer).

For comparison, this is the result from a single-threaded tool written in C 
(https://github.com/udhos/nepim):

 kbps_in   kbps_outrcv/ssnd/s
  3 cur 8 8873837.00 8950252.00 47920.50 34142.50
  3 cur 6 8655077.00 8654946.00 47166.50 33016.00
  3 cur 4 8773173.00 8772125.00 47800.50 33463.00
  3 cur 2 8700428.00 8700690.00 47408.50 33190.50
  3 avg 0 8730680.00 8745727.00 47481.90 33362.30
  3 min 0 8655077.00 8654946.00 47166.50 33016.00
  3 max 0 8873837.00 8950252.00 47920.50 34142.50

I guess I'm hitting some goroutine scheduling issue?

How can I improve scheduling fairness (?) in order to get similar loads on 
both directions?

Thanks,
Everton

-- 
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] gomobile example for audio?

2017-07-28 Thread Everton Marques
I could not find the example for golang.org/x/mobile/exp/audio/al.

Is it currently functional? Any pointers?

Everton

-- 
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] foo.Bar syntax clash - why?

2017-07-05 Thread Everton Marques
If context is not given, I can't tell if foo.Bar() is a function of package 
foo or a method of variable foo.
That is, dot is used both for package namespace and method call.

Example:

type T struct {
}

func (t T) Println(s string) {
fmt.Println("method: " + s)
}

func main() {
fmt.Println("hello from package function")
fmt := T{}
fmt.Println("hello")
}

https://play.golang.org/p/HZibMmJ8W5

I wonder if such an ambiguity came into Go...
1) on purpose, since the dot (.) is easy on the eye and simple key stroke 
(shift not needed) ?
2) by accident, since keyboards lack convenient alternate symbols ?
3) for other reasons ?

Everton

-- 
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: how to debug in gomobile? & can gomobile support mac or linux sometime

2017-03-30 Thread Everton Marques

Em quarta-feira, 29 de março de 2017 22:31:52 UTC-3, hui zhang escreveu:
>
> As too me gomobile now are more like a game engine (for ui is gl) , like 
> cocos2dx.
> but unlike cocos2dx, it only support mobile, and did not offer a way to 
> debug in wiki.
>
> how to debug,   if it could not be debug in mobile.
> at least let it support mac or linux so , so  we are easy to debug
>
>
Take a look at slide 53:

https://pt.slideshare.net/takuyaueda967/go-for-mobile-games

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