Week 45: What did you learn this week?

whatdidyoulearn

#1

What Clojure, programming, or life skill did you learn this week?


#2

Several:


#3
  • Learned about shape files (SHP) and mapnik to generate locator maps for countries.
  • Used CLJS on node to generate the maps (node-mapnik). Lots of fun. (Example below)
  • Learned about ogr2ogr to edit shapefiles. Rendering around the antimeridian (eg Fiji islands) (180,-180) is tough.
  • Writing ansible in CLJ and generating playbooks on the fly and just shelling out to ansible is great. I can use the REPL to quickly iterate and develop my playbooks.

!


#4

I had my first real-world experiences with tools.deps and clj. I’m quite liking where this is going.

I spend quite some time in the ClojureScript compiler source this week, trying to understand problems with out CLJS tooling, especially regarding how various types of dependencies are handled. It was equal parts educational and confusing.


#5

do you have an example of writing Ansible playbooks with Clojure? Sounds pretty interesting!


#6

@plexus I just dumped this: https://gist.github.com/rauhs/a72cfbeef4c80f9a58480484c49e7a51

Note, the core is only 180 LOC, but it’s kept “functional”, i.e. all is passed by arguments. First thing would be create two wrapper functions (ansible*, ansible-playbook*) as shown in the example.


#7

I forgot to mention I also learned several things about running a Discourse instance:

  • how to create and install plugins
  • how to schedule posts for future publishing
  • how to set up a poll
  • how to enable let’s encrypt
  • how to reduce downtime when upgrading (this means splitting the docker container into two, which I haven’t done yet)

#8

Thanks for the hard work! As someone who grew up on web forums it’s so great to see someone provide a more bulletin-board-like community for clojure :slight_smile:


#9

After years of skepticism about “Literate Programming” I decided to try it out for a new project I’m just starting. So far it’s working well and has led me to contribute to Marginalia (two PRs around how nested comments are handled). Being able to write a narrative directly in the source file and then publish it as an annotated HTML page for my team to review and provide feedback at this early stage has been very helpful.

Where the workflow still has some rough edges for me is getting into a flow where I can turn aspects of the narrative into tests as well as code!


#10

I learned how to edit hunks when staging changes in Git using git add --patch. — feeling accomplished —


#11

The best day I ever had as a library maintainer was when Sean became interested in Marginalia


#12

I learned that edn/read-string and some regular expressions are a great way to coerce strings into other values.


#13