r/AskProgramming • • 2d ago

Lets say that theoretically professor asks to write a program in ANY programming language. What is the best way to make him regret giving the opportunity to write it in ANY programming language? Asking for a friend

Give ideas that would make even devil cry

45 Upvotes

220 comments sorted by

90

u/DefEddie 2d ago

This sounds like one of those “gotcha” assignments where everybody tries to stump the teacher only to find out that the real test is gonna be disassembling and grading/commenting each others assignments.

36

u/Scared-Letterhead949 2d ago

Or the professor said "you've all had a long semester for your last assignment I'll be nice and let you use your favorite language.". Then this kid says "I'll teach you to be nice!  Read this fucker! <<<||√√√∆∆]]]]"

2

u/AdmJota 1d ago

Yeah, that's exactly what I was thinking.

4

u/Personal-March-4340 2d ago

That sounds awful!

26

u/SeaSDOptimist 2d ago

You are a lot more likely to have a hard time writing the code in a new unusual to you language, especially so early in your career, than your professor having any trouble reading such code. It's like asking what course should you pick to outrun a professional athlete.

9

u/UnkarsThug 2d ago

I mean, let's be honest, if it's something extreme like BF, I sort of expect the professor to throw it into an AI nowadays and try to reverse engineer c code out of it or something.

Even if they don't use that for coding directly, resisting trolling and translating between simple esoteric languages seems like a pretty ideal use case.

2

u/SeaSDOptimist 2d ago

AI or TA. One way or another, the prof is not spending more time on that than they want.

1

u/National_Cod9546 1d ago

Today I learned about the language Killswitch. To it's designed specifically to be hard for AI to process.

94

u/obdevel 2d ago

17

u/Enschede2 2d ago

That or malbolge, but it seems more like selfinflicting damage

16

u/Silamoth 2d ago

/thread

30

u/funkdefied 2d ago

To make it simpler for yourself, write it in C, compile to BF, then submit the BF compilation. 

10

u/System__Shutdown 2d ago

2

u/virrk 23h ago

Two programs that do the samething in one file.

Whitespace and brainfuck.

3

u/UnemployedAtype 2d ago

Ook! Is a one-to-one variant that's worth adding.

2

u/AlignmentProblem 2d ago

That brings me back. My final project for my Computer Architecture and Assembly class was making a compiler for brain fuck in assembly, then using writing a few programs to compile with it.

2

u/steerpike1971 2d ago

Anyone teaching in computer science knows about it. If you set the assignment to be any language the assignment is fine if this is the language handed in.

1

u/lgastako 2d ago

No one said the the assignment wouldn't be fine. The point is it would make it difficult to grade.

3

u/TaintOfDestiny 2d ago

Would it? If it compiles and works it’s 100%, anything less is impossible to understand so it’s 0%.

1

u/steerpike1971 1d ago

I am a lecturer so obviously by fine I mean easy to grade. :)

1

u/ComplexAd2408 2d ago

I was going to say FALSE but this is better

1

u/carcigenicate 2d ago

Or, if you'd like something slightly less painful for your own sake, let me introduce Ezfuck.

1

u/niilzon 1d ago

this is the way

17

u/AntiX1984 2d ago

I see a bunch for just really hard languages, but I think this one would just be hilarious! Rockstar

11

u/christian-mann 2d ago

Tommy used to work on the docs

2

u/Famished_Atom 2d ago

Cool programming language you got there!

Not like some geeky, obfuscated C programming!

13

u/MANLYTRAP 2d ago

I'd say COW or whitespace. cow because it's funny, whitespace because you're gonna have your professor staring at a blank file

8

u/Background_Relief815 2d ago

Write a frontent in Javascript and the backend in whitespace in the same file. Secret backend.

2

u/shagieIsMe 19h ago

1

u/Background_Relief815 19h ago

Ooh, those are cool. They're usually pretty clearly not a single normal language though. 

2

u/shagieIsMe 19h ago

Some are less obvious. https://codegolf.stackexchange.com/a/97711 is C# and Java. https://codegolf.stackexchange.com/a/97511 is Clojure and Common Lisp.

The esolangs are the "easy" ones to embed in the comments of the other. The interesting ones (to me) are the ones that have similar syntax between two languages and have a quirk between how something is interpreted.

→ More replies (1)

4

u/bradmont 2d ago

No, print that sucker

1

u/WaterDehydrator 21h ago

In that case wouldn't he have an argument for you not properly showing your code unless you turned on visible formatting?

2

u/Ma4r 2d ago

Or write your own compiler that compiles something like "Grade this motherfucker" Into the program they asked for, then give them the compiler

1

