Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jonocarroll/exercism-solutions

My solutions to exercism exercises
https://github.com/jonocarroll/exercism-solutions

Last synced: about 2 months ago
JSON representation

My solutions to exercism exercises

Awesome Lists containing this project

README

        

---
output:
github_document:
df_print: "kable"
editor_options:
chunk_output_type: console
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

# exercism-solutions

```{r, echo = FALSE}
get_root_dirs <- function(path) {
dirs <- list.dirs(path, recursive = FALSE)
dirs <- sub("^./", "", dirs)
dirs <- dirs[!startsWith(dirs, ".")]
dirs
}

get_image <- function(lang) {
paste0("./.logos/", lang, ".png")
}

get_n_exercises <- function(lang) {
dirs <- get_root_dirs(lang)
# pharo-smalltalk has the image in that directory
dirs <- dirs[!grepl("pharo-smalltalk/pharo-", dirs)]
length(dirs)
}

make_link <- function(lang) {
glue::glue('{lang}')
}

dirs <- get_root_dirs(".")

md_logo <- function(lang) {
# glue::glue("![]({get_image(lang)})")
glue::glue("")
}
langs <- dplyr::tibble(
logo = sapply(dirs, md_logo),
language = sapply(dirs, make_link),
exercises = sapply(dirs, get_n_exercises)
) |>
dplyr::arrange(desc(exercises)) |>
as.data.frame()

# dplyr::tibble(
# logo = dirs,
# language = sapply(dirs, make_link),
# exercises = sapply(dirs, get_n_exercises),
# bar = exercises
# ) |>
# dplyr::mutate(language = purrr::map(language, gt::html)) |>
# dplyr::arrange(desc(exercises)) |>
# gt::gt(caption = glue::glue("Last compiled: {Sys.Date()}")) |>
# gt::text_transform(
# locations = gt::cells_body(columns = logo),
# fn = function(x) {
# gt::local_image(
# filename = get_image(x),
# height = 50
# )
# }
# ) |>
# gtExtras::gt_plt_bar(column = bar, keep_column = FALSE) |>
# gt::cols_label(.list = list(logo = "", language = "", exercises = "", bar = ""))
```

These are my completed solutions to [Exercism](https://exercism.org/) problems.

I completed the [#12in23](https://exercism.org/challenges/12in23) challenge by
solving 5 non-trivial exercises in each of 12 languages, plus several more.

I am also completing the [#48in24](https://exercism.org/challenges/48in24) challenge.

Total number of languages explored: `r nrow(langs)`

Total number of exercises completed: `r sum(langs$exercises)`

## Number of Exercises Completed per Language

```{r, echo = FALSE}
langs
```