[go-nuts] Re: JSON parser

2016-11-09 Thread pierre . curto
Hello, I am sorry I am not sure I understood what you wanted to achieve, however, if you need to extract a json object from your sql rows, here is some code that should do it: https://play.golang.org/p/92oFkprZfs HTH Pierre Le mercredi 9 novembre 2016 22:36:42 UTC+1, Sergio Hunter a écrit : >

Re: [go-nuts] Can -static be specified in a #cgo LDFLAGS directive?

2016-11-09 Thread mike
Arbitrary ldflags may not make sense, but if you merely want to ensure main.go produces a static binary, then it absolutely makes sense. I was asking about this on Twitter earlier: https://twitter.com/mikedoherty_ca/status/796570476462112768 What would you think of a restricted feature that mer

[go-nuts] Re: Garbage collector

2016-11-09 Thread Dave Cheney
The garbage collector only runs when your program creates garbage -- the more your program allocates, the harder the garbage collector will work. On Thursday, 10 November 2016 15:31:24 UTC+11, vyasgir...@gmail.com wrote: > > Is there a way to overwork the garbage collector in go lang? > -- You

[go-nuts] Garbage collector

2016-11-09 Thread vyasgiridhar27
Is there a way to overwork the garbage collector in go lang? -- 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 op

[go-nuts] http.Redirect's short note

2016-11-09 Thread 'Anmol Sethi' via golang-nuts
RFC 2616 states that for 301 redirects: "Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s)." https://tools.ietf.org/html/rfc2616#section-10.3.2 I noticed that Go's net/http library's Redirect function only adds

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread digg
On Thursday, November 10, 2016 at 1:23:33 AM UTC+8, Marvin Renich wrote: > > * T L > [161109 11:57]: > > yes, := can be avoided totally. > > but := really has some benefits. > > > > The contradiction is the short form is 80% good with 20% bad side > effects. > > I disagree. I saves three c

Re: [go-nuts] Noob question: Pointers to interfaces

2016-11-09 Thread Egon
tl;dr; version don't write generic code -- write concrete code, but do automate the boilerplate stuff... Now depending on the reasons why you want to use ECS there can be several solutions: two easy solutions: 1. https://play.golang.org/p/Vv2yYpMitg 2. https://play.golang.org/p/RCImpkDWT2 *PS

Re: [go-nuts] Noob question: Pointers to interfaces

2016-11-09 Thread Edward Muller
Sounds like it's also more than a map[type]interface{} and more like either map[type][]interface{} or a map[type]map[uuid]interface{}. And that's somewhat naive as well. I'd probably implement a method to store and fetch each "type" that the ECS could actually care about, which could probably be

Re: [go-nuts] why "iota"?

2016-11-09 Thread Dan Kortschak
Or yoh-ta (like Yoda, but with s/d/t/) if not in America. On Wed, 2016-11-09 at 09:30 -0500, Marvin Renich wrote: > Iota is pronounced eye-OH-tuh. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] JSON parser

2016-11-09 Thread Sergio Hunter
Please tell me how to properly finish the JSON parser, so when the line did not fall unzip the code? That is, when you compile the code meets the text rather than the archive, immediately falls. It is necessary to write to skip the line with the text. When I start the first line unpacks it, and

[go-nuts] Re: where can i find golang programmers

2016-11-09 Thread kris . vanderstelt
I'd love to hear more about golang developers in Accra! Can you connect me? Kris On Thursday, February 6, 2014 at 7:38:40 AM UTC-5, Rick wrote: > > Accra, Ghana! > > On Wednesday, 5 February 2014 21:51:19 UTC, Daryl Baugh wrote: >> >> where is a good place to find golang programmers? >> > -- Y

Re: [go-nuts] why "iota"?

2016-11-09 Thread 'David Chase' via golang-nuts
If you're looking for Greek pronunciation of Greek letters, there's this: https://www.youtube.com/watch?v=vPEtRc05G7Q which agrees with what I learned in high school (and what is now stuck in my head). On Saturday, April 27, 2013 at 8:52:36 PM UTC-4, mb0 wrote: > > > Wikipedia says it's a greek a

[go-nuts] Re: Why google cloud vision api cause memory issue when it is failed to detect

2016-11-09 Thread Dave Cheney
Can you please post the full stack trace of the crash and a piece of code to reproduce the issue. Thanks. On Thursday, 10 November 2016 00:26:03 UTC+11, nova...@gmail.com wrote: > > Hi i am using Google Cloud vision API in my server side (JAVA) but when no > results found my server got crashed

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread Marvin Renich
* T L [161109 11:57]: > yes, := can be avoided totally. > but := really has some benefits. > > The contradiction is the short form is 80% good with 20% bad side effects. I disagree. I saves three characters and in doing so adds much more cognitive load to distinguish declaration from assignment

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread T L
On Wednesday, November 9, 2016 at 11:02:35 PM UTC+8, Marvin Renich wrote: > > * T L > [161109 05:18]: > > On Friday, October 21, 2016 at 11:26:46 PM UTC+8, T L wrote: > > > Thanks, gri, this is almost the answer I want. > > > > > > I still have two small questions about the short form. > > >

