Syntax = Most Important Aspect of a Programing Language
the quality of a programing language, can be judged by how much of it can be explained by its syntax alone.
with this criterion, the order are roughly: Mathematica ≻ PHP ≻ Lisp ≻ JavaScript ≻ Ruby? ≻ Perl ≻ Python ≻ Java.
this is also the most important criterion in judging a language.
If you have coded one of {Haskell, ML/OCaml/F#, erlang, Scala, Pascal/Ada, Lua, tcl, APL, SmallTalk, PostScript}, i'd be interested in your opinion on their placement in the above. (you should have coded in the lang for a few years)
I have always wondered about this. You know that retrieving a indexed item of array takes O(1) time. Why is that? You have n things, and you want the kth item. It should be O(k) for kth item. It is impossible to get it with O(1).
The answer can't explained in software or algorithm. It really have to do with how the hardware is implemented. This article explains: 〔Why is Indexing Faster Than Binary Search By Yin Wang. @ yinwang0.wordpress.com…〕
MERCURY ☿ VENUS ♀ EARTH ♁ ⊕ MARS ♂ JUPITER ♃ SATURN ♄ URANUS ♅ ⛢ NEPTUNE ♆ PLUTO ♇. Added some interesting notes about these symbols, see bottom. Unicode Ancient Astronomy Symbols ☿ ♆ 🌛 ♋ (you might need to refresh the page)
After 8 years, Python doc haven't improved much. There are complaints about Python doc about every year in Python mailing list, and Python doc wiki constantly crop up, but the Python priests always flame and turn it down.
learned a new linux command. man lsmod. It shows the status of Linux kernel modules. Basically pretty print 〔/proc/modules〕
lol. Perl added a say in v5.10 . It's like print but adds newline at the end. But you have to use v5.10; first. Quote from perldoc -f say.
say FILEHANDLE LIST
say FILEHANDLE
say LIST
say Just like "print", but implicitly appends a newline. "say LIST"
is simply an abbreviation for "{ local $\ = "\n"; print LIST }".
To use FILEHANDLE without a LIST to print the contents of $_ to
it, you must use a real filehandle like "FH", not an indirect
one like $fh.
This keyword is available only when the "say" feature is
enabled; see feature. Alternately, include a "use v5.10" or
later to the current scope.
these days, Perl monger remnants try to revive Perl from death bed, and talk about “modern perl”. LOL. the very name is funny. Am guessing the next step would be post-modern Perl? or should it be post-post-modern Perl?
learned a new Linux command: watch. ⁖ watch ls.
this is useful when you want to run some command regularly and itself doesn't have auto-update.
I don't know much about Operating System. I was just wondering whether or why the networking component is part of the kernel. Then, found this fantastic map. Linux Kernel Map.
ACCEPT means to let the packet through. DROP means to drop the packet on the floor.
Note that we drop it to the floor, not, river or lake, as Microsoft might.
Xah's Edu Corner of the Day
there are 2 types of firewalls. Complicated and Uncomplicated. Linux supports the uncomplicated type, called ufw, short for Uncomplicated Fire Wall. Type man ufw in terminal to read its doc.
the complicated type is related to the math concept of complex number.
PS this post is of import due to its affinity to the field of linguistics, category theory, the theory of archetype, and ontology.
⎈ Ctrl+x. HELM ⎈. Not sure where this is actually used, but on Linux charmap, there's a note that this symbol can be used to mean “control”. (haven't found out what's the source of the note. Might be from some annotation from ISO standard. Anyone knows?)
⎋ Esc. BROKEN CIRCLE WITH NORTHWEST ARROW ⎋. Standard escape symbol.
btw, when you plugin a Mac keyboard into PC, or PC keyboard into Mac, you'll notice that Mac's ⌥ Opt = PC's Alt, and ⌘ Cmd = ❖ Win. I always wondered if the keys send the same signal or perhaps it's the OS that's doing the remapping. Answer: The keys send the same signal. So, this means the keys are just difference in key label, and the physical positions are swapped.
learned a new linux command tree. It prints a dir in a visual tree format, similar to pstree. You have to install: sudo apt-get install tree. See also Linux: Most Frequently Used Shell Commands.
learned today that Apple's color font, is actually color font technology, not secondary step of replacing fonts by images. See screenshots here: Unicode: Food & Drink 🍕 🍎 🍒 🍷
Symbology
Unicode is such a beast. Y'know, it encompasses all written languages, including ancient dead ones. But that's not all. When you dig into Unicode symbols, you see the thousands of math symbols, printer's symbols, forgotten punctuations, ancient astronomy symbols…, some of which we use today but don't have any clue of their origin.
⁖ ☤ ☧ 卐 ☥ ☯ ⚸ ….
you might be curious, and started to read about what they are for. I started that way some 5 years ago. First due to my love with math symbols. After few years doing it casually, you realize, to really understand all the symbols, their origin, history, can take you few years to decades. Not even counting the alphabets of dead writing systems.
Unicode 6 added over 2k chars. 600 of them are emoticons, and many others are icons, pictographs. Unicode 6 came out in 2010, but there's still not that many fonts supporting all those pictogram. On Mac, it's most beautifully done. See screenshots at bottom of Unicode: Food & Drink 🍕 🍎 🍒 🍷. On Window, Microsoft came up with Segoe UI Symbol-12, in 2012, as part of Window update. On linux, nada, but you can download the free font Symbola, which is very high quality. See bottom here: Unicode 6 Emoticons and Supporting Fonts.
to install font on Ubuntu, just unzip it, and double click it should do.
all i ever needed to know about keyboard, i didn't learn in kindergarten. Three hundred fourty images of keyboards. Keyboard Image Index
JavaScript App for Unicode
wrote a JavaScript app. Goto
Unicode Emoticons, Faces 😸,
hover your mouse over (or click if you are on tablet). Unicode name and char number will show.