git vs. mercurial

At work, we use hg and to be frank, I haven't really got the hang of using it well. I've recently started using git for my own work and I'm loving it.

I chose git because

  • github seems to be a nice place to hang around, as compared to bit-bucket.
  • org-mode uses git and I need to learn to use git, if I intend

contribute anything to org-mode.

But after using git for a month or so, I'm totally loving using git. The way it handles merges is awesome. People go gaga over it's speed.

But for me, it's the way it handles branches. I can have any number of branches on my machine, while pushing only changes in the master branch, upstream. I can easily merge changes from one branch to another. After putting up a lot of fight, I couldn't make hg do this. Not as well as git does it!

I've now decided to convert my personal repositories to git.

This blog post shows how to.

Thanks Sacha

I just wanted to thank Sacha Chua for bearing with my newbie elisp code and trying out org2blog.

Also, thanks for the two patches she sent.

  1. Feature addition - Posting sub-trees instead of whole buffers. I had this feature in mind, and had started working on it after her request, but she was too quick for me! ;)
  2. Cleaning up of the code that uploads images.

I'm loving it!

Change & Free flow

No. Not the Obama change. I'm talking of change as in small denominations of cash. Everybody is reluctant to part with it. There's always a problem with getting it. I'm often worried before getting into a bus or an auto, or going to a shop whether or not the guy would give me change for a 50, 100 or a 500. People so reluctant to "part" with it. What are they saving it for?

I think the situation would be much better if people readily gave it, when required. There would be a free flow and if not anything more, I wouldn't have to worry about it when going somewhere. But, I "feel" this would actually reduce the instances when both the parties don't have enough change with them. What do you think?

Competition and Population

I've often got bad service from "service providers" - hotels, restaurants, phone services, Internet services etc. I guess that's due to the population in India. If one customer goes back unhappy that doesn't really make a difference, because there would be hundred others already waiting in the queue.

You, as a, service provider would get your share of customers and profits, no matter how bad you are. Thanks to the population.

One solution could be, to write about the bad service you got from a provider and make people aware of it, but often there aren't enough options, for others to choose from. Inevitably, the bad service provider is going to get some customers. What's the way out?

Refile to date-tree

Useful to refile notes to the journal file, which is a date-tree. org-refile isn't convenient to refile stuff to a date-tree.

