TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Proposal for a Go Interpreter

114 点作者 mhfs超过 9 年前

12 条评论

zamalek超过 9 年前
&gt; To provide an interpreter that can embed inside a Go application, in order to provide scriptability to the Go ecosystem at large.<p>Can we move away from scripting engines at some point. They are big black boxes that you throw characters into and then &quot;things&quot; happen that you have no control over.<p>* What if I <i>don&#x27;t</i> want the security?<p>* What if I want more security?<p>* What if I want actual pointers?<p>* What if I want to do one of a million things that don&#x27;t fall into the original assumptions about what a Go interpreter would do?<p>Compiler-as-a-service is the future. A high quality parse tree, with a built-in interpreter or possibly JITter. Refactoring tools and tons of other cool things can be built instead of the same old black box.<p>If it&#x27;s just going to be another plain-old interpreter, it would be best to instead focus on integrating V8 because a Go interpreter would bring far less to the table (notably interpreters are typically slow and one of the big benefits of Go is that it can be fast).
评论 #10180866 未加载
评论 #10180549 未加载
评论 #10180532 未加载
评论 #10182549 未加载
ecnahc515超过 9 年前
FYI: To view it without the &#x27;suggestions&#x27; just go to the right and change your own mode to view. Then the stupid changes other are suggesting wont show.
评论 #10179878 未加载
mratzloff超过 9 年前
Go is a great language. But why on Earth would you want to script with it?
评论 #10179915 未加载
评论 #10179841 未加载
评论 #10182573 未加载
评论 #10180111 未加载
zupa-hu超过 9 年前
That would be totally amazing. I played with the idea of letting clients run custom code on my servers but that didn&#x27;t materialize so far due to the amount of work required to safely allow that. Being able to do that easily would certainly make online tools more configurable for power-users - or let an application-economy flourish where users can share small snippets that customizes a service in given ways.<p>For reference, I run a website analyzing service that crawls websites every week or so and reports errors, mainly broken links. As all the document sources are available at TCP level it would be trivial to extend it with custom error reporting.
评论 #10181614 未加载
veidr超过 9 年前
&gt; <i>Wow, this file is really popular! Some tools might be unavailable until the crowd clears. [Try again] [Dismiss]</i><p>Tangential question: Is it documented anywhere how many simultaneous users a Google Doc can have?
评论 #10180314 未加载
jfindley超过 9 年前
Given how fast go code compiles, I wonder how many use-cases for interpreted Go code would be solved by a good plugin system? Certainly for the use-cases where I would use this proposal, I&#x27;d be just as happy (if not happier) with a plugin system - which is probably a bunch less effort to implement, too.<p>There was originally a proposal for a fairly promising plugin architecture for 1.5 - it didn&#x27;t make the cut, in the end, but there might be some PoC bits out there if anyone&#x27;s interested.
ansible超过 9 年前
I used to use Lua a bit for scripting, so I was thinking about that as a scripting language for golang too.<p>After some discussion with a friend, we decide that a golang interpreter would be the best solution though. It could allow you to use channels to communicate between the interpreted and compiled sides of the app. Spawning goroutines on either side would also be handy.<p>However, that was yet one more project on my list of side projects that I haven&#x27;t gotten to... So it is nice to see some interest in this idea.
评论 #10180495 未加载
samuell超过 9 年前
I was surprised the GoRe REPL [1] was not in the list of existing tools [2]?<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;motemen&#x2F;gore" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;motemen&#x2F;gore</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;sbinet&#x2F;notes-and-todos&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sbinet&#x2F;notes-and-todos&#x2F;blob&#x2F;master&#x2F;README...</a>
评论 #10182029 未加载
amelius超过 9 年前
Go is one of the fastest compilers around. I think compile-speed was one of the design-goals. Hence, what additional benefit would an interpreter have?
评论 #10182242 未加载
andrewchambers超过 9 年前
Please stop with the vandalism.
评论 #10179710 未加载
andyfleming超过 9 年前
Why would there be &quot;legal issues may restrict use of an interpreter in iOS applications&quot;?
评论 #10180068 未加载
评论 #10179933 未加载
alexschleber超过 9 年前
Here is a potentially more urgent idea: Create a transpiler Javascript to Go. Now THAT would get my attention.
评论 #10184286 未加载
评论 #10179922 未加载