This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
HDeffo's profile picture

Worst language

Started by HDeffo, 24 February 2015 - 11:42 AM
HDeffo #1
Posted 24 February 2015 - 12:42 PM
So for my robotics course in school I'm currently having to work with a language from 1991 to program our robot and it is just awful compared to any modern languages so I was curious what language does everyone dislike the most of the ones you've used? Please give the language name and why you don't like it.


FANUC KAREL (based off of PASCAL)

This language just isn't flexible or intuitive at all it's usage is very strict and has the oddest quirks. On top of it's rules it also doesn't implement many things which make other language much easier for example this code in my TIC TAC TOE code for class

(First represented in Lua)

winPnt = {{1,4,7},{2,5,8},{3,5,9},{1,2,3},{4,5,6},{7,8,9},{1,5,9},{3,5,7},}

(Now how I had to do it trying to shorten the code as much as possible)

         FOR index1 = 1 TO 3 DO
		FOR index2 = 1 TO 3 DO
			winPnt[index1][index2] = (9 - index1) - ((index2 - 1) * 3)
		ENDFOR
	ENDFOR
	FOR index1 = 4 TO 6 DO
		FOR index2 = 1 TO 3 DO
			winPnt[index1][index2] = ((index1 - 4) * 3) + index
		ENDFOR
	ENDFOR
	FOR index2 = 1 TO 3 DO
		winPnt[7][index2] = 1 + (index2 * 2)
	ENDFOR
	FOR index2 = 1 TO 3 DO
		winPnt[8][index2] = 1 + ((index2 - 1) * 4)
	ENDFOR
Creator #2
Posted 24 February 2015 - 03:46 PM
This language looks horrible!
Geforce Fan #3
Posted 25 February 2015 - 12:33 AM
You couldn't pay me enough to program in that. Or force me.
Maybe try looking for a compiler that compiles into this language?
Edited on 24 February 2015 - 11:33 PM
Bomb Bloke #4
Posted 25 February 2015 - 12:42 AM
Oh teh noes, you have to use "to" instead of a comma and "endfor" instead of "end". I'll assume there's more to it than that, but your example code doesn't exactly look "painful".

I'd pack it down a bit more, though:

	FOR index1 = 1 TO 3 DO
		FOR index2 = 1 TO 3 DO
			winPnt[index1][index2] = (9 - index1) - ((index2 - 1) * 3)
			winPnt[index1+3][index2] = ((index1 - 1) * 3) + index
		ENDFOR
		winPnt[7][index1] = 1 + (index1 * 2)
		winPnt[8][index1] = 1 + ((index1 - 1) * 4)
	ENDFOR

Is the use of "index" (as opposed to "index1" / "index2") on that one line intentional?

Edit:

Ah, I see, you're trying to rebuild the array.

In that case, my answer is: don't. Just use the code to check for your victory condition directly. Don't try to force a square peg into a round hole.
Edited on 24 February 2015 - 11:50 PM
Agent Silence #5
Posted 25 February 2015 - 02:27 AM
-snip-
I understand how it doesn't look painful, but that use of caps is just savagery.
Bomb Bloke #6
Posted 25 February 2015 - 03:41 AM
I've spent a lot of time in the QB IDE, which applies the caps automatically after you enter each line. No extra work on your part, and keywords become obvious (even on a monochrome display).

Also very useful in that if the IDE fails to parse the line, it can't change it - so if you hit enter and the case stays as you typed it, you know you've got a mistake to go back and fix!
nitrogenfingers #7
Posted 25 February 2015 - 05:04 AM
Most painful language… so first question is serious or esoteric? Because Esolang has a hitlist of programming languages designed to be difficult to write in. I've only tried one or two of these but some are truly horrible, both to write and to debug. I've only tried one or two of these but for some of them, just getting printed output is utterly painful.

