[go-nuts] Re: I can't println c. coinsData[0].Name

2019-01-07 Thread pdbw58107
THANK YOU เมื่อ วันอังคารที่ 8 มกราคม ค.ศ. 2019 14 นาฬิกา 25 นาที 13 วินาที UTC+7, Tamás Gulácsi เขียนว่า: > > c[0].Name is not the same as c.Name[0]. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rece

[go-nuts] I can't println c. coinsData[0].Name

2019-01-07 Thread Tamás Gulácsi
c[0].Name is not the same as c.Name[0]. -- 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:/

[go-nuts] I can't println c. coinsData[0].Name

2019-01-07 Thread pdbw58107
package main import ( "encoding/json" "io/ioutil" "log" "net/http" ) type coinsData struct { Name string `json:"name"` Photo string `json:"photo"` } func main() { resp, err := http.Get("http://uinames.com/api/?ext&amount=25";) if err != nil { log.Fatal(err

Re: [go-nuts] Re: What are the reasonable reasons to use pointers?

2019-01-07 Thread Michael Jones
I am honored to have shared a bug with Rob Pike. On Mon, Jan 7, 2019 at 3:36 PM Rob Pike wrote: > I think every Fortran programmer has a version of that story. Mine > involved the number 3. > > -rob > > > On Mon, Jan 7, 2019 at 8:01 AM Michael Jones > wrote: > >> My hardest-to-debug ever bug wa

Re: [go-nuts] Re: What are the reasonable reasons to use pointers?

2019-01-07 Thread Rob Pike
I think every Fortran programmer has a version of that story. Mine involved the number 3. -rob On Mon, Jan 7, 2019 at 8:01 AM Michael Jones wrote: > My hardest-to-debug ever bug was because of this. > > Because FORTRAN is pass by reference, the compiler must do something > special for the four

Re: [go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread Dan Kortschak
Note there that cznic/cc has moved to gitlab, at https://modernc.org/cc On Mon, 2019-01-07 at 09:56 -0700, K Davidson wrote: > My original comment was in regaurd to c++11, but seeing as the > discussion > has drifted towards c, you may want to take a look at > https://github.com/xlab/c-for-go, it

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

2019-01-07 Thread Dan Kortschak
The problem with this approach is that something that's good enough for This Use™ by the owner of the code will be seen by another person and then used by someone else with less understanding. The world of cryptography implementations is already contaminated enough with badly implemented Correct™ s

Re: [go-nuts] Go 1.12 Beta 1 is released

2019-01-07 Thread Ian Lance Taylor
On Mon, Jan 7, 2019 at 1:33 AM Jan Mercl <0xj...@gmail.com> wrote: > > On Wed, Dec 19, 2018 at 1:27 AM Filippo Valsorda wrote: > > > > We have just released go1.12beta1, a beta version of Go 1.12. > > It is cut from the master branch at the revision tagged go1.12beta1. > ... > > Report any problem

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

2019-01-07 Thread Pat Farrell
On Friday, December 4, 2015 at 5:33:45 PM UTC-5, Jeff wrote: > > > "My question for the original poster is whether he needs to maintain > compatibility with a legacy system, or whether he is looking for a good > system when starting from scratch." > > it will be a new system that will import exi

Re: [go-nuts] Re: How to make the first character in a string lowercase?

2019-01-07 Thread robert engels
yes, my bad, too cursory of a read of the code > On Jan 7, 2019, at 3:14 PM, jake6...@gmail.com wrote: > > I believe he is demostrating an optimization for strings that are already in > the correct form. > > On Monday, January 7, 2019 at 1:45:50 PM UTC-5, robert engels wrote: > Huh? Isn’t your

Re: [go-nuts] Re: How to make the first character in a string lowercase?

2019-01-07 Thread jake6502
I believe he is demostrating an optimization for strings that are already in the correct form. On Monday, January 7, 2019 at 1:45:50 PM UTC-5, robert engels wrote: > > Huh? Isn’t your code calling the exact same method ? > > On Jan 7, 2019, at 12:22 PM, peterGo > > wrote: > > Nikolai, > > "What

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 bucarr
I spent most of November studying password hashing and IMO argon2id should be used for new projects going forward. Very nice implementation in Go in the x library. I don't speak Java so can't help you there. -- You received this message because you are subscribed to the Google Groups "golang

Re: [go-nuts] Delve repo moved to new location

2019-01-07 Thread deparker
That's correct, you should remove the old location and use the new one next time you update. On Friday, January 4, 2019 at 6:10:48 PM UTC-8, 邢玮 wrote: > > Does this mean that the next time I update delve I need to delete the > contents in the old folder, or maybe more adjustments? > > > > 发自我的小米

[go-nuts] Robotgo v0.70.0 is released, Go desktop automation. Enhanced keyboard and mouse operations

2019-01-07 Thread vzvway
Golang Desktop Automation. Control the mouse, keyboard, bitmap, read the screen, Window Handle and global event listener. Robotgo v0.70.0 is released, Go desktop automation. Enhanced keyboard and mouse operations. https://github.com/go-vgo/robotgo/releases/tag/0.70.0

[go-nuts] Re: gotcha: don't take the address of a for-range loop variable

2019-01-07 Thread Mahendra Bhoir
of course It would give you same address for "v" every time, v is one variable and in every iteration of for / range new value is assigned to v but the address of v will remain same in its lifetime. On Monday, January 7, 2019 at 12:08:59 PM UTC+5:30, Alex Buchanan wrote: > > https://play.golan

Re: [go-nuts] Re: How to make the first character in a string lowercase?

2019-01-07 Thread robert engels
Huh? Isn’t your code calling the exact same method ? > On Jan 7, 2019, at 12:22 PM, peterGo wrote: > > Nikolai, > > "What is the easiest way to make a string "LikeThis" --> "likeThis"?" > > Te easiest is not always the best. > > The code should be correct and reasonably efficient. For example

[go-nuts] Re: How to make the first character in a string lowercase?

2019-01-07 Thread peterGo
Nikolai, "What is the easiest way to make a string "LikeThis" --> "likeThis"?" Te easiest is not always the best. The code should be correct and reasonably efficient. For example, func firstToLower(s string) string { if len(s) > 0 { r, size := utf8.DecodeRuneInString(s) if r

[go-nuts] Re: C++ 11 to Golang convertor

2019-01-07 Thread K Davidson
My original comment was in regaurd to c++11, but seeing as the discussion has drifted towards c, you may want to take a look at https://github.com/xlab/c-for-go, it is based off of its based off of https://github.com/cznic/cc, and has been used to create go bindings for portaudio, libvpx, and a few

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

2019-01-07 Thread Sam Whited
On Mon, Jan 7, 2019, at 07:58, minfo...@arcor.de wrote: > I've often encountered demands for password encryption, where simple string > hashing would suffice. You should never encrypt passwords; encryption implies that you can get the original password back out, it's a two way street. Some form

Re: [go-nuts] [Ann] create full github release from command line, not just a tag

2019-01-07 Thread Tong Sun
No they're not, you're in good hands with cross-compiled assets etc. The wireframe project is extremely light-weighted and much easier to get started with. On Sun, Jan 6, 2019 at 11:58 PM Justin Israel wrote: > I've been using goreleaser so far, to publish > github rele

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

2019-01-07 Thread roger peppe
On Mon, 7 Jan 2019 at 13:58, wrote: > 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. > Not for password encryption. FNV isn't designed for

Re: [go-nuts] Re: What are the reasonable reasons to use pointers?

2019-01-07 Thread Victor Giordano
Never worked with FORTRAN, but the power-feature of changing a literal's value (i mean, the expression "2" is a literal) is quite unique!! :P Regarding the question itseft about pointers, i would like to share an example of the real life: road signs in london vs road signs in buenos aires. In

[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] C++ 11 to Golang convertor

2019-01-07 Thread Bakul Shah
On Sun, 06 Jan 2019 17:01:20 -0500 "Eric S. Raymond" wrote: > > A simple, possibly correct LR parser for C11 > > http://gallium.inria.fr/~fpottier/publis/jourdan-fpottier-2016.pdf This paper says its lexer+parser is about 1000 lines, which doesn't include the preprocessor. For comparison, subc (a

Re: [go-nuts] C++ 11 to Golang convertor

2019-01-07 Thread Jan Mercl
On Sun, Jan 6, 2019 at 11:01 PM Eric S. Raymond wrote: > I would like to learn more about that strategy, if possible. > A simple, possibly correct LR parser for C11 > > http://gallium.inria.fr/~fpottier/publis/jourdan-fpottier-2016.pdf Thanks. I probably caused a small misunderstanding. By stra

Re: [go-nuts] Go 1.12 Beta 1 is released

2019-01-07 Thread Jan Mercl
On Wed, Dec 19, 2018 at 1:27 AM Filippo Valsorda wrote: > > We have just released go1.12beta1, a beta version of Go 1.12. > It is cut from the master branch at the revision tagged go1.12beta1. ... > Report any problems using the issue tracker: > https://golang.org/issue/new Sorry, I cannot use th

Re: [go-nuts] gotcha: don't take the address of a for-range loop variable

2019-01-07 Thread Steven Hartland
Worth mentioning you don't need the second _ variable in range statements e.g. use:     for i := range items {    .     } vs:     for i, _ := range items {    .     } On 07/01/2019 02:24, bucha...@gmail.com wrote: https://play.golang.org/p/NnACN5fLPT3 I was taking the address o