Re: [go-nuts] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen

Thank you all for your help.

I assembled a sort document with the collected arguments (thanks 
Sebastien).


It also contains short code samples.


Le 06/12/2017 à 16:17, Jesper Louis Andersen a écrit :
The best point in time to switch languages are when one of the 
following things is happening:


* There is a small experiment on the side of the larger system which 
can be handled in another language.
* There is a large project which has failed internally in the 
business, it is severely behind and nobody thinks it can be solved anyway.


The by far best situation is when the sky is falling. This is when you 
can propose a solution to the problem rather than a language. The 
solution then proves itself first and then the language decision 
follows as part of the solution.


However, for your situation, analyze the requirements of the project 
first, then make a real effort to analyze a Python solution against a 
Go solution. If astrophysicists are likely to grab e.g., numpy to do 
their image processing loop, it is a hard sell. OTOH, if you have to 
serve a serious amount of image data then the concurrency of Go is a 
better choice and so on. Quantify "how many images per minute", "how 
many concurrent requests", "resource usage" and so on.


You could also look for a split solution: process the images in 
Python, but serve them from Go?


To me, the two biggest weaknesses of Python in (industrial) production 
settings are:


* Dynamic typing and no other program modularization leads to programs 
that are really hard to maintain, especially as they grow. A small 
machine-learning training script is easy enough to maintain as a 
work-sheet, but I don't particularly like it for serving said 
machine-learning model.
* Deployment often requires some hoop-jumping. Getting the right 
software versions built on one machine and deployed on another is IMO 
living hell for Python programs. My experience is that build pipelines 
for Python systems often break in subtle ways. Go produces static 
binaries which are much easier to handle (Other systems doing it 
right: Haskell, Erlang, OCaml, Elixir, ...)



On Wed, Dec 6, 2017 at 2:34 PM Christophe Meessen 
> 
wrote:


Thanks far all the answers. Sebastien Binet is a colleague and he
is indeed brilliant.

pachyderm looks powerful, but also an overkill for my need. It
might scare my colleagues away.

Le 06/12/2017 à 12:34, Henrik Johansson a écrit :

I have a vague memory of +Rob Pike  tweeting
something about astronomy or perhaps an observatory a few months ago.
Perhaps there was no programming involved but if so I imagine Go
is safe bet.

But building pipelines using something like Pachyderm would allow
for a very polyglot "use the tool that fits in each part" approach.


ons 6 dec. 2017 kl 11:43 skrev Volker Dobler
>:

I know about https://go-hep.org probably Sebastien can
elaborate more
if and how it is used at CERN.

V.


On Wednesday, 6 December 2017 10:56:01 UTC+1, Christophe
Meessen wrote:

Hello,

I'm a computer scientist in charge of developing an image
processing pipeline for telescope images.
It will also have a web server and DB connection.

The project is going through reviews by external experts,
and the problem I'm facing is that my proposal to use Go
is about to be rejected.

The main opposing arguments are
- everybody uses python in astrophysics
- it is very easy to find someone who knows python
- risk that I, sole Go programmer, might become unavailable

I would have the same arguments if I was project leader
and unfamiliar with Go.

The counter arguments I found so far are that
- Go is simpler and safer than Python
- I learned Go in a week-end

The problem is that they don't convince people who don't
know Go, are not experienced software developers, and
don't want to do the due diligence.
It's the usual inertia to change.

What other arguments could I use ?

Do you know other significant scientific experiments that
have adopted Go ?



I have found this github project.
https://github.com/indigo-astronomy/indigo
INDI is a well known Python Observatory Control System.
INDIGO is its translation into Go.

I have also found SciPipe https://github.com/scipipe.
It is a Go pipeline framework used in scientific
applications.


-- 
You received this message because you are subscribed to the

Google Groups "golang-nuts" group.
 

Re: [go-nuts] Traceroute

2017-12-06 Thread Jesper Louis Andersen
Hi!

I think it would be far easier to help you if you wrote down what you
tried, what happened and what you expected to happen. That way, people will
be able to dig into the problem you are having more easily. In particular,
what do you mean when you say it doesn't work correctly?



On Mon, Dec 4, 2017 at 10:48 PM Camila Luísa  wrote:

> Hello everyone,
>
> I'm new with go, so, I try to start with a simple traceroute. I found some
> examples in github. But they don't work correctly.
> Attached is the code with a small change that I made to work, but still
> does not work correctly. The code works only in linux.
> this is the link to the original code:
>
> https://github.com/damnever/traceroute/blob/master/traceroute.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.
> 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.


Re: [go-nuts] how to do numpy.fromstring in Go ?

2017-12-06 Thread Sebastien Binet
Here is how I would do it:

https://play.golang.org/p/-aSfOYst6w

-s

sent from my droid

On Dec 6, 2017 8:03 PM, "Jonathan Yu"  wrote:

>
>
> 2017-12-06 10:38 GMT-08:00 Christian LeMoussel :
>
>> I have to write a Python program that uses numpy in GO.
>> I have this Python code :
>>   prefix = "de98671db1ce0e5c9ba89ab7ccdca6c427460295b8dd3642e9b2bb96172
>> 3307c57629b1ad37909a863a56965"
>>   prefix_np = np.fromstring(prefix[0:64], dtype=np.uint32, count=16)
>>   print("prefix_np: {}".format(prefix_np))
>>
>> Output :
>>
>> prefix_np: [ 943285604 1680946998 1700999522 1664443696  945906233  
>> 929194297 1667523427  878917217  909391666  892940848 1684289634  842282547 
>> 845298021  909730402  858928945 1664561203]
>>
>>
>> Some idea how can I do this efficiently in GO ?
>>
>
> I guess this would depend on whether this is  a well-defined format; you
> might have to port numpy's fromstring to Go? But it should be possible...
> If you control the Python side, it might be easier to dump the data as JSON
> and import into Go that way.
>
> Is there a library equivalent to numpy in GO?
>>
>
> I'm not knowledgeable enough to say, but Go has gonum which has similar
> goals to numpy and other data science toolkits: https://github.com/
> gonum/gonum
>
>>
>>
>>
>> Thank you for your help
>> G
>> M
>> T
>> Détecter la langueAfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasq
>> ueBengaliBiélorusseBirmanBosniaqueBulgareCatalanCebuanoChichewaChinois
>> (Simp)Chinois (Trad)CingalaiCoréenCréole haïtienCroateDanoisEspagnolEsp
>> érantoEstonienFinnoisFrançaisGalicienGalloisGéorgienGoudjaratiGrecHaoussa
>> HébreuHindiHmongHongroisIgboIndonésienIrlandaisIslandaisItalienJaponais
>> JavanaisKannadaKazakhKhmerLaotienLatinLettonLituanienMacédonienMalaisien
>> MalayalamMalgacheMaltaisMaoriMarathiMongolNéerlandaisNépalaisNorvégien
>> OuzbekPanjabiPersanPolonaisPortugaisRoumainRusseSerbeSesothoSlovaque
>> SlovèneSomaliSoudanaisSuédoisSwahiliTadjikTagalogTamoulTchèqueTeluguThaï
>> TurcUkrainienUrduVietnamienYiddishYoroubaZoulou
>> AfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasqueBengaliBiélorusse
>> BirmanBosniaqueBulgareCatalanCebuanoChichewaChinois (Simp)Chinois (Trad)
>> CingalaiCoréenCréole haïtienCroateDanoisEspagnolEspérantoEstonienFinnois
>> FrançaisGalicienGalloisGéorgienGoudjaratiGrecHaoussaHébreuHindiHmongH
>> ongroisIgboIndonésienIrlandaisIslandaisItalienJaponaisJavanaisKannada
>> KazakhKhmerLaotienLatinLettonLituanienMacédonienMalaisienMalayalam
>> MalgacheMaltaisMaoriMarathiMongolNéerlandaisNépalaisNorvégienOuzbek
>> PanjabiPersanPolonaisPortugaisRoumainRusseSerbeSesothoSlovaqueSlovène
>> SomaliSoudanaisSuédoisSwahiliTadjikTagalogTamoulTchèqueTeluguThaïTurc
>> UkrainienUrduVietnamienYiddishYoroubaZoulou
>> Fonction Sound est limitée à 200 caractères
>> Options : Historique : Commentaires : Donate
>> 
>> Fermer
>>
>> --
>> 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.
>>
>
>
>
> --
> Jonathan Yu / *@jawnsy* on LinkedIn ,
> Twitter , GitHub ,
> Facebook 
> *“Ever tried. Ever failed. No matter. Try again. Fail again. Fail better.”* —
> Samuel Beckett, Worstward Ho (1983)
>
> “In an adaptive environment, winning comes from adapting to change by
> continuously experimenting and identifying new options more quickly and
> economically than others. The classical strategist's mantra of sustainable
> competitive advantage becomes one of serial temporary advantage.” — Navigating
> the Dozens of Different Strategy Options
> 
>  (HBR)
>
> --
> 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.
>

