2015-11-04

Gnu Emacs New Leader: John Wiegley

https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg00120.html

Wiegley as maintainer was discussed in the gnu emacs dev mailing list for the past couple of months, hundreds of messages.

John Wiegley is the author of eshell, among others, and he lives in emacs. 〔➤ Emacs: M-x eshell

Here's a couple of video interviews of John.

Emacs: Chatting with John Wiegley about the cool things he does with Emacs By Sacha Chua. @ http://sachachua.com/blog/2012/06/emacs-chatting-with-john-wiegley-about-the-cool-things-he-does-with-emacs/
Haskell Talks: John Wiegley with FP Complete

John is a extreme emacs enthusiast, and his primary platform is Mac with strong desire to make emacs better on Mac too out of the box, and he is a very capable programer, and also a sociable person. I think John will bring a lot good things to emacs. Thanks John.

2015-11-03

JavaScript wuwu quiz

// quiz. figure out what does this code do
// 2015-10-29

function foo() {
    var eleName = document.getElementById("x79177");
    alert(
        (function(le) {
            return function(f) {
                return f(f);
            } (function(f) {
                return le(
                    function(x) { return (f(f))(x); }
                );
            });
        }) (function (givenGetDepth) {
            return function (element) {
                return (element === null) ? 0 : givenGetDepth(element.parentNode) + 1;
            };
        }) (document.getElementById(eleName))

    );
};
foo();

2015-10-10

lisp macros, Racket define syntax rule and pattern matching

racket named lisp defmacro as define-syntax-rule. A step forward. Even better is “define-form-rule”, as lisp macro can't change syntax.

http://mirror.racket-lang.org/releases/6.2.1/doc/guide/pattern-macros.html

note that how it calls macros as pattern matching and or syntax transformation.

in my 20+ of computing career, the Common Lisp fanatics, are the most persistent idiotic bunch.

racket, now i've read most of its doc, clearly tried to fix many of Common lisp's bad persistent notions, and scheme too.

scheme lisp lot is a unfortunate sorry lot. Cult result is obsession with tail recursion, like haskell's monad. Going nowhere, forever.

the most idiotic feature in comp lang, is call-with-current-continuation of scheme fame. This, rivets scheme in lala-land forever.

http://mirror.racket-lang.org/releases/6.2.1/doc/compatibility/defmacro.html

2015-10-06

海賊王 One Piece Action Figures

