kronosapiens.github.io - From Scheme to Ruby









Search Preview

From Scheme to Ruby

kronosapiens.github.io
From the opening of Structure and Interpretation of Computer Programs, Chapter 4: “Metalinguistic Abstraction”:
.io > kronosapiens.github.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title From Scheme to Ruby
Text / HTML ratio 63 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud Scheme language tree Ruby fib programming function interpretation structure learn words Abacus fibonacci open treemap tools program data precision
Keywords consistency
Keyword Content Title Description Headings
Scheme 18
language 13
11
tree 6
Ruby 6
fib 6
Headings
H1 H2 H3 H4 H5 H6
2 1 0 0 0 0
Images We found 0 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
Scheme 18 0.90 %
language 13 0.65 %
11 0.55 %
tree 6 0.30 %
Ruby 6 0.30 %
fib 6 0.30 %
programming 5 0.25 %
function 5 0.25 %
interpretation 4 0.20 %
structure 4 0.20 %
learn 4 0.20 %
words 4 0.20 %
Abacus 3 0.15 %
fibonacci 3 0.15 %
open 3 0.15 %
treemap 3 0.15 %
tools 3 0.15 %
program 3 0.15 %
data 3 0.15 %
precision 3 0.15 %

SEO Keywords (Two Word)

Keyword Occurrence Density
of the 10 0.50 %
Scheme is 5 0.25 %
about the 4 0.20 %
to the 4 0.20 %
and the 4 0.20 %
in Scheme 4 0.20 %
the language 3 0.15 %
had to 3 0.15 %
We had 3 0.15 %
treemap f 3 0.15 %
to learn 3 0.15 %
with the 3 0.15 %
is the 3 0.15 %
language – 3 0.15 %
fib n 3 0.15 %
from the 3 0.15 %
is to 2 0.10 %
to build 2 0.10 %
Scheme was 2 0.10 %
to program 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
We had to 3 0.15 % No
and Interpretation of 2 0.10 % No
Interpretation of Computer 2 0.10 % No
abstracting away from 2 0.10 % No
had to learn 2 0.10 % No
1 fib n 2 0.10 % No
the structure and 2 0.10 % No
end of the 2 0.10 % No
Scheme is the 2 0.10 % No
the end of 2 0.10 % No
Abacus About From 1 0.05 % No
to invite carelessness 1 0.05 % No
seemed to invite 1 0.05 % No
Ruby seemed to 1 0.05 % No
of Ruby seemed 1 0.05 % No
nature of Ruby 1 0.05 % No
TMTOWTDI nature of 1 0.05 % No
the TMTOWTDI nature 1 0.05 % No
something the TMTOWTDI 1 0.05 % No
invite carelessness and 1 0.05 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
the end of the 2 0.10 % No
and Interpretation of Computer 2 0.10 % No
We had to learn 2 0.10 % No
Abacus About From Scheme 1 0.05 % No
Ruby seemed to invite 1 0.05 % No
of Ruby seemed to 1 0.05 % No
nature of Ruby seemed 1 0.05 % No
TMTOWTDI nature of Ruby 1 0.05 % No
something the TMTOWTDI nature 1 0.05 % No
the TMTOWTDI nature of 1 0.05 % No
to invite carelessness and 1 0.05 % No
do something the TMTOWTDI 1 0.05 % No
to do something the 1 0.05 % No
way to do something 1 0.05 % No
one way to do 1 0.05 % No
exactly one way to 1 0.05 % No
seemed to invite carelessness 1 0.05 % No
and ambiguity Closely duplicated 1 0.05 % No
invite carelessness and ambiguity 1 0.05 % No
carelessness and ambiguity Closely 1 0.05 % No

Internal links in - kronosapiens.github.io

