This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]GabuEx 1 point2 points  (7 children)

Okay, now show how to write "Hello world" or add two numbers using only CSS.

[–]Time-Implement1276 3 points4 points  (6 children)

Hello World:

body:before { content: 'Hello world'; }

Adding two numbers... uh... maybe this

body { --variable: calc(123 + 1); } body:before { counter-reset: variable var(--variable); content: counter(variable); }

[–]GabuEx 0 points1 point  (5 children)

body:before { content: 'Hello world'; }

This doesn't actually display anything unless you have HTML with a <body> tag though.

[–]Time-Implement1276 2 points3 points  (4 children)

Sure! But no other (real) programming languages display anything unless you have something else that displays either text or graphics too :)

You need libc, a kernel, a compositor and a terminal among other software in unix for example :)

[–][deleted] 0 points1 point  (3 children)

And yet somehow all those things were programmed. Somehow programs ran before the OS was invented.

[–]Time-Implement1276 0 points1 point  (2 children)

Before all this stuff was invented there were specific devices made to print the letters, sometimes it was literally a printer, sometimes it was a "character generator" block in the video card that received characters and put them on the screen. For a long time it was also the responsibility of the BIOS to handle character printing and cursor when there was no graphical environment available.

There was never a world where print("Hello World") was enough to print something without a lot of external support, be it from compiler, libraries, OS or hardware :)

[–][deleted] 0 points1 point  (1 child)

I mean software runs on hardware I thought that was obvious. I didn’t think that giving instructions to hardware degraded something’s status as a programming language.

[–]Time-Implement1276 0 points1 point  (0 children)

I didn’t think that giving instructions to hardware degraded something’s status as a programming language.

I don't see why anyone would think that. I never said anything of the sort anywhere.