This is spectacular. Colorful characters, interesting stories. Think of one Japan anime/magna (that's Japanese cartoon/comics/animation). Of all, this one, called One Piece, is the most successful, sold more, in history.

One Piece figures 007
海賊王 One Piece Action Figures

One Piece, is the title of the comics. It is a story of pirates. And, there's this guy, who spent hundred thousand dollars, and collected some thousands of action figures.

in USA, action figures are crude, typically for small kids. Not so in Japan. They are made of the highest quality, material, and detail, with whatever latest technology in plastics, molding, painting. Some are even custom made. Typically, a good one costs $80, up to $200 a piece.

Here's a gallery of the guy's collection. (only showing ones related to the One Piece series) 海賊王 One Piece (Japanese Comics) Action Figures

btw, the ones in this picture, you guessed, are the “bad guys”. The bad guys, are always more fun to look at.

2015-10-04

language popularity ranking sites

there's many language popularity ranking sites. The most well-known, is tiobe.

http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html

I think TIOBE index is stupid. Their approach is not good. Mostly because, they tried to be general, as if they know what “popularity” means.

another one, http://langpop.com/, is worse. And badly maintained.

the following is better, because they are specific on what they measure.

note: language popularity is a lose concept. Is it more talked about? is it more used? more used by companies or by loud amature programers? Is it more existing code? How do you count code? What about quality code, but are not public?

Google Puts All 9 Million Source Code Files in One Repo

The Motivation for a Monolithic Codebase Why Google Stores Billions of Lines

Published on Sep 14, 2015 This talk will outline the scale of Google’s codebase, describe Google’s custom-built monolithic source repository, and discuss the reasons behind choosing this model of source control management. It will include background on the systems and workflows used at Google that make managing and working productively with a large repository feasible, in addition to a discussion of the advantages and trade-offs of this approach.

Presenter: Rachel Potvin

Google Puts All 9 Million Source Code Files in One Repo. Its own custom source management system called piper.

for context, linux kernel has 15M lines. Google repo has 2G lines. Google human makes 15M lines of code change per week.

Rachel Potvin explains why. But, i'm rather not convinced. Are you?

2015-09-22

The world, is waiting for me to change. Actually, not me, you

found a new nice wireless number pad, with mechanical keys (Cherry Mx Black). See: List of Programable Keypads

this is good for those of you with a compact keyboard.

you can turn the numpad number keys into function keys. How to set Number Keypad as Function Keys {Windows, Linux, Mac}

or, within emacs. Emacs: Using Number Pad Keys

i know, lots programers don't like “leaving hand off homerow”. Actually, most don't know about how to use function keys. But trust me. It's good. Everything is just one key. Y'know, when you really type a lot, a lot a lot, the very idea, of the picture in your head of your hand touching keyboard while holding Control or Alt down, is PAINFUL. You shudder at that thought. You won't know this until one day it happened to you. Sure, you are young & healthy, now, i know. I Xah Lee, was, for almost all my life, the pretty, cocky, above you, competitive altheletic-level healthy. Till, one day, you are burdened or obsessed with documentation and write out everything.

ok, this is getting long and i feel like rant. I'll tell you, i read enough emacs blogs, emacs key use, for over 15 years now. Actually, about typing and about keyboard since late 1987. (there is one thing in my life i'm obsessed about, and that seems to be EFFICIENCY & design) But, read far more about them every day since about 2007 when i started on ErgoEmacs Keybinding: a Ergonomics Based Keyboard Shortcut System

I've red, all there is to say, all the blogs, the popular ones or obscure ones, about emacs keybinding. Red, all reviews of keyboards…. Now, here's my “trolling” comes in: They are all fscking garbage.

But, actually, in the past 5 years, a lot programers, got the sense now. Look at the ergodox, the keyboardio, the truely ergo, 〔➤ Best Keyboard for Emacs〕 huge number of them really well designed keyboard coming out, with wide following, sold out, and quite a few on kickstarter yet to come out.

now, in the keyboard community, you can see there are tens of thousands enthusiasts following these modern keyboards. Yet, there seems to be a separation of groups. On the one hand, you still have, huge number of folks, who, never looked at, or heard of, these new ones, and still cling to the idea of traditional PC keyboard, singing all sorts of praises about, say, Happy Hacking Keyboard or the IBM Model M keyboard.

then, i hear you say, but and but and blab…. Y'know, some things, concepts, habits, you grow up with, such as religion, programing language, or, keyboard, will never change. As Steve Jobs said, you just wait for those to die out. As i get older, and clearly, i am getting older, new life experiences comes in, telling me that i belong to the category of “old”, and i started to doubt myself, perhaps lots of my other thoughts about programing are rather too old to be good. (it is very hard to get over the “generation gap”, by the way. Because, the new generation, they start from scratch. They are simply a blank slate, don't know what's there even if they tried. While the older, need to actively take in changes and mix with what we already know. (not saying one is better in general, but just illustrating the generation gap thing as a inevitable social phenomenon.))

i've actually written, few hundreds articles about keyboard, keybinding. Suppose you are a emacs die-hard, you are a serious hacker type, you live on reddit or hacker news et al and have diligently absorbed all knowledge vicinity. Then, you might have doubts about what i say. Actually, everything you possibly ever thought of about keyboard, i've written detailed analysis and experimented painfully before.

well, i haven't ranted for a while. The world, is waiting for me to change. Actually, not me, you.

when i got Truly Ergonomic Keyboard Review 3 years ago, the first thing i really missed, is my 20 or so custom function keys.

2015-09-10

forking emacs

With all due respect, Richard, I really think here you're simply wrong, and I'd be willing to consider a fork if that's what it takes.