About
About
Strange Loops and Blockchains
Strange Loops and Blockchains
Trie, Merkle, Patricia: A Blockchain Story
Trie, Merkle, Patricia: A Blockchain Story
Reputation Systems: Promise and Peril
Reputation Systems: Promise and Peril
The Future of Housing, in Three Parts
The Future of Housing, in Three Parts
Proof of Work vs Proof of Stake: a Mirror of History
Proof of Work vs Proof of Stake: a Mirror of History
Introducing Talmud
Introducing Talmud
The Economics of Urban Farming
The Economics of Urban Farming
Time and Authority
Time and Authority
On Meaning in Games
On Meaning in Games
Objective Functions in Machine Learning
Objective Functions in Machine Learning
A Basic Computing Curriculum
A Basic Computing Curriculum
The Problem of Information II
The Problem of Information II
The Problem of Information
The Problem of Information
Elements of Modern Computing
Elements of Modern Computing
Blockchain as Talmud
Blockchain as Talmud
Understanding Variational Inference
Understanding Variational Inference
OpsWorks, Flask, and Chef
OpsWorks, Flask, and Chef
On Learning Some Math
On Learning Some Math
Understanding Unix Permissions
Understanding Unix Permissions
30 Feet from Michael Bloomberg
30 Feet from Michael Bloomberg
The Academy: A Machine Learning Framework
The Academy: A Machine Learning Framework
Setting up a queue service: Django, RabbitMQ, Celery on AWS
Setting up a queue service: Django, RabbitMQ, Celery on AWS
Versioning and Orthogonality in an API
Versioning and Orthogonality in an API
Designing to be Subclassed
Designing to be Subclassed
Understanding Contexts in Flask
Understanding Contexts in Flask
Setting up Unit Tests with Flask, SQLAlchemy, and Postgres
Setting up Unit Tests with Flask, SQLAlchemy, and Postgres
Understanding Package Imports in Python
Understanding Package Imports in Python
Setting up Virtual Environments in Python
Setting up Virtual Environments in Python
Creating superfunctions in Python
Creating superfunctions in Python
Some Recent Adventures
Some Recent Adventures
Sorting in pandas
Sorting in pandas
Mimicking DCI through Integration Tests
Mimicking DCI through Integration Tests
From Ruby to Python
From Ruby to Python
Self-Focus vs. Collaboration in a Programming School
Self-Focus vs. Collaboration in a Programming School
Designing Software to Influence Behavior
Designing Software to Influence Behavior
Maintaining Octopress themes as git submodules
Maintaining Octopress themes as git submodules
Setting up a test suite with FactoryGirl and Faker
Setting up a test suite with FactoryGirl and Faker
To Unit Test or not to Unit Test
To Unit Test or not to Unit Test
A Dynamic and Generally Efficient Front-End Filtering Algorithm
A Dynamic and Generally Efficient Front-End Filtering Algorithm
Trails & Ways: A Look at Rails Routing
Trails & Ways: A Look at Rails Routing
Getting Cozy with rspec_helper
Getting Cozy with rspec_helper
Exploring the ActiveRecord Metaphor
Exploring the ActiveRecord Metaphor
Civic Hacking as Inspiration
Civic Hacking as Inspiration
From Scheme to Ruby
From Scheme to Ruby
Setting up Auto-Indent in Sublime Text 2
Setting up Auto-Indent in Sublime Text 2
hello world
hello world
via RSS
Abacus

Kronosapiens.github.io Spined HTML