-- 
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] how to do numpy.fromstring in Go ?

2017-12-06 Thread Jonathan Yu
2017-12-06 10:38 GMT-08:00 Christian LeMoussel :

> I have to write a Python program that uses numpy in GO.
> I have this Python code :
>   prefix = "de98671db1ce0e5c9ba89ab7ccdca6c427460295b8dd3642e9b2bb961723
> 307c57629b1ad37909a863a56965"
>   prefix_np = np.fromstring(prefix[0:64], dtype=np.uint32, count=16)
>   print("prefix_np: {}".format(prefix_np))
>
> Output :
>
> prefix_np: [ 943285604 1680946998 1700999522 1664443696  945906233  929194297 
> 1667523427  878917217  909391666  892940848 1684289634  842282547 845298021  
> 909730402  858928945 1664561203]
>
>
> Some idea how can I do this efficiently in GO ?
>

I guess this would depend on whether this is  a well-defined format; you
might have to port numpy's fromstring to Go? But it should be possible...
If you control the Python side, it might be easier to dump the data as JSON
and import into Go that way.

Is there a library equivalent to numpy in GO?
>

I'm not knowledgeable enough to say, but Go has gonum which has similar
goals to numpy and other data science toolkits:
https://github.com/gonum/gonum

>
>
>
> Thank you for your help
> G
> M
> T
> Détecter la langueAfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasque
> BengaliBiélorusseBirmanBosniaqueBulgareCatalanCebuanoChichewaChinois
> (Simp)Chinois (Trad)CingalaiCoréenCréole haïtienCroateDanoisEspagnol
> EspérantoEstonienFinnoisFrançaisGalicienGalloisGéorgienGoudjaratiGrec
> HaoussaHébreuHindiHmongHongroisIgboIndonésienIrlandaisIslandaisItalien
> JaponaisJavanaisKannadaKazakhKhmerLaotienLatinLettonLituanienMacédonien
> MalaisienMalayalamMalgacheMaltaisMaoriMarathiMongolNéerlandaisNépalais
> NorvégienOuzbekPanjabiPersanPolonaisPortugaisRoumainRusseSerbeSesotho
> SlovaqueSlovèneSomaliSoudanaisSuédoisSwahiliTadjikTagalogTamoulTchèque
> TeluguThaïTurcUkrainienUrduVietnamienYiddishYoroubaZoulou
> AfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasqueBengaliBiélorusse
> BirmanBosniaqueBulgareCatalanCebuanoChichewaChinois (Simp)Chinois (Trad)
> CingalaiCoréenCréole haïtienCroateDanoisEspagnolEspérantoEstonienFinnois
> FrançaisGalicienGalloisGéorgienGoudjaratiGrecHaoussaHébreuHindiHmong
> HongroisIgboIndonésienIrlandaisIslandaisItalienJaponaisJavanaisKannada
> KazakhKhmerLaotienLatinLettonLituanienMacédonienMalaisienMalayalamMalgache
> MaltaisMaoriMarathiMongolNéerlandaisNépalaisNorvégienOuzbekPanjabiPersan
> PolonaisPortugaisRoumainRusseSerbeSesothoSlovaqueSlovèneSomaliSoudanais
> SuédoisSwahiliTadjikTagalogTamoulTchèqueTeluguThaïTurcUkrainienUrdu
> VietnamienYiddishYoroubaZoulou
> Fonction Sound est limitée à 200 caractères
> Options : Historique : Commentaires : Donate
> 
> Fermer
>
> --
> 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.
>



-- 
Jonathan Yu / *@jawnsy* on LinkedIn ,
Twitter , GitHub ,
Facebook 
*“Ever tried. Ever failed. No matter. Try again. Fail again. Fail better.”* —
Samuel Beckett, Worstward Ho (1983)

“In an adaptive environment, winning comes from adapting to change by
continuously experimenting and identifying new options more quickly and
economically than others. The classical strategist's mantra of sustainable
competitive advantage becomes one of serial temporary advantage.” — Navigating
the Dozens of Different Strategy Options

 (HBR)

-- 
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] how to do numpy.fromstring in Go ?

2017-12-06 Thread Christian LeMoussel
I have to write a Python program that uses numpy in GO.
I have this Python code : 
  prefix = 
"de98671db1ce0e5c9ba89ab7ccdca6c427460295b8dd3642e9b2bb961723307c57629b1ad37909a863a56965"
  prefix_np = np.fromstring(prefix[0:64], dtype=np.uint32, count=16) 
  print("prefix_np: {}".format(prefix_np))

Output : 

prefix_np: [ 943285604 1680946998 1700999522 1664443696  945906233  929194297 
1667523427  878917217  909391666  892940848 1684289634  842282547 845298021  
909730402  858928945 1664561203]


Some idea how can I do this efficiently in GO ?
Is there a library equivalent to numpy in GO?


