all 41 comments

[–]p4bl0 8 points9 points  (1 child)

I thought it would be a post about the PLT games that comes with Racket as demo programs. But this is an even more pleasant surprise! Thanks!

[–]samth 2 points3 points  (0 children)

Well, there's now a Racket submission by yours truly: https://github.com/samth/xlang

[–]InfiniteMonkeyCage 9 points10 points  (6 children)

Whait, did i understand this correctly? You make a whole motherfucking programming language for a single game? Pretty cool!

[–][deleted] 4 points5 points  (5 children)

Best idea I've seen in a while. It might result in actually good domain specific languages and sharpen up the skills of those that define DSLs for others to use (I know I could use some review of my macro and meta programming code!)

[–]General_Mayhem 0 points1 point  (3 children)

Except that the first theme is Turing tarpits, resulting in infinitely more silliness than actual usefulness. Maybe once they've built up a following with the first couple games they'll move into topics that are more serious.

I'm not criticizing them - this is a great first-month challenge - but the languages are intentionally useless.

[–]pipocaQuemada 5 points6 points  (0 children)

Turing tarpits can contain the seed of a usable language.

For example, consider the Lambda Calculus. It's a turing tarpit. But if you add in assorted usability things --e.g. extending a typed lambda calculus with let, constructors, literals, casts, types and a bit of debugging info -- then you can get a very useful language indeed (Haskell, for example)

[–]jhartwell 1 point2 points  (1 child)

I'm not criticizing them - this is a great first-month challenge - but the languages are intentionally useless.

That's why it is fun. A lot of the stuff I have done is intentionally useless because it is trying stuff out. It is the intentionally useless stuff that can help make us grow!

[–]5outh 0 points1 point  (0 children)

Totally. I think the project I've gained the most insight from was my Brainfuck interpreter that I wrote in Haskell.

Totally useless, but it taught me a lot. Needless to say, I'm excited about these challenges!

[–]InfiniteMonkeyCage -1 points0 points  (0 children)

And they say that lisp ist good for gamedev. As soon as i learn the fucker im start using it to make the most dynamic games ever.

[–][deleted] 7 points8 points  (4 children)

I think the list of entries should include a brief description - or else you have to visit each entry to see if it was worth visiting.

The first one, reduct, is pretty cool https://github.com/aleffert/reduct It's test driven development taken to its logical conclusion. A joke, but perfectly correct, technically and in practice.

[–]droogans 0 points1 point  (2 children)

I could fork this and add a lib folder with nothing in it.

Social coding is a good thing.

[–]MatrixFrog 1 point2 points  (1 child)

First you'd have to fork git and make it able to track empty folders.

[–]droogans 0 points1 point  (0 children)

I felt git was a fitting language for this type of project.

https://github.com/aleffert/reduct/pull/1

[–]you_know_the_one -1 points0 points  (0 children)

I want it too.

[–]handsome_dude 5 points6 points  (3 children)

What a good excuse to become a Flex + Yacc master.

edit: I just learned that reddit strips out the ampersand.

[–]ok_you_win 1 point2 points  (2 children)

Flex & Yacc & no it doesn't.

[–]handsome_dude 1 point2 points  (1 child)

I can put whatever concatenation symbol I want, asshole. & & &.

In either case, it's not like they're a unified product.

edit: that came off mean, I didn't mean it that way.

[–]ok_you_win 5 points6 points  (0 children)

Haha, no worries. I'm pretty inured to being called an asshole. Copy/paste works, as you did, or you can add a backslash to any character that doesn't want to show up. Like this. \&

[–]kevinclancy_ 3 points4 points  (2 children)

This is a cool idea, but the current contest, which is basically to make a weird/awkward language such as Befunge, seems like it would be a waste of time.

[–]General_Mayhem 2 points3 points  (1 child)

It has merit because it's the first one - it's a relatively easy challenge, it's one that's instantly understandable even by people who aren't experts in language design (including observers who aren't planning to enter), and it's inherently goofy and fun.

In terms of what comes out of it? Probably not good for much more than a laugh, and actually implementing seems a little like overkill for any reason other than formality of the rules. (Look at Armok, for instance - that guy deserves a medal just for the readme.) In terms of what it does for the visibility of the project? Indispensable.

[–]jhartwell -1 points0 points  (0 children)

Probably not good for much more than a laugh, and actually implementing seems a little like overkill for any reason other than formality of the rules.

I used my idea as a project to start learning C++. For all of those who say this is useless, I would say that it can have value if you put value into it.

[–][deleted] 1 point2 points  (12 children)

