Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Censorship

Functional Programming Languages as Free Speech? 11

timster asks: "Okay, we've talked about functional programming languages (see Haskell for an example) here before, and I got to wondering. A procedural program is a set of statements of things to *do*, and so has an obvious "machine" aspect to it. A purely functional program, however, can be viewed as a single mathematical *expression*, which accomplishes its "purpose" through the mechanism of being evaluated. My question is: if DeCSS were written functionally, would its First Amendment protections be stronger?"
This discussion has been archived. No new comments can be posted.

Functional Programming Languages as Free Speech?

Comments Filter:
  • I was wondering about a similar issue a few weeks back (even submitted an AskSlashdot). Why go through that much effort? Why not just release a C program with 'main()' commented out? Then heavily comment it. Then release it as a white paper under the Open Content License. As delivered, it cannot successfully be compiled, so it's not source code. Given that your comments will say "here is how we would do this. For a code example read the next 50 lines".
  • That's imperative, you loser. And it's also OT. =)
  • Just because Scheme and Haskell are both classified as functional languages does not make them equivalent for this particular argument. The difference is that Haskell is purely functional (local variables don't exist) while Scheme is not. It's this property of Haskell that can sometimes make things more complicated to implement than they would be in a procedural language. However, there are many useful properties (like easier proofs of correctness) of programs written in a purely functional manner that would are lost by implementing in a procedural language or a hybrid like Scheme.
  • In that case, why not write a compiler which takes the english specification for the DeCSS code and outputs an executable? It shouldn't be too hard to write a natural language compiler when the text itself is fixed.
  • Sit there

    Grind HD for a while

    Crash

    Repeat

  • The expressive power of a language is not the same as its implementative power. Just because you implement Haskell in C and conversely doesn't mean that both languages are equivalently expressive.

    Implementative power is what you can do with a program written in the language, once it's finished; if you're to produce closed-source stuff, that's the only thing you're interested in, and that's why people have been brainwashed by forty years of closed source into not caring about more than it. The language could be "write-only", and "write-once", implementative power wouldn't be less.

    Expressive power is the information you can exchange using the language with other people with whom you work. When programming is an incremental undertaking, what you care about is expressive power. That's what people need in the world of free software computing. To be very expressive, the language must be "read-write" and "write-indefinitely".

    For instance, a language to describe finite state machines operating on an indefinite tape (Turing Machines) can implement any one-shot computations from integers to integers in asymptotically optimal space and time. But as a tool for interprogrammer communication, it is not nearly as expressive as Cayenne [chalmers.se] that allows to describe arbitrary functions from arbitrary higher-order types to any other, including the ability to define statically enforced logical invariants. In Cayenne (which compiles into Haskell, which can be compiled into machine code, bypassing C for everything but for system interface and runtime support), you can define a type whose elements are precisely all sort functions, excluding any buggy function that sometimes fail. The language can thus express much more than C or any other implemented language, for that matter.

    -- Faré @ TUNES [tunes.org].org

  • Just because Scheme and Haskell are both classified as functional languages does not make them equivalent for this particular argument. The difference is that Haskell is purely functional (local variables don't exist) while Scheme is not

    I know the difference between scheme and Haskell, but I recall that my scheme code had no defs or setfs so I was using it in a purely functional method.

  • Try to implement, say, Blowfish (or whatever) on Haskell (pure functional) and Eiffel (imperative with constraints), and Haskell advocates' "executable specification language" buzz suddenly doesn't sound so good anymore.

    Actually cryptography is a pretty nice in a pure functional language. I've implemented a toy RSA encryption package (it differed from a real packaage in that it encrypted the entire message using the public key) in scheme and it was fairly straightforward. It took less than roughly 300 lines of code to implement key-generation, and encryption/decryption routines.

    A better example of a problem area for a FP might be something like a word processor or a spread sheet but that may not be so difficult (I don't think anyone's tried it).

  • by Zurk ( 37028 )
    notice that the judged banned DeCSS but he didnt ban the DeCSS whitepaper which showed how to crack the algorithm. The whitepaper was the equivalent of a functional representation of DeCSS. in general judges favour a text like presentation or a whitepaper to actual working code.
  • The judgement in the DeCSS case quite clearly, clearly, clearly says that code is speech and as such is protected under the First Amendment. However, it also notes that the First Amendment is consistent with some kinds of content-neutral regulation against types of protected speech which also have other effects. The judge goes on to say that the DMCA is such a regulation.

    You're sloving a non-problem here.

  • by Kaufmann ( 16976 ) <rnedal&olimpo,com,br> on Friday August 25, 2000 @05:58PM (#827089) Homepage
    Computationally, this argument makes no sense. Basically, any program in a functional language can be written in an imperative one (otherwise one wouldn't be able to implement, say, Haskell in a regular computer). Sure, some programming idioms may fit the functional style better, but others come more naturally as imperative, and for these algorithms, an imperative language is more expressive. I feel that this is usually the case in applied number theory, in which algorithms naturally involve a lot of iteration, assignment, global variables and whatnot). Try to implement, say, Blowfish (or whatever) on Haskell (pure functional) and Eiffel (imperative with constraints), and Haskell advocates' "executable specification language" buzz suddenly doesn't sound so good anymore. (Don't get me wrong, I'm myself a big advocate of declarative programming. It's just not the Holy Grail.)

    So, even if the US law people are ignorant enough to consider an algorithm's description in English as protected speech while that same algorithm's implementation in an actual programming language is outlawed (which wouldn't surprise me, coming from a country where there were export restrictions on the PGP sources in digital form but it was OK to print and publish worldwide a book containing nothing but these same sources in printed form), I don't think that it'd make a whole lot of a difference for the people who make these decisions whether the language used in the implementation is statement- or expression-oriented. Even if it does, however mildly, look like mathematical notation.

    (Hrrrm. Wonder if the new language on which I'm working, whose concrete syntax translates to and from AMS-TeX and therefore can be typeset indistinguishably from actual math, would be an advantage, then.)

"Experience has proved that some people indeed know everything." -- Russell Baker

Working...