Thank you for your help
G
M
T
Détecter la langueAfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasque
BengaliBiélorusseBirmanBosniaqueBulgareCatalanCebuanoChichewaChinois 
(Simp)Chinois 
(Trad)CingalaiCoréenCréole haïtienCroateDanoisEspagnolEspérantoEstonien
FinnoisFrançaisGalicienGalloisGéorgienGoudjaratiGrecHaoussaHébreuHindiHmong
HongroisIgboIndonésienIrlandaisIslandaisItalienJaponaisJavanaisKannadaKazakh
KhmerLaotienLatinLettonLituanienMacédonienMalaisienMalayalamMalgacheMaltais
MaoriMarathiMongolNéerlandaisNépalaisNorvégienOuzbekPanjabiPersanPolonais
PortugaisRoumainRusseSerbeSesothoSlovaqueSlovèneSomaliSoudanaisSuédois
SwahiliTadjikTagalogTamoulTchèqueTeluguThaïTurcUkrainienUrduVietnamien
YiddishYoroubaZoulou 
AfrikaansAlbanaisAllemandAnglaisArabeArménienAzériBasqueBengaliBiélorusse
BirmanBosniaqueBulgareCatalanCebuanoChichewaChinois (Simp)Chinois (Trad)
CingalaiCoréenCréole haïtienCroateDanoisEspagnolEspérantoEstonienFinnois
FrançaisGalicienGalloisGéorgienGoudjaratiGrecHaoussaHébreuHindiHmongHongrois
IgboIndonésienIrlandaisIslandaisItalienJaponaisJavanaisKannadaKazakhKhmer
LaotienLatinLettonLituanienMacédonienMalaisienMalayalamMalgacheMaltaisMaori
MarathiMongolNéerlandaisNépalaisNorvégienOuzbekPanjabiPersanPolonais
PortugaisRoumainRusseSerbeSesothoSlovaqueSlovèneSomaliSoudanaisSuédois
SwahiliTadjikTagalogTamoulTchèqueTeluguThaïTurcUkrainienUrduVietnamien
YiddishYoroubaZoulou 
Fonction Sound est limitée à 200 caractères
Options 

 
: Historique 

 
: Commentaires 

 
: Donate 

 
Fermer

-- 
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] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Jesper Louis Andersen
The best point in time to switch languages are when one of the following
things is happening:

* There is a small experiment on the side of the larger system which can be
handled in another language.
* There is a large project which has failed internally in the business, it
is severely behind and nobody thinks it can be solved anyway.

The by far best situation is when the sky is falling. This is when you can
propose a solution to the problem rather than a language. The solution then
proves itself first and then the language decision follows as part of the
solution.

However, for your situation, analyze the requirements of the project first,
then make a real effort to analyze a Python solution against a Go solution.
If astrophysicists are likely to grab e.g., numpy to do their image
processing loop, it is a hard sell. OTOH, if you have to serve a serious
amount of image data then the concurrency of Go is a better choice and so
on. Quantify "how many images per minute", "how many concurrent requests",
"resource usage" and so on.

You could also look for a split solution: process the images in Python, but
serve them from Go?

To me, the two biggest weaknesses of Python in (industrial) production
settings are:

* Dynamic typing and no other program modularization leads to programs that
are really hard to maintain, especially as they grow. A small
machine-learning training script is easy enough to maintain as a
work-sheet, but I don't particularly like it for serving said
machine-learning model.
* Deployment often requires some hoop-jumping. Getting the right software
versions built on one machine and deployed on another is IMO living hell
for Python programs. My experience is that build pipelines for Python
systems often break in subtle ways. Go produces static binaries which are
much easier to handle (Other systems doing it right: Haskell, Erlang,
OCaml, Elixir, ...)


On Wed, Dec 6, 2017 at 2:34 PM Christophe Meessen <
christophe.mees...@gmail.com> wrote:

> Thanks far all the answers. Sebastien Binet is a colleague and he is
> indeed brilliant.
> pachyderm looks powerful, but also an overkill for my need. It might scare
> my colleagues away.
>
> Le 06/12/2017 à 12:34, Henrik Johansson a écrit :
>
> I have a vague memory of +Rob Pike  tweeting something
> about astronomy or perhaps an observatory a few months ago.
> Perhaps there was no programming involved but if so I imagine Go is safe
> bet.
>
> But building pipelines using something like Pachyderm would allow for a
> very polyglot "use the tool that fits in each part" approach.
>
>
> ons 6 dec. 2017 kl 11:43 skrev Volker Dobler :
>
>> I know about https://go-hep.org probably Sebastien can elaborate more
>> if and how it is used at CERN.
>>
>> V.
>>
>>
>> On Wednesday, 6 December 2017 10:56:01 UTC+1, Christophe Meessen wrote:
>>>
>>> Hello,
>>>
>>> I'm a computer scientist in charge of developing an image processing
>>> pipeline for telescope images.
>>> It will also have a web server and DB connection.
>>>
>>> The project is going through reviews by external experts, and the
>>> problem I'm facing is that my proposal to use Go is about to be rejected.
>>>
>>> The main opposing arguments are
>>> - everybody uses python in astrophysics
>>> - it is very easy to find someone who knows python
>>> - risk that I, sole Go programmer, might become unavailable
>>>
>>> I would have the same arguments if I was project leader and unfamiliar
>>> with Go.
>>>
>>> The counter arguments I found so far are that
>>> - Go is simpler and safer than Python
>>> - I learned Go in a week-end
>>>
>>> The problem is that they don't convince people who don't know Go, are
>>> not experienced software developers, and don't want to do the due
>>> diligence.
>>> It's the usual inertia to change.
>>>
>>> What other arguments could I use ?
>>>
>>> Do you know other significant scientific experiments that have adopted
>>> Go ?
>>>
>>>
>>>
>>> I have found this github project.
>>> https://github.com/indigo-astronomy/indigo
>>> INDI is a well known Python Observatory Control System.
>>> INDIGO is its translation into Go.
>>>
>>> I have also found SciPipe https://github.com/scipipe.
>>> It is a Go pipeline framework used in scientific applications.
>>>
>>>
>>> --
>> 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.
>>
> --
>
> 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/BH4tOlu6df8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
>
>
> For more options, visit 

Re: [go-nuts] Is the result right or not?

2017-12-06 Thread T L


On Wednesday, December 6, 2017 at 9:47:55 AM UTC-5, Jan Mercl wrote:
>
> On Wed, Dec 6, 2017 at 3:41 PM T L  
> wrote:
>
> > ok, I get it. But how about this:
>
> It would be helpful if you state where do you see the problem so others do 
> not have to guess.
>
> Anyway, the behavior is correct. The loop equals to
>
> // initially  {3, 5, 7}
> x[2] = x[0] // {3, 5, 3}
> x[2] = x[1] // {3, 5, 5}
> x[2] = x[2] // {3, 5, 5}
>
> -- 
>
> -j
>

yes, thanks for the explanation. 

-- 
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] Is the result right or not?

2017-12-06 Thread T L