Stefan

rms getting told: Episode 0

see https://www.reddit.com/r/programming/comments/2rtumb/current_emacs_maintainer_disagrees_with_rms_id_be/

I support Stefan Monnier for forking emacs. It would be a good thing.

see also Richard Stallman: What's magit? Emacs Dev Condition 2015

2015-09-02

Emacs Keys: Make Return as Control

Bozhidar Batsov gave a tip about making your Return ↩ key to act as Ctrl, when it is held down with another key.

A Crazy Productivity Boost: Remap Return to Control By Bozhidar Batsov. @ http://emacsredux.com/blog/2013/11/12/a-crazy-productivity-boost-remap-return-to-control/

Note: there are several alternatives that are better.

  • Swap Ctrl and Alt, so the Ctrl is at your thumb position.
  • Remap all emacs keys so that there's no key chords.

The problem, with control on both sides of keyboard is that, sometimes you have a control sequence where the keys are on both sides of keyboard. For example:

C-x C-j         dired-jump
C-x C-l         downcase-region
C-x C-u         upcase-region
C-x C-n         set-goal-column
C-x C-o         delete-blank-lines
C-x C-p         mark-page

If you have control as a thumb key, then it's much easier to do such key combination.

The other suggestion, is just not to use chord keys at all. For detail, see Banish Key Chords.

Here's a list of packages that help you in some way of making emacs keys easier:

But, they all only solves the problem partially and in some hackish ad-hoc way.

For real solution, i recommend 2 things.

① get a good, modern, ergonomic keyboard. See: Best Keyboard for Emacs.

One of those keyboards pretty much solves all your problems, far better than remapping keys.

② In addition, or if you are stuck with laptop keyboard, i recommend the following 3 packages, which systematically change how you work with emacs.

For more about keybinding science, see: Computer Keyboard Layouts & Keybinding, Design & Analysis ⌨

2015-08-10

JavaScript and Wolfram Language: languages that are different from all others

of all the languages i know, { Java, Perl, PHP, Python, Ruby, JavaScript, Clojure, Emacs Lisp, Wolfram Language } , the one standing out are JavaScript, and Wolfram Language.

so i was riding the bike on the street, and it occurred to me, what an odd language JavaScript is. Then i thought, is it true, critically? The languages i know of floated in my head and i went over them. I conclude, the 2 really odd, standing out from the others, are JavaScript and Wolfram Language.

JavaScript because of its Prototype Inheritance system. Wolfram Language because of its symbolic pattern matching (term rewriting language)

2015-07-30

A Class of Computer Languages: Math Lang

canvas is scum. invented by scum. The likes of C, C++, OpenGL, etc, whose tenet is: hi, my name is speed. Ever since, programing is hell. 〔➤ HTML5 Canvas vs SVG

vast majority of programers, 99%, have no idea of mathematical language. Talking to them about lang debates, is like talking to idiots.

all these langs programers are familiar with,eg C C++ java python perl ruby golang even C# and even Haskell, are non-math languages.

in the other universe, is Mathematica, matlab, APL… (and i think julia), these, are math languages. (note: haskell is NOT.)

most of these industrial programers, since they've never seen a math lang in their life, cannot conceive some points in lang debates.

thus, debating them is like talking to stone. Even you see their points, but they don't see yours, after repetition.

typically, these folks revolve around concepts like reference, pointer, memory, certain “garbage collection”, and “hi, my name is speed.”

and other stuff they are found of are like: “threads”, “float, int, long, double”, some IEEE fuck stuff, OpenGL

and, of course, they prefer 0 based index.

these langs, are like greedy algorithms. They win at outset, but lose big time in the end. As far as efficiency and speed goes.

but, commercialism is on their side. Thus the rise of C, Unix, the grand danny of all things worst. Thus born Worse Is Better.

so, there's these langs, Wolfram lang, Matlab, APL, (R, Julia), not sure if there is a label that characterize them, other than “math”