If we're talking about integrated languages, as in languages that work directly with a development environment rather than being able to run standalone, I would cite AS3 as perhaps the languages I have the most experience with hating. It's not that the language itself is terribly ugly, AS3 code is perfectly legible and C-like, it's just the way that all programs have to be structured around Flash scenes and things like scoping are completely obtuse to the user. Sometimes runtime behaviour is inconsistent or reliant on some property of the document that is unclear given the way the language works, and it can take awhile before getting it to perform consistently (along with a ton of other issues, like no web page debugging tools etc.) But that's not so much AS3's fault as the environment's fault.

But if we're talking about a language that is painful based on it's own merits rather than the tools needed to use it, I think the language I've found the most painful to write is probably PHP. On it's website I've seen it described as "glue", and that's about how I'd describe programming in it too; tedious and sticky, like tying strands of spaghetti together. This blog post is pretty old now, but it was current when I was doing PHP and sums up my feelings reasonably well. Perhaps not an original choice and there are languages I've had a harder time writing in, like Prolog for example, but in retrospect that probably isn't the fault of the language.

I'm a boring example though. There are programmers out there I've known that have worked with COBOL, custom database languages and other things that are the stuff of nightmares.
SpencerBeige #8
Posted 25 February 2015 - 02:56 PM
javascript is very good, because you can easily set functions and do anything.
Edited on 25 February 2015 - 01:57 PM
Geforce Fan #9
Posted 26 February 2015 - 01:39 AM
That Chef language is hilarious.
I love languages that try to look like they're not even programming languages, but some sort of literature.
oeed #10
Posted 26 February 2015 - 07:44 AM
But if we're talking about a language that is painful based on it's own merits rather than the tools needed to use it, I think the language I've found the most painful to write is probably PHP. On it's website I've seen it described as "glue", and that's about how I'd describe programming in it too; tedious and sticky, like tying strands of spaghetti together. This blog post is pretty old now, but it was current when I was doing PHP and sums up my feelings reasonably well. Perhaps not an original choice and there are languages I've had a harder time writing in, like Prolog for example, but in retrospect that probably isn't the fault of the language.

Yeah. Despite having spent hours in PHP sometimes I really hate it to bits. Since going completely OOP with it I've found it less annoying, and maybe that's just because I find non-OOP ways messy and hard to use, but you really have to do almost everything yourself. This is particularly true when dealing with form inputs.

I'm also really not a fan of AppleScript. It's just too 'Englishy' for me, you just don't really know what word to use. Oh, and this might be pretty controversial, but every time I try Java I storm off in a range. Generally because of the atrocity that is their million types of lists, arrays and the like. Objective-C has it pretty good with dictionaries and arrays, and Lua does too in it's simplified but super powerful system.
ElvishJerricco #11
Posted 26 February 2015 - 05:14 PM
Yeah. Despite having spent hours in PHP sometimes I really hate it to bits. Since going completely OOP with it I've found it less annoying, and maybe that's just because I find non-OOP ways messy and hard to use, but you really have to do almost everything yourself. This is particularly true when dealing with form inputs.

You should look into functional programming like Haskell (not like JavaScript). Once you get the hang of it, it's beautiful.

I'm also really not a fan of AppleScript. It's just too 'Englishy' for me, you just don't really know what word to use. Oh, and this might be pretty controversial, but every time I try Java I storm off in a range. Generally because of the atrocity that is their million types of lists, arrays and the like. Objective-C has it pretty good with dictionaries and arrays, and Lua does too in it's simplified but super powerful system.

AppleScript might be the worst language I've ever, ever used. The syntax is seriously nonsense. It's impossible to go into a program with an idea of what you want to do, and just write it. You have to be constantly googling just the syntax for how to write different things, because it's so complex. And usually, if you find something online that's similar to what you want to do, the syntax is completely wrong for the slightly different task you actually want to do. And the libraries and data types or horribly undocumented and vague. It's just awful… I don't like JavaScript, but I'm glad Apple added it for os automation because it's way better than AppleScript.
Edited on 26 February 2015 - 04:18 PM
Lignum #12
Posted 26 February 2015 - 05:29 PM
INTERCAL. Hello World example taken from wikipedia:

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

