Posts

Showing posts from December 12, 2010

Wikileak Rap News

Image
Perm url with updates: http://xahlee.org/funny/wikileak_rapnews.htmlWikileak Rap NewsXah Lee, 2010-12-18Great video satire.〈Rap News 6 - Wikileaks' Cablegate: the truth is out there〉 See: Wikileak: US Diplomatic Cables Leak. Google Ice Cream; Can Google Be Trusted?Sexual ConsentVideo Piracy Funny Video Was this page useful? If so, please do donate $3, thank you donors!

emacs html6 mode

Perm url with updates: http://xahlee.org/emacs/elisp_html6-mode.htmlEmacs Lisp: html6-modeXah Lee, 2010-12-18, 2011-05-16This page shows a very simple exmple of writing a major mode for emacs.I suprised myself. In about 10 minutes, i whipped up a html6 mode. lol.Here's the html 6 spec: HTML6: Your JSON and SXML Simplified.Here's html6 mode source code:;;-*- coding: utf-8 -*- ;; xah-html6-mode.el -- Major mode for editing html6. ;; http://xahlee.org/comp/html6.html ;;; HISTORY ;; version 0.1, 2010-12-17 (setq xah-html6-keywords '(("〔\\([^ ]+?\\) " . (1 font-lock-function-name-face)) ("「\\([^ ]+?\\) " . (1 font-lock-variable-name-face)) ("“\\([^ ]+?\\)”" . (1 font-lock-string-face)) ) ) (define-derived-modexah-html6-mode fundamental-mode (setq font-lock-defaults '(xah-html6-keywords)) (setq mode-name "HTML6") ) (provide 'html6) Here's how it colors: 〔?xml 「version “1.0” encoding “utf-8”」…

Using Unicode in HTML Attributes

Perm url with updates: http://xahlee.org/js/unicode_in_html_attributes.htmlUsing Unicode in HTML AttributesXah Lee, 2010-12-18, 2011-01-23Discovered that you can use unicode in your html tag attribute values. Here's a sample html: <html> <head> <title>Unicode in HTML Tag Attributes</title> <style> p.α {color:red} </style> </head> <body> <pclass="α">yay!</p> </body> </html> In the above, notice the greek alpha α character, used as attribute value.Here's the page you can see the above source code rendered: Sample Page of Unicode in HTML Tag Attributes.This works in all latest versions of Firefox, Internet Explorer 8, Google Chrome, Safari, Opera, on Windows. (as of 2010-12)You can use any other unicode, including various bullets symbols, math symbols. For a sample list of unicode chars, see: Sample Unicode Characters.If you use emacs, you can enter unicode chars easily. See: Emacs Math Symbols In…

Google Webfont

Perm url with updates: http://xahlee.org/js/Google_webfont.htmlGoogle Webfont TutorialXah Lee, 2010-12-16Recently, discovered that Google has a webfonts project, at code.google.com/webfonts.For web authors, it is probably the most easy way to use a font and have your readers see the same font, regardless what browser they are using.How to use Google WebfontIt's very easy to use, and does not require extra knowledge. Here's a example html: <html> <head> <title>sample page</title> <linkrel="stylesheet"type="text/css"href="http://fonts.googleapis.com/css?family=Geo"> <style> body {font-family: "Geo", serif} </style> </head> <body> <p>Once upon a time... there's a movie called Tron.</p> </body> </html> You can see the above html rendered here: Google Webfont Sample Page.No special syntax or knowledge is required. All you need to do is to include a style sheet…

linotype machine, book binding, technologies

Image
Perm url with updates: http://xahlee.org/comp/book_printing_binding_tech.htmlLinotype Machine, Typesetting, Book Binding TechXah Lee, 2010-12-17A fantastic video.〈Pictorial Webster's: Inspiration to Completion〉 (2009) by John Carrera All my life, i've been interested in symbols. I recall, in 1980s, in the back of big dictinories, there's a appendix of list of symbols and their nams, group into category of fields. e.g. punctuations, printer's symbols, astronomy, math, geometry, chemistry, survey, etc. In the past 20 years, the interest has expanded into typesetting, fonts, TeX, syntax and notation systems, etc. These are all related. Symbols are needed for written communication, and in math and comp lang, they are tied to notation and syntax. When printed, it relates to printing technologies, Typesetting, font. In our digital publishing era, most of these have moved to the desktop computer with associated new techs, such as keyboard, input method systems (e.g. chinese in…

