2014-11-20

clojure problem: string not in core

string manipulation is the most important element in modern programing. This is the first thing you teach to beginners, about any language.

But with clojrue, it's not core part of the language. You need to load it as a lib, or, go use Java's string stuff.

Try to tell that to beginner. You either face the immense complexity of clojure namespace , or the immense complexity of dealing with a entire complexity bag the interoperation with Java.

PS: actually, just prefix the namespace. ⁖ (clojure.string/upper-case "xyz").

2014-11-19

One Weird Annoyance About Clojure: Java

one annoying thing about Clojure is that it runs on Java Virtual Machine. Clojure is actually a so-called hosted language, and this is by spec. (and JavaScript is a hosted language too. 〔➤ JavaScript Tutorial: Understand JavaScript in Depth〕).

This practically means is that, Clojure isn't a “fixed” language. For example, when it's running on JVM, its regex is Java syntax, its string functions are Java language's string methods. When it runs in JavaScript world (as ClojureScript do), its regex is JavaScript's regex. 〔➤ JavaScript Regex Syntax

But, that's not all. The MOST annoying thing is that, you actually need to know a lot about stinking Java in order to do any real world work with Clojure. (don't let any hacker type fanatics tell you otherwise) You need to know Java class/object system, its package system, its namespace scheme, Java Virtual Machine system, its compilation cycle, its tools and achive files. Even the official Clojure documentation, outright simply say things like “returns a Java xyz object.” with no further explanation, in lots of places.

it is not to be taken lightly, that when you learn Clojure, you actally need to gradually understand a lot about Java ecosystem too.

but at least, thank god, it's a lisp that has industrial value, and is a Java replacement.

2014-11-18

show/edit zip file content in emacs

there's a patch for opening zip files in emacs. When opening a zip archive of a single file, emacs now can display its content (and you can edit it)

See: 〈bug#1702: [PATCH]: feature request: correctly display single file zip archive〉 at

It's going to be in emacs 25.x. Thanks to Matthew Leach for the patch.

2014-11-15

clojure parser instaparse, and excellency of clojure docs

A clojure parser lib, instaparse: https://github.com/Engelberg/instaparse, seems to be the topnotch parser. Instaparse is written by Mark Engelberg.

It has excellent tutorial too. Clear, to the point.

so far i've seen, clojure community's doc is top-notch. The official documentation is excellent. The lib/build manager Leiningen's documentation is excellent. 〔➤ Clojure Leiningen Tutorial〕And now the instaparse documentation is excellent.

it appears, a language's community pretty much follows the style of its leader. In this case, it's Rich Hickey. You can see Hickey's writings, his documentation style, in several essays titled “Reference Documentation” at http://clojure.org/documentation. They are, concise, to the point.

meanwhile, python's documentation are pretentious garbage, following Guido's style. Here's a typical one: Python, Lambda, Guido: is Language Design Just Solving Puzzles?.

and perl's drivels are derived from Larry Wall's drivel. Here's a sample: Perl Documentation: the Key to Perl

for much more, see programing doc idiocies collection

2014-10-23

most popular pages on xahlee.info

  1. JavaScript: Get Elements by ID, Tag, Name, Class, CSS Selector
  2. Unicode Arrows → ⇒ ⇄ ↑ ↩ ⤢ ↱ ↷ ↻ ► ☛
  3. The Idiocy of Happy Hacking Keyboard
  4. JavaScript Tutorial: Understanding JavaScript in Depth
  5. CSS: Line Wrap Tutorial
  6. Python: How to Read & Parse JSON
  7. Python: Get Dir Path, File Name Part, File Name Extension, Absolute Path, Check File Existence …
  8. Unicode: Keyboard Symbols ⌘ ⏎ ↹ ⌫ ❖ ⇞ ⇟
  9. Unicode: Brackets & Quotation «» 「」 【】 《》
  10. Truly Ergonomic Keyboard Review
  11. Computer Keyboards, Layouts, Hotkeys, Macros, RSI ⌨
  12. Visual Dictionary of Special Plane Curves
  13. Keyboards without Numeric Keypad
  14. Keyboard Layouts Fight! Dvorak, Colemak, Workman, NEO, B├ępo, …
  15. Simple & Useful AutoHotkey Scripts
  16. ∑ Xah Code
  17. Why LD_LIBRARY_PATH is bad
  18. List of HTML Self-Closing Tags
  19. Laptop Keyboards, No More Page Up/Down for You!
  20. Emoticons on Social Network: Facebook, Twitter, Sina Weibo
  21. HTML Framset Tutorial
  22. JavaScript: How to Change CSS
  23. HTML Frameset Index
  24. Unicode Characters ☢ ☯ ☭ ∑ ∞ ♀ ♂ ♥
  25. Difference Between Apple & PC keyboards
  26. HTML Frameset References
  27. HTML Split Windows; Frameset Example
  28. Geometry: Gallery of Surfaces
  29. Java Tutorial: The “extend” Keyword
  30. OCaml Tutorial by Example
  31. Ergonomic Keyboards Reviews: How to Chose a Ergonomic Keyboard
  32. Apple Computer Keyboards Gallery & Review
  33. Microsoft Natural Ergonomic Keyboard 4000 (review)
  34. AutoHotkey Key Syntax
  35. Pure CSS Table
  36. Mac OS X Resource Fork and Command Line Tips
  37. Equiangular Spiral
  38. Guide to Computer Keyboard Key Switch Mechanisms
  39. HTML Split Windows; Frameset Example
  40. JavaScript Floating Box Following Scroll
  41. Unicode Emoticons, Faces �� �� �� �� �� �� ��
  42. HTML Split Windows; Frameset Example
  43. http://xahlee.info/smart/ReportMain.htm
  44. Java Tutorial: The Power Function
  45. Ergodox Keyboard Review
  46. Using PowerShell to Manage Environment Variables
  47. Xah's Programing Blog
  48. Python: System Call Tutorial
  49. Great software for Tilings, Patterns, Symmetry
  50. Visual Dictionary of CSS

