Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Bakul Shah
I get about 26 seconds to multiple billion bit (2^10^9-1) numbers with Gambit-Scheme (which has a built-in FFT multiplier written in Scheme by Brad Lucier). On the same hardware your bigfft packet takes about 24s for multiplying two billion digit numbers. GMP is of cou

Re: [go-nuts] Re: Bitwise operators applications

2017-07-22 Thread Michael Jones
...and...because that is how computers work so the understanding will itself be interesting and useful. It can be nice to see how things work "under the hood." On Sat, Jul 22, 2017 at 9:40 PM, Egon wrote: > Generally when you ask that question you probably won't need to use them. > > The main re

Re: [go-nuts] Why does this program carry test flags once compiled?

2017-07-22 Thread Nigel Tao
On Sat, Jul 22, 2017 at 7:08 PM, Howard Guo wrote: > https://github.com/HouzuoGuo/laitos It's tangential to your question, but out of curiousity, I skimmed the source code. In things like func TestUDPServer in https://github.com/HouzuoGuo/laitos/blob/master/frontend/plain/udp.go, you say: var st

[go-nuts] Re: Bitwise operators applications

2017-07-22 Thread Egon
Generally when you ask that question you probably won't need to use them. The main reasons you would use them: 1. bitflags -- allows to easily specify a set of 8 to 64 elements easily (https://play.golang.org/p/DZj9FerK19) 2. fast ways to compute something -- see https://graphics.stanford.edu/~

Re: [go-nuts] net/http: Redirect writes HTML for GET requests without setting Content-Type, how come?

2017-07-22 Thread Dmitri Shuralyov
Thanks Matt, that corroborates with my understanding too. I've sent a CL https://go-review.googlesource.com/c/50510 to fix it, it can be reviewed after the tree unfreezes. > (perhaps only if it's not already set?) It's good to think this through, but I don't think it's worth checking for that.

[go-nuts] Bitwise operators applications

2017-07-22 Thread Alexey Dvoretskiy
Hello golang-nuts. I'm new to Go language and have no solid experience with C/C++. I was a database programmer with some Python and I was able to get around without bitwise operators easily. Of course, I ran into tons of issues with performance, deployment and other stuff. That is why I switche

[go-nuts] i'm the hiring manager, looking for help in go in nyc:

2017-07-22 Thread vic
Hi, I'm VP Eng, If looking for next gig, plz check out https://www.linkedin.com/jobs/view/402291171/ so I can call you. -- 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 emai

Re: [go-nuts] net/http: Redirect writes HTML for GET requests without setting Content-Type, how come?

2017-07-22 Thread Matt Harden
That sounds like a bug. The whole reason for including a message is for older user-agents that don't understand redirects (must be *really* old! So the Content-Type should be set as if responding normally to a GET request. I think Redirect should be setting Content-Type (perhaps only if it's not al

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Michael Jones
Oh no! I wrote some of that code. Maybe I should revisit. On Sat, Jul 22, 2017 at 10:54 AM Hugh S. Myers wrote: > Ah! Excellent solution. I wrote one of the early multiple precision > packages for the C users group in the 80's and I typically wrote in C > first, then disassembled and reduced the

Re: [go-nuts] Re: golang-codereview - purpose

2017-07-22 Thread Sam Whited
On Sat, Jul 22, 2017, at 20:59, Ulderico Cirello wrote: > Just confirming, you read all of it? I do not read every single comment and try-bot-starting message on every single CL, but I at least look at what CLs are being proposed. So I more or less read the first message in every thread. —Sam --

Re: [go-nuts] Re: golang-codereview - purpose

2017-07-22 Thread Dave Cheney
yup On Sun, Jul 23, 2017 at 11:59 AM, Ulderico Cirello wrote: > Just confirming, you read all of it? > > Il giorno sab 22 lug 2017 alle ore 18:17 Dave Cheney ha > scritto: >> >> I read it. It lets me know which changes have been proposed. >> >> >> On Sunday, 23 July 2017 09:42:57 UTC+10, Carlos

Re: [go-nuts] Re: golang-codereview - purpose

2017-07-22 Thread Ulderico Cirello
Just confirming, you read all of it? Il giorno sab 22 lug 2017 alle ore 18:17 Dave Cheney ha scritto: > I read it. It lets me know which changes have been proposed. > > > On Sunday, 23 July 2017 09:42:57 UTC+10, Carlos wrote: >> >> Hi, >> >> >> I have subscribed golang-codereview list for a whil

Re: [go-nuts] golang-codereview - purpose

2017-07-22 Thread Sam Whited
On Sat, Jul 22, 2017, at 18:42, Ulderico Cirello wrote: > Does anyone here really read it? Or just a subset of it? if so, how do > you manage it? I read it (or skim the subject lines anyways); it's nice to know what changes people are submitting. I also filter for a few specific things that I'd li

[go-nuts] Re: Code Review - Applying functions on custom types

2017-07-22 Thread Egon
In a uniform column situation I would model a single Column, effectively have: type StringColumn struct{ Cells []string } type FloatColumn struct{ Cells []int } This should also make many of the operations easier to implement. But since I'm unclear what the end goal of this solution is, I'm not

[go-nuts] Re: golang-codereview - purpose

2017-07-22 Thread Dave Cheney
I read it. It lets me know which changes have been proposed. On Sunday, 23 July 2017 09:42:57 UTC+10, Carlos wrote: > > Hi, > > > I have subscribed golang-codereview list for a while. Even filtering out > for keywords, it is still a lot of emails. I'd assume that such list would > have a good re

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-22 Thread silviucapota
Hi Sofiane, "Is my design wrong?" Without a bigger picture of what your final aim is, it's hard for an external observer to tell you if your design is right or wrong. I was unable to fully grasp the need for that intermediate (CSV prefixed) structs in-between raw csv and real domain types, so I

[go-nuts] golang-codereview - purpose

2017-07-22 Thread Ulderico Cirello
Hi, I have subscribed golang-codereview list for a while. Even filtering out for keywords, it is still a lot of emails. I'd assume that such list would have a good reason to exist - but I cannot really figure out what this reason is. Does anyone here really read it? Or just a subset of it? if so

Re: [go-nuts] Error: opcode not supported on this processor: mips32

2017-07-22 Thread Sander van Harmelen
Ok, I managed to get it compiled by first cross compiling libusb and then pointing to it using the linker flags you suggested. So thank you very much, I can now compile a binary that works on the target device :) I do have one additional question… Is it possible to make the resulting binary sta

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-22 Thread ecstatic . coder
Nice idea, but unfortunately that was not easy to do with my favorite code editor (Geany). That's why I've implemented a preprocessor (Genesis) which converts my Allmann-style files to Golang-style. On Saturday, July 22, 2017 at 11:59:04 AM UTC+1, ohir wrote: > > > Every development team has ri

Re: [go-nuts] Error: opcode not supported on this processor: mips32

2017-07-22 Thread Sander van Harmelen
Yeah I found suggestions like that. But how does that work then? Does that need to be the lib compiled for the target (mips) or the machine I'm cross compiling on (darwin)? Think I miss some knowledge here :) Sander On 22 Jul 2017, at 19:10, Ian Lance Taylor wrote: > On Sat, Jul 22, 2017 at

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
Ah! Excellent solution. I wrote one of the early multiple precision packages for the C users group in the 80's and I typically wrote in C first, then disassembled and reduced the code and re-assembled again. Not the best approach, but it allowed some exciting prime number research for the time… On

Re: [go-nuts] Re: Code Review - Applying functions on custom types

2017-07-22 Thread Sofiane Cherchalli
Hi Silviu, Thanks for the example. I have some questions popping up in my mind: Is my design wrong? Is your example and/or Roger's the most idiomatic way to do it in Go? Is it wrong to use type assertions in Go? Thanks. On Thursday, July 20, 2017 at 6:32:47 PM UTC+2, Silviu Capota Mera wrote:

Re: [go-nuts] Error: Time function with non-usual compositions

2017-07-22 Thread Sergio Ramos
Thanks Ian, I saw my mistake now. Obter o Outlook para Android From: Ian Lance Taylor Sent: Saturday, July 22, 2017 2:16:37 PM To: SerginRamos Cc: golang-nuts Subject: Re: [go-nuts] Error: Time function with non-usual compositions On Sat,

Re: [go-nuts] Error: Time function with non-usual compositions

2017-07-22 Thread Ian Lance Taylor
On Sat, Jul 22, 2017 at 5:54 AM, SerginRamos wrote: > > When reading the Time.go function, I found this non-usual code: > > Time.go: Line: 116-124 > > // String returns the English name of the month ("January", "February", > ...). > func (m Month) String() string { > if January <= m && m <= Decemb

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Rémy Oudompheng
The math/big library has basic routines implemented in assembly for most common architectures, with all the math written in Go atop those. Rémy. 2017-07-22 17:39 GMT+02:00 Hugh S. Myers : > Is math/big pari based? > > On Sat, Jul 22, 2017 at 8:36 AM, Rémy Oudompheng > wrote: >> >> 2017-07-22 17:

Re: [go-nuts] Error: opcode not supported on this processor: mips32

2017-07-22 Thread Ian Lance Taylor
On Sat, Jul 22, 2017 at 4:41 AM, Sander van Harmelen wrote: > Thanks Ian! And sorry for my late response… Didn’t find time the last few > days to test this. I use a different toolchain () and now I seem to get past > this problem :) > > But now I end up getting these errors: > > > /var/folders/2k

