Thread: Maths knowledge

  1. #16
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    Frankly, I can agree that this argument, when applied to natural languages (in which one can indeed describe algorithms with sufficient detail for execution, in a way that naturally makes sense to speakers of the language)
    Sufficent detail for execution... I do hope this is the case but as of now linguists have not flushed out the complete English grammar. To wit, there are several competing structural representations in each linguistic domain which make understanding grammar wholly an incomplete problem. Also, cross-linguistic uniformity is something that some linguists value, and work on less popular languages is not as extensive as English. Linguists certainly have not addressed the production errors that people make in daily conversation because they, and cognitive scientists, do not full understand the language production process.

    So, well that's my addition to the discussion.
    hasafraggin shizigishin oppashigger...

  2. #17
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    [Mario's last post in entirety...]
    O_o

    Yes. Your point being?

    Seriously, what are you trying to say with those comments? I realize the question at hand was rhetorical, but the pure "wrongness" of it needed to be addressed. Are you agreeing with me that offering the question in support of your position was silly? Are you trying to pass off the "wrongness" of it by being obtuse?

    *shrug*

    I'll have to ignore most of that for the sake of time, but I do have to address one thing.

    It seems the perfectly adequate approach for a browser.
    Allowing a random collection of optionally terminated, partially terminated, fully terminated, optionally nested, partially nested, fully nested, and interleaved declarations of almost every language element is completely inappropriate for any machine application.

    If nothing else, convincing several hundred thousand developers to interpret such an abstract and underspecified language the same is impossible.

    Soma

  3. #18
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Maybe you failed to realize that what I was saying is that the fact the browser tries to render anything (despite it being garbage) is pretty much irrelevant.

    So when I say:
    "Isn't it true that I must follow a rigid set of syntactic and semantic rules that define the sequence of operations of the HTML "program"?"

    And you answer with:
    "Nope. You can throw complete garbage at most browsers and they will do their very best to display garbage."

    You are failing to see the point. As an exercise, try to color your text blue without following any of the strict rules defined in the HTML standard.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  4. #19
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    ^_^

    You could have simply said "yes" to "Are you trying to pass off the "wrongness" of it by being obtuse?" and saved yourself the typing.

    The language "standard" (I use the term very loosely.) is underspecified. The "standard" specifically allows the garbage that is "tag soup". (The garbage of "tag soup" is a direct result of having optional closure and allowing partial and interleaved closure.) The various valid or invalid interpretations of "tag soup" is irrelevant.

    What is relevant to the discussion is your offering that producing HTML must be programming because to produce HTML one "must follow a rigid set of syntactic and semantic rules". One need not "follow a rigid set of syntactic and semantic rules" to produce HTML because no "rigid set of syntactic and semantic rules" exist.

    The HTML version in development, HTML5, actually does have some rigid lexing and parsing rules, but these new rules are all optional allowing "tag soup" to continue by nature of providing some level of standard semantics to the garbage. However, the required semantics are still underspecified.

    Soma

  5. #20
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    What is relevant to the discussion is your offering that producing HTML must be programming because to produce HTML one "must follow a rigid set of syntactic and semantic rules".
    I wasn't aware it would be made to look like that. It was in answer to one specific aspect. HTML, or anything for that matter, cannot be defined as a programming language solely on that. Neither I ever tried to imply it could.

    That's precisely the problem with the whole thing. The fact anyone actually believes they can come up with a sound and final argumentation that HTML is not a programming language, is the only thing that fuels the debate. Simply because we don't have a sound and clear definition (neither we need one) for what is a programming language.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #21
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Quote Originally Posted by Mario F. View Post
    That's precisely the problem with the whole thing. The fact anyone actually believes they can come up with a sound and final argumentation that HTML is not a programming language, is the only thing that fuels the debate. Simply because we don't have a sound and clear definition (neither we need one) for what is a programming language.
    Yes, we do, and we have for a long time. The "loops and conditionals" proposed earlier was close (if redundant -- both are cases of conditional branching).

    The definition is Turing completeness, and all that requires is two properties: 1. The ability to conditionally branch to another part of code. 2. The ability to set and read from some form of memory.

    But even beyond the technical definition, HTML is not a program. A program is a data manipulator -- it takes input data and transforms it into output. HTML is just data. It may serve as the input or the output of a program, but it's not a program itself.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Let me try another way:

    When I write HTML (been a while since I last did it) I have to think logically and in terms of the language syntax, its semantics, idioms and within the context of what I want to do. I also inspect the things I write, I test them, I debug them, I concern myself with issues of code-correctness, maintainability, efficiency, portability.

    I'm coding in HTML. For all purposes, I'm programming. It possible for anyone so inclined to disagree they are programming. But the elements are all there. But I need to ask them what are they doing then? And how well can they support what they are doing isn't programming?

    But even beyond the technical definition, HTML is not a program. A program is a data manipulator -- it takes input data and transforms it into output. HTML is just data. It may serve as the input or the output of a program, but it's not a program itself.
    HTML includes input in the form of include-like statements. But definitely HTML is not a program. We agree there. But neither is C++ for that matter. Where exactly that leaves us?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  8. #23
    Registered User
    Join Date
    May 2003
    Posts
    1,619
    Quote Originally Posted by Mario F. View Post
    Let me try another way:

    When I write HTML (been a while since I last did it) I have to think logically and in terms of the language syntax, its semantics, idioms and within the context of what I want to do. I also inspect the things I write, I test them, I debug them, I concern myself with issues of code-correctness, maintainability, efficiency, portability.
    Yes, it's a language, but it's not a programming language. It's a data description language -- it describes the structure and presentation of data, not a program.

    It's the same sort of thing as typing a tab-delimited data file for import into a program. The act of creating the data -- even if there are strict rules for how the data must be formatted -- is not programming. The end result of programming is an actual program. The end result of marking up data is properly formatted data.

    Any language not turing-complete cannot be a programming language. As another example -- a regular expression is not turing-complete, and thus one doesn't "program" in regular expressions. One may use them as an input to a program, and it may in fact be more challenging to create the expression than the program itself, but it's still not a programming language.

    (As an aside, I don't consider turing completeness the ONLY criteria for a programming language, but it is a necessary criteria -- i.e. anything not turing complete cannot be programming).
    Last edited by Cat; 07-31-2010 at 03:38 PM.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  9. #24
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Cat View Post
    Any language not turing-complete cannot be a programming language.
    I can see your point now. But not everyone agrees with that requirement. As an example you have SQL, a query language (*), which isn't turing complete but many consider it a programming language. It's even officially referred to as a declarative programming language.

    (*) just to make the point that just because HTML is called a Markup language, doesn't mean it couldn't be a programming language. The answer isn't in the name.

    EDIT: A quick check... because I knew I had heard of these before... also reveals other programming languages that just like SQL show the implications of adopting that idea. Charity and Epigram aren't turning complete. Both are functional programming languages. I think what can be said instead is that all general-purpose programming language are (should be) turing complete.
    Last edited by Mario F.; 07-31-2010 at 04:00 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  10. #25
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    I wasn't aware it would be made to look like that. It was in answer to one specific aspect. HTML, or anything for that matter, cannot be defined as a programming language solely on that. Neither I ever tried to imply it could.
    Fine. You didn't mean to imply that.

    Now would you like to address my other concerns? (Actually, I don't really care. I'm just saying that you didn't consider anything I said that argues why I say that HTML isn't a programming language.)

    And the word "solely" hasn't entered into the discussion as far as I'm concerned, but that's really not important.



    Simply because we don't have a sound and clear definition for what is a programming language.
    Just because you, and most everyone else, would like to use different definitions doesn't mean that a "sound and clear" definition isn't available. Programmers especially will argue about the precise definition of anything.



    The definition is Turing completeness, and all that requires is two properties: 1. The ability to conditionally branch to another part of code. 2. The ability to set and read from some form of memory.
    That's interesting and all, but just so as you know you can artificially limit an otherwise "Turing Complete" language without changing the utility of the language in specific circumstances.



    I have to think logically and in terms of the language syntax, its semantics, idioms and within the context of what I want to do.
    I have to do this when writing a short story in English for consideration by my publisher who has very strict "steampunk" standards.



    Any language not turing-complete cannot be a programming language.
    YES THEY ........ING CAN!

    They may not be of general use, but many domain specific declarative languages are not "Turing Complete".



    A quick check... because I knew I had heard of these before... also reveals other programming languages that just like SQL show the implications of adopting that idea.
    There are a lot of programming languages that aren't "Turing Complete" while still being of extraordinary use in their domain.



    I think what can be said instead is that all general-purpose programming language are (should be) turing complete.
    Truth.

    This is the correct statement.

    Soma

  11. #26
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    Yog Sothoth!

    I tried to get back to work. I really did. It keeps nagging at me. The stupidity. The insanity.

    I must give an example!

    Any language not turing-complete cannot be a programming language.
    Imagine a language very like C++. Image a language so very like C++ it is in fact C++.

    Now imagine an embedded interpreter for our imagined language. Image that this embedded interpreter is itself targeting a very "low resource" embedded microcontroller.

    Now let us transform our imagined language to be more fitting to what resources our imagined interpreter makes available. Let us restrict recursion so that no implementation may recourse to recursion. Let us remove `goto', `break', and `continue'. Let us restrict existing loop constructs to `MAXIMUM_ITERATIONS' iterations no matter the consequences. In short, let us force any executable to halt!

    Our very C++ like language is now no longer "Turing Complete", yet the majority of semantically and syntactically valid C++ source written will still execute exactly as the programmer intended.

    You may define `MAXIMUM_ITERATIONS' as high as you like. You can define it to be so large that it would take every molecule in the universe to build the ram necessary to store the massive integer. It doesn't matter. The restrictions on our imagined language makes it impossible to achieve a "Turing Complete" status despite the fact that it has only been barely limited.

    Soma

  12. #27
    Registered User
    Join Date
    Jul 2010
    Posts
    10

    Maths knowledge/HTML

    shall we have a poll? ;-)

    I take the side of "HTML is a scripting language"

  13. #28
    Registered User
    Join Date
    Jul 2010
    Posts
    10

    Just out of interest

    There is an adverts section on this page which displays adverts for different sites. Any idea what that is written in? HTML or Javascript? Is it programmed or scripted?

  14. #29
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    To answer the original question, I'll echo the thought that it depends on what field of programming you find yourself in. Working heavily with databases, you'll find relational algebra helps (though you'd probably understand most of the concepts naturally without first learning the mathematical theory), and boolean logic always plays a role in programming. I recently started studying cryptography just for fun, and I really wish I was better / more familiar at linear algebra and discrete mathematics. You can get by with the basics, but occasionally I run across a statement I really have to think about before I can wrap my head around it.

    HTML or Javascript?
    My guess is this page contains JavaScript that decides when advertisements should be loaded (or it's decided when PHP is producing the page). That JavaScript then sends an HTTP request to a server for an advertisement, and the response is an animated GIF. There might be a bit of HTML wrapped in there somewhere as a wrapper / container.

    Is it programmed or scripted?
    Scripted, as it's either PHP or JS, both of which are scripting languages. However, I don't think it's fair to say that doesn't mean it was programmed. The "ML" in HTML means markup language. XML by itself is NOT a programming or scripting language by any means. It is, however, the basis for languages like Jelly, and a data expression format for systems like J2EE, etc... Just because it's used heavily in scripting or programming doesn't make it a programming language anymore than my text editor, even if it is a language with specific rules.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to deepen knowledge about computing
    By pc2-brazil in forum General Discussions
    Replies: 2
    Last Post: 07-24-2010, 02:33 PM
  2. maths???
    By nerdyneo in forum C++ Programming
    Replies: 4
    Last Post: 11-09-2003, 01:04 PM
  3. C++ Knowledge Needed For Making Graphic Games?
    By Krak in forum C++ Programming
    Replies: 14
    Last Post: 07-11-2003, 09:11 PM
  4. knowledge corrupts
    By Sentaku senshi in forum A Brief History of Cprogramming.com
    Replies: 63
    Last Post: 06-07-2002, 11:12 AM
  5. maths in a program
    By anthonye in forum C Programming
    Replies: 2
    Last Post: 05-24-2002, 09:08 AM