I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.
Ousterhout's dichotomy claims that there are two general categories of programming languages:
;; Keybonds | |
(global-set-key [(hyper a)] 'mark-whole-buffer) | |
(global-set-key [(hyper v)] 'yank) | |
(global-set-key [(hyper c)] 'kill-ring-save) | |
(global-set-key [(hyper s)] 'save-buffer) | |
(global-set-key [(hyper l)] 'goto-line) | |
(global-set-key [(hyper w)] | |
(lambda () (interactive) (delete-window))) | |
(global-set-key [(hyper z)] 'undo) |
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
global start | |
section .text | |
start: | |
push dword msg.len | |
push dword msg | |
push dword 1 | |
mov eax, 4 |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |
http://abclive.abcnews.com/i/abc_live4@136330/master.m3u8 | |
http://mumsite.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Mastiii/Mastiii_800.m3u8 | |
http://jiotv.live.cdn.jio.com/Sony_BBC_Earth_HD/Sony_BBC_Earth_HD_TAB.m3u8 | |
http://hotstar.live.cdn.jio.com/Star_Plus_HD/Star_Plus_HD.m3u8 | |
http://hotstar.live.cdn.jio.com/Life_OK_HD/Life_OK_HD.m3u8 | |
http://jiotv.live.cdn.jio.com/Zindagi/Zindagi_TAB.m3u8 | |
http://hotstar.live.cdn.jio.com/Channel_V/Channel_V.m3u8 | |
http://jiotv.live.cdn.jio.com/DD_National/DD_National_TAB.m3u8 | |
http://mumsite.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Neo_Prime/Neo_Prime_800.m3u8 | |
http://smumcdnems03.cdnsrv.jio.com/jiotv.live.cdn.jio.com/Star_Sports_HD_1/Star_Sports_HD_1.m3u8 |
(ns bootcamp.factorial) | |
(defn fast-factorial [number] | |
(loop [n number factorial 1] | |
(if (zero? n) | |
factorial | |
(recur (- n 1) (* factorial n))))) | |
(defn fast-no-loop-factorial | |
([number] (fast-no-loop-factorial number 1)) |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
Using JavaScript libraries from ClojureScript involves two distinct concerns:
Right now, the only single tool that solves these probems reliably, optimally, and with minimal configuration is shadow-cljs
, and so that is what I favor. In paricular, shadow-cljs
lets you install npm modules using npm
or yarn
and uses the resulting package.json
to bundle external dependencies. Below I describe why, what alternatives there are, and what solutions I disfavor at this time.