In my second post on this blog, I wrote about my interest in learning new programming languages and my thoughts on how to choose the next language to learn. It's been over a year since that post and I thought it would be worthwhile to reflect on what I've learned.
This post is the second in a series on the dataframe library for Chez Scheme. In this post, I will contrast the
dataframe library with functions from the
dplyr R package for selecting, dropping, and renaming columns.
As an exercise in my Chez Scheme learning journey, I have implemented a dataframe record type and procedures to work with the dataframe record type. Dataframes are column-oriented, tabular data structures useful for data analysis found in several languages including R, Python, Julia, and Go. In this post, I will introduce the dataframe record type and basic procedures for working with dataframes. In subsequent posts, I will describe other dataframe procedures, e.g., filter, sort, aggregate, etc.
I have previously written about how to read and write JSON files in R and Racket. In re-reading that old post, I'm struck by how it shows me tinkering without understanding. Now that I have pivoted from learning Racket to learning Chez Scheme, I'm revisiting JSON as a data serialization format and actually reading about JSON instead of just playing with JSON packages.
I was reading a blog post that mentioned that Julia has "[w]eak conventions about namespace pollution" and it got me thinking about how I manage namespace pollution in R and Chez Scheme. The short answer is that I don't. I developed bad habits in R centered around writing overly terse code.
I've been an enthusiastic Mac user for about 12 years, but hardware problems with a recent MacBook Pro and friction surrounding the Catalina upgrade pushed me to evaluate other Unix-like systems. I pulled out an old ASUS laptop that originally had Windows 7(?) installed, but was most recently running CloudReady. I first tried installing FreeBSD because it seemed like an intriguing alternative, but the installation failed on the old hardware. I then tried Debian, but also failed. Finally, I reached for Ubuntu and, true to its reputation as being beginner friendly, was able to successfully complete the installation .
I recently wrote a little library,
chez-docs, to make accessing documentation easier while learning Chez Scheme (blog post). The main procedure,
chez-docs only returns results for exact matches with
proc . To aid in discovery, I've added a procedure,
find-proc, that provides exact and approximate matching of search strings.
In the process of learning Chez Scheme, I've missed R's ability to quickly pull up documentation from the console via
?. I've toyed with the idea of trying to format the contents of the Chez Scheme User's Guide for display in the REPL (similar to Clojure Docs). But that is probably too big of a task for me at this point. It recently occurred to me, though, that I can write a simple library,
chez-docs, with only one procedure,
doc, that will make it a bit easier to access the Chez Scheme User's Guide.
I have added functionality for reading and writing CVS files to my Chez Scheme library,
chez-stats. In a previous post, I compared reading CSV files in R and Racket and made the following observation.
Recently, I switched from learning Racket to Chez Scheme. I wanted to try to repeat some of my previous Racket exercises in Chez Scheme, but quickly ran into a barrier when my first choice required drawing random variates from a normal distribution. I looked for existing Chez Scheme libraries but came up empty. I considered SRFI 27: Sources of Random Bits, which includes example code for generating random numbers from a normal distribution, and reached out for guidance. Ultimately, I decided that it would be a good exercise to write a library for generating random variates from different distributions. As I started to write the random variate procedures, I realized that I minimally needed procedures for calculating mean and variance to test the output of the random variate procedures. And, thus, the scope of the library started to expand and the
chez-stats library was born.