Re: [go-nuts] Are Go floats smarter?

2018-09-02 Thread Wojciech S. Czarnecki
s (i.e. where the final owner of rounded off micropennies is known :) The decimal floats libraries are ok, esp. for analytics purposes but for typical money calculations old "use ints, Luke" ways are both faster and more error-prone. YMMV ofc. > Manlio -- Wojciech S. Czarnecki &

Re: [go-nuts] Are Go floats smarter?

2018-09-02 Thread Wojciech S. Czarnecki
ement it prints 0.018¤ (using 5/4 rounding rules). The -500µ¤ goes to wherever local accounting law imposes on me. Surely with pennies I'd do same thing ;) > For financial applications you should use decimal floating-point numbers. And soon see pink slip. Or even go to jail. > Manlio

Re: [go-nuts] Re: How to setup your development environment using Go modules

2018-08-31 Thread Wojciech S. Czarnecki
t > warts like this make the change to modules an unwelcoming experience > for Go developers. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gr

Re: [go-nuts] multilingual, multiplatform system - golang - idl

2018-08-31 Thread Wojciech S. Czarnecki
lers) https://github.com/google/flatbuffers > thanks in advance, srini > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rec

Re: [go-nuts] Reference to type satisfying a specified interface

2018-08-31 Thread Wojciech S. Czarnecki
e chkValidMT(x MTcheckerInterface) one. Now common checks are factored out and all "checkable" structs have 'IsOK' methods that call relevant series of "generic" checks but this would not be done without previous translation from hierarchy to separate typed funcs) Good l

Re: [go-nuts] function's argument default value

2018-08-22 Thread Wojciech S. Czarnecki
sed would be against sacred readability of Go code. See Jan Mercl's reply for details. PS. Try [https://racket-lang.org/]. They allow every one to write code readable only by the very same person. ;) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message

[go-nuts] [ANN] bplint - linter tool for Bitpeek format strings

2018-08-16 Thread Wojciech S. Czarnecki
://github.com/ohir/bplint Bplint docs: https://godoc.org/github.com/ohir/bplint Bitpeek package: https://github.com/ohir/bitpeek Bitpeek docs: https://godoc.org/github.com/ohir/bitpeek Enjoy! -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because yo

Re: [go-nuts] Ternary ... again

2018-08-16 Thread Wojciech S. Czarnecki
;s "text/template" for similar functionality. Young cocky "pro" wrote this just because he could. His older self longs much for ternaries, pre/post increments, do{}while and a few other things but is so happy that young rookies can't pollute code he is responsible for in

[go-nuts] [ANN] Bitpeek. Make bits human readable.

2018-08-09 Thread Wojciech S. Czarnecki
. 2x faster than fmt.Sprintf with string output. 3x faster with its native []byte output. MIT license. Repo: https://github.com/ohir/bitpeek Docs: http://godoc.org/github.com/ohir/bitpeek Enjoy! -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message bec

Re: [go-nuts] Re: I am confused.

2018-05-28 Thread Wojciech S. Czarnecki
ng university / university of technology ones... -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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 e

Re: [go-nuts] Re: I am confused.

2018-05-28 Thread Wojciech S. Czarnecki
If you are brave enough you may also learn vim editor: https://ftp.nluug.nl/pub/vim/pc/gvim81.exe I respect you, your sincerity and your will to learn young man. Keep on! Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE P.S. I urge someone with Windows environment to wr

Re: [go-nuts] Cross platform native(no dependencies) GUI options.

2018-05-27 Thread Wojciech S. Czarnecki
avascript what in turn allows for communication between your ui markup and your go code. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this gro

Re: [go-nuts] golang maven plug-in 2.2.0 has been published in maven central

2018-05-15 Thread Wojciech S. Czarnecki
;s 'hello corporate bus' takes to compile and run. Thank you for your work. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop r

Re: [go-nuts] Go license and fitness for purpose

2018-05-14 Thread Wojciech S. Czarnecki
.supremecourt.uk/cases/uksc-2015-0115.html -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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 g

Re: [go-nuts] Go could really use a while statement

2018-05-11 Thread Wojciech S. Czarnecki
On Fri, 11 May 2018 13:58:31 +0200 "Wojciech S. Czarnecki" wrote: Errata: of course body is still over condition check in for { body; if !(condition) {break} } construct. https://play.golang.org/p/yHFPIYIpcfp -- You received this message because you are subscribed to the Goo

