Ml

I think I may have developed a strong liking for ML languages now. I am really interested in ocaml and F#, and may give some time to ML inspired languages such as Rust. ML seems really fun to program in, and they have decent tooling and backing as well. It’s a pretty big decision, but I think ML languages are meant for me.

I was very confused between FSharp and Ocaml and then decided, I’ll learn both. It was so simple, yet, I was confused for quitea while, thinking deeply about it. It just always reminds me of, how much I hate to make choices ><.

C Or C++?

I have been slightly confused about using either C or C++ in my projects. Both seem to be fine languages, however with so many things C++ has, I don’t find any uniform standards on how to design programs in C++. C is simple, and does things right, however C++ has features when you need them. It’s really confusing me, on what I should do.

I really wana learn C because I aim to pick up open-source projects that I want to contribute to. But should I then spend time on a mordern language, that is actually worth working with, rather than C?

Fsharp

Hey. The mage is doing some fsharp right now. Having fun.

So, they learnt quite a bit about few interesting things. So, F# is really whitespace sensitive. If you have experience with Python, that’s kind of what I am talking about. Things differ quite a bit, but the general idea is similar. In C, x+y and x + y are pretty similar. It can mess you bad in F#.

The compiler is pretty amazing. It’s no lie when they said, you really don’t need any debugger. It’ just amazing. Type interference and super strong static typing makes you really confident in what you do. Also, the compiler and the tooling is really helpful in making your life easier.

It’s a relatively simple language to pick up. You declare functions and variables both using word let. You can use functions as arguements, which makes it pretty interesting. You have generic functions allowing you to take any type without specifying the type but gives you good checking, which is really enjoyable in my opinion. The arguments are curried. (Should check a wikipedia link on it, if you don’t get what I mean). Functions can be nested inside other functions.

Pattern matching is definitely interesting. The overall construct is pretty similar to if-then construct in any language, only that these are extremely flexible, unlike switch case, or if-else statement in other languages, making writing code a pleasure. I’ll put up some code so you can see what I mean.

let greeting name =
   match name with
   | "Steve" | "Kristina" | "Matt" -> "Hello!"
   | "Carlos" | "Maria" -> "Hola!"
   | "Worf" -> "nuqneH!"
   | "Pierre" | "Monique" -> "Bonjour!"
   | _ -> "DOES NOT COMPUTE!"

A shorter way of doing the same is allowed in F#.

let something = function
    | test1 -> value1
    | test2 -> value2
    | test3 -> value3

Books Mage Wana Read

A list of books, I keep here as a reference. I don’t want all of these books, and very much need some from the one I listed.

Structure and Interpretation of Computer Programs.
The Art of Computer Programming
Solve Exercises in K&R
Design Patterns: Elements of Reusable Code
Refactoring to Patterns
Gödel, Escher, Bach and Eternal Golden Braid
Introduction to Algorithms 
Beautiful Code
Purely Functional Data Structure
The Nature of Computation

The Joy of Clojure
Hackers & Painters: Big Ideas from the Computer Age
Let Over Lambda
Concepts, Techniques, and Models of Computer Programming
Quantum Computing Since Democritus
Discrete mathematics and its applications
Coders at Work: Reflections on the Craft of Programming
The Pragmatic Programmer: From Journeyman to Master
Programming Pearls
Zero Bugs and Program Faster

Code Complete: A Practical Handbook of Software Construction 
The Plausibility of Life by Kirschner & Gerhart
Non-Abelian Anyons and Topological Quantum Computation - https://arxiv.org/abs/0707.1889
(*)Concepts, Techniques, and Models of Computer Programming
Elements of Programming
Practical Foundations for Programming Languages
Foundations for Programming Languages _

I’ll keep adding books to the list, in case I want them. The one with (*) has already been bought.