Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^5: OT: Mathematics for programming (again)

by Jenda (Abbot)
on Sep 13, 2008 at 12:00 UTC ( #711094=note: print w/replies, xml ) Need Help??

in reply to Re^4: OT: Mathematics for programming (again)
in thread OT: Mathematics for programming (again)

You did not leave von Neumann there. Not "for" and "JMP", but rather "for" and "recursion". And recursion in a language that doesn't have mutable variables. And

  • Making a Tour = implementing an algorithm
  • Touring France = creating the program
  • Using Feet = using loops
  • Using Wheels = using recursion

The thing is not whether it's possible to implement the same algorithms, but whether reasoning about the individual building blocks of one kind of programming languages will be useful for other kinds.

With your "for" vs "JMP" you've stayed within the von Neumann architecture, there are languages that are built on , say, lambda calculus. And even though both are turing complete and may be used to implement the same algorithms and eventualy transform the same data to the same result, their building blocks are different.

  • Comment on Re^5: OT: Mathematics for programming (again)

Replies are listed 'Best First'.
Re^6: OT: Mathematics for programming (again)
by SuicideJunkie (Vicar) on Sep 16, 2008 at 18:47 UTC

    Their building blocks may be different, but if your Turing complete language does not include a for loop, you can write code that will simulate a for loop. It may not be efficient, and it may not be core, but you can do it.

    If you can implement a system which analyzes one such language, you can inefficiently port it to other languages by simulating those other languages in your first language.
    This may, however, fall afoul of your "useful" clause in terms of practicality regarding CPU and memory use.

    Equivalent to looping, I buy that. But equivalent_to_X ne X.
    The difference is in terminology and syntax (and efficiency of implementation), but those do not change the essential nature of looping.
    It is more of an: ("X" ne "X/2 + X^0 + 0.5 * X - 1") and (X == (X/2 + X^0 + 0.5 * X - 1))
    Where the LHS is Looping, and the RHS is equivalent to looping in a language without core loop support.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://711094]
[Corion]: choroba: Yeah, that's a lot of "fun" for one week...
[Corion]: I guess I should stage some product photos for Sane Dots Supplies ;)
[marto]: I had some ideas about that Corion
[marto]: I'll send a message over the weekend maybe :P
[Corion]: choroba: I avoided the "fun" of emergency shopping for a new flat iron by trying the flat iron without the timer that sat between it and the mains power. Seems as if just the timer is broken.
[Corion]: marto: Heh, would be cool!
Corion munches on the traditional German winter fruit, strawberries. Imported from Spain at the price of EUR 0.77 per 150g - not really cheap but surprisingly good for a winter produce

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-01-20 10:19 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (174 votes). Check out past polls.