Here is a golang version of Daniel Bernstein's "eratspeed", which is a straight
translation of his C code to golang without any changes other than as necessary
to make it work: https://play.golang.org/p/Sd6qlMQcHF.
It won't run on the golang playground because it takes too long unless one
I would also like to hear from somebody about a real world use-case. I
don't pretend to be proficient in this realm of functional programming, but
I would be very surprised if this is valuable in a language like Go that
can and does hold state. That said, this is very cool and I would love to
go test -work should do it.
On Saturday, 18 June 2016 12:02:03 UTC+10, Hiroaki Nakamura wrote:
>
> Hi,
>
> Here are commands I used to set up gopkg.in/vmihailenco/msgpack.v2
>
> go get -u gopkg.in/vmihailenco/msgpack.v2
> cd $GOPATH/src/gopkg.in/vmihailenco/msgpack.v2
> go get -u
https://play.golang.org/p/8R6QmYw_28
On Fri, Jun 17, 2016 at 3:08 PM Evan Digby wrote:
> To further this, if you do need your internal model to be a concrete
> struct rather than interface this approach still fits:
>
> https://play.golang.org/p/_wrgN1FltA
>
>
> On Friday,
On Friday, June 17, 2016 at 4:48:06 PM UTC+2, gordo...@gmail.com wrote:
> > I don't see the point to the exercise as far as optimizing golang is
> > concerned.
> It is a general rule that using more registers results in faster code.
Yes, except when they're wasted as in using the extra register
Thanks -- I should have clarified that we've ruled that option out (it
was our first approach), since we want to stick to the built in types
that won't require explicit exchange with the primitive types.
jonathan
On Fri, Jun 17, 2016 at 02:56:49PM -0700, Edward Muller wrote:
> AFAIK (and someone
One approach to deal with this would be to abstract your internal model as
an interface from the model you receive and mutate them to match. This also
gives you the power to truncate/round/mutate a float however best suites
your needs rather than hoping the library truncates/rounds/mutates in a
If the library made no provision for the caller to give a unique token
which would help to identify it in the callback then that library does
not expect to have more than one caller-and-callback in play at any
one time, or, even worse, expects you to arrange some thread-local
storage in the caller
AFAIK (and someone will probably provide something better) you need to do
something like this:
https://play.golang.org/p/riq-m6cgZu
> On Jun 17, 2016, at 2:37 PM, jg...@bitgirder.com wrote:
>
> We have an upstream provider of JSON data which sends integer data
> types as floating point
We have an upstream provider of JSON data which sends integer data
types as floating point literals with a "0" decimal part. By default
json.Decoder doesn't allow this and fails:
https://play.golang.org/p/MEJlg1n3vs
Unfortunately this provider is almost certain not to change this, and
so we
'go install' worked; thanks a ton! I'll also take a look at the other stuff
you mentioned because I'm curious about the details.
On Fri, Jun 17, 2016 at 5:15 PM, adonovan via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> On Friday, 17 June 2016 15:21:55 UTC-4, Joshua Liebow-Feeser wrote:
On Friday, 17 June 2016 15:21:55 UTC-4, Joshua Liebow-Feeser wrote:
>
> Hi All,
>
> I'm trying to use the go/* packages to parse and type check Go source
> code. I've downloaded github.com/coreos/etcd to test this on, and I'm
> currently trying it out in the etcdserver subdirectory. When I run
On Fri, Jun 17, 2016 at 2:23 PM, Dmitry Orlov wrote:
> If I understand it correctly, go scheduler instruments code with additional
> yield points not related to I/O. That can help fairness too.
It will sometimes pre-empt on function calls, but this can get a bit
hairy
Hi Andrey! thanks for answer!
But actually I don't understand how to receive context inside callback from
C-code. May be I'm wrong here but as I understand you mean that I have to
identify instance of *A using callback parameters received from C-side. But
what about if I'll receive only sum of
On Fri, 17 Jun 2016 00:50:20 -0700 (PDT)
User123 wrote:
[...]
> When i return http response from a function should i use
> *func makeCalls() (string, error, *http.Response, error) *
> or
> *func makeCalls() (string, error, http.Response, error) *
>
> For the struct i
I don't see the point to the exercise as far as optimizing golang is concerned.
Your experiment just shows that Your compiler (GCC?) missed an optimization as
far as reducing backend latency goes.
You may also find that swapping the order of some of the instructions such as
the second and the
Hello,
Could you guys please help me.
I can't find how to export method function which belongs to some go-struct
to C-code (cgo part) as callback. I know how to export simple function
which not belongs to any type and use it as callback for C-function, but is
it possibly to export method of
Hi to all,
I'm new here and using golang too. I've read some articles and post on
Connection Pooling" but I'm still confused. What I'm looking for is a rule
of thumb that make me easy to decide when use connection pool. My scenario
isn't so complicated:
- a web application that makes CRUD
Hi All
I am using Go version 1.6.2 and Gomobile (sha +6b7a416 from the tip) and to
build an Android library. Our code is mostly networking
"encoding/json"
"fmt"
"log"
"math/rand"
"net"
"sort"
"time"
--
You received this message because you are subscribed to the Google Groups
On Friday, June 17, 2016 at 3:52:27 PM UTC+2, gordo...@gmail.com wrote:
>
> I don't see the point of the exercise other than it proves that not
> putting the result of an operation back into the same register reduces the
> latency slightly for your processor (whatever it is?); I suspect that if
I don't see the point of the exercise other than it proves that not putting the
result of an operation back into the same register reduces the latency slightly
for your processor (whatever it is?); I suspect that if you used any other
register such as the unused AX register rather then the R11
On Friday, June 17, 2016 at 2:30:12 AM UTC+2, gordo...@gmail.com wrote:
>
> > Modern x86 CPUs don't work like that.
>
> > In general, optimally scheduled assembly code which uses more registers
> has higher performance than optimally scheduled assembly code which uses
> smaller number of
Thanks, is there a way to know what to expect in later versions (
1.8,1.9,1.10 and so forth ... ) ?
Le vendredi 17 juin 2016 01:15:18 UTC+2, Chris Broadfoot a écrit :
>
> Hello gophers,
>
> We have just released go1.7beta2, a beta version of Go 1.7.
> It is cut from the master branch at the
Hi Tamás,
thanks, I will have a look. I guess and hope that this is what I need.
@Simon: thanks for the response with so many details.
I have been working for years for projects with load balancers, HA,
disaster recovery sites, and so on so your detailed answer can be really
helpful to
By the way, Go 1.7 support subtests :
https://tip.golang.org/pkg/testing/#hdr-Subtests_and_Sub_benchmarks
Which is one of the nicest additions to Go 1.7
Le jeudi 16 juin 2016 16:04:11 UTC+2, Rayland a écrit :
>
> Let's say I have some piece of code like this:
>
> type Foo struct {
> }
>
> func
What is the point of doing that in a language that doesn't support auto
currying ? There is none. You are not currying anything by the way, you
just wrote 3 closures.
Le vendredi 17 juin 2016 00:00:43 UTC+2, Zauberkraut a écrit :
>
> Hello,
>
> Go enables the evaluation of functions using
On Thursday, June 16, 2016 at 3:20:10 PM UTC+2, Sean Russell wrote:
>
> I'm sorry -- the "share" button doesn't seem to be working, or doesn't
> work in Firefox or Chrome. And I have a window hung on "waiting for remote
> server," so I might have broken your playground.
>
TL:DR type
This is not a question about Go, but basic web infrastructure. However,
it's one of those "best practice" questions which "everybody knows the
answer to" and so you may be hard put to find out more without knowing
where to start.
First of all, I should point out that when you tweak your PHP
> Looks like something is wrong with immediate loading for the 1 << ...
> operation. Could you open a bug with repro instructions? I can look at it
> when 1.8 opens.
I have opened a golang issue #16092 as follows:
https://github.com/golang/go/issues/16092
I may have over-complicated it,
On Friday, 17 June 2016 02:59:49 UTC+3, kortschak wrote:
>
> I'm running a terabyte-scale (minor compiler changes are necessary to get
> this to run) genome resequencing simulation at the moment and an
> interesting question has arisen.
>
The simulation involved hashing over ~all positions of a
Have found the cause of the issue
The message that I was trying to marshall had *0x10a3c2d0 (when
fmt.Println) *which was http response.
>From https://github.com/revel/revel/issues/1037 i found that
*Since Go 1.6 http.Request struct contains `Cancel <-chan struct{}` which*
*results in `json:
31 matches
Mail list logo