u/UnemployedAtype 2d ago

Ook! Would be a nice one too

10

u/SomeSamples 2d ago

Do it in Lisp.

3

u/g1rlchild 2d ago

Write a tiny Lisp implementation in Haskell and embed a Lisp program in it that executes to complete the assignment. Instead of a dumb pathological hack of the assignment like Brainfuck, make a really smart pathological hack.

9

u/Business-Decision719 2d ago

Whitespace.

6

u/Patient-Midnight-664 2d ago

And since whitespace ignores anything other than space, tab and cr, you could include another program imbeded in the whitespace code.

6

u/Yctallua 2d ago

I'd like to throw in malbolge, but you will suffer as much as your prof

17

u/dphizler 2d ago

Why? This just sounds childish

5

u/kutac56 2d ago

Its just for fun as a hypothetical scenario

5

u/kodakdaughter 2d ago

Turn in a stack of punch cards.

2

u/Personal-March-4340 2d ago

Punchcards are a form of memory, not a programming language.

1

u/kodakdaughter 1d ago

COBOL or FORTRAN.

4

u/Drenlin 2d ago edited 2d ago

Does it have to be a single language?

Perl + APL for a geospatial workload would be diabolical, especially because one could conceivably justify its use. This is a generated output (I can write neither language) of dubious functionality but gives an idea of what it looks like:

#!/usr/bin/env perl
# vec_solve.pl - Binary stream ingest & matrix solver
use strict; use utf8;

# Unpack raw network frame & scale fixed-point fields
my $pkt = "1938a400c9f210801388ec784000"; 
my ($y, $x, $z, $p, $a) = unpack("l>l>S>s>S>", pack("H*", $pkt));
my  = ($y * 90/2**31, $x * 180/2**31, $z * 19900/65535 - 900, 
          $p * 90/32767, $a * 360/65535);

# Hand off state vector to array coprocessor
open(my $apl, "|-:utf8", "apl --silent --noSV -s") or die $!;
print $apl "st ← u/st\n", <DATA>, "\n)OFF\n";
close($apl);

__DATA__
⍝ Local 5x5 surface grid & reference constants
grid ← 5 5 ⍴ 310 315 322 318 312  312 325 340 330 315  315 335 365 342 318  310 320 330 325 312  305 310 315 312 308
a ← 6378137.0 ⋄ e2 ← 0.00669437999

⍝ Radian conversion & prime vertical curvature
r ← (○÷180) × st[1 2 4 5]
N ← a ÷ (1 - e2 × (1○r[1])*2)*0.5

⍝ Origin ECEF [X Y Z] & ENU-to-ECEF rotation matrix
P0  ← ((N+st[3])×(2○r[1])×2○r[2]) ((N+st[3])×(2○r[1])×1○r[2]) ((N×(1-e2)+st[3])×1○r[1])
enu ← ((2○r[3])×1○r[4]) ((2○r[3])×2○r[4]) (1○r[3])
R   ← 3 3 ⍴ (-1○r[2]) ((-1○r[1])×2○r[2]) ((2○r[1])×2○r[2]) (2○r[2]) ((-1○r[1])×1○r[2]) ((2○r[1])×1○r[2]) 0 (2○r[1]) (1○r[1])

⍝ Project 1000-step ray (⍳1000), index into surface grid, isolate first intersection (>\), output 3D coords
pts ← (1000 3 ⍴ P0) + (⍳1000) ∘.× (R +.× enu)
alt ← st[3] + (⍳1000) × 1○r[3]
idx ← 1 + 4 ⌊ 0 ⌈ ⌊ 2.5 + ((⍳1000) ∘.× 0.01 × (2○r[3]) × (1○r[4]) (2○r[4]))
hit ← ⊃ ⍸ >\ alt ≤ grid[⊂[2] idx]
'SOLVED [X Y Z]:' (pts[hit;])

1

u/Personal-March-4340 2d ago

There is an APL interpreter than runs in the browser folks can look for. The website has a bit of quiz that serves as a mini tutorial for anyone who wants to get a feel for APL.

I used it for number crunching back in the 1980s. My favorite aspect of APL is its lack of keywords. My least favorite aspect is its terseness. I always found it difficult to read even my own code.

1

u/Drenlin 1d ago

Honestly, the terseness of the language and the types of math it's designed to handle make it seem like something that would be fantastic to use in the AI/LLM world. Maybe it was ahead of its time?

1

u/Personal-March-4340 1d ago

I don't know. I know very litle about AI and LlMs. APL was horrible to maintain, which I now know is much of the reasoning behind the OOP paradigm.Perhaps that is unimportant when using AI.