Computing Symbols in Unicode

Image
Perm url with updates: http://xahlee.org/comp/unicode_computing_symbols.htmlComputing Symbols in UnicodeXah Lee, 2010-09-03, 2010-12-15This pages collects unicode characters that are related to computing. For example, symbols for keyboard keys, symbols to represent line returns, enter, paragraph, file, window, cursor, etc. Arrow keys ↑ ↓ ← → ◀ ▶ ▲ ▼ ◁ ▷ △ ▽ ⇦ ⇨ ⇧ ⇩ ⬅ ⬆ ⬇; More arrows ↔ ↕ ↖ ↗ ↘ ↙ ↮ ⬄ ⇳ ⬀ ⬁ ⬂ ⬃ ⬈ ⬉ ⬊ ⬋ ⬌ ⬍ ☞ ☜ ☝ ☟; (More at Arrows in Unicode.) Return, Enter ↵ ↩ ⏎ ⌤; Tabs ⇄ ⇤ ⇥ ↹; Esc ; Delete, clear ⌫ ⌦ ⌧; Clear screen ; Home/End ↖ ↘; Page Up/Down key ⇞ ⇟; Modifier keys ⇧ ⇪ ‸ ⌘ ⌥ ⎇; (Sample usage: A Short Survey Of Keyboard Shortcut Notations) Cut ✂ ✄; Undo, redo ⎌ ↶ ↷ ↺ ↻; Reload, refresh ⟲ ⟳; Whitespace ▷ · ␢ ␣ ¶ §; Watch ; Hourglass ⌛ ⧗ ⧖; Cursor ⌖ ▮ ▯; I-beam ; prev/next Page ⎗ ⎘; Eject ; keyboard ; tape drive ; print ; mail ; write/comment ✍ ✎ ✏ ✐ ✑ ✒; home ; Misc icons ⌗ ⎆; checkmarks ✓ ✔ ✗ ✘ ☐ ☑ ☒ 𐄂 ⍻ ❍ ❏ ❐ ❑ ❒; Bullets •◦ ‣ □ ○ ◇ ■ ● ◆ ★ ☆ ♠♣♥♦…

What's Function, What's Operator?

Image
Perm url with updates: http://xahlee.org/math/function_and_operators.htmlWhat's Function, What's Operator?Xah Lee, 2010-12-14Typically, we understand what “function” and “operator” mean, but average programer or mathematician may have a hard time explaining them. Here, we clarify a bit on the meaning of the word “function” and “operator”, their context, their relation.Function Is a Mathematical ConceptFunction you probably understand. A function takes inputs, and produces a unique value/output for the given inputs. The inputs are called “parameters”. A specific set of input are called “arguments”. The number of parameters of a function is called the function's “arity”. So, for example, the function “sin” has arity 1. A constant, such as 35, π, can be considered as functions of no parameter, so they are functions of arity 0. A function of 2 parameters, such as 「define f(x,y) := x+y」, are arity 2.Function is a mathematical concept. Viewed in another way, it's a map from…

Logical Operators, Truth Table, Unicode

Image
Perm url with updates: http://xahlee.org/math/logical_operators.htmlLogical Operators, Truth Table, UnicodeXah Lee, 2010-12-14Added a bunch symbols to Emacs xmsi-mode for Math Symbols Input.⨯ ∮ ∲ ∳ ↦ ↤ ¬ ∧ ∨ ⊻ ⊽ ⊼ ⊻̅. Note that the 「⨯」 is for vector/matrix multiplication. Its unicode name is “VECTOR OR CROSS PRODUCT”. It is different from 「×」 (MULTIPLICATION SIGN). It appears, that by tradition, the vector cross sign should be rendered smaller than the normal multiplication sign. This is so in Mathematica and STIX font. Those integrals with circles are Contour integral (aka line integral, path integral). One of the symbol has a clockwise circle, the other anti-clockwise.Truth Table and Possible Logical OperatorsAlso, been working on adding full set of logical operators. Here's some interesting notes. The following is the definition for “and” and “or”. And 0 ⊕ 0 = 0 0 ⊕ 1 = 0 1 ⊕ 0 = 0 1 ⊕ 1 = 1 Or 0 ⊕ 0 = 0 0 ⊕ 1 = 1 1 ⊕ 0 = 1 1 ⊕ 1 = 1 Taking their results in a condensed wa…

astronomy symbols

