Re: [go-nuts] Tail call optimization

2018-03-27 Thread Linker Lin
become +1
TCO is very important for porting other FP lang to Go.

On Monday, February 14, 2011 at 4:25:24 AM UTC+8, Eoghan Sherry wrote:
>
> On 13 February 2011 08:51, chris dollin  > wrote:
> > On 13 February 2011 10:34, Erwin > 
> wrote:
> >>>
> >>> There are no such plans for gc (6g, 5g, 8g).
> >>> Personally, I find meaningful stack traces helpful more
> >>> often than I find myself using unbounded tail recursions.
> >>> I have on other projects used gcc -fno-optimize-sibling-calls
> >>> precisely to make stack traces more useful.
> >>>
> >> Wouldn't a gc -no-optimize mode be a good thing to have once 
> optimizations
> >> get in the way of debugging?
> >
> > If I'm assuming/relying on tail-call optimisation in my coding, then
> > turning it off "for debugging" will likely make my program crash
> > demanding more stack frames.
> >
> > We all have our choices: I'd rather have guaranteed TCO than full
> > stack-frames for debugging, but I don't think it's unreasonable for
> > someone else to have the opposite preference.
>
> I found Newsqueak's become statement a nice fit for TCO in an
> imperative setting.
>
> func sum(a, b uint) uint {
> if a == 0 {
> return b
> }
> become sum(a-1, b+1)
> }
>
> Eoghan
>
>

-- 
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] Modifying AST and preserving comments

2018-03-27 Thread Fatih Arslan
Best way I found is to print the whole file and then substract the parts
you're interested. The reason for that is that comments are two fold. Some
of the comments are part of the node, some of them are part of *ast.File
(also called lossy comments). If you just print the node, you'll don't get
the ones that are part of the file. Here is an example how I use this
technique for gomodifytags:
https://github.com/fatih/gomodifytags/blob/master/main.go#L470


On Tue, Mar 27, 2018 at 6:32 AM, Traun Leyden 
wrote:

>
> I'm trying to modify a source file and replace some function parameters
> based on their names.  I was able to get some basics working by following this
> tutorial , however when I write the
> new file, it's deleting the existing comments.
>
> It looks like just the act of reading in the source and rewriting it is
> stripping the comments:
>
>
> func main() {
>
>   // --- Start test file contents
>
>   testFileContents := `
>
>   //  Licensed under the Apache License...
>
>   package main
>
>   const (
>
> kMaxRecentSequences = 20 // Maximum number of sequences stored in 
> RecentSequences before pruning is triggered
>
>   )
>
>    READING DOCUMENTS:
>
>   func fakeFunc(docid string) string {
>
> return docid
>
>   }
>
>   func main() {
>
> fakeFunc("foo")  // Call fakeFunc
>
>   }`
>
>   // --- End test file contents
>
>   err := ioutil.WriteFile("/tmp/source.go", []byte(testFileContents), 
> 0644)
>
>   if err != nil {
>
>   log.Fatal(err)
>
>   }
>
>   fset := token.NewFileSet()
>
>   node, err := parser.ParseFile(fset, "/tmp/source.go", nil, 0)
>
>   if err != nil {
>
>   log.Fatal(err)
>
>   }
>
>   ast.Inspect(node, func(n ast.Node) bool {
>
>   return true
>
>   })
>
>   f, err := os.Create("/tmp/source_modified.go")
>
>   defer f.Close()
>
>   if err := printer.Fprint(f, fset, node); err != nil {
>
>   log.Fatal(err)
>
>   }
>
> }
>
>
> The rewritten source code in /tmp/source_modified.go is:
>
>
> package main
>
> const (
>
>   kMaxRecentSequences = 20
>
> )
>
> func fakeFunc(docid string) string {
>
>   return docid
>
> }
>
> func main() {
>
>   fakeFunc("foo")
>
> }
>
>
>
> What's the best way to manipulate the AST while preserving comments?
> Would using https://godoc.org/golang.org/x/tools/go/ast/astutil#Apply
> improve the situation?
>
>
> --
> 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.
>



