Older blog entries for chalst (starting at number 277)

6 Sep 2011 (updated 7 Sep 2011 at 08:22 UTC) »
Ex commands under Emacs
I've only recently noticed something rather useful for me: viper-mode's support for the ex command set, implemented in the viper-ex package as a part of the Viper vi-emulation package, is mostly orthogonal to the rest of Viper, meaning the Viper implementation of ex can be used without activating Viper mode. Hence you can bind the viper-ex function to a key in any Emacs mode and use commands like .,$s/wrong/right/g there. It is quite straightforward to use this to support vi-like macros, which are sometimes quite a bit briefer than their Elisp equivalents.

To get started, you need to import the viper-ex package, which defines the viper-ex interactive command, and which has some dependencies on the rest of Viper, ones which could be pruned without much difficulty. The ex commands are more pleasant with line numbering. The following Elisp will configure this, with viper-ex bound to C-:

(require 'viper-ex)
(require 'viper-keym)
(require 'viper-cmd)
(require 'linum)
(define-key global-map (kbd "C-:") 'viper-ex)

Note that several modes, like Org-mode, clobber C-: and so would need their maps redefined to use this.

Advogato's new libxml2-based text handler

This is new, I think. It seems to have fewer glitches than the old code, so kudos to StevenRainwater for getting this done.

4 Jul 2011 (updated 6 Sep 2011 at 12:36 UTC) »
ncm writes in favour of τ against π: It's silly to memorize an absurd number of digits of pi and then be obliged to double them before they are useful.

I've no issue with having both constants about, using π or τ whichever is simplest, but I find that π feels more fundamental to me. A couple of considerations:

  1. The area of the unit circle is π. This seems as close to fundamental a fact of trigonometry as you can get. Perhaps trigonometry differs from folk geometry in finding the radius of a circle more fundamental than the diameter?
  2. Quite a lot of the Tau Manifesto is devoted to how much nicer things are if we express radians as lying between [0,τ] rather than [0,2π]. Well, radians are an equivalence class over all the whole continuum, and choosing to express radians over a positive interval to me strikes of failing to appreciate the symmetry of geometry. I find [-π,+π] more natural than [-τ/2,+τ/2], and I like having π being the opposite angle to 0. I do, I confess, view expressing right angles as τ/4 rather than π/2 more intuitive, since right angles "quarter" the plane.

I'm quite happy for people to prefer working with τ rather than π, but I would be unhappy with a calculator than had a τ key and no π key.
12 Jun 2011 (updated 12 Jun 2011 at 09:58 UTC) »
LaForge asks (does Harald Welte actually read recentlog?) Why do self-respecting hackers use Gmail & Co?, noting how many of his mailing list subscribers use Gmail, and making some observations about the privacy implications.

As a datapoint, I do have a Gmail account, and I try only to use that for mailing lists, although some family members seem to prefer using that account despite my protestations. I don't consider the privacy implications of my mailing list subscriptions to be particularly invasive, especially since the fact of my subscribing to several of them is public information. I have a web.de account as an emergency backup for correspondence with my hosting service, and apart from these cases, I try to use the email accounts I maintain myself for correspondence, with the considerations LaForge talks about looming large.

It occurs to me that I could try to get a friend to administer my emergency email account, but then I recall that I've had trouble with that in the past.

I should think that Joel Coel's answer to the question Using gmail as your primary mail server on Server Fault provides a common answer to LaForge's question too.

10 May 2011 (updated 11 May 2011 at 13:25 UTC) »
I do derive some perverse entertainment from some of the spam accounts that have a fleeting existence here, but my favourites are always the SEO "experts". Hi! I'm either incompetent or a criminal, probably both, they tell us, Let me help you!

Today, let me introduce SEM Media, India offering to "Clue your Wounded Website", and whose graphic design skills are as weak as their brand self-awareness is feeble. For but a taster of their site, I provide a snapshot below.

A taster of what SEM Media could do to your 
Musouka said [I] (had like 2 or 3 years of [programming java] HS oriented so mostly Object based programming) and i wanted to know if any of you guys had any hints or tricks to getting to know and remember the language?

I'm not sure what HS-oriented Java is: high-school course in programming? You might find these resources useful:

  • You can download Bruce Eckel's ageing-but-popular book from his Thinking in Java site;
  • Work through a problem set that tests programming skills that you want to solve. If you are at all mathematically oriented, then the Project Euler questions will provide a good workout with core parts of the language like collections. There are other puzzles out there that will test your ability to get Java to solve problems like extracting information from XML, handling UI, or interacting with a server;
  • Look at free-software projects: a question on Stack Overflow, well written java open source projects (for learning)?, had some answers that might be interesting for you.
Be patient and realistic. Set yourself goals that you can solve: it takes time before you will have the skills to write software that other people will be excited about.

About your user page: there are quite a few people, myself included, who don't think that Facebook makes a good homepage for Advogato. Creating a page for yourself on a public code repository, say, Github or Bitbucket, makes for a better homepage. You could post your coding efforts there

karlberry mentioned the Firefox It's All Text add-on, which allows you to edit TEXTAREA forms in Emacs. Worth mentioning Alex Bennee's Edit with Emacs plugin for Chrom{ium,e}.
karlberry wondered where he'd seen the question about Pdftex's \pdfnormaldeviate primitive. I guess it has to be TH's post Random numbers in TeX, where he wonders what the old Pdftex manual meant by the primitive generating a distribution with a "unit" of 65 536.
15 Mar 2011 (updated 15 Mar 2011 at 15:28 UTC) »
fzort wrote Not sure if StevenRainwater is still accepting patches.

Last time I asked, he was planning a substantial change to the core of mod_virgule, and was discouraging patches to avoid the conversion problem.

Now I come to think about it, this is the problem DVCS' were invented to solve.

15 Mar 2011 (updated 15 Mar 2011 at 11:08 UTC) »
Sometimes it seems like my involvement with Advogato consists of reporting spammers.

Account echo http:==www.advogato.org=person=alanove=|tr = / is a spam account that is nearly two weeks old. You know what to do with it.

I think the spammer changed the URL contents from something plausible looking to something spammy — but not yet actually useful for a spammer, I think.

It might help watch for this kind of bait-and-switch tactic, which ncm raised as a worry some time back, if the list under www.advogato.org/person/ were ordered by most recent edit and not trust.

268 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!