Re: [go-nuts] Unary +

2016-08-19 Thread Lucio
On Saturday, 20 August 2016 01:01:39 UTC+2, Michael Jones wrote: > > > > …instead it means “assign the value ⁻3 to x”, where negative 3 is a single > idea, not two as in (Negate 3). The raised minus sign is from Kenneth > Iverson, who used it in APL to make the point that the ‘⁻’ and ‘-‘ have

Re: [go-nuts] Unary +

2016-08-19 Thread Lucio
On Saturday, 20 August 2016 02:29:17 UTC+2, Thomas Bushnell, BSG wrote: > > With all due respected to the illustrious Dr. Iverson, he was in > loony-land with his two versions of minus. > > > I take exception to the "loony-land" qualification of Dr Iverson's raised minus. I think it was

[go-nuts] Re: import csv file

2016-08-19 Thread francis badasu
loud and clear -- 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

Re: [go-nuts] Unary +

2016-08-19 Thread Ian Lance Taylor
On Fri, Aug 19, 2016 at 12:54 PM, Rob Thornton wrote: > What is the purpose of the unary '+' operator? In both C and Go they are > syntactically correct but neither generate instructions to modify the > expression. This is not an entirely serious answer, but the unary

Re: [go-nuts] Unary +

2016-08-19 Thread 'Thomas Bushnell, BSG' via golang-nuts
With all due respected to the illustrious Dr. Iverson, he was in loony-land with his two versions of minus. The notation "-3" does not mean "negative three", which, as my freshman math professor, a lover of English, pointed out, is a solecism, since "negative" is an adjective, and three is and

[go-nuts] Realize - Go build system with file watchers and live reload. Run, build and watch file changes with custom paths

2016-08-19 Thread Alessio Pracchia
Hi, i created a small build system for Go (Realize ). The basic idea is to have a system for the live reload on file changes with an automatic build process system. Any suggestion? This is my first go project, all suggestions are welcome :) . I'll write the

Re: [go-nuts] Re: import csv file

2016-08-19 Thread asit dhal
+1 Warm Regards, Asit Dhal http://bit.ly/193ASIT On 8/20/2016 2:14:47 AM, Shawn Milochik wrote: To everyone participating in this thread: Google "help vampire" To OP: don't be one. To everyone else: Don't feed them. -- You received this message because you are

[go-nuts] Re: import csv file

2016-08-19 Thread Shawn Milochik
To everyone participating in this thread: Google "help vampire" To OP: don't be one. To everyone else: Don't feed them. -- 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

Re: [go-nuts] Unary +

2016-08-19 Thread 'Axel Wagner' via golang-nuts
> > x := -3 // does NOT mean get the value 3, negate that, and assign to the > location known as x. Correction: Number literals in go don't include a sign in their definition: https://golang.org/ref/spec#Integer_literals So, yes, it does mean exactly that :) Your explanation, however, does make

[go-nuts] Remove vs Delete

2016-08-19 Thread Joel Eric
I have always considered add/remove to be a pair of keywords and insert/delete a pair of keywords so you could look at the method name used to place the item in storage originally I will admit that I have very little rationale to back this premise up - it's more of a personal practice.

Re: [go-nuts] Unary +

2016-08-19 Thread Michael Jones
My answer is philosophical, and possibly not what is wanted, but it is informed. Here goes: Backstory: Unary Minus, as taught in computer science and implemented in languages and instruction sets and so forth is slightly confusing and often confusingly described. x := -y // means get

[go-nuts] Remove vs Delete

2016-08-19 Thread bep
I had this discussion with another Gopher about the difference between Delete and Remove. I found this definition which I agree on: *"Delete * and *remove * are defined quite similarly, but the main

[go-nuts] Re: import csv file

