POV-Ray : Newsgroups : povray.off-topic : I found this interesting : Re: I found this interesting Server Time
1 Oct 2024 18:30:46 EDT (-0400)
  Re: I found this interesting  
From: Darren New
Date: 10 Apr 2008 00:25:43
Message: <47fd96c7$1@news.povray.org>
Orchid XP v8 wrote:
>> Erlang has first-class functions as well as closures. Indeed, there 
>> are warnings in the docs saying things like "take care if you store a 
>> closure in a database that when you fetch it back out to run it, 
>> you're running the same version of the interpreter." :-)
> 
> Ooo. So much for "you can upgrade stuff in-place without shutting down". 
> :-P

Heh. Well, you know, I don't think you can actually upgrade the 
interpreter itself without shutting down the node you're running on. On 
the other hand, you could in theory start up a new interpreter, ship the 
running stuff over to it, then shut down the old one.

Upgrading without shutting anything down is easier when it's only Erlang 
code you're upgrading, and not the VM itself, but you *can* do it with 
enough forethought.

> [Mind you, persistent *closures*? That's got to be a fairly rarely used 
> feature...]

Yah.  That they even mention it boggles my mind.

> The I/O monad is unusual as monads go, but essentially the I/O functions 
> return I/O command objects instead of actually *performing* I/O, 

Yeah, that I figured out. I'm just trying to wrap my head around how 
that would work with (say) the clock, or the status of whether your ISP 
is currently screwy, or something like that, just in terms of 
"referential transparency".

I'm trying to figure out conceptually how you represent "the clock" for 
example in a way that it's "referentially transparent".  Or can you not 
actually do that, and that's the point of a monad?

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

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