[go-nuts] New tutorial:Code a simple P2P blockchain in Go!

2018-04-14 Thread noor
https://medium.com/@mycoralhealth/code-a-simple-p2p-blockchain-in-go-46662601f417

Hi Everyone,
We will show you how to run a simple blockchain in a truly decentralized, 
Peer-to-Peer fashion.

Let us know what you think!



-- 
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://groups.google.com/d/optout.


Re: [go-nuts] Re: latest go examples

2018-04-14 Thread Fernando Rodriguez
I second the Just for Func video series by Francesc Campoy, great series.

I also highly recommend the following resources to go along with that:
1. https://gophercises.com by Jon Calhoun
2. Go Data Structures & Algorithms:
https://github.com/floyernick/Data-Structures-and-Algorithms by Mykyta
Paliienko
3. A Tour of Go - https://tour.golang.org/welcome/1

If you would like some additional resources, I also posted some other
books, blogs & video series that I have found helpful @
https://blog.nandotech.com/post/2018-04-09-learning-go-resources-and-my-journey/



On Fri, Apr 13, 2018 at 12:34 PM andrey mirtchovski 
wrote:

> If you're looking for general examples of modern Go, perhaps the
> JustForFunc series will be of interest:
>
> https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw
>
> On Fri, Apr 13, 2018 at 10:28 AM, JM  wrote:
> > thanks. I run a software engineering team so I've been less hands-on
> lately
> > and want to get back into keeping my skills current.
> >
> >
> > On Friday, April 13, 2018 at 10:14:08 AM UTC-6, JM wrote:
> >>
> >> Where can I find some examples of using go that uses the latest
> releases?
> >> I went to golang.org but still looking. I am aware of gobyexample.com
> but
> >> not sure if it's kept updated as new builds are released.
> >> thanks.
> >
> > --
> > 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://groups.google.com/d/optout.
>
> --
> 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://groups.google.com/d/optout.
>
-- 


Fernando Rodriguez
President // Software Development
(561) 757-7187
www.nandotech.com
ferna...@nandotech.com

-- 
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://groups.google.com/d/optout.


Re: [go-nuts] Re: Implementing JDBC Driver

2018-04-14 Thread Philip Chapman
There is nothing particularly magic about JDBC.  It's just an
implementation of a RDBMS' communication protocol either implemented in
Java or a Java wrapper around a C library that implements the protocol.  If
you have access to the source of the JDBC driver in question, you could
probably use that for inspiration in creating a driver in golang.  If not,
I'd look to see if there are C drivers for the RDBMS.

You could interface with a JDBC driver but then you have to deal with
making sure there is a Java runtime installed.  You have to deal with the
headache of native-to-java library calls.  It's a mess, really.

One final option could be to write yourself a restful or some other kind of
service in Java which will run the queries for you and return your
results.  All the typical warnings about security risks, injection attacks,
etc.  It would be better to write an actual service than something that
just consumed SQL and returned results.  It's not pure Go, but that's OK.
Use Java where it makes sense and use Go where it makes sense.

On Sat, Apr 14, 2018 at 7:51 AM, Asif Jalil  wrote:

> If Netezza can work with IBM CLI interface, then you can check out the Go
> CLI driver that I wrote for DB2: https://github.com/asifjalil/cli.
>
> Thanks.
>
> On Friday, April 13, 2018 at 2:49:59 PM UTC-4, Ken Bailey wrote:
>>
>> So at my new Job I'm the only one using Go and it's going quite well, but
>> i'm having to extract data from our Netezza database using java or python,
>> load it into .csv files and then work with it using Go. I'd much rather use
>> Go for everything, especially as I'm planning to build some tools that
>> would require me to have direct DB access.
>>
>> I've done some research and I haven't been able to find any Go JDBC
>> drivers that are currently being developed or full featured. The closest
>> I've found is >> https://github.com/japettyjohn/go-jdbc but development
>> stopped about 3 years ago.
>>
>> I'd definitely be willing to dedicate the time and write this myself so
>> the community can benefit, but I have a couple questions before I get
>> started.
>> 1. Am I missing something? Is there a library out there that allows for
>> what I'm trying to do?
>> 2. Does anyone have any experience writing a JDBC driver?
>> 3. Is this a worthwhile endeavor? Is there a reason a full featured Go
>> JDBC driver doesn't exist?
>> 4. Would anyone like to join me on this journey?
>>
>> I appreciate your time.
>>
>> Ken
>>
> --
> 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://groups.google.com/d/optout.
>



-- 
Philip A. Chapman
Java Software Development
Enterprise, Web, and Desktop

-- 
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://groups.google.com/d/optout.


Re: [go-nuts] Re: All the Go project history, live in RAM

2018-04-14 Thread Brad Fitzpatrick
Yeah, I think that should work.

IIRC, the cache files aren't appended to, but atomically rewritten &
replaced.

So running two on the same filesystem will waste a bit of network & disk
I/O, but it should be correct.


On Sat, Apr 14, 2018 at 5:25 PM, Dmitri Shuralyov 
wrote:

> Brad, another question.
>
> I've read the documentation at https://godoc.org/golang.org/
> x/build/maintner/godata, but it doesn't make it clear: is it
> safe/supported to have more than 1 process on one machine call godata.Get
> and use returned maintner.Corpus at the same time?
>
> I know each call uses the same underlying cache directory on disk. Or is
> it unsupported/will cause data corruption and other problems?
>
> (Indirectly, I'm asking if it's safe to call maintner.NewNetworkMutationSource
> multiple times with the same cacheDir parameter.)
>
>
> On Sunday, April 30, 2017 at 5:42:03 PM UTC-4, bradfitz wrote:
>>
>> Gophers,
>>
>> Want to analyze the Go project's Git, GitHub, and Gerrit history?
>>
>> Here a package to make it easy:
>>
>>  https://godoc.org/golang.org/x/build/maintner/godata
>>
>> See the example:
>>
>> https://godoc.org/golang.org/x/build/maintner/godata#example
>> -Get--NumComments
>>
>> If you run that, it'll download 350 MB (once) and then tell you there
>> have been 111228 GitHub comments on Go repos.
>>
>> Run it again a few seconds later and the number might increase.
>>
>> The data is generally under 1 second behind reality, thanks to the
>> webhook+incoming-SMTP server we run now at https://pubsubhelper.golang
>> .org/ to get updates from GitHub & Gerrit.
>>
>> gopherbot now uses this infrastructure. See https://github.com/golang/
>> build/blob/master/cmd/gopherbot/gopherbot.go for some more examples.
>>
>> Thanks to Kevin Burke for all the help & code reviews.
>>
>> - Brad
>>
>> --
> 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://groups.google.com/d/optout.
>

-- 
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://groups.google.com/d/optout.


[go-nuts] Re: All the Go project history, live in RAM

2018-04-14 Thread Dmitri Shuralyov
Brad, another question.

I've read the documentation at 
https://godoc.org/golang.org/x/build/maintner/godata, but it doesn't make 
it clear: is it safe/supported to have more than 1 process on one machine 
call godata.Get and use returned maintner.Corpus at the same time?

I know each call uses the same underlying cache directory on disk. Or is it 
unsupported/will cause data corruption and other problems?

(Indirectly, I'm asking if it's safe to call 
maintner.NewNetworkMutationSource multiple times with the same cacheDir 
parameter.)


On Sunday, April 30, 2017 at 5:42:03 PM UTC-4, bradfitz wrote:
>
> Gophers,
>
> Want to analyze the Go project's Git, GitHub, and Gerrit history?
>
> Here a package to make it easy:
>
>  https://godoc.org/golang.org/x/build/maintner/godata
>
> See the example:
>
> 
> https://godoc.org/golang.org/x/build/maintner/godata#example-Get--NumComments
>
> If you run that, it'll download 350 MB (once) and then tell you there have 
> been 111228 GitHub comments on Go repos.
>
> Run it again a few seconds later and the number might increase.
>
> The data is generally under 1 second behind reality, thanks to the 
> webhook+incoming-SMTP server we run now at 
> https://pubsubhelper.golang.org/ to get updates from GitHub & Gerrit.
>
> gopherbot now uses this infrastructure. See 
> https://github.com/golang/build/blob/master/cmd/gopherbot/gopherbot.go 
> for some more examples.
>
> Thanks to Kevin Burke for all the help & code reviews.
>
> - Brad
>
>

-- 
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://groups.google.com/d/optout.


Re: [go-nuts] sync.Cond implementation

2018-04-14 Thread Penguin Enormous
Could it be this:

Initially wait == notify == 0

Waiter Signaler

479 atomic.Xadd(, 1) = 1

522 atomic.Load() = 0
atomic.Load() = 0

523 return (because those above are equal)

485 notifyListWait(l, t) (blocked forever)

But looking at your answer, I see that you may imply certain race 
conditions are allowed. Could you explain a bit more on that? Aren't race 
conditions supposedly bad?

If atomic load should always returns the last atomic write to a memory 
location and if I make absolutely sure that the last atomic write finish at 
a specific time instant earlier than the atomic load, I can never get data 
written before that last atomic write, is that what you meant?

-- 
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://groups.google.com/d/optout.


[go-nuts] Re: Implementing JDBC Driver

2018-04-14 Thread Asif Jalil
If Netezza can work with IBM CLI interface, then you can check out the Go 
CLI driver that I wrote for DB2: https://github.com/asifjalil/cli. 

Thanks.

On Friday, April 13, 2018 at 2:49:59 PM UTC-4, Ken Bailey wrote:
>
> So at my new Job I'm the only one using Go and it's going quite well, but 
> i'm having to extract data from our Netezza database using java or python, 
> load it into .csv files and then work with it using Go. I'd much rather use 
> Go for everything, especially as I'm planning to build some tools that 
> would require me to have direct DB access. 
>
> I've done some research and I haven't been able to find any Go JDBC 
> drivers that are currently being developed or full featured. The closest 
> I've found is >> https://github.com/japettyjohn/go-jdbc but development 
> stopped about 3 years ago.
>
> I'd definitely be willing to dedicate the time and write this myself so 
> the community can benefit, but I have a couple questions before I get 
> started.
> 1. Am I missing something? Is there a library out there that allows for 
> what I'm trying to do?
> 2. Does anyone have any experience writing a JDBC driver?
> 3. Is this a worthwhile endeavor? Is there a reason a full featured Go 
> JDBC driver doesn't exist?
> 4. Would anyone like to join me on this journey?
>
> I appreciate your time.
>
> Ken
>

-- 
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://groups.google.com/d/optout.


[go-nuts] Implementing JDBC Driver

2018-04-14 Thread Tamás Gulácsi
Btw it seems that Netezza uses postgres under the hood, so you can try the 
native pg or pgx drivers, too!

https://www.ibm.com/support/knowledgecenter/SSULQD_7.2.1/com.ibm.nz.datacon.doc/c_datacon_architecture-JDBC.html

-- 
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://groups.google.com/d/optout.


[go-nuts] Implementing JDBC Driver

2018-04-14 Thread Tamás Gulácsi
Wouldn't ODBC be an option?

-- 
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://groups.google.com/d/optout.