Apparently, JavaScript is easy to learn, and HTML is a programming language
-
@ben_lubar said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
For the record, it is possible to make a turing machine in CSS, so CSS is a programming language.
Only if the user cooperates in "running" the program... it can't iterate all by itself.
A computer that requires someone to sit there pushing a button to generate clock pulses is not turing complete. That computer plus a person sitting there pushing in clock pulses might be turing complete, but only if it has that person sitting there.
Also, the CSS "turing complete" simulation that I saw required more than just pushing a button; it required pushing the correct button... which I think is cheating. The computer isn't actually computing; it's just displaying instructions for the human to perform, and human error means that the program won't necessarily do what it's supposed to do (well defined), nor will it always do the same thing (repeatable).
-
@boomzilla said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
That's self evidently a program that the browser is interpreting. It does the same thing every time.
Obviously you haven't used a web browser lately.
-
@arantor I'd be very interested in a discussion of why HTML is not a programming language but plain SQL (as Boomzilla already brought up) is. Because to me those things are in the same category, and yet I wager most people would call the latter a programming language and the former not.
As far as Word being a programming language:
Even if you go by the "needs flow control" description, a Word document can embed an Excel document, and Excel is a programming language. And it doesn't require VBA or macros to program in Excel; all the primitives are right there in cell-level logic. So a Word document is (or can be) a program.
EDIT: and it turns out I'm replying to a super-old post, because NodeBB decided to lie to me and tell me that was the end of the thread. Good jerb, NodeBB.
-
@anotherusername said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
A computer that requires someone to sit there pushing a button to generate clock pulses is not turing complete. That computer plus a person sitting there pushing in clock pulses might be turing complete, but only if it has that person sitting there.
No. Nice try, but the turing-complete computation itself doesn't actually need a computer at all. It can be done by a (very bored) human with a (very long) paper tape. However, the sort of computer you're really talking about is an interacting system: there's a computer that does some things (perhaps complicated, perhaps not) between points when it sits waiting for some external communication to happen; whether the system is turing complete depends on what it does between button presses, and what sort of state it maintains across waits.
Also, Turing said nothing about how long a computation would take in his classic paper. He wasn't the last word on computation, but rather closer to being the first word on it…
-
@blakeyrat said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
I'd be very interested in a discussion of why HTML is not a programming language but plain SQL (as Boomzilla already brought up) is.
Cursors. Stored procedures. Triggers. Updates.
I'd say the difference is that a program needs the ability to do more than just display some data. It needs to actually have the ability to manipulate that data somehow.
@blakeyrat said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
EDIT: and it turns out I'm replying to a super-old post
Huh? It's less than a day old. I wouldn't call that "super-old".
-
@anotherusername said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
Huh? It's less than a day old. I wouldn't call that "super-old".
Maybe he came from the future to give us his opinion on it
-
@timebandit said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
Maybe he came from the future to give us his opinion on it
No someone tagged my name. I'd been "marking as read" this until then.
-
@dkf said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
Nice try, but the turing-complete computation itself doesn't actually need a computer at all. It can be done by a (very bored) human with a (very long) paper tape.
First you said it doesn't need a computer. Then you said it could be done by a human computer. So it does need a computer.
Also, in theory, a human could be the computer; but in practice, one couldn't, because humans fuck up too much. A turing-complete computer needs to perform the instructions without mistakes, or at least if it does make mistakes, it must always make the same mistakes. Otherwise it's not a very good computer.
@dkf said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
However, the sort of computer you're really talking about is an interacting system
Yes, a non-turing complete computer plus a non-turing complete pulse generator can, if put together, form a turing-complete computer, meaning the whole system combined of both parts.
-
@blakeyrat said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
@arantor I'd be very interested in a discussion of why HTML is not a programming language but plain SQL (as Boomzilla already brought up) is. Because to me those things are in the same category, and yet I wager most people would call the latter a programming language and the former not.
I would hope they wouldn't. Assuming "plain SQL" means just basic queries, then it isn't a programming language. Things like PL/SQL add control flow, which would make "full" SQL a programming language.
-
@dragnslcr Now that I think about it some more it's a bad example, because the only thing you need to write a program in SQL is variables (or temp tables, which can emulate variables) and I'm pretty sure those are in the most basic SQL spec. EDIT: they are
EDIT: also did you know DATE and TIME types were defined in SQL'92, yet SQL Server didn't have them until 2008? Peh. Is there a spec in programming more shat upon than the SQL spec? I think not.
-
@blakeyrat said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
I'd be very interested in a discussion of why HTML is not a programming language but plain SQL (as Boomzilla already brought up) is
it's not. It's a querying language that can feed programming languages (plsql, tsql, etc)
technically you can mangle a series of SQLs together to sort of work like a program if you use inserts/updates to add rows that become the clock, but you can't loop without the stored procedure extensions.d of course.
-
@blakeyrat said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
Is there a spec in programming more shat upon than the SQL spec? I think not.
What do HTML and SQL have in common?
Both their specs are used as toilets by the designers of the engines that run them.
-
@darkmatter said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
technically you can mangle a series of SQLs together to sort of work like a program if you use inserts/updates to add rows that become the clock, but you can't loop without the stored procedure extensions.
Trigger on insert?
-
@anotherusername said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
@darkmatter said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
technically you can mangle a series of SQLs together to sort of work like a program if you use inserts/updates to add rows that become the clock, but you can't loop without the stored procedure extensions.
Trigger on insert?
At first I thought you meant my INSERT statement triggered you. Then I realized that you, sir, are the fucker of butts. And I feel like there has already been a debate on this forum before about whether triggers count as sql or stored procedure.
-
@masonwheeler said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
That one, I don't quite understand. Why "instead of," when the context suggests it means "when" or "upon"?
Pretty common pattern. You'd define an action like "drink" with a default response of "You can't drink that!". Then you use "instead of" (doing that) to define the behavior for those things you can drink. At least that's the way I understand it. I'm not that familiar with Inform 7; just pulled those all from the examples in documentation.
-
@masonwheeler Because 'drinking' is an action which does something different that they defined elsewhere. They're saying 'circumvent the normal behavior and do this instead'.
-
partial class GameObject: virtual Drink(): say "You can't drink that!" ... class Waterskin(GameObject): override Drink(): //waterskin drinking logic here
???
-
@masonwheeler Are you asking if that's effectively what "instead of" does? Yes. It modifies the behavior based on the direct object.
-
@darkmatter That is an accurate description of testicles as well!
-
@anotherusername said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
@ben_lubar said in Apparently, JavaScript is easy to learn, and HTML is a programming language:
For the record, it is possible to make a turing machine in CSS, so CSS is a programming language.
Only if the user cooperates in "running" the program... it can't iterate all by itself.
A computer that requires someone to sit there pushing a button to generate clock pulses is not turing complete. That computer plus a person sitting there pushing in clock pulses might be turing complete, but only if it has that person sitting there.
Also, the CSS "turing complete" simulation that I saw required more than just pushing a button; it required pushing the correct button... which I think is cheating. The computer isn't actually computing; it's just displaying instructions for the human to perform, and human error means that the program won't necessarily do what it's supposed to do (well defined), nor will it always do the same thing (repeatable).
The demonstration of CSS being turing complete had two instructions: "press tab" and "press space", which would alternate. That's the kind of thing you could set up with two drinking birds or an AC power source. If the human is required to make CSS turing-complete, then C isn't a turing-complete language until you add a CPU and some electricity.