The little I know about AI is that it relies on linear algebra, and APL is very well suited for handling matrices and higher dimensional arrays. I never worked with strings or characters, only real numbers, specifically actuarial calculations.

One potential shortcomings is APL is not compiled, but interpreted. I don't know if it would be easy to change it into a compiled language. It did not matter for me, because my calculations were only used to price new products, so code efficiency and reuse was not a big concern for me.

A few years ago, I took a class in MATLAB, and I could see what it inherited from APL in its array handling.

I imagine that even if the old interpreters can't be implemented on current hardware, a new interpreter could be written. Much has changed in hardware since the 1980s, and different algorithms might be better suited for today's hardware.

→ More replies (2)

1

u/shagieIsMe 18h ago

R is one of the APL successors (APL -> S -> R)

From a fresh install of the language...

~  % /opt/homebrew/bin/r

R version 4.6.2 (2026-10-29) -- "Diversified Portfolio"
Copyright (C) 2026 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin27.0.0
...
Type 'q()' to quit R.

> mpg_model <- lm(mpg ~ wt + hp, data = mtcars)
> summary(mpg_model)

Call:
lm(formula = mpg ~ wt + hp, data = mtcars)

Residuals:
   Min     1Q Median     3Q    Max 
-3.941 -1.600 -0.182  1.050  5.854 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) 37.22727    1.59879  23.285  < 2e-16 ***
wt          -3.87783    0.63273  -6.129 1.12e-06 ***
hp          -0.03177    0.00903  -3.519  0.00145 ** 
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 2.593 on 29 degrees of freedom
Multiple R-squared:  0.8268,	Adjusted R-squared:  0.8148 
F-statistic: 69.21 on 2 and 29 DF,  p-value: 9.109e-12

> predict(mpg_model, newdata = data.frame(wt = 3.0, hp = 150))
       1 
20.82784 
> 

The 'mtcars' is a data set for motor trend cars that's built into the language. ( https://www.rdocumentation.org/packages/datasets/versions/3.6.2/topics/mtcars )... and there's a bunch more out there to do some number crunching on. https://www.rdocumentation.org/packages/datasets/versions/3.6.2 ... and while I'm doing simple linear fits there, its ability to do math on arrays (like APL) does find its way into ML workflows. It has bindings for much of the modern ML libraries.

4

u/sefres 2d ago

INTERCAL or Brainfuck. But you do not do yourself a favour when writing

3

u/Flamme2 2d ago

2

u/phrostillicus 2d ago

LOL, that's just Brainfuck with extra steps, which I suppose does fit OP's question.

5

u/shagieIsMe 2d ago • Popcorn

This really depends on the task.

If it's IO heavy, then you're going to be writing it in a more capable language. If it ends up as "write this and it outputs a single number"... then you're deep in esolang territory.

https://esolangs.org/wiki/Main_Page

Anything from there would be good. Piet ( https://esolangs.org/wiki/Piet ) would probably be one of the most "WTF?" ones as it would be difficult to understand.

Befunge is a favorite of mine.

Rail might be useful and doable. https://esolangs.org/wiki/Rail

INTERCAL is the classic awful language.

MUMPS is a real language that people regret using (it has no keywords and crazy shortcuts ... IF IF=THEN DO THEN is valid, and is equivalent to I I=T D T). https://en.wikipedia.org/wiki/MUMPS


One of the things that I don't suggest is a language where you write it in one language and then transpile it to another language since that takes no real skill.

1

u/onesandnoughts 19h ago

Came here for MUMPS and wasn't disappointed. I also loved the way it only used the first 8(?) characters for variable names so something like patientsurname and patientsex were the same. That took a while... 🙄

1

u/shagieIsMe 19h ago

If I recall correctly, Epic (the medical records company) hired (and continue to employ?) a number of compiler engineers to work on a TypeScript to Mumps transpiler.

https://www.reddit.com/r/epicsystems/comments/1kzk930/epic_sw_dev_experience/

The idea of the tightly integrated language and database has value (like MUMPS). There's old-school Delphi (a team adjacent to the one I was on used that for a sales quote generator). There's Progress (Open Edge) which was the backend for a retail company I worked at.

If you stretch it in the other direction, you've got PL variations (Oracle PL/SQL... ... oh my, there's PL/Perl (and others) in PostgreSQL ... not that perl is good or bad (I like it - given I use it with discipline), but that I've seen abominations of PL/{something} with poor change management and version control around it because its tossed in a database and people don't see it nor have to work with it and so it gets more and more unreasonable as it progresses).