From Scheme to Ruby AbacusWell-nighFrom Scheme to Ruby Feb 12, 2014 From the opening of Structure and Interpretation of Computer Programs, Chapter 4: “Metalinguistic Abstraction”: It’s in words that the magic is – Abracadabra,UnshutSesame, and the rest – but the magic words in one story aren’t magical in the next. The real magic is to understand which words work, and when, and for what; the trick is to learn the trick. And those words are made from the reports of our alphabet: a couple-dozen squiggles we can yank with the pen. This is the key! And the treasure, too, if we can only get our hands on it! It’s as if – as if the key to the treasure is the treasure! John Barth, Chimera Most people, when they start to program, pick a language that people unquestionably use. C. Java. Python. Ruby. Me? My first language was Scheme. A dialect of LISP, Scheme is a functional programming language – in which there are no objects, and every procedure begins with a function undeniability and ends with a return value. There are no “for” or “while” loops, and all higher functionality is achieved through clever applications of recursion and wiring cases. Consider the fib function, which returns the nth Fibonacci number: (define (fib n) (if (<= n 2) 1 (+ (fib (- n 1)) (fib (- n 2))))) Lines 2 and 3 represent the wiring specimen – the first two digits of the fib sequence, which are both 1. Line 4 contains the recursive calls – initiating two increasingly instances of the same fibonacci function, stuff tabbed on the two fibonacci numbers immediately preceding n. The function continues until each fib instance returns 1 (as they all must), and the 1s are all widow together, creating the nth fibonacci number. Scheme’s syntax is spartan – an unshut paren initiates a function  call, and the latter paren indicated the end of the arguments. Always. Functions were nested inside of functions, the return value of the latter rhadamanthine the treatise to the former. Data structures? Bah. We had to build them ourselves, abstracting yonder from our vital tools to create new techniques of working with information. Consider the Scheme implementation of “map” (a procedure so trappy I wrote a post well-nigh it): (define (tree-map f tree) (cond ((null? tree) null) ((pair? tree) (cons (tree-map f (car tree)) (tree-map f (cdr tree)))) (else (f tree)))) Scheme is the programming equivalent of whole wheat bran. Syntactic-sugar free. Why would anyone learn this language? Where the hell was I? Turns out, Scheme is the language of nomination in  Abelson and Sussman’s landmark computer science textbook Structure and Interpretation of Computer Programs. In their opinion (and in the opinion of my CS61A professor, Brian Harvey), Scheme is an optimal language for teaching programming  because it encourages (or, perhaps increasingly accurately, forces) students to think with precision well-nigh the structure (and interpretation) of their computer programs. Think with precision we did. Having to build everything from the simplest tools (arithmetic operators and some stone-hammer-caliber selectors), we ripened an iron grasp of the Scheme language. We had to learn our data structures backwards and forwards, considering exploiting the quirks in their underlying implementation was the only way we could get them to do anything interesting. Lists were implemented by daisy-chaining long links of pairs,  the second element consisting of nothing increasingly than a pointer to the first element of the second pair. We had to learn exactly how variable assignments flowed through various environmental scopes, and exactly how every weft would be interpreted. People laugh at Scheme these days, calling it obsolete (which it may be) and irrelevant – but it forced you to get really intimate with the interpreter, and to think nonflexible well-nigh structure. Near the end of the semester, we built a Scheme interpreter from scratch… in Scheme. That was a trip. In a sense, when you work in Scheme, the lines between programming and philosophy blur. Moving to Ruby has been a mixed blessing. At first, I had reservations well-nigh the language’s forgiving interpretation. Coming from a language where there was exactly one way to do something, the TMTOWTDI nature of Ruby seemed to invite wildness and ambiguity. Closely duplicated functionality? “Most likely” interpretation? Something well-nigh it unrecognizable me. As I’ve worked with the language more, though, I’ve come to revere the openness of the language, and the speed and power that the flexibility allows. Programming in Scheme was slow, considering we spent much of our time debugging syntax. Building so much from first principles meant that worthier projects involved substantially increasingly complexity, and were ultimately increasingly limited. In Ruby, you can just tinder forward, thinking less well-nigh the minutiae of interpretation, and focus increasingly on the big ideas that you’re trying to tint into substance. I may wax nostalgic well-nigh the precision and willpower of Scheme, but I would rather program in Ruby any day. Do I finger that my training in Scheme is serving me well? Absolutely. Unlike most of the programmers in that Berkeley classroom, I came in with zero experience. Scheme was my first language – my native language – and my tideway to program structure shows it, I think. I’m very attuned to the structure and policies of data types, am  curious well-nigh lower-level interpretation and algorithmic efficiency, and think often well-nigh strategies for breaking unshut logical problems. At the same time, I’m well-appointed abstracting yonder from primitive functions and thinking in terms of the interactions and relationships among larger constructs, and reflecting on things like the ontological stardom between “nil” and “undefined”. Whether these are traits cultivated by Scheme, though, or are simply the universal traits that distinguish programmers from the rest of society, is an unshut question. Shifting to a higher-level, object-oriented language is heady – I recognize unmistakably the advantages of these tools, given the zillions of processing power at our fingertips. Entering the world of programming and web development, there’s no where else I’d rather be. Part of me, though, will unchangingly have a soft spot for that high-minded, didactic, and elegant language: Scheme. Comments Please enable JavaScript to view the comments powered by Disqus. Abacus Abacus kronovet@gmail.com kronosapiens kronosapiens I'm Daniel Kronovet, a data scientist living in Tel Aviv.