# Wojtek Gawroński

Random thoughts from top of my head - afronski.pl

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## CloudFormation vs. Terraform

DevFeed: [CloudFormation vs. Terraform](<https://devfeed.tech/articles/cloudformation-vs-terraform-22365.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2017/04/11/terraform-vs-cloudformation.html>)

Author: Wojtek Gawroński (afronski)

Published: 2017-04-11T08:00:00Z

Content type: comparison

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Terraform](<https://devfeed.tech/topics/terraform.md>), [AWS CloudFormation](<https://devfeed.tech/topics/aws-cloudformation.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Infrastructure as code](<https://devfeed.tech/topics/infrastructure-as-code.md>), [vendor lock-in](<https://devfeed.tech/topics/vendor-lock-in.md>), [Disaster Recovery](<https://devfeed.tech/topics/disaster-recovery.md>)

Tags: [aws](<https://devfeed.tech/tags/aws.md>), [aws-cloudformation](<https://devfeed.tech/tags/aws-cloudformation.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [disaster-recovery](<https://devfeed.tech/tags/disaster-recovery.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [infrastructure-as-code](<https://devfeed.tech/tags/infrastructure-as-code.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [terraform](<https://devfeed.tech/tags/terraform.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [vendor-lock-in](<https://devfeed.tech/tags/vendor-lock-in.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This comparison examines Terraform and AWS CloudFormation for automating cloud infrastructure. The author explains the decision to use a pure CloudFormation setup, choose AWS, and drop Terraform, while discussing provider dependence, vendor lock-in, and disaster recovery considerations.

### Source excerpt

CloudFormation vs. Terraform. a There is a time when every project that uses a cloud computing service has a difficult choice to make - should we automate the infrastructure or not? Immediately after, another question pops up - how should we do it? Should we use a dedicated tool (AWS CloudFormation, Azure Resource Templates, OpenStack Heat or Google Cloud Deployment Manager) or a provider-agnostic solution? And then - immediately after a surprise comes in - at first glance, there is no other tool like Terraform available on the market (but there is - it is called Foreman :wink:). So we have a good tool, built by amazing people (HashiCorp) which does not rely on any particular cloud - problem solved? Not entirely. As a grown up, you know that like the ORM does not let you change database on the fly, Terraform will not let you automatically switch your cloud provider for your entire system. From the other hand - you fear vendor lock-in, and for sure you are considering how to design and prepare disaster recovery scenarios. A lot of unknowns, isn't it? I would like to show my rationale for a new project and infrastructure for which I, among others, was responsible. The motivation which drove us towards a pure CloudFormation setup, the reason behind our bet on AWS, and the motivation behind the decision to drop Terraform. Keep in mind that all remarks and comments pointed in this article are constructive criticism - it does not change my opinion about companies that created those tools at all. I have huge respect for both for AWS and HashiCorp - the work they have done, especially in tooling and cloud computing landscape is outstanding. As a user of AWS Services and HashiCorp tools I am grateful for the work they did. If you do not have experience with CloudFormation or Terraform - please read either amazing documentation or any other introductory article. I will assume your basic knowledge about these two. Terraform is not a silver bullet. When I evaluated Terraform, i

## How V8's compilation cache supports function inlining

DevFeed: [How V8's compilation cache supports function inlining](<https://devfeed.tech/articles/a-mythical-beast-called-jit-22364.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2016/04/08/a-mythical-beast-called-jit.html>)

Author: Wojtek Gawroński (afronski)

Published: 2016-04-08T17:45:00Z

Content type: article

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Compiler](<https://devfeed.tech/topics/compiler.md>), [V8](<https://devfeed.tech/topics/v8.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [JIT](<https://devfeed.tech/topics/jit.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [cache](<https://devfeed.tech/tags/cache.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [compilation](<https://devfeed.tech/tags/compilation.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [inlining](<https://devfeed.tech/tags/inlining.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [v8](<https://devfeed.tech/tags/v8.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This article explains why just-in-time compilation in V8 is difficult for JavaScript and discusses compilation caching as an optimization technique related to function inlining. It distinguishes compilation caches from inline caches.

### Source excerpt

A mythical beast called JIT I have recently bumped into one of those articles which title sounds rather like "one weird trick" ad. Guiding just from it, you can imagine how small amount of information is contained there, and by actually going through that link there you will definitely make sure that it has some knowledge, but no real explanations are in place. Of course, a final explanation is indeed really simple - Function.prototype.toString() returns everything even the comments inside the function body, size of that string is a feature that allows the optimizing compiler inside V8 to make a decision to inline that particular function or not. There is even a command line switch which to use to modify a limit and a default value. Simple enough? Not really. That article left a lot of unanswered questions. Probably because of that JIT compilers and its optimization techniques are kind of black magic. Why is it hard? Obviously compiler engineers are not dumb people (they are actually really smart) and they are not obfuscating and complicating this by accident or on purpose. They are working hard, especially with such weakly typed and underspecified languages like JavaScript to provide you an optimized version of your code. Why is it a hard job? It is all about guarantees. How many of them you can recall from memory when it comes to JavaScript? Not a lot of them, right? That is not good, especially from the perspective of a compiler engineer. JavaScript is everywhere, success of the internet spread this language, and nowadays success of Node.js pushed this language from front-end, even to server-side - and everywhere people are talking about performance. Obviously not about native like performance for scientific computations, but the more complexity is pushed to the application layer, the more of it will have to be optimized after all. That's why compilers and their creators have to be smart people - they have to deal with complexity of your applications and "illness

## Jenkins 2.0

DevFeed: [Jenkins 2.0](<https://devfeed.tech/articles/jenkins-2-0-22363.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2016/04/03/jenkins-2-0.html>)

Author: Wojtek Gawroński (afronski)

Published: 2016-04-03T15:30:00Z

Content type: release

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Jenkins](<https://devfeed.tech/topics/jenkins.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [automation](<https://devfeed.tech/tags/automation.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [compatibility](<https://devfeed.tech/tags/compatibility.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [jenkins](<https://devfeed.tech/tags/jenkins.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [release](<https://devfeed.tech/tags/release.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This article reviews the beta release of Jenkins 2.0, covering its improved user interface, built-in delivery pipelines with Jenkinsfile support, and stated backward compatibility with Jenkins 1.x. It notes that the current LTS version remained recommended for production deployments at the time.

### Source excerpt

Jenkins 2.0 Introduction Recently maintainers of Jenkins - the leading and most popular open source automation server - announced that long awaited version 2.0 is available to download and additionally it is marked as a beta release. It means that they're still recommending current LTS version for a production deployments, but new version is coming really soon. So let's look what it offers! What's new? Improved usability (aka "New UI") That is probably the most single awaited feature in Jenkins community. It means a lot for both, power users and newcomers. A lot of feedback was taken into account when preparing that feature. Old pages (e.g. Create Item or Job Configuration) look really clean and modern (we finally have tabs in Job Configuration page), new views like Pipeline Stage view (we will describe whole feature in the next section) look even more awesome: But that's not the end of goodies from that release. Delivery pipelines Finally Jenkins will be packaged with built-in delivery pipelines feature. It means that it will not require anymore plugins for doing that. It brings finally support for Jenkinsfile - concept which allows to codify your pipelines, and store it inside version control (either together with application source code or outside, in one of your supporting repositories). Besides that - finally no more XML fiddling when it comes to job configuration, because it will use a nice DSL: node { git url: 'https://github.com/joe_user/simple-maven-project-with-tests.git' def mvnHome = tool 'M3' sh "${mvnHome}/bin/mvn -B -Dmaven.test.failure.ignore verify" step([$class: 'ArtifactArchiver', artifacts: '**/target/*.jar', fingerprint: true]) step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) } That is a well known concept, similar to the job DSL plugin. But finally, it will be built-in and ready to use right after installation, without any additional effort. Full backward compatibility That is the most important thing

## Writing custom modules for Ansible

DevFeed: [Writing custom modules for Ansible](<https://devfeed.tech/articles/writing-custom-modules-for-ansible-22362.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2016/03/28/writing-custom-modules-for-ansible.html>)

Author: Wojtek Gawroński (afronski)

Published: 2016-03-28T19:00:00Z

Content type: tutorial

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Ansible](<https://devfeed.tech/topics/ansible.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Automation](<https://devfeed.tech/topics/automation.md>), [configuration-management](<https://devfeed.tech/topics/configuration-management.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [JSON](<https://devfeed.tech/topics/json.md>), [YAML](<https://devfeed.tech/topics/yaml.md>), [Scripting](<https://devfeed.tech/topics/scripting.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [automation](<https://devfeed.tech/tags/automation.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [code](<https://devfeed.tech/tags/code.md>), [commands](<https://devfeed.tech/tags/commands.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [configuration-management](<https://devfeed.tech/tags/configuration-management.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [json](<https://devfeed.tech/tags/json.md>), [modules](<https://devfeed.tech/tags/modules.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [programming](<https://devfeed.tech/tags/programming.md>), [scripting](<https://devfeed.tech/tags/scripting.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This tutorial explains Ansible modules, including their role in remote infrastructure management, YAML-based declarative configuration, dependencies on the provisioned machine, and JSON input/output requirements. It then introduces a case study for implementing a custom module in Erlang to process XML status pages.

### Source excerpt

Writing custom modules for Ansible Introduction What is Ansible and what is a module? If you are a big fan of automation, if you are focused on spreading and building software in line with DevOps culture, tools related with automation / configuration management like Chef or Ansible are probably well known to you. From the other hand that what differentiates those tools is a topic for a next blog post. Without diving into those differences, let's briefly zoom into details for those people which do not know what Ansible and modules are. Ansible is a free-software platform for configuring and managing machines. It combines deployment, ad-hoc tasks execution and configuration management. This tool uses YAML and declarative way of defining steps, which are modifying state of your fleet. Module is a single piece of those steps, a well defined way of executing certain tasks on the remote infrastructure. It executes commands, and communicates by outputting JSON to standard output - it means that it can be written in any programming or scripting language. Development Before we'll start actual implementation we need to know how it works underneath. Requirements If you want to write a custom module, we stated above that you have to be aware of two things. Your module code will be executed on the provisioned machine, so all dependencies which your module requires, have to be there. Second, your module communicates over specific input and output protocols. It uses certain syntax for sending input parameters (either sent as a stdin or a file) and JSON protocol which will be consumed as an output of the module. And nothing more - any other, non-JSON compliant output will be treated as an error, and would not be consumed by Ansible properly. Case Study We would like to consume XMLified status pages and do certain actions based on checked and exposed facts, scraped from aforementioned place. Because I like Erlang, I will use that language to implement that module. We will do it usin

## Maintaining a 500-Day GitHub Contribution Streak for Documentation and Habit Building

DevFeed: [Maintaining a 500-Day GitHub Contribution Streak for Documentation and Habit Building](<https://devfeed.tech/articles/500-shades-of-green-22361.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2016/02/17/500-shades-of-green.html>)

Author: Wojtek Gawroński (afronski)

Published: 2016-02-17T22:30:00Z

Content type: opinion

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [dotfiles](<https://devfeed.tech/topics/dotfiles.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [git](<https://devfeed.tech/tags/git.md>), [github](<https://devfeed.tech/tags/github.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [projects](<https://devfeed.tech/tags/projects.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

The author describes maintaining a 500-day GitHub contribution streak and explains that the practice supported personal documentation, disciplined commit history, workload planning, community activities, and open-source contributions. The article also notes that contribution histories can be artificially altered using separate repositories and rewritten dates, and that streak quantity does not measure programming quality.

### Source excerpt

500 shades of Green No, it is not fake. I did it - I have managed to have real streak which last 500 days in a row and document it on Github. But, you can do it in a different way - there are couple of projects which allows you to create arbitrary history of your contributions (it uses a separate repository for that and well - it cheats using ability of git to bend the time). One is here. :wink: No, it does not mean anything. I am not a better programmer than anyone else, definitely quantity does not involve quality (I will describe this in details below). No, it does not mean that I did not have proper holidays or that I have spent all my free time on that. Why did you do that? Mainly because of two reasons: documentation and creating habits. Many of the repositories like afronski/playground-notes, afronski/dotfiles or afronski/papers_i_love are pure and private documentation of my notes, publicly visible settings and observations with commit history. It also helped me when it comes to developing new habits: Taking care about commit history, proper commit messages, linear and nice history. Working with facilities like rebase, squash or fix-ups helped me a lot in daily job. Besides that some commits have attached story with explanation why I applied that change. It is sometimes priceless, because I can drop my mental overhead related to fear of forgetting something important. And when I hit the same wall again I can tackle it with certainty and exact solution. Example here. Also having a daily habit of delivering something valuable is crucial. It helps a lot when it comes to daily work, when it comes to planning the workload, actual steps to be done. It also helps regarding planning my weeks and during a lot of other related activities - like meet-up organization, building community around them or preparing real contributions to open source projects. Another point is related with developing other habits. It is easier to develop a new habit on top of existing foundat

## My year in review - 2015

DevFeed: [My year in review - 2015](<https://devfeed.tech/articles/my-year-in-review-2015-22360.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2015/12/31/my-year-in-review-2015.html>)

Author: Wojtek Gawroński (afronski)

Published: 2015-12-31T15:00:00Z

Content type: article

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Elixir](<https://devfeed.tech/topics/elixir.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [phoenix](<https://devfeed.tech/topics/phoenix.md>), [ClojureScript](<https://devfeed.tech/topics/clojurescript.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Node.js](<https://devfeed.tech/topics/node-js.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [C](<https://devfeed.tech/topics/c.md>), [Python](<https://devfeed.tech/topics/python.md>), [Ruby](<https://devfeed.tech/topics/ruby.md>)

Tags: [blog](<https://devfeed.tech/tags/blog.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [languages](<https://devfeed.tech/tags/languages.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>), [year-in-review](<https://devfeed.tech/tags/year-in-review.md>)

### AI overview

A personal review of 2015 covering talks, meetups, blog posts, books, programming languages, and plans for 2016. It highlights work involving microservices, Elixir, Phoenix, Node.js, Erlang, ClojureScript, and several other languages.

### Source excerpt

My year in review - 2015 Github Talks Nov 2015 - Evolution > Revolution - how should microservices be built? Sep 2015 - Elixir + Phoenix Jun 2015 - ZeroMQ in Node.js Apr 2015 - Erlang Ecosystem (PL) Feb 2015 - Elixir Feb 2015 - ClojureScript + Om = ♥ Details: My Talks Meetups Two meet-up groups created and continued in 2015: NodeSchool Silesia Silesian BEAMers Blog Most viewed blog posts by me Books List of book which I've read in 2015 and reading challenge. Favorite technical book of 2015 Pragmatic Thinking and Learning: Refactor Your Wetware - blog post about it Number of books read 20 Programming Favorite programming languages (or related) I've hacked on/with this year Languages with pet projects: Erlang #1, Erlang #2, Elixir #1, Elixir #2 ClojureScript Programming languages used for work-related projects this year JavaScript - ES 5 (Node.js, Front-End), JavaScript - ES6 (Front-End), Java, C, Ruby, Python, Bash Programming languages that I hope to explore next year Idris, Rust, Prolog Plans for 2016 Apply 100:10:1 rule to my open source work. Proceed with cost-benefit analysis and focus on monetization in terms of open source work. Try to kick-off another meet up in Silesia region - Papers We Love. Learning (even more than previously) about theory and how to design distributed and real-time systems. Focus on doing interactive blog posts and higher quality (premium?) materials. Push even harder work related with quality and visibility of blog posts. Take more time to discover new music. Happy New Year! :wink:

## Elixir's gen\_event Behavior and Its Event Manager and Handler Design

DevFeed: [Elixir's gen\_event Behavior and Its Event Manager and Handler Design](<https://devfeed.tech/articles/what-is-wrong-with-gen-event-22359.md>)

Original publisher: [Read original article](<http://www.afronski.pl/2015/11/02/what-is-wrong-with-gen-event.html>)

Author: Wojtek Gawroński (afronski)

Published: 2015-11-02T15:00:00Z

Content type: opinion

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Elixir](<https://devfeed.tech/topics/elixir.md>), [modules](<https://devfeed.tech/topics/modules.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Simulation](<https://devfeed.tech/topics/simulation.md>)

Tags: [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [console](<https://devfeed.tech/tags/console.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [elixir](<https://devfeed.tech/tags/elixir.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [handler](<https://devfeed.tech/tags/handler.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [module](<https://devfeed.tech/tags/module.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [process](<https://devfeed.tech/tags/process.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This article examines Elixir's gen_event behavior, explaining how event managers receive events and dispatch them to installed handler modules. It presents the design as a pattern the author considers problematic, while noting that the article dates from 2015 and that Elixir has changed since then.

### Source excerpt

Beware: this article is from 2015 and in Elixir world couple things changed a bit. Here you can find the updated version of this blog post. What is wrong with gen_event? I never used gen_event, I think it is a bad pattern. At first it may look like a controversial statement, but I heard a lot of those complaints from other people. Originally, I heard that exact statement during the presentation made by Garrett Smith about pattern language - someone asked about that behavior at the end. More recently I heard similar thing in José Valim's presentation about what will come next in Elixir. It confuses me every time I hear that, so I want to investigate topic more deeply. But before we will dive into reasons and explanations, let's recall what is the purpose of this behavior. What is gen_event? OTP introduces two different terms regarding that behavior - an event manager and event handler modules. Responsibility of event manager is being a named object which can receive events. An event can be, for example: an error, an alarm, or some information that is to be logged. Inside manager we can have 0, 1 or more event handlers installed. Responsibility of the handler is to process an event. When the event manager is notified about an event, it will be processed by all installed handlers. The easiest way to imagine that is to think about manager as a sink for incoming messages and handlers as different implementations which are writing messages to disk, database or terminal. Another example can be taken from my implementation of Francesco Cesarini's assignment called Wolves, Rabbits and Carrots simulation. Main purpose of that task is to introduce concurrency, but internally it is a simulation - so certain events are happening, and they will be broadcasted to the rest of entities. In that case simulation_event_stream is an event manager: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -module(simulation_event_stream). -export([ start_link/0, co

## SICP in Clojure - Chapter 5

DevFeed: [SICP in Clojure - Chapter 5](<https://devfeed.tech/articles/sicp-in-clojure-chapter-5-22368.md>)

Original publisher: [Read original article](<http://www.afronski.pl/sicp-in-clojure/2015/10/19/sicp-in-clojure-chapter-5.html>)

Author: Wojtek Gawroński (afronski)

Published: 2015-10-19T14:00:00Z

Content type: tutorial

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [gc](<https://devfeed.tech/tags/gc.md>), [hardware](<https://devfeed.tech/tags/hardware.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [languages](<https://devfeed.tech/tags/languages.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This blog post discusses Chapter 5 of Structure and Interpretation of Computer Programs through Clojure. It explains register machines, their data paths and controllers, and the relationship between hardware, Lisp-like languages, and compiler construction.

### Source excerpt

SICP in Clojure - Chapter 5 In one of the previous blog posts I have announced that I would like to start a new series of posts. It is a persistent journal from my journey through aforementioned book. I hope that you will enjoy it and find it useful - the main goal is to make this series a place where we can return in future, recall ideas and thoughts that accompanied reading process. Introduction We are heading to the end of the book. It is the last chapter, and in the previous blog post I have already mentioned that last two chapters are really specific. And that is true, especially in terms of 5th chapter's content. High-level Convenience Using high-level languages have many benefits. In terms of Clojure and other Lisp-like languages I would start with an automatic memory management and GC, various data structures or various optimizations, like tail-recursion etc. We do not think very often about how it is implemented, especially at the lowest level - in the hardware. Can you imagine how the hardware should look like, to be capable of running code written in programming language from Lisp family? This is the main topic of the last chapter. Authors are starting with basic theory related to register machines and ending with the recipe for building a compiler. This blog post will be mostly theoretical, and instead of code examples, and exercises related with a topic "How to build a Clojure compiler", we will take a peek under the hood, directly into the language implementation. But first, let's bring some definitions to the table. What is a register machine? Register machine is a type of a computer, which sequentially executes instructions. Those instructions are operating and modifying a set of a memory elements called registers. A typical operation will take operation arguments from registers, and it will push the result of that instruction to another register. When it comes to the designing of such machines, at first you need to create its data paths - which the

## SICP in Clojure - Chapter 4

DevFeed: [SICP in Clojure - Chapter 4](<https://devfeed.tech/articles/sicp-in-clojure-chapter-4-22367.md>)

Original publisher: [Read original article](<http://www.afronski.pl/sicp-in-clojure/2015/10/05/sicp-in-clojure-chapter-4.html>)

Author: Wojtek Gawroński (afronski)

Published: 2015-10-05T14:00:00Z

Content type: tutorial

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Code](<https://devfeed.tech/topics/code.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Programming language](<https://devfeed.tech/topics/programming-language.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [functional](<https://devfeed.tech/tags/functional.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [lisp](<https://devfeed.tech/tags/lisp.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [structure](<https://devfeed.tech/tags/structure.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

This chapter in a series on SICP in Clojure explains Lisp concepts including homoiconicity, metalinguistic abstraction, and metacircular evaluators. It describes how homoiconic languages represent program structure as data and introduces evaluators written in the language they interpret.

### Source excerpt

SICP in Clojure - Chapter 4 In one of the previous blog posts I have announced that I would like to start a new series of posts. It is a persistent journal from my journey through aforementioned book. I hope that you will enjoy it and find it useful - the main goal is to make this series a place where we can return in future, recall ideas and thoughts that accompanied reading process. Introduction By finishing the previous chapter we learned more about functional programming, designing and dealing with stateful computation and a little bit about laziness. It was pretty much a general purpose programming book till now. Last two chapters of the book are really ... Lispy. :wink: Chapter which will be discussed today is focused on Lisp core values built around universal evaluator, homoiconicity and linguistic abstractions. What is homoiconicity? Very concise, I would say a mathematical, definition will explain it as a isomorphic relation between language AST (Abstract Syntax Tree) and its syntax. In more human friendly words - it is a property of a programming language in which the program structure is similar to its syntax. If such language is homoiconic, it allows all code in the language to be accessed and transformed as data, using the same representation - because AST is exactly the same as the language itself. All languages from Lisp family have this property, also languages like Io, Julia or Prolog also have this ability (to a certain degree of course). Keep in mind that it does not mean that having a macros system in the language makes it homoiconic. Metalinguistic abstraction Title of this section sounds like a difficult concept, where the core idea is really simple. Aforementioned abstraction is an ability to create new languages. We have done that previously (e.g. by creating various Domain Specific Languages when solving exercises). By the creation, authors also mean ability to evaluate (or interpret) constructs written in that newly created dialect, by calcul

## SICP in Clojure - Chapter 3

DevFeed: [SICP in Clojure - Chapter 3](<https://devfeed.tech/articles/sicp-in-clojure-chapter-3-22366.md>)

Original publisher: [Read original article](<http://www.afronski.pl/sicp-in-clojure/2015/09/18/sicp-in-clojure-chapter-3.html>)

Author: Wojtek Gawroński (afronski)

Published: 2015-09-18T14:00:00Z

Content type: article

Language: en

Sources: [Wojtek Gawroński](<https://devfeed.tech/sources/wojtek-gawronski.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Lisp](<https://devfeed.tech/topics/lisp.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [beginners](<https://devfeed.tech/tags/beginners.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [canvas](<https://devfeed.tech/tags/canvas.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [css](<https://devfeed.tech/tags/css.md>), [css3](<https://devfeed.tech/tags/css3.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [design](<https://devfeed.tech/tags/design.md>), [erlang](<https://devfeed.tech/tags/erlang.md>), [functional](<https://devfeed.tech/tags/functional.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [html](<https://devfeed.tech/tags/html.md>), [html5](<https://devfeed.tech/tags/html5.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [learning](<https://devfeed.tech/tags/learning.md>), [mono](<https://devfeed.tech/tags/mono.md>), [net](<https://devfeed.tech/tags/net.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sicp](<https://devfeed.tech/tags/sicp.md>), [software-design](<https://devfeed.tech/tags/software-design.md>), [vagrant](<https://devfeed.tech/tags/vagrant.md>), [webgl](<https://devfeed.tech/tags/webgl.md>)

### AI overview

A journal-style discussion of studying SICP through Clojure, explaining how the book's treatment of software design, functional programming, modularity, and data structures can complement learning a Lisp-like language while requiring care with Scheme-specific concepts.

### Source excerpt

SICP in Clojure - Chapter 3 In one of the previous blog posts I have announced that I would like to start a new series of posts. It is a persistent journal from my journey through aforementioned book. I hope that you will enjoy it and find it useful - the main goal is to make this series a place where we can return in future, recall ideas and thoughts that accompanied reading process. Introduction In the previous blog post (which had surprisingly good reception on the Hacker News) we have analyzed second chapter of the book. We did not know, that around the corner there is a ground breaking "twist" prepared by the authors in the 3rd chapter. We will face it today. I should also mention that recently SICP Distilled went publicly, which is also a very good tour on the book, with a different approach. Nevertheless, I am still going my way through the book and I have got couple of interesting observations from the aforementioned chapter. But first, I would like to address one question which was posted on the Hacker News thread. Clojure is not a Scheme and SICP will not help you to learn Clojure Even if the first part is not debatable at all (how come one language could be identical to another one, even if they have common roots), then the second one is definitely dependent on the point of view. Mine is really obvious - Clojure is my first contact with a Lisp-like language. And book has much more to offer than a simple language course. I would say that a language course and SICP can be complementary. How? Basically (from my observations) aforementioned book is about good software design and how to approach functional programming and functional design in a dynamicly typed language. It attacks various problems like modularity, data structures, and many more. It provides a good foundation for beginners, and I strongly believe that it can be beneficial for more advanced programmers. By taking that book and completely new language, I am treating this book more like a referenc