New PureScript Book: Functional Programming Made Easier

Hi @cscalfani. Thanks for the well-explained response.

I think I should clarify on something I said in my previous message about being hard for “underpaid developers around here”. Besides that sad reality, we also have the problem of the value of BRL compared to USD and/or other currencies.

Also, I believe I can now mention that the copy of Haskell From First Principles I have was given me for free by Christopher Allen (the author) because when I tried to purchase it, my credit card at the time (about 2 years ago) did not allow international purchases. So, I contacted him asking for other means to pay, and he gave me a copy of the book (PDF). I now have a credit card that allows me to pay for stuff outside Brazil and I am still in debt with Chris. I mean to buy his book at some point as a form of gratitude and as a way of being just/fair. I didn’t mention this previously because I did not want to sound like I was asking or demanding a free copy of your book, or that you should act in the same way Chris did. I also realized that you could think “how could this person buy Chris’ book but not mine?” and that is another reason I am mentioning this now.

I agree with you that paying for something (being it in money or any other form of value) helps one to appreciate things in a more enlightening way, not taking everything for granted.

By your explanation, I also see that you are in a difficult situation. It must be time consuming to keep replying emails with coupons. Indeed, not scalable and does not fully solves the problem.

I have seen some sites that detect the visitor is located on an underdeveloped country and automatically displays a different price on their (or at least certain) products. I understand this is up to the platform, not the author.

As per your kind offer, I’ll contact you when I reach the point I can really commit my time and energy to study the book.

Thank you very much!

2 Likes

A thought on that, the first chapter in the book explains the big size is partially due to font choice and code, expect that many pages of the 2000 to be code
I am guessing many of it will be simple straightforward code

For me this means, that it will probably take a lot “less” commitment to go through the book, than what you might originally think

2 Likes

I turns out that I did make a suggestion to Leanpub that they detect, base on IP address, that someone is from an underdeveloped country and that we could set the price accordingly. Unfortunately, I got the feeling even if they were to agree to this, that I wouldn’t see it any time soon.

Please feel free to reach out to me whenever you’re ready. Best of luck.

2 Likes

@cscalfani thanks for this book, I am going through the sample and looks great! I see you have worked in many different fields, industries and technologies. I wanted to ask you, What is your take on the performance of PureScript and FP in general? I love FP but my main push back is always around performance, I hate wasting resources and hate that computers being faster than ever apps still feel laggy, slow or consume a lot of resources.

2 Likes

I’m currently using PureScript and Haskell to build business applications. They are less demanding than game engines or image processing or process control. But they still have to perform well otherwise the user will become impatient.

In my personal experience, Haskell can be extremely fast if done right. PureScript is hampered by the fact it runs in the browser when compared with a binary compile, but, to be honest, it’s more than fast enough for 95% of the business apps that are being built by companies today.

I certainly would write my servers in Haskell, but I used to write in JS on Node and writing in PureScript is more enjoyable to me at least than Haskell. So, depending on the situation, you can certainly write PureScript on a server or command line application. In the book, we’ll build a server in PureScript.

I’d ask others their experience in this area. My current work is limited to business applications. I’m sure there are others with different experiences and it would be interesting to see what their experiences are.

7 Likes

Just started out with your book and am thoroughly enjoying it. Thank you for the gargantuan effort you must have put into this.

4 Likes

Just a heads up: the book is now #1 on the list of top books on Leanpub. Congrats @cscalfani!

8 Likes

So happy to hear that. It was a 2 year journey and nearly every weekend in one of those years.

Happy Learning.

8 Likes

Premature performance perturbation is probably even more evil than premature performance optimization. :wink:

I started reading the book recently. I am very happy with it.

Thank you!

3 Likes

It’s so nice to hear this. Thanks for posting.

Happy Learning.

Finally got the book
My plan is to complete it by the end of the year
so roughly 1 chapter per week

:slight_smile:

3 Likes

Great news. I suspect you’ll do more than a chapter a week in the beginning and slow down as the chapters get larger toward the end.

This sort of discipline is what it takes to master any skill. Best of luck and happy learning.

6 Likes

I bought this book from leanpub.com. I am enjoying working through it. One of the issues I always felt while reading a book on Haskell was that the first few chapters were fine, but after that, I simply had too many questions in my head that did not have an answer in the book I was reading, as a result, I felt lost, and the motivation to continue was lost. This book is refreshing because I am still with it and have covered 7 chapters in the last 2 months. I have conceptual clarity on the material covered so far. Not sure why this book is not very popular. This book is much better than “Haskell programming from first principles”. I have spent a lot of money by Indian standards buying Haskell books, but it is this book on Purescript that is finally clicking with me, and I can understand functional programming to some extent.

17 Likes

Thank you for the kind words. I’m so happy to hear that you’re succeeding in your endeavors. Take care and happy learning.

5 Likes

Hello @cscalfani

I’ve been interested in buying your book for a while now, but the digital format is kinda holding me back. I’d much prefer owning a physical copy.

It looks like you could publish a print version without too much trouble according to this article: How to Get Your Leanpub Book Into Print: The Easy Way | Leanpub Help Center

Is that something you think you could do?

I’m in France btw

1 Like

I haven’t gotten enough interest in the book as a hardcopy only to make a printing worth the effort. I had someone simply buy the electronic version and then print out the chapters one at a time as they were working through it.

You could use that approach if you really want to learn off of paper.

Best of luck,
Charles

That’s fair enough.

All the best

I don’t know whether I’ll buy the book–I am not currently pursuing Purescript–but I am quite interested. I love the description you gave of how the book works through code examples. And I’m not suprised that there are many pages, given that fact.

For whatever it’s worth, I think printed books have a better user interface :slight_smile: for technical subjects, except for the lack of string searches and the ability to copy code. The print interface is not perfect, but being able to flip back and forth between pages with fingers or bookmarks maintaining locations is often easier than the electronic analogues of those operations.

A 2000-page book is probably more challenging to print, though, so maybe it’s not worth it.

Yes, the platform is, in principle, in the right spot to address this. Platforms that discriminate by country, don’t rely just on IP addresses but usually on the means of payment. E.g. if you want to pay Brazilian prices, you need a credit card from brazil (works the same with paypal).