on master help sign in
Add an overview, motivation for Haskell and streamly
commit833c16a6d75048520e0394249458ad97699e2f79 authorHarendra Kumar <harendra@composewell.com> dateMon 16 Jan 2023, 20:45 (4 years ago) parent311cb23
1 file changed+86
docs/User/Tutorials/why-haskell-streamly.md+86
docs/User/Tutorials/why-haskell-streamly.mdnew file+86
@@ -0,0 +1,86 @@
1+# Why Haskell Streamly?
2+
3+A computer programmer is faced with different types of programming tasks. A
4+software project may involve programming tasks that have different
5+characteristics. Usually programmers are forced to choose different programming
6+tools for different tasks.
7+
8+For example, you may be writing shell or python scripts to automate system
9+administration or deployment tasks, or for managing cloud deployments,
10+configuration. For such tasks you may not be worried about the performance but
11+you may be worried about correctness and how quickly you can achieve what you
12+want to do, and maintainability of the programs. For such tasks you would
13+usually reach out for python, shell scripting or other such high level
14+scripting languages.
15+
16+On the other hand you may be writing a program that require very high
17+performance and optimal use of resources so that the task can be finished
18+faster and requires less resources to save cost. High level scripting languages
19+(e.g. python or shell) may be unsuitable for such tasks because they could be
20+10x-100x slower compared to lower level languages like `Rust`, `C`, `C++` or
21+`Java`.
22+
23+If you would like to use the same language and tools for all your
24+programming tasks, be it a quick script or a high performance system,
25+or if you do not want to build different set of teams for programming
26+tasks of different nature then Haskell Streamly is just the programming
27+framework for you.
28+
29+Whether you are writing scripts to manage your systems, or to automate mundane
30+tasks like organizing photos or files on your computer, or to write tests for
31+your software systems, or crawling the network to glean some information, or
32+writing a quick network server, or writing algorithmic trading systems, or
33+doing high performance intensive data processing, Haskell Streamly is just the
34+right tool for you.
35+
36+Haskell Streamly is a very high level programming framework, like Python or
37+Shell or Sed or AWK, in fact much higher level than those, but at the same time
38+provides high performance like C or Rust. The ability to compose programs using
39+high level combinators in Haskell is unmatched. Not just efficient programs but
40+you can write programs that scale on multiple CPUs with the same ease. Streamly
41+uses the full power of Haskell to make concurrency composable in declarative
42+style, so that you can use concurrent programming fearlessly with the same ease
43+as non-concurrent programming.
44+
45+Although Haskell is a compiled programming language it comes with an
46+interpreter (GHCi) which allows you to run Haskell code interactively like an
47+interpreted language. Haskell has a strong static type system, yet in most
48+cases you do not have to annotate the types because it infers the types
49+automatically.
50+
51+You can keep systems written with Haskell Streamly extremely modular using
52+reusable building blocks, modularity is the fundamental characteristic and
53+a design goal of Streamly. At the same time Haskell allows you to do fearless
54+refactoring of your program to continuously evolve it without the fear of
55+introducing more bugs or breaking it every time you touch it.
56+
57+The type safety and immutability by default in Haskell avoids a lot of bugs
58+that would otherwise find their way into your programs if you are using less
59+safe languages. You focus on your business logic rather than the correctness
60+issues imposed by the programming paradigm.
61+
62+Haskell is extensible, you can integrate C programs with Haskell very easily.
63+Programs written in Haskell work on `macOS`, `Windows`, `Linux` or any Unix
64+like system and even on the browser using the Java Script and Web assembly
65+backends.
66+
67+Haskell Streamly is a standard library for Haskell and supplements the Haskell
68+base package. It comes equipped with basic data structures and functions like
69+Streams, Arrays, Folds, Parsers, file system facilities like directory IO, file
70+IO, Unicode text processing, network processing using low level sockets or high
71+level operations. Concurrent programming facilities or time domain programming
72+facilities.
73+
74+The collection of high level building blocks provided by the Streamly ecosystem
75+allow you to write a variety of programs quickly. You can turn your shell or
76+python scripts into safe, highly modular and high performance programs using
77+`streamly-coreutils`. Moreover, you do not have to depend on any native OS
78+packages installed on the system. Or if you would like to use native
79+executables in your programs you can use `streamly-process` to invoke the
80+executables and connect the data streams generated like pipes in a seamless
81+manner. Or if you would like to use the shell to invoke and compose the
82+executables and integrate it seamless in your program you can do that too using
83+`streamly-shell`. If you would like to use statistical computation in your
84+programs try out `streamly-statistics`. Streamly ecosystem is evolving and
85+there are more useful packages in the works. In addition, you have thousands of
86+Haskell packages that are available on Hackage.