On Wednesday, December 6, 2017 at 9:41:01 AM UTC-5, T L wrote:
>
> ok, I get it. But how about this:
>
> package main
>
> import "fmt"
>
> func main() {
>   i := 2
>   x := []int{3, 5, 7}
>   for _, x[i] = range x {
>   
>   }
>   fmt.Println(x) // [3 5 5]
> }
>
> I expect it is still [3 5 7]
>

Eh, looks [3 5 5] is right. :)
 

>
> On Wednesday, December 6, 2017 at 9:34:38 AM UTC-5, Ian Davis wrote:
>>
>> You can see your error if you initialise i to -1 before the loop: v[i] is 
>> evaluated before i is incremented.
>>
>>
>> On Wed, 6 Dec 2017, at 02:26 PM, T L wrote:
>>
>>
>> package main
>>
>> import "fmt"
>>
>> func main() {
>>   var i int
>>   var x = []int{3, 5, 7}
>>   var y = make([]int, 3)
>>   for i, y[i] = range x {
>>   fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
>>   }
>>   fmt.Println("y =", y)
>> }
>>
>> // output:
>> 0 : [3 0 0] , y[ 0 ] = 3
>> 1 : [5 0 0] , y[ 1 ] = 0
>> 2 : [5 7 0] , y[ 2 ] = 0
>> y = [5 7 0]
>>
>>
>> --
>> 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.


Re: [go-nuts] Is the result right or not?

2017-12-06 Thread Jan Mercl
On Wed, Dec 6, 2017 at 3:46 PM Jan Mercl <0xj...@gmail.com> wrote:

On Wed, Dec 6, 2017 at 3:41 PM T L  wrote:

> It would be helpful if you state where do you see the problem so others
do not have to guess.

My apologies, you _have_ stated where do you see the problem.

-- 

-j

-- 
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] Is the result right or not?

2017-12-06 Thread Jan Mercl
On Wed, Dec 6, 2017 at 3:41 PM T L  wrote:

> ok, I get it. But how about this:

It would be helpful if you state where do you see the problem so others do
not have to guess.

Anyway, the behavior is correct. The loop equals to

// initially  {3, 5, 7}
x[2] = x[0] // {3, 5, 3}
x[2] = x[1] // {3, 5, 5}
x[2] = x[2] // {3, 5, 5}

-- 

-j

-- 
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] Is the result right or not?

2017-12-06 Thread T L
ok, I get it. But how about this:

package main

import "fmt"

func main() {
  i := 2
  x := []int{3, 5, 7}
  for _, x[i] = range x {
  
  }
  fmt.Println(x) // [3 5 5]
}

I expect it is still [3 5 7]

On Wednesday, December 6, 2017 at 9:34:38 AM UTC-5, Ian Davis wrote:
>
> You can see your error if you initialise i to -1 before the loop: v[i] is 
> evaluated before i is incremented.
>
>
> On Wed, 6 Dec 2017, at 02:26 PM, T L wrote:
>
>
> package main
>
> import "fmt"
>
> func main() {
>   var i int
>   var x = []int{3, 5, 7}
>   var y = make([]int, 3)
>   for i, y[i] = range x {
>   fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
>   }
>   fmt.Println("y =", y)
> }
>
> // output:
> 0 : [3 0 0] , y[ 0 ] = 3
> 1 : [5 0 0] , y[ 1 ] = 0
> 2 : [5 7 0] , y[ 2 ] = 0
> y = [5 7 0]
>
>
> --
> 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.


Re: [go-nuts] Is the result right or not?

2017-12-06 Thread Ian Davis
You can see your error if you initialise i to -1 before the loop: v[i]
is evaluated before i is incremented.

On Wed, 6 Dec 2017, at 02:26 PM, T L wrote:
> 
> package main
> 
> import "fmt"
> 
> func main() {
>   var i int
>   var x = []int{3, 5, 7}
>   var y = make([]int, 3)
>   for i, y[i] = range x {
>   fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
>   }
>   fmt.Println("y =", y)
> }
> 
> // output:
> 0 : [3 0 0] , y[ 0 ] = 3
> 1 : [5 0 0] , y[ 1 ] = 0
> 2 : [5 7 0] , y[ 2 ] = 0
> y = [5 7 0]
> 


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

-- 
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] Re: Is the result right or not?

2017-12-06 Thread Gianguido Sorà
What are you trying to achieve with this code? What do you want it to do?

Il 06 dic 2017 15:30, "T L"  ha scritto:

> And this:
>
> package main
>
> import "fmt"
>
> func main() {
>   var i int
>   var x = []int{3, 5, 7}
>   //var y = make([]int, 3)
>   for i, x[i] = range x {
>   }
>   fmt.Println("x =", x) // x = [5 7 7]
> }
>
> On Wednesday, December 6, 2017 at 9:26:33 AM UTC-5, T L wrote:
>>
>>
>> package main
>>
>> import "fmt"
>>
>> func main() {
>>   var i int
>>   var x = []int{3, 5, 7}
>>   var y = make([]int, 3)
>>   for i, y[i] = range x {
>>   fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
>>   }
>>   fmt.Println("y =", y)
>> }
>>
>> // output:
>> 0 : [3 0 0] , y[ 0 ] = 3
>> 1 : [5 0 0] , y[ 1 ] = 0
>> 2 : [5 7 0] , y[ 2 ] = 0
>> y = [5 7 0]
>>
> --
> 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.
>

-- 
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: Is the result right or not?

2017-12-06 Thread T L
And this:

package main

import "fmt"

func main() {
  var i int
  var x = []int{3, 5, 7}
  //var y = make([]int, 3)
  for i, x[i] = range x {
  }
  fmt.Println("x =", x) // x = [5 7 7]
}

On Wednesday, December 6, 2017 at 9:26:33 AM UTC-5, T L wrote:
>
>
> package main
>
> import "fmt"
>
> func main() {
>   var i int
>   var x = []int{3, 5, 7}
>   var y = make([]int, 3)
>   for i, y[i] = range x {
>   fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
>   }
>   fmt.Println("y =", y)
> }
>
> // output:
> 0 : [3 0 0] , y[ 0 ] = 3
> 1 : [5 0 0] , y[ 1 ] = 0
> 2 : [5 7 0] , y[ 2 ] = 0
> y = [5 7 0]
>

-- 
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] Is the result right or not?

2017-12-06 Thread T L

package main

import "fmt"

func main() {
  var i int
  var x = []int{3, 5, 7}
  var y = make([]int, 3)
  for i, y[i] = range x {
  fmt.Println(i, ":", y, ", y[", i, "] =", y[i])
  }
  fmt.Println("y =", y)
}

// output:
0 : [3 0 0] , y[ 0 ] = 3
1 : [5 0 0] , y[ 1 ] = 0
2 : [5 7 0] , y[ 2 ] = 0
y = [5 7 0]

-- 
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] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen
Thanks far all the answers. Sebastien Binet is a colleague and he is 
indeed brilliant.


pachyderm looks powerful, but also an overkill for my need. It might 
scare my colleagues away.


Le 06/12/2017 à 12:34, Henrik Johansson a écrit :
I have a vague memory of +Rob Pike  tweeting 
something about astronomy or perhaps an observatory a few months ago.
Perhaps there was no programming involved but if so I imagine Go is 
safe bet.


