Skip to content

Instantly share code, notes, and snippets.

@skiold
skiold / answer.md
Last active August 29, 2015 14:21 — forked from non/answer.md

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

mkdir download /tmp/installdir; cd download;
curl -LO http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xf Python-2.7.6.tgz
cd Python-2.7.6
yum -y install openssl-devel readline-devel bzip2-devel sqlite-devel zlib-devel ncurses-devel db4-devel expat-devel
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared --enable-ipv6
make -j2
make install DESTDIR=/tmp/installdir
echo '/sbin/ldconfig' > /tmp/installdir/run-ldconfig.sh
fpm -s dir -t rpm -n python27 -v 2.7.6 -C /tmp/installdir \
@skiold
skiold / gist:8010009
Created December 17, 2013 18:22 — forked from oremj/gist:388608
#!/bin/bash
#
# chkconfig: 35 68 38
# description: Starts celeryd
#
# @author Jeremy Orem <oremj@mozilla.com>
# @author Dave Dash <dd@mozilla.com>
#
DJANGO_PROJECT_DIR=/data/amo_python/www/preview/zamboni
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
echo ">>> Installing Base Items"
# Install base items
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
echo ">>> Installing Base Items"
# Install base items
@skiold
skiold / .vagrant.d_Vagrantfile
Created October 8, 2013 10:28
Vagrantfile for vagrant-aws using ami that depends on a ec2-user (fix requiretty in sudo)
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
aws.access_key_id = "#{ENV['AWS_ACCESS_KEY']}"
aws.secret_access_key = "#{ENV['AWS_SECRET_KEY']}"
aws.keypair_name = "your keypair id"
end
end
#
# Determines the absolute path to the running script. This is useful for
# needing to muck around in the running directory when the script has been
# called using a relative path
#
getScriptAbsolutePath() {
if [[ ${0:0:1} == '/' ]]; then
# If the script was called absolutely
absPath=${0}
else
@skiold
skiold / minimal.rb
Last active December 20, 2015 09:59
class MinimalExample < FPM::Cookery::Recipe
homepage 'https://gist.github.com/skiold/6112283'
section 'Utilities'
name 'minimal-example'
version '3.2.2'
description 'fail fast example'
revision 0
vendor 'fpm'
maintainer '<adrians@aptivate.org>'
@skiold
skiold / gist:5909653
Created July 2, 2013 14:14
notes on git, merging and workflows
# notes for a internal session on merging
* keep a helper copy of the repo around. Its cheap!
* pick files from a given copi using : git checkout branch_name -- path/to/file
* 'git diff --cached' to double check (eg unmerged files)
* 'git merge -s theirs/ours'
* 'git diff 4_stories_page...4_pagination '
## git config