[go-nuts] Re: Artistic Library for Go Programmers.

2020-08-17 Thread lgodio2
If you`re into C++ try Cimg ( https://cimg.eu/ )It's an excellent way to create your own images, fractals, artwork etc. but it does have a learning curve .. I also found Lode PNG quite usefu l https://lodev.org/lodepng/ but it requires a lot more additional code than Cimg On Sunday, Aug

[go-nuts] Re: Why we don't have simple throws error statement

2020-08-01 Thread lgodio2
Has anyone ever tallied the number of different forum threads related to changing Go error handling ? The current method is obviously a vexing issue to many Go users, and It seems silly that this issue has never been resolved by the Go team beyond maintaining the status quo... despite, IMHO, se

Re: [go-nuts] [generics] replace ()/(type ) with :[]

2020-06-18 Thread lgodio2
" These are parameters, and should be thought of just like other parameters in a function call. .." parameters yes, but not in the current go context of 'parameter' .. Is it not better syntax for 'generic parameters' to use special, distinctive symbols e.g. C++ does via < Type > ?? On T

Re: [go-nuts] x, err = some_func(); if err != nil { } seems awkward

2020-06-15 Thread lgodio2
" It does seem that a lot of key decisions are being made on the basis of a very small sample of emoji votes in the issue tracker, so having a broader voting mechanism might be useful for informing the decision making process.. .." At the very least, 'a broad voting mechanism' would eliminate

Re: [go-nuts] x, err = some_func(); if err != nil { } seems awkward

2020-06-14 Thread lgodio2
https://golang.org/issue/38151 great news !... lets hope something finally gets resolved FWIW, I modify my original proposal: replacing #{.. .} with err {...} On Sunday, June 14, 2020 at 12:57:01 PM UTC-4, Ian Lance Taylor wrote: > > On Sun, Jun 14, 2020 at 8:25 AM Tom Limoncelli > wr

Re: [go-nuts] x, err = some_func(); if err != nil { } seems awkward

2020-06-14 Thread lgodio2
Amen Tom.. hard to believe that those who determine what Go syntax is, and is not, have yet to alter this uniquely awkward feature of the Go language. On Sunday, June 14, 2020 at 11:26:08 AM UTC-4, Tom Limoncelli wrote: > > On Thu, Jun 4, 2020 at 3:34 PM Ian Lance Taylor > wrote: > > > > O

[go-nuts] x, err = some_func(); if err != nil { } seems awkward

2020-06-04 Thread lgodio2
?? Why not a cleaner syntax e.g. x = some_func () #{ } .. symbol # arbitrarily chosen -- 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...

[go-nuts] files stored in /home/$USER/.cache/go-build/

2020-03-29 Thread lgodio2
What does Go use these files used for ? I've got loads of them...What happens if I delete some or all ? -- 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-n

Re: [go-nuts] Does os.exec work ?

2020-03-25 Thread lgodio2
Than you.. I surely need to beef-up my comprehension of what os.exec does vs what it does not. On Wednesday, March 25, 2020 at 2:54:07 PM UTC-4, Kurtis Rader wrote: > > The exec.Command() function works fine. The problem lies in your > understanding of what happens when you use a shell to execut

[go-nuts] Does os.exec work ?

2020-03-25 Thread lgodio2
This simple command works correctly when submitted via the terminal, but the same command submitted to os.exec does not !! .. and I can`t understand why... import ( "fmt"; "os"; "os/exec"; ) func main() { cb := "ABCD" cmd := exec.Command ("echo", "echo "+ "'" +string(cb [0:len(cb)-1] ) +"'",

[go-nuts] Re: Proposal: Error handling with else catch (else keyword)

2020-02-16 Thread lgodio2
Great suggestion f := os.Open("filename.ext") else err != nil { log.Fatal(err) } is much needed syntax improvement vs the current syntax. I would further suggest f ?= os.os.Open("filename.ext") : log.fatal("Cant open filename.ext") But the GO 'custodians' get apoplexy whenever they see an

Re: [go-nuts] liteide x36.2 released.

2019-11-17 Thread lgodio2
All the links in this post are incorrect On Saturday, November 2, 2019 at 10:32:48 AM UTC-4, visualfc wrote: > > Hi, all. > LiteIDE X36.2 released! > This version fix gocode crash bug. Add new image viewer plugins. Folder > view support multi copy&paste, move to trash. Fix windows floating doc

[go-nuts] Re: A question about performance when traverse the array with row-wise and column-wise

2019-10-01 Thread lgodio2
Are your test results different when rowSize = colSize> 1000 say ?? On Sunday, September 29, 2019 at 10:18:15 AM UTC-4, zct wrote: > > The test code is below: > package main > > import ( > "testing" > ) > > const rowSize = 100 > const colSize = 100 > > var array [rowSize][colSize]int >

[go-nuts] adding files to existing ZIP archieves

2019-08-31 Thread lgodio2
How do I use files in ...\src\archive\zip to add files to an existing archive file MyArchieve.zip ?? -- 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

Re: [go-nuts] Re: Question re fcns that return multiple values

2019-08-07 Thread lgodio2
f( g() ) compiles when g returns exactly the number of args that f() requires, but if g() returns only 1/2 that number f (g(), g() ) wont compile !! ...Is this not a Golang absurdity ?? On Tuesday, August 6, 2019 at 7:26:46 PM UTC-4, Ian Lance Taylor wrote: > > On Tue, Aug 6, 2019 at 4:14 PM

[go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread lgodio2
?? Am I wrong in saying that the statements I've submitted conform to "As a special case, if the return values..." On Monday, August 5, 2019 at 11:38:24 PM UTC-4, L Godioleskky wrote: > > For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..} > and f2 defined as func f2(x,y int) (

[go-nuts] Re: Question re fcns that return multiple values

2019-08-06 Thread lgodio2
Here a specific example: The following compiles and runs as expected m1x,m1y := ec.scalarMult(16,28,33) m2x,m2y := ec.scalarMult( 1,28,33) rx,ry := ec.add (m1x,m1y, m2x, m2y) However this stmt :rx,ry= ec.add(ec.scalarMult(16,28,33), ec.scalarMult( 1,28,33)) gives the following compiler e

[go-nuts] Go Library lists

2019-08-06 Thread lgodio2
The web page at http://go-lang.cat-v.org/pure-go-libs provides Go a valuable list of various Go packages organized by subject category. Unfortunately it stopped updating Oct'2012. If anyone knows of a currently maintained equivalent , please respond -- You received this message because you a

[go-nuts] Question re fcns that return multiple values

2019-08-05 Thread lgodio2
For f1 defined as func f1(k1, k2, k3 int) (x1, x2 int) {..} and f2 defined as func f2(x,y int) (xR int) {..} Why does the compiler complain about the call stmt f2 ( f1 (1,2,3) ) ?? -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

Re: [go-nuts] Go 2 generics counterproposal: giving up restricting types

2019-06-05 Thread lgodio2
Michael, Considering all improvements you've made to the original, is the current version of your proposal clear to all following this thread ? On Wednesday, June 5, 2019 at 6:03:12 PM UTC-4, Michal Strba wrote: > > Ian, have you had the time to evaluate the improvements to my proposal > (the o

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
Sorry again for the power failure...let me try one last time one of the annoying things you have to deal with as a team member is being assigned an "update" of code written by someone who no longer works for the team. What makes this annoying is possibility of running into code sections that co

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
llow On Thursday, May 30, 2019 at 12:29:03 PM UTC-4, Michal Strba wrote: > > Hi Gophers! :) > > I've been thinking about generics in Go 2 ever since the original > contracts proposal and few days ago, ideas finally clicked. One of the main > things about this proposal is that it deliberately omi

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
On Thursday, May 30, 2019 at 1:24:55 PM UTC-4, L Godioleskky wrote: > > one of the annoying things you have to deal with as a team member is being > assigned an "update" of code written by someone who no longer works for the > team. What makes this annoying is possibility of running into code s

[go-nuts] Re: Go 2 generics counterproposal: giving up restricting types

2019-05-30 Thread lgodio2
one of the annoying things you have to deal with as a team member is being assigned an "update" of code written by someone who no longer works for the team. What makes this annoying is possibility of running into code sections that contains "crytic" statements that require lots of effort to und

[go-nuts] Re: Interesting public commentary on Go...

2019-05-29 Thread lgodio2
My thanks to all ... This thread has provided me a wealth of interesting and varied ideas regarding Go user community viewpoints on Go governance. For what its worth here's my 'two cents' worth ... In the end, every Go user has only one 'Go' he/she can choose to useRegardless of how, why an

Re: [go-nuts] Interesting public commentary on Go...

2019-05-23 Thread lgodio2
Ian: I find many of your comments related to how the Go team functions very interesting, I for one would find it helpful if 2 or 3 times a year the Go Team would communicate to the Go community at large, information related to where and in what direction(s) it is taking Go, and what directions

[go-nuts] Interesting public commentary on Go...

2019-05-23 Thread lgodio2
https://utcc.utoronto.ca/~cks/space/blog/programming/GoIsGooglesLanguage -- 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.

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-05-13 Thread lgodio2
Dave: Thanks for pursuing this issue and reporting back. Given the extent of responses to the original question by the Go community (pro and con), hopefully those responsible for Go syntax will re-visit the issue and decide whether Go statement "if test then {.. } else { .. }" prevents any po

[go-nuts] Re: How to run a go method on multiple cores ?

2019-05-07 Thread lgodio2
Can anyone recommend a good on-line doc for goroutines ? The best one I've found so far uses a very SLOW approach to present essential info https://gobyexample.com/goroutines On Monday, May 6, 2019 at 7:11:00 AM UTC-4, Nitish Saboo wrote: > > Hi, > > I want a go method to run on multiple cores.

[go-nuts] Re: How to run a go method on multiple cores ?

2019-05-06 Thread lgodio2
If func f (n int) []int { is some fcn that requires CPU time T (large) to calculate its return value And I write : func main() { var s [ ] int; s1 := f(1) ; s1 := f(2) ... } I get results after CPU time 2 T ?? To obtain results in < 2T time, can I write s1 := go f(1)

[go-nuts] Re: the Dominance of English in Programming Languages

2019-05-06 Thread lgodio2
this issue involves much more than Go code For example , we for whom English is not our native language use 'Google translate' to translate our golang-nuts questions into English and the golang-nuts responses back to our native language. The second translation often produces produces very-stra

Re: [go-nuts] What happens to global vars when main() ends ?

2019-05-04 Thread lgodio2
Thanks jake.. If previous comments I received indicate that I should put the original question to rest,... but memguard.go suggests it should be re-opened On Saturday, May 4, 2019 at 1:23:40 PM UTC-4, jake...@gmail.com wrote: > > On Friday, May 3, 2019 at 9:44:05 PM UTC-4, lgo...@gmail.com wrote

Re: [go-nuts] What happens to global vars when main() ends ?

2019-05-03 Thread lgodio2
Andrey..This is one one the better ones I've seen ..but clearly parts II and III of this article are still in the making. Example: var kk int; func main() { kk= 22 { kkk := 10 println ( kkk, kk) } println ( kk) //println (kkk) //compiler error bec at this poin

Re: [go-nuts] What happens to global vars when main() ends ?

2019-05-03 Thread lgodio2
I'm currently working on a specialized encryption system where the keys are global... More importantly, I've been unable to locate any decent on-line docs describing exactly how Go GC works from a functional programming perspective..I found some docs describing various GC concepts and others th

[go-nuts] What happens to global vars when main() ends ?

2019-05-03 Thread lgodio2
Does Go GC destroy all global vars prior to the end of main() ? -- 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 mo

Re: [go-nuts] Re: What does "identifier...type" mean in a function definition?

2019-05-03 Thread lgodio2
Am I missing something ?? When u say : For any function F and some type T declared asfunc F(x ...T) {} within F x will have type []T. You can call F with a slice s of type []T as F(s...) Why is this needed ?? What's the point of using this "crypto-syntax" rather than just declaring the

[go-nuts] Why does this simple snip generate an infinite loop ?

2019-05-02 Thread lgodio2
func main() { var c8 uint8; var S [256] uint8; for c8 = 0x00; c8 <= 0xff; c8 += 0x01 { S[c8]= c8 } } -- 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

[go-nuts] multiple array declaration.. Is there a easier way ?

2019-05-01 Thread lgodio2
The following statement seems very awkward, is there a cleaner way to write it ? var T0= [256]uint32; var T1= [256]uint32; var T2= [256]uint32; var T3= [256]uint32; var T5= [256]uint32 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To uns

[go-nuts] Re: Is it possible to simplify this snippet?

2019-05-01 Thread lgodio2
Great example of why future Go updates should include the ternary operator. Your code is mess-ey when written using keywords 'if' or 'switch' but using '?' it becomes much cleaner p.Rect.X += rl.IsKeyDown(rl.KeyA) ? -1:0 + (rl.IsKeyDown(rl.KeyD) ? 1 : 0 ) p.Rect.Y += rl.IsKeyDown(rl.KeyW)

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-25 Thread lgodio2
To Kortschak and all others participating in this debate : Please don't get hung up over my choice of symbol '?' . My choice of symbol '?' and ';' is causing people to equate my proposal with a proposal to adopt C's ternary operator in Go. This is not what I intended to propose. My proposal r

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-25 Thread lgodio2
Rob: Am I missing something ?? The proposed syntax test ? { } : { } with no-nesting allowed is equivalent to if test { //. } else { // .. } ..The former is just a cleaner way of writing the latter Any complaints regarding 'abuse' associated with the former equally apply to the latte

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-25 Thread lgodio2
Rob : how can it be abused if the compiler wont allow nested ? operators ?? On Thursday, April 25, 2019 at 11:47:21 AM UTC-4, Rob 'Commander' Pike wrote: > > I am pretty sure that the decision not to have ?: in Go was a unanimous > decision by Robert, Ken and myself after almost no discussion. I

[go-nuts] Re: Go if else syntax .. suggested replacement

2019-04-24 Thread lgodio2
Just to clarify : My original proposal was to include as part of Go the syntax (test) ? { { //..code block for test=true } : { //..code block for test=false } I am NOT in favor of allowing nested ternary operations In addition, I also propose allowing un-nested '?' as an alternative assig

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-24 Thread lgodio2
For me, choosing to write color = temp < 80 ? { "blue", "red") vs func ternary(cond bool, pos, neg interface{}) interface{} { if cond { return pos } else { return neg } } color := ternary( temp < 80, "blue", "red") is a no brainer On Wednesday, April 24, 2019 at 5:25:09 PM UTC-4

Re: [go-nuts] Go if else syntax .. suggested replacement

2019-04-24 Thread lgodio2
If instead of writing: temperature > 80 ? red : green you choose to follow Marcus and write instead: map[bool]string{true:"red",false:"green"}[temperature>80] OR call func ternary(x int) int { return map[bool]int{true:12345,false:-1}[x>0] } Go right ahead ! ..as they say, "different s

[go-nuts] Go if else syntax .. suggested replacement

2019-04-23 Thread lgodio2
It sure would be nice if Go syntax allowed programmers to replace if ( test) { ...do sonething } else { ..do something else } with ? (test) { //...do something } { //..do something else } The ? operator can be anything the Go language team considers appropriate -- You received this message

[go-nuts] ?? Does anyone know of a good on-line doc that describes how Go Garbage Collection works .. My recent web searches proved fruitless

2019-04-23 Thread lgodio2
all responses appreciated -- 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

[go-nuts] Re: built-in alternative to bcrypt?

2019-04-22 Thread lgodio2
Try scrypt at github.com/elithrar/simple-scrypt . It's not a 'standard lib' item, but I've found the authors code easy to implemented as 'package main' code vs 'package' code On Monday, April 22, 2019 at 6:14:48 AM UTC-4, whiteh...@googlemail.com wrote: > > I'm porting some code over to

Re: [go-nuts] go execution speed for float64 based calculations vs float32

2019-04-21 Thread lgodio2
I note that this issue has been dealt with in a previous post https://groups.google.com/forum/#!topic/golang-nuts/n12khle-mlY The gist of which seems to suggest that 32-bit is faster than 64 On Sunday, April 21, 2019 at 10:09:09 PM UTC-4, Robert Engels wrote: > > At least on intel, float64 shoul

[go-nuts] go build *.exe file size seems much too large

2019-04-21 Thread lgodio2
For this simple go code, the *.exe file size is 1800 KB ...why so large compared to equivalent C-compiled code ?? package main import( "math"; "fmt" ) func main() { fmt.Printf("\n %8.3f", math.Sin(1.2) ) } Does the go generated *.exe file contain code only for math.Sin() or all the functions that

[go-nuts] go execution speed for float64 based calculations vs float32

2019-04-21 Thread lgodio2
?? On 64-bit CPUs does anyone have any experience comparing the run-time speed of float64 based calculations vs float32 ? Some of my C-code when translated to Go-code seems to run noticeably slower, so I'm wondering if I can speed things up by converting float vars to float32 vs float64 -- Y

[go-nuts] Re: floating point question

2019-04-21 Thread lgodio2
I think michael Jones ' explanation is correct...when we x : =1.3 Go translates this to a binary representation of 1.3 that is a very close approximation to decimal 1.3 so when you do fmt.Printf( "\n %v ", x) you get the the binary version of x translated back to decimal, which will not be exa

[go-nuts] Re: Does anyone know how to implement dynamic two-dimensional arrays ??

2019-04-21 Thread lgodio2
Burak Marcin and Miki : Many thanks, my problem is solved thanks to your comments On Sunday, April 21, 2019 at 1:10:40 AM UTC-4, lgo...@gmail.com wrote: > > Here's the snippet I'm trying to run > > package main > import ( "fmt" ) > > func main() { > Af(5) > } > > func Af ( N int) { > > //var

[go-nuts] Does anyone know how to implement dynamic two-dimensional arrays ??

2019-04-20 Thread lgodio2
Here's the snippet I'm trying to run package main import ( "fmt" ) func main() { Af(5) } func Af ( N int) { //var M = new([N][N]uint16) !compiler error //var M = make([N][N]uint16)!compiler error //var M = make([][]uint16, N*N) ## run-time error // run-time error M := make( [][]u

[go-nuts] Re: Learning Data Structures and algorithms with Golang

2019-04-12 Thread lgodio2
Bhagvan's disgrceful misuse of this forum to support his commercial endeavors should result in the exclusion of all his future posts On Friday, April 5, 2019 at 10:28:52 AM UTC-4, Bhagvan Kommadi wrote: > > Check out my published book on Amazon from packt: > > Learning Data Structures and al