Hacker News new | past | comments | ask | show | jobs | submit login

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




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.


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?


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


- Serve assets that need some transformation through a js script(uglify,LESS,...)

- Provide a scripting layer to an executable.

- Re-implement nodejs in Go ...


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


Multiple return values zomg is a tempting reason to change .


In theory one can reimplement Node on Go runtime, instead of libuv and other libraries Node uses for binding the V8 to the OS.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: