4 languages that can kill themselves
h
DynamicSquid (3232)

4 files, each with a different language. Each file will call the next file, and then commit die. Like this:

**main.cpp**
run main.py
kill itself

**main.py**
run main.rb
kill itself

etc.

Basically how this works is each file calls 2 shell commands, one to run the next file, and one to commit toaster bath. The bash command to commit skydiving without a parachute is rm FILE_NAME.

I also added brief comments on how the shell commands work in each language so you might learn something.

I'm just bored.

You are viewing a single comment. View All
RahulChoubey1 (3)

There's basically two types of languages: "// for comment" languages and "# for comment" languages

firefish (418)

@RahulChoubey1 What about ** comment langs

fuzzyastrocat (255)

@RahulChoubey1 @firefish Don't forget -- for comment langs and <!-- for comment --> langs :D

RahulChoubey1 (3)

@fuzzyastrocat The latter is basically HTML and all HTML derivatives.

fuzzyastrocat (255)

@firefish Ooh yeah, forgot about that

firefish (418)

@fuzzyastrocat AND WHO COULD FOR GET THE GODLY MULTI-LINE COMMENTS

RahulChoubey1 (3)

@firefish Wow, this comment is highly active!

DynamicSquid (3232)

@fuzzyastrocat oh, I learned haskell in my comp sci class when I got bored. I learned how to loop through a string:

let uppercase_letter letter = toUpper letter in map uppercase_letter "squid"

-- or...

map toUpper "squid"

haskell's a very weird language...

fuzzyastrocat (255)

@DynamicSquid map toUpper "squid" is the canonical way to do it. The goal of idiomatic Haskell code is to remove as many named variables as possible — defining uppercase_letter letter is verbose, if you really wanted to do it that way you'd do map (\letter -> toUpper letter) "squid", but (\letter -> toUpper letter) is the same as just toUpper. Yeah, coming from low-level languages Haskell probably seems weird, however it's way cleaner and if you use it enough it's the low-level languages that start to seem weird :D

DynamicSquid (3232)

@fuzzyastrocat lol yeah. like all I'm exposed to right now is int var = 5; var = 3 lol, but haskell is completely different and it should be a good experience learning it

fuzzyastrocat (255)

@DynamicSquid smh true believers use(\var -> (\var -> [code that uses "var"] ) 3) 5

You must feel the cleanliness of the lambda calculus course through you before you prepare to do the trivial mortal task of code production, or else you will forever live in the land of anguish and never reach functional nirvana. Do that which is functional, let the bindings of imperative programming break loose, and you shall then reach inner peace with the computers.

...Or just use a bunch of random do blocks, whatevs honestly

fuzzyastrocat (255)

@DynamicSquid Most of what I said there was pretty jokey (I mean, I don't like LISP because it and the most of the people who use it are always so aloof) but there is a bit of truth to changing your whole mindset about how programming works.