This entire language's purpose is to annoy the programmer. READ OUT is print, WRITE IN is read. You have to insert PLEASE into your code now and then because the compiler won't compile impolite code. On the other hand, if you use it too much, you will be considered excessively polite. There also are no strings, which means you have to deal with the individual bytes, not even characters. Oh and did I mention that there are no errors? The language will roll with anything you throw at it, so to make a comment, just write invalid code.
_removed #13
Posted 26 February 2015 - 06:41 PM
INTERCAL. Hello World example taken from wikipedia:

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

This entire language's purpose is to annoy the programmer. READ OUT is print, WRITE IN is read. You have to insert PLEASE into your code now and then because the compiler won't compile impolite code. On the other hand, if you use it too much, you will be considered excessively polite. There also are no strings, which means you have to deal with the individual bytes, not even characters. Oh and did I mention that there are no errors? The language will roll with anything you throw at it, so to make a comment, just write invalid code.

That PLEASE would rip my head off. Since when does a compiler check if you need manners? Useless and frustrating.
Lignum #14
Posted 26 February 2015 - 08:09 PM
That PLEASE would rip my head off. Since when does a compiler check if you need manners? Useless and frustrating.
Well, it is an esoteric language… and it's doing a good job being one.
Creator #15
Posted 26 February 2015 - 09:45 PM
INTERCAL. Hello World example taken from wikipedia:

DO ,1 <- #13
PLEASE DO ,1 SUB #1 <- #238
DO ,1 SUB #2 <- #108
DO ,1 SUB #3 <- #112
DO ,1 SUB #4 <- #0
DO ,1 SUB #5 <- #64
DO ,1 SUB #6 <- #194
DO ,1 SUB #7 <- #48
PLEASE DO ,1 SUB #8 <- #22
DO ,1 SUB #9 <- #248
DO ,1 SUB #10 <- #168
DO ,1 SUB #11 <- #24
DO ,1 SUB #12 <- #16
DO ,1 SUB #13 <- #162
PLEASE READ OUT ,1
PLEASE GIVE UP

This entire language's purpose is to annoy the programmer. READ OUT is print, WRITE IN is read. You have to insert PLEASE into your code now and then because the compiler won't compile impolite code. On the other hand, if you use it too much, you will be considered excessively polite. There also are no strings, which means you have to deal with the individual bytes, not even characters. Oh and did I mention that there are no errors? The language will roll with anything you throw at it, so to make a comment, just write invalid code.

That part with politeness made me laugh so much. PLEASE READ OUT
Creator #16
Posted 26 February 2015 - 10:03 PM
To everybody complaining about difficult languages, try Malbolge!!! Then we'll talk again!

~Creator
nitrogenfingers #17
Posted 27 February 2015 - 06:00 PM
To everybody complaining about difficult languages, try Malbolge!!! Then we'll talk again!

~Creator

It almost feels like cheating to mention Malbolge :P/> But yes I'd agree, it is objectively the most painful language to program with in existence.
Creator #18
Posted 27 February 2015 - 06:26 PM
There is another language basedon Morse, I don't remember the name, just search "most annoying esotheric languages". The idea is that you program in morse. It's so hard that the author of the language didn't feel like finishing the "Hello world" example.

Creator
HDeffo #19
Posted 06 March 2015 - 05:08 PM
Oh teh noes, you have to use "to" instead of a comma and "endfor" instead of "end". I'll assume there's more to it than that, but your example code doesn't exactly look "painful".
Mainly in that example code I was pointing out you can only define one item at a time and as reference for even more annoyance to that one at a time issue if you don't initialize all used variables quickly enough on start the program will error out.
Most painful language… so first question is serious or esoteric?
I was mainly referring to serious languages although esoteric ones can be included too :P/>/&amp;gt;
also for anyone who is curious to see the final outcome of this frustrating language heres how my final ended up looking
Spoiler