Re: [go-nuts] Go could really use a while statement

2018-05-11 Thread Wojciech S. Czarnecki
Though last example is not in Go's "readability first" spirit. https://play.golang.org/p/8AKokpQWxkr > Hugh Fisher > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

Re: [go-nuts] Re: go 1 on Ubuntu 18.04

2018-05-08 Thread Wojciech S. Czarnecki
o set that Someone who **knows** she will need to set GOROOT likely is fully aware of the consequences. For the beginner the "it will cause confusing errors for you" is not a mere warning but is a precise description of reality. @OP: Read 'never' as 'you MAY NOT set GOROO

Re: [go-nuts] [ANN] GoKi Trees and GoGi GUI

2018-05-04 Thread Wojciech S. Czarnecki
get to go from X/y/C++; what I do like and what I do not" posts. Awaiting your goki brainchild to mature and flourish :) > - Randy > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "

Re: [go-nuts] Beginner question about interface

2018-04-28 Thread Wojciech S. Czarnecki
interest whether it has methods with given by Interface signatures. > Thank you in advance > Attila -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: Hello World - unexpected NUL in input

2018-03-29 Thread Wojciech S. Czarnecki
rune("abc^-here P.S. If you need line numbers you may annotate input with grep: $ grep -n file.go | iconv -f utf7 2>&1 | tail -1 Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Multiple directory paths in $GOPATH and go get

2018-03-09 Thread Wojciech S. Czarnecki
> No. Go get uses first one. You may execute go tool setting process' environment as for any other unix executable: GOPATH=/some/path go get reposite/user/package Then package will be installed in /some/path/src/reposite/user/package -- Wojciech S. Czarnecki << ^oo^ >>

Re: [go-nuts] Go += Package Versioning

2018-02-20 Thread Wojciech S. Czarnecki
t of go binaries may just list versions and compare sp levels with ones at the source repo. If there is higher spN, we will know something is amiss immediately - without grepping changelogs for a CVE lines. m0.2c -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this me

Re: [go-nuts] Resources to learn Go as a first programming language?

2018-02-14 Thread Wojciech S. Czarnecki
nes. First one has many exercises for the freshmen. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails f

Re: [go-nuts] Resources to learn Go as a first programming language?

2018-02-14 Thread Wojciech S. Czarnecki
courses online e.g. https://www.khanacademy.org/computer-programming/welcome-to-computer-science/882454257 https://lagunita.stanford.edu/courses/Engineering/CS101/Summer2014/about Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because y

Re: [go-nuts] Is it possible to launch a Meltdown or Spectre attack with Go code?

2018-01-05 Thread Wojciech S. Czarnecki
write an exploit using Go tools. Not relevant though. > Eric. > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] How to find optimal value for GOGC?

2017-11-17 Thread Wojciech S. Czarnecki
he number of cores? Yes it is possible. Please read https://blog.cloudflare.com/go-dont-collect-my-garbage/ for 'howto' tips. Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "

Re: [go-nuts] Re: go on Windows 10 from the bash shell (and the cmd shell)

2017-10-11 Thread Wojciech S. Czarnecki
of > Go, not Windows version of Go. OP got this hint from the Windows (> sudo apt-get install gccgo). This is a new scenario for beginners and Go docs are not aware of it. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to

Re: [go-nuts] Re: What will happen if the go and cgo's malloc return overlapped ?

2017-09-23 Thread Wojciech S. Czarnecki
On Fri, 22 Sep 2017 16:58:53 -0700 (PDT) Remus Clearwater wrote: > So, if the reservation scheme breaks down Then OS will not even boot. https://www.google.com/search?q=OS+memory+management+lecture -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message

[go-nuts] Are you tired typing if err != nil {} ?

2017-09-14 Thread Wojciech S. Czarnecki
uot;filetype plugin on" line is in your .vimrc. (default on most linux distros.) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop recei

Re: [go-nuts] Re: error handling needs syntactical sugar

