Re: [go-nuts] C variadic macro equivalent in Golang?

2019-12-01 Thread minforth
That did it: // --- variad.go -- variadic function test package main import("fmt";"os") // flags var df,ef int = 1,1 // variadic function thru empty interface func PR(f string, a ...interface{}) { if df!=0 { fmt.Printf(f, a...) if ef!=0 { fmt.Fprintf(os.Stderr,f, a...) } } } fun

Re: [go-nuts] C variadic macro equivalent in Golang?

2019-11-30 Thread minforth
Thanks, but then you would have to define the interface beforehand for any argument type. And there are a lot: format strings, strings, characters, integers of different size, floating-pont numbers, file-ids Meanwhile I found this discussion: https://github.com/golang/go/issues/18605 which hints

[go-nuts] C variadic macro equivalent in Golang?

2019-11-30 Thread minforth
C allows comma-separated argument lists via variadic macros. Whereas AFAIK golang allows only variadic arguments of the same type. (Please excuse if I am wrong, I am considering myself a golang newbie) C demo program that prints: -- -- 1 and 1 1 and 1 // ## C variadic macro test #include

[go-nuts] Re: Why Go? What is the most important feature that led to you becoming a Go programmer?

2019-02-27 Thread minforth
Am Dienstag, 26. Februar 2019 13:07:58 UTC+1 schrieb Louki Sumirniy: > > > Many other languages force you to really separate coding and architecting, > Go lets you do it all on-the-fly. > This is fine as long as you work your design around the capabilites of Golang. If not... Sounds trivial bu

[go-nuts] Re: Go and Microsoft Outlook

2019-02-16 Thread minforth
Only if golang is a panacea to you. I'd use AutoIT perhaps... Am Samstag, 16. Februar 2019 08:40:52 UTC+1 schrieb Andrew: > > Our corporate using Outlook send/receive emails. I have some emails need > to send out routinely with the same content(book truck, ask for order > information, etc). > I

Re: [go-nuts] Re: Secure password hashing algorithm in go.

2019-01-07 Thread minforth
Yes, thanks for the refresher. ;-) But as I said, for non-crypto requirements weak data (or password) obfuscation can be sufficient. For such weak purposes an FNV-1 code 3-liner may be adequate. For comparison: The Argon-2 github shows about 2000 lines of C code. Am Montag, 7. Januar 2019 16:

[go-nuts] Re: Secure password hashing algorithm in go.

2019-01-07 Thread minforth
I've often encountered demands for password encryption, where simple string hashing would suffice. Speed-wise FNV-1a is barely to beat. Add some magic number to the result and you are good enough. The algo fits in a single handful of lines. Of course this ain't military strength encryption, but

Re: [go-nuts] Re: go for robotic control, walking balance, quad flight control

2019-01-04 Thread minforth
Am Mittwoch, 2. Januar 2019 22:51:07 UTC+1 schrieb kortschak: > > Yeah, Gonum is 5 years old, and yet because of the design of the > language handles some aspects of numerical and scientific coding far > better than Matlab/NumPy > > This is more than debatable. Don't underestimate scientific comp

Re: [go-nuts] go for robotic control, walking balance, quad flight control

2019-01-03 Thread minforth
Soft realtime just needs fast responses within say 1/10 of the controlled system's smallest time constant. Most modern CPUs are fast enough for that even with elefantine Linux OS, no RTOS required. Hard realtime (e.g. for safety apps) needs interrupt handlers, triggered by hardware signals or

Re: [go-nuts] Re: go for robotic control, walking balance, quad flight control

2019-01-02 Thread minforth
Thanks for mentioning Gonum. While IMO it does not play in the Matlab or NumPy league, the math basics are there. After all golang is just a ..lang.. and no control development toolbox. Am Mittwoch, 2. Januar 2019 00:52:01 UTC+1 schrieb kortschak: > Who uses [][]T for this? > > Gonum has imple

Re: [go-nuts] Re: go for robotic control, walking balance, quad flight control

2019-01-01 Thread minforth
Am Montag, 31. Dezember 2018 23:06:23 UTC+1 schrieb kortschak: > > Where do we fall down? > > On Mon, 2018-12-31 at 01:38 -0800, minf...@arcor.de wrote: > > And then Golang doesn't treat complex > > matrix algebra well... > You really want to do controller design with go's 2-dimensional sl

[go-nuts] Re: go for robotic control, walking balance, quad flight control

2018-12-31 Thread minforth
Am Sonntag, 30. Dezember 2018 06:05:25 UTC+1 schrieb Pat Farrell: > > I need a project to motivate myself into writing some non-trivial go. So I > want to learn about implementing control theory, sensors, etc. Things like > IMU (gyro, 3D magnetic compass, and accelerometer) GPS. Not only do I w