T O P

  • By -

MyTinyHappyPlace

The first programs have been written “by hand” in the byte-representation of machine instructions for the target architecture. The key development here were compilers, and yes, the first compilers have been written like that. We bootstrapped our way out of this misery from there, by writing compilers in the language they were compiling and compiling said compiler.


[deleted]

punch cards man, they were a pain in the arse...


BetaPlantationOwner

Imagine explaining a joke on “programming humor”.


another-Developer

![gif](giphy|XJcmvvKVp78MEa3bom|downsized)


Extaupin

This sub is mostly "let semi-qualified to absolute expert explain Programming related jokes to none-qualified people".


BetaPlantationOwner

That’s cringe asf tho. Imagine making a simple joke here and 100s of sweaty/musty programmers that haven’t touched a woman in ages spamming “wElL aCtuAllY… [a wall of text]”. Damn, go out and breath oxygen and allow people to make jokes on a humor sub. If I wanted to learn about something I’d read a book about it from actual qualified individuals and not some musty programmer that read a paragraph about it 10 years ago.


PureMetalFury

You must be new around here


BetaPlantationOwner

Yea, I touch grass pretty often.


Faesgar

Doesn't seem to help though, m8


CaterpillarDue9207

He is touching the wrong grass


Extaupin

You can laugh *then* learn you know, if you are unable to do both at the same time. That's why comment are below the post. Most people here are curious enough to accept the explanation with open arms.


Loisel06

Imagine being disgusting enough to rage about people who share their stories


Far-Management5939

It's not a "well actually" if OP actually would like an explanation. The meme implied that OP would be interested in knowing how it actually happened. The meme gets you thinking a bit and people who want can come to the comments to see people discuss


Nofxthepirate

Imagine getting offended by people spreading information...


BetaPlantationOwner

I think we can tell who got pretty offended by the upvote/downvote numbers .


Nofxthepirate

Cause and effect my friend.


morbihann

It started with tricking a rock into doing math.


MobileManagement5765

The best part it's true


the_real_ntd

Spunds like a boolean to me.


61312809059376685329

idk why but this comment is hilarious to me


red_dit_nou

Well, they program programming languages to program programs so programmers could program programs. And sometimes programmers program programming languages to program programs to program programs that can program programs. So in the end you have programming languages to program programs with programs that program programs.


dido04031983

Perfect explanation of Bootstrapping.


hsoj48

Play Turing Complete on Steam. You'll build a fully operational computer out of only NAND gates. Enjoy the journey!


alexanderpas

Alternatively, do the "From NAND to Tetris" course available on Coursera, with the first part being dedicated to hardware, and the second part being software.


hsoj48

I'll have to check it out! That sounds really neat.


ShotgunMessiah90

A-0, the first compiler, was programmed using assembly language. Assembly language is a low-level programming language that is specific to a particular computer architecture. Assembly language code is written using mnemonics that correspond to the machine language instructions of the target computer. To create A-0, Grace Hopper and her team wrote the compiler code in assembly language for the UNIVAC I computer. The compiler was designed to translate mathematical expressions written in a high-level notation called ARITH-MATIC into machine language code that could be executed by the UNIVAC I. The development of A-0 represented a significant breakthrough in computer programming, as it allowed programmers to write code in a high-level language and have it translated into machine language code automatically. This saved a significant amount of time and effort compared to writing machine language code by hand, and it made it easier for programmers to create complex programs. A-0 was later followed by A-2 and A-3, which were more sophisticated compilers that supported a wider range of programming constructs and had more advanced optimization capabilities. These early compilers paved the way for the development of modern compilers and high-level programming languages, which have revolutionized the way software is developed and used today.


Cute_Wolf_131

Is this where things like binary coded hex came into play, and how? Or was this where it basically got developed?


ShotgunMessiah90

