Showing posts from 2015

Gnu Emacs New Leader: John Wiegley

Image 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 Emacs2012-06-27 By Sacha Chua. @〕 Haskell Talks: John Wiegley with FP CompleteJohn 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.John Wiegley github Wiegley twitter

JavaScript wuwu quiz

// quiz. figure out what does this code do // 2015-10-29 function foo() { var eleName = document.getElementById("x79177"); alert( (function(le) { returnfunction(f) { return f(f); } (function(f) { return le( function(x) { return (f(f))(x); } ); }); }) (function (givenGetDepth) { returnfunction (element) { return (element === null) ? 0 : givenGetDepth(element.parentNode) + 1; }; }) (document.getElementById(eleName)) ); }; foo();

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. that how it calls macros as pattern matching and or syntax 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.

海賊王 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 Action FiguresOne 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 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 Figuresbtw, the ones in this picture, you guessed, are the “bad guys”. The bad guys, are always more fun to look at.

language popularity ranking sites

there's many language popularity ranking sites. The most well-known, is tiobe. 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,, is worse. And badly maintained.the following is better, because they are specific on what they measure. 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 LinesPublished 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 PotvinGoogle 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?

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 Keypadsthis is good for those of you with a compact 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 Keysi 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 writ…

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.Stefanrms getting told: Episode 0see support Stefan Monnier for forking emacs. It would be a good thing.see also Richard Stallman: What's magit? Emacs Dev Condition 2015

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 Control2013-11-12 By Bozhidar Batsov. @〕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-pageIf 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 packa…

what's “operator” in programing language?

in programing languages, the concept of “operator” is completely fscked up.JavaScript operatorsJavaScript OperatorsWhat's Function, What's Operator?

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 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)

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 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”…

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

inverted y axesthe y coordinate is inverted from normalSolution, 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 absoluteyou can use svg viewBox to specify your drawing's coordinate range. that is, xmin, xmax, ymin, ymaxthis makes it convenient. For example, if your app is plotting basic math functions, you can work with coordina…

emacs bug: can't paste into emacs

2015-07-04 emacs bug: can't paste into emacsthere's this bug that started to happen about a year ago. Emacs 24, and 25.GNU bug report logs - #16737From: Sujith ManoharanSubject: 24.3.50; Yank causes hangDate: Thu, 13 Feb 2014 09:10:55 +0530Pasting 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 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 @ Subject: Re:…

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, 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.)

Google Code shutting down, future of ErgoEmacs

Google announced that they are going to shut down Google Code. See is hosted on Google Code. 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 …

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: : 5save the above as, 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.

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&…

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. that's why, syntax is the most important …

Clojure Support in emacs org-mode via nREPL/CIDER

Clojure Support in emacs org-mode via nREPL/CIDERas 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 and get the dev version.basically, you just need to replace the old ob-clojure.el file with to use org mode's eval lang support? I'll have a article coming up. For now, you can read the official doc at…

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 UUIDI 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 p…