“array langs” does not capture them, because eg they all don't have concepts of memory, ref, float/int. (given or take)

the distinguishing feature is that they have little to none implementation/hardware concepts. eg ref pointer memory, bytes, bits.

instead, they focus on programer's need to deal with data. programing. numbers, string, list, file. a specific aspect of “higher level” lang

on the other hand, Haskell is a bastard. Seems mathy, seems high-level, but, filled to the brim of computer engineering by-product stuff.

another term i think capture them is “application languages”. But, this term doesn't sound good. and people will start to think excel too.

recap: the group of langs am thinking of is: Wolfram Language, APL, R, Julia, Matlab, Prolog. (please add) possibly include bash, tcl.

to get insight, its interesting to ask: wtf's a float. A boat? you end up with cpu & bits. Thus born a computer engineering side effect.

ever since, programer's minds are tainted with a world of computer engineering side effects. This crime began with C+Unix.

in real life, a inevitability, there exist real numbers. And, a representation is decimal number notation. This is not a float. it's a Real.

in math langs eg Wolfram Lang, there's no such thing as float. But, there is Real number with Machine Precision. BIG difference.

LISP, is perhaps the first lang, that started the road of math langs. But, today's Common Lispers, no understand it.

Note: this is not a bash against low level langs. But, against langs that do not separate implementation and language.

almost all industrial langs, do not separate implementation and language. Much due to C having tainted programer's brain.

C is such a virus. Because its defect, it spawn csh tcsh C++ java objc C# and basically all lang's syntax too. A snowball effect.

for all javascript's idiocies, we can actually trace it all back to C, via Java.

the End.

2015-07-29

SVG pain. inverted y axes; text default scale is absolute

inverted y axes

the y coordinate is inverted from normal

Solution, attach all your drawing to a group, then apply transformation, like this:

gp.setAttribute("transform", xd.translate(0, 2*ymin+ywidth) + xd.scale(1,-1) );

but, the problem is, if you have text, the entire font gets inverted upside down too.

So this means, there isn't simple solution to work with “not invert” y axes. Maybe there's a attribute to make text not invert or something. Still don't have a nice solution.

the inverted y axes is a major pain, because it drains brain when you work with “normal” y-axes, such as in math plots. Either twist your brain, or, you need to remember to attach a transform to every of your drawing primitive. Or, group them and transform.

text default scale is absolute

you can use svg viewBox to specify your drawing's coordinate range. that is, xmin, xmax, ymin, ymax

this makes it convenient. For example, if your app is plotting basic math functions, you can work with coordinate x from -10 to 10, y from -10 to 10. Instead of pixels and whatever is the current width and heigh of view port

but, if you add text in your drawing, such as axies labels, the text default to font size 16px. So, you have to manually figure out what's the scaling from your view box to view port, and rescale all your text elements.

〔➤ SVG Coordinates, Viewport, viewBox

2015-07-04

emacs bug: can't paste into emacs

emacs bug: can't paste into emacs

there's this bug that started to happen about a year ago. Emacs 24, and 25.

  • GNU bug report logs - #16737
  • From: Sujith Manoharan
  • Subject: 24.3.50; Yank causes hang
  • Date: Thu, 13 Feb 2014 09:10:55 +0530

Pasting content selected in a browser causes Emacs to hang completely sometimes. This is not consistently reproducible, but it happens after a few hours of usage, sometimes days.

from http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16737#17

This happens to me when i use xah-find-replace-text on few thousand files. 〔➤ Emacs Package: xah-find.el grep/sed in Pure Emacs Lisp

not always, but most of the time.

the number of files doesn't seem to matter. But what matters is likely the number of replacements.

there are 10 or so people wrote in that thread who also have the problem. But, a reproducible step is hard to get.

however, there's a reproduction steps described here


From: "Alan D. Salewski"
To: 16737 @ debbugs.gnu.org
Subject: Re: bug#16737: Timed out waiting for reply from selection owner
Date: Sun, 14 Jun 2015 23:00:34 -0400

The below cookbook works to reproduce the issue for me every time, so I
can now trigger the issue on-demand.

