POV-Ray : Newsgroups : povray.off-topic : A tale of two cities : Re: A tale of two cities Server Time
29 Jul 2024 12:23:03 EDT (-0400)
  Re: A tale of two cities  
From: clipka
Date: 14 Mar 2012 00:47:00
Message: <4f6022c4@news.povray.org>
Am 13.03.2012 20:40, schrieb Orchid Win7 v1:

>> import System.Environment
>>
>> foo n = 0 % (0 # (1,0,1)) where
>> i%ds
>> | i >= n = []
>> | True = (concat h ++ "\t:" ++ show j ++ "\n") ++ j%t
>> where k = i+10; j = min n k
>> (h,t) | k > n = (take (n`mod`10) ds ++ replicate (k-n) " ",[])
>> | True = splitAt 10 ds
>> j # s | n>a || r+n>=d = k # t
>> | True = show q : k # (n*10,(a-(q*d))*10,d)
>> where k = j+1; t@(n,a,d)=k&s; (q,r)=(n*3+a)`divMod`d
>> j&(n,a,d) = (n*j,(a+n*2)*y,d*y) where y=(j*2+1)
>>
>> main = putStr.foo.read.head =<< getArgs
>
> That's not even parsable. (Indentation is significant, remember?)

Yuck - I hate it when languages do that.

> Darren claims they committed to a feature freeze too soon. I don't know
> about the low-level details of the JVM. But I gather that, say, adding
> Java generics required lots of ugly hacks so it didn't break compatibility.

Guess how many ugly hacks C++ relies on to not break compatibility with 
classic library formats...

> I hear there are other languages that target the JVM. Presumably you
> still can't use any of the existing libraries though. (Not that any of
> them are much good.)

The fun is that you can. The bane is that you might have to.

> Oh, Haskell? Yeah, I gather a few people have tried to target the JVM
> with it. Nothing production-grade currently exists, however.

Is there any such thing as a production-grade Haskell implementation?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.