Lets spec out the worst programming language we can think up!



  • I'm thinking the language what ever we decide to call it should declare variables in the following manner.

    <var type> <variable name> <location in memory in which a reference to the actual data can be placed.

     int varname 0x65435434

     also every variable should be immediately deallocated once the data stored in said variable has been read once!

     Your turn





  • There's a whole wiki dedicated to doing this better than you.



  • @Welbog said:

    http://esolangs.org/wiki/INTERCAL


    There's a whole wiki dedicated to doing this better than you.

    I can't find the pages for Ruby or C#... 



  • I nominate the aptly named Brainfuck. Bit deficient in libraries (have yet to succesfully connect to MySQL), but potent enough to leave deep psychological trauma. 



  •  Brainfuck has been a favorite of this forum for a very long time.



  • Brainfuck and INTERCAL is not the worst. Only Malbolge is the worst.



  • @galgorah said:

    <var type> <variable name> <location in memory in which a reference to the actual data can be placed.

     int varname 0x65435434

    Not really a WTF to me as I work with languages all the time that require manual allocation on that level - plus the variable names are limited to 8 characters. In addition, boolean and numerical types typically are specified in their own separate non-overlapping domains. These are mainstream languages used in current manufacturing systems.

    In my field [url=http://en.wikipedia.org/wiki/Programmable_logic_controller]PLC's[/url] are small, powerful and speedy devices that have been optimized for cyclical control, that run single, fixed programs 24/7. Memory allocation is treated as a 1 time design consideration and not something that the CPU needs to waste time on at each pass through of the code - especially if you are trying to squeeze as much performance as possible out of the system.

    For example in a current system I am looking there are allocations such as:

    DINT %R1240 R909X1k - This a double integer (32bit), in the general register block of memory at address 1240, with a tag name of R909X1k


    BOOL %M430 HQCCALL - This is a single bit, in the general boolean block of memory at address 430, with a tag name of HQCCALL

    Of course with systems like this you have to keep very good notes of where you put something. And the system can lead to all sorts of abuses with "clever" programming. On the other hand its fun to watch multi-million dollar pieces of equipment process white-hot steel.



  • Some ideas from the time I wanted to make a bastardized BASIC like language:

    ] closes an (, } closes [ and ) closes {. Strings start with ' and end with ", or they can start with " and end with ' for the interpreter to automatically convert them to leet. Strings automatically end on a newline, so that accidentally closing " with " or ' with ' fails silently and inserts extra code as data. I have no suggestions on what brackets should actually do...

    Lines must always be numbered, but they are not sorted, and are executed in the order they appear in the file. Each line number must be unique unless you want all lines with the same number to be executed any time any line of that number is met. The order of execution is the order in which they appear in the file. If the program is split between files then lines from files that sort first alphabetically will be executed first.

     



  • How about a language called "Politics"?

    First off, you need to declare at least 10 times as many variables as you actually use. That's called "campaign promises"! If you don't do this, your code will refuse to "get elected" by the little elven voters inside your computer who make it run... this can lead to very bad things, such as arbitrary, random code ("the opposition party") being run!

    Each namespace is called a "nation" and in order to call foreign code you need an EmbassyAdapter class. Do not attempt to implement a Nuke portal in this language or you may start World War III!

    There are certain preprocessor definitions which alter the language. For instance, #define TYRANNY means you don't need to declare all those extra variables, as there are no elections. However, doing so causes the elves inside your computer to grow grumpy, and they may rebel, totally destroying your computer!

    You are not allowed to use for loops, because they violate the intellectual property of the code inside them by copying it without permission. You can hack around this by including the Chinese localization headers, however.

    As you might guess, any "if" statement requires at least 14,000 subconditions for it to pass the legislature! But if you have an "else" clause, it may be vetoed by the CPU, so watch out!



  • @ekolis said:

    How about a language called "Politics"?
     

    Forget not that boolean literals must be written down using strings filled with text to the max line length of your text editor, and end-of-statement chars are forbidden in that context. It can be any random text, so long as it reaches the line limits of your editor.



  •  I nominate Legalese.



  • I nominate MUMPS.

    That thing gives me nightmares since that article came out ...



  • How about COBOL.NET?



  • @Physics Phil said:

    How about COBOL.NET?

    I second this. I thought we were going to just let cobol die of natural causes and then it turns out MS is bringing it back.



  • @pitchingchris said:

    @Physics Phil said:

    How about COBOL.NET?

    I second this. I thought we were going to just let cobol die of natural causes and then it turns out MS is bringing it back.

     

    I might have missed something somewhere, but it is not MS bringing it back. Anyone can make a language and compiler for .NET.



  • @MasterPlanSoftware said:

    I might have missed something somewhere, but it is not MS bringing it back. Anyone can make a language and compiler for .NET.

     You're right, I should have checked my facts on it. Sorry.



  • @pitchingchris said:

    @MasterPlanSoftware said:

    I might have missed something somewhere, but it is not MS bringing it back. Anyone can make a language and compiler for .NET.

     You're right, I should have checked my facts on it. Sorry.

     

    No prob, just didn't want a whole bunch of people jumping on this with "OMGz M$!!!1!!!"



  • @Physics Phil said:

    How about COBOL.NET?

    Don't forget Fortran.NET. Somebody I forget who actually is working on it. not quite as good as MUMPS.net would be though!.



  • No, I've worked at a few banks where COBOL is no where near dead for core back office mainframes.

     

    HBOS (large <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" /><st1:country-region><st1:place>UK</st1:place></st1:country-region> retail bank, and I think the largest mortgage provider in the <st1:country-region><st1:place>UK</st1:place></st1:country-region>) for example have state of the art IBM mainframes chugging away running DB2 and COBOL... the mainframes are communicated to via IBM MQ. Sitting on top of this you will find Java, .net etc, just about every middle tier and web based technology going...

     

    <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> The story I heard was was they went from COBOL to SmallTalk and then some C++ and finally Java... it was a disaster with the platform changing every few years. In the end, they asked themselves 'what is we do here?', answer: Crunch serious amounts of data all day long all year round... so they jumped back to Cobol as it nicely fitted with there mainframes, DB2 and the batch processing nature of what they were doing. They care not for the latest enterprise framework, OO pattern, database feature, web technology, blah blah, they just want to crunch data.<o:p></o:p>

     



  •  I nominate APL or A+, which have their own character set.



  •  @mxsscott said:

     I nominate APL or A+, which have their own character set.

    Oh god. I killed it. I killed everyone. They took one look at the character set and passed out.

    Be glad you haven't seen the sourcecode of the A+ interpreter. I quote one unlucky viewer: "OMG... this is the most horrible thing I've ever seen in my life. My eyes are bleeding..."

    ...

    OMG.... I just looked. I feel sick. It is utterly horrendous.

    Go here , download the 4.22 source and look at the source file a/f.c

    Wear eye protection.



  • @mxsscott said:

    I nominate APL or A+, which have their own character set.

    I almost suggested this one too. I worked with it in college, just for a few weeks. I had a little keyboard map to follow. It was horrible.



  • Here are some of my deliberately bad and strange and confusing ideas (on Esolang):

    • There is no way to store numbers.
    • Input is a nybble at a time, but output is a byte at a time.
    • The program can be drunk by using DRINK command
    • You can deal with "half-references"
    • Built-in constants: ZERO (actually 1, to confuse you), ONE (actually 0, to confuse me), PI (set to 3, in case you are too much religious), and HOURSINADAY (which can be used as a filter criterion).
    • Forced constants are in roman numerals
    • All programs running everywhere share variables
    • If you leave a variable for too long without assigning a value, the variable will lose its value.
    • You can return from a function more than once to return multiple values from the function at the same time. (for example: return 0; return 1; // returns both values at the same time)
    • Sometimes it skips commands and doesn't do it right the first time so you have to repeat it sometimes. (example: LET X=7 LET X=7)
    • If you try to read a value of a variable that isn't set yet, it will continue until a value is assigned, then it will go back and try again what it was trying to do before.
    • A return statement will not always know where to return to.
    • You can write a program by dragging a stylus across the screen, and if you don't like it, you can try again.
    • The source-code needs to have a .EXE extension to confuse people.
    • You have to use floating-point calculations for dealing with strings.
    • Large arrays are stored on VHS tapes.
    • The program has to compile itself after it has been compiled with the compiler.
    • The program source-code includes control characters like BEL and stuff as parts of variable names.
    Of course, bad ideas are not the only point of esolangs. Esolangs simply means you ignore all the normal rules and make whatever you want. It can result in bad things or in other experimental ideas, turing tarpits, themes, jokes, etc.


  •  @mxsscott said:

    Be glad you haven't seen the sourcecode of the A+ interpreter. I quote one unlucky viewer: "OMG... this is the most horrible thing I've ever seen in my life. My eyes are bleeding..."

    Oh, my goodness. It's actually written in its own language, composed entirely of C pre-processor macros. I assume that the gibberish translates, more or less easily, into A+ syntax, to make it easier for A+ programmers to maintain the compiler, but it's almost unbelievably impenetrable...

    Z H1(rdc){I r,d[9];ND1 r=a->r-1;Q(r<1,7);R mv(d,a->d+1,r),*d*=*a->d,rsh(a,r,d);}
    Z H1(monadicIota){A z;I1;{I r=a->n,*d=a->p,n=tr1(r,d);Q(n<0,9) Q(a->r>1,7)Q(r>MAXR,13)W(ga(It,r,n,d))d=z->p;DO(n,d[i]=i)R(I)z;}}
    Z H1(rav){ND1 R rsh(a,1,&a->n);}
    Z H1(sha){A z;ND1 W(gv(It,a->r))mv(z->p,a->d,a->r);R(I)z;}
    

    bonus points for the source file names:

    f.c
    i.c
    j.c
    k.c
    m.c
    n.c
    o.c
    p.c
    q.c
    r.c
    s.c
    u.c
    y.c

     



  • <FONT face="Times New Roman" size=3>LOLCODE makes me ashamed of being a programmer. Just look at this Hello World example:</FONT>

    HAI WORLD

    HAI
    CAN HAS STDIO?
    VISIBLE "HAI WORLD!"
    KTHXBYE

    <FONT color=#003f9e>Hello World</FONT> is pretty much the only way to introduce a language. We see four syntax elements in four lines:

     And then there's this:

    ON CATURDAY

    I'm currently trying to figure out if LOLCODE is adaptable to an event driven model. I think we could throw a CATURDAY event with the code, <FONT size=3>IZ CATURDAY!</FONT>

    ON CATURDAY
    	IM IN YR BED
    		I IZ SLEEPIN!!10
    		VISIBLE "Z!"
    	KTHX
    KTHXBYE

    So with this code fragment, we have an event block introduced with <FONT color=#9e0028>ON</FONT> eventName, and terminated with the usual <FONT color=#009e08>KTHXBYE</FONT>. We have an effectively infinite loop, labelled “BED”. The only output is an occasional “Z!”.

    And this is where I got these from.



  • I'd like to nominate the PICK system and the Universe database. Absolute nightmare, and absolutely no documentation to be easily found. 

    http://en.wikipedia.org/wiki/Pick_operating_system 

     

    Anyway, COBOL isn't that bad if you have to program in it. Add some autocomplete macros to your editor, and its easy to forget its verboseness.

     

    As a second language to nominate, how about MIPS assembly?



  • Dude, LOLCODE is awesome :D



  • @Becky said:

    Dude, LOLCODE is awesome :D

     

    PROTIP: look at the dates.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.