I have to sift through 6 really boring config files. To stay sane, I call in Emacs for support.
My task looks like this:
(click for full size)
»What is the .asc file?« This explanation is intended to be copied as-is into emails when someone asks about your signature.
The .asc file is a signature which can be used to verify that the email was really sent by me and wasn’t tampered with. It can be verified with standard email security tools like Enigmail, Gpg4win or MacGPG - and others tools supporting OpenPGP.
I currently cope with refactoring in an upstream project to which I maintain some changes which upstream does not merge. One nasty part is that the project converted from CamelCase for function names to words_with_underscores. And that created lots of merge errors.
Today I finally decided to speed up my work.
The first thing I needed was a function to convert a string in CamelCase to words_with_underscores.
By default Emacs Orgmode uses uppercase words for todo keywords. But having tens of entries marked with TODO and DONE in my file looked horribly cluttered to me. So I searched for alternatives. After a few months of experimentation, I decided on the following scheme.
I sent this email to many of my friends to regain confidential private communication. If you want to do the same, feel free to reuse the text-version (be sure to replace the noderef textblock with your own noderef from http://127.0.0.1:8888/friends/myref.txt).
About 10% of my friends joined - which is enough to build the darknet and makes it possible for me to speak freely again.
First: The Essence of this text:
I’ve been censoring my emails for years. Not just what I write, but also whom and when.
Freenet allows me to write invisible messages to my friends. Those are messages I do not need to censor. They give me freedom. Surveillance can show that we could write, but not whether, when or what we actually write. If Freenet is used for that, it needs very little resources.
This is how to connect:
- Download and install Freenet from https://freenetproject.org,
- in the automatically opened setup wizard select “only friends”
- Copy the textblock1 you got with my email and paste it into the textfield on http://127.0.0.1:8888/addfriend/
- Then just send me what Freenet shows on the page http://127.0.0.1:8888/friends/myref.txt (attach to an email or just copy it into the email)
As soon as I add you, too, we are connected. We can then write messages via the friends page (click my name):
- Write message,: http://127.0.0.1:8888/friends/
- Read messages: http://127.0.0.1:8888/alerts/
Censored version of my textblock (you’ll get an uncensored version by email)
Easily answering the question: “How much space does this need?”
Because I am lazy,1 and that makes me fast.
Using Macros to avoid tedious tasks
I have lots of stuff to do, so I cannot afford not being lazy ☺ ↩
I just watched the short film Ambition from ESA, and I still have tears in my eyes.
The film is awesome.
→ In don't run 'strings' on untrusted files Michal Zalewski complained that running the strings-utility for computer forensics or other fields of information security could make you vulnerable yourself, so you should not use that. Given that strings is Free Software, I find a different conclusion from the vulnerability of tools used by professional forensics people.
I’d say if you’re actually using these tools to earn money, it is high time to go in and fix them.
In the last years, spam became worse and worse. The more my site grew, the more time I had to spend deleting blatant advertisements. Even captchas did not help anymore: Either they were so hard that I myself needed 3 tries on average to get through, or I got hundreds of spam messages per day. A few years ago, I caved in and disabled comments. The alternative would have been to turn my Website into a mere PR-outlet of Facebook, twitter or one of the commenting platforms out there.
» babcom: decentralized, spam-resistant comments! «
I just finished lots of new uploads of sites into freenet - with the new freesitemgr (which actually uploads quickly when WoT is disabled, check todays IRC-logs tomorrow to get background on that). You can get the new freesitemgr from github.com/ArneBab/lib-pyfreenet-staging or via infocalypse:
hg clone freenet://USK@kDVhRYKItV8UBLEiiEC8R9O8LdXYNOkPYmLct9oT9dM%2CdcEYugEmpW6lb9fe4UzrJ1PgyWfe0Qto2GCdEgg-OgE%2CAQACAAE/pyfreenet.R1/14
The sites are also available via my freenet inproxy:
freenet-team - an introduction of most of the freenet hackers I know.
mathmltest - example of mathml in freenet.
winterface-deadlines - deadlines for the Winterface GSoC project
freenet-funding - the freenet fundraising plan, still lacking good design and crisp presentation slides or a video
freenet-meltdown - on the recent massive performance degradation which lasted a few month and ended with the link length fix.
fix-link-length - background on the link-length fix which made freenet actually do small world routing again instead of random routing (into which it had degraded, partially due to local requests, partially due to having so many peers per node that random routing actually worked for the current network size, so the pressure by routing-success to go back to small world routing was too weak compared to the pressure from local requests to randomize the connections)
download-web-site - how to download a single page from a website - for example to mirror it into freenet. Hint: For all the sites on draketo.de or 1w6.org you are allowed to do so freely (licensed under GPL).
guiledocs - the online documentation for GNU Guile with a focus on Scheme (using Guile): A powerful lisp-like language with multiple implementations.
decorrespondent-metadata - experiment how much information one can glean about your life from just one week of metadata, in dutch.
netzpolitiz-metadaten - same article translated to german. License: cc by-nc-sa
Adventures of a Pythonista in Schemeland - the adventures of a Pythonista in Schemeland: A deep understanding of Scheme for Python users. I learned to love Scheme with this. BSD license.
programming-languages - The Programming languages lecture. License: cc by-nc-sa
tao of programming - "When you have learned to snatch the error code from the trap frame, it will be time for you to leave."
Often I want to simply backup a single page from a website. Until now I always had half-working solutions, but today I found one solution using wget which works really well, and I decided to document it here. That way I won’t have to search it again, and you, dear readers, can benefit from it, too ☺
wget --no-parent --timestamping --convert-links --page-requisites --no-directories --no-host-directories --span-hosts --adjust-extension --no-check-certificate -e robots=off -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20070802 SeaMonkey/1.1.4' [URL]
I needed to calculate the probability that for every freenet user there are at least 70 others in a distance of at most 0.01. That needs binomial coefficients with n and k on the order of 4000. My old Python script failed me with an
OverflowError: integer division result too large for a float. So I turned to Guile Scheme and exact math.
Freenet provides a global, anonymous datastore where you can upload sites which then work like normal websites. But different from websites, they have a version-number.
The reason for this is, that you can only upload to a given key once1. This data then gets stored in the network and is effectively immutable (much like immutable data structures in functional programming).
If you try to upload to a given key twice, you can get collisions. In that case, it isn’t clear which data a client will retrieve - similar to race conditions in threaded programs. That’s why we do not write to the same key twice in practice (though there is a key-type which can be used for passwords or simple file-names. It is called KSK and was the first key-type freenet provided. That led to wars on overwriting files like gpl.txt - similar to the edit-wars we nowadays get on Wikipedia, but with real anonymity thrown in ☺). ↩
I just discussed with “sceptics” on twitter about climate change. There Ronan Connolly (@RonanConnolly) showed me his article which tries to give the impression that there is no scientific consensus that climate change is man-made.
So Poul-Henning Kamp thought this just a thought experiment …
In Fosdem2014 Poul-Henning Kamp talked about a hypothetical “Project ORCHESTRA” by the NSA with the goal of disrupting internet security: Information, Slides, Video (with some gems not in the slides).
One of the ideas he mentioned was the QUEEN program: Psy-Ops for Nerds.
I’ve been a contributor to the Freenet Project for several years. And in that time, I experienced quite a few of these hypothetical tactics first-hand.
Almost every free software developer made the experience that many people like his or her work, but very few actually provide help. If you experience this, don’t let it disheart you. Verbal support without practical help sounds inconsistent at first, but it actually is the result of limited time.
Most people who have the skills to help are already committed to other projects, so they cannot help you on yours. They can encourage you from the sidelines (“This is cool!
4 ways how large raw artwork files are treated in free culture projects to provide the editable source.1
In the discussion about license compatibility of the creativecommons sharealike license towards the GPL, Anthony asked how the source-requirement is solved for artwork which often has huge raw files. These are the 4 basic ways I described in my answer.
The die was created by Trudy Wenzel (2013) and is licensed under GPLv3 or later. ↩
These are the notes to a short tutorial I gave to my working group as part of our groundwork group meetings. Some parts here require GNU Bash.
Who serves whom? Our tools can be our allies or our masters. Do your tools assist or chain?
Today a bug in complex number handling surfaced in guile which only appeared on OSX.
This is a short note just to make sure that the bug is reported somewhere.
Test-code (written mostly by Mark Weaver who also analyzed the bug - I only ran the code on a few platforms I happened to have access to):
For a long time it bothered me that auto-complete made it necessary for me to abort completion before being able to use org-mode templates.
<s and auto-complete showed stuff like
<string, forcing me to hit C-g before I could use TAB to complete the template with org-mode.
I fixed this for me by adding all the org-mode structure templates as stop-words:
;; avoid competing with org-mode templates. (add-hook 'org-mode-hook (lambda () (make-local-variable 'ac-stop-words) (loop for template in org-structure-template-alist do (add-to-list 'ac-stop-words (concat "<" (car template))))))
In default usage, running such code freezes my emacs until the code is finished, though.
Up to a few weeks ago, I solved this with a custom function, which spawns a new emacs as script runner for the specific code:
; Execute babel source blocks asynchronously by just opening a new emacs. (defun bab/org-babel-execute-src-block-new-emacs () "Execute the current source block in a separate emacs, so we do not block the current emacs." (interactive) (let ((line (line-number-at-pos)) (file (buffer-file-name))) (async-shell-command (concat "TERM=vt200 emacs -nw --find-file " file " --eval '(goto-line " (number-to-string line) ")' --eval " "'(let ((org-confirm-babel-evaluate nil))(org-babel-execute-src-block t))' " "--eval '(kill-emacs 0)'"))))
and its companion for exporting to beamer-latex presentation pdf:
; Export as pdf asynchronously by just opening a new emacs. (defun bab/org-beamer-export-new-emacs () "Export the current file in a separate emacs, so we do not block the current emacs." (interactive) (let ((line (line-number-at-pos)) (file (buffer-file-name))) (async-shell-command (concat "TERM=vt200 emacs -nw --find-file " file " --eval '(goto-line " (number-to-string line) ")' --eval " "'(let ((org-confirm-babel-evaluate nil))(org-beamer-export-to-pdf))' " "--eval '(kill-emacs 0)'"))))
But for shell-scripts there’s a much simpler alternative:
I recently read the little schemer and that got me thinking about recursion and loops.
After starting my programming life with Python, I normally use for-loops to solve problems. But actually they are an inferior mechanism when compared to recursion, if the language provides proper syntactic support for that. Since that claim pretty much damns Python on a theoretical level (even though it is still a very good tool in practice and I still love it!), I want to share a simplified version of the code which made me realize this.
The following PDF and ODF contains my answers to the Public Consultation on the review of the EU copyright rules.
If you want to comment, please use the contact form.
Just to give you a short note, if you have been surprised by the NSA acting like the Stasi in former DDR (German Democratic Republic).
Here’s the translation of NSA:
Let’s put that together:
NSA = Staatliches Sicherheitsministerium
(in more regular German: Ministerium für Staatssicherheit)
Well, that’s long. Shorten it to Staatssicherheit. Still to long for casual discussions. So shorten it once more: Stasi.
NSA = Stasi
Do you still wonder why the NSA acts like the Stasi?
In many discussions on DVCS over the years I have been fair, friendly and technical while receiving vitriol and misinformation and FUD. This strip visualizes the impression which stuck to my mind when talking to casual git-users.
Update: I found a very calm discussion at a place where I did not expect it: reddit. I’m sorry to you, guys. Thank you for proving that a constructive discussion is possible from both sides! I hope that you are not among the ones offended by this strip.
To Hg-users: There are git users who really understand what they are doing and who stick to arguments and friendly competition. This comic arose from the many frustrating experiences with the many other git users. Please don’t let this strip trick you into going down to non-constructive arguments. Let’s stay friendly. I already feel slightly bad about this short move into competition-like visualization for a topic where I much prefer friendly, constructive discussions. But it sucks to see contributors stumble over git, so I think it was time for this.
»I also think that git isn’t the most beginner-friendly program. That’s why I’m using only its elementary features«
To put the strip in words, let’s complete the quote:
»I also think that git isn’t the most beginner-friendly program.
That’s why I’m using only its elementary features«
<ArneBab> I hear that from many git-users…
»oh, maybe I should have another look at hg after all«
Because there are far too many Git-Users who only dare using the most basic commands which makes git at best useless and at worst harmful.
This is not the fault of the users. It is the fault of the tool.
If you are offended by this strip: You knew the title when you came here, right?
If you feel that this strip fits Mercurial and Git perfectly, keep in mind, that this is only one aspect of the situation, and that using Git is still much better than being forced to use centralized or proprietary version tracking (and people who survive the initial phase mostly unscarred can actually do the same with Git as they could with Mercurial).
All the graphics in this strip are available under free licenses: creative-commons attribution or GPLv3 or later — you decide which of those you use. If it is cc attribution, call me Arne Babenhauserheide and link to this article. You’ll find all the sources as well as some preliminary works and SVGs in git-vs-hg-offensive.tar_.gz or git-vs-hg-offensive.zip (whichever you prefer)