Thx Giovanni, it is clear now.
--
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.g
I write this code in the follwings:
package main
import (
"fmt"
"net"
"os"
)
func main() {
service := ":5000"
tcpAddr, err := net.ResolveTCPAddr("tcp", service)
checkError(err)
listener, err := net.ListenTCP("tcp", tcpAddr)
checkError(err)
for i := 0; i < 10; i++ {
conn, err := listener.Accept()
type variastrt struct {
len int32
data []int32 // data length = len [len]int32
}
Is there a way or lib to read a binary into a this structure in one line
code?
how about more complicate struct ?
type complicatestrt struct {
len int32
strData []variastrt
}
--
You received this m
it would be great to move to pcg. careful implementation here:
https://github.com/MichaelTJones/pcg
extensive use for quite a while
On Sun, Oct 29, 2017 at 10:11 AM, wrote:
> Il giorno domenica 29 ottobre 2017 17:49:39 UTC+1, T L ha scritto:
>>
>>
>>
>> On Sunday, October 29, 2017 at 3:47:43 A
Yes, you're right.So how to solve it??
在 2017年10月30日星期一 UTC+8下午12:37:49,Dave Cheney写道:
>
> Hello. I’m guessing that your tried calling twoprint(), but you’ve
> probably found that nothing is printed to the screen before your program
> exits.
>
> Is that correct?
--
You received this message b
Hello. I’m guessing that your tried calling twoprint(), but you’ve probably
found that nothing is printed to the screen before your program exits.
Is that correct?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group a
I write some function and other things in the followings:
var a string
var once sync.Once
func setup() {
a = "hello,world"
}
func doprint() {
once.Do(setup)
fmt.Print(a)
}
func twoprint() {
go doprint()
go doprint()
}
the quwstion is how can I make use of function twoprint()?? Thank you
Hello everyone,
I have a websocket handler like this:
func motionEventsServer(ws *websocket.Conn) {
var id string
websocket.Message.Receive(ws, &id)
for {
data := motion{}
websocket.JSON.Receive(ws, &data)
deviceMap.Store(id, data)
websocket.Message.S
Il giorno domenica 29 ottobre 2017 17:49:39 UTC+1, T L ha scritto:
>
>
>
> On Sunday, October 29, 2017 at 3:47:43 AM UTC-4, Sokolov Yura wrote:
>>
>> Why no one writes Go's version they've tested with?
>>
>> HEAD of master branch is uniform?
>>
>
> 1.9.2 is a little unfair. Tip is fair.
>
Let me
Thanks Michael,
Here is the cleaner current version, thanks to your suggestion:
//writeData loops over the field vectors and write their binary
representation to an io.Writer
func (sf *File) writeData(w io.Writer) error {
if sf.NoObs == 0 {
return nil
}
if len(sf.fields) == 0
Michael,
here is the cleaner (thanks to your suggestion) current version:
//writeData loops over the field vectors and write their binary
representation to an io.Writer
func (sf *File) writeData(w io.Writer) error {
if sf.NoObs == 0 {
return nil
}
if len(sf.fields) == 0 {
Thanks Tamas,
I agree re float32bits. I think the compiler will inline it. Right?
Re binary.put*, I am essentially inlining their implementation and avoiding
unnecessary use of reflection for serializing the floats.
I am not sure I understand your point re the type switch, can you provide an
e
Thanks,
I agree re float32bits. I think the compiler will inline it. Right?
Re binary.put*, I am essentially inlining their implementation and avoiding
unnecessary use of reflection for serializing the floats.
I am not sure I understand your point re the type switch, can you provide an
example
On 26 October 2017 at 18:56, Chris Broadfoot wrote:
> Nice! Thank you for maintaining these!
>
I hope people find them useful (I know quite a few people at Canonical are
using them but I don't know if many people outside are using them),
> BTW, if it helps, all tarballs are now gpg signed. (ad
Uniform fairness was my goal, not ordering the selection. A hard real-time
program would require the deterministic latency this would provide.
I agree that any program requiring an ordered selection probably is broken.
Perhaps another method could be used to detect such code.
John
On Sat, Oct 28, 2017 at 11:59 PM John Souvestre wrote:
> If it were uniformly fair then you couldn’t guarantee picking every
> channel once in a while. Statistically it would be become more and more
> probable, but never 100%.
>
>
>
You are touching on the subject of there being different ways
On Sunday, October 29, 2017 at 3:47:43 AM UTC-4, Sokolov Yura wrote:
>
> Why no one writes Go's version they've tested with?
>
> HEAD of master branch is uniform?
>
1.9.2 is a little unfair. Tip is fair.
--
You received this message because you are subscribed to the Google Groups
"golang-nut
On Saturday, October 28, 2017 at 7:55:22 PM UTC-4, Keith Randall wrote:
>
>
>
> On Saturday, October 28, 2017 at 2:18:05 PM UTC-7, T L wrote:
>>
>>
>>
>> On Saturday, October 28, 2017 at 4:56:42 PM UTC-4, T L wrote:
>>>
>>> In my opinion, the memory model article should mention that if event A
>
-- Forwarded message --
From: Keynan Pratt
Date: Sun, Oct 29, 2017 at 5:01 PM
Subject: Re: [go-nuts] go/types#Check is not resolving external package
source positions.
To: roger peppe
Thanks for the help Roger.
On Sun, Oct 29, 2017 at 5:00 PM, Keynan Pratt wrote:
> Can confir
Why no one writes Go's version they've tested with?
HEAD of master branch is uniform?
--
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...@goo
Apart from practical concerns about how to implement determinism, the
specification of randomness exists for a reason: It prevents programs from
depending on any specific choice for correctness.
(Which is why I asked above what the actual problem is if select isn't
perfectly uniform but just "pret
21 matches
Mail list logo