最后一年项目 - 是否有在 DLR 上运行特定领域语言的想法?

发布于 2024-12-03 15:47:21 字数 345 浏览 2 评论 0原文

我的本科最后一年项目即将开始,我对词法分析器、解析器、编译器等非常感兴趣,并且希望在我的本科最后一年项目中使用 DLR(.NET 4.0 动态语言运行时),但我正在努力寻找使用它的理由!

领域特定语言是一个想法,但我能想到的所有领域都已经完成了。

另一种方法是尝试移植现有语言(或至少部分语言,如果时间允许),但同样......我想不出合适的移植语言。 (不是 APL 或 Perl - 我不是受虐狂。)

有谁知道我在最后一年的项目中可以使用 DLR 做什么?特定领域或其他想法?

这个问题对于那些希望尝试 DLR 但希望以更实际的方式使用它而不仅仅是在玩具项目中使用它的人也会有所帮助。

谢谢!

I have my undergraduate final year project coming up and am very interested in lexers, parsers, compilers and the like and would like to use the DLR (.NET 4.0 dynamic language runtime) for my undergraduate final year project, but am struggling to find a reason to use it!

A domain specific language would be an idea, but all the domains I can think of have already been done.

Another approach would be to attempt to port an existing language (or at least part of it, time permitting), but again...I can't think of a suitable language to port. (Not APL or Perl - I'm not a masochist.)

Does anyone have an idea as to what I could use the DLR for in my final year project? A particular domain or other idea?

This question would also be helpful to those who wish to try the DLR out but want to use it in a more practical way, rather than just in a toy project.

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

忆离笙 2024-12-10 15:47:22

JavaScript 怎么样? (ECMAScript)它是一种相对较小的语言,因此根据您的技能水平和您需要投入的时间,它可能会很容易上手。 IronJS 确实存在,但你可以对事物采取不同的看法。也许是一个“只有好的部分”版本的 Javascript?或者本地的 CoffeeScript 解释器可能会很有趣。

您可以重新实现许多有趣的小语言。 http://iolanguage.com/ 就是一个很好的例子。

当然,编写自己的 lisp 总是很有趣。

How about Javascript? (ECMAScript) It's a relatively small language so it may be approachable depending on your skill level and the amount of time you have to sink into it. IronJS does exist, but you could take a different spin on things. Perhaps a "good parts only" version of Javascript? Or a native coffeescript interpreter could be interesting.

There are many interesting small languages you could re-implement. http://iolanguage.com/ is a good example.

And of course, writing your own lisp is always good fun.

冬天旳寂寞 2024-12-10 15:47:22

我所知道的最简单的语言之一是 Forth。您可以使用 DLR 来实现此目的。

One of the simplest languages I know is Forth. You could use the DLR to implement this.

锦爱 2024-12-10 15:47:22

创建一种用于定义事件和活动的语言怎么样?在我的家庭自动化系统中,我有如下 C# 代码:

Kitchen.KitchenFloor.Or(Kitchen.MotionSensor, Kitchen.BackDoorToGarage,
                        Kitchen.BreakfastBarFloor,
                        Kitchen.Phone)
                .Provided(Time.AlmostDark)
                .Do("Activity near dark"", sender => { ... });

这是一种流畅的语言,用于定义在 C# 中实现的事件、条件和活动。它有点像响应式框架,但早于它,并且还可以将其当前状态持久保存到数据库中,然后进行检索(这是必要的,因为某些间隔可能是几小时、几天甚至几个月!)。

一种领域特定语言,您可以在其中定义传感器,然后将它们与事件流、条件和活动连接起来,这可能是一个有趣的项目。添加 Netduino 以及一些 LED 和开关,使其变得更加有趣。

How about creating a language for defining events and activities? In my home automation system I have C# code like:

Kitchen.KitchenFloor.Or(Kitchen.MotionSensor, Kitchen.BackDoorToGarage,
                        Kitchen.BreakfastBarFloor,
                        Kitchen.Phone)
                .Provided(Time.AlmostDark)
                .Do("Activity near dark"", sender => { ... });

This is a fluent language for defining events, conditions and activities implemented in C#. It's a bit like the Reactive framework but predates it and can also be persisted in its current state to a database and then retrieved (necessary because some of the intervals can be hours, days or even months!).

A domain specific language where you can define sensors and then hook them up with event flows, conditions and activities might be an interesting project. Add a Netduino and some LEDs and switches to make it even more fun.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文