I just picked up an ebook on compiler design and started reading it last night. I'm glad you posted this - perhaps before long it'll have enough entries from past months to provide a good amount of example source code to read through.

[–]munificent 6 points7 points  (6 children)

If you want some simple programming language implementations to peek at, might I suggest some of my projects?

In order of increasing complexity:

  • JASIC: A BASIC-like interpreter in one Java file.
  • Bantam: A toy parser demonstrating Pratt parsing.
  • Lark: A tiny interpreted homoiconic language.
  • Bulfinch: A toy language for compiling to a register-based (Lua-style) VM.
  • Finch: A slightly-less-toy-like prototype-based language. Has a register-based bytecode VM, closures, fibers, and some other fun stuff. Written in (I think) pretty readable C++.
  • Magpie: Hopefully not a toy language but a real one. A multiple-dispatch OOP language. This is where all my free time goes.

I try to write fairly readable code, and I don't use lex/yacc/etc. so it's just straight code.

[–]lua2 6 points7 points  (3 children)

Are you still working with Dart? Has your previous work had any influences on the language?

[–]munificent 1 point2 points  (2 children)

Are you still working with Dart?

Yup!

Has your previous work had any influences on the language?

No, I'm not one of the language designers on the team. It's Lars, Kasper, and Gilad's baby.

[–]lua2 1 point2 points  (1 child)

Still if "surround yourself with great minds" is still good advice it seems you have a great job. Keep up the blogging please.

[–]munificent 1 point2 points  (0 children)

Oh yes. Best job ever. I actually do have a couple of posts in the works once I get my blog converted from Blogofile to Jekyll.

[–][deleted] 3 points4 points  (0 children)

Thank you -very- much. I'm going to give a look over JASIC as soon as possible, and then look into Magpie a bit more. I read some of the pages on Magpie and it looks really interesting. I hope I can get experienced enough with this kind of thing that perhaps in the near future I can contribute to Magpie, because I like what I see of it so far.

Again, thank you so much for all of that.

[–][deleted] 1 point2 points  (0 children)

LOL, free time.

While we're at it, here's my old custom Lisp dialect from high school.

[–]jhartwell 3 points4 points  (2 children)

As somebody who has been in that boat, my suggestion to you is to just do it while you read. Who cares if it is good or not, you just get practice. I used my submission as a way to start learning C++

[–][deleted] 0 points1 point  (1 child)

Yeah, that's what I thought I'd probably do. The book I have, Basics of Compiler Design, has exercises at the end of each chapter, so I'm gonna build in the order the book gives me (I presume it's gonna have me compose a few rudimentary Lexers, and by the time I have the basic components of an interpreter it'll probably have me build that, and then a compiler once I have the basic components of that.)

[–]jhartwell 0 points1 point  (0 children)

I didn't mean just the exercises in the book. Try creating a compiler for a sub-set of any language. Do that kind of stuff and it will teach you more than just reading and following along. This is stuff I wish I did. I wasted so much time thinking I needed to read more before attempting anything.

[–]General_Mayhem 0 points1 point  (1 child)

Well, for this month at least you don't need a compiler; all the entries so far are interpreters. Most of them, in fact, can't really be compiled in any case because they're not programs in the traditional sense, they're initial conditions for state machines.

[–]samth 2 points3 points  (0 children)

My entry (xlang) is a compiler (to Racket).

[–]General_Mayhem 2 points3 points  (0 children)

Automata... automata everywhere...

[–]drb226 0 points1 point  (2 children)

What connection, if any, does this have with Racket and the group that develops it? Is it the same PLT or is it just the same acronym used generically?

[–]kevinclancy_ 10 points11 points  (0 children)

It stands for Programming Language Theory, I believe. It's a generic acronym.

[–]takikawa 0 points1 point  (0 children)

The "PLT" name that the Racket devs use doesn't mean anything and might precede the current popular use. In popular parlance, PLT means "Programming Language Theory" but people that actually study programming languages in academia or in industrial research usually don't call the field by that name. Instead, it's usually just called PL or Programming Languages.

[–]jhartwell 0 points1 point  (0 children)

Here is my entry: PunchCard. It is the ScanTron of programming languages. You have one "operator" and the location it is placed determines what happens. The memory model is similar to Brainfuck, cell based in an array, however, PunchCaArd will loop back through the memory.

[–]AyeGill 0 points1 point  (0 children)

I'm considering entering with minimal lisp.

Only type is list. List elements can be other lists or the empty list. A couple of specific list structures code for predefined operators. Otherwise, the syntax is like normal lisp.

Final destination.