As noted in message #149 above[0], I'm running the
'emacs24-lucid-24.4+1-5' package on Debian GNU/Linux; x86_64; 4 core
Intel i7.

I'm running an X11 window manager (sawfish) with no clipboard manager.

To reproduce the issue:

    1. $ type -a emacs
       emacs is /usr/bin/emacs

       $ readlink -f /usr/bin/emacs
       /usr/bin/emacs24-lucid

       $ emacs -Q

       The "*scratch*" buffer is visible.

    2. M-x server-start

    3. In a terminal window (xterm in my case):

       $ emacsclient -t

       The "*scratch*" buffer is visible here, as well.

    4. Select a sizable bit of text to the X11 clipboard. A small amount
       of text won't trigger the issue, but I don't yet know what the
       boundary is. For my testing, I have a browser window open to
       this web page in iceweasel (firefox), and use the 'C-a' hotkey in
       that app followed by 'C-c' to select the full page of text:

           http://matt.might.net/articles/low-level-web-in-racket/

    5. In the emacsclient window in the terminal emulator, paste the
       text from the clipboard. I use the middle button on my 3-button
       mouse to do this.

    6. Back in iceweasel, select any small amount of text (~20 chars is
       fine) from the same page (again, using 'C-c').

    7. In the X11 emacs frame, position the mouse pointer over the
       blinking cursor and press the middle mouse button to attempt a
       "paste" operation (mouse-yank-primary).

       Emacs appears to hang for about 20 seconds, and then the "Timed
       out waiting for reply..." message appears.

The cookbook works not only with the stock Debian 'emacs24-lucid'
package, but also with that package compiled with different build time
options (-g, -O0, -DTRACE_SELECTION). The cookbook also works when I
build with random other debugging code compiled in (all based on the
Debian source package emacs24-24.4+1). It does not seem to be sensitive
to being set up "just right".

A slight variation of the above cookbook works with the stock 'emacs24'
Debian package (same version as the '*-lucid' package above), which is
the variation compiled to use gtk. For this version, the small amount of
text selected in step 6 above does not seem to trigger the issue, but
pasting the full amount of text from the web page does. So the cookbook
variation here is to simply skip step 6 (or replace it with step 4, if
some other process has become the X11 selction "owner"). When running
this version, the paste into the X11 emacs frame is preceeded by a pause
and CPU spiking to 100%, the same as indicated by other reports.

Once the issue has been triggered, no further "paste" operations will
work in any emacs X11 frame that is part of the same emacs process, at
least not without using gdb to jump over these lines in
x_get_foreign_selection (xselect.c):

1241    if (NILP (XCAR (reading_selection_reply)))
1242      error ("Timed out waiting for reply from selection owner");

Once those are jumped, the "paste" operation completes (the text shows
up on the buffer, as desired), but the state is still hosed.

Pasting into 'emacsclient -t' buffers running in terminal emulator
windows (xterm) does continue to work, though. So if somebody is truly
desperate to keep a given emacs process alive, keeping a terminal-based
emacsclient window handy as a target for paste operations could serve as
a workaround once the issue has been triggered.

Thanks,
-Al

[0] message #149
    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16737#149

2015-06-21

computer languages = decades of backward compatibility cruft problem

computer languages have a major problem. That is, backward compatibility. Basically all languages, are hit with decades of backward compatibility cruft. And, that seems to the the main problem of languages.

so, how to solve this?

it seems, one way, is to somehow magically automatically change all existing code. When old code run, it automatically generates new code, and that source code is run. Βut this doesn't seem to solve the problem. Because the lang still holds all the old cruft. It only reduces the problem, by making it trivial to update code.

perhaps another way, is to declare, that the language will forever be unstable. That, by using the language, you assume to continuously update your code. Google's web products, seems to be taking this approach. (even though it's not languages, per se. But lots of Google's API are like that, and comes and go.)

2015-03-15

Google Code shutting down, future of ErgoEmacs

Google announced that they are going to shut down Google Code. See http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html

