Schatten Licht

Licht, Light, Lumo

Phoronix conclusions distort their results, shown with the example of GCC vs. LLVM/Clang On AMD's FX-8350 Vishera

Phoronix recently did a benchmark of GCC vs. LLVM on AMD hardware. Sadly their conclusion did not fit the data they showed. Actually it misrepresented the data so strongly, that I decided to speak up here instead of having my comments disappear in their forums.

Wahlprogramm der „Alternative für Deutschland“, kritisch gelesen

Ich habe inzwischen von mehreren Leuten gehört, diese Professoren von der AfD wären ja gebildet und hätten ein gutes Programm.

PDF (drucken)

Org (bearbeiten)

Um nicht nur meine Meinung zu schreiben, sondern sie auch zu belegen, habe ich das Programm nochmal Schritt für Schritt gegengelesen und kommentiert.

Ich bin nicht auf viel gestoßen, dem ich zustimmen kann (dafür auf einige Horrorstellen) - abgesehen von Punkten, die eh schon Gesetz sind.

Jetzt aber zum Programm.

Basic usecases for DVCS: Workflow Failures

Update (2013-04-18): In #mercurial @ irc.freenode.net there were discussions yesterday for improving the help output if you do not have your username setup, yet.

1 Intro

I recently tried contributing to a new project again, and I was quite surprised which hurdles can be in your way, when you did not setup your environment, yet.

So I decided to put together a small test for the basic workflow: Cloning a project, doing and testing a change and pushing it back.

I did that for Git and Mercurial, because both break at different points.

I’ll express the basic usecase in Subversion:

  • svn checkout [project]
  • (hack, test, repeat)
  • (request commit rights)
  • svn commit -m "added X"

You can also replace the request for commit rights with creating a patch and sending it to a mailing list. But let’s take the easiest case of a new contributor who is directly welcomed into the project as trusted committer.

dvcs-basic-svn.png

A slightly more advanced workflow adds testing in a clean tree. In Subversion it looks almost like the simple commit:

dvcs-basic-svn-testing.png

Programm der „Alternative für Deutschland“

Ich wollte heute einen Artikel zum Programm der „Anternative für Deutschland schreiben und habe es geschafft, nach 3 Stunden Schreiben und Recherche den Artikel zu löschen. Aber die Nachdenkseiten treffen die Kritik in meinem Artikel zum Glück mit noch mehr Hintergrund, so dass ich stattdessen jetzt einfach auf den Artikel der Nachdenkseiten verlinke:

Hintergrund zur AfD von den Nachdenkseiten:
Können Markt­radikale und Nationalchauvinisten eine „Alternative für Deutschland“ sein?
— mit Unterstützerliste (und Hintergrund zu den Unterstützern).

Babcore: Emacs Customizations everyone should have

1 Intro

PDF-version (for printing)

orgmode-version (for editing)

repository (for forking)

project page (for fun ☺)

Emacs Lisp (to use)

Package (to install)

I have been tweaking my emacs configuration for years, now, and I added quite some cruft. But while searching for the right way to work, I also found some gems which I direly miss in pristine emacs.

This file is about those gems.

Babcore is strongly related to Prelude. Actually it is exactly like prelude, just with the stuff I consider essential.

But before we start, there is one crucial piece of advice which everyone who uses Emacs should know:

C-g: abort

Hold control and hit g.

That gets you out of almost any situation. If anything goes wrong, just hit C-g repeatedly till the problem is gone - or you cooled off far enough to realize that a no-op is the best way to react.

To repeat: If anything goes wrong, just hit C-g.

wisp: Whitespace to Lisp: An indentation to brackets preprocessor to get more readable Lisp

1 Intro

I love the syntax of Python, but crave the simplicity and power of Lisp.
display "Hello World!"      ↦    (display "Hello World!")
define : hello-world        ↦    (define (hello-world)
  display "Hello World!"    ↦      (display "Hello World!"))

Wirtschaftsaufsicht für legale Prostitution

→ Antwort auf die Aussage „Es gäbe so viel Sinnvolleres anzuprangern als legale Prostitution“ von Antje Lang-Lendorff in der Taz.

Bei legaler Prostitution gibt es sehr wohl etwas anzuprangern: Dass im Zuge der Legalisierung nicht gleichzeitig eine effektive Wirtschaftsaufsicht eingeführt wurde.

