Xah's Programing Blog Archive 2012-12

slightly updated: Concepts & Confusions of {Prefix, Infix, Postfix, Fully Nested} Notations. Also see comment at bottom of that page by David A Wheeler, who seems to have some success in introducing a alternative syntax to several Scheme Lisp implementations.

Ruby's Whitespace Issue

also, Ruby's whitespace issue is not so good. For example, this is is valid:

# -*- coding: utf-8 -*-
# ruby

def ff ; 4 end
p ff

How to explain that?

so far, what i see is just ad hoc. That is, there's no simple systemic rule. The key seems to be, that something (expression?) needs to end in semicolon, and semicolon can (often?) be omitted?

if so, but then if you look at the case def f; 4; end, then that syntax design doesn't seem to make sense, as “def f” isn't a complete clause.

see previous article: What Does it Means When a Programing Language Claims “Whitespace is Insignificant”?

new today. Python, Ruby, Perl: Defining A Function For the Ruby part, i still haven't fully grasped the yield/block thing. It should be part of that page, but currently not there.

Intro to Lisp's Symbol concept. Emacs Lisp Symbol.

a piece of history. Perl Sort Unstable

New for Ruby, updated for Python and Perl:

Added Ruby: Python, Ruby, Perl: Apply a Function to a List

Keyboard Shortcut Design: Repeatable vs Non-Repeatable Commands and Keys

updated: git Tutorial

been using git for several months now. Before was svn. (and cvs before)

can't say i find git better (except being one of the distributed RCS). Git's man pages are totally incomprehensible. The MD5 for commit id is a pain. You have to type much more, using more than one command, to do routine commit. Then the concept of staging/cache/index is confusing. (why can't they stick with one term? or is there actual technical difference?)

git being perhaps most popular has a lot to do with tie to Linus celebrity.

was mentioning git on g+, then James Salsman mentioned Bazaar.

Bazaar (software). Apparently, a few big companies are using Bazaar, including Launchpad, Ubuntu, MySQL, GNU Emacs.

Why Switch to Bazaar? By Canonical. @ doc.bazaar.canonical.com…

What Does it Means When a Programing Language Claims “Whitespace is Insignificant”?

Added Ruby: Python, Ruby, Perl: Loop Thru a List

Updated: Unicode in Ruby, Perl, Python, JavaScript, Java, Emacs Lisp, Mathematica

from this, you can see which language is better:

Perl Folks Try to Erase History!

updated: Unicode: W3C Proposed Icons {Image, Video, Sound File, Trash, Keyboard, Mouse, …}

New today: Python, Ruby, Perl: List/Array Tutorial.

in past 3 hours, added Ruby to my Perl+Python tutorial. Completed the following pages.

Comparative Study

Annoying Invisible ZERO WIDTH NO-BREAK SPACE Character from Google Plus, Twitter

Functional Programing: Make Dependent Functions Explicit

In functional programing, a function's behavior should depend only on its arguments. However, there's another issue that's been bugging me for over a decade. That is, there's no list of what other functions this function depends on. In the past i've tried to pass all functions it calls as parameters in the function definition, but that's crazy. I haven't heard this issue mentioned anywhere.

Haskell people, any thoughts?

Ubuntu Bug: 「pydoc modules」 Core Dump

updated: Keyboard Layouts Fight! Dvorak, Colemak, Workman, NEO, Bépo, …

updated. A efficient keyboard layout for Portuguese. pt-Nativo (Portuguese) Efficient Keyboard Layout.

Question to Readers: {Perl, Python, Ruby}, Together on One Page, or Separate?

I have a Perl & Python Tutorial. There, each page, has both languages for comparative study.

My question is, should i also put my new Ruby Tutorial there for comparative study? Or, should Ruby by itself?

I can actually also put {Emacs Lisp, PHP} there for comparative study too. But then each page will be long. Alternatively, if each language is on separate page, with inter-links, then people could page between any two languages.

Which way do you prefer?

updated a bit. Added tuple and explanation of Python sequence types. Python in One Day

when you start to learn a new tech, often there's a sea of info. All the confusing terminologies, tools, structures, and tens of tutorials compete to confuse you.

been reading Ruby+Rails for the past 10 days. Now i finally have a pretty good grasp.

lots updates to my tutorial in parallel. In pretty good shape for a start. Xah's Ruby Tutorial

separated into new page: Linux: sort Examples

minor update: git: Setting up GitHub, GitCafe, Google Code

software jargons and tech 2012: blackbox/whitebox testing, Jenkins, Puppet, Selenium

XML Syntax is Inferior Lisp Syntax?

updated: LISP Logo

alias l='ls -AlF --color --time-style=long-iso'

See also: Linux: Set Bash Shell Prompt to Color.

i think i start to dislike the rvm ruby installer. Because:

the whole shebang smells bad.

It appears to me, the whole rvm is a one-man's project, and somehow got very popular. Doesn't respect standard ways. Written in 30 years old tech.

Addendum: thanks to ruby rvm dev Michal Papis who helped me solve a problem. When installing rvm, be sure to read rvm requirements.

updated: Linux: Show Directory Size: du

updated: Unicode Full-Width Characters

A collection of software engineering pain. Complexity & Tedium of Software Engineering

Linux Problem: wmctrl, Documentation

worth reading again: Guy Steele on Parallel Programing: Get rid of cons!

When nobody kisses your ass, what you do?

You kiss your own.

The Contempt Page By Mr. Schnada. @ www.schnada.de…

The basis of computer languages' merit lies in their mathematical properties. It is this metric, that we should use as a guide for direction. As an analogy, we measure the quality of a hammer by scientific principles: ergonomics, material (weight, hardness. . .), construction, statistical analysis of accidents/productivity/… …etc., not by vogue or lore. If we go by feelings and preferences, hammer's future will deviate and perhaps become dildos or maces.

—Xah Lee in comp.lang.lisp, July 2000. the Measure of a Language

Perl's gluing ability goes beyond computation, to people. To the poor and have-nots. It unites people in the computing field who are not endowed with fancy engaging brains. It is the sanctuary of dunces. The expressions of those thoughtless. The godsend for brainless coders. The means and banner of sys admins. The lingua franca of trial-and-error hackers. The song and dance of stultified engineers.

—Xah Lee in comp.lang.lisp, December 2000. Perl's raison d'être

Archived at Xah Computer Programing Quotes

Learned Ruby in 2 days. Here's a draft version of tutorial. Ruby Language Basics

The next few days i'll be getting onto Ruby on Rails.

Ruby experts, please hit me with comment and suggestion.

blog comments powered by Disqus