diff --git a/_posts/2024-02-05-statically-and-dynamically-typed-scripts.html b/_posts/2024-02-05-statically-and-dynamically-typed-scripts.html index 59e3e5ba..b8d91f48 100644 --- a/_posts/2024-02-05-statically-and-dynamically-typed-scripts.html +++ b/_posts/2024-02-05-statically-and-dynamically-typed-scripts.html @@ -85,7 +85,7 @@
@@ -107,6 +107,6 @@
- Next: Extracting data from a small CSV file with Haskell. + Next: Extracting data from a small CSV file with Haskell.
\ No newline at end of file diff --git a/_posts/2024-02-02-extracting-data-from-a-small-csv-file-with-haskell.html b/_posts/2024-02-19-extracting-data-from-a-small-csv-file-with-haskell.html similarity index 94% rename from _posts/2024-02-02-extracting-data-from-a-small-csv-file-with-haskell.html rename to _posts/2024-02-19-extracting-data-from-a-small-csv-file-with-haskell.html index dd47e33c..9631b25c 100644 --- a/_posts/2024-02-02-extracting-data-from-a-small-csv-file-with-haskell.html +++ b/_posts/2024-02-19-extracting-data-from-a-small-csv-file-with-haskell.html @@ -2,7 +2,7 @@ layout: post title: "Extracting data from a small CSV file with Haskell" description: "Statically typed languages are also good for ad-hoc scripting." -date: 2024-02-02 12:49 UTC +date: 2024-02-19 12:57 UTC tags: [Haskell] image: "/content/binary/difference-pmf-plot.png" image_alt: "Bar chart of the differences PMF." @@ -14,7 +14,7 @@ {{ page.description }}- This article is part of a short series of articles that compares ad-hoc scripting in Haskell with solving the same problem in Python. The introductory article describes the problem to be solved, so here I'll jump straight into the Haskell code. In the next article I'll give a similar walkthrough of my Python script. + This article is part of a short series of articles that compares ad-hoc scripting in Haskell with solving the same problem in Python. The introductory article describes the problem to be solved, so here I'll jump straight into the Haskell code. In the next article I'll give a similar walkthrough of my Python script.
- Looks good, but reading a text file is hardly the difficult part. The first obstacle, surprisingly, is to split comma-separated values into individual parts. For some reason that I've never understood, the Haskell base library doesn't even include something as basic as String.Split from .NET. I could probably hack together a function that does that, but on the other hand, it's available in the split package; that explains the Data.List.Split
import. It's just such a bit of a bother that one has to pull in another package just to do that.
+ Looks good, but reading a text file is hardly the difficult part. The first obstacle, surprisingly, is to split comma-separated values into individual parts. For some reason that I've never understood, the Haskell base library doesn't even include something as basic as String.Split from .NET. I could probably hack together a function that does that, but on the other hand, it's available in the split package; that explains the Data.List.Split
import. It's just a bit of a bother that one has to pull in another package only to do that.
- In the introduction article I spent some time explaining how languages with strong type inference don't need type declarations. This makes iterative development easier, because you can fiddle with an expression until it does what you'd like it to do. When you change an expression, often the inferred type changes as well, but there's no programmer overhead involved with that. The compiler figures that out for you. + In the introduction article I spent some time explaining how languages with strong type inference don't need type declarations. This makes iterative development easier, because you can fiddle with an expression until it does what you'd like it to do. When you change an expression, often the inferred type changes as well, but there's no programmer overhead involved with that. The compiler figures that out for you.
Even so, the above grade
function does have a type annotation. How does that gel with what I just wrote?