Re: [go-nuts] why "iota"?

2016-11-09 Thread Konstantin Khomoutov
On Wed, 09 Nov 2016 07:02:38 -0800 Michael Jones wrote: [...] > According to the OED, the meaning of iota as “a small or > insignificant quantity” derived from iota being the smallest letter > in the Greek alphabet (i.e., physical orthography.) > > P.S. Yes, this is a little bit more detailed th

Re: [go-nuts] why "iota"?

2016-11-09 Thread andrey mirtchovski
> gnosiology. not to be confused with "gnusiology", the philosophy of using two dashes where one would suffice. -- 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

[go-nuts] Re: Implementation status of database/sql changes

2016-11-09 Thread mattn
On Wednesday, November 9, 2016 at 6:00:45 PM UTC+9, Viktor Kojouharov wrote: > > Why doesn't the change standardize the placeholder format? The driver can > easily convert from a standard "[SOME-RUNE]PLACEHOLDER" to whatever the > actual database supports. Having a non-standard format just intro

Re: [go-nuts] why "iota"?

2016-11-09 Thread Rob Pike
It is my understanding that the use of iota in the phrase "not one iota of difference" relates to the epistemological debate about the difference of the (Greek) terms homoousian and homoiousian. But yes, Ken suggested iota for the counter and, since all three of us (Ken, Robert, Rob) had implement

Re: [go-nuts] Why there's no Getsid on linux?

2016-11-09 Thread Ian Lance Taylor
On Wed, Nov 9, 2016 at 4:38 AM, wrote: > Hey guys, I'm curious, why different syscall functions are available on > different *NIX platforms. > For example the Getsid function is not implemented for linux but it is > implemented for the darwin platform (link). > > I haven't examined all of them bu

Re: [go-nuts] why "iota"?

