A silly emotional rant about the state of devops tooling/the infrastructure sector in 2018 (nothing has really changed!) #noyaml
Link: https://noyaml.com
Source: https://github.com/ghuntley/noyaml
Problems discussed in the project above can be solved with awesome tools like nix and dhall:
- https://builtwithnix.org/
- https://github.com/dhall-lang/dhall-lang
But, they are written in #haskell and so they are very unfriendly, which is a very haskell thing.
#devops
Link: https://noyaml.com
Source: https://github.com/ghuntley/noyaml
Problems discussed in the project above can be solved with awesome tools like nix and dhall:
- https://builtwithnix.org/
- https://github.com/dhall-lang/dhall-lang
But, they are written in #haskell and so they are very unfriendly, which is a very haskell thing.
#devops
GitHub
GitHub - ghuntley/noyaml: A silly emotional rant about the state of devops tooling/the infrastructure sector in 2018. #noyaml.com
A silly emotional rant about the state of devops tooling/the infrastructure sector in 2018. #noyaml.com - ghuntley/noyaml
> We programming communities always like to believe our best days are ahead of us and our worst days behind us. But it’s the right now that’s the issue and always has been. The problems we work on in the present are those that shape the future, and often the choice of problems is what matters more than anything else.
This article shares the author's vision about the main #haskell goals for the next 10 years.
And these goals look amazing!
This article shares the author's vision about the main #haskell goals for the next 10 years.
And these goals look amazing!
Hedgehog automatically generates a comprehensive array of test cases, exercising your software in ways human testers would never imagine.
Generate hundreds of test cases automatically, exposing even the most insidious of corner cases. Failures are automatically simplified, giving developers coherent, intelligible error messages.
Features:
- Integrated shrinking, shrinks obey invariants by construction.
- Abstract state machine testing.
- Generators allow monadic effects.
- Range combinators for full control over the scope of generated numbers and collections.
- Equality and roundtrip assertions show a diff instead of the two inequal values.
- Template Haskell test runner which executes properties concurrently.
https://github.com/hedgehogqa/haskell-hedgehog
#haskell
Also available for #scala, #fsharp, #csharp, and #r
Generate hundreds of test cases automatically, exposing even the most insidious of corner cases. Failures are automatically simplified, giving developers coherent, intelligible error messages.
Features:
- Integrated shrinking, shrinks obey invariants by construction.
- Abstract state machine testing.
- Generators allow monadic effects.
- Range combinators for full control over the scope of generated numbers and collections.
- Equality and roundtrip assertions show a diff instead of the two inequal values.
- Template Haskell test runner which executes properties concurrently.
https://github.com/hedgehogqa/haskell-hedgehog
#haskell
Also available for #scala, #fsharp, #csharp, and #r
GitHub
GitHub - hedgehogqa/haskell-hedgehog: Release with confidence, state-of-the-art property testing for Haskell.
Release with confidence, state-of-the-art property testing for Haskell. - hedgehogqa/haskell-hedgehog
co-log is a composable and configurable logging framework. It combines all the benefits of #haskell idioms to provide a reasonable and convenient interface. Though it uses some advanced concepts in its core, we are striving to provide beginner-friendly API. The library also contains complete documentation with a lot of beginner-friendly examples, explanations and tutorials to guide users. The combination of pragmatic approach to logging and fundamental Haskell abstractions allows us to create highly composable and configurable logging framework.
If you're interested in how different Haskel typeclasses are used to implement core functions of co-log, you can read the following blog post which goes in detail about internal implementation specifics:
co-log: Composable Contravariant Combinatorial Comonadic Configurable Convenient Logging
https://github.com/kowainik/co-log
If you're interested in how different Haskel typeclasses are used to implement core functions of co-log, you can read the following blog post which goes in detail about internal implementation specifics:
co-log: Composable Contravariant Combinatorial Comonadic Configurable Convenient Logging
https://github.com/kowainik/co-log
Kowainik
Kowainik - co-log: Composable Contravariant Combinatorial Comonadic Configurable Convenient Logging
Architecture of the modern logging library in Haskell
Introducing Mu for #haskell! This release comes w/ full support for building gRPC microservices, shifts a lot of checks to compile-time schemas & readily integrates with well-known Haskell libraries for many tasks. More here: https://www.47deg.com/blog/introducing-mu-haskell-0-1/
Docs: https://higherkindness.io/mu-haskell/
Docs: https://higherkindness.io/mu-haskell/
Haskell, the pure and lazy functional programming language, has now been around for more than 25 years. It had a profound influence on many other programming languages on the JVM: Java, Clojure and Scala and elsewhere: Purescript, Swift, Go (just kidding, not Go :-)). In this talk you will discover which #haskell constructs have made it to mainstream programming languages and change the way you program today. You will also get a glimpse of the features which are yet to be transferred for our greatest benefit. Warning: after this talk you might be tempted to try the real thing!
YouTube
Lambda World 2018 - What Haskell Taught Us When We Weren't Looking - Eric Torreborre
This presentation by Eric Torreborre took place at Lambda World Cádiz on October 25th, 2018 at the Palacio de Congresos in Cádiz, Spain.
What Haskell taught us when we were not looking
Haskell, the pure and lazy functional programming language, has now…
What Haskell taught us when we were not looking
Haskell, the pure and lazy functional programming language, has now…
Great talk about solving the same simple problem with three completely different languages: #csharp, #haskell, and #clojure
From one of my favourite speakers / authors out there:
> First, we'll do a brief overview of the FizzBuzz kata, and see one 'idiomatic' way to implement it in C# (the Java, Javascript, Visual Basic, etc. version would be similar, so all OO programmers are welcome). Next, most of the talk will be a live demo showing approaches to the kata in Haskell and Clojure. If you've never seen Haskell or Clojure before, but are curious about these languages, this is the talk for you! Finally, we take some of the ideas from the Haskell and Clojure implementations, and bring them back to C# for a second attempt at the kata.
From one of my favourite speakers / authors out there:
> First, we'll do a brief overview of the FizzBuzz kata, and see one 'idiomatic' way to implement it in C# (the Java, Javascript, Visual Basic, etc. version would be similar, so all OO programmers are welcome). Next, most of the talk will be a live demo showing approaches to the kata in Haskell and Clojure. If you've never seen Haskell or Clojure before, but are curious about these languages, this is the talk for you! Finally, we take some of the ideas from the Haskell and Clojure implementations, and bring them back to C# for a second attempt at the kata.
YouTube
One kata, three languages - Mark Seemann
First, we'll do a brief overview of the FizzBuzz kata, and see one 'idiomatic' way to implement it in C# (the Java, Javascript, Visual Basic, etc. version would be similar, so all OO programmers are welcome). Next, most of the talk will be a live demo showing…
❤1
Summoner is a tool for scaffolding fully configured batteries-included production-level #haskell projects.
Do you want to create a library that is to be uploaded to Hackage/Stackage, that builds with both Cabal and Stack and supports the latest three major GHC versions? Or are you building a production application which uses a custom prelude and has CI with GitHub Actions or Travis Linux and AppVeyors Windows checks? Maybe do you want to play with your idea in a single module without introducing the whole complexity of the Haskell projects? Summoner can help you do all that with minimal effort from you - it can even upload the project to GitHub if you wish!
By the way, Summoner operates as either CLI or TUI application, so you can choose what you are more comfortable with and install only the required one.
https://github.com/kowainik/summoner
Do you want to create a library that is to be uploaded to Hackage/Stackage, that builds with both Cabal and Stack and supports the latest three major GHC versions? Or are you building a production application which uses a custom prelude and has CI with GitHub Actions or Travis Linux and AppVeyors Windows checks? Maybe do you want to play with your idea in a single module without introducing the whole complexity of the Haskell projects? Summoner can help you do all that with minimal effort from you - it can even upload the project to GitHub if you wish!
By the way, Summoner operates as either CLI or TUI application, so you can choose what you are more comfortable with and install only the required one.
https://github.com/kowainik/summoner
Ormolu is a formatter for #haskell source code. The project was created with the following goals in mind:
- Using GHC's own parser to avoid parsing problems caused by haskell-src-exts.
- Let some whitespace be programmable. The layout of the input influences the layout choices in the output. This means that the choices between single-line/multi-line layouts in each particular situation are made by the user, not by an algorithm. This makes the implementation simpler and leaves some control to the user while still guaranteeing that the formatted code is stylistically consistent.
- Writing code in such a way so it's easy to modify and maintain.
- Implementing one “true” formatting style which admits no configuration.
- That formatting style aims to result in minimal diffs while still remaining very close to “conventional” Haskell formatting people use.
- Choose a style compatible with modern dialects of Haskell. As new Haskell extensions enter broad use, we may change the style to accomodate them.
- Idempotence: formatting already formatted code doesn't change it.
- Be well-tested and robust to the point that it can be used in large projects without exposing unfortunate, disappointing bugs here and there.
https://github.com/tweag/ormolu
- Using GHC's own parser to avoid parsing problems caused by haskell-src-exts.
- Let some whitespace be programmable. The layout of the input influences the layout choices in the output. This means that the choices between single-line/multi-line layouts in each particular situation are made by the user, not by an algorithm. This makes the implementation simpler and leaves some control to the user while still guaranteeing that the formatted code is stylistically consistent.
- Writing code in such a way so it's easy to modify and maintain.
- Implementing one “true” formatting style which admits no configuration.
- That formatting style aims to result in minimal diffs while still remaining very close to “conventional” Haskell formatting people use.
- Choose a style compatible with modern dialects of Haskell. As new Haskell extensions enter broad use, we may change the style to accomodate them.
- Idempotence: formatting already formatted code doesn't change it.
- Be well-tested and robust to the point that it can be used in large projects without exposing unfortunate, disappointing bugs here and there.
https://github.com/tweag/ormolu
GitHub
GitHub - tweag/ormolu: A formatter for Haskell source code
A formatter for Haskell source code. Contribute to tweag/ormolu development by creating an account on GitHub.
Penrose is a platform that enables people to create beautiful diagrams just by typing mathematical notation in plain text. The goal is to make it easy for non-experts to create and explore high-quality diagrams, providing deeper insight into challenging technical concepts. We aim to democratize the process of creating visual intuition.
https://github.com/penrose/penrose
#haskell
Here's a simple Penrose visualization in the domain of set theory:
https://github.com/penrose/penrose
#haskell
Here's a simple Penrose visualization in the domain of set theory:
#haskell STatic ANalyser
Stan is a command-line tool for analysing Haskell projects and outputting discovered vulnerabilities in a helpful way with possible solutions for detected problems. Stan is searching for not only performance or error-prone code pieces, but it also can help with establishing and applying best-practices from the whole Haskell ecosystem.
Although Haskell is a statically typed language, not all properties can be encoded in types. Even though GHC is quite a powerful compiler, it tries to be library-agnostic and provide only language-specific suggestions, while Stan uses the knowledge about the current state of the ecosystem and commonly used libraries.
You will find Stan helpful if you enjoy writing in Haskell, but want more guarantees from your code, not provided by the Haskell type system or GHC.
Stan is a configurable CLI tool. Besides the main feature of analysing Haskell projects statically, Stan has a list of features that make it unique, easy to use and flexible to configure:
- Pretty analysis results, including both HTML and terminal reports
- Suggestions and possible solutions for fixing the existing problems
- Analysing not only Haskell source code, but also information from the .cabal files
- Flexible runtime configuration via TOML and CLI
https://github.com/kowainik/stan
Stan is a command-line tool for analysing Haskell projects and outputting discovered vulnerabilities in a helpful way with possible solutions for detected problems. Stan is searching for not only performance or error-prone code pieces, but it also can help with establishing and applying best-practices from the whole Haskell ecosystem.
Although Haskell is a statically typed language, not all properties can be encoded in types. Even though GHC is quite a powerful compiler, it tries to be library-agnostic and provide only language-specific suggestions, while Stan uses the knowledge about the current state of the ecosystem and commonly used libraries.
You will find Stan helpful if you enjoy writing in Haskell, but want more guarantees from your code, not provided by the Haskell type system or GHC.
Stan is a configurable CLI tool. Besides the main feature of analysing Haskell projects statically, Stan has a list of features that make it unique, easy to use and flexible to configure:
- Pretty analysis results, including both HTML and terminal reports
- Suggestions and possible solutions for fixing the existing problems
- Analysing not only Haskell source code, but also information from the .cabal files
- Flexible runtime configuration via TOML and CLI
https://github.com/kowainik/stan
High-confidence browser testing.
This is like QuickCheck, but for E2E tests.
Features:
- Reduce testing effort: Generate thousands of test cases instead of writing them manually. Lower the maintenance burden of your browser testing by writing concise specifications with looser coupling to your implementation.
- Find complex bugs: Quickstrom simulates complex and unexpected user behavior using generative random testing. When the specification is violated, Quickstrom finds a minimal failing example.
- Understand your system: Focus on specifying your system, not on writing test cases. A specification lets you run Quickstrom, but can also increase your team's understanding of the system.
- Adopt gradually: Quickstrom works with any web application that renders DOM elements. Start simple, and gradually refine your specification to increase coverage and confidence.
https://github.com/quickstrom/quickstrom
#haskell
This is like QuickCheck, but for E2E tests.
Features:
- Reduce testing effort: Generate thousands of test cases instead of writing them manually. Lower the maintenance burden of your browser testing by writing concise specifications with looser coupling to your implementation.
- Find complex bugs: Quickstrom simulates complex and unexpected user behavior using generative random testing. When the specification is violated, Quickstrom finds a minimal failing example.
- Understand your system: Focus on specifying your system, not on writing test cases. A specification lets you run Quickstrom, but can also increase your team's understanding of the system.
- Adopt gradually: Quickstrom works with any web application that renders DOM elements. Start simple, and gradually refine your specification to increase coverage and confidence.
https://github.com/quickstrom/quickstrom
#haskell
New functional language focused on good developer experience.
A user from Quora asked:
> Why isn't functional programming that popular even though it's so beneficial?
One of the top answer says:
> The user experiences of functional programming languages sucks.
No doubt, this is a sad but true story for most functional programming (FP) languages. I personally thought that FP languages like Haskell offers a very unified and pure programming concepts (i.e. everything are functions, and functions and compose well, etc). However, Haskell syntax is a mess (take a look at the grammar), there are a lot of edge cases (e.g. weird indentation rules). Of course this problem is not only limited to Haskell, similar problems can also be found in other FP languages like Erlang, F#, OCaml etc. Thus, I believe that these are also the primal reason that most people felt FP languages are hard.
> I wanted more people to adopt FP.
That is what I wished for, therefore I'm motivated to create a language called Keli (named after my girlfriend), which hopes to an FP language with good user experience (UX).
In the following section, I will describe the UX problems of FP languages and how they are solved in other programming languages.
https://keli-language.gitbook.io/doc/
Written in #haskell
A user from Quora asked:
> Why isn't functional programming that popular even though it's so beneficial?
One of the top answer says:
> The user experiences of functional programming languages sucks.
No doubt, this is a sad but true story for most functional programming (FP) languages. I personally thought that FP languages like Haskell offers a very unified and pure programming concepts (i.e. everything are functions, and functions and compose well, etc). However, Haskell syntax is a mess (take a look at the grammar), there are a lot of edge cases (e.g. weird indentation rules). Of course this problem is not only limited to Haskell, similar problems can also be found in other FP languages like Erlang, F#, OCaml etc. Thus, I believe that these are also the primal reason that most people felt FP languages are hard.
> I wanted more people to adopt FP.
That is what I wished for, therefore I'm motivated to create a language called Keli (named after my girlfriend), which hopes to an FP language with good user experience (UX).
In the following section, I will describe the UX problems of FP languages and how they are solved in other programming languages.
https://keli-language.gitbook.io/doc/
Written in #haskell
Gifcurry is the open-source video editor for GIF makers. It's built with #haskell and works on Linux, Mac, and most likely Windows. There is both a graphical and command line interface.
Gifcurry edits your GIFs or videos and turns them into videos or GIFs. You can crop, trim, seek, add text, pick a font, alter the duration, change the size, set the FPS, tweak the color count, enable dithering, import subtitles, and save your creation as either a GIF or video.
https://lettier.github.io/gifcurry/
Gifcurry edits your GIFs or videos and turns them into videos or GIFs. You can crop, trim, seek, add text, pick a font, alter the duration, change the size, set the FPS, tweak the color count, enable dithering, import subtitles, and save your creation as either a GIF or video.
https://lettier.github.io/gifcurry/
REST API for any Postgres database.
Using PostgREST is an alternative to manual CRUD programming. Custom API servers suffer problems. Writing business logic often duplicates, ignores or hobbles database structure. Object-relational mapping is a leaky abstraction leading to slow imperative code. The PostgREST philosophy establishes a single declarative source of truth: the data itself.
Declarative Programming: It’s easier to ask PostgreSQL to join data for you and let its query planner figure out the details than to loop through rows yourself. It’s easier to assign permissions to db objects than to add guards in controllers. (This is especially true for cascading permissions in data dependencies.) It’s easier to set constraints than to litter code with sanity checks.
Leak-proof Abstraction: There is no ORM involved. Creating new views happens in SQL with known performance implications. A database administrator can now create an API from scratch with no custom programming.
https://github.com/PostgREST/postgrest
#haskell
Using PostgREST is an alternative to manual CRUD programming. Custom API servers suffer problems. Writing business logic often duplicates, ignores or hobbles database structure. Object-relational mapping is a leaky abstraction leading to slow imperative code. The PostgREST philosophy establishes a single declarative source of truth: the data itself.
Declarative Programming: It’s easier to ask PostgreSQL to join data for you and let its query planner figure out the details than to loop through rows yourself. It’s easier to assign permissions to db objects than to add guards in controllers. (This is especially true for cascading permissions in data dependencies.) It’s easier to set constraints than to litter code with sanity checks.
Leak-proof Abstraction: There is no ORM involved. Creating new views happens in SQL with known performance implications. A database administrator can now create an API from scratch with no custom programming.
https://github.com/PostgREST/postgrest
#haskell
My new article is out! It is all about typeclasses in Python and
Today I am explaining what typeclasses are and how to use them. I give examples in 4 very different languages: #rust, #elixir, #haskell, and #python to show that this concept is universal.
I am also showing that this idea is very pythonic by comparing our
Check how easy it is to define a typeclass with
Check it out!
dry-python/classes.Today I am explaining what typeclasses are and how to use them. I give examples in 4 very different languages: #rust, #elixir, #haskell, and #python to show that this concept is universal.
I am also showing that this idea is very pythonic by comparing our
classes implementation with functools.singledispatch. There are lots of different details!Check how easy it is to define a typeclass with
classes: from classes import AssociatedType, Supports, typeclass
class Greet(AssociatedType):
"""Special type to represent that some instance can `greet`."""
@typeclass(Greet)
def greet(instance) -> str:
"""No implementation needed."""
@greet.instance(str)
def _greet_str(instance: str) -> str:
return 'Hello, {0}!'.format(instance)
def greet_and_print(instance: Supports[Greet]) -> None:
print(greet(instance))
greet_and_print('world')
Check it out!
Flix: Next-generation reliable, safe, concise, and functional-first programming language.
Flix is inspired by OCaml and Haskell with ideas from Rust and Scala. Flix looks like Scala, but its type system is based on Hindley-Milner. Two unique features of Flix are its polymorphic effect system and its support for first-class Datalog constraints.
Flix aims to offer a unique combination of features that no other programming language offers, including: algebraic data types and pattern matching (like Haskell, OCaml), extensible records (like Elm), type classes (like #haskell, #rust), higher-kinded types (like Haskell), local type inference (like Haskell, OCaml), channel and process-based concurrency (like #go), a polymorphic effect system (unique feature), first-class Datalog constraints (unique feature), and compilation to JVM bytecode (like #scala).
https://flix.dev/
Personal opinion: it has all the features new modern programming language should have. It has nice syntax, powerful ideas, and (hopefully) good JVM integration and code-reuse. That's a recipe for a success. I will keep an eye on this amazing language.
It also has a playground on its website, check it out!
I would love to highlight this example of polymorphic effects:
Flix is inspired by OCaml and Haskell with ideas from Rust and Scala. Flix looks like Scala, but its type system is based on Hindley-Milner. Two unique features of Flix are its polymorphic effect system and its support for first-class Datalog constraints.
Flix aims to offer a unique combination of features that no other programming language offers, including: algebraic data types and pattern matching (like Haskell, OCaml), extensible records (like Elm), type classes (like #haskell, #rust), higher-kinded types (like Haskell), local type inference (like Haskell, OCaml), channel and process-based concurrency (like #go), a polymorphic effect system (unique feature), first-class Datalog constraints (unique feature), and compilation to JVM bytecode (like #scala).
https://flix.dev/
Personal opinion: it has all the features new modern programming language should have. It has nice syntax, powerful ideas, and (hopefully) good JVM integration and code-reuse. That's a recipe for a success. I will keep an eye on this amazing language.
It also has a playground on its website, check it out!
I would love to highlight this example of polymorphic effects:
Kind: A modern proof language.
A minimal, efficient and practical proof and programming language. Under the hoods, it is basically Haskell, except purer and with dependent types. That means it can handle mathematical theorems just like Coq, Idris, Lean and Agda. On the surface, it aims to be more practical and looks more like TypeScript.
Compared to other proof assistants, Kind has:
- The smallest core. Check FormCore.js or Core.kind. Both are < 1000-LOC complete implementations!
- Novel type-level features. Check out article on super-inductive datatypes.
- An accessible syntax that makes it less scary
- A complete bootstrap: the language is implemented in itself. Check it here.
- Efficient real-world compilers. Check http://uwu.tech/ for a list of apps. (WIP)
Things you can do with it:
- Compile programs and modules to several targets, right now
- Create live applications. Kind has an interconnected back-end that allows you to create rich, interactive applications without ever touching databases, TCP packets or messing with apis
- Prove theorems: for programmers, they're more like unit tests, except they can involve symbols, allowing you to cover infinitely many test cases. If you like unit tests, you'll love theorems.
Personal opinion: I am a big fan of ML-family languages, but not a big fan of their syntaxes. I love that new products solve their biggest issue for me. I really hope that some of these new functional languages will get eventually popular.
https://github.com/uwu-tech/kind
#js #haskell
A minimal, efficient and practical proof and programming language. Under the hoods, it is basically Haskell, except purer and with dependent types. That means it can handle mathematical theorems just like Coq, Idris, Lean and Agda. On the surface, it aims to be more practical and looks more like TypeScript.
Compared to other proof assistants, Kind has:
- The smallest core. Check FormCore.js or Core.kind. Both are < 1000-LOC complete implementations!
- Novel type-level features. Check out article on super-inductive datatypes.
- An accessible syntax that makes it less scary
- A complete bootstrap: the language is implemented in itself. Check it here.
- Efficient real-world compilers. Check http://uwu.tech/ for a list of apps. (WIP)
Things you can do with it:
- Compile programs and modules to several targets, right now
js and scm are supported- Create live applications. Kind has an interconnected back-end that allows you to create rich, interactive applications without ever touching databases, TCP packets or messing with apis
- Prove theorems: for programmers, they're more like unit tests, except they can involve symbols, allowing you to cover infinitely many test cases. If you like unit tests, you'll love theorems.
Personal opinion: I am a big fan of ML-family languages, but not a big fan of their syntaxes. I love that new products solve their biggest issue for me. I really hope that some of these new functional languages will get eventually popular.
https://github.com/uwu-tech/kind
#js #haskell