2018.07.29 Multiverse Timetravel Accounting

I've been doing a spot of accounting at work over the last few months. This is clearly a failure of delegation and management on my part, but it has led to at least one deep observation that I mightn't have had otherwise.

Accountants are secretly time travelers.

Perhaps that is a slight exaggeration. They don't ACTUALLY travel through time. But if you hang out with them a bit and observe their twisted time and verb conjugation ... well it's obvious that they would be right at home hopping around a branching multiverse.

For example, there we were at the end of June. Topic at hand: things that are going to happen in May, from the perspective of late April. Casual conversations include things like "If we put the new rule into place in late June, then when May hits we'll have to go all the way back to February to get the correct outcome". Mind bending! Daily conversation, without anyone blinking an eye.

Alternate timelines are discussed quite a bit also. They aren't quite stated this way, but basically they go along thinking in terms of events from timeline A, and then decide "No! Wait! We aren't in timeline A, we are in timeline B!!!!" and maybe freak out a little about how they now have to rewrite history to match the current reality or perhaps adjust the perception of the current reality to match the new history. Some of it even appears to be experimental, running simulations on previous events to try to see how it changes the present (well ... and the future).

One thing I'm glad of is the ethical standards to which time travelers.... er... accountants adhere. There is an ongoing insistence that no matter what timeline they find themselves in, they should reconcile with the past and ever move to a more obvious and simple future. Try not to change the facts of the past, but if you do please keep some integrity in the universe so it can have some degree of cohesion in the present.

Anyway. Take my advice. If you go adventuring around in your time machine, bring an accountant to keep track of what is going on.

Add Comment

2018.07.23 Link Roundup

  • Is Google Making Us Stupid?
    • I have a big stack of books that I've made ... fairly little progress on
    • Maybe the internet is eating my brain!
    • So now I will post links and bullets
  • Base-4 fractions in Telugu
    • Interesting explanation of the traditional Telugu fraction numbering. Also draws comparison to the traditional English measures
  • Git remote branches and Git's missing terminology
    • Presents a better understanding of git remote branches, highlighting that to really comprehend what's going on you must acknowledge the implicit local branch that is your cache of the upstream (such as origin/master)
    • I'm a little worried that I'm going to end up linking half of MJD's blog posts. Oh well, they are great. Example, /dev/null Follies has a hilarious nerdy punchline.

Add Comment

2018.02.05 OddMuse Wiki Dockerized

I Dockerized this website yesterday! I had already built a cpanfile that declares the Perl5 dependencies of OddMuse, which made it easy. I'm also going to run this with the data directory directly bind-mounted.

First the Dockerfile:

FROM perl:latest

# Set up the deploy user
ARG uid=1000
ARG gid=1000
RUN echo groupadd -g $gid deploy
RUN groupadd -g $gid deploy
RUN useradd --create-home -u $uid -g $gid -ms /bin/bash deploy


COPY cpanfile .
RUN cpanm -qn --installdeps .

USER deploy

The bit of fancyness here is the deploy user setup. Since I'm mounting the project directory for data files, I'd like new files and edits to be done by my normal user. On my cloud-server, this is uid 1000, which is easy to set as the default. On my laptop I run as user 1001, so the file is parameterized for this case. When I run locally, I have to build my docker image with `docker build --build-arg uid=$(id -u) --build-arg gid=$(id -g)`. Not as much fun.

Otherwise, this starts with the Perl5 base image and installs the CPAN dependencies.

Next, the docker-compose.yml

version: '3'


    build: .
    command: starman --workers=10 --max-requests=1 --access-log starman-access.log --error-log starman-error.log oddmuse.psgi
      - ".:/app"
      - "5000" # For running locally

    image: danieldent/nginx-ssl-proxy
    restart: always
      UPSTREAM: web:5000
      - "80:80"
      - "443:443"
      - "/etc/letsencrypt"
      - web

The first service runs Starman (this is similar to Unicorn for you Ruby folk). It mounts the project directory as /app, and runs oddmuse.psgi. We declare port 5000 anyway for local debugging -- we can then run only this service and it'll come up on a randomly assigned port that connects to port 5000. Other services on this network can connect to "web:5000" even without this declaration.

Which brings us to the second fancy bit. The danieldent/nginx-ssl-proxy image is a super cool image that gives an nginx proxy with automatic letsencrypt setup! You declare the domain name and the proxy destination (web:5000 is our Starman), and assuming that domain really is pointing here, it will work with letsencrypt to verify ownership and make certificates. The certs are stored in a docker-managed volume, and are periodically renewed. This takes less than a minute, so even if the volume gets accidentally deleted we can easily get a new cert.

Now running "docker-compose up -d" starts nginx and starman running in the background. All that remains is getting this running on boot. Since the startup command can be run over and over, worst case you can put it in a cronjob that runs frequently :)

Comments on TLT - 2018.02.05 - OddMuse Wiki Dockerized

1 Comment.

This is perfect timing for me !

I did something close with mine using apache a few months ago but I am not satisfied with it.
I run it onto my SAN Synology box.

See Oddmuse page for details on my recipe and see if we can make it better.

-- XavierMaillard 2018-05-10 07:57 UTC

Add Comment

2017.07.08 Lignting Talk on Rakudo Colons

I gave a lightning talk at The Perl Conference about my collection of Perl6 Colons. Looks like Geoff gave me 34 extra seconds... not sure that I approve :)


Add Comment

2017.05.21 Core Logic

There are many tools in my programming toolbox, but one that I've felt is missing is constraint and logic programming. I've done a spot of Prolog and played with some inference systems of various types ... but even when I run into something where I think it's the right hammer... I don't have a go-to tool.

I got The Reasoned Schemer a while back, hoping to use it to learn clojure's core.logic or similar, but the writing still KILLS me. Hate it so much. It is like the worst extreme sort of Socratic Method that I can imagine, literally everything has two columns of question and answer. But the QUESTIONS are obtuse! Working through it that way is not the sort of enlightenment that I'm going for ... I don't want to apply a unification algorithm on my understanding of logic programming with the contents of the book! The programming system might be "backwards" that way, but my way of learning isn't.

Anyway. One dumb thing that I had a hard time getting over was things ending in -o, like conso and emptyo. But tonight I had a breakthrough! See those 'o' things, according to the internets, are supposed to be sort of like question-marks except describing a goal. So now if I read the 'o' as '-objective' (as in, "goal") then they sound much better. cons-objective, empty-objective. Declaring the goal of the statement.

I guess I should go back and try reading The Reasoned Schemer with that in mind, and see if it makes me less angry :)

Add Comment


META INFORMATION: This is the technical blog and wiki of Brock Wilcox (awwaiid). Entries focus on my current projects, interests, and sometimes life events. If you'd like you can check out the list of All Entries or the RSS Feed. I also have a LiveJournal syndication feed for LJ friends.


Blog Blog RSS Feed







Toots (Mastodon)




Follow @awwaiid

Wiki Edits Wiki RSS Feed

... more changes