Has anyone designed a programming language just for fun?

  • (2 Pages)
  • +
  • 1
  • 2

23 Replies - 1958 Views - Last Post: 04 March 2016 - 11:43 AM

#1 Betsemes  Icon User is offline

  • D.I.C Regular


Reputation: 48
  • View blog
  • Posts: 447
  • Joined: 26-February 15

Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:21 PM

Among linguists there are the conlangers who make up artificial languages mostly for fun, although very few actually get paid for it. I also knew about the esoteric programming languages. So I was wondering how widespread is the hobby of making up programming languages, maybe along with building a compiler for it. I read around the internet about compiler compilers that are intended for generating compilers from a grammar. Maybe that'd make it simpler to make it a hobby. So, is there anyone here?

I have lately been thinking on a programming language of my own. Not anything creative. Mostly, something that'd like whether it'd be someone else's work.

EDIT: Maybe not just a compiler, but an interpreter.

This post has been edited by Betsemes: 22 January 2016 - 04:22 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Has anyone designed a programming language just for fun?

#2 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,360
  • Joined: 02-June 10

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:24 PM

How experienced are you with USING a programming language before you start trying to build one?
Was This Post Helpful? 0
  • +
  • -

#3 Betsemes  Icon User is offline

  • D.I.C Regular


Reputation: 48
  • View blog
  • Posts: 447
  • Joined: 26-February 15

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:32 PM

tlhIn`toq
Not much. About two years ago I made up a conlang just for fun too. Not intended to be a work of art like Quenya or a commercial alien language like Klingon or Na'vi, or anything else. That didn't stop me from doing it anyway, it was intended to just have fun with it. A programming language done by me at this date and time would not be something professional or anything that people would want to use, that much is obvious. However, it can be done for fun.

What about you? Have you tried it?
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,360
  • Joined: 02-June 10

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:41 PM

I'm too busy coding to be playing at stuff like that for no real payoff. My free time is consumed with family.
But hobbies are good if you want to do it and have the free time.

The problem I see is not understanding what you're trying to make.

For example:
Would you want a power saw designed by someone that hasn't used several different kinds at a professional level? Knows what they like, don't like, need, can't find in an existing saw... Understands the safety issues, industry norms and expectations... Understands the users' wants and needs like weight, balance, robustness, features, support for add-ons such as circle cutting jigs or sawdust vacuum attachments...

And that's just a saw. A tool that does one thing with no programability.

Now consider a coding language with many magnitudes more complexity and use cases.
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 13400
  • View blog
  • Posts: 53,478
  • Joined: 12-June 08

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:41 PM

Making up programming languages isn't close to the wheel house of 'fun' for me.
Was This Post Helpful? 0
  • +
  • -

#6 Betsemes  Icon User is offline

  • D.I.C Regular


Reputation: 48
  • View blog
  • Posts: 447
  • Joined: 26-February 15

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:49 PM

View PosttlhIn`toq, on 22 January 2016 - 07:41 PM, said:

The problem I see is not understanding what you're trying to make.

Actually, I don't see a problem. It'd be a real and huge one if the language would be for actual use. It's for fun, however. Just for the fun of making it. So, not understanding isn't as big an issue as to be an actual problem.
Was This Post Helpful? 0
  • +
  • -

#7 tlhIn`toq  Icon User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6505
  • View blog
  • Posts: 14,360
  • Joined: 02-June 10

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:51 PM

Ok. Have fun with that.
Was This Post Helpful? 0
  • +
  • -

#8 andrewsw  Icon User is online

  • lashings of ginger beer
  • member icon

Reputation: 6340
  • View blog
  • Posts: 25,570
  • Joined: 12-December 12

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 04:59 PM

So You Want To Write Your Own Language?

Quote

Work
First off, you're in for a lot of work…years of work…most of which will be wandering in the desert. The odds of success are heavily stacked against you. If you are not strongly self-motivated to do this, it isn't going to happen. If you need validation and encouragement from others, it isn't going to happen.

..

Somewhat more controversial, I wouldn't bother wasting time with lexer or parser generators and other so-called "compiler compilers." They're a waste of time. Writing a lexer and parser is a tiny percentage of the job of writing a compiler. Using a generator will take up about as much time as writing one by hand, and it will marry you to the generator (which matters when porting the compiler to a new platform). And generators also have the unfortunate reputation of emitting lousy error messages.

Was This Post Helpful? 1
  • +
  • -

#9 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 2386
  • View blog
  • Posts: 5,008
  • Joined: 11-December 07

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 06:52 PM

Yeah, writing programming languages is something I have played with for fun. Never yet a serious one that was meant for consumption by others, and only ever interpreted languages: Not compiled ones. Stuff I've done includes:

  • Writing Brainfuck interpretors.
  • Writing a Brainfuck translator.
  • Implementing a small functional language as part of a class I took.
  • Writing libraries for use inside other applications that are a couple of features away from being Turing equivalent.
  • Writing domain specific languages


None of this is very impressive. It was just for fun. Anyone who took language writing seriously would soon surpass this list. However, it's interesting just how much completing these few things has enhanced my understanding of how languages work.

To be honest, every time you create a layer of abstraction in your program, you are doing something fundamental to language creation: that is removing some detail of the underlying system. For example, Assembly means you don't have to deal with binary commands. C means you don't have to juggle registers. Java abstracts away pointers. Haskell removes most mutable state. SQL allows you to write a program by describing what the output looks like. Erlang takes the sting out of concurrent programming and offers ways to recover from crashing.

This has a direct correspondence to libraries: ORM means you don't have to deal with the database. Web frameworks mean you don't have to think about the network when writing web APIs. Collections mean you don't have to get bogged down in the details of abstract data types. GUI toolkits make it easy to write GUIs.