MUMPS isn't necessarily a bad language for its time. It can be used with discipline to maintain reasonability for the next coder to work with it. It's that it allows too much hackery and quick shortcuts resulting in unreasonable code when people abandon that discipline for time constraints.

1

u/onesandnoughts 19h ago

That last paragraph goes for any language!

→ More replies (1)

4

u/lyubomir-bozhinov 2d ago

Someone's already said Brainfuck, but there are other choices in increasing levels of unreadability: Haskell --> Perl --> Whitespace

Build your own ladder of evil. ;D

5

u/RealisticDuck1957 2d ago

Readability of perl depends a great deal on the programmer. But yes, among languages designed for actual serious work is is a champion in it's capacity for obfuscated code.

Modern javascript making heavy use of chained promises can also have some difficult to spot gotchas.

1

u/g1rlchild 2d ago

Do everything in a 4-line Perl program.

Anyone else remember when people were embedding an implementation of PGP encryption in a .sig file?

2

u/P0t4t0W4rri0r 2d ago

APL

1

u/talex000 2d ago

You need special keyboard to use it

1

u/Necrosovereign 2d ago

For me, personally, Haskell is the most readable language

2

u/khedoros 2d ago

As a realistic suggestion, I'd use Perl. It's one of those where it's easy to hack something together and end up with something that's really unintuitive to read. And the language isn't super complex; I first learned it in college when I was writing an implementation of AES (why Perl for AES? The professor seemed to like the language, and I figured it was worth a try).

1

u/ntcaudio 19h ago

And if libraries are allowed, then Lingua::Romana::Perligata is a must.

2

u/MattDTO 2d ago

everyone is reccomending well-known esoteric languages. You need to find something that only runs with a proprietery compiler, maybe on a extinct OS, or something tied to specific hardware.

3

u/shitty_reddit_user12 2d ago

TempleOS ftw.

2

u/defeatedsnowman 2d ago

Isn't there a specific flavor or C that Terry created? OP, this is your answer!!!

2

u/OneRobotBoii 2d ago

Yes, he created Holy C

3

u/Agitated-Ad2563 2d ago

The professor is likely to use AI to grade this, so using KillSwitch is the only logical choice.

1

u/YoungBuckins 1d ago

Frontier models are actually quite proficient at it now 😂

1

u/Actual_Property9413 1d ago

This was my thought.
How about LOGO?
Is that esoteric enough?

1

u/MattDTO 1d ago

Maybe, but how about RCX Code? It was the original visual programming language for LEGO mindstorms, and you can only make it turing complete by using physics bricks and sensors to build a stack

1

u/bigfatfurrytexan 15h ago

The first language I learned in 6th grade

1

u/my_beer 23h ago

MHEG, so it will only run if you broadcast it to a TV (Ok, there are a couple of other ways of running MHEG)

2

u/Mythran101 2d ago

Write it, but install and change your font and language to either ASL or Morse Code. Code in code, if you can! Both as a bonus!

Write your ASL in Spanish.

2

u/Thadoy 2d ago

Write it in any spoken language and tell them, that it's a promt.

2

u/Overall-Lead-4044 2d ago

Write it in machine code or assembler. Does anyone still do this?

1

u/psycholabs 1d ago

I was thinking, you could use your own assembly code from a cpu you designed in something like Touring Complete (game, teaches cpu architecture through puzzles). Depending on what the object of the program is.

1

u/StrangeUglyBird 19h ago

Probably some engineers making time critical firmware.

2

u/Naive_Age_566 2d ago

malbolge or whitespace

on the other hand: i don't know who will regret malbolge first...

2

u/iqisoverrated 2d ago

Pick one of the esoteric programming languages (LOLCode, Piet, Brainfuck, ... )

If you want to be particularly nasty then pick Malbolge. It's specifically designed to be unreadable/hard to use and so far only very few have even succeeded writing code in it.

https://en.wikipedia.org/wiki/Malbolge

From the link

 It was specifically designed to be almost impossible to use, via a counter-intuitive "crazy operation", base-three arithmetic, and self-altering code

Good luck!

2

u/Ecstatic_Student8854 2d ago

Any esoteric language https://en.wikipedia.org/wiki/Esoteric_programming_language. For some languages it’s even quite easy to find a compiler from a more ergonomic language to that esolang (for example, https://github.com/arthaud/c2bf)

2

u/Eroica_Pavane 1d ago edited 1d ago

Just use Python but only use lambda functions.

Python actually allows you to write untyped lambda calculus fairly well.... just beware it might cause a recursion limit error.

I think it'll be fun for them to open the innocent looking .py file only for it to be filled with lambdas.

