If you were to create a programming language...

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: If you were to create a programming language...

Post by Davidobot »

Well, since I'm in a Sci-Fi mood, I want to make program dreams. The language would be called dream-code.

Code: Select all

dreamType = random()

switch(dreamType):
      case 1: dream("Fly")
      case 2: dream("Nightmare")
      case default: dream("Nothing")

def Fly:
     -- Highly confusing code here -- 
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: If you were to create a programming language...

Post by iPoisonxL »

Davidobot wrote:Well, since I'm in a Sci-Fi mood, I want to make program dreams. The language would be called dream-code.

Code: Select all

dreamType = random()

switch(dreamType):
      case 1: dream("Fly")
      case 2: dream("Nightmare")
      case default: dream("Nothing")

def Fly:
     -- Highly confusing code here -- 
Ultimately, what would it achieve?

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: If you were to create a programming language...

Post by Davidobot »

iPoisonxL wrote:
Davidobot wrote:Well, since I'm in a Sci-Fi mood, I want to make program dreams. The language would be called dream-code.

Code: Select all

dreamType = random()

switch(dreamType):
      case 1: dream("Fly")
      case 2: dream("Nightmare")
      case default: dream("Nothing")

def Fly:
     -- Highly confusing code here -- 
Ultimately, what would it achieve?
Dreams?
You program dreams, upload them to your home Dream-o-matic and fall asleep. And violà - personalized dreams.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
Plu
Inner party member
Posts: 722
Joined: Fri Mar 15, 2013 9:36 pm

Re: If you were to create a programming language...

Post by Plu »

That's not a programming language, it's just an application of one...

