[go-nuts] Re: Is there a Go native approch to MPI (Message passing interface) ?

2020-09-14 Thread Vitaly
https://nanomsg.org/ aka https://zeromq.org/

среда, 10 июня 2015 г. в 01:40:39 UTC+5, Serge Hulne: 

> Hi, I would like to know if there is a build-in mechanism (or a  typical 
> Go paradigm) to address message passing interfaces.
>
> Go solves the problem of message passing between goroutines using the 
> goroutines / channels construct and is also solves the problem to spread 
> the load over multiple processors when one isolated computer is involved.
>
> Does Go also provide something similar (similar to goroutines / channels 
> or to MPI) to distribute computing load across computers on a network ?
>
> (I am aware that MPI is more targeted at parallel processing and goutines 
> / channels are more targeted at making concurrency easy to formulate, but 
> still).
>
> Serge.
>
>

-- 
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/67641730-dfd0-48af-9a44-f092cc6bcc8bn%40googlegroups.com.


[go-nuts] Re: Using Mysql and Golang combined resources

2020-09-14 Thread chuco...@gmail.com
If you are target Mysql only. You can 
use https://medium.com/@hugo.bjarred/mysql-and-golang-ea0d620574d2 article.
If you are not sure you are using Mysql which means you are going to switch 
to another server. You can use Gorm for a general solution.
On Monday, September 14, 2020 at 11:53:17 PM UTC+8 ayushp...@gmail.com 
wrote:

> can anyone suggest me some resources to start using MySQL with Golang? I 
> am familiar with Go and want to learn using MySQL with Go.
>
> thankyou!
>

-- 
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/da3f30c6-e997-4617-a7fa-7783ed59ed52n%40googlegroups.com.


[go-nuts] Please share your groupcache use cases

2020-09-14 Thread nvcnvn
If I understand correctly, because groupcache doesn't allow modify value 
(except it deleted by LRU???), I need to add time bucket to the key?

```
func timeBucket(t time.Time) string {
return t.Format("2006_01_02_15_04")
}

func userCacheKey(id string, t time.Time) string {
   return id + timeBucket(t)
}
```

Do I understand thing correctly?

-- 
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/e98fad9f-37c2-46cf-b115-3555829b2991n%40googlegroups.com.


[go-nuts] Re: Monorepo several binaries and build only some

2020-09-14 Thread Igor Ovsiannikov
Diego wrote:
> Is there a way to know if a binary has to be rebuilt, due to changes to 
some of its dependencies?

It maybe a bit an off topic, but if you have a mono repo and want to be 
able to
specify internal dependencies as well and rebuild only what is necessary 
you may
want to look into Bazel[1] build tool.  It is definitely an investment, but 
for
bigger and/or long-living projects it is well worth it.

[1]: https://bazel.build/

-- 
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/7268e701-e5b1-4093-b95c-e3878a9e76bdn%40googlegroups.com.


[go-nuts] Re: Monorepo several binaries and build only some

2020-09-14 Thread Diego Medina
Thanks!

On Monday, September 14, 2020 at 5:02:53 PM UTC-4 Alex wrote:

> Sorry, return values were reversed. "true\n" if it needs rebuilding
>
> On Tuesday, 15 September 2020 at 5:00:23 am UTC+8 Alex wrote:
>
>> You can run the command: *go list -f {{.Stale}}* 
>> It will print a "true\n" or "false\n" if the package/program in the 
>> current folder needs to be rebuilt.
>>
>> On Tuesday, 15 September 2020 at 1:15:32 am UTC+8 fmpw...@gmail.com 
>> wrote:
>>
>>>
>>> Hi,
>>>
>>> Is there a way to know if a binary has to be rebuilt, due to changes to 
>>> some of its dependencies?
>>>
>>> Let's say I have a repo with this structure:
>>>
>>> /cmd/tool1/main.go
>>> /cmd/tool2/main.go
>>> /pkg/users/update.go
>>> /pkg/math/avg.go
>>>
>>>
>>> tool1 imports the math package
>>> tool2 imports both, math and user packages
>>>
>>> As part of our CI/CD, I need to know that if a Pull Request only updates 
>>> the user pacakge, only tool2 needs to be deployed to production.
>>>
>>> This is of course a simplified example, in real life we'll have a few 
>>> more binaries and a much higher number of packages.
>>>
>>> Thanks
>>>
>>> Diego
>>>
>>>
>>>
>>>
>>>
>>>