(defun my/org-refile-to-journal ()
  "Refile an entry to journal file's date-tree"
  (interactive)
  (require 'org-datetree)
  (let ((journal (expand-file-name "journal.org" org-directory))
	post-date)
    (setq post-date (or (org-entry-get (point) "TIMESTAMP_IA")
			(org-entry-get (point) "TIMESTAMP")))
    (setq post-date (nthcdr 3 (parse-time-string post-date)))
    (setq post-date (list (cadr post-date)
			  (car post-date)
			  (caddr post-date)))
    (org-cut-subtree)
    (with-current-buffer (or (find-buffer-visiting journal)
			     (find-file-noselect journal))
      (save-excursion
	(org-datetree-file-entry-under (current-kill 0) post-date)
	(bookmark-set "org-refile-last-stored")))
    (message "Refiled to %s" journal))
  (setq this-command 'my/org-refile-to-journal))

(defun my/org-agenda-refile-to-journal ()
  "Refile the item at point to journal."
  (interactive)
  (let* ((marker (or (org-get-at-bol 'org-hd-marker)
		     (org-agenda-error)))
	 (buffer (marker-buffer marker))
	 (pos (marker-position marker)))
    (with-current-buffer buffer
      (save-excursion
	(save-restriction
	  (widen)
	  (goto-char marker)
	  (org-remove-subtree-entries-from-agenda)
	  (my/org-refile-to-journal)))))
  (org-agenda-redo))

(org-defkey org-agenda-mode-map (kbd "C-c C-S-w") 'my/org-agenda-refile-to-journal)
(org-defkey org-mode-map (kbd "C-c C-S-w") 'my/org-refile-to-journal)

Enjoy!

Update [2016-06-16] Raam Dev pointed me to an issue and a suggested fix, that I have updated the above code with.

Vimperator and Firemacs!

For the uninitiated, vimperator is an emacs plugin to get Firefox working with vim keybindings and firemacs 1 is for emacs keybindings.

I'm obsessed with emacs (as should already be evident) and can't really edit text without it's key-bindings. There are others like me, and hence the firemacs plugin. It's a blessing for my tribe.

Firemacs is great, except for the one great feature that it lacks - being able to jump to links/textareas without using the mouse. I've seen Nishanth do it with ease, using Vimperator. I wanted to add this feature to Firemacs, by copying some code from Vimperator to Firemacs. I directly started looking at the code, but couldn't make head or tail of it. I got a few doubts about how Vimperator works, since I'd never used it. Nishanth asked me to simply install it and try it out.

And then we had our EUREKA! moment. Vimperator and Emacs both enabled together work seamlessly well. Two obsessed people are happy and satisfied! And hopefully many more. :D

Footnotes:

1

Key-bindings are a religious thing, in the world of editors!

Looking through the view finder

After a trek, I had an interesting conversation with Ritesh, about taking pictures during a trip. He said, he started to realize that when he's lost in the cycle of click, see, analyze, click, … when he's got a cam in his hand. He didn't have a cam on this trek and thoroughly enjoyed it!

I connect to this phenomenon, as well. I think, like Ritesh says, having separate trips for Photography makes sense. On other trips, we could be clicking, but just for the sake of memory. Trying to get amazing photographs shouldn't be a goal. I should refrain from -

  1. looking at the output and adjusting repeatedly until it's perfect.
  2. clicking too many pictures in a given length of time.

For both of this, a film camera seems to be the solution!

What say, Ritesh?

Sage Days 25, Mumbai, India

What is 'Sage Days'?

Sage Days is a confluence of present and prospective SAGE Users and Developers. It is an opportunity to come together to share ideas, brainstorm and hack on Sage. Sage Days 25 is the 25th version of Sage Days, and is being organized in Mumbai, India. In order to cater to an Indian audience and scenario, this version has been tweaked slightly. Sage Days 25 has beginner level tutorials, in addition to the usual talks and sprints, to help new users get started with Sage and help promote the use of Sage in India.

What is Sage?

Sage is a free, open-source mathematics software system licensed under the GPL. It combines the power of numerous existing open-source packages into a common Python-based interface. It's mission is to create a "viable free open source alternative to Magma, Maple, Mathematica and Matlab". Sage has tools for a broad range of mathematical areas like Linear Algebra, Calculus, Symbolic Math, Plotting, Rings & Groups, Graph Theory, Number Theory and Cryptography. Essentially, "it can do anything from mapping a 12-dimensional object to calculating rainfall patterns under global warming" - as Science Daily puts it . Eager to get started? Start here. Apart from being feature rich, it's usability is one of it's greatest strengths. Sage Notebook, a web-interface for all the math you'll ever want to do, is really the killer feature! As the Sage Marketing page says, "The SAGE GUI surely works on your computer box, because it just runs in Firefox!". Try it Now!

Why should you attend?

Sage Days 25 is being attended by the creator and lead developer of Sage, Prof. William Stein. It will also be attended by other developers of Sage. This would be a great opportunity to meet and interact with them! The conference will be attended by a plethora of enthusiastic people from all over the country who use Sage or are interested in doing so. The conference will also see the presence of many mathematicians interested in software. Who knows, you may run into someone you'd want to collaborate with, for your future work! This event will be a great learning experience, if you are even remotely interested in math and software for it!

When and Where?

  • Venue: IIT-Bombay, Mumbai, India
  • Dates: August 9-12, 2010
  • Tentative Schedule
  • Register Here
  • Click here for more info

Another 60 ...

I'd We had been on a 60 km long trip today. My second one, and Ritesh's first. The map of our route is here. On the whole the ride was wonderful! A thoroughly enjoyable one. It was near perfect, with it raining only as much as we enjoyed an not anymore. :)

  • The ride on Godbander Road was the most enjoyable part of the ride. Simple Wonderful! That's what made the trip worth it!
  • It was more relaxed than my previous ride and it took us about 5 hours on the whole. We must've been pedalling for about 4 hours. I don't have the "actual" figures.
  • Except for the stretch of Western express highway (service road) from Jogeshwari to a little after the Sanjay Gandhi National park's entrance, the road was decent. The Eastern Express highway service road was awesome!
  • Cycling alone is totally different from cycling with someone else. We didn't really go together, but we were meeting up once in a while. The loneliness, of rides on which you are alone, is absent. But waiting for, or catching up with the other guy is a bit tricky. I wonder how it would be with a bigger group.
  • I tried to keep going at about 60% effort and I still had quite a bit of juice left in me, at the end of the ride.
  • My cycle is definitely good! I really only understood this after exchanging my cycle.
  • Exchanging cycles felt nice. A slightly different set of muscles were in action. The newness kinda helped.
  • I should probably get myself a bigger round frame spectacles. Or I'm craning my neck a bit too much, to keep looking ahead, while pedaling. How about contacts?
  • The problem with riding on the left of Highways is that you "compete" with heavy vehicles. It sometimes gets a bit scary.
  • I should get a helmet soon.
  • I should get in touch with local cycling groups and tag along with them on a couple of rides. I'll get to learn a lot of things.
  • Ritesh took a few pics with his phone. Photos in some later post or with an update.
  • Where to next? A ride inside the National park, probably or the wonderful roads of Navi Mumbai.

Kudos Ritesh!

UPDATE: A few pictures, that Ritesh clicked on his phone. All the photos were on the Godbander Road.

dsc02884.jpg

dsc02888.jpg

dsc02890.jpg

dsc02892.jpg

dsc02895.jpg

dsc02899.jpg

dsc02900.jpg

dsc02898.jpg

I'm back

After a short break, I'm back to blogging! A few things have changed meanwhile. A lot haven't.

  • Noetic Nought shall now be called Rustic Reverie.
  • The Blogs I read page is now manually populated. More pages might be coming soon.
  • My web presence has almost been reduced to just this blog. I hope to be blogging more often this time around. I guess I'll have shorter and more frequent posts. "Release early, Release often."
  • I've been inspired by Sacha Chua and her wonderful blog. She puts up anything that -
    • she may look up in future.
    • could be remotely useful to anybody on this planet.

    I like her idea of "thinking of writing as sketching". "Keep repeating yourself, until the core message floats to the top". It feels similar to the idea - "Release early, Release often."

  • Also, Thanks to Madhu and Vattam who set an impossibly high standard by having their resumes and letters of recommendations and other "personal" stuff on version control on public repositories.
  • All my posts will be made from org2blog - a little org-mode based client that I hacked up. Emacs and Org-mode all the way! This is the first post by me (and probably anybody) from org2blog!