Showing posts from October 30, 2011

brain hat


emacs math symbol input mode, v1.3.2

New major version of math symbol input mode is out, at v1.3.2.Feature additions:Added support of input using unicode names. For example: greek small letter alphaAdded support of input using decimal forms, for examples: {955, #955} or hexadimal forms {x3bb, #x3bb}. XML entities forms such as {λ, λ, alpha} are still supported.Added about 5 more subscript symbols, e.g. {ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ}. Their abbrev start with “_”.When no valid input are found, list of valid abbrevs shows in a separate pane.Buy it at: Emacs Unicode Math Symbols Input Mode (xmsi-mode).If you have bought this package before, just email me with subject line “xmsi-mode update”, then i'll email it to you. Your support is much appreciated.

Emacs Lisp Exercise: insert-random-uuid

This week's exercise is to write a function “insert-random-uuid”. When called, it should insert a UUID. Here's some examples of UUID: 0a1cd3bc-96fa-71d1-4338-27092ca4cfa5 1e27a053-60a4-af61-f38d-9f1f123740d6 115024d2-7c74-326e-c9ec-064f42d08b31 070f1f0b-2454-3ffa-4aa2-d6e0652d03fe basically, it's a random string of symbols 0 to 9 and a to f, arranged in 8-4-4-4-12 blocks. There are many ways to implement this. I'll post a solution in a couple of days.If you really don't know elisp, this weekend is a good time to learn as any. This article might get you started: Emacs Lisp Basics.2011-11-08 solution at

Emacs Lisp Programing: Beware of Region Boundary Change

Perm URL with updates: stung by region in emacs, wasted about 4 hours. Here's what i learned.Whenever you work in a region, remember that the boundaries of the text that you are interested is changed when you add or remove text in that region. For example, suppose p1 and p2 is the boundary of some text you are interested. After doing some change there, suppose you want to do some more change. Don't just call (something-region p1 p2) again, because p2 is no longer the correct boundary.Use save-restriction and narrow-to-region, like this: (save-restriction (narrow-to-region pos1 pos2) (something1-region (point-min) (point-max)) (something2-region (point-min) (point-max)) … ) Last week, i updated the article Emacs Lisp: Syntax Color Source Code in HTML and re-implemented several of my personal commands, and today found that it behaved incorrectly: it deleted text outside of a region!Here's a funct…

Unicode Symbols for Space

Here's some unicode chars to represent Space:CharUnicode NameCode PointComment·MIDDLE DOTU+00B7Useful when you want to show space as visible chars␣OPEN BOXU+2423Useful when indicating keystrokes␠SYMBOL FOR SPACEU+2420Useful in programing contexts. This usually indicates the ASCII 32.␢BLANK SYMBOLU+2422For more proper symbols to represent tabs, return, cursor pointer, …, in contexts of keyboard input, keyboard key symbol, visible glyph in text, programing character set, etc, see:Computing Symbols in UnicodeHow To Use And Setup Emacs's whitespace-modeA Short Survey Of Keyboard Shortcut NotationsEmacs's Key Notations Explained (/r, ^M, C-m, RET, <return>, M-, meta)

Klein Bottle Opener by Bathsheba

klein bottle opener.These are made by Bathsheba. You can buy it on her site, at: bottle is a exotic math surface that has only one side. That is, a ant crawling on the surface can get to the other side without crossing any edge. (the natural space of Klein bottle is 4th dimension. In 3-dimension, as in the picture, the ant would have to pass wall. For more about Klein bottle and a app for interactive rotation, see: Klein Bottle.)Note: Bathsheba has also been creativen in Second Life.Flying Ammonite in Second Life by Bathsheba.She has also made a Seaslug Ride. To see more pics of her Second Life creation and location to buy, see: Seaslug RideFlying Ammonite.

tip for geeks: seeing an attractive girl

Today's tip for geeks.Q: What to do when you see an attractive girl?A: Rush out of sight quietly.

a Choker Romance

“Cloisonne Enamel Choker” Source etsy.coma Choker Romance

Samba's New Logo

Samba's old logo.Samba's new logo, 2011-05The old logo is a much better design. It got spunk. The new is boring and lame.For collection of logos of software, see: Logo Design & Software Industry.A Lambda Logo TourThe Purpose of Logos and Principles of Logo DesignThe Unix Pestilence: Tools and Software

emacs align and sort solutions

Emacs: solutions for last week's align and sort problem. See: thanks to Jon Snader and “jm” for the excellent solutions.

feminism = modern scumbag

post removed because it might violate Google's ad program policy. See here instead: 〈Xah's Sex Blog〉

never date a girl who wears a choker

Have you heard this ghost story? The guy met a ravishingly beautiful girl, slept with her, then next day, waking up, she's not moving. When he unclasped the band-styled necklace she's wearing, her head rolled off on the floor?Moral: never date a girl who wears a chocker.The Adventure of the German Student by Washington Irving, 1824.and, check out on Google Map the places where the public execution by guillotine was.PS is there a name for the style of necklace that covers around the neck? Collar-styled necklace?am looking for the correct word, e.g. the term used among necklace merchants, fashion critics, or among Haute Couture community.For this Halloween, thou shall read horror! My other favorite is: The Masque of the Red Death , by Edgar Allan Poe, 1842.Remember to have a dictionary installed in your browser so you can lookup words freely. See: Online English Dictionary Tools.

Math: ID System, Number Base vs Number of Digits


Emacs Golf: Align and Sort

Perm url with updates: Aligning Text and Sorting by Fields, 2011-11-02This page shows a practical example of using {“align-regex”, “sort-regexp-fields”, “sort-columns”}.Problem DescriptionSo today i was trying to understand the sizes of hectare and km². I got this list: California 423,970 km² Taiwan 36,008 km² Japan 377,944 km² Germany 357,021 km² Iraq 438,317 km² Iran 1,648,195 km² Korea (North+South) 219,140 km² Mexico 1,964,375 km² but i want it to be in this form: Taiwan 36,008 km² Korea (North+South) 219,140 km² Japan 377,944 km² Germany 357,021 km² California 423,970 km² Iraq 438,317 km² Iran 1,648,195 km² Mexico 1,964,375 km² How would you do it? I do not have a solution.Recently, Jon Snader (jcs), Mickey Petersen, Tim Visher are all doing emacs golf. It's interesting. Their blogs are:Tim Visher's videos (…

Emacs Bug: “isearch-forward” Doesn't Respect New Value of “case-fold-search” When Repeating Last Search

Steps to reproduce:Start emacs 23.2 (emacs -Q)Create a file with this content: “myList”.Call “toggle-case-fold-search” until it is disabled.Call “isearch-forward” 【Ctrl+s】 and search for “mylist”.Emacs won't find it. This is expected.Now, call “toggle-case-fold-search” so it is enabled.Press 【Ctrl+s】 twice to search “mylist” again.Expected behavior is for emacs to find the word “myList”, but it doesn't. Calling “isearch-forward” and typing the word “mylist” again works.

emacs lisp tutorial updates

Several updates:Updated and added a example of “read-from-minibuffer” at Emacs Lisp Idioms (for writing interactive commands).Major rewrite: Emacs Lisp: Syntax Color Source Code in HTML.