Discover and read the best of Twitter Threads about #haskell

Most recents (10)

A way of understanding “simple” in “Simple is not easy” is that simple things/designs/programs/values are those that are easy to manipulate. And that requires a structure, which might not be easy to grasp or come up with naively.
FP, especially in expressive languages like #haskell and #purescript emphasizes abstract reusable structures exactly for this reason of easy manipulation and hence simplicity. The associated learning curve makes it indeed not easy.
But “easy” in all of this means “free goodies without effort”. The opposite is not the discouraging “undoable and impossible to learn so don’t even try” at all.
Read 3 tweets
Making illegal states unrepresentable without access to at least HKTs and preferrably also to GADTs and type families is so limited that it becomes almost futile. Or becomes very verbose in a similar way to having no polymorphism/“generics”. #fsharp #Haskell #ddd
Here is a type for a customer and address in pseudo-#fsharp syntax: type Customer f = Customer of Name * f<Adress>. Newly registered customer may or may not enter an address: register : ... -> Customer Option. But...
... placing an order requires the address to be known: placeOrder : ... -> Customer<Identity> -> Order. Where type Identity<a> = a.
Read 3 tweets
I write #fsharp and #haskell daily (and #purescript too) and thought of making a micro-blog comparison of the two. Fun facts and maybe new discoveries for the interested, in no particular order. This will be long and probably slow.
Unlike #fsharp, #haskell has no records, only discriminated unions. It does have something called “record syntax” for DUs.
In #fsharp functions cannot be overloaded. In #haskell it is possible through the “type classes” mechanism, conceived specifically for this.
Read 14 tweets
Produce a table of temperature conversions; four different programming languages. Click the link, code the program, and get coding.

90daysofcode #day02 #C

repl.it/@agscomputing/…
C++ Progarmming lab 2, click the link, read the program and get coding.

#90daysofcode #day02 #CPP

repl.it/@agscomputing/…
Haskell Programming lab 2, bit of a cheat this one: (1) Haskell doesn't do looks, and (2) output layout leaves much to be desired (a challenge for top student(s)), click the link, read the program and get coding.

#90daysofcode #day02 #Haskell

repl.it/@agscomputing/…
Read 5 tweets
Про парсинг неструктурированных данных я бы рассказал даже. Тема перекликается с разработкой, когда невозможно определить сразу структуры данных. Один лайк - один факт о парсинге неструктурированных данных и задачах с нечётким определением предметной области на #Haskell
Основным инструментом для подобных задач является пакет uniplate, особенно функции universeBi и transformBi. С ними вы можете обходить и переписывать структуры данных разных типов, не заботясь о том, что конкретно они из себя представляют
Есть аналоги на Foldable/Traversable, но они гораздо сложнее и менее зрелые. uniplate существует... ну для меня столько же, сколько сам #Haskell. Простой, тупой и надёжный как топор. Ничего лучше не нашёл, и искать не хочется
Read 100 tweets
Here is my take on teaching #Haskell and what should we do better. Please engage in helpful criticism and discussion 😀

So, thread below 👇
For me, "functional style" requires of these three things:
- focus on immutability and separation of side-effects,
- higher-order functions,
- data types with support for sums/choices.
Everything but the last point is available in many mainstreams languages *now*.
We should acknowledge that the whole concept of higher-kinded abstractions (functor, applicative, monads) is not *easy*.

In my experience, "length applies to any list, whatever the type of the contents" (in other words, length :: [a] -> Int) seems intuitive to most people.
Read 11 tweets
I wish we'd stop debating OOP vs FP, and started debating individual paradigms. Immutability, encapsulation, global state, single assignment, actor model, pure functions, IO in the type system, inheritance, composition... all of these are perfectly possible in either OOP or FP.
Some are better, some are worse, some are highly dependent on context, let's figure that out instead of religuously bashing umbrella terms like OOP and FP. And there may be many more paradigms to discover.
Take encapsulation: in #Haskell, you can choose for a module not to export your type constructors, and only export smart constructors and functions operating on your data structures. Sounds close enough to encapsulation to me.
Read 8 tweets
✨🧠 The ecosystem that has grown up around @TensorFlow in the last few years blows my mind. There's just so much functionality, compared to some of the other, newer frameworks.

👉Consider this an ever-expanding thread for me to take notes + wrap my brain around products. Ready?
1) @TensorFlow Extended (TFX)

It's no secret that I 💕 #TFX and all of its tooling for deploying machine learning models into production. If you care about keeping your models up-to-date and monitoring them, you should check out the product + its paper.

tensorflow.org/tfx/?hl=zh-cn
2) @TensorFlow Hub

If you want to train your model on a small data set, or improve generalization, you'll need to use something called transfer learning. #TFHub modules make it easy—and are available in an #OSS marketplace: tfhub.dev.

site: tensorflow.org/hub/
Read 40 tweets
Some early observations about #Haskell (vs #Scala, my weapon of choice), after 24 hours of building an app with it 🙂 (thread) ...
1/10 The build tools have evolved a lot, “stack” works well. I like SBT much more, but this is only a superficial impression. The concept of a LTS release for the ecosystem is neat, as it guarantees compatibility within that set, something we should do in Scala too...
2/10 The IDE and editors are more immature, but workable. I’m using Emacs with Intero, there are also 2 IntelliJ plugins, not commercial grade though. They should take the plunge and follow the lead of the Cursive IDE (commercial Clojure plug-in)...
Read 13 tweets
Today I'm going to #rant about #haskell libraries. I'm a Haskell supporter, I think it's a great language, but that doesn't mean it doesn't have problems. Some of them are surprising and I want to talk about them.
At the end of the rant I will have tips for developers using Haskell and for libraries developers (in any language, some rules are universal) so bear with me. It's a long rant but there is a good ending ;).
A preamble first: one of the reasons why I decided to study haskell is because haskell had a good way to deal with errors and invalid inputs/states.
Read 17 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!