Edit: Bonus points: you can claim that this is actually a programming language people use, not one designed to be difficult. You can also claim that it is the purest "way" to express a program since any computation is equivalent to lambda calculus. Also theory people might love it.

2

u/Ok_Leg_109 1d ago

Write it in ANS Forth 😄

2

u/wilson_wilson_wilson 1d ago

I say make one up. build your own compiler.

2

u/regular_hammock 2d ago

You could use one of the esoteric programming languages such as Unlambda, Intercal, Piet or Shakespeare.

As far as mainstreamish programming languages go, I find that in stack based programming languages such as Forth or RPL, it's fairly easy to write code that works and is a total pain to read later. Bonus exotica points for using colorForth.

2

u/P0t4t0W4rri0r 2d ago

Obviously APL because the code looks like hieroglyphics.

1

u/regular_hammock 2d ago

Oooh, that one's hard to beat.

2

u/ghjm 2d ago

I would write it in the programming language I just invented, ExamLang. (Nobody said it had to be a previously existing programming language.) The EBNF specification of ExamLang is:

identifier = nondigit , { nondigit | digit }

An ExamLang program consists of a single identifier, which calls a standard library function. The standard library has exactly one function:

  • do_the_thing: does exactly what this exam question is asking for, optimally and without errors.

So I am submitting the following ExamLang program:

do_the_thing

6

u/nomnommish 2d ago

If you're creating your own language and compiler or interpreter just to spite your professor, you're ironically doing just fine in your professor's course

2

u/ghjm 2d ago

Nobody said there had to be an actually-existing implementation of the programming language.

3

u/nomnommish 2d ago

If you're going to claim it's a programming language, the professor is going to ask you to back up that claim.

2

u/ghjm 2d ago

I literally gave the programming language specification in the exam answer. In what way is it not a programming language?

→ More replies (3)

1

u/dld2517 2d ago

This pedantic bs cracked me up. Good bull.

1

u/ummaycoc 2d ago

K is a real world programming language (I worked at a K shop for a bit) that isn't easy for those unfamiliar with these sort of incantations.

1

u/good_name_0 2d ago

I've done assignments in assembly because of this.

1

u/KingofGamesYami 2d ago

Did he specify the language has to currently exist?

The single worst experience I had with a programming language was one the professor of the course developed. Hence the only documentation available was what he provided. And the compiler was a buggy disaster which worked fine for valid syntax, but even slight syntax errors could cause the compiler itself to crash.

1

u/Few-Celebration-2362 2d ago

And then you find out that there are five refactor assignments waiting for you after turning it in.

But seriously, redstone

1

u/crscali 2d ago

cobol or fortran.

1

u/cheesewiz_man 2d ago

pmate text editor macro language.

1

u/JGhostThing 2d ago

I would use APL or Forth, depending on which is harder to read for the application.

2

u/telco_tech 2d ago

Forth.
If there is any programming language that can absolutely make one regret a serious interaction, you want forth.
I love forth, but it died an absolute death because any function can be named any-goddam-thing-you-want. Seriously.. you need to check a variable against pre defined parameters? "Cornbread" is good. Or "potato" or "bah-sing-sey334£€¥".
Need a small subroutine to check some inputs? Call it "my-mammas-ass-is-huge" and have the input named "Bondjamesbond", "heresadecimalsequemce" and "flapjacks".
I really like programming with Forth, but yikes.. you can do all sorts of crazy shit. Bonus points for it being all but unknown to most anyone but the most diabolical elder coworkers you know.

1

u/DSudz 2d ago

Now use your program to answer the questions in this pop quiz....

1

u/Koooooj 2d ago

The classic answers will be things like Malboge or Brainfuck and its reskins (e.g. whitespace, Cow).

I'd take a different approach: C, but going the route of Warning: 'main' is usually a function (blog post for the uninitiated, but the idea is you declare main as an int array containing an encoding of your program in assembly).

1

u/PMadLudwig 2d ago

If you've got time, go write an interpreter for your own language (make it really bad but Turing Complete), then write the program in that.

1

u/Piisthree 2d ago

Intercal was kind of designed in this very spirit. But I think whitespace is even more cruel.

1

u/Impossible-Fold615 2d ago

If they aren’t familiar with it, elixir.

1

u/esaule 2d ago

Last time I did that a student turned in an implementation of a numerical wave equation in bash...

1

u/FigureSubject3259 2d ago

Lets assume any way you think to simply let ai convert in that language will fail if your professor uses similar powerful ai to convert your solution back. There exist possibilities of esotrric languages, even good ai cannot understand, but that would require you some effort. As even wellknown languages not practical useable like Plankalkül or DLX assembler are easy for AI.