2017-09-08 Thread Wojciech S. Czarnecki
= getData(i) case 3: err = getData(i) default: break watch } } if err != nil { // handle common error } All above patterns have single err handling place yet give back information where err was set -- something "watch" k

Re: [go-nuts] Re: error handling needs syntactical sugar

2017-09-07 Thread Wojciech S. Czarnecki
es as well, it is easy to read > and understand, and it saves the programmer from line duplication. Above at least gives to the reader visual breaks (with 'case' lines ;) > Martin > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because

Re: [go-nuts] error handling needs syntactical sugar

2017-09-05 Thread Wojciech S. Czarnecki
27;catch' :) BAD. > See the messages > here: https://gist.github.com/cpmech/d2e36dcbe277cd72605f3732d79c798b -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] error handling needs syntactical sugar

2017-09-05 Thread Wojciech S. Czarnecki
On Tue, 5 Sep 2017 00:11:02 -0700 (PDT) martin.r...@programmfabrik.de wrote: Ooops, bad paste to playground ['fail' logic leaked into https://play.golang.org/p/ig-KOi92Ku] Fixed is at: https://play.golang.org/p/dHE2wlwgIL -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE

Re: [go-nuts] error handling needs syntactical sugar

2017-09-05 Thread Wojciech S. Czarnecki
do with 10 or more sql statements, when it > doesn't really matter which one fails why? If I have a thousand of similar checks where I do not care about error details I use something like that: https://play.golang.org/p/ig-KOi92Ku Hope this helps, -- Wojciech S. Czarnecki <<

Re: [go-nuts] Re: "for ... range" over array of structs copies values

2017-09-01 Thread Wojciech S. Czarnecki
ggo.net/2017/05/language-mechanics-on-escape-analysis.html] [Or look at an old presentation of Dave Cheney: https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast] Hope this helps :) -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you

Re: [go-nuts] english language help

2017-09-01 Thread Wojciech S. Czarnecki
эн: "Би өөрийн хэлээр ярьдаг хүмүүсийг хайж байна". Тэр үүнийг өөрийнхөө хэлээр асууж болох байсан. Энэ бол зүгээр юм. Гэхдээ энэ нь англиар ярьдаг газар юм. Энд ядуу англи хэлээр ярих нь зүгээр л зөв. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received thi

Re: [go-nuts] Re: Generics and readability

2017-08-28 Thread Wojciech S. Czarnecki
to dismiss horrors of hours of digging in huge pile of sources just to grasp how clever and experienced my predecessor was. With go almost everything written by others is clear and in sight. What is not right in sight is a single incantation of go doc away. -- Wojciech S. Czarnecki << ^oo^

Re: [go-nuts] Reading bytes into uint32

2017-08-23 Thread Wojciech S. Czarnecki
endianess variants according to GOARCH. https://godoc.org/go/build#hdr-Build_Constraints -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group a

Re: [go-nuts] Go 2 suggestion - Types like "int?"

2017-08-20 Thread Wojciech S. Czarnecki
sport data, and there > will be times that json may be invalid. I.e., the "int" type has 'null' as > input. Ah, so Go core team should puff, bow then break Go type system asap. Just because some sloppy coder in outer world may produce invalid data and present coder is

Re: [go-nuts] Re: GO Vs D

2017-08-02 Thread Wojciech S. Czarnecki
nly author can understand. Even if just for a while ;). -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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 t

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-30 Thread Wojciech S. Czarnecki
On Sat, 29 Jul 2017 16:56:05 -0700 (PDT) ecstatic.co...@gmail.com wrote: > Anyway, thanks for the fun. Where is the popcorn ? LOL Q.E.D. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-29 Thread Wojciech S. Czarnecki
owed to split the arguments > on several lines. Please don't insult me by telling there wasn't any other > possible solution. *FORK* !!! Do better. [\APM] -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to t

Re: [go-nuts] Re: No Allman-Style, No go!

2017-07-22 Thread Wojciech S. Czarnecki
mat to compiler taste on savefile. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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+unsub

Re: [go-nuts] go get awkwardness with packages outside of GOPATH

2017-07-20 Thread Wojciech S. Czarnecki
es *not* allow symlinks! I'd suggest keeping to go tool expectations though. Third party pm-s and home baked scripts will not survive enough long to be on pair with evolving genuine tool. > > Thanks, > Florian Hope this helps, -- Wojciech S. Czarnecki << ^oo^ >> OHIR

Re: [go-nuts] go get awkwardness with packages outside of GOPATH

2017-07-19 Thread Wojciech S. Czarnecki
e Hope this helps. > Best regards, > Florian > -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- 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 a

Re: [go-nuts] Deleted post?

