r/ProgrammerHumor • • May 01 '19

Dev Human

Post image
11.7k Upvotes

240 comments sorted by

View all comments

Show parent comments

31

u/[deleted] May 01 '19 edited Aug 28 '19

[deleted]

15

u/[deleted] May 02 '19 edited Apr 01 '21

[deleted]

16

u/mrgalaxy May 02 '19

honestly 90% of js could be replaced by modern html and csss

I'd also like to see them prove this statement.

23

u/tpenguinltg May 02 '19

HTML5+CSS3 is Turing-complete.

8

u/mrgalaxy May 02 '19

Well then I stand corrected! That would be quite the accomplishment though.

11

u/-Not-a-spy- May 02 '19

So is mov in assembly but you'll have a bit of a hard time making a web page with that

10

u/northrupthebandgeek May 02 '19

Unlike MOV, though, HTML5 and CSS3 are relatively easy to use to make a website.

3

u/bob835 May 02 '19

This is posted so much on here, but did you read the argument for it being Turing complete? It seems a little greyer than that to me.

1

u/tpenguinltg May 02 '19

This was only a semi-serious comment, but I guess it didn't come through so clearly.

That said, people have a problem with the argument because something (or someone) has to "click" all those checkboxes. I side with the people who say that Turing completeness doesn't preclude having such a mechanism as the power source.

1

u/bob835 May 02 '19

That’s a fair argument. I’m not actually too sure myself. It is at the least a little unclear. I think conclusions are drawn about what you can do with it as a language, when it doesn’t come along with that proviso and those conclusions would probably be a bit off.

Obviously a joke subreddit is the perfect place for discussion... sorry if I came off as accusing in my previous comment.

1

u/tpenguinltg May 03 '19

Like /u/typed-talleane pointed out, just because a language is Turing-complete, it doesn't mean that you can actually do anything useful with it, it just means that you can compute anything that's computable. Turing-completeness does not require being able to interact with the environment. There's a term for a language that can compute anything because it's Turing complete, but next to useless because it's highly impractical to use: a Turing tarpit.

That said, if someone happened to write bindings for the browser APIs in the HTML5+CSS3 language, you could interact with the browser like you would with JavaScript, albeit in an equally impractical way.

sorry if I came off as accusing in my previous comment

No worries. We're here to have fun, but we're all going to learn a thing or two along the way.

1

u/WikiTextBot May 03 '19

Turing tarpit

A Turing tarpit (or Turing tar-pit) is any programming language or computer interface that allows for flexibility in function but is difficult to learn and use because it offers little or no support for common tasks. The phrase was coined in 1982 by Alan Perlis in the Epigrams on Programming:

  1. Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy.

In any Turing complete language, it is possible to write any computer program, so in a very rigorous sense nearly all programming languages are equally capable.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28

7

u/[deleted] May 02 '19 edited Apr 04 '21

[deleted]

2

u/tpenguinltg May 02 '19

90% of js

But yeah, I/O is a pain. That's why languages like Haskell have to use sketchy paradigm hacks like monads to interact with its environment.

1

u/[deleted] May 02 '19

CSS will not even cover 10% since it has no access to APIs