Re: [go-nuts] Request for advice: Developing for Android

2016-09-21 Thread Nigel Tao
On Thu, Sep 22, 2016 at 12:33 AM, Peter Kleiweg wrote: > How about Go Mobile? Is that useful as a starting point, or should I try to > get to know the system first using Android Studio? What are the capabilities > of Go Mobile? Can it do all the stuff a native app can do,

Re: [go-nuts] Crypto/rsa : OAEP documentation can lead to misunderstanding regarding max message length, is it a bug?

2016-09-21 Thread Nigel Tao
On Wed, Sep 21, 2016 at 1:41 AM, AnomalRoil wrote: > So here am I: should I open an issue for a trivial sign mistake in a > sentence in the documentation? Opening an issue would have been fine. In this case, though, I just sent the trivial change out for review:

Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Michael Jones
Good point. I missed that. Also, I did not mean “unsolvabe” just not solvable using slightly a different precision. Common solutions: Remove the divides by multiplying them out. Then it just works (at least in FP where integer precision is not such an issue as in graphics hardware) Avoid the

[go-nuts] Re: localfile

2016-09-21 Thread maturana via golang-nuts
I wonder if go's google.Init() ends up missing initializers that are in the C side of cgo. On Wednesday, September 21, 2016 at 3:44:20 PM UTC-7, matu...@google.com wrote: > > I have a go binary that calls C code (with cgo). It is a little test, and > main calls google.Init() and calls some C

Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Nigel Tao
On Sun, Sep 18, 2016 at 1:57 PM, wrote: > It looked like I would have to use pkg unsafe BTW, you don't have to use package unsafe. Use package math's Float32bits and Float32frombits functions. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] ARM Cortex-R52 real time chip announced today

2016-09-21 Thread Michael Hudson-Doyle
On 22 September 2016 at 05:54, Ian Lance Taylor wrote: > On Wed, Sep 21, 2016 at 7:16 AM, Ged Wed wrote: > > > > Today ARM announced a new real time chip for cars. > > > > http://www.anandtech.com/show/10690/arm-announces-the- >

[go-nuts] localfile

2016-09-21 Thread maturana via golang-nuts
I have a go binary that calls C code (with cgo). It is a little test, and main calls google.Init() and calls some C function that ends up opening a local file. I get an error like: WARNING: Logging before InitGoogle() is written to STDERR E0921 15:16:46.570978 184662 extractor.cc:102]

[go-nuts] Re: Image Processing - Removing Color

2016-09-21 Thread dbeasy
This was a great find, I am doing the same now in Windows. I've had to modify it a bit, I imagine weather.gov has changed the image somewhat since the original post in 2013. I've had to remove some more of the light blue colors and then one more pass to get rid of the light grey radar "noise".

[go-nuts] Re: truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread xiiophen
Thanks for those links - I started using a something similar to what is described as Smit's algorithm (Slab method) in the Amy Williams paper. My code us subtly different to that usually given because I check the "back face" intersection first -for an early terminate ; this basically involves

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Jakob Borg
UTC, Coordinated Universal Time, is not really an arbitrary time zone. It's the time scale underlying almost all time measurements on Earth (excepting some specific use cases, typically in astronomy) and from which all time zones are derived. As such, I don't think it implies a location (other

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Paul Jolly
> > > The sec and nsec fields in a time.Time are relative to the Unix epoch > and so > > denote a point in time by themselves. The location is merely for > > presentation. > > Pedantically, they are not relative to the Unix epoch. They are > relative to January 1, year 1, 00:00:00.0

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread 'Axel Wagner' via golang-nuts
I am aware. I don't understand how that contradicts my point that they have an implied location (or rather *Location, namely time.UTC). I am aware, that you could choose an arbitrary *Location (because that's what time.UTC is. Just one, arbitrary, timezone) and create a special in-memory

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Sam Whited
On Wed, Sep 21, 2016 at 1:55 PM, Jakob Borg wrote: > The sec and nsec fields in a time.Time are relative to the Unix epoch and so > denote a point in time by themselves. Right, making your "instant" a duration with an implicit starting time, and a time that has a timezone at that

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Jakob Borg
Ah, indeed. No pedantry required to appreciate the difference, it's almost two thousand years after all. :) Sorry for the confusion. //jb ons 21 sep. 2016 kl 21:40 skrev Ian Lance Taylor : > On Wed, Sep 21, 2016 at 11:55 AM, Jakob Borg wrote: > > The sec and nsec

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Ian Lance Taylor
On Wed, Sep 21, 2016 at 11:55 AM, Jakob Borg wrote: > The sec and nsec fields in a time.Time are relative to the Unix epoch and so > denote a point in time by themselves. The location is merely for > presentation. Pedantically, they are not relative to the Unix epoch. They are