-- 
Fatih Arslan

-- 
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: Mac OS Bluetooth Gamepad

2018-03-27 Thread Egon
Usually controllers don't speak directly to your application nor browser.

Usually there is a driver that the controller has, this talks with the 
appropriate protocol to the device. The driver itself provides some common 
HID api that the OS has specified.

The reading and writing the input is effectively about communicating with 
the OS.

https://github.com/glfw/glfw/blob/master/src/linux_joystick.c
https://github.com/glfw/glfw/blob/master/src/win32_joystick.c

You can do those calls using syscall package, e.g. one for Windows

https://github.com/egonelbre/exp/blob/master/game/gamepad/xinput_windows.go

and a quick search on godoc.org revealed this:
https://godoc.org/?q=joystick
https://github.com/simulatedsimian/joystick

Of course since it's OS specific, you need to implement for all of them. 
Where each might their own quirks.

SDL and GLFW are both thoroughly tested. I'm not sure about the existing 
package, but it shouldn't be difficult to switch when you do encounter 
problems with the pure Go libs.

+ Egon

On Tuesday, 27 March 2018 05:19:24 UTC+3, Zellyn wrote:
>
> Inspired by a Wired article 
>  mentioning 
> XBox One gamepads for $34, I finally got a game controller.
>
> Naturally, now I'm wondering how to read it from Go :-)
>
> It connects to Mac OS over Bluetooth. Various games seem to vary in 
> whether they recognize or even notice it, but it works flawlessly in Chrome 
> using http://html5gamepad.com/ 
> 
>
> So, if there's anyone here who even begins to know how gamepads work… am I 
> about to wade into an ocean of pain? I'd *like* to avoid linking to sdl 
> as gobot seems to do for joysticks: it would be lovely to have something in 
> pure Go. Is that unlikely?
>
> How are games (and Chrome) even finding the controller? Do they have to 
> interrogate the Bluetooth stack, and then speak both Bluetooth and the XBox 
> controller protocol?
>
> Any help appreciated.
>
> Zellyn
>
>

-- 
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: Mac OS Bluetooth Gamepad

2018-03-27 Thread Egon
Ah, just noticed the Mac part...

https://github.com/glfw/glfw/blob/master/src/cocoa_joystick.m

Also Chromium source for the Gamepad implementation:

https://cs.chromium.org/chromium/src/device/gamepad/?q=gamepad&sq=package:chromium&dr

Unfortunately I didn't notice a Go gamepad implementation for Mac... 
however there might be one.

On Tuesday, 27 March 2018 15:02:10 UTC+3, Egon wrote:
>
> Usually controllers don't speak directly to your application nor browser.
>
> Usually there is a driver that the controller has, this talks with the 
> appropriate protocol to the device. The driver itself provides some common 
> HID api that the OS has specified.
>
> The reading and writing the input is effectively about communicating with 
> the OS.
>
> https://github.com/glfw/glfw/blob/master/src/linux_joystick.c
> https://github.com/glfw/glfw/blob/master/src/win32_joystick.c
>
> You can do those calls using syscall package, e.g. one for Windows
>
> https://github.com/egonelbre/exp/blob/master/game/gamepad/xinput_windows.go
>
> and a quick search on godoc.org revealed this:
> https://godoc.org/?q=joystick
> https://github.com/simulatedsimian/joystick
>
> Of course since it's OS specific, you need to implement for all of them. 
> Where each might their own quirks.
>
> SDL and GLFW are both thoroughly tested. I'm not sure about the existing 
> package, but it shouldn't be difficult to switch when you do encounter 
> problems with the pure Go libs.
>
> + Egon
>
> On Tuesday, 27 March 2018 05:19:24 UTC+3, Zellyn wrote:
>>
>> Inspired by a Wired article 
>>  mentioning 
>> XBox One gamepads for $34, I finally got a game controller.
>>
>> Naturally, now I'm wondering how to read it from Go :-)
>>
>> It connects to Mac OS over Bluetooth. Various games seem to vary in 
>> whether they recognize or even notice it, but it works flawlessly in Chrome 
>> using http://html5gamepad.com/ 
>> 
>>
>> So, if there's anyone here who even begins to know how gamepads work… am 
>> I about to wade into an ocean of pain? I'd *like* to avoid linking to 
>> sdl as gobot seems to do for joysticks: it would be lovely to have 
>> something in pure Go. Is that unlikely?
>>
>> How are games (and Chrome) even finding the controller? Do they have to 
>> interrogate the Bluetooth stack, and then speak both Bluetooth and the XBox 
>> controller protocol?
>>
>> Any help appreciated.
>>
>> Zellyn
>>
>>