PROGRAM tictac

VAR
  notbox	   : INTEGER
  ltpli		: INTEGER
  ltpls		: INTEGER
  ballline	 : PATH
  index1	   : INTEGER
  index2	   : INTEGER
  index3	   : INTEGER
  plays		: INTEGER
  waslog	   : INTEGER
  perch		: JOINTPOS
  boxset	   : ARRAY [9, 3] OF JOINTPOS
  boxplay	  : ARRAY[9] OF INTEGER
  winpnt	   : ARRAY [8, 3] OF INTEGER
  fingame	  : ARRAY[2] OF INTEGER
  tactic	   : ARRAY[9] OF INTEGER

ROUTINE jntswap

BEGIN
  IF $SPEED < 750 THEN
	$MOTYPE = JOINT
	$SPEED = 750
  ELSE
	$MOTYPE = LINEAR
	$SPEED = 200
  ENDIF
END jntswap

ROUTINE getball

BEGIN
  MOVE TO ballline[1]
  jntswap
  MOVE TO ballline[2] NOWAIT
  DOUT[3] = TRUE
  DELAY 1000
  MOVE TO ballline[1] NOWAIT
  MOVE TO ballline[3]
  DELAY 400
  jntswap
  MOVE TO perch NOWAIT
END getball

ROUTINE place

BEGIN
  plays = plays + 1
  boxplay[ltpli] = ltpls

  MOVE TO (boxset[ltpli, 1])
  jntswap

  MOVE TO boxset[ltpli, 2] NOWAIT
  MOVE TO boxset[ltpli, 3]
  DOUT[3] = FALSE
  DELAY 1000

  MOVE TO boxset[ltpli, 2] NOWAIT
  MOVE TO boxset[ltpli, 1]
  jntswap
  MOVE TO perch NOWAIT
  getball
END place

ROUTINE plmove

BEGIN

pl1::
  FOR index1 = 1 TO 9 DO
	IF (DIN[index1] = TRUE) AND (boxplay[index1] = 0) THEN
	  ltpls = 1
	  ltpli = index1
	  place
	  RETURN
	ELSE
	  IF DIN[index1] = TRUE THEN
		DOUT[4] = TRUE
		DELAY 300
		DOUT[4] = FALSE
	  ENDIF
	ENDIF
  ENDFOR
  GOTO pl1
END plmove

ROUTINE wingame

BEGIN
  IF fingame[1] <> 0 THEN
	MOVE TO boxset[fingame[index1], 1]
	jntswap
	MOVE TO boxset[fingame[index1], 1]
	jntswap
	FOR index1 = 1 TO 5 DO
	  DOUT[6] = TRUE
	  DELAY 250
	  DOUT[6] = FALSE
	ENDFOR
  ELSE
	MOVE TO boxset[9, 1]
	jntswap
	MOVE TO boxset[7, 1] NOWAIT
	MOVE TO boxset[1, 1] NOWAIT
	MOVE TO boxset[3, 1] NOWAIT
	FOR index1 = 1 TO 5 DO
	  DOUT[5] = TRUE
	  DELAY 250
	  DOUT[5] = FALSE
	ENDFOR
  ENDIF
  jntswap
  MOVE TO perch
  ABORT
END wingame

ROUTINE logic

BEGIN
  FOR index1 = 1 TO 8 DO
	index3 = 0
	FOR index2 = 1 TO 3 DO
	  IF boxplay[winpnt[index1, index2]] = 2 THEN
		index3 = index3 + 1
	  ELSE
		notbox = boxplay[winpnt[index1, index2]]
	  ENDIF
	ENDFOR
	IF index3 = 2 THEN
	  ltpls = 2
	  ltpli = notbox
	  place
	  fingame[1] = winpnt[index1, 1]
	  fingame[2] = winpnt[index1, 3]
	  wingame
	ENDIF
  ENDFOR
END logic

