Re: [go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Kurtis Rader
On Wed, May 5, 2021 at 8:23 PM Bagas Sanjaya wrote: > On 06/05/21 04.37, Ian Lance Taylor wrote: > > You wrote 2009 where you need to write 2006. > > Wouldn't it possible to define arbitrary reference time and format it > according to what it would like? > If arbitrary literals for the

Re: [go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Bagas Sanjaya
On 06/05/21 04.37, Ian Lance Taylor wrote: > You wrote 2009 where you need to write 2006. Ian Thanks. Wouldn't it possible to define arbitrary reference time and format it according to what it would like? -- An old man doll... just what I always wanted! - Clara -- You received this

[go-nuts] A little surprising result in clone slices with different ways to clone slices

2021-05-05 Thread tapi...@gmail.com
func MakeCopy(s []int) []int {10% r := make([]int, len(s)) copy(r, s) return r } func MakeAppend(s []int) []int { return append(make([]int, 0, len(s)), s...) } func MakeAppend2(s []int) []int { r := make([]int, 0, len(s)) return append(r, s...) } It looks MakeCopy is

[go-nuts] Re: Still "missing" priority or ordered select in go?

2021-05-05 Thread tapi...@gmail.com
older threads: * https://groups.google.com/g/golang-nuts/c/ZrVIhHCrR9o/m/JMJ0fGqhCgAJ * https://groups.google.com/g/golang-nuts/c/lEKehHH7kZY/m/gCjjBviJBwAJ On Thursday, April 29, 2021 at 4:51:43 AM UTC-4 oyvin...@teigfam.net wrote: > I know from some years ago that go did not have any priority

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Robert Engels
To Ian’s point, you can try to synchronize using an external shared or multiple synced clocks - but the error is too great when comparing cpu frequency events. > On May 5, 2021, at 4:34 PM, Bakul Shah wrote: > > On May 5, 2021, at 9:55 AM, Øyvind Teig wrote: >> >> Here is my cognitive test

Re: [go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Ian Lance Taylor
On Wed, May 5, 2021 at 2:04 PM Bagas Sanjaya wrote: > > I need to display date in "month year" format, for example "August 2018". > > So I had this minimal reproducible code (excluding package name and import > statements): > > ``` > func main() { > target := TargetDate(8) > >

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Bakul Shah
On May 5, 2021, at 9:55 AM, Øyvind Teig wrote: > > Here is my cognitive test case. It is not 100% realistic, but it's just to > convey my point: > hiPri is a disconnect message of a smoke detetector. loPri is a fire alarm. > If the disconnect hiPri is activated before (1 sec to 1 ns) or

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Ian Lance Taylor
On Wed, May 5, 2021 at 9:56 AM Øyvind Teig wrote: > > Here is my cognitive test case. It is not 100% realistic, but it's just to > convey my point: > hiPri is a disconnect message of a smoke detetector. loPri is a fire alarm. > If the disconnect hiPri is activated before (1 sec to 1 ns) or

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2021-05-05 Thread Ian Lance Taylor
On Wed, May 5, 2021 at 1:00 PM Shiva wrote: > > So I've now done the following steps as you suggested after removing all the > previous traces of Go from my machine to start from the scratch. > > 1. Install go1.4 > 2. Set GOROOT_BOOTSTRAP to go1.4 > 3. git clone go1.16 > 4. Run make.bat to

[go-nuts] Pug-->Html. I need the lib fot this

2021-05-05 Thread Денис Мухортов
Does anyone know a lib that precomlies from pug to html?Interested in something other than https://github.com/Joker/jade, well, or explain how to use this lib specifically?? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] time.Format with "Month Year" format incorrectly displayed

2021-05-05 Thread Bagas Sanjaya
Hi, I need to display date in "month year" format, for example "August 2018". So I had this minimal reproducible code (excluding package name and import statements): ``` func main() { target := TargetDate(8) fmt.Println("Target month is ", target.Format("January 2009")) } //

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Jan Mercl
On Wed, May 5, 2021 at 6:56 PM Øyvind Teig wrote: > hiPri is a disconnect message of a smoke detetector. loPri is a fire alarm. > If the disconnect hiPri is activated before (1 sec to 1 ns) or simulatenously > (same polling of "hw pins") as the alarm loPri there should be no alarm being >

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2021-05-05 Thread Shiva
So I've now done the following steps as you suggested after removing all the previous traces of Go from my machine to start from the scratch. 1. Install go1.4 2. Set GOROOT_BOOTSTRAP to go1.4 3. git clone go1.16 4. Run make.bat to 'make' Go on windows just to confirm that it does build fine

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Øyvind Teig
onsdag 5. mai 2021 kl. 20:53:45 UTC+2 skrev ren...@ix.netcom.com: > You are over complicating things. Start with simple code based on Ian’s. > I guess I am. I guess you mean Ian Davis: https://groups.google.com/g/golang-nuts/c/I9cbvCB86MA/m/zuI0PDc3BgAJ I guess I'd need help to get that

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Robert Engels
You are over complicating things. Start with simple code based on Ian’s. Still, I think you might be misunderstanding the tug between priority and starvation. It depends on the frequency and latency of events processing. There is no structure/language that can address this. You either drop or

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Øyvind Teig
Thanks, rog! (Blush.. I should have seen it and not nagged about it..) Sorry. Øyvind tirsdag 4. mai 2021 kl. 13:13:51 UTC+2 skrev rog: > On Mon, 3 May 2021 at 20:24, Øyvind Teig wrote: > >> I see that, which is great. But I still don't understand why >>

Re: [go-nuts] Still "missing" priority or ordered select in go?

2021-05-05 Thread Øyvind Teig
mandag 3. mai 2021 kl. 23:12:03 UTC+2 skrev Øyvind Teig: > mandag 3. mai 2021 kl. 21:44:49 UTC+2 skrev axel.wa...@googlemail.com: > >> On Mon, May 3, 2021 at 9:16 PM Øyvind Teig wrote: >> >>> I don't see where hi and lo are being sent to? >>> >> >> They are being `close`d. Reading from a

Re: [go-nuts] gollvm: sys/unix error with LLVM10

2021-05-05 Thread Khanh TN
Thank you. I will try this gofrontend commit as a temporary fix. Khanh On Wednesday, May 5, 2021 at 8:47:11 PM UTC+8 th...@google.com wrote: > Hi, > > I think what you are seeing is basically a consequence of building an > older version of gollvm -- the version you are building doesn't include

Re: [go-nuts] gollvm: sys/unix error with LLVM10

2021-05-05 Thread 'Than McIntosh' via golang-nuts
Hi, I think what you are seeing is basically a consequence of building an older version of gollvm -- the version you are building doesn't include newer bug fixes in the gofrontend version of the go command. The fix you need is in a gofrontend commit ( c948c2d770122932a05b62f653efa2c51f72d3ae )

[go-nuts] gollvm: sys/unix error with LLVM10

2021-05-05 Thread Khanh TN
Hi, I'm building a tool to analyze the LLVM bitcode of some Go code with gollvm. We are currently running LLVM10. We will migrate to LLVM11/12 but not sure when. I followed Than's instruction to build LLVM10-compatible gollvm from