-- 
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.


Fwd: [go-nuts] Fixing the version of protoc-gen-go

2018-03-27 Thread Stephan Renatus
Hi Amit,

have you tried this?

go install ./vendor/github.com/golang/protobuf/protoc-gen-go

Also note that you might have to add a required statement to Gopkg.toml to
avoid having the binary's code pruned, see https://github.com/golang/dep/
blob/master/docs/Gopkg.toml.md#package-graph-rules-required-and-ignored

HTH
Stephan

-- 
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: Mac OS Bluetooth Gamepad

2018-03-27 Thread Zellyn
Thanks for the pointers. I spent some time last night finding the gamepad 
code in the Chromium sources, although I haven't had a chance to really 
read it properly.

It makes sense that you'd read against some kind of OS-specific 
abstraction, but I was curious what it was because I don't see any gamepad 
config or listing in the Mac OS Settings panels.

Sounds like I'm going to be reading some source code… :-)

Thanks again,

Zellyn


On Tuesday, March 27, 2018 at 8:31:23 AM UTC-4, Egon wrote:
>
> Ah, just noticed the Mac part...
>
> https://github.com/glfw/glfw/blob/master/src/cocoa_joystick.m
>
> Also Chromium source for the Gamepad implementation:
>
>
> https://cs.chromium.org/chromium/src/device/gamepad/?q=gamepad&sq=package:chromium&dr
>
> Unfortunately I didn't notice a Go gamepad implementation for Mac... 
> however there might be one.
>
> On Tuesday, 27 March 2018 15:02:10 UTC+3, Egon wrote:
>>
>> Usually controllers don't speak directly to your application nor browser.
>>
>> Usually there is a driver that the controller has, this talks with the 
>> appropriate protocol to the device. The driver itself provides some common 
>> HID api that the OS has specified.
>>
>> The reading and writing the input is effectively about communicating with 
>> the OS.
>>
>> https://github.com/glfw/glfw/blob/master/src/linux_joystick.c
>> https://github.com/glfw/glfw/blob/master/src/win32_joystick.c
>>
>> You can do those calls using syscall package, e.g. one for Windows
>>
>>
>> https://github.com/egonelbre/exp/blob/master/game/gamepad/xinput_windows.go
>>
>> and a quick search on godoc.org revealed this:
>> https://godoc.org/?q=joystick
>> https://github.com/simulatedsimian/joystick
>>
>> Of course since it's OS specific, you need to implement for all of them. 
>> Where each might their own quirks.
>>
>> SDL and GLFW are both thoroughly tested. I'm not sure about the existing 
>> package, but it shouldn't be difficult to switch when you do encounter 
>> problems with the pure Go libs.
>>
>> + Egon
>>
>> On Tuesday, 27 March 2018 05:19:24 UTC+3, Zellyn wrote:
>>>
>>> Inspired by a Wired article 
>>>  mentioning 
>>> XBox One gamepads for $34, I finally got a game controller.
>>>
>>> Naturally, now I'm wondering how to read it from Go :-)
>>>
>>> It connects to Mac OS over Bluetooth. Various games seem to vary in 
>>> whether they recognize or even notice it, but it works flawlessly in Chrome 
>>> using http://html5gamepad.com/ 
>>> 
>>>
>>> So, if there's anyone here who even begins to know how gamepads work… am 
>>> I about to wade into an ocean of pain? I'd *like* to avoid linking to 
>>> sdl as gobot seems to do for joysticks: it would be lovely to have 
>>> something in pure Go. Is that unlikely?
>>>
>>> How are games (and Chrome) even finding the controller? Do they have to 
>>> interrogate the Bluetooth stack, and then speak both Bluetooth and the XBox 
>>> controller protocol?
>>>
>>> Any help appreciated.
>>>
>>> Zellyn
>>>
>>>

