This is a post that details on how to sync a subversion repository to git repository on github.com, and how to keep it in sync.
The following sites were instrumental in getting this to work:
stackoverflow.com question on getting svn into git; ssh foo. There are a number of steps to take. From a bird’s eye view:
Use git svn to clone the svn repo to a git repo; Create a github git repo; Add a remote origin in your local git to the remote github repo; Use some SSH foo to use a separate SSH key for pushing to github.
This is an follow-up on this pandoc item in Dutch.
When writing RFC 4641 we directly wrote the XML. Needless to say is was kinda tedious even thought the XML of xml2rfc is very “light”.
Nowadays I’m a fan of the markdown syntax and especially the syntax as supported (created?) by Pandoc.
So for my next RFC (if ever!) I decided I wanted to use Pandoc. As xml2rfc uses XML I thought the easiest way would be to create docbook XML and transform that using XSLT.
I have done programming in (or at least looked at) the following computer languages during my live. Of course the world is not a perfect place, but some languages out there are just plain awful.
BASIC - with line numbers! At the time (I was 11) didn’t know there was something else out there. Fun and easy language, although I never programmed in it ever again.
Pascal - After BASIC, there is no going back to Pascal.
After reading up on the prime sieve, and playing with Go for the past week I thought needed to implement this algorithm in Go and make it parallel.
I want to create a set (n in 2..N) goroutines. Each of these routines will check if it can divide a number (i) by n (integer division). If so the number i is not prime, otherwise it is given to the next goroutine.
Still learning and playing with Go, I’ve rewritten my cat experiment, to use a *bufio.Reader, which is more correct I think. I’m also slowly wrapping my mind around the concept of Interfaces. As a non-OO programmer (C and non-OO Perl) is starting to see why this is useful.
So today’s exercises:
Write a cat implementation in Go. See below. Write a grep implementation in Go. See below. Cat in go package main // A implementation of cat in Go import ( "os"; "fmt"; "bufio"; "flag"; ) var numberFlag = flag.
After spending every free minute to Go I’m starting to get a feel for the language. Every one has to start somewhere, so I decided to “port” Unix utils to Go. I’m starting with cat, and thanks to the Go tutorial this is the result.
package main // An implementation of Unix cat in Go import ( "os"; "fmt"; "flag"; ) func cat(filename string) bool { const NBUF = 512; var buf [NBUF]byte; if f, e := os.
I joined the go-nuts mailing list a few days ago and it really feels good to receive 200+ emails per day again. Just like in the good old days before good spam filtering (and anti-spam laws).
I also re-watched the presentation Rob Pike gave for Google Tech Talks on youtube.com. In there he presented the following program chain.go: (Formatted with gofmt as it should)
package main import ( "flag"; "fmt"; ) var ngoroutine = flag.
I’ve been wanting to learn (and do something) with the language Erlang for over two years now. But every time I fire up vim and start typing a get a this-is-not-Unix feeling (aka Java-sickness). The syntax is just not right for me.
But now Google, by the creators of Unix and C, give us Go! Which promises to give us Erlang functionality in a C-like language. Just what I wanted!
A colleague of mine had some nice improvements to gitvi.
Right now gitvi can be edited by itself, because the magic sequence $Hash$ is escaped like this
sed -i -e 's/\$[H]ash:.*\$/$H''ash$/' "$base" (This was Ton’s idea)
Some other improvements like a -m MSG switch which allows you to enter a commit message for all files you are editing.
And of course it then also needs to have a -h switch.
I had this small problem, how to you check if a directory is empty in the shell? Suppose I want to do
cmd po/* this fails, if the po directory is empty, which in turn makes my compile barf, but that is another story. I needed something to would check the emptiness of the directory, and if it is not empty perform the command, otherwise it skip it.
The trick here is to remember that if a shell wildcard can not be expanded it will be left alone.