With the last git release, git-rebase gained a new option: --interactive.
If you already had the feeling that in a patch series of yours you should have ordered patches differently, or merged some, then this command is what you dreamed of. Here is how it works
Let's pretend you want to rework your last 10 patches, you'll run:
$ git rebase -i HEAD~10It will launch your
$EDITOR and you'll see something like:
# Rebasing 16d3800..14f3d11 onto 16d3800 # # Commands: # pick = use commit # edit = use commit, but stop for amending # squash = use commit, but meld into previous commit # # If you remove a line here THAT COMMIT WILL BE LOST. # pick 6270640 Simplify write_tree using strbuf's. pick 27c528a Further strbuf re-engineering. pick fd82c9a Eradicate yet-another-buffer implementation in buitin-rerere.c pick eee488f More strbuf uses in cache-tree.c. pick 16878b5 Add strbuf_rtrim and strbuf_insert. pick e9081af Change semantics of interpolate to work like snprintf. pick 99c3ef5 Rework pretty_print_commit to use strbufs instead of custom buffers. pick 203db5d Use strbuf_read in builtin-fetch-tool.c. pick a20d939 Use strbufs to in read_message (imap-send.c), custom buffer--. pick 14f3d11 Replace all read_fd use with strbuf_read, and get rid of it. ~ ~ ~ ~ ~ ~[1]Then you can rewrite "
pick" into "edit" if you want to change something in a commit, or "squash" if you want to merge it with the one from the line before.
What the small help doesn't say is that you can actually reorder your commits, and it will do what you expect it to do. I used it 10 minutes ago, because I have this string buffer module I extend on a regular basis, I squashed every API extension of that module in one commit using that.
Each time one change needs you to edit anything because either you asked for it, or that one of the change you asked for generated a conflict, then as usual the rebase will stop. You will be prompted to make the change, or fix the conflict, or merge comments (in case of a squash), and when all is in order, you just need to:
$ git rebase --continueThis is just awsomely simple and intuitive
$EDITOR sucks btw
Maintenant j'ouvre la fen tre et une mouche la chambre entre Ni la moche ni l'italienne ne peut tre trouv e plus son centre This place with its wood and its shingles, this place with birdshit splattered down the bricks This place with drunken girls screaming Meat Loaf lyrics and behaving like abject pricks Maintenant je suis bien loin But yet oh so close Cerca de la criatura del lago Not Iago as has been previously claimed Humming, screeching, gurgling, squeaking Not unlike Barbie's mom on a Thursday night It goes through the motions of accomplishing something When really it is advancing its own sinister agenda An agenda so sinister that you'd name it Dexter if you could. You can't. Then, as the disruptive forces destabilize reality, like they destabilize the rhyme and scansion and hyperlinklessness of This Poem Then, like Mike Stone expressing gratitude, like something demanding its $3.50 (but oh, oh, it does not want its $3.50; it wants something far more visceral and ephemeral), it makes a simple statement. F01. Natuurlijk.
| Test | Iceweasel 2.0.0.6 | Epiphany 2.18.3/libxul 1.8.1.6 | GdkWebKit | Opera 9.23 | Opera 9.50 alpha 1 |
|---|---|---|---|---|---|
| Try/Catch with errors | 80 | 81 | 41 | 18 | 22 |
| Layer movement | 250 | 214 | 76 | 53 | 47 |
| Random number engine | 280 | 190 | 57 | 72 | 68 |
| Math engine | 343 | 274 | 82 | 101 | 91 |
| DOM speed | 205 | 225 | 18 | 41 | 54 |
| Array functions | 97 | 97 | 72 | 82 | 44 |
| String functions | 14 | 12 | 12 | 46 | 52 |
| Ajax declaration | 178 | 127 | 16 | 21 | 17 |
| Total | 1447 | 1220 | 374 | 434 | 395 |
I just released new version of Gammu. Besides experimental support
for Bluetooth on FreeBSD, this release is mostly about fixing found
bugs. Full list of changes:
The short story: we lost the baby. "Cord accident".
The long story:
Sarah woke me up at about 2:30am on Tuesday morning in a panic because she'd
woken up herself at about 2am, and realised that she hadn't felt the baby
move since about 8am the previous day.
I had a quick feel, but couldn't feel anything like his usual vigorous
kicking, and eager to put her mind at rest, called Labor an Delivery at
Lucile Packard Children's Hospital to see if we could come in. They said
we could, so we jumped in the car and got there at about 3:25am.
They hooked up Sarah to a fetal heart monitor, but after anxious minutes,
they couldn't pick up anything, so they got out the ultrasound machine. It
was pretty obvious from that that there was no movement. We'd lost him.
So from about 4am onwards, we, well, tried to come to grips with the fact
that we'd lost our baby. That we'd been robbed, 13 days from the finish
line, and that we weren't going to be bringing a baby home to all the stuff
we had ready for him there.
The doctors briefly mulled over whether to have a C-section to deliver
Joshua, as was the plan, or induce. Apparently it's psychologically better
for the mother if she delivers naturally, since she doesn't have the
constant reminder for 6+ weeks while she recovers from the C-section.
However, the doctors decided that as nothing had really changed from a
delivery point of view, and they wanted to do a C-section for reduced strain
on Sarah's heart, they opted for a C-section.
They managed to get a free operating room slot in the Stanford ORs, so they
transferred Sarah over there, and they started performing the surgery at
about 10am. Joshua was delivered sometime around 10:15am. I got to see him
and hold him while we were still in the OR. He was perfect. 4 pounds 12
ounces. He didn't look that small. We were wondering if he was going to make
5 pounds or not. Maybe he would have by the 17th. I brought him around to
show Sarah while she was still on the table, but it was hard to get him up
to a good position that she could see him from, and she was a bit zonked out
from all of the drugs.
They finished up at about 10:45am, and took her to the recovery room, where
they didn't really want me, so one of the nurses from Labor and Delivery
took me back to Lucile Packard, to spend some time with Joshua. There she
let me hold him for a while, and look at him, and take some photographs.
Then she weighed him and measured him, and took some more photographs. The
nurse was really compassionate about the whole thing, and it felt like we
were there for a good couple of hours, which was good, because apparently
Lucile Packard and Stanford don't really inter-operate very well, and whilst
physically transferring a patient just involves wheeling them down a
corridor, getting all the paperwork sorted out is a completely different
story. So while Sarah was only supposed to spend an hour in recovery, she
spent three hours there, because they were waiting on paperwork to release
her, then waiting on a room to be available, then the right people weren't
talking to each other, so they didn't know they didn't know that a room was
available from midday. I forget what time we actually got out of recovery.
The doctors, being the overcautious bunch of people that they are, wanted to
keep Sarah in the Cardiac Surveillance Unit for 24-48 hours so they could
check on her vitals post-delivery. They let us out of there late today.
We're currently in a general ward. I thought they said it was for
gynaecology patients (they didn't think it'd be terribly considerate to
stick us in with all the other recovering mothers and their babies), but
there's some male patients in here too, so I'm not sure what this ward is.
In terms of coming to grips with things, they brought Joshua up to our room
for pretty much as long as we wanted yesterday, and Sarah was more with it
by then, so she could hold him, and we could take more photographs.
It's been really hard. I was awake from when Sarah woke me up in the morning
until about 10pm that night. Fortunately I was able to get a cot in the room
with Sarah, so I could stay the night there. I'm staying here tonight as
well.
The obstetrician that delivered Joshua said that his umbilical cord was
wrapped around his neck twice and once around his body, and was pretty tight
around his neck. They can't say for sure that that's what happened, but it's
a good enough explanation for us, and we're not going to have the little guy
cut up for an autopsy, which may not tell us anything anyway.
So we're taking some small comfort from the fact that we're able to make a
healthy looking baby, and that Sarah's heart performed fine throughout the
pregnancy and delivery, and that this was just one of those so very unlucky
accidents. Apparently babies get their umbilical cords wrapped around their
necks all the time, and most of the time it's not a problem. So we know that
he didn't have any birth defects, and it wasn't because of something Sarah
ate, or because Sarah got sick or anything. It's just plain bad, rotten
luck.
We'll most probably try again, but the next pregnancy is going to be hell.
It'll be like walking on egg shells the entire time. Clearly, your baby
isn't out of the water until he's screaming in the delivery room.
There's a lot more I want to write, but I also want to get this finished and
get some sleep, so here's a brain dump of what's been going through my head
for the last 48 hours:
Hi everyone, It is with heavy hearts, that we have to tell you that rather than announcing Joshua's birth on the 17th of September, we have to say that yesterday, we learned that we lost him, 13 days before he was to be delivered. Sarah woke me yesterday morning at about 2:30am, because she'd woken up at about 2am, and realised that she hadn't felt Joshua moving since about 8am the previous day. She tried a few things to get him moving, but they didn't work, so we hurried into Labor & Delivery at the Lucille Packard Children's hospital. There, they confirmed the worst, no heartbeat. Yesterday morning at about 10am, Sarah had a c-section so the doctors could deliver little Joshua. He was absolutely perfect, weighing in at 4 pounds 12 ounces (2.15 kilograms) and 26.7 centimetres (10.5 inches). Yesterday was a very long day. Sarah is currently recovering in the Cardiac Surveillance Unit (CSU) of Stanford Hospital (her aorta has been absolutely fine, the doctors are just being their usual cautious selves). It's a little bit up in the air as to whether she'll spend the entirety of her recovery in the CSU, or if she'll be transferred back to the Post-Partum area of Lucille Packard after 24 hours. (We hope that she does get transferred back, as the CSU isn't really used to dealing with post-c-section patients, particularly ones that have lost the baby). The obstetrician that delivered Joshua said that his umbilical cord was wrapped around his neck twice, fairly tightly, and once around his body. So whilst we'll never know for sure, it looks like it was a cord accident. That's a good enough explanation for us, so we're not going to have him autopsied. That's about all I can report at the moment. If you'd like to speak to Sarah, you can either call home and I'll try to keep Sarah's extension forwarding to her hospital room, or you can call my cell phone. I've got it on vibrate all of the time, and I'll answer if we're not in the middle of something. If you're calling from Australia, my extension at home will let you connect to my cell phone. If you're local, and would like to visit, we'd love to see you, just call ahead to check where we are. It's going to be hard, but we'll get through this.
I was just thinking about this. 1995, in the mac lab. The mbone window
using a tons of bandwidth to show video of someone's paper crane mobile.
Mostly hidden in the background, but ocasionally watched as an antidote to
the stess-making car-crash sounds from 30 other macs as we all learned how
to make them crash programming them in assembly.
Anyone else remember those paper cranes on the mbone?
I came across John Wang's posting titled Database Abstraction - code vs infrastructure. In it, he talks about the problems many people face when migrating applications tied to a specific RDBMS to another one. He recommends:
One solution of modern programming is to move database abstraction from the code to the infrastructure using a ORM (Object-Relational Mapper) or Data Mapper. A ORM and Data Mapper abstracts the database for you so you no longer have to do tie db abstraction to each app. Not only does it let you code once for multiple databases it lets your users migrate their data from one database to another. This blog runs Typo which is based on Ruby on Rails and ActiveRecord. I've been contemplating migrating Typo from MySQL to PostgreSQL and I've been told that it would be as simple as exporting the data with YAML, updating the database.yml file and importing the data.Umh... Thing is, you often want to use your DB as way more than a data store - At least, when using Postgres, I do. There are many things that can be done inside the DB (such as guarding the programmer against his own mistakes by keeping sanity checks which often go beyond just referential integrity. Constraints and triggers. Oh, and of course, user-defined functions and views. Of course, most times you can go by without using several of such tools - but when they would come in handy, you can sorely miss them.
ActiveRecord is a data mapper and isn't as flexible as a full blown ORM but it gets the job done for the most part. For a full-blown ORM, I think of Perl's DBIx::Class which provides a full OO interface to the RDBMS allowing you to code just once for multiple DBs without limiting you when you want to use some esoteric database-specific SQLCurrently, I'm among the many that have jumped on the Rails bandwagon - And so far, I really like it. But yes, ActiveRecord -although great for some tasks- is way under what I'd like for many actions I've got used to making.
There are PHP frameworks out there like Symfony and Cake but do any of them have stand-alone ORMs? If so, could Drupal move to something like that and solve their maintainership problems once and for all? Drupal is part of the Go PHP5 effort so there should be no issue using PHP 5 OO. Something to think about for the Drupal folks if a PHP ORM is availableUmh... Even if there are some great ORMs in PHP... Choosing an ORM is something you do when you start a project. I doubt the Drupal people can now just decide to move over to using a ORM, as they potentially have hundreds or thousands of points where they have DB interaction. And although for most of them moving over to an ORM should even be automatizable, every ORM has some very special features which make it damn hard to craft several kinds of query.
On your clients you have to modify /etc/snmp/snmpd.conf:
#com2sec paranoid default public
com2sec readonly default public
exec .1.3.6.1.4.1.2021.8.3 aptupdate /usr/local/bin/nagios-check-apt-updates
Get the check script to the client:
# wget –no-check-certificate \
https://kosh.ganneff.de/ganneffutils/nagios/nagios-check-apt-updates \
-O /usr/local/bin/nagios-check-apt-updates
# chmod +x /usr/local/bin/nagios-check-apt-updates
Allow the snmp user to make use of apt-get:
# echo “snmp ALL=(ALL) NOPASSWD: /usr/bin/apt-get update” >> /etc/sudoers
# echo “snmp ALL=(ALL) NOPASSWD: /usr/bin/apt-get –simulate upgrade” >> /etc/sudoers
Restart the snmpd:
# /etc/init.d/snmpd restart
Restarting network management services: snmpd.
On the nagios monitoring system you have to run something like this:
# /usr/lib/nagios/plugins/check_snmp -H <client> -t30 \
-C public -o .1.3.6.1.4.1.2021.8.3.101.1 \
-r “No updates available”
SNMP CRITICAL - *”Security updates (1): libkrb53; “* iso.3.6.1.4.1.2021.8.3.101.1=”Security updates (1): libkrb53; ”
After upgrading the client you should get:
# /usr/lib/nagios/plugins/check_snmp -H <client> -t30 \
-C public -o .1.3.6.1.4.1.2021.8.3.101.1 \
-r “No updates available”
SNMP OK - “No updates available” iso.3.6.1.4.1.2021.8.3.101.1=”No updates available”
Debian, opensource, planet
Japanese professor and free software advocate Masayuki Ida is in The Netherlands, and yesterday gave a lecture about his activities in bringing free software to several Asian developing countries. It was interesting to learn what the state of technology is in a country as Vietnam, and why specifically free software is very welcome to change it. They are not interested in the pricing aspect, since a Windows CD is $1 there. Free software allows and stimulates its users to gain a much better technical understanding of a system, and there's a dire need for people with technical knowledge in the country. By using free software, they are making bigger leaps in their technological development.
The professor wanted to do something typically Dutch afterwards, so a couple of us took him on a bicycle ride from Amsterdam to Ouderkerk aan de Amstel, along the Amstel river (known for naming both Amsterdam and a beer brand). He was friendly and very interested in how education works in The Netherlands. We once lost the professor - as it turned out we'd passed a windmill, which none of us locals even noticed, but the professor did and wanted to take some pictures of it. After a stop for a beer we returned to Amsterdam, delivering the professor at his next appointment (a bit late).
One potential issue with this style of page-table is with a very
large, very sparse address space (such as in a single
address-space operating system) there will be many intermediate
steps with possibly only a single translation at the end (i.e. lots of
single pages scattered all around your address-space).
Thus we can add a bit-field guard to each of the entries in
the page table (Liedtke,
1994) to help indicate only those paths through the tree which are
valid (similar to a Patricia
tree).
Translation first proceeds as usual; the top bits are used
as an index into the top level table. However, each entry now
contains extra information about further valid addresses. The guard
is masked against the next bits in the virtual address; if it matches
(e.g. in our example is 0x2) the next step can proceed directly to the
leaf node, bypassing the middle look-up. The entry can be marked as
either final (i.e. pointing to a leaf node) or intermediate, in which
case the process continues with the next level (which also has its own
guard, and so forth). Any entry that does not match the guard is
known to be false, and therefore a fault can be raised.
To examine this further, consider that we know that each page in
our 24-bit address space above is 4KiB, thanks to the 212 =
4KiB offset. Therefore each of the 16 possible values of the top four
bits selects 1MiB of the 224 = 16MiB address space;
e.g. 0x0 selects the first megabyte, 0x1 the second and so forth. The
second 4 bits selects a 64KiB region of this 1MiB, and the last 4 bits
selects a 4KiB region of this 64KiB region.
This scheme could work quite well if we were using only 16 pages
each separated by 1MiB. Each of these pages would only require an
entry in the top level with an appropriate guard which could then be
marked as final and point directly to a physical frame.
Once things become less sparse however, we need to start filling in
middle levels. If you have 2 pages within a 16MiB region, you need at
least one extra bit of address to tell them apart. If you have 3 or 4
pages, you need at least 2 bits to tell them apart, and so forth.
It would therefore be beneficial to have variable level sizes to
dynamically adapt and create the most efficient lookup possible given
the address space layout of a process. For example, if you knew your
process was only going map pages 0x123 (100100011) and 0x124
(100100100) a good option would be to make your top-level only two
entries (i.e. check the top bit) with a guard on the entry at index
0x1 of 00100. You then need a second level with 8 pointers to
differentiate the remaining 3 bits (each of these would be final and
hence point directly to a physical page).
The more pages you start mapping, the less bits you can discard
with the guard. If you follow this through to a guard of 0 bits you
end up with a linear page-table.
It has been shown (Elphinstone,
1999) that fixed level sizes with 16 entries tends to work well.
For a 32-bit address-space with 4KiB pages (e.g. 12 bits offset) this
leaves 20 bits to be mapped by the page-tables; with each level
mapping 24 bits this means a 5 level tree. The guard
values provide enough path-compression that the table is not
constantly walked. The disadvantage is that it may "over-allocate"
meaning more space is dedicated to page-tables than strictly
required.
Deciding where and when to split levels, what size indexes to put
at each level and updating all the guard values dynamically to make
the smallest, most efficient page-table would create a
variable-radix page-table (Szmajda
and Heiser, 2003).
In summary, a guarded page-table is more useful the more sparse
your address space is. A variable-radix guarded page-table is
complex, but could offer advantages for implementing variable
page-size support and thus having positive effects on TLB
coverage.
This week has consisted of fighting registrars and doing a bit of
hacking on xen-shell, xen-tools, and the chronicle blog compiler.
CJ has done some good work
trying to get the code modularised, and I expect between the pair of us we
can make things neater and better generally.
I've also fixed a couple of bugs relating to the hard-wiring of device
names (/dev/sda, /dev/tty1, etc). These devices are replaced in newer
versions of Xen which wants to use /dev/xvc0 and /dev/xvd[a-z] instead.
There's nothing else happening at the moment; I'm just having a lot of fun laughing at our new kitten sliding around on our polished wooden floor!
Chronicle seems to be getting pretty popular which is ironic because
it was a quick hack to allow me to post blog entries on a couple of hosted
sites - which I've not yet done. Oops.
In other news I'm loving the Nintendo DS at the moment, Megan brought
me one back from America on her recent trip and I think a day hasn't
passed where one or both of us has played less than 30 minutes each.
I'm annoyed that Sim City DS only allows us to play with one city -
right now it is her turn, and I'll have to wait until she's finished
with her creation before I can have a go - because otherwise I'll wipe
her city out.. :(
I've found some time for quicklist, finally, to move the port on to a second pre-release. New additions include a Recent Files submenu and GtkHTML report engine but the Sort and Filter options are not complete and adding a new report is problematic.
Recommends: www-browser, dwww yelp
Next.