Very confusing to call it time travel when it has nothing to do with time…
Mariposa – A programming language with time-travel
21–30 of 63 posts
Re: Mariposa – A programming language with time-travel
#22Okay but why? Sincerely: what is the pragmatic value? [edit: NM, end of the page... > Semantics and correctness of implementation It is not obvious how the Mariposa language could be given a formal semantics. Since there is no specification of its semantics, it doesn't even make sense to ask if the implementation is right or wrong. However, we are sure that the implementation is incorrect for almost any conceivable s…
Re: Mariposa – A programming language with time-travel
#23Re: Mariposa – A programming language with time-travel
#24Re: Mariposa – A programming language with time-travel
#25Not to be dismissive, but this feels like pointers and lambdas with extra steps.
Re: Mariposa – A programming language with time-travel
#261. https://hackage.haskell.org/package/tardis-0.4.4.0/docs/Cont...
2. https://rosettacode.org/wiki/Water_collected_between_towers?... (see the "see also" section for a Tardis implementation)
Re: Mariposa – A programming language with time-travel
#27Okay but why? Sincerely: what is the pragmatic value? [edit: NM, end of the page... > Semantics and correctness of implementation It is not obvious how the Mariposa language could be given a formal semantics. Since there is no specification of its semantics, it doesn't even make sense to ask if the implementation is right or wrong. However, we are sure that the implementation is incorrect for almost any conceivable s…
Exactly, there's no rationale given, nor any practical example of where this would be useful. Mutability is already a source of complexity, adding time-traveling to it seems like it would just make it worse...
Re: Mariposa – A programming language with time-travel
#28Earlier quoted context omitted.
Exactly, there's no rationale given, nor any practical example of where this would be useful. Mutability is already a source of complexity, adding time-traveling to it seems like it would just make it worse...
Initially I followed the link wondering if perhaps the author had done something interesting regarding append only ledgers and derivative generation processing semantics (e.g. event 5 modifies event 2, impacting the proper processing of events 3 and 4). After all, the linearity of the character stream is not unlike log offset/ledger row. Frequently these esoteric languages have very interesting purposes.
Re: Mariposa – A programming language with time-travel
#29To address this, we implemented a similar concept in ThetaML for defining stochastic processes, financial instrument payoffs, and trading strategies. We introduced the
theta t
operator, which represents the passage of time t. Here's how a stochastic process might be represented: S = 1
loop inf
theta @dt
S = S * exp( (r - 0.5 * sigma^2) * @dt
end
We also introduced stochastic expressions like expected value E(V!) given the current state of all simulated values where V! is a reference to the future value of V.Example:
1: model EuropeanPut
2: % This model returns a simulated European put option price
3: import S “Stock prices”
4: import CUR “Discount factor”
5: import K “Strike price for the European put option”
6: import T “Time to maturity in years”
7: export P “European put option price”
8:
9: P = E(V_CUR!)
10: % T years pass
11: theta T
12: % at maturity T, the option payoff is discounted to time 0
13: V_CUR = max(K - S, 0) * CUR
14:
15: end
This system enables the evaluation of the models using Monte Carlo Simulations and the computation of expected values E(x!) using regression techniques.For those interested, you can find more information in the ThetaML Handbook: Here is the ThetaML Handbook: https://www.thetaris.com/doc/book-2012-thetaml-Handbook.pdf
Re: Mariposa – A programming language with time-travel
#30Menopausa - A programming language for middle age