Sunday, August 29, 2010

web tools

Yahoo! Pipes

I have never really used webtools or even a toolchain, except for simple stuff like this blog or twitter. Usually I just develop stuff if I need something special. But yesterday I used two tools which are great especially the second one. RSS Pump can aggregate several data source, not just RSS feeds, and shows them as a newsticker or a static list. So I'm using it to collect news and articles regarding EVE Online for my corp homepage. The other tool I am amazed by is Yahoo! Pipes. It also collects data from various sources but that's where the similarities end. The end product is a RSS feed or JSON data but in between you can twist and format the data any way you like, which is great as I noticed as not every source has the same format. But what amazed me even more is the editor as it's not text based but instead done via visual programming, neatly visualizing the dataflow.

Monday, April 26, 2010

followup to Mozilla ES3 extension

Does also affect try & catch, and it's a mozilla only thing: https://bugzilla.mozilla.org/show_bug.cgi?id=561670

Thursday, March 25, 2010

githubbed

I githubbed the code from the previous post. It's now at http://github.com/tekai/tools. Also php-run-string has been fixed.

Tuesday, March 16, 2010

emacs/php code

Some interesting functions if you happen to write PHP code in emacs:

php-mode.el with some modifications:

;; - php-check-syntax-and-goto-line bound to F12
;; - changed the find-tag-default function to differentiate between
;;   methods and functions BUT this means you need to use tag-fucker.php
;;   instead of etags/ctags/whatever

tag-fucker.php (rename it to use it). A CLI script which generates TAGS/etags stuff used in my php-mode. Much slower than etags but maybe it can by compiled by HipHop.

php.el Some extra php related elisp code. Them gem of it is update-tag-file which does what it says on saving a file ((php-)after-save-hook)

Those files need a bit of shell & elisp knowledge if you want to use them. Go and hack away. If you like/use/modified it pls leave a comment.

Ideapad: incremental tags

  • Add a hook to save buffer
  • run script to remove file from TAGS
  • run tag-fker to add stuff from buffer
  • run some tags function in emacs to make adopt changes in TAGS

Update: check out https://github.com/tekai/tools/blob/master/php.el#L45 for an implementation

    Friday, February 26, 2010

    strange moments

    in emacs:

    M-x term
    ... do something in the shell ...
    > vim file
    WTF? moment as I realize I started vim within emacs
    

    Thursday, February 11, 2010

    Ideapad: EVE POS exchange format

    with JSON: Moon {corp:, alliance:, system:, planet:, moon:, modules: [], rf-timer:, comment:""}

    Wednesday, February 10, 2010

    Ideapad: Visualize var scope & occurances

    Thread with knots. The thread represents the scope, the knots represent the occurances.

    Thursday, January 07, 2010

    reciprocate

    just a reminder for myself that it's spelled as in the title and not "reprociate"

    Wednesday, December 30, 2009

    ECMAScript 262 Ed. 3 allows extensions

    That ECMAScript allows other extensions is no surprise to me. As Chapter 16 states:

    An implementation may provide additional types, values, objects, properties, and functions beyond those described in this specification. This may cause constructs (such as looking up a variable in the global scope) to have implementation-defined behaviour instead of throwing an error (such as ReferenceError).

    But what surprised me is the reply I got to this bugreport:

    The extension in SpiderMonkey is old and it serves to satisfy the conditional compilation use-case:
    if (DEBUG) {
      function maybe() {...}
    }
    
    if DEBUG evaluates to falsy, no function maybe is defined. More, this means the binding of maybe depends on evaluation of the sub-statement containing it. Same goes for the testcase in comment 0. ECMA-262 Ed. 3 (chapter 16) allows syntactic extensions, which the function as sub-statement definitely is an example of. That we differ from other browsers is a tolerable consequence of ES3 chapter 16 allowing syntactic extension. Note that for ES4, function in a block will be block-scoped, but hoiste to top of the block, so the testcase in comment 0 will work.

    So basically all Mozilla implementations of ES3 (SpiderMonkey, Rhino, Tamarin?) have been extended so that if changes the behaviour described in ES3 10.1.3. Functions (not variables) are not added to the Scope Chain if they are wrapped in an if which doesn't evaluate to true.

    Doesn't seem much of a problem though as there are only two bug reports about it and an only one comment explaining why it is the way it is.

    Thursday, May 14, 2009

    Florence And The Machine

    Dog Days

    Kiss With a Fist

    Rabbit Heart (Raise It Up)

    Could find a proper video for the song Lungs, which is really awesome

    Their album Lungs should be out on June 9th in the UK, no idea when it's out in the rest of the world.

    Thursday, February 26, 2009

    Dinge die man nicht finden möchte

    Die MD5 Summe seines Passworts. Je mehr Treffer desto einfacher ist es.

    Friday, February 06, 2009

    Model M PS/2 to USB Adapter

    Auf der Arbeit habe ich seit dieser Woche einen neuen Rechner ohne PS/2 Anschluß. Damit ich nicht auf meine alte IBM Model M verzichten muß habe ich jetzt einen USB-PS/2 Adapter gekauft der imho recht günstig ist, nur bei den Versandkosten hätte ich noch schauen sollen ob ich noch was brauche.

    Thursday, November 27, 2008

    Deichkind

    Die meiner Meinung besten Musikvideos von Deichkind:

    Ihr Debüt "Bon Voyage" ft. Nina

    Limit

    Komm Schon

    Ich Betäube mich ft. Sarah Walker

    Arbeit Nervt

    Friday, November 21, 2008

    tube fmt18

    Bookmarklets für Youtube.com Video download

    Friday, September 26, 2008

    in the mail today

    Gestern Nacht bestellt, Heute geliefert ohne Premium zu zahlen. Irgendwie habe ich das Kings of Leon Album mit dem von Franz Ferdinand verwechselt, ich dachte es kommt erst nächstes Jahr raus.

    Von dem AMOP Buch erwarte ich etwas mehr Einblick in in Higher Level OOP und eventuell Design Entscheidungen von OO Sprachen. Das MOP selbst werde ich wohl kaum irgendwo anwenden können.

    Thursday, September 25, 2008

    Thursday, September 04, 2008

    in javascript ...

    there's nothing like NaN

    (cause (NaN != NaN) == true)

    Friday, August 22, 2008

    curry

    Currying as per the formal definitions is given a function f(x,y) -> z curry(f) -> g(x) -> h(y) -> z. But usually it's defined as taking f and fixing the first parameter. eg curry(f,5) -> g(y), with g being g(y) = f (5,y). The second definition is actually called partial application, but up to today I didn't know this as I learned it that way in university. But what confused me today was why with the first definition and a function f(x,y,z) that curry(curry(f))(x)(y)(z) != f(x,y,z). I thought c(c(f)) should be in lisp (lambda (z) (lambda (y) (lambda (x) (...)))), baffled me until sat on the train home and figured out that my curry function was working as it correctly produced (lambda () (lambda (x) ...)).

    Anyways below is my Javascript code. I didn't find a shorter or more flexible version, so imho it's the best. It supports any number of arguments thanks to aist/array-comprehension.

    function curry(f) {
        var args1 = Array.prototype.slice.call(arguments, 1);
        return function () {
            var args2 = Array.prototype.slice.call(arguments);
            args2 = Array.prototype.concat.call(args1, args2);
            return f.apply(this, args2);
        };
    }
    
    function realCurry(f) {
        return function (x) {
            return curry(f,x);
        };
    }

    Thursday, July 17, 2008

    hello world

    mo'bloggin from iPod Touch as it is customary when you get a new gadget