Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Pure White
Wow, sounds great! Really looking forward to this feature! 在 2021年4月28日 +0800 PM12:22,Ian Lance Taylor ,写道: > On Tue, Apr 27, 2021 at 8:26 PM Pure White wrote: > > > > I think this is a good idea. But I suppose this will meet the same problem > > I have met syscall package is outside of the

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Ian Lance Taylor
On Tue, Apr 27, 2021 at 8:26 PM Pure White wrote: > > I think this is a good idea. But I suppose this will meet the same problem I > have met syscall package is outside of the runtime. We can introduce hooks into the runtime that are only for the standard library, because we know exactly ho

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Pure White
I think this is a good idea. But I suppose this will meet the same problem I have met syscall package is outside of the runtime. 在2021年4月28日星期三 UTC+8 上午12:54:25 写道: > I'm not sure if calling through the VDSO is the best solution to this > specific issue, though it does sound like a case th

[go-nuts] Recommendations of Go front-ends for single page SaaS application

2021-04-27 Thread Joseph Jones
Hi Everyone, I am trying to decide what front-end to use with a Go backend. It seems natural to use a Go frontend framework as well but I have not found a lot of them. At this point I am considering using NextJS with filepond.js with netlifyCMS because the user experience seems richer than fr

Re: [go-nuts] How to do vdso calls in my own code?

2021-04-27 Thread Ian Lance Taylor
On Tue, Apr 27, 2021 at 10:04 AM Manlio Perillo wrote: > > Il giorno martedì 27 aprile 2021 alle 00:40:17 UTC+2 Ian Lance Taylor ha > scritto: >> >> On Mon, Apr 26, 2021 at 1:24 AM Pure White wrote: >> > [...] >> > So I really want to know what is the right way to do vdso call outside >> > runt

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Ian Lance Taylor
On Tue, Apr 27, 2021 at 9:59 AM Michael Pratt wrote: > > Oops, I should say the syscall package could do this. x/sys/unix has the > extra complexity of not being tied to a Go release. It's a good idea, although I'll note that the syscall package does not currently define ClockGettime. I think i

Re: [go-nuts] How to do vdso calls in my own code?

2021-04-27 Thread Manlio Perillo
Il giorno martedì 27 aprile 2021 alle 00:40:17 UTC+2 Ian Lance Taylor ha scritto: > On Mon, Apr 26, 2021 at 1:24 AM Pure White wrote: > > [...] > > So I really want to know what is the right way to do vdso call outside > runtime? > > The right way is to use cgo. But probably the cost of maki

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread 'Michael Pratt' via golang-nuts
Oops, I should say the syscall package could do this. x/sys/unix has the extra complexity of not being tied to a Go release. On Tue, Apr 27, 2021, 12:53 Michael Pratt wrote: > I'm not sure if calling through the VDSO is the best solution to this > specific issue, though it does sound like a case

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread 'Michael Pratt' via golang-nuts
I'm not sure if calling through the VDSO is the best solution to this specific issue, though it does sound like a case that would certainly benefit. Regardless, one fairly clean way we could support this would be to make x/sys/unix.ClockGettime (and Gettimeofday) call through the VDSO rather than

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Amnon
https://blog.cloudflare.com/its-go-time-on-linux/ A bit old, but still relevant. Also https://github.com/dterei/gotsc may be useful depending on your requirements. On Tuesday, 27 April 2021 at 16:54:38 UTC+1 manlio@gmail.com wrote: > Il giorno martedì 27 aprile 2021 alle 17:51:46 UTC+2 Ia

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Ian Lance Taylor
On Tue, Apr 27, 2021, 8:55 AM Manlio Perillo wrote: > Il giorno martedì 27 aprile 2021 alle 17:51:46 UTC+2 Ian Lance Taylor ha > scritto: > >> On Tue, Apr 27, 2021 at 7:43 AM Manlio Perillo >> wrote: >> > >> > Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha >> scritto: >> >> >>

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Manlio Perillo
Il giorno martedì 27 aprile 2021 alle 17:51:46 UTC+2 Ian Lance Taylor ha scritto: > On Tue, Apr 27, 2021 at 7:43 AM Manlio Perillo > wrote: > > > > Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha > scritto: > >> > >> So I really want to know what is the right way to do vd

Re: [go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Ian Lance Taylor
On Tue, Apr 27, 2021 at 7:43 AM Manlio Perillo wrote: > > Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha scritto: >> >> So I really want to know what is the right way to do vdso call outside >> runtime? >> > What about using a different function instead of time.Now, and using

Re: [go-nuts] How to do vdso calls in my own code?

2021-04-27 Thread Kurtis Rader
This feels like a "XY Problem" but probably is not an example of that class of problems. Nonetheless, as Ian points out, the Go community can probably provide more useful answers if given more context regarding why you feel the need for this optimization. In my experience

[go-nuts] Re: How to do vdso calls in my own code?

2021-04-27 Thread Manlio Perillo
Il giorno lunedì 26 aprile 2021 alle 10:24:09 UTC+2 Pure White ha scritto: > Hi all, > > I'm trying to get time using `CLOCK_REALTIME_COARSE` and > `CLOCK_MONOTONIC_COARSE` for performance reasons, and need to use vdso call > by hand-written assembly code. That is, I want to reimplement `time.N

Re: [go-nuts] Re: How to manage replace directives in go.mod files when code versioning ?

2021-04-27 Thread Ilia Choly
I usually just use patch commits: git add -p On Tuesday, April 27, 2021 at 10:24:51 AM UTC-4 Reto wrote: > On Mon, Apr 26, 2021 at 11:59:47PM -0700, christoph...@gmail.com wrote: > > Thank you for pointing this out. I wasn’t aware of it. But the question > > still holds for published main progra

Re: [go-nuts] Re: How to manage replace directives in go.mod files when code versioning ?

2021-04-27 Thread Reto
On Mon, Apr 26, 2021 at 11:59:47PM -0700, christoph...@gmail.com wrote: > Thank you for pointing this out. I wasn’t aware of it. But the question > still holds for published main programs. If you have such a tight dependency that you need to develop them in parallel (and hence need replace directi