But building pipelines using something like Pachyderm would allow for 
a very polyglot "use the tool that fits in each part" approach.



ons 6 dec. 2017 kl 11:43 skrev Volker Dobler 
>:


I know about https://go-hep.org probably Sebastien can elaborate more
if and how it is used at CERN.

V.


On Wednesday, 6 December 2017 10:56:01 UTC+1, Christophe Meessen
wrote:

Hello,

I'm a computer scientist in charge of developing an image
processing pipeline for telescope images.
It will also have a web server and DB connection.

The project is going through reviews by external experts, and
the problem I'm facing is that my proposal to use Go is about
to be rejected.

The main opposing arguments are
- everybody uses python in astrophysics
- it is very easy to find someone who knows python
- risk that I, sole Go programmer, might become unavailable

I would have the same arguments if I was project leader and
unfamiliar with Go.

The counter arguments I found so far are that
- Go is simpler and safer than Python
- I learned Go in a week-end

The problem is that they don't convince people who don't know
Go, are not experienced software developers, and don't want to
do the due diligence.
It's the usual inertia to change.

What other arguments could I use ?

Do you know other significant scientific experiments that have
adopted Go ?



I have found this github project.
https://github.com/indigo-astronomy/indigo
INDI is a well known Python Observatory Control System.
INDIGO is its translation into Go.

I have also found SciPipe https://github.com/scipipe.
It is a Go pipeline framework used in scientific applications.


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

--
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/BH4tOlu6df8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
golang-nuts+unsubscr...@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.


Re: [go-nuts] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Robin Bartholdson
Well, the top 1 argument is that go is the language of the future ;) 
https://erikbern.com/2017/03/15/the-eigenvector-of-why-we-moved-from-language-x-to-language-y.html
 


Some reason-to-believes that go is a good fit for data science and your use 
case:

• There is a mature and well-maintained scientific computation library: 
https://github.com/gonum/gonum  
• Data pipeline processing infrastructure is really coming of age. Some 
examples include: Apache Beam (https://github.com/apache/beam/pull/4200 
), Pachyderm 
(https://github.com/pachyderm/pachyderm 
), Fission Workflows 
(https://github.com/fission/fission-workflows/ 
) (the two latter projects are 
based on Kubernetes which happens to be written in — go).
• Other people do serious physics in go: https://go-hep.org/ 
. (Sebastien Binet can most likely tell you more :)

Also, with the C bindings it’s perfectly possible to utilise all the Fortran 
and C libs that you don’t have time to rewrite right now.

Join #data-science on the gophers slack if you want to continue the discussion.

-Robin

> On 6 Dec 2017, at 10:56, Christophe Meessen  
> wrote:
> 
> Hello, 
> 
> I'm a computer scientist in charge of developing an image processing pipeline 
> for telescope images. 
> It will also have a web server and DB connection.
> 
> The project is going through reviews by external experts, and the problem I'm 
> facing is that my proposal to use Go is about to be rejected. 
> 
> The main opposing arguments are 
> - everybody uses python in astrophysics
> - it is very easy to find someone who knows python
> - risk that I, sole Go programmer, might become unavailable
> 
> I would have the same arguments if I was project leader and unfamiliar with 
> Go. 
> 
> The counter arguments I found so far are that
> - Go is simpler and safer than Python
> - I learned Go in a week-end
> 
> The problem is that they don't convince people who don't know Go, are not 
> experienced software developers, and don't want to do the due diligence. 
> It's the usual inertia to change.  
> 
> What other arguments could I use ?
> 
> Do you know other significant scientific experiments that have adopted Go ? 
> 
> 
> 
> I have found this github project. https://github.com/indigo-astronomy/indigo
> INDI is a well known Python Observatory Control System. 
> INDIGO is its translation into Go. 
> 
> I have also found SciPipe https://github.com/scipipe.
> It is a Go pipeline framework used in scientific applications. 
> 
> 
> 
> -- 
> 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 
> .

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Sebastien Binet
On Wed, Dec 6, 2017 at 2:15 PM, Sebastien Binet  wrote:

> Christophe,
>
> On Wed, Dec 6, 2017 at 10:56 AM, Christophe Meessen <
> christophe.mees...@gmail.com> wrote:
>
>> Hello,
>>
>> I'm a computer scientist in charge of developing an image processing
>> pipeline for telescope images.
>> It will also have a web server and DB connection.
>>
>> The project is going through reviews by external experts, and the problem
>> I'm facing is that my proposal to use Go is about to be rejected.
>>
>> The main opposing arguments are
>> - everybody uses python in astrophysics
>> - it is very easy to find someone who knows python
>> - risk that I, sole Go programmer, might become unavailable
>>
>> I would have the same arguments if I was project leader and unfamiliar
>> with Go.
>>
>> The counter arguments I found so far are that
>> - Go is simpler and safer than Python
>> - I learned Go in a week-end
>>
>> The problem is that they don't convince people who don't know Go, are not
>> experienced software developers, and don't want to do the due diligence.
>> It's the usual inertia to change.
>>
>> What other arguments could I use ?
>>
>> Do you know other significant scientific experiments that have adopted Go
>> ?
>>
>
> in physics, I know 3 experiments that have parts of their software written
> in Go:
> - SoLiD (they wrote their data acquisition system in Go, as well as some
> environmental sensors monitoring (on raspi3)).
>  The DAQ code isn't public but there is an IEEE presentation about it
> (Nick Ryder)
>  The monitoring code is there: https://github.com/sbin
> et-solid/solid-mon-rpi
>
> - LSST: one of the subcomponents testing system has been written in Go
> (slow control):
>  https://github.com/go-lsst/fcs-lpc-motor-ctl
>
> - EIC: there is some R code for the Electron-Ion collider that is being
> written in Go (and can generate code for C++, Python and Java)
>  https://github.com/decibelCooper/eicio
>

ah! and I almost forgot about CMS@LHC: they're in the middle of rewritting
their data placement + data transfer system from PERL to Go.
https://github.com/vkuznet/transfer2go
https://github.com/vkuznet/transfer2go/blob/master/docs/Transfer2go_RD_201709.pdf
https://github.com/vkuznet/dbs2go

it seems Valentin is also playing with TensorFlow and Go for CMS:
https://github.com/vkuznet/TFaaS

-s

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Sebastien Binet
Christophe,

On Wed, Dec 6, 2017 at 10:56 AM, Christophe Meessen <
christophe.mees...@gmail.com> wrote:

> Hello,
>
> I'm a computer scientist in charge of developing an image processing
> pipeline for telescope images.
> It will also have a web server and DB connection.
>
> The project is going through reviews by external experts, and the problem
> I'm facing is that my proposal to use Go is about to be rejected.
>
> The main opposing arguments are
> - everybody uses python in astrophysics
> - it is very easy to find someone who knows python
> - risk that I, sole Go programmer, might become unavailable
>
> I would have the same arguments if I was project leader and unfamiliar
> with Go.
>
> The counter arguments I found so far are that
> - Go is simpler and safer than Python
> - I learned Go in a week-end
>
> The problem is that they don't convince people who don't know Go, are not
> experienced software developers, and don't want to do the due diligence.
> It's the usual inertia to change.
>
> What other arguments could I use ?
>
> Do you know other significant scientific experiments that have adopted Go
> ?
>