Für jede Masseurin, Psychologin oder Gastwirtin gibt es hierzulande klare Gesetze, und ein Verstoß dagegen führt zur Schließung.

Wir haben Gesetze dafür, wie Salat in Dönerbuden aufbewahrt werden muss, und ein Verstoß dagegen wird direkt geahndet. Wir dürfen nichtmal ein Soya-Getränk auf der Verpackung als Milch bezeichnen.

Warum haben wir dann keine geprüften Vorgaben, die regeln, wie ein Bordell geführt werden muss, damit die Rechte aller Beteiligten gewahrt bleiben? Und die Auskunftspflichten definieren, die natürlich geprüft werden?

Was wir dafür brauchen ist einfach eine Definition, was gute Prostitution ist und wie sie funktionieren kann.

Spaß mit import from in Python

→ Antwort auf Is it in this case : http://identi.ca/url/75523035 (see : [01:16]1 — Julien-Claude Fagot, die eine Antwort war auf One more reason why you should not use “from bla import foo”: print __import__(obs.__class__.__module__).__file__ — ArneBab

Datei: bla.py

def foo():
    print "bla"

Interaktiver Test:

>>> import bla
>>> bla.foo()
bla
>>> def fu():
...   print "fu"
...
>>> fu()
fu
>>> from bla import foo
>>> foo()
bla
>>> bla.foo = fu
>>> bla.foo()
fu
>>> foo()
bla

Profifrage: Was passiert, wenn du from bla import foo nach bla.foo = fu ausführst?


  1. dsop: if you use 'bla.foo', then yes, you can assign to bla.foo and you'll see the change. If you do 'from bla import foo', then your locally imported 'foo' will not 'see' changes to bla.foo. 

Going from a simple Makefile to Autotools

Table of Contents

Links

1 Intro

I recently started looking into Autotools, to make it easier to run my code on multiple platforms.

Naturally you can use cmake or scons or waf or ninja or tup, all of which are interesting in there own respect. But none of them has seen the amount of testing which went into autotools, and none of them have the mount of tweaks needed to support about every system under the sun. And I recently found pyconfigure which allows using autotools with python and offers detection of library features.

Namespaces in Emacs Lisp - ohne den Interpreter zu ändern

» Adding namespace support to emacs lisp in a macro with just 15 lines of code - it’s things like this which make lisp feel like the mother of all languages.«1

(defmacro namespace (prefix &rest sexps)
  (let* ((naive-dfs-map
          (lambda (fun tree)
            (mapcar (lambda (n) (if (listp n) (funcall naive-dfs-map fun n)
                                  (funcall fun n))) tree)))
         (to-rewrite (loop for sexp in sexps
                           when (member (car sexp)
                                        '(defvar defmacro defun))
                           collect (cadr sexp)))
         (fixed-sexps (funcall naive-dfs-map
                               (lambda (n) (if (member n to-rewrite)
                                               (intern
                                                (format "%s-%s" prefix n)) n))
                               sexps)))
    `(progn ,@fixed-sexps)))
(provide 'namespace)

(require 'namespace)
(namespace foo
           (defun bar ()
             "bar")
           (defun foo (s)
               "foo"))
(foo-foo (foo-bar))

(Der Hauptteil dieses Codes stammt von vpit3833 und konr und ich darf ihn verwenden. Er funktioniert dank einer Korrektur von Stefan. Er ist nicht perfekt, aber da er mir v.a. dazu dienen soll, meine eigenen Codeschnipsel besser zu organisieren, sollte ich das verschmerzen können)

Der Code mag schwer lesbar sein, hat aber riesige Implikationen: Du als einfacher Endnutzer des Lisp-Interpreters kannst Namespace-Support hinzufügen, ohne dass die Hauptentwickler dafür irgendetwas machen müssen.


  1. Der Code stammt größtenteils aus einer Diskussion auf Stackoverflow

Benutzeranmeldung

Inhalt abgleichen


 
 
 
Diese Seite nutzt Drupal.
Design: Arne Babenhauserheide.

Werke von Arne Babenhauserheide.
Lizensiert unter freien Lizenzen.

Valid XHTML 1.0 Strict