BEGIN
  notbox = 0
  ltpls = 0
  index1 = 0
  index2 = 0
  index3 = 0
  plays = 0
  waslog = 1
  ltpli = 1
  FOR index1 = 1 TO 9 DO
	boxplay[index1] = 0
	tactic[index1] = 0
  ENDFOR
  fingame[1] = 0
  fingame[2] = 0
  FOR index1 = 1 TO 8 DO
	FOR index2 = 1 TO 3 DO
	  winpnt[index1, index2] = 0
	ENDFOR
  ENDFOR
  FOR index1 = 4 TO 6 DO
	DOUT[index1] = FALSE
  ENDFOR
  FOR index1 = 1 TO 9 DO
	boxplay[index1] = 0
  ENDFOR
  tactic[5] = 5
  FOR index1 = 1 TO 3 DO
	tactic[index1] = 5 - index1
	tactic[index1+6] = 9 - index1
  ENDFOR
  FOR index1 = 1 TO 8 DO
	FOR index2 = 1 TO 3 DO
	  winpnt[index1, index2] = (9 - index1) - ((index2 - 1) * 3)
	  winpnt[index1 + 3, index2] = (((index1 + 3) - 4) * 3) + index2
	ENDFOR
	winpnt[7, index1] = 1 + (index1 * 2)
	winpnt[8, index1] = 1 + ((index1 - 1) * 4)
  ENDFOR
  tactic[4] = 1
  tactic[6] = 9
  $TERMTYPE = NODECEL
  $SPEED = 750
  MOVE TO perch NOWAIT
  getball
  ltpli = 5
  ltpls = 2
  place

l1::
  plmove
  logic
  ltpli = tactic[ltpli]
  ltpls = 2
  IF plays = 9 THEN
	fingame[1] = 0
	fingame[2] = 0
	wingame
  ENDIF
  GOTO l1
END tictac

list of annoyances in this code

*(most) whitespace is required and cant be changed such as including a space or not OR using tab instead of several spaces.
*the inconsistent need that some items ALWAYS be lowercase while others ALWAYS be uppercase
*numbers cant go past 255
*any defined names including the name of the program cant have more than 8 characters
*the size of an array has to be predefined and cant be changed after. You can use a wild card size "[*]" however the max size still needs to be defined at the start of the program so its rather pointless in my opinion…
*if you use any string variables you need to define the length of the string similar to how you define the length of an array
*array indexes can only be defined one at a time
*arrays can only be a max of three dimensional (though this didn't end up being an issue for me)

and the one I found most annoying of any of the other issues with this class

in lua (and most languages that i know of) this is accepted


a = function()
	b()
end
b = function()
	number = 1
end
a()

however in karel if we attempt something similar…


PROGRAM foo

VAR

   number	 :INTEGER

ROUTINE a

BEGIN
	b	 --#Will error here because b wasn't defined yet even though technically we don't call out b until after it is defined
END a
ROUTINE b

BEGIN
	number = 1
END b

BEGIN
	a
END foo

This made it really tedious trying to organize my code so nothing referenced another routine before the routine was defined in the code.
Edited on 06 March 2015 - 04:28 PM
MKlegoman357 #20
Posted 06 March 2015 - 06:12 PM
Well, I think it is a good practice to first define your variables and then use them, at least their definition, not value in any language. Improves readability :)/>
HDeffo #21
Posted 06 March 2015 - 06:45 PM
Well, I think it is a good practice to first define your variables and then use them, at least their definition, not value in any language. Improves readability :)/>

honestly I believe it depends on how you organize them. Instead of making them listed in order of reference I prefer to list functions in a logical order. Such as in my tic tac toe program I wanted plmove to be the top one being as it defines the user input side of the game and i figured that would usually be what a user would be reading. After that i wanted place and getball since I felt both of those are obviously important to the code and mostly go hand in hand so should be top and together. And towards the end of the routines I would've listed routines that were more for shortcuts and laziness such as jntswap which really for the most part could be ignored in the code after reading it once.
MKlegoman357 #22
Posted 06 March 2015 - 08:12 PM
In a lot of languages its usually just your preference where you put your variable declarations :)/>. IMO by putting them all before using them anywhere is better for someone else who is reading your code. So whenever he/she encounters a function or variable in-use they would already know what it is, instead of discovering it later in the code.

