[go-nuts] Is it possible to launch a Meltdown or Spectre attack with Go code?

2018-01-04 Thread 'Eric Johnson' via golang-nuts
Anyone have any insight into whether it is possible to launch a Meltdown or Spectre attack using Go code? Go's general practice of preventing access beyond slice limits, and its habit of zeroing memory makes me think triggering a Spectre or Meltdown attack with Go code is very unlikely. On

Re: [go-nuts] Very simple, Td array

2018-01-04 Thread Tong Sun
Oh, Sorry, I was copying from the line tr.Td[*1*] -- there is an extra comma, ",". That should be it. I've double-checked many times, but I can't now, as I'm home now. On Thu, Jan 4, 2018 at 6:37 PM, Dave Cheney wrote: > > fmt.Printf("%#v %#v\n", tr.Td, , tr.Td[0]) > >

[go-nuts] Very simple, Td array

2018-01-04 Thread Dave Cheney
> fmt.Printf("%#v %#v\n", tr.Td, , tr.Td[0]) This line will not compile, are you sure this is the code that is executing? -- 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,

Re: [go-nuts] Re: [ANN] A blog post series on serving big satellite imagery with Go

2018-01-04 Thread Pablo Rozas Larraondo
This new part of the series focuses on the use of fast compressors such as Snappy to improve access speed to image data: https://medium.com/@p.rozas.larraondo/divide-compress-and-conquer-building-an-earth-data-server-in-go-part-2-88670cafc167 IMO fast compressors will play a very important role

[go-nuts] Very simple, Td array

2018-01-04 Thread Tong Sun
Sorry, it must be the end of the day and my mind is no longer working... So I have a type type Tr struct { Td []*Td`xml:"http://www.w3.org/1999/xhtml td,omitempty" json:"td,omitempty"` XMLName xml.Name `xml:"http://www.w3.org/1999/xhtml tr,omitempty" json:"tr,omitempty"` } and

Re: [go-nuts] Combine low traffic website

2018-01-04 Thread Andrew
This project looks good: https://github.com/Sketchground/aproxygo https://groups.google.com/forum/#!topic/golang-nuts/7F4H4WC7DA4 -- 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,

Re: [go-nuts] Extending an existing type by embedding

2018-01-04 Thread Dave Cheney
On Friday, 5 January 2018 01:15:16 UTC+11, matthe...@gmail.com wrote: > > Tong, I’m glad this works for you. > > Dave, reading back I see that we’re giving conflicting advice on pointers > for MyTokenizer. While my view is that the dereferences are not necessary > here, perhaps you have other

[go-nuts] FOSDEM 2018 Go Devroom Schedule

2018-01-04 Thread Francesc Campoy Flores
Hi gophers, Good news, after our amazing reviewers evaluated *many* talk proposals we've come out with the following schedule for the Go Devroom.

[go-nuts] Client and server stub not generated for grpc-go

2018-01-04 Thread Amandeep Gautam
I am trying to write a grpc server in go but am unable get the generated client and server stub in the file generated by plugin. Here is the paste of the file generated: https://pastebin.com/kfi99MxK >From what I have researched, it is because of faulty protobuf installation but I am not sure

Re: [go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Frank Davidson
Thanks!!! Very helpful blog post!! So, in proc, the slice header is copied, then an entirely new array is created - []byte{5,6,7,8} - and the slice header copy is set to point at that new array, and then discarded, whereas in proc 2, the slice header is not reset, and so still points to the

Re: [go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Jan Mercl
On Thu, Jan 4, 2018 at 7:08 PM Frank Davidson wrote: > I'm sure this has probably been answered before, but I have a question about when a slice's underlying array is copied? In this code: In your code the underlying arrays are never copied when passed around. -- -j

Re: [go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Ian Lance Taylor
On Thu, Jan 4, 2018 at 10:08 AM, Frank Davidson wrote: > > I'm sure this has probably been answered before, but I have a question about > when a slice's underlying array is copied? In this code: > > https://play.golang.org/p/TnMFo-rYKzq > > package main > > import ( > "fmt"

Re: [go-nuts] retpolines in the go compiler?

2018-01-04 Thread Ian Lance Taylor
On Thu, Jan 4, 2018 at 9:41 AM, wrote: > > The last few days have seen some scary CPU security issues. One is Spectre, > which takes advantage of branch prediction and cache timings to read memory > that should be inaccessible. > > The main (only?) mitigation that I have

[go-nuts] Underlying arrays and their slices passed to functions

2018-01-04 Thread Frank Davidson
I'm sure this has probably been answered before, but I have a question about when a slice's underlying array is copied? In this code: https://play.golang.org/p/TnMFo-rYKzq package main import ( "fmt" ) func main() { out := []byte{1, 2, 3, 4} fmt.Println(out) proc(out) fmt.Println(out)

[go-nuts] retpolines in the go compiler?

2018-01-04 Thread spenczar5
The last few days have seen some scary CPU security issues. One is Spectre , which takes advantage of branch prediction and cache timings to read memory that should be inaccessible. The main (only?) mitigation that I have seen is to use "retpolines" - a portmanteau

Re: [go-nuts] Mixed type array in Go

2018-01-04 Thread Tong Sun
On Thursday, January 4, 2018 at 10:59:35 AM UTC-5, Tong Sun wrote: > > That's really *comprehensive*. Thanks a million Josh! > > Hi Josh, FTA, I've archived your masterpiece as https://github.com/suntong/lang/blob/master/lang/Go/src/ds/MixedType.go and https://play.golang.org/p/lmmkTxVJht1

Re: [go-nuts] Mixed type array in Go

2018-01-04 Thread Tong Sun
That's really *comprehensive*. Thanks a million Josh! -- 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,

Re: [go-nuts] Mixed type array in Go

2018-01-04 Thread Josh Humphries
You would typically define the array type as an array of some interface that is implemented by both purchase and coupon. You can then use a type-switch or type-assertion to determine/assert the actual type at runtime, on a per element basis. If the two types do not share some interface (e.g.

[go-nuts] Mixed type array in Go

2018-01-04 Thread Tong Sun
I need a data struct / solution that I can store mixed data-types into an array. How to architect that? Details -- Consider the checkout point at the cashier, the checkout process receives the following string of instructions 1. purchase 2. coupon 3. purchase 4. purchase I

[go-nuts] ListenAndServ and channels

2018-01-04 Thread Keith Brown
I am trying to Serve a webpage while running a ticker in the background. I am trying to generate a random number, genRandom() , periodically and publish it on a channel so generic() can see the results. I have something like this https://play.golang.org/p/6d1xmqpUYY7 but I don't know how to get

Re: [go-nuts] Extending an existing type by embedding

2018-01-04 Thread matthewjuran
Tong, I’m glad this works for you. Dave, reading back I see that we’re giving conflicting advice on pointers for MyTokenizer. While my view is that the dereferences are not necessary here, perhaps you have other reasons to have a pointer in this case? Thanks, Matt On Wednesday, January 3,