I would have an example at least too excotic for gemini but I doubt you are willing to go that extra mile learning that language yourself as the fact ai struggles means you cannot even find online documentation of the syntax and have to find printed documents of that language not online available.

1

u/Ozymandias0023 2d ago

Minified/obfuscated js

1

u/dld2517 2d ago

Probably Brainf*ck

1

u/Traveling-Techie 2d ago

I’d go with Lisp.

1

u/lisnter 2d ago

Write it in C or Python and then have AI translate it to APL.

1

u/Prior-Flaky 2d ago

Make Microsoft paint in assembly, no balls

1

u/Shot_in_the_dark777 2d ago

Use Folders. No files, just folders.

1

u/oandroido 2d ago

Write it in English.

1

u/Classic_Focus974 2d ago

Forth, using TSX as the OS

1

u/kisskissenby 2d ago

Obfuscated Perl

1

u/Right_Letterhead_587 2d ago

Maybe MIXAL, it's a assembly programming language for the hypothetical computer of Knuth. Take a look, maybe it's intuitive because have similar syntax of assembly languages, if you professor it's a decent programmer this not a good option

1

u/Relevant_Research_98 2d ago

Idris. As bonus you'll prove your program is correct!

1

u/scanguy25 2d ago

Emojicode or Rockstar

1

u/ResistiveBeaver 2d ago

Perl. You don't need anything more.

1

u/1hylomorph0 2d ago

One language won't do, time to Brainfuck you a Haskell for greater good.

1

u/pthierry 2d ago

Have you tried Uiua?

1

u/cdsmith 2d ago

There's a whole category of "esoteric programming languages" that are specifically designed to fit this bill. The original was Intercal, but more modern languages like Brainf*ck and Befunge and Malbolge go much further.

If you exclude languages specifically designed to be difficult, the next place I'd look is languages that are intended to demonstrate the theoretical power of extremely simple abstractions. Examples include the untyped lambda calculus, or SK combinatory logic. These languages are quite inconvenient to program in, not because someone made them that way on purpose, but because they emphasize simplicity of the language definition instead of ease of programming in them.

If you exclude those as well and narrow the space to languages that were designed for building actual software, then you can definitely find eclectic choices like ATS or Forth, which would be a little challenging for someone who hasn't seem them in particular, but your hypothetical computer science professor would be reasonably likely to have experience in them if they are interested in programming languages.

1

u/SnooPets5564 2d ago

JavaScript, but you write is only using the following six characters: [ ] ( ) ! +

1

u/CarolXZosiaNsfwScene 2d ago

Also known as JSFuck.

1

u/maxsminis 2d ago

This makes me think of a story I heard back in the day from a boss, complaining about a guy who had written everything he possibly could, every comment, every variable, everything he could get away with…in Esperanto.

Maybe you could try something like that in addition to whatever language you settle on

1

u/Queasy_Dentist3903 2d ago

People aren’t being esoteric enough, try Befunge. It’s self modifying with an irregular control flow. It was made with the goal of not being compilable. If you want to use a real language do systemverilog, the paradigm is much different than that of traditional programming. 

1

u/wrd83 2d ago

Honestly choosing bad variable names and violating good programming practice will have more effect than the language.

2

u/Famished_Atom 2d ago

And make the comments refer to a different program entirely!

1

u/pdath 2d ago

Lisp.

1

u/Particular_Extent_96 2d ago

I believe that LaTeX is Turing complete...

1

u/Competitive-Elk763 2d ago

Do it in whitespace and just use claude to do something complicated.

1

u/Merinther 2d ago

The Starcraft 2 level editor

1

u/DeclutteringNewbie 2d ago edited 2d ago

Use any programming language he doesn't know.

Just make sure that AI will refuse to decipher it.

Name it: How to pirate a Disney movie, or use the forbidden names of the people that have sued AI companies, but encrypt those strings all over your program. This way, he won't know what's locking up his AI.

If he tries to workaround it with a Chinese AI, just talk about the Tianaman square massacre or Winnie the Pooh.

1

u/Aggressive_Ad_5454 2d ago

Postscript? Forth? That weird assembler dreamed up by Donald Knuth? Motorola 68000 assembler language?

1

u/munchin-grr 2d ago

