#+TITLE: Haskell - tags :: [[file:programming-languages.org][Programming Languages]] Notes on the Haskell programming language. * Software Development [[https://www.reddit.com/r/haskell/comments/fyyia7/which_major_code_bases_should_i_study_to_better/][Haskell code bases to study to learn better swdev]] [[http://haskellforall.com/2020/07/the-golden-rule-of-software-quality.html?m=1][The golden rule of software quality]] [[https://reddit.com/r/haskell/comments/hzh1rq/do_people_here_actually_build_useful_programs][Do people here actually build useful programs with Haskell?]] [[https://www.youtube.com/watch?v=idU7GdlfP9Q&app=desktop][software dev in haskell 'painlessly']] [[https://www.reddit.com/r/haskell/comments/hz4sec/the_golden_rule_of_software_quality/][The golden rule of software quality - haskell]] [[https://github.com/graninas/software-design-in-haskell][Pro tips for software design in Haskell]] http://book.realworldhaskell.org/ -- learning haskell from the perspective of a software developer https://www.reddit.com/r/haskell/comments/hz4sec/the_golden_rule_of_software_quality/ haskell and software quality [[https://github.com/thma/WhyHaskellMatters][In this article I try to explain why Haskell keeps being such an important language by presenting some of its most important and distinguishing features and detailing them with working code examples. The presentation aims to be self-contained and does not require any previous knowledge of the language. ]] [[https://gist.github.com/graninas/ef5dd5a2b57903af81039fb21ff3b0bf][Appendix to Software Design in Haskell]] [[http://www.haskellforall.com/2020/07/the-golden-rule-of-software-quality.html?m=1][Haskell for all: The golden rule of software quality]] [[https://www.reddit.com/r/haskell/comments/hzh1rq/do_people_here_actually_build_useful_programs/][Do people here actually build useful programs with Haskell? - haskell]] [[https://www.reddit.com/r/haskell/comments/i1wojq/do_you_guys_think_haskell_is_the_best_language_if/][Do you guys think Haskell is the best language if my intent is to develop a]] ** made in haskell [[https://medium.com/@cdsmithus/solving-a-puzzle-in-haskell-8216a683555][Solving a puzzle in Haskell]] [[https://www.reddit.com/r/madeinhaskell/comments/hzuk08/magic_the_gathering_in_your_terminal/][Magic: The Gathering in your terminal - madeinhaskell]] [[https://bartoszmilewski.com/2020/05/27/guitar-decomposed-5-mutating-the-third/][guitar in haskell]] * Utilities ** Graphics http://hackage.haskell.org/package/gloss -- 2d graphics library [[https://das.li/articles/linear.html][Graphics in Haskell: linear algebra]] [[https://github.com/sleexyz/hylogen][sleexyz/hylogen: GLSL embedded in Haskell]] [[https://github.com/sleexyz/hylogen][hylogen]]: glsl shaders embedded in haskell ** Hoogle https://aaronguo1996.github.io/project/hoogleplus/ hoogle plus :: search for *combinations* of functions with hoogle! https://hoogleplus.goto.ucsd.edu/ https://aaronguo1996.github.io/project/hoogleplus/ this is the coolest shit * GHC [[https://adrian.geek.nz/haskell_docs/ghc.html][incredible breakdown of how GHC works]] [[https://stackoverflow.com/questions/3071136/what-does-the-forall-keyword-in-haskell-ghc-do][syntax - What does the `forall` keyword in Haskell/GHC do? - Stack Overflow]] [[https://downloads.haskell.org/~ghc/8.10.1/docs/html/users_guide/glasgow_exts.html#extension-MagicHash][9.1. Language options — Glasgow Haskell Compiler 8.10.1 User's Guide]] https://downloads.haskell.org/~ghc/7.0.1/docs/html/users_guide/rewrite-rules.html [[https://mpickering.github.io//ide/posts/2020-08-04-measuring-memory-size.html][IDE 2020: Measuring memory usage of Haskell values and patching GHC]] [[https://gist.github.com/AndrasKovacs/c7d385aa117929503feb][Lambda calculus implemented at the type level in GHC]] ** TemplateHaskell - backlinks :: [[file:MacroNotes.org][Macros]] [[https://markkarpov.com/tutorial/th.html][An excellent Template Haskell Tutorial]] [[https://github.com/leonidas/codeblog/blob/master/2011/2011-12-27-template-haskell.md][codeblog/2011-12-27-template-haskell.md at master · leonidas/codeblog]] https://github.com/JoeyEremondi/haskelm haskell to elm translation with TemplateHaskell * Categories [[file:cat.org][Category theory]] https://ncatlab.org/nlab/show/comonad#definition [[file:math.org][Math]] [[https://en.wikibooks.org/wiki/Haskell/Category_theory][Haskell and Category Theory]] [[file:cat.org][Category theory]] [[https://haskell.programmingpedia.net/en/tutorial/2261/category-theory][Category Theory | Haskell Language Tutorial]] http://www.haskellforall.com/2013/02/you-could-have-invented-comonads.html ** Monads [[https://github.com/davdar/maam][state analysis with monads]] https://sanderv1992.github.io/fp/monad/ https://bartoszmilewski.com/2017/01/02/comonads/ -- monads in reverse; co-categories https://en.wikibooks.org/wiki/Haskell/Monad_transformers -- transformers :: operating over monads http://comonad.com/reader/ * Dependent types and more [[https://github.com/mikeizbicki/subhask][mikeizbicki/subhask: Type safe interface for working in subcategories of Ha]] [[Https://www.reddit.com/r/haskell/comments/ibyzlg/dependent_type_roles/][Dependent type roles : haskell]] [[https://github.com/roger-uw/haskell-snippets/blob/master/LambdaToSKI.hs][haskell-snippets/LambdaToSKI.hs at master · roger-uw/haskell-snippets]] * haskell https://blog.sumtypeofway.com/posts/fast-iteration-with-haskell.html https://blog.josephmorag.com/posts/mcc1/ http://oleg.fi/gists/posts/2020-04-27-overloaded-local-do.html https://gilmi.me/blog/post/2020/04/28/consider-haskell https://tech.fpcomplete.com/blog/2016/11/covariance-contravariance https://tech.fpcomplete.com/haskell/syllabus https://www.reddit.com/r/haskell/comments/g1ajqe/towards_faster_iteration_in_industrial_haskell/ https://www.reddit.com/r/ProgrammingLanguages/comments/fum1pw/haskell_cheat_sheet/ https://www.reddit.com/r/haskell/comments/x7fyt/smartcheck_a_better_quickcheck_for_testing/ http://hackage.haskell.org/package/mwc-random-accelerate -- pseudorandom numbers, accelerate arrays ?? https://mmhaskell.com/machine-learning http://hackage.haskell.org/package/nvvm -- no idea, looks cool https://hackage.haskell.org/package/haskeline-0.8.0.0/docs/System-Console-Haskeline.html -- ui for interacting with the terminal in haskell https://www.youtube.com/watch?v=uxv62QQajx8 -- implementing linear haskell https://www.youtube.com/watch?v=SjxP1NpoP2c -- hasktorch ! https://www.youtube.com/watch?v=qWpD8t_Aodk&t=945s -- how they made hasktorch https://www.reddit.com/r/haskell/comments/gwdd8/io_evaluates_the_haskell_heap/ https://www.reddit.com/r/programming/comments/gwyq2/implementing_the_haskell_heap_in_python_hint_it/ https://www.reddit.com/r/haskell/comments/fz0ve/the_type_technology_tree_mapping_type_extensions/ https://www.reddit.com/r/haskell/comments/h40qr/unraveling_the_mystery_of_the_io_monad/ https://www.reddit.com/r/haskell/comments/k5okh/lets_play_a_game_how_to_implement_functions_from/ https://www.reddit.com/r/haskell/comments/i29kd/a_pattern_for_avoiding_allocation_inside_t5/ https://www.reddit.com/r/haskell/comments/hlsmv/an_insufficiently_lazy_map_the_dangers_of/ https://www.reddit.com/r/haskell/comments/hcjmm/space_leak_zoo_a_catalog_of_common_space_leaks_in/ https://www.reddit.com/r/haskell/comments/tzp7f/a_gamified_tutorial_on_the_sequent_calculus/ https://www.reddit.com/r/haskell/comments/12irlj/hpd3js_an_interactive_heap_profile_viewer/ https://www.reddit.com/r/haskell/comments/571i8r/galois_is_hiring/ https://www.reddit.com/r/haskell/comments/2b7odl/this_just_in_from_my_local_ghccabal_checkout_re/ https://www.reddit.com/r/haskell/comments/5bkhth/request_for_comment_specifying_versions_soname/ https://www.reddit.com/r/haskell/comments/5erk9u/levity_polymorphism_new_paper_from_richard_and/ https://www.reddit.com/r/haskell/comments/5erk9u/levity_polymorphism_new_paper_from_richard_and/ https://www.reddit.com/r/haskell/comments/5yxbh7/what_bcbreaking_changes_would_you_make_to/ https://www.reddit.com/r/adventofcode/comments/ek4652/2019_day_all_haskell_my_first_journey_through/ https://www.reddit.com/r/compsci/comments/g1rtjo/xpost_rhaskell_i_wrote_an_introduction_to_lambda/ https://alpacaaa.net/thoughts-on-haskell-2020/ https://www.fpcomplete.com/blog/2017/06/readert-design-pattern https://www.tweag.io/posts/2019-02-13-types-got-you.html https://hackage.haskell.org/package/base-4.12.0.0/docs/GHC-Generics.html https://www.snoyman.com/blog/2019/11/boring-haskell-manifesto https://tech.fpcomplete.com/blog/2017/01/quickcheck https://www.parsonsmatt.org/2019/12/26/write_junior_code.html https://talks.diogocastro.com/the-haskell-epidemic/#0 http://www.cse.chalmers.se/%7Erjmh/QuickCheck/ https://www.reddit.com/r/haskell/comments/fz19kg/where_can_i_find_examples_of_haskells_features/ https://www.tweag.io/posts/2020-04-16-exceptions-in-haskell.html https://www.reddit.com/r/haskell/comments/g2y4m1/im_streaming_myself_working_on_ghc_today_if_you/ https://ucsd-progsys.github.io/liquidhaskell-blog/2020/04/12/polymorphic-perplexion.lhs/ https://m.youtube.com/watch?feature=youtu.be&v=kIwd1D9m1gE https://gist.github.com/erebe/a8b0ffd1a27133bcf3b640b64e35f2fb https://www.reddit.com/r/haskell/comments/g0w8g5/can_someone_explain_this_kmett_magic/ ** setting up stack #+begin_src sh wget https://get.haskellstack.org/stable/linux-x86_64-static.tar.gz rm -rf linux-x86_64-static.tar.gz export PATH=$PATH:./s #+end_src creating project: #+begin_src sh stack new Other simple stack setup getting ncurses5-compat-libs: #+end_src * other links - [[https://medium.com/@saurabhnanda/why-building-web-apps-in-haskell-is-harder-than-it-ought-to-be-c9b13de0be4f][Building web apps in haskell]]. This is outdated, I'm using IHP now! [[https://stackoverflow.com/questions/22620294/minimal-warp-webserver-example][ez web server in haskell]] [[https://www.airpair.com/haskell-tutorial/intro-to-haskell-web-apps][client side apps in haskell]] - [[https://wiki.haskell.org/Web/Frameworks][web frameworks for haskell]] https://github.com/raviksharma/bartosz-basics-of-haskell basics of haskell tutorial * Proofs - [[https://blog.madsbuch.com/proving-stuff-in-haskell/][A casual guide to proving things in Haskell]] - [[https://wiki.haskell.org/Dependent_type][Dependent types in the context of Haskell (limited support)]] - [[https://jeltsch.wordpress.com/2012/04/30/dependently-typed-programming-and-theorem-proving-in-haskell/][A more rigorous overview of dependently typed programming in Haskell]] - [[https://wiki.haskell.org/Applications_and_libraries/Theorem_provers][Haskell libraries and theorem provers]] * things to remake in haskell (and maybe racket!) [[https://qvault.io/2020/07/08/how-sha-2-works-step-by-step-sha-256/ ][sha256 encoder]] - The Forth programming language (then make lots of example programs!) - [[https://github.com/jasonhemann/dependently-typed-lang][Jason Hemann's small, dependently typed language]] - [[https://m.youtube.com/watch?v=Or_yKiI3Ha4][Matthew Flatt's hygienic macro expander]] * IHP 'batteries included haskell framework' https://github.com/digitallyinduced/ihp https://github.com/bergmark/feed haskell package for RSS https://github.com/cdepillabout/termonad haskell terminal emulator https://github.com/AndrasKovacs/setoidtt implementations of systems with setoid type theory https://github.com/jaspervdj/websockets yea https://m.youtube.com/watch?v=FYTZkE5BZ-0 :: make [[file:./music.org][music]] with haskell from scratch https://kowainik.github.io/posts/haskell-mini-patterns haskell mini patterns https://www.reddit.com/r/haskell/comments/hawgff/any_devs_here_interested_in_learning_plutus_and/ https://blog.sigplan.org/2019/12/16/runtime-support-for-multicore-haskell-a-retrospective/ icebreaker fpga https://github.com/mikeizbicki/subhask rewrite of prelude to make numerics fun and fast https://mpickering.github.io//ide/posts/2020-08-04-measuring-memory-size.html measuring memory usage in haskell * web https://m.youtube.com/watch?v=65GWGc5LNxc debugging ghc assertion error https://reasonablypolymorphic.com/blog/towards-tactics/index.html navigating the haskell tactics engine https://www.srid.ca/haskell-new-project.html creating a new haskell project with ide support and nix * etc... [[https://github.com/facebook/Haxl]["A Haskell library that simplifies access to remote data, such as databases or web-based services. "]] [[https://github.com/tathougies/hos][The functional Haskell kernel]] [[https://www.reddit.com/r/haskell/comments/it7ohv/developing_multiple_local_packages_at_once_in_repl/][Developing multiple local packages at once in repl? - haskell]] [[https://blog.cloudflare.com/cloudflare-worker-with-webassembly-and-haskell/][Let's build a Cloudflare Worker with WebAssembly and Haskell]] [[https://maxdeviant.com/posts/2019/implementing-a-case-conversion-library-in-fsharp-and-haskell/][Implementing a Case Conversion Library in F# and Haskell · maxdeviant.com]] [[https://github.com/kwannoel/kattis][kwannoel/kattis: Kattis problems in Haskell (maybe Rust? we'll see)]] [[https://github.com/kwannoel/haskell_tutorials][kwannoel/haskell_tutorials]] [[https://github.com/kwannoel/fingerd][kwannoel/fingerd: Final haskell project, a finger daemon.]] [[https://kwannoel.xyz/22050263.html][Zippers in Haskell and Javascript - My Zettelkasten]] [[https://www.reddit.com/r/haskell/comments/hhiqaa/other_influential_disciplines_or_challenges/][Other influential disciplines or challenges? - haskell]] [[http://conal.net/blog/posts/everything-is-a-function-in-haskell][Conal Elliott » “Everything is a function” in Haskell?]] [[https://www.reddit.com/r/haskell/comments/hv7prz/effet_an_effect_system_based_on_type_classes/][effet: An Effect System based on Type Classes - haskell]] [[https://gist.github.com/graninas/833a9ff306338aefec7e543100c16ea1][Haskeller competency matrix]] [[https://medium.com/@cdsmithus/solving-a-puzzle-in-haskell-8216a683555][Solving a puzzle in Haskell. This post isn’t particularly deep or… | by Chr]] [[https://m.youtube.com/watch?feature=youtu.be&v=dHo_EUyShOg][The Haskell Elephant in the Room - YouTube]] [[https://m.youtube.com/watch?v=5QQdI3P7MdY][]"Hackett: a metaprogrammable Haskell" by Alexis King - YouTube]] [[https://blog.sigplan.org/2019/12/16/runtime-support-for-multicore-haskell-a-retrospective/][Runtime Support for Multicore Haskell: a Retrospective | SIGPLAN Blog]] [[https://github.com/raviksharma/bartosz-basics-of-haskell][raviksharma/bartosz-basics-of-haskell: Code and exercises from Bartosz Mile]] [[https://www.reddit.com/r/haskell/comments/hy8bdd/announcementcall_for_contributors_monpad/][Announcement/call for contributors: Monpad - haskell]] https://lexi-lambda.github.io/resume.html -- alexis king -- brilliant racket and haskell programmer [[https://github.com/davdar/parsing-with-derivatives-haskell][he original parsing with derivatives haskell implementation]] [[https://github.com/tommythorn/Reduceron]["FPGA Haskell machine with game changing performance. Reduceron is Matthew Naylor, Colin Runciman and Jason Reich's high performance FPGA softcore for running lazy functional programs, including hardware garbage collection. Reduceron has been implemented on various FPGAs with clock frequency ranging from 60 to 150 MHz depending on the FPGA. A high degree of parallelism allows Reduceron to implement graph evaluation very efficiently. This fork aims to continue development on this, with a view to practical applications. Comments, questions, etc are welcome."]] [[https://github.com/hamler-lang/hamler][Haskell-style functional programming language running on Erlang VM.]] [[https://github.com/luc-tielen/souffle-haskell][Haskell bindings for the Souffle datalog language]] [[https://github.com/goldfirere/effects][ Haskell translation of Idris's original algebraic effects library]] [[https://free.cofree.io/2020/07/20/perform-io][How Accursed and Unutterable is accursedUnutterablePerformIO?]] https://ocharles.org.uk/ [[https://github.com/xingyif/raft][raft consensus protocol implementation]] [[https://github.com/chessai/pump][reverse dependency build matrix generator]] [[https://www.reddit.com/r/haskell/comments/hv7prz/effet_an_effect_system_based_on_type_classes/][effekt: effect system based on type classes]] [[https://cs-syd.eu/posts/2020-04-28-genvalidity-improvements][property testing in depth]] [[https://github.com/vabal/vabal]['vabal': the cabal companion]] https://gist.github.com/MaiaVictor/350cd2e318ad884c7c491c3dad7e3b1d https://typeclasses.com/: a haskell guide, or something https://boarders.github.io/posts/locally-nameless/ cool pl writing based on various papers : ) http://www.newartisans.com/ haskell blogs and ideas https://banana.dog/@yaaps/105019052210553569 https://news.ycombinator.com/item?id=13781467 algebraic subtyping [[file:math.org][Math]] [[http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.41.125][CiteSeerX — Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire]] https://ocharles.org.uk/blog/posts/2019-08-09-who-authorized-these-ghosts.html incredible article on authorization a clever way https://www.youtube.com/watch?v=GQi-6-d5ooQ&app=desktop https://www.reddit.com/r/haskell/comments/i6c0dy/how_to_interpret_recursive_combinators_mean_over/ [[https://github.com/clash-lang/clash-compiler][compile haskell to verilog]] https://github.com/TOTBWF/refinery: refinement proofs in haskell * Simple Haskell https://www.simplehaskell.org/ simple haskell is easier for everyone to use https://www.reddit.com/r/haskell/comments/hjtnxx/light_weight_haskell [[https://www.reddit.com/r/haskell/comments/iflrw9/observations_after_the_first_time_writing_simple/][Observations after the first time writing (simple) Haskell : haskell]] https://www.haskellforall.com/2014/03/introductions-to-advanced-haskell-topics.html?m=1 http://blog.sigfpe.com/2006/08/algebraic-topology-in-haskell.html?m=1 * important https://artyom.me/aeson#fromjson-instances-for-other-types the best aeson tutorial