2014-10-22

where to download emacs 24.4 for Microsoft Windows

many are asking where to download emacs 24.4 for Microsoft Windows

you can get it here:

http://emacsbinw64.sourceforge.net/ prepared by Chris Zheng

also linked from my site here Which Emacs to Download for Windows and Mac?

2014-10-20

Truly Ergonomic Keyboard: new models

Truly Ergonomic Computer Keyboard-227 2014-10-20
Truly Ergonomic Keyboard

there's new model of the Truly Ergonomic Keyboard

they are switching from Cherry MX switch to Kailh keyboard switch. Kailh keyboard switch is just Cherry MX clones, made by a company in China. see http://deskthority.net/wiki/Kaihua_PG1511_series. I'm guessing it's not that much different from CHERRY MX.

looks like quite a few keyboards are using the Kailh switch. Supposedly, the Cherry MX has supply problems.

they also have some other minor changes. The ⇧ Shift key is now in conventional position. Ctrl is now at conventional keyboard's Caps Lock position. vim & emacs hackers overjoy! The HYPHEN-MINUS - and LOW LINE _ key are now in the middle, replacing the Tab ↹ there. The Tab ↹ is moved to the upper left corner. And upper right corner has a duplicated ⌫ Backspace key.

Overall, the key layout changes are now more conventional. People really don't wantto change habit. The new layout makes it easier for people to adopt.

2014-10-16

new monitor after 6 years

My monitor died this morning. The power won't come on. After some searching, i assume it's old or fried capicator problem.

VIZIO E241i-B1 tv monitor 2014
“VIZIO E241i-B1 24-Inch 1080p 60Hz Smart LED HDTV” amazon

as emergency measure, asked my roommate to drive me to Walmart and got this.

it's really a monitor designed for TV.

Vizio turned out to be a US company founded by Chinese in California in 2002, and it's popular for selling TV screens.

For me, it's a upgrade. My old served me good 6 years. It was LG L227WTG, 22″, 1680×1050. Not LED. 〔➤ Why I'm Switching from Mac to Windows

now it's 1920×1080 and 24″ and LED.

it's got what's called Smart TV

for my record, here's spec

VIZIO E241i-B1 monitor/tv Spec

Video

    Screen Size24″
    Screen Size (Diag.)23.54″
    Backlight TypeRazor LED
    Resolution1920×1080 (1080p)
    Effective Refresh Rate60 Hz
    Aspect Ratio16:9
    Viewable Angle (H/V)170°/160°
    Number of Colors16.7 Million
    OSD LanguageEnglish, Spanish, French

Audio

    Speakers/Power Output2W × 2
    DTS StudioSound™Yes
    DTS TruSurroundYes, HD
    DTS TruVolume™Yes

Inputs

    HDMI Ports1 (back)
    Component1 (back)
    Composite1 (back)
    Tuner1 (back)
    Ethernet1 (back)
    USB Ports1 (back)
    PC1 (back)

Outputs

    Analog Audio Out1 (back)

Multimedia Features

    VIA (VIZIO Internet Apps)Yes, VIZIO Internet Apps Plus®
    MusicYes
    PhotoYes
    VideoYes

Additional Features

    Built-in Wi-FiYes, 802.11b /g /n
    Remote ControlXRT112

Energy Savings
Energy Guide

    Energy ComplianceENERGY STAR® 6.0
    Power Consumption25.7W (Avg.)
    Standby Power Consumption<1W

Wall Mount Specifications

    Mount Pattern100mm × 100mm
    Screw SizeM4
    Screw Length10mm

Size and Weight

    Product with Stand Dimensions21.55″W × 14.55″H × 4.39″D
    Product with Stand Weight7.05 lbs
    Product without Stand Dimensions21.55″W × 13.80″H × 2.11″D
    Product without Stand Weight6.83 lbs
    Product Packaging Dimensions24.53″W × 16.38″H × 4.25″D
    Product Packaging Weight9.92 lbs

rule of conduct of a 4chan philosopher

in hacker discussion, there's one thing i despise the most. If you know something, say it loud, swear, insult, that's all fine. If you don't know something, but insist and put on a air, that is the MOST mfkg despicable in my book.

i often post random rants and stuff on computing in social networks. The seriousness of it is made plain in the writing style. When in discussion, you try to put on a air on something that you are idiotic of, be prepared for my wrath. (and btw, usually one has too go out of his way to invoke that. So, you don't need to worry.)

also, typically my posts are on programing topics but is not a technical issue that has a straight-forward answer. To illustrate, consider the question “how does y work in lang x”. Vast majority of coders knew this for some x. You and i can goto stackoverflow and get 100% satisfaction. But rather, i usually post subject about, syntax design, semantics, idioms, engineering practice. The discussion quality can be measured thru scientific methods. ⁖ knowledge of history of the subject, depth of logical analysis, or even creative writing. It is never “my experience is this and thus the world should be this” fuck. Example of such are fanatics of the Common Lisper macro is god fk, closure rules fk, array index should be 0 fk, gnu emacs keybinding fk, you must swap capslock/control fk, programing idioms fk.

twitter spambots talking to themselfs

twitter spambots chat 2014-10-16
looks like spam bots mentioning my name are talking to themselfs now, on twitter.

Web Spam, Scam, Blackhat SEO Collection