Pages
Tags
8k 10k 20k Astro Blog bulb c++ california CAM CNC cutsim drop-cutter Electronics EMC2 fail gps gpsrun helsinki IOM IOMWorlds lathe machining-video messier MicroMagic ModelExpo moon mould N240 NordicCup noux octree opencamlib orienteering Photo pikanto plan python roadtrip run Travel USA video voronoi vtk waterlineCategories
- Articles (20)
- Asides (28)
- Astro (63)
- Blog (16)
- CNC (195)
- CAM (88)
- Drop-Cutter (17)
- OpenVoronoi (25)
- Waterline (14)
- EMC (26)
- Lathe (21)
- CAM (88)
- Computer (13)
- Cycling (17)
- Electronics (29)
- Fail (5)
- IOM Building (54)
- IOM Design (28)
- IOM Events (57)
- IOM Worlds 2007 (10)
- MicroMagic (14)
- Photo (39)
- PIKANTO (40)
- Programming (10)
- Research (33)
- Running (87)
- Half-marathon (5)
- Long-Run (11)
- Marathon (2)
- Sailing (16)
- shared links (133)
- Skiing (7)
- Travel (35)
- Uncategorized (15)
Archives
-
RSS Links
-
Spam Blocked
Monday Ten
Tuesday, September 20, 2011
Drumsö Runt
Saturday, September 17, 2011
19k long slow run around lauttasaari on Saturday. Since the shoreline of an island is supposed to have a fractal dimension greater than one, it's possible to lengthen the run by following the shoreline more closely. Here the lap around the island is about 16-3 = 13km.
Between 6-7km and slightly after 7km it's probably possible to run on the cliffs and in the woods to get a bit more distance. I'm not sure about the area around 10km, seems private with no path around the shoreline. At 12km and slightly after 14km I don't think there's a shoreline-path either.
Two Million Meters
Saturday, September 17, 2011
About 95k biked this week, which brings the grand total for 2011 up to 2000 km, or two million meters. Yay!
Here's a graph:
This shows that I have been riding about 85k per week from week 13 until now (week 37). The three >100k rides to/from Tammisaari show up as peaks, as well as the 2-day Luumäki trip. Week 29 is the only one with zero km's, because of the 24h rogaining trip/event. Extrapolating until the end of the year a 85k/week rate will bring the total over 3000 km, but we'll see how tough it gets with ice, snow, and winter-tires...
On the running side of things it would be nice to get up to 1000 km again, but I'm now about 50-70k behind last years schedule.
Critical Mass, 2011 September
Tuesday, September 13, 2011
Some 260 riders and a route along länsiväylä, the main motorway in to Helsinki from the west. Bikes on the motorway has prompted a number of news-stories:
Yle: http://www.yle.fi/alueet/helsinki/2011/09/lansivayla_halutaan_muuttaa_kaupunkibulevardiksi_2866429.html and http://yle.fi/uutiset/kotimaa/2011/09/pyorailijat_valtasivat_moottoritien_helsingissa_2869090.html
HS: http://sange.fi/~otso/stuff/hs110913-kriittinen-l%C3%A4n%C3%A4ri.jpg or http://omakaupunki.hs.fi/paakaupunkiseutu/uutiset/pyorailykulkue_tukkii_moottoritien_kaistoja_illalla/
Some history and views: http://vesirajassa.blogspot.com/2011/09/lansimuuri.html
Fireworks
Saturday, September 10, 2011
More on picasa: https://picasaweb.google.com/106188605401091280402/Fireworks201109 (shot using old 20D, which has written EXIF-data dating the pics to 2005...)
Unfortunately moving my blog by exporting an XML-file from the old site and importing it to the new site has not worked too well
I have all 800 posts, and about 2000 pictures/attachments, but the pictures aren't bound correctly to the posts, so posts with image-galleries don't work too well. Hope to fix this at some point. The wordpress-importer is also somewhat naive in that when importing attachments it simply re-names files (by appending "1") that are already on disk. I have now tried importing three times, which means I have three copies of all files, like so: "file.jpg", "file1.jpg", and "file11.jpg".
vd benchmark
Monday, September 5, 2011
Tuesday update: A few optimizations has shaved about half off the constant, to
. This was mainly (a) choosing boost::vecS as the out-edge container for the BGL-graph, and (b) choosing std::vector instead of std::set for a temporary variable in the grid-search for the closest facet. I suspect the runtime is dominated by that grid-search. Profiling would tell.
I did some benchmarking of my vd-code. It is supposed to run in
time. Benchmarking turns out to be not so simple. I normally compile without any optimizations, and with a lot of sanity-checks and assert():s all over the code. These checks have worse time-complexity and result in long runtimes with big inputs. Then there are compiler optimization flags like -O or -O3.
I was first running the algorithm by inserting each point from python-code:
t_before = time.time() for p in plist: vd.addVertexSite( p ) t_after = time.time() return (t_after - t_before)
which I thought could add some overhead. I also made a version ("batch mode") where we first push all points to c++, and then call a run() method:
for p in plist: vd.pushVertexSite( p ) t_before = time.time() vd.run() t_after = time.time() return (t_after - t_before)
but this seems to improve runtime only marginally. Here are the results. Runtimes are divided by
, so ideally all points should fall on a horizontal line. At best the code now runs in about 10-16 microseconds times
.
With 4096 input points the runtime improves from 12s down to 1.3s by turning off sanity-checks and assert():s. It further improves to 0.18s with -O3 and to 0.165s in batch-mode.
As an example, the voronoi diagram for 1000 random points looks like this:
New webhost - installing wordpress
Sunday, September 4, 2011
After leaving my bill unpaid at my old webhost, changing DNS-servers for my domain, and setting up a new webhosting account, the site is back up again on the new webhost, kapsi.fi. It went down sometime in the afternoon on Friday, and it started working again at noon on Sunday.
I will install the plugins, upload pictures/attachments, and restore the database from the old site over the next few days...
WordPress install:
- Downloaded latest wordpress as a zip-file, unzipped on laptop and uploaded with FileZilla/FTP to webhost.
- Edited wp-config.php by adding MySQL server name, database name, username, and password.
- completed wordpress install by going /wp-admin/install.php and entering some info
- Trying the Black-LetterHead 1.5 theme.
Plugins:
- Akismet ships with wordpress, just have to activate it, and dig up my old API-key. akismet.com now seems a bit more aggressive in wanting money than it did a few years back..
- Latex for wordpress allows writing mathematical stuff like this:


- WP-Syntax should make any C/C++ or python code I blog about more readable.
import this # try this in your python shell!
- Google Analytics allows tracking roughly how many visitors the site has. I have used google-analytics since about 2007, and the graph of visitors looks like this. I should sometime analyse if those traffic-peaks coincide with interesting posts, or being linked to on some popular page.
File+Database restore:
- I backed up the whole of /public_html from the old site. Have now restored most of the /wp-content directory which holds all pictures and attached files (PDF, movies, etc). This is about 1.5 Gb in total.
- On the old wodpress-install I exported all posts, pages, and comments into an XML file which is about 7.5 Mb in size. This is now imported into the new site. This is 848 Posts, 8 Pages, 27 Categories, 384 Tags, and 750 Comments.
- I'm not sure if everything went smoothly. In some cases it appears that images show up correctly in posts, in other cases the images/gallery is missing. This appears to be related to the wordpress Media Library being completely empty on the new site! Even though I uploaded all files to the same directories, and then did the XML-file import it seems that the Media Library is not imported correctly.
- Update: it appears that the Import function chokes and I get "Internal server error" if the XML file is too large. I have now manually split the XML file into chunks of 1 Mb or less, and now the import function works better. I now have 2113 images and 2 videos in the Media Library. However they are all "Unattached", i.e. it appears wordpress doesn't know what images belong to what posts.
Changing web hosting service
Thursday, September 1, 2011
I'm going to change the web hosting service for this blog. That means there might be a few days of down-time or other strange things happening during this or next week. Stay tuned for more blogging after the switch-over...
Links - 2011 Aug 29
Monday, August 29, 2011