2016-08-19 Thread Tamás Gulácsi
sth. like records, err := reader.ReadAll() if err != nil { log.Fatal(err) } db, err := sql.Open("sqlite", "memory") if err != nil { log.Fatal(err) } defer db.Close() tx, err := db.Begin() if err != nil { log.Fatal(err) } stmt, err := tx.Prep("INSERT INTO my_table (a, b, c) VALUES

[go-nuts] Re: SSA back-translation / destruction

2016-08-19 Thread adonovan via golang-nuts
On Wednesday, 17 August 2016 12:00:46 UTC-4, HWJ wrote: > > TL;DR: what's the best way to do SSA back-translation when using > x/tools/go/ssa? > > I'm thinking about a Go compiler which accepts a subset of Go and emits > assembly for a microcontroller. Instead of going all the way from >

Re: [go-nuts] Define method on scope-local type

2016-08-19 Thread 'Axel Wagner' via golang-nuts
It would probably be useful, but to be fair, I rarely had this problem aside from sort. I think this mechanism is better suited for the occasional edge-case (as it doesn't require a language change): https://github.com/golang/go/issues/4146 On Fri, Aug 19, 2016 at 8:49 PM, Joshua Liebow-Feeser

Re: [go-nuts] Define method on scope-local type

2016-08-19 Thread Joshua Liebow-Feeser
Does it really make sense to create an internal package just to define a single small, one-off type? Also, I don't imagine that any of the optimizations would need to be reconsidered; the scope is strictly a subset of the scope at which the optimizations operated before, so there shouldn't be any

Re: [go-nuts] Define method on scope-local type

2016-08-19 Thread Paul Jolly
I did indeed mean to reply to all (done that this time)! Sure, I understand that it's "cleaner", but I'm advocating the internal package approach because: - it solves the problem today - it benefits from being able to take advantage of existing compile time optimisations without needing

Re: [go-nuts] Define method on scope-local type

2016-08-19 Thread Joshua Liebow-Feeser
Hey Paul, I think those are interesting ideas, but my concern about scope-local methods extends beyond just the methods of the sort.Interface interface; I was just using that as an example. The same complaint applies for any type used only within a given scope that needs to implement any

Re: [go-nuts] Re: Database design pattern

2016-08-19 Thread asit dhal
Hi Paraiso, I just did some research about database access and found this reddit link  https://www.reddit.com/r/golang/comments/2t52u7/how_do_you_write_functions_that_access_database/ I thought, there might be some well known pattern to access database and widely popular in go community.

[go-nuts] Re: Database design pattern

2016-08-19 Thread paraiso . marc
I find your question strange because, unless you have a specific architectural problem , which you don't, AFAIK, you shouldn't try to force patterns in your code. Write code that is testable then refactor if needed. Don't try to force a specific pattern just because "patterns". Now if you are

Re: [go-nuts] Weired or not?

2016-08-19 Thread asit dhal
After struct embedding of S1 in S2, all methods of S1 will be available in S2. So, this is ok !! Warm Regards, Asit Dhal http://bit.ly/193ASIT On 8/19/2016 5:13:09 PM, Ian Lance Taylor wrote: On Thu, Aug 18, 2016 at 10:16 PM, T L wrote: > > package main > > type S1 struct { } >

Re: [go-nuts] Weired or not?

2016-08-19 Thread Ian Lance Taylor
On Thu, Aug 18, 2016 at 10:16 PM, T L wrote: > > package main > > type S1 struct { } > > func (*S1) f() {} > > type S2 struct { S1 } > > // var _ = S1.f // S1.f undefined (type S1 has no method f) > // var _ = S2.f // S2.f undefined (type S2 has no method f) > var _ = (*S2).f

[go-nuts] Re: gophercon 2016 videos

2016-08-19 Thread Rajanikanth Jammalamadaka
Awesome, thanks! On Friday, August 19, 2016 at 8:20:23 AM UTC-4, Josh Kamau wrote: > > For those who have been waiting, like me, GopherCon 2016 videos are now > on youtube. e.g https://www.youtube.com/watch?v=KINIAgRpkDA > -- You received this message because you are subscribed to the Google

[go-nuts] Database design pattern

2016-08-19 Thread asit dhal
Hi All, I need to build an application that accesses a small database(sqlite or may be mysql in production). My database operations are very small, like 1. Insert 2. Read 3. Search Insert is one time, and most of the time new records will be added in a batch.  Can someone suggest me some

Re: [go-nuts] How to initialize two dimension array

2016-08-19 Thread asit dhal
Here is a link to initialize a static array http://www.dotnetperls.com/2d-go And at runtime, https://rosettacode.org/wiki/Create_a_two-dimensional_array_at_runtime#Go Warm Regards, Asit Dhal http://bit.ly/193ASIT On 8/18/2016 6:19:57 PM, Seb Binet wrote: On Thu, Aug 18,

[go-nuts] gophercon 2016 videos

2016-08-19 Thread Josh Kamau
For those who have been waiting, like me, GopherCon 2016 videos are now on youtube. e.g https://www.youtube.com/watch?v=KINIAgRpkDA -- 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

Re: [go-nuts] Shiny

2016-08-19 Thread Daniel Skinner
> > There is also some very impressive work by Skinner over at: > https://github.com/dskinner/material > > The branch called mediansdf has impressive font improvements. > Thanks for the shout out, though I'm already looking at dropping that branch. I'm interested in shiny as well but waiting for

[go-nuts] Re: cmdline--improve Golang std.flag based on Go src v1.7

2016-08-19 Thread Ally Dale
[root@localhost ~]# rm --help Usage: rm [OPTION]... FILE... Remove (unlink) the FILE(s). -f, --force ignore nonexistent files, never prompt -r, -R, --recursive remove directories and their contents recursively -v, --verbose explain what is being done ... By default, rm

Re: [go-nuts] cmd/go: make c/objective-c in cgo support golang package better.

2016-08-19 Thread Seb Binet
hi, On Thu, Aug 18, 2016 at 8:21 AM, bronze man wrote: > I think golang package is a great stuff for encapsulation.It may be better > if I can use that in cgo. > * c/objective-c function can include any .h file in the GOPATH with "the > full path way" like golang import. >