2017-07-17 Thread Wojciech S. Czarnecki
Date: Mon, 17 Jul 2017 04:58:50 -0700 (PDT) Though I remember cases of some posts not appearing on web gg abysmal interface and I recall advice in line of "Try to flush your gg cookies, clear cache and possibly start browser afresh - missing post should reappear". Hope this helps, -- W

Re: [go-nuts] Web UI library in pure Go?

2017-07-15 Thread Wojciech S. Czarnecki
On Sat, 15 Jul 2017 09:30:39 -0700 (PDT) Leff Ivanov wrote: > Is there something like Vaadin, GWT, ZK in Golang world? I mean something > to do web UIs in pure Go without the need to write JavaScript and HTML. > https://github.com/icza/gowut GPL3 https://github.com/gu-io/gu MIT -- You receive

Re: [go-nuts] issues about struct align

2017-05-19 Thread Wojciech S. Czarnecki
ld anyone tell me how I can get the same result with go playground? You can not. Go playground uses 64b platform. -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Reading stdlib for education about go?

2017-05-12 Thread Wojciech S. Czarnecki
ng you IMO err. While usually clear and concise stdlib code tends to be dense and sometimes 'hacky'. I personally would start with a big complete product, or popular 3rd party library. Eg. Hugo, Caddy, and gorilla if you're into web backend. Hope this helps, -- Wojciech S. Czarnecki

Re: [go-nuts] Why were tabs chosen for indentation?

2017-03-19 Thread Wojciech S. Czarnecki
familiar with indentation one is accustomed to. > I always felt the reason for using tabs was to enable support for non- > monospaced fonts and multi-width characters. A tab stop in the > traditional sense is a linear position, not a number of characters. -- Wojciech S. Czarnecki

Re: [go-nuts] Japronto vs Go net/http

2017-03-08 Thread Wojciech S. Czarnecki
I noticed that the response header is larger than japronto header. > Response header net/http additionally includes the current date. As said: standards. -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nu

Re: [go-nuts] The feature I want most, weak *

2017-02-11 Thread Wojciech S. Czarnecki
ink/go Hope this helps, TC -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- 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...@googl

Re: [go-nuts] Re: Using Go in a locked down SOC2 environment (dependency management hell)

2017-01-06 Thread Wojciech S. Czarnecki
vendor-folder/ [3] as far as go compiler allows for https://github.com/golang/go/issues/16860 Hpoe this helps, -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group an

Re: [go-nuts] Re: go get: You are not currently on a branch

2016-10-13 Thread Wojciech S. Czarnecki
te: library author is free to change api even daily, because 'npm does take care of versioning'. So either one traces all deps manually, or one has no idea what 'his' app really consist of. "May it have 39 versions of a single lib? Yes! npm will take care of it."

Re: [go-nuts] Re: go get: You are not currently on a branch

2016-10-12 Thread Wojciech S. Czarnecki
ry and do: 'git checkout master' there. After that you may do 'go get -u' again. Rinse and repeat. ] -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

Re: [go-nuts] Re: .net core vs go

2016-10-09 Thread Wojciech S. Czarnecki
f you still want to compare PLs, do reimplement some (heavily concurrent) real solution avaliable in golang ecosystem in C# (you do know intimately) Then you might compare both in production. -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the

Re: [go-nuts] Re: .net core vs go

2016-10-09 Thread Wojciech S. Czarnecki
tch.StartNew(); > var tasks = new Task[taskCount]; > sw.Stop(); In an era of multicore and aggresive optimizers microbenchmarking is moot. -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

Re: [go-nuts] Support of diffie-hellman-group-exchange-sha1

2016-09-18 Thread Wojciech S. Czarnecki
ang software get a govt mandated certification/clearence? Or ... > > I am trying to use the exchange algorithm called > > "diffie-hellman-group-exchange-sha1" It looks like Go does not support it -- Wojciech S. Czarnecki ^oo^ OHIR-RIPE -- You received this message beca

Re: [go-nuts] go get creating strange git messages in bash. Any ideas what causes this ?

2016-09-16 Thread Wojciech S. Czarnecki
to understand. You will - just read a decent book bedtime. > x-MacBook-Pro:pkg apple$ rm -rf sftp/ This is NOT the offending repo, github.com/kr/fs is. > # cd /Users/apple/workspace/go/src/github.com/kr/fs Do 'git checkout master' here then 'git pull --ff-only' > J

<    1   2   3