[go-nuts] Re: gomobile: what's the right way to make widgets?
i wish the the blender GUI would be made stand-alone, ready to port to Go... so clean and fast! -- 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 options, visit https://groups.google.com/d/optout.
[go-nuts] developing local packages with modules
Hello people i have always found modules very scary and complicated but now there seems to be no way round any longer. I have a lot of packages that i do now want to put in repositories. I want them to be locally accessible, without internet access. Everything always worked great for me with the old GOPATH setup. Yesterday i installed go 1.14 on a new machine, and thought, ok lets try the modules. I followed "How to write Go code" ( https://golang.org/doc/code.html) and was happy to read the following: " Note that you don't need to publish your code to a remote repository before you can build it. A module can be defined locally without belonging to a repository. However, it's a good habit to organize your code as if you will publish it someday. " I did indeed get the hello module to work well. However, my next quest was to import the hello/morestrings package in another module and use it there. I can get it to work :( Does anyone know of a good document/wiki/tutorial about developing go code that is not on remote repositories? Go was great but now i feel totally handicapped... -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/186c785e-f328-439b-a8e5-87f6f0faba90o%40googlegroups.com.
[go-nuts] Re: developing local packages with modules
should be: "i can't get it to work", instead of "i can get it to work", sadly enough On Sunday, June 7, 2020 at 3:20:40 PM UTC+2, Erwin Driessens wrote: > > Hello people > i have always found modules very scary and complicated but now there seems > to be no way round any longer. > I have a lot of packages that i do now want to put in repositories. I want > them to be locally accessible, without internet access. > Everything always worked great for me with the old GOPATH setup. > Yesterday i installed go 1.14 on a new machine, and thought, ok lets try > the modules. I followed "How to write Go code" ( > https://golang.org/doc/code.html) and was happy to read the following: > " > Note that you don't need to publish your code to a remote repository > before you can build it. A module can be defined locally without belonging > to a repository. However, it's a good habit to organize your code as if you > will publish it someday. > " > I did indeed get the hello module to work well. > > However, my next quest was to import the hello/morestrings package in > another module and use it there. I can get it to work :( > Does anyone know of a good document/wiki/tutorial about developing go code > that is not on remote repositories? Go was great but now i feel totally > handicapped... > > > > > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/66770ecc-db3a-4b7f-8309-c5b9e910605co%40googlegroups.com.
Re: [go-nuts] Re: Float32 math and slice arithmetics using SIMD
I'd love to see SIMD intrinsics in the Go compiler(s), even if it would mean separate packages for all the architectures. I'm not experienced enough to tell how far one could get with designing a cross-platform set of intrinsics instructions? Using the hardware when it is available, falling back on emulation when not? -- 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 options, visit https://groups.google.com/d/optout.
[go-nuts] go test -bench -benchmem, allocs/op mystery
When I 'go test -bench . -benchmem', I sometimes see small numbers reported in allocs/op that I can't spot in the code for the function that was benchmarked. For example, the following function: func Mul_c(m1, m2, m3 *Matrix) { // validate r1, c1 := m1.Dim() r2, c2 := m2.Dim() r3, c3 := m3.Dim() if c1 != r2 { panic("incompatible source matrices") } if r3 != r1 || c3 != c2 { panic("incompatible destination matrix") } // get scratch buffer scratch := f32scratch.Get(r2) trow := scratch.buf[:r2] // matrix multiply for m2c := 0; m2c < c2; m2c++ { // transpose m2 col into scratch row i := m2c // m2 col start index for m2r := 0; m2r < r2; m2r++ { trow[m2r] = m2.data[i] i += c2 // to next row } // compute dot products with m1 rows for m1r := 0; m1r < r1; m1r++ { row := m1.Row(m1r) dot := f32s.Dot(row, trow) m3.Set(m1r, m2c, dot) } } f32scratch.Put(scratch) } This will produce the following info when benchmarked: BenchmarkMul_c-8 1000 1558733 ns/op 69 B/op 2 allocs/op How to know what these two allocs are? Another question, suppose we have a function that can alloc different amounts of memory on each run, will the reported allocs/op be averaged over the number of times the function ran? -- 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 options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Runtime code generation?
You could let your application generate valid Go source, call the compiler to build a plugin, and load that plugin. I haven't tried that yet, but i think it should work. Downside is that you need to Go tools on the target machine for it to work. I don't know how many times you have to generate new functions, the plugin system can't unload a plugin, so things might not go so smoothly when you need to do this a lot of times in a single run of the program. On Friday, August 30, 2013 at 10:21:18 PM UTC+2, jzs wrote: > > Hi gophers, > > I was studying runtime code generation and was wondering if there's a way > to generate a function at runtime. > > Let's say we have a function: fun(a,b) {return a+b} > > This function is parsed to our program as a string, parsed and compiled to > a function in go. > > In C# and java you can do this as you have access to the clr and jvm which > can jit compile your function for you. > > Now go is a statically compiled language and as far as I can see the > reflect package is not powerful enough for such operations. > > Are my assumptions correct that this is not currently possible? > Could it be done through cgo? (If yes a hint to c documentation would be > nice :) ) > Would it be possible in go in the future? > > Creative ideas are welcome but prefer portable solutions so no assembly > generation through c or such :) > > For performance reasons it wouldn't be beneficial to have a. Net runtime > running that you sent a million requests to. > > Kind regards, > Jzs. > -- 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 options, visit https://groups.google.com/d/optout.
[go-nuts] Re: A spinning cube demo using Vulkan API and Go, the project status
bravo! -- 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 options, visit https://groups.google.com/d/optout.