Also, for those of you who know about http://99-bottles-of-beer.net/, which is your favorite terrible programming language?
(And for those of you who don't know it; go there, and look around and especially check out all the hilarious esoteric languages)

My favorite terrible programming remains Befunge, the world's only 2 dimensional programming language.

Befunge

Code: Select all

v v0\1:\1:{CODE}{CODE}\!:p15-<     Bottles of Beer for Befunge
0 \ {befunge} >" ekaT">v   written by Brian Raiter, 5/97
0>>.0"llaw eht no "v<#,:   breadbox@muppetlabs.com
"\,     >"eno"^>0 #"^1^_v
c1,>51g#^_"ti"^. >vr :  $
"::^" down, pass "<e    5
>^|\*25,<^     # i e ^g1< 
  ,>052*":dnuor t"vbv:<
v0_^    .      , ^< " "
>52*".ll"v   >,^   fb e
v<v<v_$!|>"aw eht no r"v
""" ,:  >" ;"^      f ^<@
meo >^"bottle"<    "o   $
o m^"re:"<v  _^#g15<  v_^
s""  >52*^>"s"^v"les"<,:
"^<  ^"99 bott"<    >^>^<
>" yub ,erots eht ot oG"^
And yes, you can run that. And yes, it can read code left to right, right to left, top to bottom and bottom to top, all in the same program.
szensk
Party member
Posts: 155
Joined: Sat Jan 19, 2013 3:57 am

Re: If you were to create a programming language...

Post by szensk »

Brainfuck is my favorite esoteric language due to its simplicity. I still can't write any complicated programs in it.
User avatar
iPoisonxL
Party member
Posts: 227
Joined: Wed Feb 06, 2013 3:53 am
Location: Australia
Contact:

Re: If you were to create a programming language...

Post by iPoisonxL »

Me it's definitely Whitespace, or Malbolge. Here's hello world in Malbolge:

Code: Select all

(=<`:9876Z4321UT.-Q+*)M'&%$H"!~}|Bzy?=|{z]KwZY44Eq0/{mlk**
 hKs_dG5[m_BA{?-Y;;Vb'rR5431M}/.zHGwEDCBA@98\6543W10/.R,+O<
and here's hello world in Whitespace: (T indicates tab, S indicates space and L indicates newline, for easier reading. The language itself doesn't have these characters, just whitespace)

Code: Select all

S S S T	S S T	S S S L
T	L
S S S S S T	T	S S T	S T	L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	S T	T	S S L
T	L
S S S S S T	S S S S S L
T	L
S S S S S T	T	T	S T	T	T	L
T	L
S S S S S T	T	S T	T	T	T	L
T	L
S S S S S T	T	T	S S T	S L
T	L
S S S S S T	T	S T	T	S S L
T	L
S S S S S T	T	S S T	S S L
T	L
S S S S S T	S S S S T	L
T	L
S S L
L
L
fun fact: all other characters in whitespace are ignored.

EDIT: now im determined to learn Befunge or Malbolge.

EDIT EDIT: Wow, Chef looks like a really cool programming language. It's made to look like a Cooking Recipe. Here's hello world:

Code: Select all

Hello World Cake with Chocolate sauce.
 
 This prints hello world, while being tastier than Hello World Souffle. The main
 chef makes a " world!" cake, which he puts in the baking dish. When he gets the
 sous chef to make the "Hello" chocolate sauce, it gets put into the baking dish
 and then the whole thing is printed when he refrigerates the sauce. When
 actually cooking, I'm interpreting the chocolate sauce baking dish to be
 separate from the cake one and Liquify to mean either melt or blend depending on
 context.
 
 Ingredients.
 33 g chocolate chips
 100 g butter
 54 ml double cream
 2 pinches baking powder
 114 g sugar
 111 ml beaten eggs
 119 g flour
 32 g cocoa powder
 0 g cake mixture
 
 Cooking time: 25 minutes.
 
 Pre-heat oven to 180 degrees Celsius.
 
 Method.
 Put chocolate chips into the mixing bowl.
 Put butter into the mixing bowl.
 Put sugar into the mixing bowl.
 Put beaten eggs into the mixing bowl.
 Put flour into the mixing bowl.
 Put baking powder into the mixing bowl.
 Put cocoa  powder into the mixing bowl.
 Stir the mixing bowl for 1 minute.
 Combine double cream into the mixing bowl.
 Stir the mixing bowl for 4 minutes.
 Liquify the contents of the mixing bowl.
 Pour contents of the mixing bowl into the baking dish.
 bake the cake mixture.
 Wait until baked.
 Serve with chocolate sauce.
 
 chocolate sauce.
 
 Ingredients.
 111 g sugar
 108 ml hot water
 108 ml heated double cream
 101 g dark chocolate
 72 g milk chocolate
 
 Method.
 Clean the mixing bowl.
 Put sugar into the mixing bowl.
 Put hot water into the mixing bowl.
 Put heated double cream into the mixing bowl.
 dissolve the sugar.
 agitate the sugar until dissolved.
 Liquify the dark chocolate.
 Put dark chocolate into the mixing bowl.
 Liquify the milk chocolate.
 Put milk chocolate into the mixing bowl.
 Liquify contents of the mixing bowl.
 Pour contents of the mixing bowl into the baking dish.
 Refrigerate for 1 hour.

Code: Select all

      L
    L Ö
    Ö V
L Ö V E
Ö B E
V E
E Y
Website
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: If you were to create a programming language...

Post by Positive07 »

Plu wrote:the world's only 2 dimensional programming language.
There are lots of 2D languages as there are lots of esolangs

I'm writing my own where functions are tables with do blocks, and there are no keywords (if, for, while, function, etc.) so basically it is all written with signs :awesome: of course variables can use names
It is in the design phase yet
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
SiENcE
Party member
Posts: 792
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: If you were to create a programming language...

Post by SiENcE »

My fav. is ArnoldC .

Code: Select all

IT'S SHOWTIME
TALK TO THE HAND "happy families are all alike"
YOU HAVE BEEN TERMINATED

Brief overview of the keywords

Code: Select all

False I LIED

True NO PROBLEMO

If BECAUSE I'M GOING TO SAY PLEASE

Else BULLSHIT

EndIf YOU HAVE NO RESPECT FOR LOGIC

While STICK AROUND

EndWhile CHILL
User avatar
baconhawka7x
Party member
Posts: 491
Joined: Mon Nov 21, 2011 7:05 am
Location: Oregon, USA
Contact:

Re: If you were to create a programming language...

Post by baconhawka7x »

I'm really liking "Argh!"

99 Bottles in "Argh!"

Code: Select all

lsdllDsalrxdarxsL       HshDppppppppppppppppppppppppppppppppppppsrddffj
 *    e124j 21lDsJ       DD No more bottles of beer on the wall.*     j
jhhDfdFdRAhDh   q         s      HDh        jfppppppppppppppppppppppPPh
j                    0  lllllllllllJ        j !reeb erom yub ot emiT
lsllSsrfsrflllllllsrfSj kphhhhph            lPq
j0   KA KA        21  H   0 D  k     
lDlllllRxlAllllfsjllRxlDlFRxklFk     
      k lfsrfj  0jk  lfsrfjlak              The classic
      k   21 jjShhk    21 j 0               99 bottles of beer
      khhShhAhllllkhhhShhAh                 in Argh!
                 q h         l   lsK
                 lDSdllllllflSJh hJ*        wilde@sha-bang.de
  jfrsppppppppppppppppppppppppppppph
  j  *,llaw eht no reeb fo selttob  
  lPllllllllllllllllllllDSlllllllssK
                         JSfdDh  fJo         
        jdrsppppppppppppppppppppppph
   jfhhhh  *,...reeeeeb fo selttob  
   j Take one down, pass it around, 
   lPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPfj
                                s/  j
                         lKhhhhhSSDPh
                         lDfSllllK /
jffdrsppppppppppppppppppppppppppppph
j    *.llaw eht no reeb fo selttob  
lPPlDSlllllllllllllllllllllllllllssK
lolol. The backwards text is what really makes it for me, like, why.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: If you were to create a programming language...

Post by Kingdaro »

I love Lua's simplicity, so I wouldn't really change anything about it. The only thing I truly want is assignment operators. This is annoying:

Code: Select all

self.longVariable = self.longVariable + 1
This is less annoying:

Code: Select all

self.longVariable += 1
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 42 guests