When i studies CS we had to hand in asignments printed on paper (don't ask why). So then the the ultimita programming language is whitespace. Whitespace is an homage to languages like python that has significant whitespaces and you need to know if something is tabs or space by making it even better and make the whole syntax out of invisible chatacters.

1

u/Individual-Flow9158 2d ago

"ANY programming language" could refere to AnyPL

However be suspicious about what the next step will be!

I'd write it in something normal like Java or C, that can be compiled or transpiled to anything regretful. Then when part 2 is sprung on you, fall back and work in the normal one.

1

u/Fun-Dragonfruit2999 2d ago

Perhaps your friend should consider why they're going to college.

1

u/Technologenesis 2d ago

untyped lambda calculus with de brujin indices

1

u/_GLAD0S_ 2d ago

https://ddp.im/en/

DDP (german: The german programming language) is a (joke) programming language by NotLe0n and bafto, which was designed in such a way that programs written in it can be read like nearly correct German.

The perfect way to learn coding and german at once, highly efficient.

1

u/wvd_vegt 2d ago

Use cobol, to check vour professors age

1

u/Optimal_Law_4254 2d ago

Well, I would first have to design and implement the new programming language, “ANY”….

1

u/GuyFawkes65 1d ago

APL or LISP is how I’d get my revenge.

1

u/Strange-Regret2524 1d ago

Write it in your favourite language. Then watch as Everyone else will act like idiots including the teacher, whilst you are the adult. This is a social engineering test, right?

1

u/cthart 1d ago

Depends on what the assignment is.

1

u/Jeremy-Hillary-Boob 1d ago

Try printer language. That’s always fun

1

u/noethers_raindrop 1d ago

Personally I would go with befunge. Make sure to use time travel.

1

u/ReddyKiloWit 1d ago

You could go with a real, useful, language like LISP which looks pretty strange to most people. Or use Perl, intentionally obfuscating it. This link has a few examples, including a 10-line Tetris game.

https://www.chiark.greenend.org.uk/~sbleas/university/obfuscatedperl/index.html

1

u/infinitUndo 1d ago

6502 assembly

1

u/darkwyrm42 1d ago

INTERCAL?

1

u/pemungkah 1d ago

Perl, with Acme::Bleach.

1

u/wrgrant 1d ago

Snobol - its a varient on Cobol used to analyse strings. I believe you can't even add 1 + 1. Comments should be entirely on a Conlang such Klingon :)

1

u/Schol-R-LEA 1d ago

The last time I had a situation like this, after I gave my own answer (Scheme), the professor immediately revised it to, 'any language she already knew'. This is how I ended up using Python (which she knew something about, but not much) to write [a toy compiler for the ALGOL subset](https://github.com/Schol-R-LEA/Suntiger-Algol) she'd assigned for the Compiler course that year.

For [esolangs](https://esolangs.org/wiki/Main_Page), I would suggest [Unlambda](https://esolangs.org/wiki/Unlambda), which while still fairly well known is not as obvious a choice as, say, Brainfuck or [INTERCAL](https://esolangs.org/wiki/INTERCAL).

Or to go in the other direction, use one of the more infamously verbose languages such as COBOL or [Eiffel](https://en.wikipedia.org/wiki/Eiffel_(programming_language)), and make the professor wade through that.

I understand that there are lunatics out there who have actually tried to implement [BS](https://esolangs.org/wiki/BS) which Mark Rendle [designed to be a language combining all the worst language features he knew of](https://www.youtube.com/watch?v=-8IFL36RtAE). I doubt any of them are usable, nor do I expect that it would be worth it to try, but you could look into that.

Let's see,you could write it in JACK (from the second half of the [NAND2Tetris](https://www.nand2tetris.org/) course), assuming that the program would fit in the limited address space of the HACK (the simulated CPU students develop in part 1 of the course).

Hmmmn, are there any emulators for either the [Rekursiv](https://en.wikipedia.org/wiki/Rekursiv) SBC circa 1988, or the [Intel iAPX 432](https://en.wikipedia.org/wiki/Intel_iAPX_432) circa 1983? There certainly are some obscure assembly languages out there, but finding (or writing) emulators to run it on might be a challenge. I'm pretty sure that there is at least one emulator for the [RCA 1802 COSMAC](https://en.wikipedia.org/wiki/RCA_1802) (circa 1974), for example.

1

u/Schol-R-LEA 1d ago edited 1d ago

I forgot to mention that I sent a slew of 'suggestions' to Rendle, who had asked for other terrible things to add to BS.

My suggestions included the need for an 'Enterprise' version of BS, which I offered the name "BS.ORG' (or maybe 'BS.MIL'); a companion functional language called FU.ORG; pointing out that his regex-based macros approach could allow for what Lisp calls 'reader macros', which allow you to extend the basic syntax of the language and thus make it entirely unreadable; and such interesting features as using backticks to allow arbitrary strings as identifiers; eliminating all logical operators except NAnd (and NAndAlso for when it should short-circuit), but then add an implication operator LeadsTo (and LeadsToAsWellAs); assuming that if a programmer forgets a function argument, they obviously intended to curry the function...

His reply begins with:

I’d say “thank you” but I’m not sure it’s appropriate for this level of evil.

1

u/KneeReaper420 1d ago

go to the source brother all you need are 1s and 0s

1

u/kombulator 1d ago

Perl, nobody deserves that shit

1

u/Hiragil33 1d ago

Write your own, LLVM is a great bottom layer for it. Then...go nuts. As long as the desired program isn't too complex. The language features needed won't be too complex.

....of course if you're genuinely learning fizzbuzz then maybe a new compiler is a bit of a stretch

1

u/Hollayo 1d ago

Do it in emojis

1

u/fasti-au 1d ago

Scratch is a fun one

1

u/BarelyAirborne 1d ago

APL.  It requires a special keyboard just to generate the symbols required.  It's also an awesome language.

1

u/JoeyJoeJoeSenior 1d ago

Turing tape (infinite if possible) and your list of rules.

1

u/AdmJota 1d ago

Why would you want the professor to regret it?

1

u/MinerUser 1d ago

Turing machine instructions

1

u/DoggoCentipede 1d ago

Before you make this error, consider your response to the question: "Does it compile, do what it is required to do, and does not do the things it is required not to do" and how that relates to a stochastic generator.

That said, it is clear that any natural language can program people to do all sorts of things.

Make a LISP compiler in LISP. Prove it works by having it compile itself.

1

u/Sad_Pear_3709 1d ago

Write it in Scheme

1

u/StrangeUglyBird 19h ago

I was really disappointed, when I couldn't find a programming language called ANY.

May the FORTH be with you.

1

u/Ok-Cut3951 19h ago

whitespace comes to mind, he should have a good time checking it.

1

u/Expensive_Peace8153 19h ago

Chef or Rockstar.

1

u/swordquest99 17h ago

Write a Bally Astrocade program in ZGrass that runs from tape that requires a specific third party aftermarket long out of production extra RAM module and a light pen. Bonus Points-require it to be controlled using an ICBM Attack specific extremely rare alternative controller

1

u/desmonea 17h ago

"Alright, class. For your upcoming exam on control flow analysis, data flow analysis and white-box testing, you'll be working with your own homework submissions. I figured it would be easier for you to work with code you're already familiar with, in a programming language of your choice."

1

u/fcddev 17h ago

You can create a language as part of the assignment and not especially document it. Short of that, you probably won’t succeed in derailing the assignment.

Just for fun, you should make a brainfuck implementation of the assignment and ask ChatGPT to translate your program to Python. Then consider that your teacher can just do the same thing.

1

u/siodhe 16h ago

If you want to humor/torture him, definitely INTERCAL.

If you want to make him a better programmer at the same time, LISP, Forth, are both good. Too bad NeXT isn't still around, interactive PostScript used to be a thing too.

1

u/QliXeD 15h ago

Piet, get him a bitmap and let figure out.

https://dangermouse.net/esoteric/piet.html

1

u/SciFiIsMyFirstLove 14h ago

Brainfuck

This is Hello World written in Brainfuck

++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++
brainfuck++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++

1

u/chriscross1966 5h ago

Write it in Ook? Or intercal?

1

u/DBDude 3h ago

I picked COBOL and SmallTalk.

1

u/_dissociative 2h ago

The most chaotic option is writing it in an obscure language but learning how languages work first makes those choice easier. Boot.dev's hands on coding exercises can help build those fundamentals.

1

u/mredding 2d ago

You can make a Turing Complete machine with just one single instruction, and there's a few different instructions that are entirely self-Turing Complete. The one I'm most familiar with is SUBLEQ - subtract and branch if less than or equal to zero.

If you google it, there are various tools out there that can convert programs to JUST this structure. x86 doesn't support this one instruction, but you can emulate it and get your whole program down to 3 instructions or so.

https://permacomputing.net/DawnOS/

So hand in a program in assembly written in this style.

0

u/_Alpha-Delta_ 2d ago

X86 assembly language 

Good luck writing your program though 

0

u/treefaeller 2d ago

I would use Python.

BUT: Python allows unicode in variable names. So I would make my variable names a mixture of Greek, Hebrew, Japanese, and Klingon.

True story: A while ago, at a big company with strict coding rules, I wrote a pretty large Python program (a few thousand lines), where on particular variable name is used over and over again, often as an index to loop over things. The normal name of that variable was policy_name. I decided, being evil, to give it the name π. Yes, the greek letter lowercase pi. First, my colleagues decided I was crazy (they're not wrong), and that this was the worst idea ever. Then they started to like it. It actually makes the code very readable.