ErgoEmacs is hosted on Google Code. https://code.google.com/p/ergoemacs/. What to do?

ErgoEmacs started in 2008. The goal was to create a binary usable emacs for Microsoft Windows, Mac. Note: a binary, that anyone who never heard of emacs can download and immediatly be productive like a notepad. No tech talk, but dense tech info available for those who look. Not some “welcome to the powerful editor emacs you must have heard, welcome to the elite hacker commu, now git clone this and that and unix then make, and set env var bash linux and open source be with you happy hacking fuck”

Thanks to David Capello's work over the years, the Windows binary became a reality and served its purpose well for a number of years. However, Mac version never came about.

Since about 2012, ErgoEmacs became largely dormant. David got other things to do, and i also got busy with other things. I still work on lots elisp code, but the last Microsoft Windows binary is in .

During these years, a number of things has happened. Emacs now has a package system. So, installing third-party software becomes easier and coherent. (but still require experienced emacs knowledge and programer know-how.)

Matthew L Fidler, took over the ErgoEmacs keybinding part (aka “ergoemacs-mode”), which is the main part of ErgoEmacs. Matthew has brought ergoemacs-mode to a new level, and is now released as a independent package at https://ergoemacs.github.io/, and it's also made into FSF's Elpa repository, as well as on MELPA repository.

ergoemacs-mode is the bulk of ErgoEmacs.

So, now, what should we do with ErgoEmacs? I sure don't have time to lead in building binaries. A downloadable binary that people can use right away is still lacking in the emacs community. But, i can't do it.

I'm thinking, i'll just use Google's provided tool to “migrate” to github, and just leave it there. Since 2012 ErgoEmacs binary for Microsoft Windows might still be useful for some.

2015-02-06

Emacs Org Mode Bable bug. For emacs lisp, session is always on

Emacs Org Mode Bable bug. For emacs lisp, session is always on.

* test session; no session

#+BEGIN_SRC emacs-lisp :exports both
(setq x 3)
#+END_SRC

#+RESULTS:
: 3

#+BEGIN_SRC emacs-lisp :exports both
(+ 2 x)
#+END_SRC

#+RESULTS:
: 5

save the above as session-test.org, then open it, M-x org-mode. Move cursor to the elisp code block, press C-c C-c to eval. Repeat for the second block.

The expected result for second block should be error of unknown variable x.

2015-02-02

emacs: xah fly keys, harmless key maps

Global Bindings Starting With <menu> n:
key             binding
---             -------

<menu> n RET    Prefix Command
<menu> n SPC    Prefix Command
<menu> n 0      shell-command-on-region
<menu> n 1      set-input-method
<menu> n 2      global-hl-line-mode
<menu> n 3      whitespace-mode
<menu> n 4      linum-mode
<menu> n 5      visual-line-mode
<menu> n 6      calendar
<menu> n 7      calc
<menu> n 8      shell
<menu> n 9      shell-command
<menu> n a      text-scale-adjust
<menu> n b      toggle-debug-on-error
<menu> n c      toggle-case-fold-search
<menu> n d      narrow-to-page
<menu> n e      eshell
<menu> n f      Prefix Command
<menu> n g      toggle-frame-fullscreen
<menu> n h      widen
<menu> n i      make-frame-command
<menu> n n      narrow-to-region
<menu> n r      read-only-mode
<menu> n s      flyspell-buffer
<menu> n t      narrow-to-defun
<menu> n u      menu-bar-open
<menu> n w      eww

<menu> n SPC h  xah-toggle-read-novel-mode
<menu> n SPC n  xah-toggle-line-spacing
<menu> n SPC t  xah-toggle-margin-right

<menu> n f C-f  find-file-other-frame
<menu> n f C-o  display-buffer-other-frame
<menu> n f .    find-tag-other-frame
<menu> n f 0    delete-frame
<menu> n f 1    delete-other-frames
<menu> n f 2    make-frame-command
<menu> n f b    switch-to-buffer-other-frame
<menu> n f d    dired-other-frame
<menu> n f f    find-file-other-frame
<menu> n f m    compose-mail-other-frame
<menu> n f o    other-frame
<menu> n f r    find-file-read-only-other-frame