[go-nuts] Error: Time function with non-usual compositions

2017-07-22 Thread SerginRamos
When reading the Time.go function, I found this non-usual code: Time.go: Line: 116-124 // String returns the English name of the month ("January", "February", ...). func (m Month) String() string { if January <= m && m <= December { return months[m-1] } buf := make([]byte, 20) n := fmtInt(buf, u

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
Is math/big pari based? On Sat, Jul 22, 2017 at 8:36 AM, Rémy Oudompheng wrote: > 2017-07-22 17:19 GMT+02:00 Rémy Oudompheng : > > 2017-07-22 16:48 GMT+02:00 me : > >> How does GoLang compare to other languages for mathematics dealing with > >> really large numbers? > >> > >> Prefer the ability

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Rémy Oudompheng
2017-07-22 17:19 GMT+02:00 Rémy Oudompheng : > 2017-07-22 16:48 GMT+02:00 me : >> How does GoLang compare to other languages for mathematics dealing with >> really large numbers? >> >> Prefer the ability to work with 2GB sized strings as numbers (need much >> bigger than int64) >> >> I see there is

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Rémy Oudompheng
2017-07-22 16:48 GMT+02:00 me : > How does GoLang compare to other languages for mathematics dealing with > really large numbers? > > Prefer the ability to work with 2GB sized strings as numbers (need much > bigger than int64) > > I see there is this: > https://golang.org/pkg/math/big/ > > And prob

Re: [go-nuts] Shiny

2017-07-22 Thread sqweek E.
There's also go.wde: https://github.com/skelterjohn/go.wde Although the widget situation is no better there (intentionally; it's reason to exist is to provide a platform independent interface to windows/framebuffers/events). Wde doesn't do mobile at all, but has pretty decent support for win32/

Re: [go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread Hugh S. Myers
Like everything else, '*it depends…*' Do you want speed? Do you want the bulk of the coding already available as a library/module? With or without a user interface? Answer those first and then ask again. Oh! Replace Javascript with Perl… On Sat, Jul 22, 2017 at 7:48 AM, me wrote: > How does

[go-nuts] Math on Huge (2GB) numbers in GoLang

2017-07-22 Thread me
How does GoLang compare to other languages for mathematics dealing with really large numbers? Prefer the ability to work with 2GB sized strings as numbers (need much bigger than int64) I see there is this: https://golang.org/pkg/math/big/ And probably some other github projects for math in go?

[go-nuts] Re: Go eval the source

2017-07-22 Thread Tong Sun
Fabulous! Thanks Nathan! On Saturday, July 22, 2017 at 1:41:12 AM UTC-4, Nathan Kerr wrote: > > A couple other options: > > 1. modify your code, compile, run > 2. put most of your code in main.go, each specific sort method in a > separate file (e.g., specific.go) so that go run main.go specific.g

Re: [go-nuts] Why does this program carry test flags once compiled?

2017-07-22 Thread Tamás Gulácsi
Just to clarify: Jan showed that you import the "testing" package, not just from ..._test.go files. -- 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+u

Re: [go-nuts] Error: opcode not supported on this processor: mips32

2017-07-22 Thread Sander van Harmelen
Thanks Ian! And sorry for my late response… Didn’t find time the last few days to test this. I use a different toolchain () and now I seem to get past this problem :) But now I end up getting these errors: /var/folders/2k/hxm__dq91bj19r7scpr3mzq8gn/T/go-build613045906/github.com/google/gou

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-22 Thread Wojciech S. Czarnecki
On Fri, 21 Jul 2017 10:29:18 -0700 (PDT) ecstatic.co...@gmail.com wrote: > Every development team should have the right to freely choose which coding > standard they will enforce. Every development team has right to reformat source to their tastes on the editor openfile then reformat to compiler

Re: [go-nuts] Why does this program carry test flags once compiled?

2017-07-22 Thread Jan Mercl
On Sat, Jul 22, 2017 at 11:08 AM Howard Guo wrote: > Can anyone please help me to understand, why the command line help refers to test flags (e.g. test.bench) once this program is compiled? jnml@4670:~/src/github.com/HouzuoGuo/laitos$ grep -nwrl '"testing"' * | grep -v _test.go frontend/mailp/ma

[go-nuts] Why does this program carry test flags once compiled?

2017-07-22 Thread Howard Guo
Good day fellow gophers. Can anyone please help me to understand, why the command line help refers to test flags (e.g. test.bench) once this program is compiled? https://github.com/HouzuoGuo/laitos Thanks & kind regards, Howard -- You received this message because you are subscribed to the Go