Anyway, I don't have a language that I don't like. Really, every programming language, despite how bad it may be, is good to me, well, because it's a programming language and it is the way it was made. Every thing I might find badly designed or similar I take as a challenge. Well, my most "challenging" programming language I've used was probably "Pascal", but after cracking it's logic I can see how it may exist.
justync7 #23
Posted 06 March 2015 - 11:26 PM
The most difficult language, by far HAS to be WhiteSpace. Its unreadable unless you highlight the different spaces and tabs in different colors, and even then its a pain.
Lignum #24
Posted 06 March 2015 - 11:30 PM
The most difficult language, by far HAS to be WhiteSpace. Its unreadable unless you highlight the different spaces and tabs in different colors, and even then its a pain.
Difficulty wise Malbolge, as already mentioned, definitely wins. From Wikipedia: "Malbolge was so difficult to understand when it arrived that it took two years for the first Malbolge program to appear. That program was not written by a human being: it was generated by a beam search algorithm designed by Andrew Cooke and implemented in Lisp."
Buho #25
Posted 09 March 2015 - 05:13 PM
I think I learned how to program with Karel in my high school! It would have been around 1995. After completing a semester learning GW-BASIC and Q-BASIC, we could take the advanced class with PASCAL. The curriculum used a pseudo environment with a robot, named Karel, not unlike ComputerCraft (which was one of my initial draws to CC).

I remember being frustrated by this at the time, sensing I wasn't in a "real" programming world but instead in a sandbox where I could only control a robot. Nevertheless, it was instructive. Googling around, I found an explanation for why Karel is used: http://math.otterbein.edu/home/JKarelRobot/ParelTutorial/PKarelOverview.htm Click "Home" for screenshots and more information.

No, Karel is not an esoteric language. It is just constructed to emphasize certain things the teacher wants students to learn, I think. For me, the lessons worked and I fell in love with programming.

This class was pivotal and I decided to go to college and get a Computer Science degree. Midway through college I switched to Information Systems (CS had too much theory, not enough application), I got a BS in that, and I've been a professional programmer now for 14 years. I still love going into work every single day!

I love my job, and how I explain why I like what I do to non-programmers hails back to Karel: computers are like robots, and I like making robots do repetitive stuff to make my life easier.
HDeffo #26
Posted 09 March 2015 - 11:50 PM
-snip-
Yes I know this karel and this was half of my frustrations getting good documentation because this ISN'T the karel I'm using but there's no way to search between the two because of keyword similarities.

For my class I am using FANUC KAREL. FANUC is a company that makes actual robots in this case it's an arm with a plunger effectively on the end of it. All FANUC robots use a language developed by FANUC and based off of pascal called KAREL.

KAREL the robot is a sort of "teaching" sandbox language. This is also based around controlling a robot however instead of a physical robot it's a sandbox one. KAREL the robot is also like FANUC KAREL written based off of pascal and very similar to it. Both language also appeared roughly around the same time.

So of keywords I tried karel, pascal, robot, etc the only thing that gave me a few results for what I needed was just flat out searching FANUC and navigating from there. Why two languages both based off the same language, having the same name, and having similar keywords, came out at the same rough time period with no one deciding "hey we should change the language name" I really don't much understand.
Buho #27
Posted 11 March 2015 - 06:38 PM
This is probably because there was no Internet back then :D/>

Good luck!
_removed #28
Posted 15 March 2015 - 11:16 PM
Java. It is so annoying and is very difficult to program in. If somebody paid me £9999999999999999999999999 to program in java, i wouldnt accept it. If i was paid to program in PHP, I instantly would snatch the offer before anybody could touch my money with ther greasy hsnds.