The point is that by being mindful of these concepts, you are working on language related problems throughout your career. More importantly, it can help you compartmentalise parts of the problem and lead to a more modular design. It can help you decide if you should find/write a library for some part of your code or if a different language is a better option.

If you really want to write a language then you can look for an ugly mechanism in a language you know. Nobody wants to have to deal with registers when writing mathematical expressions, just as nobody wants to deal with pointers when doing string manipulation. Another route is to write a nicer syntax to replace a niggle in a language you use. This line of thought motivated (at last in part) the development of Coffee Script and Clojure. Another option is if you want to combine desirable features of two languages that wouldn't otherwise be available together. Ruby, Scala and Elixir are examples of this.
Was This Post Helpful? 2
  • +
  • -

#10 macosxnerd101  Icon User is offline

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12135
  • View blog
  • Posts: 45,119
  • Joined: 27-December 08

Re: Has anyone designed a programming language just for fun?

Posted 22 January 2016 - 07:38 PM

Aho, Lam, Sethi, Ullman is a really good compilers book. If you're interested in language design, I'd definitely give this one a read: http://www.amazon.co...d/dp/0321486811
Was This Post Helpful? 0
  • +
  • -

#11 Betsemes  Icon User is offline

  • D.I.C Regular


Reputation: 48
  • View blog
  • Posts: 447
  • Joined: 26-February 15

Re: Has anyone designed a programming language just for fun?

Posted 24 January 2016 - 04:18 PM

View Postcfoley, on 22 January 2016 - 09:52 PM, said:

However, it's interesting just how much completing these few things has enhanced my understanding of how languages work.

This had crossed my mind. It's like an educational experience.

Interesting points from your post:
  • If you really want to write a language then you can look for an ugly mechanism in a language you know.
  • Another route is to write a nicer syntax to replace a niggle in a language you use.
  • Another option is if you want to combine desirable features of two languages that wouldn't otherwise be available together.


Thank you cfoley.
Was This Post Helpful? 0
  • +
  • -

#12 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1469
  • View blog
  • Posts: 8,176
  • Joined: 07-September 06

Re: Has anyone designed a programming language just for fun?

Posted 24 January 2016 - 09:15 PM

The first programming language I made up was for a course in college, and as such it was relatively well defined what we needed to do and we had parts of the code given to us to use. It was fun. Later I went ahead and made a calculator language (it took an equation, including geometric functions, parsed it, and returned the answer or any errors it encountered). It was basic (definitely not something that would be a general purpose programming language, but it used a lexar, grammer, and other programming language concepts. It was written in Java. I also went through and wrote a SQL parser to allow me to run SQL queries against JSON files (one job I was told we weren't allowed to use a database -- dumb).

Writing grammers/ programming languages will very quickly tell you if that is what you enjoy doing and/ or want to do for a living. For me, it wasn't. But it is still a good learning experience.

I would also greatly suggest using tools like Lex and Bison to make the job go a little quicker up front.
Was This Post Helpful? 0
  • +
  • -

#13 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1265
  • View blog
  • Posts: 4,979
  • Joined: 09-June 09

Re: Has anyone designed a programming language just for fun?

Posted 24 January 2016 - 09:26 PM

Posted Image

This post has been edited by jjl: 24 January 2016 - 09:27 PM

Was This Post Helpful? 0
  • +
  • -

#14 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,650
  • Joined: 10-May 07

Re: Has anyone designed a programming language just for fun?

Posted 24 January 2016 - 09:33 PM

There is a stigma, I believe, with introduction developers, that writing your own language or OS raises you to an elite status or something. However as has been pointed out, until you actually eat what's already on your plate, you'll make false assumptions. Without the technical ability to use what already exists, you're going to create a language based on assumptions, not on experience. The more you learn existing languages, you'll see how much more you still have to learn.
Was This Post Helpful? 1
  • +
  • -

#15 Betsemes  Icon User is offline

  • D.I.C Regular


Reputation: 48
  • View blog
  • Posts: 447
  • Joined: 26-February 15

Re: Has anyone designed a programming language just for fun?

Posted 25 January 2016 - 01:12 PM

View PostBetaWar, on 25 January 2016 - 12:15 AM, said:

Writing grammers/ programming languages will very quickly tell you if that is what you enjoy doing and/ or want to do for a living. For me, it wasn't. But it is still a good learning experience.

And I may realize this is not for me either. :)

Quote

I would also greatly suggest using tools like Lex and Bison to make the job go a little quicker up front.

Hmmm, this contradicts what andrewsw quotes above:

Quote

Somewhat more controversial, I wouldn't bother wasting time with lexer or parser generators and other so-called "compiler compilers." They're a waste of time. Writing a lexer and parser is a tiny percentage of the job of writing a compiler. Using a generator will take up about as much time as writing one by hand, and it will marry you to the generator (which matters when porting the compiler to a new platform). And generators also have the unfortunate reputation of emitting lousy error messages.


View Postno2pencil, on 25 January 2016 - 12:33 AM, said:

There is a stigma, I believe, with introduction developers, that writing your own language or OS raises you to an elite status or something.

I wasn't aware of this "stigma", if that is the correct word to use. Speaking of myself, I don't consider Stroustrup or Torvalds elite just for what they did.

Quote

However as has been pointed out, until you actually eat what's already on your plate, you'll make false assumptions. Without the technical ability to use what already exists, you're going to create a language based on assumptions, not on experience.

That's part of the fun. We go tweeking it as we get experience.

Quote

The more you learn existing languages, you'll see how much more you still have to learn.

I have already seen that over and over again, and I'm still a beginner. That's something that gets obvious overtime.

So, no2pencil, have you tried making up a language?
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2