[go-nuts] Re: Is it a compiler bug?

2016-11-12 Thread imd3c
OK, I get it. It's in the spec, I had to check it. But still, isn't it wrong? What's the point, is it tradition or something? I checked C, Java, Rust, they all do the same. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Re: Version Control entire GOPATH

2016-11-12 Thread Hirotaka Yamamoto (ymmt2005)
We are developing Go programs on a Git mono repository. To include dependencies, we do not use "go get". Instead, we import third party packages by using "git subtree". For instance, github.com/BurntSushi/toml can be imported like this: git remote add -f toml

Re: [go-nuts] [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread Jason Stillwell
Those are great answers. Not having used qt before, I needed this help. Thanks. On Sat, Nov 12, 2016, 11:36 AM Justin Israel wrote: > > > On Sun, Nov 13, 2016, 7:47 AM therecipe wrote: > > Most times there is some function that returns either

[go-nuts] A more elegant way to store references with a slice?

2016-11-12 Thread question . developer
To keep a reference to a set of objects in a slice, must it be of type []*T ? Is there a more elegant way to handle the following example? https://play.golang.org/p/73lfAntNzb tryref.id is an immutable value type and try.others is a reference type correct? can you explain why the id is copied

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread Pierre Durand
https://golang.org/ref/spec#Comments Le samedi 12 novembre 2016 19:20:10 UTC+1, John Souvestre a écrit : > > Ø Also, prefixing all of the need-to-be-commented-out lines with // is > always safe: https://play.golang.org/p/8Cot8lssO3 > > > > Except for perhaps:

[go-nuts] [Support] Sponsorship for hackathon, Hack In The North

2016-11-12 Thread saptak013
Hello, I messaged on facebook page and was asked to send the details. So I am hereby giving the details of Hack In The North. *Hack In The North* is a student held hackathon organised by we, students of *IIIT Allahabad, India*. We provide a platform to students from colleges and universities

[go-nuts] Re: Sub-Benchmark strange results.

2016-11-12 Thread Evan Digby
I think I've eyeballed a bug in my code that *might* cause this but I won't be at a computer for a day or two to verify. I'll keep here posted! -- 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] html/template: create safe func, it won t work with attributes ?

2016-11-12 Thread mhhcbon
Hi, Using html/template i need to write an un-escaped value within a node attribute. I m happy to use html/template for the added security layer, but here i feel like something is wrong. There s a template with a safe func tmpl = template.New("") tmpl.Funcs(map[string]interface{}{

Re: [go-nuts] [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread therecipe
Most times there is some function that returns either some error code or some error string. Like in http://doc.qt.io/qt-5/qmediaplayer.html#error, but it's rarely needed. Am Samstag, 12. November 2016 18:54:16 UTC+1 schrieb Pietro Gagliardi (andlabs): > > Does Qt even expose errors itself?

[go-nuts] Re: [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread therecipe
As Qt itself doesn't use exceptions (even through it partially supports them), there are no Go like error returns. Instead if something unexpected happens, most classes provide functions to receive an error message or error code in some way. So it will only panic if something happens, that's

RE: [go-nuts] Is it a compiler bug?

2016-11-12 Thread John Souvestre
Ø Also, prefixing all of the need-to-be-commented-out lines with // is always safe: https://play.golang.org/p/8Cot8lssO3 Except for perhaps: https://play.golang.org/p/9xiWFI-SgB John -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread Pietro Gagliardi
Does Qt even expose errors itself? Back when I did Qt I never had to check myself... > On Nov 12, 2016, at 4:17 AM, Jason Stillwell wrote: > > I gave it a try using QMdiArea. It seems to work well. > > But I'm confused about where the errors go. There doesnt' seem to be a

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread Michael Jones
…which is what I usually do too… Command-/ in Sublime3 From: Jan Mercl <0xj...@gmail.com> Date: Saturday, November 12, 2016 at 9:31 AM To: Michael Jones , chris dollin , imd3c Cc: golang-nuts

[go-nuts] Re: [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread therecipe
Yes it's fully supported, you might want to take a look at the `internal/examples/qml` or `quick` folder. To see how you can interact with QML from Go. Am Samstag, 12. November 2016 03:49:14 UTC+1 schrieb Tong Sun: > > Cool! > > Does it support the declarative >

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread Jan Mercl
On Sat, Nov 12, 2016 at 6:25 PM Michael Jones wrote: >The closest thing to a “super comment” is shown in my edit to your example: https://play.golang.org/p/nkDcMCzhkf > > It is legitimate, but it too has limitations. For me at least, those are rare. Also, prefixing all

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread Michael Jones
The closest thing to a “super comment” is shown in my edit to your example: https://play.golang.org/p/nkDcMCzhkf It is legitimate, but it too has limitations. For me at least, those are rare. -Original Message- From: 'chris dollin' via golang-nuts Reply-To:

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread 'chris dollin' via golang-nuts
On 12 November 2016 at 07:33, imd3c wrote: > package main > > import ( > "fmt" > ) > > func main() { > /* > s := "*/" > */ > > fmt.Println("Hello, playground") > } And asked if this: > > tmp/sandbox035254559/main.go:9: newline in string >

Re: [go-nuts] Is it a compiler bug?

2016-11-12 Thread Jan Mercl
On Sat, Nov 12, 2016 at 5:55 PM imd3c wrote: It is not a compiler bug. The /*-style comment ends at the first occurence of */. Content between the /* and the first following */ plays no role. -- -j -- You received this message because you are subscribed to the Google

[go-nuts] Version Control entire GOPATH

2016-11-12 Thread Nick Stogner
I would like to version control my entire GOPATH to store all of my go code in a monolithic repository. (see http://danluu.com/monorepo/ or https://blog.gopheracademy.com/advent-2015/go-in-a-monorepo/) The problem that I run into: how to manage dependencies with "go get" ?.. I would like to

[go-nuts] Is it a compiler bug?

2016-11-12 Thread imd3c
package main import ( "fmt" ) func main() { /* s := "*/" */ fmt.Println("Hello, playground") } tmp/sandbox035254559/main.go:9: newline in string tmp/sandbox035254559/main.go:10: syntax error: unexpected /, expecting expression tmp/sandbox035254559/main.go:12: syntax error: unexpected fmt

[go-nuts] Re: [ANN] (GUI) Qt binding which supports Windows / macOS / Linux / Android / iOS / Sailfish OS / Raspberry Pi

2016-11-12 Thread Jason Stillwell
I gave it a try using QMdiArea. It seems to work well. But I'm confused about where the errors go. There doesnt' seem to be a way to check for errors. Does it panic in every error situation? On Thursday, November 10, 2016 at 12:34:36 PM UTC-8, therecipe wrote: > > Hey everyone, > > I would like

Re: [go-nuts] time.Truncate output is _slightly_ different than expected

2016-11-12 Thread Brian Picciano
Aaahh, that makes total sense, thank you so much! On Fri, Nov 11, 2016, 11:59 PM Jakob Borg wrote: > You are dividing the number of nanoseconds since the Unix epoch by some > random number of nanoseconds and chopping off the remainder. But a > time.Time internally is an interval

Re: [go-nuts] Re: FPDF question (jung-kurt)

2016-11-12 Thread Arie van Wingerden
Hi Kurt, of course it is all in the docs (slapping my head) RTFM! Thanks for the help and the great package! Now I have a working project which saves me an hour each time I need to do that task. So, I am *very* grateful! Best wishes, Arie 2016-11-12 3:34 GMT+01:00 Kurt Jung

[go-nuts] Re: Partial Variable Assignment

2016-11-12 Thread so . query
thanks for clearing that up! On Friday, November 11, 2016 at 6:49:35 PM UTC-8, so.q...@gmail.com wrote: > > > I thought it was possible to do partial assignment where, if one variable > is already declared and a new one is not. >