-- 
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] Tail call optimization

2018-03-27 Thread Ian Lance Taylor
On Tue, Mar 27, 2018 at 12:05 AM, Linker Lin  wrote:
> become +1
> TCO is very important for porting other FP lang to Go.

This is https://golang.org/issue/22624.

Ian


> On Monday, February 14, 2011 at 4:25:24 AM UTC+8, Eoghan Sherry wrote:
>>
>> On 13 February 2011 08:51, chris dollin  wrote:
>> > On 13 February 2011 10:34, Erwin  wrote:
>> >>>
>> >>> There are no such plans for gc (6g, 5g, 8g).
>> >>> Personally, I find meaningful stack traces helpful more
>> >>> often than I find myself using unbounded tail recursions.
>> >>> I have on other projects used gcc -fno-optimize-sibling-calls
>> >>> precisely to make stack traces more useful.
>> >>>
>> >> Wouldn't a gc -no-optimize mode be a good thing to have once
>> >> optimizations
>> >> get in the way of debugging?
>> >
>> > If I'm assuming/relying on tail-call optimisation in my coding, then
>> > turning it off "for debugging" will likely make my program crash
>> > demanding more stack frames.
>> >
>> > We all have our choices: I'd rather have guaranteed TCO than full
>> > stack-frames for debugging, but I don't think it's unreasonable for
>> > someone else to have the opposite preference.
>>
>> I found Newsqueak's become statement a nice fit for TCO in an
>> imperative setting.
>>
>> func sum(a, b uint) uint {
>> if a == 0 {
>> return b
>> }
>> become sum(a-1, b+1)
>> }
>>
>> Eoghan
>
> --
> 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: Mac OS Bluetooth Gamepad

2018-03-27 Thread Egon
https://developer.apple.com/library/content/documentation/ServicesDiscovery/Conceptual/GameControllerPG/Introduction/Introduction.html

https://developer.apple.com/documentation/gamecontroller

I have no idea why they don't include some Gamepad thing in the settings 
panel.

