Comments for Mathematics and Computation
http://math.andrej.com
Mathematics for computersFri, 21 Nov 2014 08:39:02 +0000hourly1http://wordpress.org/?v=3.6-beta3-24485Comment on Am I a constructive mathematician? by Two kinds of mathematics | The Lab Lunch
http://math.andrej.com/2012/10/03/am-i-a-constructive-mathematician/comment-page-1/#comment-48778
Two kinds of mathematics | The Lab LunchFri, 21 Nov 2014 08:39:02 +0000http://math.andrej.com/?p=1247#comment-48778[…] “classical” mathematics: they simply are two different worlds, as explained very nicely by Andrej Bauer. The universe of mathematics would be poorer without any of them. Similarly, the universe of […]
]]>Comment on Programming with Algebraic Effects and Handlers by Two views of programming language design | The Lab Lunch
http://math.andrej.com/2012/03/08/programming-with-algebraic-effects-and-handlers/comment-page-1/#comment-48678
Two views of programming language design | The Lab LunchFri, 15 Aug 2014 16:23:00 +0000http://math.andrej.com/?p=1144#comment-48678[…] possible, using the rather well known monads or the funkier lenses or the more sophisticated algebraic effects. However, it is very difficult in general to make types match whatever arbitrary interface your […]
]]>Comment on How to implement dependent type theory I by Andrej Bauer
http://math.andrej.com/2012/11/08/how-to-implement-dependent-type-theory-i/comment-page-1/#comment-48625
Andrej BauerSat, 19 Jul 2014 12:44:43 +0000http://math.andrej.com/?p=1284#comment-48625Yes, that’s correct. Thanks!
]]>Comment on How to implement dependent type theory I by MHD
http://math.andrej.com/2012/11/08/how-to-implement-dependent-type-theory-i/comment-page-1/#comment-48624
MHDThu, 17 Jul 2014 23:17:33 +0000http://math.andrej.com/?p=1284#comment-48624You have a mistake in your first “wrong” definition of infer universe:
(** Why is this infer_universe wrong? *)
and bad_infer_universe ctx t =
match infer_type ctx t with
| Universe k -> u
| App _ | Var _ | Pi _ | Lambda _ -> Error.typing "type expected"

It should have a little let-statement a la
(** Why is this infer_universe wrong? *)
and bad_infer_universe ctx t =
let u = infer_type ctx t in
match u with
| Universe k -> u
| App _ | Var _ | Pi _ | Lambda _ -> Error.typing "type expected"
]]>Comment on Eff 3.0 by Andrej Bauer
http://math.andrej.com/2012/03/08/eff-3-0/comment-page-1/#comment-47550
Andrej BauerTue, 17 Jun 2014 10:05:04 +0000http://math.andrej.com/?p=1149#comment-47550Resources are slightly more general. You can implemented references using resources, but you can also use resources for other “state-like” things. You can impement lazy values using resources, as well as persistent data structures and self-modifying structures, such as splay trees. Of course, you can do all of this if you have references, too. So in some sense resources and references are equally expressive. Note that there can also be primitive (builtin) resources that actually interact with the environment, such as streams of randomness, or communication channels.
]]>