in physics, I know 3 experiments that have parts of their software written
in Go:
- SoLiD (they wrote their data acquisition system in Go, as well as some
environmental sensors monitoring (on raspi3)).
 The DAQ code isn't public but there is an IEEE presentation about it (Nick
Ryder)
 The monitoring code is there: https://github.com/sbinet-solid/solid-mon-rpi

- LSST: one of the subcomponents testing system has been written in Go
(slow control):
 https://github.com/go-lsst/fcs-lpc-motor-ctl

- EIC: there is some R code for the Electron-Ion collider that is being
written in Go (and can generate code for C++, Python and Java)
 https://github.com/decibelCooper/eicio

In my lab, there is also a team working with transfering HEP technologies
to the medical environment, that is using Go for their DAQ+monitoring.
(and babysteps for the analysis too)
There's an IEEE publication that has just been accepted (Busato et al.),
not sure it's public yet.
An early version of the code is there: https://github.com/
ebusato/analysis-go

You may also want to talk to Fabio Hernandez (from LSST/CC-IN2P3) about his
experience with Go.
He may have some interesting "reviewers worthy" insights.

There are also a few interesting research papers about Go:
 https://github.com/golang/go/wiki/ResearchPapers

many are CS oriented, but a few Gonum friends have also a few papers
*using* Go:
 - http://arc.aiaa.org/doi/abs/10.2514/6.2015-1287
 - https://arxiv.org/abs/1706.02419

you also probably know about my work:
 https://go-hep.org
 https://github.com/astrogo

but there is also a great library for biology (some of the "students" I had
2 weeks ago at a Go tutorial in Marseille, knew about it):
 - https://github.com/biogo/biogo
 - http://dx.doi.org/10.21105/joss.00167
 - http://biorxiv.org/content/early/2014/05/12/005033

You could also perhaps mention SpaceX (which is -apparently- using Go for
its rocket monitoring system.)

and I am in the middle of writing an aXiv preprint wrt why I think HEP
should migrate en masse to Go.
it's only in my head right now, but the seeds for that article are
contained in my ACAT-2017 presentation:
 -
http://talks.godoc.org/github.com/go-hep/talks/2017/2017-08-24-go-hep-acat/talk.slide
and the (not yet approved) accompanying paper:
- https://github.com/go-hep/talks/tree/master/2017/2017-08-24-go-hep-acat

finally, here is what I got with a Master-1 Physics student who knew a bit
of Python (and had no previous exposure to Go), in a 3 months internship:
- https://github.com/lsst-lpc/hubble-fit
a little cosmo analysis replicating results from a previous python-based
analysis involving reading a few FITS files containing a few 2220x2220
matrices that are inverted and such, and then a minimization is applied to
extract Hubble-related parameters.
it was nice to see the student learning Go in a few weeks and producing a
version that was OK, w/o much help from my end.
the final version is faster than the python (with numpy and C++ under the
hood) one, in single-threaded mode.
and ~2 faster with 2 cores.

ok, I don't know whether this is significant enough.