Added a bunch symbols to Emacs xmsi-mode for Math Symbols Input.◀ ▶ ▲ ▼ ◁ ▷ △ ▽ ☉ ☼ ☾ ☽ ☿ ♁ ♄ ♅ ♆ ♇ ♃ ♂ ♀ ☄. The symbols includes the 9 planets. Note that the male sign ♂ and female sign ♀ is also Mars and Venus, and in Unicode, there's just one char for them.Also some interesting readings. See: Astronomical symbol.Also, discovered this article about the pseudo-science book Worlds in Collision, which was a best-seller in 1950s. But today's people probably all forgot about it. By analogy, you should know that many concepts, ideas, practices, we have today in math, sciences, in programing, are probably garbage. In particular, i could personal say this is so with regards to math notations, computer syntaxes, and many computing practices (e.g. Design Patterns, eXtreme Programing, which were hot in early 2000s but today pretty much waned. See: Why Software Suck) See also: Men Are From Mars, Women Are From Venus.Also added the del operator Nabla symbol ∇. The partial derivative sy…

Math Font, Unicode, Gothic Letters, Double Struck

Perm url with updates: http://xahlee.org/math/math_font_unicode.htmlMath Font, Unicode, Gothic Letters, Double StruckXah Lee, 2010-12-12This post is some thoughts and info about specially styled alphabets used in math, fonts, unicode.In math, there's these special styled letters:Double Struck: ℂ ℍ ℕ ℙ ℚ ℝ ℤ ⅆ ⅇ ⅈ ⅉGothic: ℭ ℑ ℌ ℜ ℨScripted ℬ ℰ ℱ ℋ ℐ ℒ ℳ ℘ ℛ ℯ ℓ ℊ ℴNote that the above does not contain the full alphabets A to z. The above chars are in Unicode' “Basic Multilingual Plane”. (BMP. Their unicode number can be expressed by 4 digits of hexadecimal. (See also: UNICODE Basics: What's Character Encoding, UTF-8, and All That?)) The full set of letters from A to z of these styles is also in unicode, but is outside of BMP, thus are currently not widely supported. (meaning, you'll need to install special math fonts to see them.) If you are using latest versions of browsers (as of 2010-12), all the above letter forms should show up correctly. In particular, Google Ch…

Emacs xmsi-mode for Math Symbols Input

Image
Perm url with updates: http://xahlee.org/emacs/xmsi-math-symbols-input.htmlEmacs xmsi-mode for Math Symbols InputXah Lee, 2010-12-08, 2010-12-12This is the home page for xmsi-mode 〔xmsi-math-symbols-input.el〕, a Emacs minor mode for inputing math symbols of Unicode characters.Usage and FeaturesCall “xmsi-mode” to turn the mode on. Call it again to turn off.Type “inf”, then press 【Shift+Space】, then it becomes “∞”. Here's some other popular symbols and their abbrevs:abbrevsymbolaαbβpπlλgγGΓsum∑prod∏c+⊕rt√and∧!=≠>=≥=>⇒->→e'ée`èe"ëe^ên~ñaoådsRℝ^2²_iᵢThe abbreviations are based on Mathematica's 【Esc abbrev Esc】, HTML/XML entity name, TeX/LaTeX's 「\symbolname」.Acting on Selected WordIf you have a text selection, then selected word will be taken as input. For example, type 「sin(a)」, select the “a”, then press 【Shift+Space】, then it becomse 「sin(α)」.Supported CharsTo see the full list of supported chars and their abbrevs, call “xmsi-list-math-symbols”.Here's…

Alexander McQueen, Haute Couture, How Absurdity Became High Art

Image
Perm url with updates: http://xahlee.org/Periodic_dosage_dir/Alexander_McQueen_Haute_Couture_suicide.htmlAlexander McQueen, Haute Couture, How Absurdity Became High ArtXah Lee, 2010-12-12Just learned today, that Alexander McQueen (1969-2010) killed himself, on 2010-02. Age 41. He's a well-known fashion designer with many international awards.〈Alexander McQueen Retrospective〉 About these Haute Couture fashion stuff... am not sure what to say. I want to say they are idotic. First of all, these “highart” fashions are irrelevant to everyday life and common people. They are catered to the rich and the show biz. That's something in clash with my lifestyle and thoughts.If i consider Haute Couture as a art form, that is, design clothings for the sake of design (without regards to function or comfort or practicality), and i look at the clothing of these catwalks, i find them rather lacking artistry. These elevated “designs”, in my opinion, are easy, almost trivial, and not beautiful. I…