Better HN
topnewbestaskshowjobs
Log inSign up

monads

16 karma · joined Feb 21, 2014 (12y ago) · 13 submissions

Submissions

comment 2y ago · link · parent

In my previous job, I've worked on a project that requires disassembling large amounts of x86/amd64 instructions (several billion instructions each running is very common). I've found also that Zydis is much faster than Capstone.

comment 4y ago · link · parent

Many thanks.

comment 4y ago · link · parent

An interesting paper. Do you know books/papers to learn more about memory models?

comment 4y ago · link · parent

A lot of thanks for your feedback.

I actually criticise the illusion (that the book and the series bring) that the category theory is "the ultimate source" of motivation in FP languages.

On one hand, it's direct (and very natural) to reproduce some categorical structures in a FP language (e.g. Haskell, ML) since such a language is around functions and values. I doubt that such categorical structures should be considered patterns.

On other hand, Haskell or ML does not come from the category theory, it comes from PCF as a language which is created to make program correctness proving is "easy".

I dont want to mean someone using this book to prove mathematical theorems, I just want to say that it's superficial (about both category theory and computer science), and does not bring sufficient knowledge upon that we can build nontrivial results.

comment 4y ago · link · parent

I will get down-vote for sure but it's trivial this book and also the series "category theory for programmers". It's actually not very far from the content of several first pages of any book on set theory or logics.

I find the ubiquitous idea is that "category theory" is more prestigous than "set theory", and some programmers, instead of seriously learning mathematics, think that learning category theory would fill up their lack of knowledge (in mathematics). It's quite contrary since category theory alone (i.e. without context) is trivial.

Let's be honest: read this book and the series of the author, and try to use the acquired knowledge to prove some (even simple) mathematical theorems.

comment 4y ago · link · parent

Agree. It's difficult to guess the definition of "exist" while reading it. The phrase

> ...accepting the existence of the reals means that there are numbers that exist but can never be described ...we can never interact with these numbers even conceptually

is also full of vagueness: what is "be described"/"interact"?

comment 4y ago · link · parent

Yes, I think metaphors are used to put the formal definition of computation monads into some concrete situations (for getting intuition). But "too many bad metaphors" will make monads something mysterious, incomprehensible.

comment 4y ago · link · parent

The definition of computation monads (in sense of Moggy) is simple, but not trivial. It's deep since it generalizes many computation "phenomena": side effects, exceptions, etc.

Conceptually, a "pure" function is something as `A -> B`, so all information about its internal (e.g. side effects) lost: we put something of type A but we can only observe a result of type B.

The idea of computation monads is to attach the result type of the function with a "constructor" T, then the type T B is used to "restore" (or to reason about) the lost information.

In composing such functions, T X (for some result type X) is all information we need, then this explains naturally the third rule of the Kleisli triple `f: A -> T B; g: B -> T C`: A -> T C

comment 4y ago · link · parent

I fairly agree with this. I still wonder how the author visualizes irrational numbers, exponential functions, etc. and more importantly, proves some (even simple) theorems with this kind of visualization.

I have a similar impression when reading posts elsewhere about categorical structures in programming: they are repetitive and mostly trivial (actually, the category theory without context is trivial).

comment 10y ago · link · parent

It still does not work on Fedora 24 :-(

comment 10y ago · link · parent

After my experience, it run smoothly on Linux. I followed the guide at http://www.monodevelop.com/ to install mono, then F#; monodevelop is also a good IDE but personally I use spacemacs with F# layer.