It’s what the nuns wear when they go swimming
[
Permalink]
Published by
davinci on
October 15, 2009 in
frivolous nonsense and languages and linguistics.
Tags: bhikkhunī, bhikṣuṇī, Buddhists, Chinese, nuns, Pali, Prakrit, Sanskrit, swimwear, 比丘尼.
I happened upon this passage in a book called The Chinese Language: Its History and Current Usage
by Daniel Kane, in a section on loanwords from Sanskrit:
In some words, only one part of the original has survived: the ní in 尼姑 nígū “Buddhist nun” is the last syllable of the Sanskrit bhikkini (sic)…
… » [Expand post]« [Collapse post] [Permalink]
Horizons: Exploring the Universe, by Michael A. Seeds
[
Permalink]
It’s been a while since I’ve made a post in the series “a life in books”.
This textbook
was a gift from Dr. John Percy, professor of astronomy at the University of Toronto. I did some research on Be stars with Dr. Percy while I was in high school, and I had expressed to him my interest in studying astronomy and astrophysics in university.… » [Expand post]« [Collapse post] [Permalink]
Programming exercise: permutations of a string
[
Permalink]
Published by
davinci on
October 8, 2009 in
programming and technical issues.
Tags: C++, characters, chars, comparison of programming languages, map, permutations, programming, programming exercises, Python, recursion, Scheme, strings.
The problem is to implement a function that outputs all possible permutations of the characters in a string. Unlike combinations, two permutations are considered distinct if they contain the same characters, but in a different order. Also, for the purposes of this exercise, each occurrence of a repeated character is considered to be a distinct character. That is, if the input is “aaa”, the output should be six repetitions of “aaa”. The permutations may be output in any order.
This exercise, like the previous one on combinations of a string, is from the book Programming Interviews Exposed
by John Mongan and Noah Suojanen\(\)… » [Expand post]« [Collapse post] [Permalink]
Programming exercise: combinations of a string
[
Permalink]
Published by
davinci on
October 7, 2009 in
programming and technical issues.
Tags: C++, characters, chars, combinations, comparison of programming languages, map, permutations, power set, programming, programming exercises, Python, recursion, Scheme, strings.
The problem is to implement a function that outputs all possible combinations of the characters in a string (with length ranging from one to the length of the string). Unlike permutations, two combinations are considered to be the same if they contain the same characters, but in a different order. Another way to define the problem is to find the power set of the characters of the string (excluding the empty set).
Like the previous exercise, this one is also from the book Programming Interviews Exposed
by John Mongan and Noah Suojanen\(\)… » [Expand post]« [Collapse post] [Permalink]
Programming exercise: maximum value in integer array, part 1
[
Permalink]
Published by
davinci on
September 30, 2009 in
programming and technical issues.
Tags: arrays, C++, Common Lisp. Scheme, comparison of programming languages, fold, int, integers, iteration, iterators, Java, Lisp, max, maximum, pointers, programming, programming exercises, Python, recursion, reduce, STL, tail recursion.
This exercise is just a little bit more substantial than the last one — but not by very much. Given an array of \(n\) non-negative integers, find the maximum value in the array, or return \(-1\) if the array is empty. Obviously, the use of any built-in maximum-finding function is forbidden. While the problem is almost trivial, it does illustrate how each language works with array or vector data types, as well as how it handles iteration.
This exercise, like some of the other ones that I will also be going through, is from the book Programming Interviews Exposed
by John Mongan and Noah Suojanen… » [Expand post]« [Collapse post] [Permalink]
Programming exercise: Hello, world!
[
Permalink]
Published by
davinci on
September 27, 2009 in
programming and technical issues.
Tags: bash, C++, comparison of programming languages, Haskell, Java, Lisp, Maple, Mathematica, Matlab, ML, Octave, Perl, programming, programming exercises, Prolog, Python, Ruby, Scheme.
As a preliminary exercise to jog my memory, here is the obligatory “Hello, world!” program in a variety of languages. On the one hand, the programs do nothing except output a string, and so don’t illustrate very much about the respective languages. On the other hand, the simplicity of the task does illustrate the difference between languages that allow you to begin coding right away versus those that require a considerable amount of setting up (importing libraries, declaring classes, etc.) before you even have a functioning program… » [Expand post]« [Collapse post] [Permalink]
Programming exercises and comparison of programming languages
[
Permalink]
I started programming when I was eight years old. The first programming language I learned was Basic, followed very shortly by C and 8086 assembly language. During elementary school, I was also exposed to Pascal and Logo. I ignored Pascal because it seemed to me that anything I could do in it I could already do with C, and although I had some fun with Logo’s turtle graphics, I didn’t take it very seriously. At the time, I didn’t appreciate its connection with Lisp and other “serious” programming languages… » [Expand post]« [Collapse post] [Permalink]
My nerd scores
[
Permalink]
Someone asked me to take the “nerd tests”, and these were my results… » [Expand post]« [Collapse post] [Permalink]
Fixing the site’s appearance in Internet Explorer
[
Permalink]
I just spent the day in the library, where I used Internet Explorer on a public terminal. I knew that IE did not render CSS properly, but until I tried to use this web site for several hours in IE, I had no idea how bad things were. I’ve hacked the CSS so that it displays reasonably well in IE now. I hope this didn’t mess things up for other browsers. Grr… » [Expand post]« [Collapse post] [Permalink]
Two popular books on fuzzy logic
[
Permalink]
These are two popular books on fuzzy logic: Bart Kosko’s Fuzzy Thinking: The New Science of Fuzzy Logic
, and Daniel McNeill and Paul Freiberger’s Fuzzy Logic
.
Fuzzy logic was pioneered by Dr. Lotfi Zadeh, whom I met when he gave a lecture at the University of Toronto… » [Expand post]« [Collapse post] [Permalink]