News for hackers. Stuff that matters.
Re:V8worker – Minimal Go binding to V8 by romankolpak on Sunday March 29, 2015 @03:50PM (#9286227)
Can someone explain motivation for this? Why would someone need Go bindings for V8? What's the practical applications of this?

Not trying to be a jerk, just plain curiosity

Re:V8worker – Minimal Go binding to V8 by psynapse on Monday March 30, 2015 @10:54AM (#9289900)
This idea definitely has legs for what I do day-to-day. We have a data aggregation framework with hundreds of bots. Due to the fluid nature of maintaining it we use Python. The trade-off for the productivity we require is performance - we use GEvent to mitigate this to a degree.

I have already replaced parts of our suite with components written in Go, but at this point I wouldn't port the pointy end because I don't want to loose the agility that Python allows. If I could spider/parse with JavaScript and at once exploit the Go performance and concurrency features, this would be very attractive.

Funnily enough, the previous incarnation of the same solution was written in C++ with a JavaScript run-time used in exactly the same way. It predates Node.js by some years.

Re:V8worker – Minimal Go binding to V8 by detaro on Sunday March 29, 2015 @03:58PM (#9286260)
Embed javascript as a scripting language into a Go app.

Build bindings to system functions in Go (e.g. write the common parts of an app in JS, run it in V8, write platform-specific things in Go).

Write the next Node.js/Io.js in Go?

Re:V8worker – Minimal Go binding to V8 by nkozyra on Sunday March 29, 2015 @08:40PM (#9287101)
> Embed javascript as a scripting language into a Go app.

Sure, but you could already do that. There are several V8 implementations in Go you could use directly to invoke javascript code, but you'd have to pass values directly in and get return values directly out to interface between the two languages.

Re:V8worker – Minimal Go binding to V8 by aikah on Sunday March 29, 2015 @05:16PM (#9286513)
- Serve assets that need some transformation through a js script(uglify,LESS,...)

- Provide a scripting layer to an executable.

- Re-implement nodejs in Go ...

Re:V8worker – Minimal Go binding to V8 by mtrn on Sunday March 29, 2015 @03:59PM (#9286268)
One use case I see is scriptability: You want to have the flexibility of javascript, but deploy a single binary (Go).

There are quite a few js engines/bindings already for go, like duktape, otto, go-v8, ...

Re:V8worker – Minimal Go binding to V8 by fragglesmock on Sunday March 29, 2015 @06:53PM (#9286801)
Multiple return values zomg is a tempting reason to change .
Re:V8worker – Minimal Go binding to V8 by errordeveloper on Sunday March 29, 2015 @07:49PM (#9286964)
In theory one can reimplement Node on Go runtime, instead of libuv and other libraries Node uses for binding the V8 to the OS.