On Tuesday, 27 March 2018 16:07:16 UTC+3, Zellyn wrote:
>
> Thanks for the pointers. I spent some time last night finding the gamepad 
> code in the Chromium sources, although I haven't had a chance to really 
> read it properly.
>
> It makes sense that you'd read against some kind of OS-specific 
> abstraction, but I was curious what it was because I don't see any gamepad 
> config or listing in the Mac OS Settings panels.
>
> Sounds like I'm going to be reading some source code… :-)
>
> Thanks again,
>
> Zellyn
>
>
> On Tuesday, March 27, 2018 at 8:31:23 AM UTC-4, Egon wrote:
>>
>> Ah, just noticed the Mac part...
>>
>> https://github.com/glfw/glfw/blob/master/src/cocoa_joystick.m
>>
>> Also Chromium source for the Gamepad implementation:
>>
>>
>> https://cs.chromium.org/chromium/src/device/gamepad/?q=gamepad&sq=package:chromium&dr
>>
>> Unfortunately I didn't notice a Go gamepad implementation for Mac... 
>> however there might be one.
>>
>> On Tuesday, 27 March 2018 15:02:10 UTC+3, Egon wrote:
>>>
>>> Usually controllers don't speak directly to your application nor browser.
>>>
>>> Usually there is a driver that the controller has, this talks with the 
>>> appropriate protocol to the device. The driver itself provides some common 
>>> HID api that the OS has specified.
>>>
>>> The reading and writing the input is effectively about communicating 
>>> with the OS.
>>>
>>> https://github.com/glfw/glfw/blob/master/src/linux_joystick.c
>>> https://github.com/glfw/glfw/blob/master/src/win32_joystick.c
>>>
>>> You can do those calls using syscall package, e.g. one for Windows
>>>
>>>
>>> https://github.com/egonelbre/exp/blob/master/game/gamepad/xinput_windows.go
>>>
>>> and a quick search on godoc.org revealed this:
>>> https://godoc.org/?q=joystick
>>> https://github.com/simulatedsimian/joystick
>>>
>>> Of course since it's OS specific, you need to implement for all of them. 
>>> Where each might their own quirks.
>>>
>>> SDL and GLFW are both thoroughly tested. I'm not sure about the existing 
>>> package, but it shouldn't be difficult to switch when you do encounter 
>>> problems with the pure Go libs.
>>>
>>> + Egon
>>>
>>> On Tuesday, 27 March 2018 05:19:24 UTC+3, Zellyn wrote:

 Inspired by a Wired article 
  
 mentioning XBox One gamepads for $34, I finally got a game controller.

 Naturally, now I'm wondering how to read it from Go :-)

 It connects to Mac OS over Bluetooth. Various games seem to vary in 
 whether they recognize or even notice it, but it works flawlessly in 
 Chrome 
 using http://html5gamepad.com/ 
 

 So, if there's anyone here who even begins to know how gamepads work… 
 am I about to wade into an ocean of pain? I'd *like* to avoid linking 
 to sdl as gobot seems to do for joysticks: it would be lovely to have 
 something in pure Go. Is that unlikely?

 How are games (and Chrome) even finding the controller? Do they have to 
 interrogate the Bluetooth stack, and then speak both Bluetooth and the 
 XBox 
 controller protocol?

 Any help appreciated.

 Zellyn



-- 
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] [ANN] github release notes builder, based on PR history

2018-03-27 Thread Alex Buchanan
I created a simple utility to build release notes based on github pull 
request history, if anyone finds it 
useful: https://github.com/buchanae/github-release-notes

Example results: https://github.com/ohsu-comp-bio/funnel/releases/tag/0.6.0

Cheers.

-- 
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: vertical search engine go concurrency

2018-03-27 Thread Drew Derbyshire
As Andre noted, I don't think you have provided sufficient information.

I'd go further: *Stop*,  Determine what you (and your developer) need to 
know. 

Decide what you want, and write a specification. If you have to ask 
"specification for what", make a list what you don't know.  Does the 
specification need to be long?  No, but it has to define your problem(s) 
and solution(s). 

You can do the specification writing or the contractor can -- but if you 
have questions after reading it, get them written down and answered in the 
specification. You are just asking for trouble to ask a remote developer 
(across town or across the sea) to write a complex application backend if 
you don't understand what you asking for.

-ahd-

-- 
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: gRPC golang server and client testing

2018-03-27 Thread kun
You may want to have a look at this link:

https://github.com/grpc/grpc-go/blob/master/Documentation/gomock-example.md

On Saturday, April 23, 2016 at 12:31:19 PM UTC-7, Sankar wrote:
>
> Hi
>
> I have a .proto file which I ran with protoc to generate the _pb.go file. 
> I then wrote a server and a client program that uses the above _pb.go 
> program. Now what is the best way to unit test the server and client pieces 
> ? (complete with mocking, benchmarks for both client and server; end-to-end 
> testing, etc.)
>
> IOW, I am trying to find out the test programs for 
> https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_server/main.go
>  
> and 
> https://github.com/grpc/grpc-go/blob/master/examples/helloworld/greeter_client/main.go
>  
>
> Thanks.
>
> Sankar
>

-- 
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] [JOB] Platform Engineer openings @ Lytics

2018-03-27 Thread aimeelevensconsulting
Hi all!

