Notice I’ll use some specific terminology.
For full context check Ruby Central’s role, my role, and what officially happened.
Deploying a Phoenix app to Fly.io is a breeze...is what everyone kept telling me. In fairness, I imagine the process would have been breezier had I just used postgres, but all the sqlite and litestream talk has been far too intriguing to ignore. "Wait", you say. "It is just a flat file. How much harder can it be?"
It is easy to make something harder than it should be. It is hard to take something complex and make it truly simple. flyctl launch does an amazing job at providing a simple interface to the utterly complex task of generating deployment resources, especially now that we are living in a containerd (erm, firecracker) world.
This gist is for anyone who, like me, thinks they know better than to read all of the documentation and therefore necessari
| The `decode` function has been re-adapted from code provided by Moodstocks SAS and | |
| therefore the following license applies to it: | |
| Copyright (C) 2014 by Moodstocks SAS | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
It's relatively easy to scale out stateless web applications. You often only need a reverse proxy. But for those stateful web applications, especially those applications that embeds websocket services in them, it's always a pain to distribute them in a cluster. The traditional way is introducing some external services like Redis to handle pubsub, however, in such way, you often need to change your code. Can Erlang/Elixir, the "concurrency oriented programming languages", best other languages in this use case? Has Phoenix framework already integrated the solution of horizontally scaling websocket? I'll do an experiment to prove (or disprove) that.
| export default [ | |
| "Reticulating splines...", | |
| "Generating witty dialog...", | |
| "Swapping time and space...", | |
| "Spinning violently around the y-axis...", | |
| "Tokenizing real life...", | |
| "Bending the spoon...", | |
| "Filtering morale...", | |
| "Don't think of purple hippos...", | |
| "We need a new fuse...", |
| # You will need fswatch installed (available in homebrew and friends) | |
| # The command below will run tests and wait until fswatch writes something. | |
| # The --stale flag will only run stale entries, it requires Elixir v1.3. | |
| fswatch lib/ test/ | mix test --stale --listen-on-stdin |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
| require 'benchmark/ips' | |
| require 'allocation_stats' | |
| def access_slashed_string | |
| "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie " \ | |
| "elementum urna, a accumsan nunc euismod et. Aliquam porttitor, leo in " \ | |
| "aliquet aliquam, magna quam venenatis nulla, vel sagittis nisi nisi et " \ | |
| "nulla. Nulla quis facilisis turpis, vel blandit risus. Maecenas ut ante " \ | |
| "quis velit pretium pharetra ac rhoncus massa. Nulla quam dui, placerat " \ | |
| "eget quam vel, ultricies eleifend sem." |
| # There was a day where I have too many color schemes in iTerm2 and I want to remove them all. | |
| # iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one. | |
| # iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format | |
| # What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files. | |
| $ cd /tmp/ | |
| $ cp ~/Library/Preferences/com.googlecode.iterm2.plist . | |
| $ plutil -convert xml1 com.googlecode.iterm2.plist | |
| $ vi com.googlecode.iterm2.plist |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000