>From a "close to the ground" angle, typical arguments for a Go .vs. Python
are:
- static type system so: refactoring is less brittle, smaller amount of
errors discovered at runtime, better runtime performances
- even if the language is compiled and statically typed, the development
speed isn't hindered too much thanks to the type inference system and the
fast compiler (so edit-compile-run dev cycles are *comparable* to python)
- concurrency programming. no need for the "multiprocessing" and
"threading" python modules. concurrency is builtin and the language was
designed with it from the start.
- the language is simpler than python (I always show the "for i in
range(x): print(i)" snippet which involves knowing about exceptions,
coroutines and special 

[go-nuts] Re: go build issue with 1.9 version

2017-12-06 Thread desaiabhijit
it's sorted.. freshly installed

On Wednesday, December 6, 2017 at 4:57:21 PM UTC+4, Abhijit Desai wrote:
>
> getting below issue while building on Mac.. please help
>
>
>
> go build myapp.go
> /usr/local/go/src/crypto/tls/cipher_suites.go:18:2: cannot find package 
> "golang_org/x/crypto/chacha20poly1305" in any of:
> /usr/local/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOPATH)
> /usr/local/go/src/crypto/tls/key_agreement.go:20:2: cannot find package 
> "golang_org/x/crypto/curve25519" in any of:
> /usr/local/go/src/golang_org/x/crypto/curve25519 (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/crypto/curve25519 (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:46:2: cannot find package 
> "golang_org/x/net/http2/hpack" in any of:
> /usr/local/go/src/golang_org/x/net/http2/hpack (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/http2/hpack (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:47:2: cannot find package 
> "golang_org/x/net/idna" in any of:
> /usr/local/go/src/golang_org/x/net/idna (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/idna (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:48:2: cannot find package 
> "golang_org/x/net/lex/httplex" in any of:
> /usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/lex/httplex (from $GOPATH)
> /usr/local/go/src/net/http/transport.go:32:2: cannot find package 
> "golang_org/x/net/proxy" in any of:
> /usr/local/go/src/golang_org/x/net/proxy (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/proxy (from $GOPATH)
> /usr/local/go/src/net/interface_bsd.go:12:2: cannot find package 
> "golang_org/x/net/route" in any of:
> /usr/local/go/src/golang_org/x/net/route (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/route (from $GOPATH)
> import cycle not allowed
> package archive/zip
> imports bufio
> imports bytes
> imports errors
> imports runtime
> imports runtime/internal/atomic
> imports runtime
>

-- 
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: go build issue with 1.9 version

2017-12-06 Thread desaiabhijit
I can see it's under 

/usr/local/go/src*/vendor/*golang_org/x/crypto/chacha20poly1305 (from 
$GOROOT)

but how to resolve it

Thanks,


On Wednesday, December 6, 2017 at 4:57:21 PM UTC+4, Abhijit Desai wrote:
>
> getting below issue while building on Mac.. please help
>
>
>
> go build myapp.go
> /usr/local/go/src/crypto/tls/cipher_suites.go:18:2: cannot find package 
> "golang_org/x/crypto/chacha20poly1305" in any of:
> /usr/local/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOPATH)
> /usr/local/go/src/crypto/tls/key_agreement.go:20:2: cannot find package 
> "golang_org/x/crypto/curve25519" in any of:
> /usr/local/go/src/golang_org/x/crypto/curve25519 (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/crypto/curve25519 (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:46:2: cannot find package 
> "golang_org/x/net/http2/hpack" in any of:
> /usr/local/go/src/golang_org/x/net/http2/hpack (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/http2/hpack (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:47:2: cannot find package 
> "golang_org/x/net/idna" in any of:
> /usr/local/go/src/golang_org/x/net/idna (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/idna (from $GOPATH)
> /usr/local/go/src/net/http/h2_bundle.go:48:2: cannot find package 
> "golang_org/x/net/lex/httplex" in any of:
> /usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/lex/httplex (from $GOPATH)
> /usr/local/go/src/net/http/transport.go:32:2: cannot find package 
> "golang_org/x/net/proxy" in any of:
> /usr/local/go/src/golang_org/x/net/proxy (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/proxy (from $GOPATH)
> /usr/local/go/src/net/interface_bsd.go:12:2: cannot find package 
> "golang_org/x/net/route" in any of:
> /usr/local/go/src/golang_org/x/net/route (from $GOROOT)
> /Users/xyz/go/src/golang_org/x/net/route (from $GOPATH)
> import cycle not allowed
> package archive/zip
> imports bufio
> imports bytes
> imports errors
> imports runtime
> imports runtime/internal/atomic
> imports runtime
>

-- 
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] nerf

2017-12-06 Thread Ged Wed
google are replacing coreboot and crappy intel esxi and the extra Intel IME 
/ AMD PSP
SO quick boot up and full control.


this is huge and its using golang !

Its called NERF


https://www.coreboot.org/images/6/66/Denver_2017_coreboot_u-root.pdf
- Everything described here

https://www.youtube.com/watch?time_continue=1=iffTJ1vPCSo
- video too.


code:
- https://github.com/u-root/u-root
they recommend https://www.pcengines.ch/apu2.htm

-- 
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] go build issue with 1.9 version

2017-12-06 Thread desaiabhijit
getting below issue while building on Mac.. please help



go build myapp.go
/usr/local/go/src/crypto/tls/cipher_suites.go:18:2: cannot find package 
"golang_org/x/crypto/chacha20poly1305" in any of:
/usr/local/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOROOT)
/Users/xyz/go/src/golang_org/x/crypto/chacha20poly1305 (from $GOPATH)
/usr/local/go/src/crypto/tls/key_agreement.go:20:2: cannot find package 
"golang_org/x/crypto/curve25519" in any of:
/usr/local/go/src/golang_org/x/crypto/curve25519 (from $GOROOT)
/Users/xyz/go/src/golang_org/x/crypto/curve25519 (from $GOPATH)
/usr/local/go/src/net/http/h2_bundle.go:46:2: cannot find package 
"golang_org/x/net/http2/hpack" in any of:
/usr/local/go/src/golang_org/x/net/http2/hpack (from $GOROOT)
/Users/xyz/go/src/golang_org/x/net/http2/hpack (from $GOPATH)
/usr/local/go/src/net/http/h2_bundle.go:47:2: cannot find package 
"golang_org/x/net/idna" in any of:
/usr/local/go/src/golang_org/x/net/idna (from $GOROOT)
/Users/xyz/go/src/golang_org/x/net/idna (from $GOPATH)
/usr/local/go/src/net/http/h2_bundle.go:48:2: cannot find package 
"golang_org/x/net/lex/httplex" in any of:
/usr/local/go/src/golang_org/x/net/lex/httplex (from $GOROOT)
/Users/xyz/go/src/golang_org/x/net/lex/httplex (from $GOPATH)
/usr/local/go/src/net/http/transport.go:32:2: cannot find package 
"golang_org/x/net/proxy" in any of:
/usr/local/go/src/golang_org/x/net/proxy (from $GOROOT)
/Users/xyz/go/src/golang_org/x/net/proxy (from $GOPATH)
/usr/local/go/src/net/interface_bsd.go:12:2: cannot find package 
"golang_org/x/net/route" in any of:
/usr/local/go/src/golang_org/x/net/route (from $GOROOT)
/Users/xyz/go/src/golang_org/x/net/route (from $GOPATH)
import cycle not allowed
package archive/zip
imports bufio
imports bytes
imports errors
imports runtime
imports runtime/internal/atomic
imports runtime

-- 
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] Re: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Henrik Johansson
I have a vague memory of +Rob Pike  tweeting something about
astronomy or perhaps an observatory a few months ago.
Perhaps there was no programming involved but if so I imagine Go is safe
bet.

But building pipelines using something like Pachyderm would allow for a
very polyglot "use the tool that fits in each part" approach.


ons 6 dec. 2017 kl 11:43 skrev Volker Dobler :

> I know about https://go-hep.org probably Sebastien can elaborate more
> if and how it is used at CERN.
>
> V.
>
>
> On Wednesday, 6 December 2017 10:56:01 UTC+1, Christophe Meessen wrote:
>>
>> Hello,
>>
>> I'm a computer scientist in charge of developing an image processing
>> pipeline for telescope images.
>> It will also have a web server and DB connection.
>>
>> The project is going through reviews by external experts, and the problem
>> I'm facing is that my proposal to use Go is about to be rejected.
>>
>> The main opposing arguments are
>> - everybody uses python in astrophysics
>> - it is very easy to find someone who knows python
>> - risk that I, sole Go programmer, might become unavailable
>>
>> I would have the same arguments if I was project leader and unfamiliar
>> with Go.
>>
>> The counter arguments I found so far are that
>> - Go is simpler and safer than Python
>> - I learned Go in a week-end
>>
>> The problem is that they don't convince people who don't know Go, are not
>> experienced software developers, and don't want to do the due diligence.
>> It's the usual inertia to change.
>>
>> What other arguments could I use ?
>>
>> Do you know other significant scientific experiments that have adopted Go
>> ?
>>
>>
>>
>> I have found this github project.
>> https://github.com/indigo-astronomy/indigo
>> INDI is a well known Python Observatory Control System.
>> INDIGO is its translation into Go.
>>
>> I have also found SciPipe https://github.com/scipipe.
>> It is a Go pipeline framework used in scientific applications.
>>
>>
>> --
> 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.
>

-- 
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] why fmt "%#v" and "%#q" of string value have different result

2017-12-06 Thread Jan Mercl
On Wed, Dec 6, 2017 at 11:36 AM Ally Dale  wrote:

> I was confused that why fmt "%#v" and "%#q" of string value have
different result.

See: https://golang.org/pkg/fmt/#hdr-Printing



The default format for %v is:

bool:%t
int, int8 etc.:  %d
uint, uint8 etc.:%d, %#x if printed with %#v
float32, complex64, etc: %g
string:  %s
chan:%p
pointer: %p




-- 

-j

-- 
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: [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Volker Dobler
I know about https://go-hep.org probably Sebastien can elaborate more
if and how it is used at CERN.

V.

On Wednesday, 6 December 2017 10:56:01 UTC+1, Christophe Meessen wrote:
>
> Hello, 
>
> I'm a computer scientist in charge of developing an image processing 
> pipeline for telescope images. 
> It will also have a web server and DB connection.
>
> The project is going through reviews by external experts, and the problem 
> I'm facing is that my proposal to use Go is about to be rejected. 
>
> The main opposing arguments are 
> - everybody uses python in astrophysics
> - it is very easy to find someone who knows python
> - risk that I, sole Go programmer, might become unavailable
>
> I would have the same arguments if I was project leader and unfamiliar 
> with Go. 
>
> The counter arguments I found so far are that
> - Go is simpler and safer than Python
> - I learned Go in a week-end
>
> The problem is that they don't convince people who don't know Go, are not 
> experienced software developers, and don't want to do the due diligence. 
> It's the usual inertia to change.  
>
> What other arguments could I use ?
>
> Do you know other significant scientific experiments that have adopted Go 
> ? 
>
>
>
> I have found this github project. 
> https://github.com/indigo-astronomy/indigo
> INDI is a well known Python Observatory Control System. 
> INDIGO is its translation into Go. 
>
> I have also found SciPipe https://github.com/scipipe.
> It is a Go pipeline framework used in scientific applications. 
>
>
>

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Peter Mogensen


On 2017-12-06 10:56, Christophe Meessen wrote:
> The main opposing arguments are
> - everybody uses python in astrophysics
> - it is very easy to find someone who knows python
> - risk that I, sole Go programmer, might become unavailable

And those are important arguments - especially if the "everybody uses"
includes that there's important libraries only available for python.

Though not for scientific experiments, I've find the best argument for
Go over Python is better concurrency with lesser memory footprint.
I have a python HTTP server where a single request can make a worker
process size increase from 65Mb to 4.3Gb and the only way to make the OS
reclaim that memory from the worker is to kill it off and spawn a new.
That's the kind of moments you think "If only this was written in Go".

But that might be totally irrelevant for a science application. Usually
"if it ain't broken, don't fix it", applies.

/Peter

-- 
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] why fmt "%#v" and "%#q" of string value have different result

2017-12-06 Thread Ally Dale
Hi,
I was confused that why fmt "%#v" and "%#q" of string value have different 
result.

 fmt.Printf("%#q\n", `%#q: "c:\x\y\z"`)
 fmt.Printf("%#v\n", `%#v: "c:\x\y\z"`)
 fmt.Printf("%#q\n", "%#q cannot sharp because has [``] ")
 fmt.Printf("%#v\n", "%#v cannot sharp because has [``] ")
 // `%#q: "c:\x\y\z"`
 // "%#v: \"c:\\x\\y\\z\""
 // "%#q cannot sharp because has [``] "
 // "%#v cannot sharp because has [``] "

The Go syntax style fmt "%#v" do not use raw string literals style.
Which makes the string field prints not easy to read.
eg filepath: "%#v: \"c:\\x\\y\\z\"" 

Ally

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread 'Axel Wagner' via golang-nuts
Not to be a buzzkill, but… Maybe not having good arguments for using Go in
this case should be taken as a signal that Go isn't a good fit? As much as
I think Go would be useful for scientific applications, if we want to see
that happens, we should work on making Go better for them, not on making up
arguments for why it already is.

That being said, this seems like a classical "$boss don't want to bet
$project on $technology, how do I convince them?" question. First step:
Accept that $boss is reasonable to not put new (to them) technology in the
business-critical path. All of the arguments you mentioned seem 100%
convincing to me - even *though* I know Go much better than Python. If I'd
start an astrophysics project today, I'd probably use Python for the
sciency-computational parts, not Go. But you could try to find non-critical
applications where Go already *is* a good fit, to prove its worth and
increase your peers exposure to the language. Or you could propose to use
Go in pieces of the puzzle, where it works very well. So, e.g. Python is
great to code the computations and everything, but Go would be better
suited to write the server and interface with the DB.

On Wed, Dec 6, 2017 at 11:08 AM, Tamás Gulácsi  wrote:

> Python is terrible to maintain (lack of static typing or even compile-time
> argument count (!) check).
>
> Write down the interfaces between the pipeline steps and nodes, making
> each module replaceable.
>
> --
> 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.
>

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Tamás Gulácsi
Python is terrible to maintain (lack of static typing or even compile-time 
argument count (!) check).

Write down the interfaces between the pipeline steps and nodes, making each 
module replaceable.

-- 
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] [urgent] need aguments to justify use of Go for a scientific application

2017-12-06 Thread Christophe Meessen
Hello, 

I'm a computer scientist in charge of developing an image processing 
pipeline for telescope images. 
It will also have a web server and DB connection.

The project is going through reviews by external experts, and the problem 
I'm facing is that my proposal to use Go is about to be rejected. 

The main opposing arguments are 
- everybody uses python in astrophysics
- it is very easy to find someone who knows python
- risk that I, sole Go programmer, might become unavailable

I would have the same arguments if I was project leader and unfamiliar with 
Go. 

The counter arguments I found so far are that
- Go is simpler and safer than Python
- I learned Go in a week-end

The problem is that they don't convince people who don't know Go, are not 
experienced software developers, and don't want to do the due diligence. 
It's the usual inertia to change.  

What other arguments could I use ?

Do you know other significant scientific experiments that have adopted Go ? 



I have found this github project. https://github.com/indigo-astronomy/indigo
INDI is a well known Python Observatory Control System. 
INDIGO is its translation into Go. 

I have also found SciPipe https://github.com/scipipe.
It is a Go pipeline framework used in scientific applications. 


-- 
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: Golang binary on Mac OS error “operation not permitted”

2017-12-06 Thread Silvan Jegen


On Wednesday, December 6, 2017 at 4:52:11 AM UTC+1, Srinivas Gowda wrote:
>
> I'm trying to ship a golang binary inside a mac app. It is ideally just a 
> http server with some basic functions on folders and files.
>
> The binary seems to work just fine when I run it from a terminal but when 
> I try calling it from my mac app programmatically it gives an error 
> "operation not permitted" and quits.
>

 To me that sounds like your Go binary is trying to write somewhere where
it does not have write access. You should check that your go binary
does not assume that it's running in a directory where it can write
because if after the install it's in the Application folders it won't
have write access.


> Even after code-signing with a valid identity file I get the same error.
>
> go build -ldflags -s .
> codesign -s "Developer ID Application: *** *tesco" binaryFile
>
> My Golang ENV:
>
> GOARCH="amd64"
> GOBIN=""
> GOEXE=""
> GOHOSTARCH="amd64"GOHOSTOS="darwin"
> GOOS="darwin"
> GOPATH="/Users/srinivas/go"
> GORACE=""
> GOROOT="/usr/local/go"
> GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
> GCCGO="gccgo"
> CC="clang"
> GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments 
> -fmessage-length=0 -fdebug-prefix-map=/var/folders/3n/vpg5bnks45n75n
> d91qh7sy3cgn/T/go-build925744934=/tmp/go-build 
> -gno-record-gcc-switches -fno-common"
> CXX="clang++"
> CGO_ENABLED="1"
> PKG_CONFIG="pkg-config"
> CGO_CFLAGS="-g -O2"
> CGO_CPPFLAGS=""
> CGO_CXXFLAGS="-g -O2"
> CGO_FFLAGS="-g -O2"
> CGO_LDFLAGS="-g -O2"
>

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