POV-Ray : Newsgroups : povray.off-topic : Lots of statistics : Re: C# Server Time
29 Jul 2024 14:22:51 EDT (-0400)
  Re: C#  
From: Darren New
Date: 19 Aug 2012 12:03:40
Message: <50310e5c$1@news.povray.org>
On 8/19/2012 3:26, Orchid Win7 v1 wrote:
> On 18/08/2012 06:43 PM, Darren New wrote:
>> On 8/18/2012 3:14, Orchid Win7 v1 wrote:
>>> I very much doubt that C# lets you trivially call arbitrary machine code.
>>
>> You would be mistaken. It's no harder in C# to call COM or C code than
>> it is to do so from C++. Machine code? Well, you have to know the
>> calling convention, but sure, you can do that.
>
> It's no harder to call C than to call Haskell, once you define where the
> hell the function is and what arguments it's expecting. Your point?

I'm not following. You said C# doesn't let you call machine code. I said it did.

And if Haskell tends to use things like lists extensively, or options, or 
something like that, then yeah, it can be hard to pass such things across 
computation boundaries, let alone lazy expressions. And of course if the C 
isn't actually a function in the functional sense, I'm not sure how Haskell 
handles it. For example, it's really not obvious how easy it would be to 
invoke a C function that takes as one of its arguments a pointer to a function.

Note I'm not bashing Haskell. I'm simply pointing out the assertion that 
Haskell does everything as well as every other language doesn't sound right 
to me.

> It's commonplace to write Haskell code which doesn't know exactly what data
> types it's dealing with. Dynamically loading new types that didn't exist at
> compile-time isn't really a problem, in principle. The only real problem is
> that the current language implementation doesn't support this well.

OK, cool.

> VB isn't BASIC. VB is a language with a very slight resemblance to BASIC,
> which has "basic" in its name. Really, it's an utterly separate language.

Well, it's not Dartmouth basic, no. :-)  But I was mainly kidding there.

>>> Don't you need a web browser to run JavaScript code?
>>
>> Why would you need a web browser?
>
> JavaScript is a language invented for controlling web browsers. I don't know
> of anything else that runs it.

There are lots of other applications that have incorporated javascript. For 
example, MongoDB interprets javascript to decide how to do queries and build 
indexes.

http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions

And have you not heard of node.js?

>> Except that JS is dynamically-typed.
> And Haskell can't manage dynamically-typed code.
> Oh, wait. Yes it can.

OK. Again, I didn't know that. I thought Haskell is statically typed.

>> The point is whether it's easy to take a
>> lazy functional declarative language and conveniently invoke a stateful
>> dynamically-typed collection of functions and objects. I can't even
>> imagine how you'd write a wrapper for something like that, in terms of
>> declaring it and invoking it.
>
> "I can't imagine how this would be possible" isn't the same as "this is not
> possible", as everyone is so fond of reminding me.

I didn't say it's impossible. I said I can't imagine it. :-)

So how do you do it?

-- 
Darren New, San Diego CA, USA (PST)
   "Oh no! We're out of code juice!"
   "Don't panic. There's beans and filters
    in the cabinet."


Post a reply to this message

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