Re: [go-nuts] Assigning +Inf to a float32 ..

2016-09-10 Thread Dave Cheney
https://play.golang.org/p/RthMnILvkP func main() { inf := float32(math.Inf(+1)) fmt.Println(inf) } On Sunday, 11 September 2016 15:58:04 UTC+10, bradfitz wrote: > > Not beautiful, but... > > https://play.golang.org/p/WWEEJN8LcF > > func main() { > i32 := math.Float32frombits(0x7F80) > fmt.Pri

Re: [go-nuts] Assigning +Inf to a float32 ..

2016-09-10 Thread Brad Fitzpatrick
Not beautiful, but... https://play.golang.org/p/WWEEJN8LcF func main() { i32 := math.Float32frombits(0x7F80) fmt.Printf("%T = %v", i32, i32) } // float32 = +Inf On Sat, Sep 10, 2016 at 6:55 PM, wrote: > ok I want to assign +Inf as a float32. > > Currently I work around like this : > > p

[go-nuts] Assigning +Inf to a float32 ..

2016-09-10 Thread xiiophen
ok I want to assign +Inf as a float32. Currently I work around like this : package main import ( "fmt" ) func main() { var a,b,c float32 a=1 b=0 //c=float32(1.0)/float32(0.0) //can't do it //c=+Inf //doesn't work - not a keyword c=a/b //kludge fmt.Println (a,b,c) } Couldn't find a way to do t

Re: [go-nuts] Nil interface/pointer

2016-09-10 Thread Dan Kortschak
On Sun, 2016-09-11 at 03:02 +1000, Kiki Sugiaman wrote: > If I know every possible type (that implements the interface), I can > do > a type switch. But if I don't, there's no way to do this then? reflect will help here: https://play.golang.org/p/h76XV_eTJx -- You received this message because

Re: [go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-09-10 Thread Dan Kortschak
On Sat, 2016-09-10 at 10:21 -0700, 'Isaac Gouy' via golang-nuts wrote: > No one seems to have needed to discuss what was meant by library, like > sascha they seem to think they understood what was expected. Prior to your earlier post, I thought I did too, but after that many libraries I have used

Re: [go-nuts] Re: time.Weekday v time.Month

2016-09-10 Thread 'Axel Wagner' via golang-nuts
Also, time.Weekday should really be used with the symbolic constants, instead of just writing integer constants. So it doubly doesn't matter :) On Sat, Sep 10, 2016 at 7:34 PM, wrote: > > > On Saturday, September 10, 2016 at 4:12:23 AM UTC-7, Sridhar wrote: >> >> Is there any particular reason t

[go-nuts] Re: Can't understand untyped constant behavior

2016-09-10 Thread Manlio Perillo
Il giorno giovedì 8 settembre 2016 17:31:55 UTC+2, Uvelichitel ha scritto: > > package main > > import "fmt" > > func main() { > const x, y = 5, 3 > var f float32 = x / y > fmt.Println(f) > } > > output > 1 > https://play.golang.org/p/FH1f793gW

Re: [go-nuts] support for mips32

2016-09-10 Thread ffred
Le samedi 10 septembre 2016 11:16:37 UTC+2, Dave Cheney a écrit : > > A mips32 port is in the works, > https://groups.google.com/forum/#!topic/golang-dev/GDtW0vCretE > > wow, great news ! thanks.. fred -- You received this message because you are subscribed to the Google Groups "golang-nuts

[go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-09-10 Thread Torsten Bronger
Hallöchen! 'Isaac Gouy' via golang-nuts writes: > [...] > > From a sociological perspective: > > mid-May, contributors of k-nucleotide programs that used a custom > written-for-k-nucleotide hash table were notified that those > programs would no longer be shown, but programs that used a > built-i

[go-nuts] Re: time.Weekday v time.Month

2016-09-10 Thread golang
On Saturday, September 10, 2016 at 4:12:23 AM UTC-7, Sridhar wrote: > > Is there any particular reason time.Weekday starts at 0 and time.Month > starts at 1 ? > > I may be missing something - to be consistent can't both these can have > the same start index ? > They could. Humans usually sta

Re: [go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-09-10 Thread 'Isaac Gouy' via golang-nuts
On Friday, September 9, 2016 at 6:25:38 PM UTC-7, kortschak wrote: > > Can you explain the rationale behind the classification of libraries as > libraries or not libraries? It seems pretty arbitrary. > > (I'm interested from a sociological perspective, but not enough to > bother to go to the b

[go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-09-10 Thread Torsten Bronger
Hallöchen! RogerV writes: > I replaced C with C++ (mind you not C/C++) and then the curve > takes a dramatic upward spike in year 2016 (I'd say it was getting > going well in 2015). I think all the very recent changes in this statistics are due to a new (set of) repos that were added to the corp

Re: [go-nuts] Nil interface/pointer

2016-09-10 Thread Kiki Sugiaman
Thanks, Jan. If I know every possible type (that implements the interface), I can do a type switch. But if I don't, there's no way to do this then? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receivi

[go-nuts] Re: In case you missed it: language benchmarks for Go 1.7, and language adoption

2016-09-10 Thread RogerV
I replaced C with C++ (mind you not C/C++) and then the curve takes a dramatic upward spike in year 2016 (I'd say it was getting going well in 2015). IOW, it looks like the efforts to modernize C++, starting with C++11, are paying off big time. I program mostly in Java these days. But I've int

Re: [go-nuts] Nil interface/pointer

2016-09-10 Thread Jan Mercl
On Sat, Sep 10, 2016 at 5:52 PM Kiki Sugiaman wrote: Question: can I determine whether f1 is nil given only f2 to check? f2 is not (the untyped) nil. The thing inside f2 is possibly (a typed) nil. For example: https://play.golang.org/p/E-It6kkgSw -- -j -- You received this message because y

[go-nuts] Nil interface/pointer

2016-09-10 Thread Kiki Sugiaman
Hi experts, Please refer to the following code: https://play.golang.org/p/m1VyGnayjl Question: can I determine whether f1 is nil given only f2 to check? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rec

Re: [go-nuts] Re: Handling multiple things happening at the same time

2016-09-10 Thread Asit Dhal
Hi, Don't you think it will be over engineering. Like Simon said, Apache can be used as a file transfer app(it has logging, loading, restarting). Probably, his small app is an extension of some bigger go app. His small app can use two different processes which runs under two different user(

[go-nuts] Re: Handling multiple things happening at the same time

2016-09-10 Thread Caleb Doxsey
Why would you do this manually? You should use systemd to create a service. It will handle starting on load, logging, restarting when it crashes, etc. On Saturday, September 10, 2016 at 7:06:03 AM UTC-4, Simon Ritchie wrote: > > > maybe gocron can schedule the http.ListenAndServe to run all the

[go-nuts] time.Weekday v time.Month

2016-09-10 Thread Sridhar
Is there any particular reason time.Weekday starts at 0 and time.Month starts at 1 ? I may be missing something - to be consistent can't both these can have the same start index ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Re: Handling multiple things happening at the same time

2016-09-10 Thread Simon Ritchie
> maybe gocron can schedule the http.ListenAndServe to run all the time? The classic solution (which is how the Apache web server does it) is to have a shell script that loops forever, starting the web server, waiting for it to finish and starting it again. So, if the server crashes, the paren

[go-nuts] Re: Handling multiple things happening at the same time

2016-09-10 Thread Simon Ritchie
I agree with Asit, but I would go further. You have one thing that is fetching files and putting them in a directory. You have another thing that is exposing the files in a directory via a web interface. Except that they happen to be working on the same directory, there is no connection betw

Re: [go-nuts] support for mips32

2016-09-10 Thread Dave Cheney
A mips32 port is in the works, https://groups.google.com/forum/#!topic/golang-dev/GDtW0vCretE On Saturday, 10 September 2016 18:33:11 UTC+10, ff...@gmx.us wrote: > > > > Le lundi 21 décembre 2015 19:01:25 UTC+1, Manlio Perillo a écrit : >> >> ... >> Only arm and mingw toolchains are available, si

Re: [go-nuts] support for mips32

2016-09-10 Thread ffred
Le lundi 21 décembre 2015 19:01:25 UTC+1, Manlio Perillo a écrit : > > ... > Only arm and mingw toolchains are available, since they are more popular. > ... > Hi, well most of the cheapest and "low power" boards great for IoT are based on variants of MIPS 24K processor (MIPS32) and we can use m

Re: [go-nuts] Re: FAIL: TestTransportEventTraceRealDNS

2016-09-10 Thread technoboy85
> > Cox Cable does something similar. They replace the correct DNS response > (a failure) with an IP to an advertising site. > LOL -- 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 i