I'm hiring a couple of Engineers to join the platform team at Lytics in 
downtown Portland - while the team uses Go, experience is not required in 
Go for the positions, just some backend experience and an interest in 
working in distributed systems. Best of all we're hiring at all levels, so 
open to candidates from junior to senior level! Here's the basics:

*What You'll Be Doing*



*In this role,  you’ll be providing the backbone on which Lytics' 
cutting-edge features are built. Collaborating with team members, you’ll 
design, document, and implement large-scale distributed stream processing 
solutions, maintain cloud infrastructure, and manage deployments. In 
addition, you’ll provide tooling and infrastructure for our customer 
success, integrations, and front-end teams.*

*Our Tech Stack*

*Lytics’ backend is in Go, and frontend is in JavaScript. We’re using 
BigTable, HBase, Cassandra, ElasticSearch. We use Kubernetes for 
deployments, Google Cloud Platform for storage, and use stream processing 
systems similar to Spark and Storm.*

For the complete job posting and to apply online, click here: 
http://www.lytics.com/company/careers. If you have any questions feel free 
to ping me over at aimee.lev...@lytics.com.

thanks!

Aimee Levens
Recruiting Consultant

-- 
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: vertical search engine go concurrency

2018-03-27 Thread Chris Sahm
This certainly helps me think about the problem/solution better. Thank you!

On Monday, March 26, 2018 at 4:50:01 PM UTC-7, Andre Scholtz wrote:
>
> Hi Chris,
>
> I am not sure that you have provided sufficient information for a good 
> response. The performance of your search will depend a lot more on the way 
> in which your data is being stored and retrieved. 
>
> For example, having multiple database queries running on the same data 
> would probably not provide much improvement and may even produce worse 
> results.
> If you had multiple *different* tables or data sources which needed 
> searching at the same time, that may be a better place to run multiple 
> concurrent searches.
>
>
> On Monday, March 26, 2018 at 3:22:15 PM UTC-7, Chris Sahm wrote:
>>
>>
>> I'm a novice developer who is paying a developer overseas to code a 
>> vertical search engine web app using mainly golang. It's very similar  to 
>> indeed.com. My question is would go concurrency be a good solution for 
>> speeding up searches within the site? If so, which package might implement 
>> that?
>>
>> It seems that there would need to be a local variable generator which 
>> would create a variable containing the search criteria, then in an almost 
>> ad-hoc way launch go routines. Maybe this is a completely useless 
>> implementation of go concurrency, but I'd like to pose the question before 
>> writing it off completely. 
>>
>> Any clues to whether this is possible, worth the hassle and/or package 
>> name(s) would be greatly appreciated.  
>>
>>

-- 
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: vertical search engine go concurrency

2018-03-27 Thread Chris Sahm
I suspect I'm going to learn a lot about what not to do through this 
experience. Really, I just wanted to know if golang's concurrency features 
could be used to make search faster in this vaguely defined scenario and 
maybe if it makes sense to. The latter part of the question will be 
determined months down the road I suspect.

On Tuesday, March 27, 2018 at 3:16:12 PM UTC-7, Drew Derbyshire wrote:
>
> As Andre noted, I don't think you have provided sufficient information.
>
> I'd go further: *Stop*,  Determine what you (and your developer) need to 
> know. 
>
> Decide what you want, and write a specification. If you have to ask 
> "specification for what", make a list what you don't know.  Does the 
> specification need to be long?  No, but it has to define your problem(s) 
> and solution(s). 
>
> You can do the specification writing or the contractor can -- but if you 
> have questions after reading it, get them written down and answered in the 
> specification. You are just asking for trouble to ask a remote developer 
> (across town or across the sea) to write a complex application backend if 
> you don't understand what you asking for.
>
> -ahd-
>

-- 
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: Mac OS Bluetooth Gamepad

2018-03-27 Thread Fino
it's all about each OS' API; 
for  Windows, u need to find the Win32 API which can read the hardware's 
data out. 
Go can call the API via syscall, or load the DLL in your app.

BR fino 

-- 
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.