<menu> n RET F  set-file-name-coding-system
<menu> n RET X  set-next-selection-coding-system
<menu> n RET c  universal-coding-system-argument
<menu> n RET f  set-buffer-file-coding-system
<menu> n RET k  set-keyboard-coding-system
<menu> n RET l  set-language-environment
<menu> n RET p  set-buffer-process-coding-system
<menu> n RET r  revert-buffer-with-coding-system
<menu> n RET t  set-terminal-coding-system
<menu> n RET x  set-selection-coding-system

These are keys starting with 【▤ Menu n】 from xah fly keys Mode. This key set is for commands that are “harmless” — even if called accidentally. They usually do prompt or do some display changes, and never edit anything.

What's the Impetus that Made Lambda Calculus So Powerful?

what's lambda calculus? It's a notation, and nothing but syntax & notation.

The λ-calculus is, at heart, a simple notation for functions and application. The main ideas are applying a function to an argument and forming functions by abstraction. The syntax of basic λ-calculus is quite sparse, making it an elegant, focused notation for representing functions. Functions and arguments are on a par with one another. The result is an intensional theory of functions as rules of computation, contrasting with an extensional theory of functions as sets of ordered pairs. Despite its sparse syntax, the expressiveness and flexibility of the λ-calculus make it a cornucopia of logic and mathematics. This entry develops some of the central highlights of the field and prepares the reader for further study of the subject and its applications in philosophy, linguistics, computer science, and logic.

http://plato.stanford.edu/entries/lambda-calculus/

and that's why, syntax is the most important thing in languages. Programing Language Syntax Soup

2015-01-30

Clojure Support in emacs org-mode via nREPL/CIDER

Clojure Support in emacs org-mode via nREPL/CIDER

as you know, org-mode supports evaluating embedded source code of many languages. (that is, you can have many lang's code such as python in org file, then press a key to eval the code block and have the result embedded in the file (or just displayed), and when you export to HTML, you can also have it eval all source code and have result embedded in the doc.)

the current released version supports Clojure, but via SLIME, which is a engine for interaction with Common Lisp.

Using Clojure in emacs with SLIME is being obsoleted.

The good news is that, in the org-mode development version, it has a working version of clojure support with nREPL/CIDER.

goto http://orgmode.org/ and get the dev version.

basically, you just need to replace the old ob-clojure.el file with new.

how to use org mode's eval lang support? I'll have a article coming up. For now, you can read the official doc at http://orgmode.org/manual/Working-With-Source-Code.html#Working-With-Source-Code

if you don't know org mode basics, see Emacs: Writing Outline, org-mode Tutorial

Thanks to Bastien Guerry ( http://bzg.fr/ ), the current org-mode leader, and Eric Schulte ( http://www.cs.unm.edu/~eschulte/ ) who created the eval lang system in org-mode.

does md5 creates more randomness?

given a 32 digits hex number that is random enough. If i pass it thru md5, is the result more random or less?

few years back, i wrote a function to generate UUID, here: Emacs Lisp: Insert Random ID, Random UUID

I was simply calling random number function in emacs. Christopher Wellons improved it by first gather bunch of random info such as time, user's name, last keystroke typed, etc, then, feed it to md5, then basically use that result as UUID.

The question is, would that actually improve the function? That is, reduce the chances of generating the same UUID?

If you begin with random info such as time and user's last few keystrokes, then yes. But the step i don't quite understand is md5.

md5 takes arbitrary text and returns a 32 digits hexadecimal. Most or all other “hash function” do the same, that is, take a arbitrarily long or short text as input, and returns a fixed number of digits. But the interesting question is, such thing is mathematically impossible. Somewhat like a pigeon hole principle. You can never take many things and produce less things such that it is always unique for every input. The gist of “hash function” is about the impossibility of generating the input given the output. But, i don't know what's the uniqueness property.