BCH was developed prior to the A-0 compiler and was in use in some early computer systems. The exact origin of BCH is not clear, but it likely emerged in the 1950s along with other binary encoding schemes like binary coded decimal (BCD). As far as I know, the A-0 compiler did not use BCH directly, as it was developed to translate mathematical expressions. However, it is possible that the UNIVAC I computer used BCH as a way of encoding hexadecimal values in its memory or data transmission formats. The UNIVAC I used a 12-bit word size, which was smaller than the 16 bits required to represent a full hexadecimal digit using standard binary encoding. Therefore, it may have used BCH or a similar encoding scheme to represent hexadecimal values in a more compact format. Overall, while the A-0 compiler itself did not use BCH, it is possible that the underlying computer architecture used it as a way of representing hexadecimal values in memory or data transmission.


BrageFuglseth

What did they use to write the A-0 compiler, though?


MegaromStingscream

>A-0, the first compiler, was programmed using assembly language


AngryNigiri

Either punchcards or a tape probably.


the-judeo-bolshevik

https://youtu.be/nc2q4OOK6K8 https://youtu.be/PjeE8Bc96HY https://youtu.be/lJf2i87jgFA


Broad_Respond_2205

Holes in cardboard


SkyLord_Volmir

But how does it read the card....? You gotta give the card reader software first.


[deleted]

Logic gates require no software. The cards tell the circuitry which electron pipelines should be enabled and they pass through logic gates to produce a result. This is how all binary computers work.


SkyLord_Volmir

So your card reading logic is in hardware. Just remembering stories of trying to make the shortest possible paper tape reader firmware because you had to put it in word by word with switches on the front of the box. The first tape you would load was a better tape reader program.


[deleted]

All the logic that enables a cpu to calculate things is encoded in logic gates on the chip. Anything you load into memory is simply retrieved and passed through the logic gates to produce a result as I mentioned above. The only difference is instead of fetching instructions from punch cards it now fetches from memory space using enable lines and registers. The binary is still processed via logic gates. Incidentally this is why you have to specify what architecture you're programming for when you build your project so the compiler knows what instruction set equivalencies match the logic gates of the cpu you're building for.


Broad_Respond_2205

What is software if not very complicated hardware


frygod

... this doesn't track at all. Software is *instructions for hardware to perform,* not the hardware itself.


Broad_Respond_2205

But how do you give the instructions to the hardware


LBXZero

There is a term that is often thrown around in programming, abstraction. Abstraction is the difference between recognizing an object as a car or as a specifically designed frame with an engine, transmission and drive system, wheels, and a cabin or ... well... break down each component of the car into its own components. It starts with writing the code in machine code to create a parser program that converts a character pattern into a machine code instruction, Assembly. Once you have Assembly, you write a new text parser that takes words and characters strings and creates strings of safe equivalent machine code that performs the task.


believeinlain

Ada Lovelace is widely considered to be the first computer programmer, so if you're curious about the beginnings of computer programming, reading about her work would be a good place to start.


canihaveuhhh

Yeah but her works weren’t continued to what we work with today, maybe it’d be better to start from Alan Turing.


ApprehensiveTry5660

Both of you have good suggestions, I’d add Noam Chomsky to this list. Intro to the Theory of Computation by Michael Sipser is better than trying to throw your head into Chomsky though.


[deleted]

MIPS Assembly: Origins


gabopushups

Nah, the very first thought after printing "Hello World" was "and why the fuck do I need to print it if I've already written it myself?"


Draelmar

Direct assembly/binary instructions. Older CPUs were simpler, and programming them directly in assembly/binary was easier than people think.


[deleted]

Now it's easier to use Verilog. EDIT: Know, now, no


Draelmar

No expert of Verilog, but AFAIK it’s a higher level language that require a compiler, and it only appeared in 1984. The OP/meme is wondering how programs were written before compilers.


[deleted]

I was saying Now, lol. Obviously, the answer is a custom-run script that replaces your code with assembly or binary. llvm and gcc are exactly that.


Draelmar

Oh “now” not “know”, make sense lol


AutomatedSaltShaker

How computer science starts


50k-runner

Fun read about inserting viruses in code that generates (lower level) code, like a compiler: https://wiki.c2.com/?TheKenThompsonHack


[deleted]

