|
![](/i/fill.gif) |
Orchid Win7 v1 escreveu:
> On 13/03/2012 19:27, nemesis wrote:
>> ah, children from the 90's...
>
> I wish. :-P
ok, old fart.
> Seriously. Visual Studio manages to be responsive enough, and not eat
> half my RAM. NetBeans can't. IMHO, that makes NetBeans inferior.
Windows comes with the .NET libraries used by VS. It's also a native
program, rather than one running on a VM.
>> Here's a challenge for you. What do these haskell snippets are supposed
>> to do?
>>
>> snippet 1:
>>
>> ((.)$(.))
>
> ASCII art? ;-)
actually, I thought it was some perl idiom. :)
if it was a bit more concise, it'd give you a nice pair of boobies:
(.)(.)
> In fact, the "$" is necessary. Either way, this takes a 3-argument
> function, the first argument to the function, a function that transforms
> some type into the type of the second argument, and a suitable argument
> to transform. Or, in symbols,
>
> (x -> y -> z) -> x -> (j -> y) -> y -> z
haha, you already new that from the haskellwiki. :p
>> snippet 2:
>>
>> f >>= a . b . c =<< g
>
> Without knowing what the variables are bound to, this cannot be
> answered. It would be like saying "what does Foo(Bar(5)) do?"
ok, both come from here:
http://www.haskell.org/haskellwiki/Pointfree#The_owl
http://www.haskell.org/haskellwiki/Pointfree#Squish
>> and for a bonus, guess what this one does:
>>
>> 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?)
ah, seems indentation is lost (too bad for haskell). But nice style on
giving up.
>>> Yes, Java /still/ sucks. :-P
>>
>> Yes and that is a feature by design.
>
> O RLY?
Yes, so that your hired slaves can't cut the pulses and get free.
>> What doesn't suck is the JVM and the tens of thousands of useful libs
>> that run atop it. It's the only truly cross-platform performant VM out
>> there. Think about it, libs you don't actually need to recompile on your
>> machine.
>
> Ha! If only... They don't say "write once, test everywhere" for nothing.
> ;-)
seems like most of the thousands of open-source java libs are well
tested already.
> 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.)
yes, you are likely to use java libs.
> Oh, Haskell? Yeah, I gather a few people have tried to target the JVM
> with it. Nothing production-grade currently exists, however.
>
>> BTW, Ant is yet another example of XML-madness: it's basically a verbose
>> XML makefile for java.
>
> Oh well. At least you don't need tab characters. :-P
says the haskell programmer... :p
--
a game sig: http://tinyurl.com/d3rxz9
Post a reply to this message
|
![](/i/fill.gif) |