2016-11-09 Thread Michael Jones
Iota is indeed a Greek letter, the one from which western alphabets inherited the letter ‘i’ (⍳). If you read Comparative Grammar of Greek and Latin (Darling, 1933) or the New Comparative Grammar of Greek and Latin (Sihler), you’ll discover that iota and its friend upsilon share quite a bit of h

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread Marvin Renich
* T L [161109 05:18]: > On Friday, October 21, 2016 at 11:26:46 PM UTC+8, T L wrote: > > Thanks, gri, this is almost the answer I want. > > > > I still have two small questions about the short form. > > 1. would it be good to allow all identifiers in a short form are old ones > > (assume there is

Re: [go-nuts] why "iota"?

2016-11-09 Thread John McKown
On Wed, Nov 9, 2016 at 12:04 AM, wrote: > I don`t know how to speak 'iota' too,I have to say "i---o---t---a" when I > talk with somebody. > > ​Being a crude Texan, I pronounce it like "eye ough ta"​ ​(which is also how I pronounce "i ought to" because, well, I'm a Texan! [grin]). BTW, it's also

Re: [go-nuts] Why there's no Getsid on linux?

2016-11-09 Thread Konstantin Khomoutov
On Wed, 9 Nov 2016 04:38:50 -0800 (PST) amenzhin...@gmail.com wrote: > Hey guys, I'm curious, why different syscall functions are available > on different *NIX platforms. > For example the *Getsid* function is not implemented for linux but it > is implemented for the darwin platform (link >

Re: [go-nuts] why "iota"?

2016-11-09 Thread Marvin Renich
* liyu1...@gmail.com [161109 08:26]: > I don`t know how to speak 'iota' too,I have to say "i---o---t---a" when I > talk with somebody. > > 在 2013年4月28日星期日 UTC+8上午8:52:36,mb0写道: > > > > > Wikipedia says it's a greek alphabet that looks like i, and I am seeing > > > APL used iota for something l

Re: [go-nuts] how to verify a signed xml

2016-11-09 Thread andrey mirtchovski
XML signing is such a mess that the only way to support it fully, in my opinion, is to use the "definitive" canonical implementation from the non-go world: libxml and xmlsec. i have had good success with https://github.com/treetopllc/xml I've only added one function to it that serves my purpose, c

[go-nuts] how to verify a signed xml

2016-11-09 Thread qq5459489
i know there is pem base64 x509 rsa in go library ,but how to use them to verify a signed xml like this var xmlstr = Bytes("http://schemas.microsoft.com/windows/2012/store/receipt\";>http://www.w3.org/2000/09/xmldsig#\";>http://www.w3.org/TR/2001/REC-xml-c14n-20010315\"; />http://www.w3.org/2001

[go-nuts] Why google cloud vision api cause memory issue when it is failed to detect

2016-11-09 Thread nova6112
Hi i am using Google Cloud vision API in my server side (JAVA) but when no results found my server got crashed not sure why it is happening could anyone help me? Thanks in advance -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe

[go-nuts] Why there's no Getsid on linux?

2016-11-09 Thread amenzhinsky
Hey guys, I'm curious, why different syscall functions are available on different *NIX platforms. For example the *Getsid* function is not implemented for linux but it is implemented for the darwin platform (link ). I

Re: [go-nuts] why "iota"?

2016-11-09 Thread liyu1259
I don`t know how to speak 'iota' too,I have to say "i---o---t---a" when I talk with somebody. 在 2013年4月28日星期日 UTC+8上午8:52:36,mb0写道: > > > Wikipedia says it's a greek alphabet that looks like i, and I am seeing > > APL used iota for something like range() in python, which makes > > go-lang's us

[go-nuts] Re: Is it possible to bundle LuaJIT binary together with Go executable?

2016-11-09 Thread amenzhinsky
You can bundle your binary as a byte slice (see go-bindata), then at runtime save it in a temporary file and execute it. -- 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 em

[go-nuts] Re: Berkeley DB drop in replacement for SQLIte3 supporting better concurrency: has anyone tried it?

2016-11-09 Thread danielle
You may also find this direct comparison between Berkeley DB and SQLite on IT Central Station to be helpful: https://goo.gl/eRMLlN. On Thursday, 7 January 2016 22:02:31 UTC+2, Glen Newton wrote: > > Ah, related: just found this: mattn/go-sqlite3 >

[go-nuts] Re: Go vs. the rest

2016-11-09 Thread mhhcbon
I can only add that learning go was a great decision. Coming from scripted languages, it was not easy to learn, but at the end, comparing to my previous language, its super fast, its memory usage is super good it does not need an extra runtime it convinced me that typed languages is an advantage

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread T L
On Wednesday, November 9, 2016 at 8:13:36 PM UTC+8, Jan Mercl wrote: > > On Wed, Nov 9, 2016 at 1:00 PM T L > > wrote: > > > many? I see only two ones. > > v := expr > var v = expr > var v T > var v T = expr > the last 3 and function/method parameters, and named return arguments, are just the

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread Jan Mercl
On Wed, Nov 9, 2016 at 1:00 PM T L wrote: > many? I see only two ones. v := expr var v = expr var v T var v T = expr -- -j -- 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, sen

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread Dave Cheney
and function/method parameters, and named return arguments. On Wednesday, 9 November 2016 23:13:36 UTC+11, Jan Mercl wrote: > > On Wed, Nov 9, 2016 at 1:00 PM T L > > wrote: > > > many? I see only two ones. > > v := expr > var v = expr > var v T > var v T = expr > > -- > > -j > -- You received

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread T L
On Wednesday, November 9, 2016 at 6:29:13 PM UTC+8, Dave Cheney wrote: > > There are already too many ways to declare and or assign a variable in Go. > Adding more is not a solution. many? I see only two ones. -- You received this message because you are subscribed to the Google Groups "go

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread Dave Cheney
There are already too many ways to declare and or assign a variable in Go. Adding more is not a solution. -- 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

Re: [go-nuts] Are short variable declarations necessary?

2016-11-09 Thread T L
On Friday, October 21, 2016 at 11:26:46 PM UTC+8, T L wrote: > > > > On Friday, October 21, 2016 at 4:31:51 AM UTC+8, gri wrote: >> >> To answer the subject line question: No, short variable declarations are >> not technically necessary. We could have chosen not to have them. But there >> are g

[go-nuts] Re: Implementation status of database/sql changes

2016-11-09 Thread omarshariffdontlikeit
I'd just like to say, as someone who is champing at the bit to access MySQL Stored Procedures from Go, that all these suggested changes look great and really well thought out from the developers side of things! Cracking job! On Tuesday, November 8, 2016 at 5:17:48 PM UTC, mattn wrote: > > Hi l

[go-nuts] Re: Implementation status of database/sql changes

2016-11-09 Thread Viktor Kojouharov
Why doesn't the change standardize the placeholder format? The driver can easily convert from a standard "[SOME-RUNE]PLACEHOLDER" to whatever the actual database supports. Having a non-standard format just introduces confusion and difficulty for the users of the api. On Tuesday, November 8, 201