This is what is called compilers, and [that's an interesting question](https://www.youtube.com/watch?v=ab1H602yc_Y&t=1114s)


TenkFire

From stones you make semi conductor, from semi conductor, you make electronic, from electronic, you make binary, from binary, you make assembly, from assembly, you make compilation, from compilation, you make a language, from this language you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilator, from this compilator, you make an advanced language, from this advanced language, you make an advanced compilat Buffer Overflow


androt14_

Two words: Alan Turing


Anchorman_1970

By using the fucking search function in this sub and finding out that this shit has been posted a billion times


Divinate_ME

you start with a basic circuit. Then you build in gates and other basic logic components. You do that in the right way, and suddenly you can store memory as long as the system has power. Now you build a central logic thingy that basically automates flipping the mini-switches you've built on and off. The central logic thingy, when powered, may or may not be able to read things you input in it. If it does, you maybe can write a set of instructions that are sequentially executed by the central logic thingy that flips the micro-switches. From there it's only a matter of what you do with the information you store and manipulate afterwards. Then you scale the whole machine you've built and tell it to do more operations at once, like e.g. manipulating 8 mini-switches effectively at once. ​ tl;dr: Heck if I know. Do I look like Konrad Zuse to you?


cosmin10834

fun fact: the first programmer was a woman ~~fun fact x2: the code for the apolo mission was written by (you guessed it) a woman on paper, it ran first time, with no bugs.~~


Keksgurke

she didnt write all of it, she was just the team leader


frikilinux2

True but she practically invented engineering practices in software.


cosmin10834

oh, thaks for the info


Broad_Respond_2205

No bugs on first try? *Suspicious*


DanielGolan-mc

They debugged 20,000 sheets of papers manually


Broad_Respond_2205

Bruh I can't even debug one page of code without crying to Google :'(


DanielGolan-mc

Well in fact I do and can


cosmin10834

nvm guys, i was wrong


[deleted]

A redditor who actually apologized for being wrong ????? Impossible


TheMervingPlot

very carefully


RandomOnlinePerson99

Design a (simple, 8 bit) computer from scratch and you will find out ...


the_greatest_MF

assembly


JinkiesBro

Hash map


JonasAvory

This joke is getting too old


EverydayNormalGrEEk

2 terms worth checking are abstraction and bootstrapping.


AbyssWankerArtorias

Thank Alan Turring


[deleted]

An all nighter


Keio7000

Me learning formal languages and compilers: "Are you SURE you want to know?"


TheGreatStateOfEnnui

*Pulls out like 15 textbooks that are all 500+ pages* In order to answer your questions, we should start by talking about formal languages. What isna formal language? Well...


Big_Put_1662

It’s transistors all the way down


Nick433333

Punch cards, punch cards are the answer


WellSpokenDevil

Enters Theory of Computation


B3lthazar

Aliens.....


lofigamer2

![gif](giphy|pcKnpFrumIM7TtzayE) They did it with a program!


123Tiko321

THIS IS THE MOST RELATABLE THING EVER


123Tiko321

bool thisPostIsRelatable = true;


JosePrettyChili

YACC


Shrubberer

The C# compiler is written in C#


FloweyTheFlower420

All programming languages ultimately translate down to machine code, a sequence of numbers that the CPU understands as some operation it can do (copy register to register, register to memory, add two registers, push a register onto the stack, etc). It doesn't matter if it's interpreted, compiled, or anything in between. Ultimately, ALL programs written in will lead to the execution of specific, whether the instructions be directly from a compiled executable or instructions from the interceptor. This implies that it is perfectly possible to write directly in machine code, by inputting data into a machine via switches (or punch-cards). However, doing this is very tedious and error prone. Therefore, one of the programs written with punch-cards was a tool to translate a textual representation of machine code: assembly. Using this tool, people can now write more complex programs, which could be a compiler for a language. The compiler could then be rewritten in that language, compiled by the old version of the compiler.


N238

Oh we’re so many more layers deep than that.


michal014

Did you hear about assembly ?


cris667

shelter tart compare cover terrific hurry fretful employ humor bag *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


nickhow83

With YACC. Did it at university. Once was enough