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
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
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
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
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
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:
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
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
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
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
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
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
12 matches
Mail list logo