-- 
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/aae2a1fb-2301-45eb-b3d0-f759f3715267n%40googlegroups.com.


[go-nuts] Re: Monorepo several binaries and build only some

2020-09-14 Thread Alex
Sorry, return values were reversed. "true\n" if it needs rebuilding

On Tuesday, 15 September 2020 at 5:00:23 am UTC+8 Alex wrote:

> You can run the command: *go list -f {{.Stale}}* 
> It will print a "true\n" or "false\n" if the package/program in the 
> current folder needs to be rebuilt.
>
> On Tuesday, 15 September 2020 at 1:15:32 am UTC+8 fmpw...@gmail.com wrote:
>
>>
>> Hi,
>>
>> Is there a way to know if a binary has to be rebuilt, due to changes to 
>> some of its dependencies?
>>
>> Let's say I have a repo with this structure:
>>
>> /cmd/tool1/main.go
>> /cmd/tool2/main.go
>> /pkg/users/update.go
>> /pkg/math/avg.go
>>
>>
>> tool1 imports the math package
>> tool2 imports both, math and user packages
>>
>> As part of our CI/CD, I need to know that if a Pull Request only updates 
>> the user pacakge, only tool2 needs to be deployed to production.
>>
>> This is of course a simplified example, in real life we'll have a few 
>> more binaries and a much higher number of packages.
>>
>> Thanks
>>
>> Diego
>>
>>
>>
>>
>>
>>

-- 
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/f8af4141-cf49-4f5a-a103-fa510ecae738n%40googlegroups.com.


[go-nuts] Re: Monorepo several binaries and build only some

2020-09-14 Thread Alex
You can run the command: *go list -f {{.Stale}}* 
It will print a "true\n" or "false\n" if the package/program in the current 
folder needs to be rebuilt.

On Tuesday, 15 September 2020 at 1:15:32 am UTC+8 fmpw...@gmail.com wrote:

>
> Hi,
>
> Is there a way to know if a binary has to be rebuilt, due to changes to 
> some of its dependencies?
>
> Let's say I have a repo with this structure:
>
> /cmd/tool1/main.go
> /cmd/tool2/main.go
> /pkg/users/update.go
> /pkg/math/avg.go
>
>
> tool1 imports the math package
> tool2 imports both, math and user packages
>
> As part of our CI/CD, I need to know that if a Pull Request only updates 
> the user pacakge, only tool2 needs to be deployed to production.
>
> This is of course a simplified example, in real life we'll have a few more 
> binaries and a much higher number of packages.
>
> Thanks
>
> Diego
>
>
>
>
>
>

-- 
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/90d9affb-f9d0-418b-826f-c4587b4eb36an%40googlegroups.com.


Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Henrik Johansson
The Jolokia solution is quite neat if you can control the running JVM since
that bridge then runs inside the same JVM as an agent.
Many servers and services offer to configure the command line for this and
other similar purposes.

On Mon, Sep 14, 2020 at 9:05 PM Robert Engels  wrote:

> Search for Java RMI-IIOP.
>
> On Sep 14, 2020, at 2:04 PM, Robert Engels  wrote:
>
> 
> You need a bridge. RMI requires Java. if you use a subset you can use
> Corba/IIOP clients.
>
> On Sep 14, 2020, at 11:11 AM, Henrik Johansson 
> wrote:
>
> 
> Newrelic has some tools for this but I think they require agents installed
> in the Java side.
>
> I think you are better off going for the Jolokia solution but perhaps
> there is something you can use from Newrelic.
>
> On Mon, 14 Sep 2020, 17:52 Venkata Madhusudhan Rao V, 
> wrote:
>
>> Hi All,
>> I have a java-based application with JMX enabled. I was able to remotely
>> connected to the java-based application from JConsole using jmx url
>> (service:jmx:rmi:///jndi/rmi://localhost:/jmxrmi).
>> Now, I want to connect from Go-client to capture the metrics.
>> I looked at *Jolokia JMX/HTTP wrapper for Golang*, but it uses http
>> protocol to get connect. Is there any library available in GO to get
>> connected for the provided JMX url?
>>
>> Thanks & Regards
>> Venkata Madhu
>>
>> --
>> 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/ed421a0e-6a0c-410e-9e3a-aff7c2e5030cn%40googlegroups.com
>> 
>> .
>>
> --
> 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/CAKOF697xwfKTCkLmyL0TRjAUE9sSPn9P3LyzHzEVg6N6Y8_Gmg%40mail.gmail.com
> 
> .
>
> --
> 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/C763C513-6439-4B40-942B-0831CC10D964%40ix.netcom.com
> 
> .
>
>

-- 
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/CAKOF695Y4Tcfnkp5TSvBaUDJUkC3YP0yJMbQRRk2GngrOo%3D7AQ%40mail.gmail.com.


Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Robert Engels
Search for Java RMI-IIOP. 

> On Sep 14, 2020, at 2:04 PM, Robert Engels  wrote:
> 
> 
> You need a bridge. RMI requires Java. if you use a subset you can use 
> Corba/IIOP clients. 
> 
>>> On Sep 14, 2020, at 11:11 AM, Henrik Johansson  wrote:
>>> 
>> 
>> Newrelic has some tools for this but I think they require agents installed 
>> in the Java side.
>> 
>> I think you are better off going for the Jolokia solution but perhaps there 
>> is something you can use from Newrelic.
>> 
>>> On Mon, 14 Sep 2020, 17:52 Venkata Madhusudhan Rao V,  
>>> wrote:
>>> Hi All,
>>> I have a java-based application with JMX enabled. I was able to remotely 
>>> connected to the java-based application from JConsole using jmx url 
>>> (service:jmx:rmi:///jndi/rmi://localhost:/jmxrmi). 
>>> Now, I want to connect from Go-client to capture the metrics. 
>>> I looked at Jolokia JMX/HTTP wrapper for Golang, but it uses http protocol 
>>> to get connect. Is there any library available in GO to get connected for 
>>> the provided JMX url?
>>> 
>>> Thanks & Regards
>>> Venkata Madhu
>>> 
>>> -- 
>>> 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/ed421a0e-6a0c-410e-9e3a-aff7c2e5030cn%40googlegroups.com.
>> 
>> -- 
>> 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/CAKOF697xwfKTCkLmyL0TRjAUE9sSPn9P3LyzHzEVg6N6Y8_Gmg%40mail.gmail.com.
> -- 
> 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/C763C513-6439-4B40-942B-0831CC10D964%40ix.netcom.com.

-- 
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/EF420F6E-664E-4662-AC76-241F6ED6C056%40ix.netcom.com.


Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Robert Engels
You need a bridge. RMI requires Java. if you use a subset you can use 
Corba/IIOP clients. 

> On Sep 14, 2020, at 11:11 AM, Henrik Johansson  wrote:
> 
> 
> Newrelic has some tools for this but I think they require agents installed in 
> the Java side.
> 
> I think you are better off going for the Jolokia solution but perhaps there 
> is something you can use from Newrelic.
> 
>> On Mon, 14 Sep 2020, 17:52 Venkata Madhusudhan Rao V,  
>> wrote:
>> Hi All,
>> I have a java-based application with JMX enabled. I was able to remotely 
>> connected to the java-based application from JConsole using jmx url 
>> (service:jmx:rmi:///jndi/rmi://localhost:/jmxrmi). 
>> Now, I want to connect from Go-client to capture the metrics. 
>> I looked at Jolokia JMX/HTTP wrapper for Golang, but it uses http protocol 
>> to get connect. Is there any library available in GO to get connected for 
>> the provided JMX url?
>> 
>> Thanks & Regards
>> Venkata Madhu
>> 
>> -- 
>> 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/ed421a0e-6a0c-410e-9e3a-aff7c2e5030cn%40googlegroups.com.
> 
> -- 
> 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/CAKOF697xwfKTCkLmyL0TRjAUE9sSPn9P3LyzHzEVg6N6Y8_Gmg%40mail.gmail.com.

-- 
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/C763C513-6439-4B40-942B-0831CC10D964%40ix.netcom.com.


[go-nuts] Monorepo several binaries and build only some

2020-09-14 Thread Diego Medina

Hi,

Is there a way to know if a binary has to be rebuilt, due to changes to 
some of its dependencies?

Let's say I have a repo with this structure:

/cmd/tool1/main.go
/cmd/tool2/main.go
/pkg/users/update.go
/pkg/math/avg.go


tool1 imports the math package
tool2 imports both, math and user packages

As part of our CI/CD, I need to know that if a Pull Request only updates 
the user pacakge, only tool2 needs to be deployed to production.

This is of course a simplified example, in real life we'll have a few more 
binaries and a much higher number of packages.

Thanks

Diego





-- 
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/fd7fffeb-eb60-4ef8-8024-5cabb47741c1n%40googlegroups.com.


Re: [go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Henrik Johansson
Newrelic has some tools for this but I think they require agents installed
in the Java side.

I think you are better off going for the Jolokia solution but perhaps there
is something you can use from Newrelic.

On Mon, 14 Sep 2020, 17:52 Venkata Madhusudhan Rao V, 
wrote:

> Hi All,
> I have a java-based application with JMX enabled. I was able to remotely
> connected to the java-based application from JConsole using jmx url
> (service:jmx:rmi:///jndi/rmi://localhost:/jmxrmi).
> Now, I want to connect from Go-client to capture the metrics.
> I looked at *Jolokia JMX/HTTP wrapper for Golang*, but it uses http
> protocol to get connect. Is there any library available in GO to get
> connected for the provided JMX url?
>
> Thanks & Regards
> Venkata Madhu
>
> --
> 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/ed421a0e-6a0c-410e-9e3a-aff7c2e5030cn%40googlegroups.com
> 
> .
>

-- 
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/CAKOF697xwfKTCkLmyL0TRjAUE9sSPn9P3LyzHzEVg6N6Y8_Gmg%40mail.gmail.com.


[go-nuts] Using Mysql and Golang combined resources

2020-09-14 Thread Ayush Paudel
can anyone suggest me some resources to start using MySQL with Golang? I am 
familiar with Go and want to learn using MySQL with Go.

thankyou!

-- 
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/2c00d529-1151-4c07-b9d5-3eede07677f3n%40googlegroups.com.


[go-nuts] JMX Call with non-HTTP

2020-09-14 Thread Venkata Madhusudhan Rao V
Hi All,
I have a java-based application with JMX enabled. I was able to remotely 
connected to the java-based application from JConsole using jmx url 
(service:jmx:rmi:///jndi/rmi://localhost:/jmxrmi). 
Now, I want to connect from Go-client to capture the metrics. 
I looked at *Jolokia JMX/HTTP wrapper for Golang*, but it uses http 
protocol to get connect. Is there any library available in GO to get 
connected for the provided JMX url?

Thanks & Regards
Venkata Madhu

-- 
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/ed421a0e-6a0c-410e-9e3a-aff7c2e5030cn%40googlegroups.com.


Re: [go-nuts] Is there a Go native approch to MPI (Message passing interface) ?

2020-09-14 Thread Samuel Lampa
Nice, thanks a lot for sharing!

Best
Samuel

On Monday, September 14, 2020 at 1:07:25 PM UTC+2 rcore...@gmail.com wrote:

> I just wrote a wrapper around open mpi in Go: https://github.com/emer/empi
>
> Also, here's a set of random go bindings I found:
> • https://github.com/yoo/go-mpi
> • https://github.com/marcusthierfelder/mpi
> • https://github.com/JohannWeging/go-mpi
> Even a from scratch implementation:
>
> • https://github.com/btracey/mpi
> Also a few libraries for using infiniband directly:
>
> • https://github.com/Mellanox/rdmamap
> • https://github.com/jsgilmore/ib
> • https://github.com/Mellanox/libvma
> Some discussion: 
> https://groups.google.com/forum/#!topic/golang-nuts/t7Vjpfu0sjQ
>
> - Randy
>
> > On Sep 14, 2020, at 3:25 AM, Samuel Lampa  wrote:
> > 
> > On Thursday, June 11, 2015 at 2:53:36 PM UTC+2 Egon wrote:
> > 1. In which cases a cluster of say 4 (or 10 or 100 for instance) 
> Raspberry Pi mini computers can be more cost-effective than a single 
> computer with the same amount of cores (does the cost of communicating the 
> data between the computers via the network not outweigh the fact that they 
> car run tasks simultaneously) ?
> > 
> > The general answer is Amdahl's Law (
> http://en.wikipedia.org/wiki/Amdahl%27s_law), of course it's not always 
> applicable (
> http://www.futurechips.org/thoughts-for-researchers/parallel-programming-gene-amdahl-said.html).
>  
> When moving things to multiple-computers you'll get a larger overhead in 
> communication when compared to a single-computer, at the same time you may 
> reduce resource-contention for disk, RAM (or other resources). So depending 
> where your bottlenecks are, it could go either way...
> > 
> > Yes, and also note that super-computers often use special network 
> protocols/technologies which support so called "Remote direct memory 
> access" (RDMA) [1], such as Infiniband [2], to get acceptable performance 
> for high-performance multi-core computations across compute nodes. 
> Infiniband cards are pretty expensive as far as I know, so will probably 
> outweigh the benefits of buying a lot of RPis.
> > 
> > I'd still be interested to hear if anybody knows about new developments 
> on MPI for Go (for HPC use cases if nothing else)? :)
> > 
> > [1] https://en.wikipedia.org/wiki/Remote_direct_memory_access
> > [2] https://en.wikipedia.org/wiki/InfiniBand
> > 
> > Best
> > Samuel
> > 
> > -- 
> > 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.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/d1d39602-e48e-4c2e-909b-a85d0d7e81ban%40googlegroups.com
> .
>
>

-- 
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/6d58b655-a017-4d8b-8446-f8687eb1412an%40googlegroups.com.


Re: [go-nuts] cgo cross compilation to arm failed

2020-09-14 Thread 'Hubert Hirtz' via golang-nuts
Thank you, that was the issue.  I used one of the toolchains from
 and it worked.

-- 
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/bbe05819-cd46-9654-0fe2-14775c8add98%40hirtzfr.eu.


signature.asc
Description: OpenPGP digital signature


Re: [go-nuts] Is there a Go native approch to MPI (Message passing interface) ?

2020-09-14 Thread Randall O'Reilly
I just wrote a wrapper around open mpi in Go:  https://github.com/emer/empi

Also, here's a set of random go bindings I found:
• https://github.com/yoo/go-mpi
• https://github.com/marcusthierfelder/mpi
• https://github.com/JohannWeging/go-mpi
Even a from scratch implementation:

• https://github.com/btracey/mpi
Also a few libraries for using infiniband directly:

• https://github.com/Mellanox/rdmamap
• https://github.com/jsgilmore/ib
• https://github.com/Mellanox/libvma
Some discussion: https://groups.google.com/forum/#!topic/golang-nuts/t7Vjpfu0sjQ

- Randy

> On Sep 14, 2020, at 3:25 AM, Samuel Lampa  wrote:
> 
> On Thursday, June 11, 2015 at 2:53:36 PM UTC+2 Egon wrote:
> 1. In which cases a cluster of say 4 (or 10 or 100 for instance) Raspberry Pi 
> mini computers can be more cost-effective than a single computer with the 
> same amount of cores (does the cost of communicating the data between the 
> computers via the network not outweigh the fact that they car run tasks 
> simultaneously) ?
> 
> The general answer is Amdahl's Law 
> (http://en.wikipedia.org/wiki/Amdahl%27s_law), of course it's not always 
> applicable 
> (http://www.futurechips.org/thoughts-for-researchers/parallel-programming-gene-amdahl-said.html).
>  When moving things to multiple-computers you'll get a larger overhead in 
> communication when compared to a single-computer, at the same time you may 
> reduce resource-contention for disk, RAM (or other resources). So depending 
> where your bottlenecks are, it could go either way...
> 
> Yes, and also note that super-computers often use special network 
> protocols/technologies which support so called "Remote direct memory access" 
> (RDMA) [1], such as Infiniband [2], to get acceptable performance for 
> high-performance multi-core computations across compute nodes. Infiniband 
> cards are pretty expensive as far as I know, so will probably outweigh the 
> benefits of buying a lot of RPis.
> 
> I'd still be interested to hear if anybody knows about new developments on 
> MPI for Go (for HPC use cases if nothing else)? :)
> 
> [1] https://en.wikipedia.org/wiki/Remote_direct_memory_access
> [2] https://en.wikipedia.org/wiki/InfiniBand
> 
> Best
> Samuel
> 
> -- 
> 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/d1d39602-e48e-4c2e-909b-a85d0d7e81ban%40googlegroups.com.

-- 
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/2B3CAD1A-234F-4C09-BC21-24D6E01B87DA%40gmail.com.


[go-nuts] Re: How to send mail using .EML file/content in Golang?

2020-09-14 Thread Tamás Gulácsi
Sth. like 
```
var buf bytes.Buffer
buf.Reset()
fh, err := os.Open("path-to-eml")
if err != nil {
  return err
}
_, err = io.Copy(, fh)
fh.Close()
if err != nil {
return err
}
email, err := parsemail.Parse(bytes.NewReader(buf.Bytes()))
if err != nil { // handle error 
  return err
}
d := gomail.NewDialer(...)
sc, err := d.Dial()
if err != nil {
  return err
}
return sc.Send(email.From, []string{email.To}, buf)
```

Or if you don't want to read the whole email into memory (but I think 
parsemail already does it, unlike the standard net/mail),
you could create a little helper:
```
type copyWriterTo struct { r io.Reader }
func (cw copyWriterTo) WriteTo(w io.Writer) (int64, err) { return 
io.Copy(w, cw.r) }
```
and use it in `sc.Send`, instead of `buf`.

Tamás Gulácsi a következőt írta (2020. szeptember 14., hétfő, 6:17:42 
UTC+2):

> Use DialSender returned by gomail.Dial.
> You don't need the parsed message for it, just the from and to addresses, 
> and write the contents of the .eml file into the WriterTo as is.
>
> sandip bait a következőt írta (2020. szeptember 14., hétfő, 1:06:50 UTC+2):
>
>> I am using Standard *gomail * package 
>> for sending mails in Golang. The mail generation part is happing from some 
>> other component which i am storing it in a particular location (i.e 
>> */path/sample.eml* file). And hence , i have pre-cooked mail body in 
>> .EML file which i just want process as a new mail. I am able to put/parse 
>> the .EML content by using the *parsemail 
>> * package of *DusanKasan*. 
>> There are so many custom headers which i have already set in raw 
>> *sample.eml* file content which i want to send. It will be really 
>> helpful if i get an example code saying just pass *.eml* file as a input 
>> so that mail body will generate/render based on *.eml* file content.
>>
>> You can fine sample EML content string on *.EML 
>> *Here is my basic mail sending 
>> code using *gomail * 
>>
>> package.m := gomail.NewMessage() 
>> m.SetHeader("From", "al...@example.com") 
>> m.SetHeader("To", "b...@example.com", "co...@example.com") 
>> m.SetAddressHeader("Cc", "d...@example.com", "Dan") 
>> m.SetHeader("Subject", "Hello!") m.SetBody("text/html", "Hello Bob 
>> and Cora!") m.Attach("/home/Alex/lolcat.jpg") 
>>  d := gomail.NewDialer("smtp.example.com", 587, "user", "123456") // 
>> Send the email to Bob, Cora and Dan.
>> if err := d.DialAndSend(m); err != nil { panic(err) }
>>
>> Here is my eml parsing code using parsemail *parsemail 
>> * package
>>
>> var reader io.Reader // this reads an email message 
>> email, err := parsemail.Parse(reader) // returns Email struct and error 
>> if err != nil { // handle error } fmt.Println(email.Subject) 
>> fmt.Println(email.From) 
>> fmt.Println(email.To) 
>> fmt.Println(email.HTMLBody) 
>>
>> Thanks & Regards,
>>
>>

-- 
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/b36be460-057f-4711-bdf0-79265b6623d0n%40googlegroups.com.


[go-nuts] Re: Is there a Go native approch to MPI (Message passing interface) ?

2020-09-14 Thread Samuel Lampa
On Thursday, June 11, 2015 at 2:53:36 PM UTC+2 Egon wrote:

> 1. In which cases a cluster of say 4 (or 10 or 100 for instance) Raspberry 
>> Pi mini computers can be more cost-effective than a single computer with 
>> the same amount of cores (does the cost of communicating the data between 
>> the computers via the network not outweigh the fact that they car run tasks 
>> simultaneously) ?
>>
>
> The general answer is Amdahl's Law (
> http://en.wikipedia.org/wiki/Amdahl%27s_law), of course it's not always 
> applicable (
> http://www.futurechips.org/thoughts-for-researchers/parallel-programming-gene-amdahl-said.html).
>  
> When moving things to multiple-computers you'll get a larger overhead in 
> communication when compared to a single-computer, at the same time you may 
> reduce resource-contention for disk, RAM (or other resources). So depending 
> where your bottlenecks are, it could go either way...
>

Yes, and also note that super-computers often use special network 
protocols/technologies which support so called "Remote direct memory 
access" (RDMA) [1], such as Infiniband [2], to get acceptable performance 
for high-performance multi-core computations across compute nodes. 
Infiniband cards are pretty expensive as far as I know, so will probably 
outweigh the benefits of buying a lot of RPis.

I'd still be interested to hear if anybody knows about new developments on 
MPI for Go (for HPC use cases if nothing else)? :)

[1] https://en.wikipedia.org/wiki/Remote_direct_memory_access
[2] https://en.wikipedia.org/wiki/InfiniBand

Best
Samuel

-- 
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/d1d39602-e48e-4c2e-909b-a85d0d7e81ban%40googlegroups.com.