I've been developing a Smalltalk variant for just the fun of it and I wonder what would be a fellow *ers choice when it comes to targeting a back-end. These were my current considerations:
我一直在开发一个Smalltalk变种,只是为了它的乐趣,我想知道当涉及到后端时,什么是*ers的选择。这些是我目前的考虑因素:
.NET, JVM: These two VM's are mainly for statically typed languages and I assume it would be quite hard to target such a dynamic language like smalltalk.
.NET,JVM:这两个VM主要用于静态类型语言,我认为很难定位像smalltalk这样的动态语言。
Python (as source code): Seems to be the simplest way. Also it would be better if I could emit Python bytecode but it's not well documented as other VM's AFAIK (Need to dig Python's source code for details!).
Python(作为源代码):似乎是最简单的方法。另外,如果我可以发出Python字节码,但它没有被很好地记录为其他VM的AFAIK(需要挖掘Python的源代码以获取详细信息!)。
Self made interpreter: Out of the question as it's no fun :-)
自制翻译:不可能,因为它没有乐趣:-)
LLVM, NekoVM, Parrot are other options I'm checking out. What would be your take on this?
LLVM,NekoVM,Parrot是我正在检查的其他选项。你对此有何看法?
14 个解决方案
#1
15
Don't discount .NET or the JVM so quickly. Dynamic languages are being developed for both (e.g. Groovy, JRuby, Jython on the JVM; IronRuby, IronPython on .NET) and .NET is gaining the "DLR" - Dynamic Language Runtime. (See Jim Hugunin's blog for more details.)
不要这么快地折扣.NET或JVM。正在为两者开发动态语言(例如,Groovy,JRuby,JVM上的JVM; IronRuby,.NET上的IronPython),.NET正在获得“DLR” - 动态语言运行时。 (有关详细信息,请参阅Jim Hugunin的博客。)
#2
4
Parrot is really cool, even if they haven't shipped any "real" code yet. But since the project's just for fun, that shouldn't stop you :D.
Parrot非常酷,即使他们尚未发布任何“真正的”代码。但是因为这个项目只是为了好玩,所以不应该阻止你:D。
#3
4
I would choose the JVM, but mainly because I'm familiar with it.
我会选择JVM,但主要是因为我熟悉它。
Objective reasons for JVM are: main platforms are supported, many libraries and good performance (within the choices you have given it may have the best performance).
JVM的客观原因是:支持主平台,许多库和良好的性能(在您给出的选择中可能具有最佳性能)。
.Net works best on Windows. If you choose it, you should test on Mono to be more platform-neutral.
.Net在Windows上运行最佳。如果你选择它,你应该在Mono上测试更加平台中立。
Python seems a good choice as well. But I think for the JVM more libraries are available.
Python似乎也是一个不错的选择。但我认为对于JVM,可以使用更多的库。
Parrot is in my opinion too fresh, it needs some time to mature. But an interesting alternative for the future.
鹦鹉在我看来太新鲜了,需要一段时间才能成熟。但是对未来来说是一个有趣的选择。
The other choices are new to me, I will take a look at them.
其他选择对我来说是新的,我会看看它们。
#4
3
Since you are trying to implement Smalltalk, why not consider one of smalltalk-inspired VMs for Ruby like YARV or even rubinius. Both are smalltalk-inspired and aim to be high-performance. YARV will be the new standard Ruby VM.
既然您正在尝试实现Smalltalk,那么为什么不考虑使用像YARV甚至rubinius这样的基于小型磁带的虚拟机。两者都是小型的,旨在实现高性能。 YARV将成为新的标准Ruby VM。
#5
3
One adavantage of using Parrot is that it ships with tons of example languages, including a Smalltalk variant called ChitChat. So you can use that as a reference to see how someone else has implemented a similar language on Parrot.
使用Parrot的一个优点是它附带了大量的示例语言,包括名为ChitChat的Smalltalk变体。因此,您可以将其用作参考,以了解其他人如何在Parrot上实现类似的语言。
#6
3
You might want to have a look at PyPy -- while this project exists to implement the Python language in (a subset of) Python, the approach they are taking allows multiple front-ends and multiple back-ends (including CLR, JVM, LLVM, C, and even Smalltalk and JavaScript, I think). For example, work on the JIT has been done using Prolog as the front-end language and CLR as the back-end. So you might join the party to implement Smalltalk and later discover you've also helped someone else implement Prolog without knowing it... :-)
你可能想看看PyPy--虽然这个项目存在于Python的一个子集中实现Python语言,但它们采用的方法允许多个前端和多个后端(包括CLR,JVM,LLVM) ,C,甚至Smalltalk和JavaScript,我认为)。例如,使用Prolog作为前端语言并使用CLR作为后端来完成JIT的工作。所以你可以参加派对来实现Smalltalk,后来发现你也帮助其他人实现Prolog而不知道它...... :-)
#7
2
Factor (http://factorcode.org/) may offer some useful features for this.
因子(http://factorcode.org/)可能为此提供一些有用的功能。
#8
2
If this is for fun, why not start with the codebase for Squeak, which is open source, and modify it. Smalltalk should have a small runtime, and your small fun variant could start with the bootstrap environment from squeak, which is nearly microscopic, and built up from there.
如果这很有趣,为什么不从Squeak的代码库开始,它是开源的,并修改它。 Smalltalk应该有一个小的运行时间,你的小型有趣的变体可以从吱吱声开始,这是几乎是微观的吱吱声,并从那里建立起来。
My big thing against .NET and the JVM is the sheer huge size. Look how small the runtime "operating system to smalltalk" impedence-matching-layer is in Squeak.
我对.NET和JVM的重要作用是庞大的规模。看看运行时“操作系统到smalltalk”阻塞匹配层的小小是在Squeak中。
Shouldn't fun projects be, well...... FUN? Squeak is many things, businesslike is not one of them, but FUN ... definitely.
不应该有趣的项目,好吧......乐趣?吱吱声是很多事情,商业化不是其中之一,但乐趣......绝对。
#9
1
JVM as first choice. It would allow for a wide library support from the day one. See how that benefited Clojure.
JVM作为首选。它将允许从第一天开始提供广泛的图书馆支持。看看这对Clojure有何益处。
Also, LLVM might be interesting choice, but I'm not sure how "proven" it is, since I can't have a mature language implementation with LLVM backend.
此外,LLVM可能是一个有趣的选择,但我不确定它是如何“证明”的,因为我不能拥有LLVM后端的成熟语言实现。
I would avoid .NET. It would make it harder to gather community and support around the your new language, and you are going to need it soon. Also, it is not cross-platform.
我会避免使用.NET。这将使得围绕您的新语言收集社区和支持变得更加困难,并且您很快就会需要它。此外,它不是跨平台的。
Whatever you choose, you will learn a lot by doing so.
无论你选择什么,你都会学到很多东西。
#10
1
JVM is more stable, well documented, and in general less likely to be a moving target than .Net Also you're more likely to find people that can help you out if you go open source. With .Net talent is really scarce, and most work for Microsoft, so they won't likely have the time to help out.
JVM更稳定,文档齐全,并且通常不太可能成为移动目标而不是.Net如果你开源,你更有可能找到可以帮助你的人。由于.Net人才非常稀缺,而且大多数人都为微软工作,因此他们不太可能有时间提供帮助。
#11
0
.NET as the DLR now that sit on top of the CLR for Dynamic language.
.NET作为DLR现在位于动态语言的CLR之上。
#12
0
Do it on .Net, after all you want to do it for fun. So make it a bit challenging. And any findings then can be reported to Microsoft, for improvement in DLR and the languages it supports.
在.Net上做,毕竟你想做的就是为了好玩。所以让它有点挑战。然后可以向Microsoft报告任何调查结果,以改进DLR及其支持的语言。
#13
0
If you're going to look at using .Net, have a look in Beautiful Code -- there's an essay in it about doing dynamic code gen on the .Net CLR.
如果您打算使用.Net,请查看Beautiful Code - 其中有一篇关于在.Net CLR上执行动态代码生成的文章。
#14
0
Definitely .Net using the Dynamic Language Runtime. Your objects will be usable directly by C# and V.Net users by the time you're finished (you are intending to ship something? :-)
绝对是.Net使用动态语言运行时。您完成后,您的对象将由C#和V.Net用户直接使用(您打算发货吗?:-)
In particular, target running under the reduced .Net in SilverLight so you get the latest web rich UI buy-in.
特别是,目标在SilverLight中以简化的.Net运行,因此您可以获得最新的Web丰富UI支持。
#1
15
Don't discount .NET or the JVM so quickly. Dynamic languages are being developed for both (e.g. Groovy, JRuby, Jython on the JVM; IronRuby, IronPython on .NET) and .NET is gaining the "DLR" - Dynamic Language Runtime. (See Jim Hugunin's blog for more details.)
不要这么快地折扣.NET或JVM。正在为两者开发动态语言(例如,Groovy,JRuby,JVM上的JVM; IronRuby,.NET上的IronPython),.NET正在获得“DLR” - 动态语言运行时。 (有关详细信息,请参阅Jim Hugunin的博客。)
#2
4
Parrot is really cool, even if they haven't shipped any "real" code yet. But since the project's just for fun, that shouldn't stop you :D.
Parrot非常酷,即使他们尚未发布任何“真正的”代码。但是因为这个项目只是为了好玩,所以不应该阻止你:D。
#3
4
I would choose the JVM, but mainly because I'm familiar with it.
我会选择JVM,但主要是因为我熟悉它。
Objective reasons for JVM are: main platforms are supported, many libraries and good performance (within the choices you have given it may have the best performance).
JVM的客观原因是:支持主平台,许多库和良好的性能(在您给出的选择中可能具有最佳性能)。
.Net works best on Windows. If you choose it, you should test on Mono to be more platform-neutral.
.Net在Windows上运行最佳。如果你选择它,你应该在Mono上测试更加平台中立。
Python seems a good choice as well. But I think for the JVM more libraries are available.
Python似乎也是一个不错的选择。但我认为对于JVM,可以使用更多的库。
Parrot is in my opinion too fresh, it needs some time to mature. But an interesting alternative for the future.
鹦鹉在我看来太新鲜了,需要一段时间才能成熟。但是对未来来说是一个有趣的选择。
The other choices are new to me, I will take a look at them.
其他选择对我来说是新的,我会看看它们。
#4
3
Since you are trying to implement Smalltalk, why not consider one of smalltalk-inspired VMs for Ruby like YARV or even rubinius. Both are smalltalk-inspired and aim to be high-performance. YARV will be the new standard Ruby VM.
既然您正在尝试实现Smalltalk,那么为什么不考虑使用像YARV甚至rubinius这样的基于小型磁带的虚拟机。两者都是小型的,旨在实现高性能。 YARV将成为新的标准Ruby VM。
#5
3
One adavantage of using Parrot is that it ships with tons of example languages, including a Smalltalk variant called ChitChat. So you can use that as a reference to see how someone else has implemented a similar language on Parrot.
使用Parrot的一个优点是它附带了大量的示例语言,包括名为ChitChat的Smalltalk变体。因此,您可以将其用作参考,以了解其他人如何在Parrot上实现类似的语言。
#6
3
You might want to have a look at PyPy -- while this project exists to implement the Python language in (a subset of) Python, the approach they are taking allows multiple front-ends and multiple back-ends (including CLR, JVM, LLVM, C, and even Smalltalk and JavaScript, I think). For example, work on the JIT has been done using Prolog as the front-end language and CLR as the back-end. So you might join the party to implement Smalltalk and later discover you've also helped someone else implement Prolog without knowing it... :-)
你可能想看看PyPy--虽然这个项目存在于Python的一个子集中实现Python语言,但它们采用的方法允许多个前端和多个后端(包括CLR,JVM,LLVM) ,C,甚至Smalltalk和JavaScript,我认为)。例如,使用Prolog作为前端语言并使用CLR作为后端来完成JIT的工作。所以你可以参加派对来实现Smalltalk,后来发现你也帮助其他人实现Prolog而不知道它...... :-)
#7
2
Factor (http://factorcode.org/) may offer some useful features for this.
因子(http://factorcode.org/)可能为此提供一些有用的功能。
#8
2
If this is for fun, why not start with the codebase for Squeak, which is open source, and modify it. Smalltalk should have a small runtime, and your small fun variant could start with the bootstrap environment from squeak, which is nearly microscopic, and built up from there.
如果这很有趣,为什么不从Squeak的代码库开始,它是开源的,并修改它。 Smalltalk应该有一个小的运行时间,你的小型有趣的变体可以从吱吱声开始,这是几乎是微观的吱吱声,并从那里建立起来。
My big thing against .NET and the JVM is the sheer huge size. Look how small the runtime "operating system to smalltalk" impedence-matching-layer is in Squeak.
我对.NET和JVM的重要作用是庞大的规模。看看运行时“操作系统到smalltalk”阻塞匹配层的小小是在Squeak中。
Shouldn't fun projects be, well...... FUN? Squeak is many things, businesslike is not one of them, but FUN ... definitely.
不应该有趣的项目,好吧......乐趣?吱吱声是很多事情,商业化不是其中之一,但乐趣......绝对。
#9
1
JVM as first choice. It would allow for a wide library support from the day one. See how that benefited Clojure.
JVM作为首选。它将允许从第一天开始提供广泛的图书馆支持。看看这对Clojure有何益处。
Also, LLVM might be interesting choice, but I'm not sure how "proven" it is, since I can't have a mature language implementation with LLVM backend.
此外,LLVM可能是一个有趣的选择,但我不确定它是如何“证明”的,因为我不能拥有LLVM后端的成熟语言实现。
I would avoid .NET. It would make it harder to gather community and support around the your new language, and you are going to need it soon. Also, it is not cross-platform.
我会避免使用.NET。这将使得围绕您的新语言收集社区和支持变得更加困难,并且您很快就会需要它。此外,它不是跨平台的。
Whatever you choose, you will learn a lot by doing so.
无论你选择什么,你都会学到很多东西。
#10
1
JVM is more stable, well documented, and in general less likely to be a moving target than .Net Also you're more likely to find people that can help you out if you go open source. With .Net talent is really scarce, and most work for Microsoft, so they won't likely have the time to help out.
JVM更稳定,文档齐全,并且通常不太可能成为移动目标而不是.Net如果你开源,你更有可能找到可以帮助你的人。由于.Net人才非常稀缺,而且大多数人都为微软工作,因此他们不太可能有时间提供帮助。
#11
0
.NET as the DLR now that sit on top of the CLR for Dynamic language.
.NET作为DLR现在位于动态语言的CLR之上。
#12
0
Do it on .Net, after all you want to do it for fun. So make it a bit challenging. And any findings then can be reported to Microsoft, for improvement in DLR and the languages it supports.
在.Net上做,毕竟你想做的就是为了好玩。所以让它有点挑战。然后可以向Microsoft报告任何调查结果,以改进DLR及其支持的语言。
#13
0
If you're going to look at using .Net, have a look in Beautiful Code -- there's an essay in it about doing dynamic code gen on the .Net CLR.
如果您打算使用.Net,请查看Beautiful Code - 其中有一篇关于在.Net CLR上执行动态代码生成的文章。
#14
0
Definitely .Net using the Dynamic Language Runtime. Your objects will be usable directly by C# and V.Net users by the time you're finished (you are intending to ship something? :-)
绝对是.Net使用动态语言运行时。您完成后,您的对象将由C#和V.Net用户直接使用(您打算发货吗?:-)
In particular, target running under the reduced .Net in SilverLight so you get the latest web rich UI buy-in.
特别是,目标在SilverLight中以简化的.Net运行,因此您可以获得最新的Web丰富UI支持。