[go-nuts] Re: truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread jnc7919
Michael is of course correct about floating point but it is possible to robustly handle cases like this. I'm not sure on your exact goals but you've not already seen there are several papers about robust ray-box intersection e.g. An Efficient and Robust Ray-Box Intersection Algorithm by Amy

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread Jakob Borg
The sec and nsec fields in a time.Time are relative to the Unix epoch and so denote a point in time by themselves. The location is merely for presentation. ons 21 sep. 2016 kl 20:35 skrev 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com>: > Your Instant is not an Instant, it's a

Re: [go-nuts] time.Time vs time.Instant

2016-09-21 Thread 'Axel Wagner' via golang-nuts
Your Instant is not an Instant, it's a duration. For a duration to demarkate an Instant, you'd actually need a reference point (a zero). And that'll pretty much certainly be given relative to a location. So even your Instant still has a location, it's just implied (probably to be UTC).

[go-nuts] time.Time vs time.Instant

2016-09-21 Thread Paul Jolly
Please can someone can enlighten me or point me towards relevant docs/other regarding the design decisions behind time.Time? Specifically why the concept of an instant in time, referenced many times throughout the time docs, was not encoded as a type itself: type Instant struct { sec int64

Re: [go-nuts] ARM Cortex-R52 real time chip announced today

2016-09-21 Thread Ged Wed
Thanks for the response. That's an amazing testament to Yolanda design. I guess it's just a matter of a board coming out with it on now and then having a crack at it On Wed, 21 Sep 2016, 19:54 Ian Lance Taylor, wrote: > On Wed, Sep 21, 2016 at 7:16 AM, Ged Wed

Re: [go-nuts] pprof: what are runtime.scanobject/gentraceback/pcvalue/etc

2016-09-21 Thread mhhcbon
... Sorry for the publishing issues.. // BytesByLine emits chunks of []byte splitted by line (\n). func BytesByLine() *Transform { var buf []byte var EOL = []byte("\n") byLine := func () [][]byte { ret := make([][]byte, 0) lines := bytes.Split(buf, EOL) isEOL := len(buf)>0 &&

Re: [go-nuts] pprof: what are runtime.scanobject/gentraceback/pcvalue/etc

2016-09-21 Thread mhhcbon
Hi, thanks again for all the explanations. I kept digging, and now i m having the same behavior as this thread https://groups.google.com/forum/#!topic/golang-nuts/P1EFc4kMBfo I run test with memprofile enabled, then use pprof to see the results, but the numbers are all 0. $ go test -v

[go-nuts] Re: pprof: what are runtime.scanobject/gentraceback/pcvalue/etc

2016-09-21 Thread mhhcbon
Le mardi 20 septembre 2016 17:17:37 UTC+2, mhhcbon a écrit : > > Hi, > > on my way to learn to use pprof, i now face some intriguing results with > lots of runtime.* calls, > > can you help me to understand what those call are and how i should care > about ? > > (pprof) top30 > 8720ms of

[go-nuts] Re: create a .rpm file for go app.

2016-09-21 Thread Diego Medina
You could also use https://equinox.io/ once you have your token. keys, etc all setup, you can build new releases rpm, deb, etc using equinox release \ --version="1.0.0" \ --platforms="darwin_amd64 linux_amd64" \ --signing-key=/Users/inconshreveable/equinox.key \ --app="app_ja6WuaZgwsF" \

[go-nuts] Request for advice: Developing for Android

2016-09-21 Thread Peter Kleiweg
I want to start developing for Android, and would like your advice on that: Where to start. My background is Linux. I have a lot of programming experience. Mainly C and Perl, followed by C and Python, and for the last five years it's mainly Go. I did some Java programming for a few weeks,

[go-nuts] ARM Cortex-R52 real time chip announced today

2016-09-21 Thread Ged Wed
hey all, Today ARM announced a new real time chip for cars. http://www.anandtech.com/show/10690/arm-announces-the-cortexr52-cpu-deterministic-safe-for-adas-more https://github.com/golang/go/wiki/GoArm I am curious how hard it would be for golang to target this ?? Not that i would be anytime

[go-nuts] Re: truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread xiiophen
Yes thanks. I decided on catching the missed ON (edge/corner) case at the end of the function with an extra if statement when the numerical work returns EXITS_BOX=true, ENTERS_BOX=false - then I do a relatively simple check for the 'ray' outside the box - if Ray.Origin was outside and

[go-nuts] DeviceAtlas Go wrapper

2016-09-21 Thread David Carlier
Hi all, I am working for DeviceAtlas, the mobile detection solution and know some users of the C enterprise API available here https://deviceatlas.com/deviceatlas-haproxy-module were wondering how to integrate it inside golang. Can be taken as it is or at least as an inspiration as I m not

[go-nuts] Garbage collection internals information

2016-09-21 Thread Gleb Stepanov
Hi, folks. Recently i've watched Rick Hudsons presentation about beating latency problem in Go GC and it was great, but when i've tried to understand how does it works i've concluded that there are not so much info compare to Java for example. Design docs and source code looks complicated

[go-nuts] Re: Rational number to floating point

2016-09-21 Thread Brendan Tracey
Or if you have them as actual constants, 355.0 / 113 On Monday, September 19, 2016 at 12:07:13 PM UTC-6, Hotei wrote: > > I think you'll need something like x := float(355) / float(113) - where > float is either float32 or float64 depending on your preferred trade-off > for accuracy vs bytes

[go-nuts] go1.4.2/go/pkg/tool/linux_386/8g: signal: segmentation fault

2016-09-21 Thread Dave Cheney
Centos 5 is not supported, the kernel is too old. Sorry. -- 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

[go-nuts] go1.4.2/go/pkg/tool/linux_386/8g: signal: segmentation fault

2016-09-21 Thread Srinivasa Rao Ragolu
Hi All, I am new to golang. I have been trying to build golang 1.5.0 with golang 1.4.2 bootstrap binaries. My build host is centos5 and build is yocto build. But I always get below compilation issue. # Building Go bootstrap tool. | cmd/dist | go build

[go-nuts] Record audio on Windows

2016-09-21 Thread Dominik Link
Hi I'm currently writing a program which listens to a HID (sliders and buttons) and controls a karaoke program with these inputs. Grabbing input and sending commands with websockets work, but now I need to record the audio output as well. I tried to compile and run portaudio, but I cannot

Re: [go-nuts] truncate float32 to lesser precision (22 bit mantissa)

2016-09-21 Thread Michael Jones
Any kind of computational geometry code will have subtle issues in just this area. Broadly, the issue is classification of a point or line as IN, OUT, or ON. Of these, ‘ON’ is the difficult one because floating point prevents perfect calculation where real numbers would allow it. This is

[go-nuts] [ANN] gitstreak: a terminal-based Git contribution calendar (written in Go)

2016-09-21 Thread Xudong Zheng
https://github.com/xudongzheng/gitstreak I decided to write this a few weeks ago to keep track of my own progress, after having read http://lifehacker.com/281626/jerry-seinfelds-productivity-secret months ago. Go related feedback in particular would be appreciated. Hope some of you find this

[go-nuts] Problem with PDF generation with github.com/jung-kurt/gofpdf

2016-09-21 Thread Ed Pelc
Well adding some code would help. But generally there is a ln variable you need to set to 1 to break the line. Your really need to read the docs carefully to get what you want with gofpdf. Most of the info is there. -- You received this message because you are subscribed to the Google

[go-nuts] Problem with PDF generation with github.com/jung-kurt/gofpdf

2016-09-21 Thread Arie van Wingerden
Hi, I have started using https://godoc.org/github.com/jung-kurt/gofpdf So far I can get some output, but everything is overlapping each other at the start of the page. I am using Cell or Text for writing a line of output. How can I advance to the next physical "row" (line) in the output page?

[go-nuts] Re: net/http: In the infinite loop, refused all requests.

2016-09-21 Thread Tyler Compton
This issue may be of interest to you: https://github.com/golang/go/issues/10958 On Tuesday, September 20, 2016 at 7:42:24 PM UTC-7, Tony Chen wrote: > > ### What version of Go are you using (`go version`)? > go 1.6.2 mac/amd64 > > ### What operating system and processor architecture are you