A little under two months now, before my yearly visit to Cambridge, for Code Generation 2013 and the Language Workbench Challenge. This year, the challenge for the latter consists of creation of a Questionnaire Language, an idea bij Tijs van der Storm. So far, 14 teams have indicated they want to take part - including one that is going to implement the language in LISP!
Here's the full list of participating teams:
- Meinte Boersma - Más
- Sebastian Erdweg - SugarJ
- Enrico Persiani and Riccardo Solmi - Whole Platform
- Walter Almeida - Generative Objects
- Pedro J. Molina & Ruben Jimenez - Icinetic
- Mirko Richter, Klemens Schindler, Remi Bosman, Albert Gerritsen, Eugen Schindler, Martin Palatnik - MPS
- Karsten Thoms - Xtext
- Eelco Visser et.al. - Spoofax
- Rico Huijbers, Remi Bosman - LISP
- Tijs van der Storm - Rascal
- Alex Loh - Ensō
- Risto Pohjonen - MetaEdit+
- Viktor Tönköl, Peter Balogh - Danubius Design Studio
- Wim Bast, Carel Bast, Ronald Krijgsheld, Tom Brus - Declare
I'm looking forward to it, although the question how to present 14 possible solutions to an audience within the scope of 1 day, while at the same time avoiding a non-stop presentation marathon gives me a head ache.....
Hmmm.... it's been two months, and I haven't been able to finish my plan on implementing a coordinate system language. The idea is still there, but I need to find the time - haven't worked on it since November 2nd. Let's see what 2013 brings, I'll be on a short holiday first.
It does have my attention still, since type systems are part of a talk I proposed for Code Generation 2013, and for the work that leads to that talk.
In April, during CodeGeneration 2012, Markus Völter and Bernhard Merkle showed us MBeddr - a modularized implementation of C created in MPS. A useful effort, that proved to be useful in a real-world project as well.
At the time, he showed me briefly what I should do to build in support for coordinate systems and conversion between them. If you are creating software for mechatronics systems in C, you probably know how easy it is to implement vectors as structs, and then forgetting about the coordinate system they were created in. Net result: at best an occasional mistake in direction of a vector (+ and - sign mix up), at worst a completely wrong conversion that will only show at the most inconvenient time - at the customer site.
If we had a mechanism to prevent this type of error, even before we run unit tests that might be a great help. The physical units module implemented in MBeddr C could be the start of that.
So, what would it bring if we implemented something that allows us to type the following, assuming we have vectors in two coordinate systems named rootCS and derivedCS?
vector2d someVector#rootCS = (10, 20)#rootCS;
vector2d someOtherVector#derivedCS = (10,20)#derivedCS;
vector2d resultVector#rootCS = someVector + someOtherVector;
Depending on implementation, this could lead to two situations:
- We get an error message when on the assignment to resultVector because the two operands of the addition are expressed in different coordinate systems, or
- An automated conversion is inserted such that SomeVector is first converted to rootCS
Even better, taking into account performance, we could add a third alternative, forcing us to explicitly specify the conversion in places where we want it. This could be done in the same way as explained for physical units in the MBeddr User Guide. Where no explicit conversion is programmed, we'd get the aforementiond error message again.
vector2d resultvector#rootCS =
[someVector -> rootCS] + [someOtherVector -> rootCS ];
Today, finally, after a delay of over 4 months, I picked up the latest implementation of MBeddr and started implementing this.
Right now, I'm pondering over the following:
- How to specify a coordinate systems and conversions in a useful manner?
Coordinate systems in mechatronics systems are relative to the system, not the universe, and they may vary over time depending on calibrations and drifts. So, they cannot be part of the language, and the conversions are not fixed.
- If we can do this for 2D and 3D vectors, could we also do it for 6DOF vectors (i.e. vectors that contain x, y and z, but also take into account roll, yaw and rotation)
- Can we integrate vectors, coordinate systems and the already implemented physical units, so that we can enforce vectors to be expressed in meters (and rad for the 6DOF angles)?
Over the next two weeks, I hope to finish a first implementation, and who knows, it may end up in the MBeddr Git repository at some point.
This blog was a bit quiet for a while, and lately I've used it mainly to report briefly on our trip through Canada. For that last bit, I relied completely on a simple, portable set up. What does it take to maintain a blog while on the road?
1) A mobile device - in my case a Motorola Xoom, running Android 3.2 (still hoping Motorola will release a 4.1 upgrade to Europe)
2) A blogging app, that can be used offline when no internet connection is available - WordPress for Android
3) Android Photo gallery, to store pictures taken with the tablet or my Android phone
4) A photo editing application, to reduce picture size to what a WordPress blog will accept as upload - Photo Editor by Dev. Macgyver.
5) A mobile keyboard, since typing on a touch screen is not always useful - Motorola's full size Bluetooth keyboard (about the size of the Xoom itself)
Nice detail about the latter: since Swiftkey is my default touch keyboard, it stays active when I use the offline keyboard. This means it keeps learning about my typing habits, which is very useful when using it later without the physical keyboard.
Actually, with all this, the Xoom became the ultimate digital travelling tool. It served as navigator, e-reader, blogging tool and occasionally as a way to play a small game.
After leaving Ottawa we headed south toward Kingston, at the other end of the Rideau canal. Our route took us there along the Thousand Islands Parkway. Seeing all these houses on islands brought up the discussion on whether it would be nice to live there. Houses built on islands, and with garages for boats instead of cars, while the cars themselves were kept on the river bank. Not always practical, but a beautiful place to live.
At Kingston we spent the night at a campground near the Kingston Mills locks, the end of the Rideau canal. This inspired a future holiday, following the canal (or are similar one in Sweden), by boat. Let's see if we can arrange that some time in the next 5 years.
The next day we travelled slowly along the shores of Lake Ontario, toward Cobourg. There I met up with Georges, and the owner of the little music store Georges Guitars and Music to pick up a Gretsch Broadkaster bass, a rare item in Europe. Georges is a very kind man, who's shop focuses on instruments and amps rather than trying look cool. Contrary to the big chains, he responded to my e-mails in search for this bass and put a nice price on it as well. As a small bonus, I got to take along the cardboard box of a quartet of other cases to built 'flight protection' for mine.
With the bass on board, and the next day took us to our friends Annemarie and Patrick and their two daughters, who moved to Canada's Port Perry two years ago. We spent the night there, so there was plenty of time to catch up, and to learn about life in Canada. Port Perry is about an hour from Toronto, close to Lake Scugog, and on the edge of a green belt that is protected by Parcs Canada - which literally borders on our friends back garden. We couldn't help feeling a bit envious when we saw their house and the 'rich with children' dead end court they live on. My wife was out voted three to one on moving to Canada, but I guess the children and I won't easily move there without her.... Who knows, maybe one day.
Upon leaving them, it was time to return the motor home and spend two nights in Toronto itself, in a down town hotel on Yonge Street. Down town Toronto is great for food, and shopping and some nice sights. Best of the latter is the view from the CN tower, and which we did not get. On the first day, which it was too cloudy to be worth the money (30 CAD per person), on the second we had too little time before having to go to the air port. Something for a possible future visit maybe. We did enjoy seeing the old and new city halls next to each other though, when as well as Chinatown and the Lawrence market.
A bit of extra fun was our short meeting with waiter Jim at the Yonge Street Grille, who immediately spotted we were Dutch and started telling us about his Dutch grand parents, who moved to Canada quite a few years ago. His mix of Dutch and English was fun to hear, and his love for the Dutch soccer team a bit of a surprise (we had a good discussion about Louis van Gaal, who is the new team coach, which we had learned only that same morning). His kind of openness was what we encountered a lot in Canada (even in francophone Quebec), a pleasant contrast to the quite closed up or reserved Dutch culture.
Alas, here the holiday and the story end for now. I'll probably come back to some of this later, when all impressions have settled into a complete view, but the urge to leave The Netherlands after a vacation was never as large as a now..... Canada left a second lasting impression, after our first taste 10 years ago.
After our trip through Quebec, we landed in Ottawa, or actually, on the municipal campground of Kanata, a small suburb of Ottawa, that is also the origin of Canada's name. After the reasonably cool weather of the past few days, we ended up with 28 degrees celcius here, in an area where it hadn't rained for 35 days. That doesn't seem very long, but the trees around our motor home were acting as if it was fall, dropping dry brown leaves all around us. But, since the Dutch know all about water, we brought rain... or at least a few showers. Not enough to releave the camp fire ban of the campground, but enough to make our second day in the Ottawa area more comfortable as far as temperature and humidity are concerned.
That day was spent taking the bus to down town Ottawa, bringing us to the parliament buildings - a bit of a weird view, these 19th century buildings between sky scrapers and large office buildings of a rather young city. It does provide for great pictures though, when looking from the Quebec side of the river.
That side of the river was also the place where we spent most of the day in Ottawa, simply because that is where the Civilizations museum is located - a museum dedicated to the history and identity of Canada - and the civilizations that participate in this.
The thing we visited there was the First Nations exhibit, which displays a lot of what the native Americans, popularly known as Indians, and nowadays more formally addressed as aboriginals, did and still do. We admired totem poles that were as much as 200 years old, but also clothing that was created using traditional techniques less than 50 years ago. A museum employee explained to us how the aboriginals of the West coast created planks out of trees, while leaving the unneeded part of the tree intact and alive. The latter bit makes you wonder about how ruthless and careless the 'civilized' Europeans were (or are?)...
Also easily overlooked is that the aborginals were of different tribes, or people, each with their own habits and with their own quarrels - like the resit of the world. The Iroqui are different from the Ashinee, and the Inuit of the north. That's something you don't see immediately when going along the displayes, unless you let the sign shown below work it's way into your mind for a few minutes. It certainly makes you look at the rest of the exhibition with a different eye....
After the first nations exhibition, we spent an hour at the IMAX theater, at a stunning moving about polar bears in the (melting) arctic. The filming was great, the message (CO2 causes the polar ice to melt) was delivered with a bit too much drama - the price you pay for having Meryl Streep delivering the narrative. Nevetheless, losing the permanent ice would mean losing the polar bear, which is a majestic animal to watch.
From the movie, back to the civilization museum, this time to the Tete-a-tete with many Canadian explorers, inventors, authors, and politicians on display, and then on to the 18th century village, which gave a nice impression on how similar and/or different life in Canada was from life in Europe. I had a good time, but forgot to take pictures, which was a bit of a shame.
After a short visit to the children's museum, the day was mostly over and we hit down town Ottawa for diner. This time, we found a place that redefines pub food: where else can you find a pub that serves lobster linguini, trout in an asiago and chili crust, stuffed porc chops and salmon with soba noodles instead of shepherd's pie and fish and chips? The food was good, and plenty, so the children took with them their first ever 'doggy bag'.
To and from the campground, we made use of the Ottawa bus service, which is a very streamlined service, with buslanes throughout the down town area and bus stations every 1-2 kilometers. I've seen worse...
Walking to and from the bus stations, also gave us the opportunity to see some street art, as shown below and a the top of this post.
Bottom line, I liked Ottawa a lot better than Quebec, probably because it is less similar to European cities - and thus more 'refreshing'.
P.S. we also saw the Ottawa end of the Rideau channel, but I'll save that for the next post, after we visited the other end of the channel, at Kingston.
After all the fun with wildlife, it was time to move on to the city life again- in the city of Quebec. The only city in Northern America with an actual castle (Chateau Frontenac), Quebec is actually almost a French city - although people are more open and easy to make contact with than in France. The city itself was not the most exiting, but we had a good time there nevertheless - walking and shopping in the city center on a Sunday afternoon. The whole month of July and August, the city sports the Festival d'Ete - which consists of many free and paid performances throughout the city. We happened to run into the 'Cirque Loco' - a juggling and acrobatism duo who put on a nice show in the middle of a shopping area. Good for a laugh, a bit of awe and some nice photographs.
After Quebec, we moved on to the national parc of Mauricie, for two nights in a forest inhabited by bears and other animals. The first message we got upon arrival was that a black bear was spotted about a kilometer from our camping site, so we should take extra care to not leave any food items outside during the night. Of course, as it goes, we never saw the bear.
A day at the park was well spent, walking through the forest, and kayaking on Lac Edouard. Apart from squirrels, crows and some falcons we didn't see much animals, but the weather was good and we enjoyed it.
After kayaking, we tried Quebec's 'national dish' - poutine. A combination of french fries, gravy and cheese - for me it's an 'order once and never again thing'. Our evening barbecue, with pepper steak, grilled vegetables went down much better.
But still, we saw whales and squirrels but no bears. An early morning ride on the day we left the national park didn't change that - no bears for us this year. We're leaving bear country, toward Ottawa, Cobourg, Port Perry and Toronto.
Getting to Trois Pistoles in Quebec was a matter of driving down the Canada Highway Nr 2 for the better part of a day. The last part, after leaving the motorway reminded us of Wallon in Belgium: all signs in French (of course, the no problem), terrible roads (less pleasant) and half completed road works (some worse than the actual roads)... But, all of that was fixed by the sunset view over the Lawrence River, where an5d the notion that we just had our second night of rain in two weeks, while back home it had been pouring for days.
From Trois Pistoles, our we took the ferry to Les Ecoumins and then booked two nights at the Domain des Dunes campground in Tadoussac. This was supposed to be our whale watching break, and and it was a successful one. On an evening excursion, and a two hour trip in a Zodiac, and we saw countless whales - I'll look up the names later - including some harbour dolphins and humpback whales. Two came really close, and I was lucky to be filming at the right time.
Tadoussac itself is not the most exiting village, and but it was worth the stay just being able to see these whales.
For all my recent posts I have used WordPress for Android. A nice app with one small flaw: if you edit a post that contains pictures, before publishing it, the picture links are removed when you publish later. I just repaired my last post before this one, reinserting all the pictures that got lost in this manner.
Today, July 17th, is the fourth in a row in coastal nature areas. We started on Deer Island, after crossing the Canadian border again at Lubec. We were lucky to find the ferry point the or so it seemed - it was a bit smaller than we expected. Still, we got onto the ferry from Campbell Island to Deer Island. There we drove straight onto the campground, about a hundred meters from Old Sow, one of the largest tidal whirlpools in the world.
Old Sow was not as spectacular as we had expected, it appears you have to be there at exactly the right moment, and really high tide coming in to be really spectacular. Still, it is a nice view, and a good place to see seals playing in the waves.
After spending the night at the Deer Island campground we moved on, but not before we took a tour around the Island. The best thing we saw was the fishing harbour of Leonardville, and where the water was so clear we could see fish and shell fish about 6 meters below the surface - and some jelly fish as well. This harbour is used mainly for lobster fishing, pity we were there early in the morning, too early for a lobster lunch.
The ferry from Deer Island to Black's Harbour was our next move. This is a free, government operated ferry, which was a good thing for us. We Because neither the commercial ferry that got us to the island, nor the campground accepted credit cards, we were out of cash. This got a bit worrying on our way to Saint Martins, and because none of the smaller places we crossed had an ATM and we had no guarantee that the campgrounds in Saint Martins would take credit cards. In the end, the we found an ATM in Sai t Martins itself, which decided to go 'out-of-order' after providing us with the much desired cash. The cash was not really necessary for the campground we had in mind, because this turned out to be full. Reason was the yearly Old Town festival. So, we move further east, to towards the Fundy Trail, and where a campground called Tobi's Hideaway might be able to take us. This turned out to be no problem: the site is so new that it's not even finished yet and mainly has customers at the end of July and in August. The result was that we had the entire campground to ourselves for one night. So, we had a camp fire, and made friends with a giant rabbit that refused to appear in photographs.
The next morning we went to see the Fundy Trail, a Unesco project that creates a nature park along the coast from Saint Martins to Fundy National Park. This is to open to the public, and preserve at the same time, in the last piece of undeveloped coast in North America. Being right at the entrance, and Tobi's will surely benefit when the trail is completed.
At the trail, we visited the the Big Salmon River, where the Atlantic salmon come to breed annually. I was quite happy to sit down and cool my feet in the river, between the baby salmon. My ankles were hurting, because the midges had feasted on them the night before. After cooling of in the river, the itch was gone. Who needs chemicals?
Besides enjoying the river, we spent time walking along the beautiful coast, before leaving the trail and moving on to Fundy National Park itself.
The Fundy National Park is not all natural, and but rather an attempt to restore nature after the damages done by extensive lumbering in the 19th century. This is most visible at Wolfe Point, at the mouth of Wolfe River, where a restored covered bridge, a piece of a dam and poles remaining from a lumber harbour can still be seen. The dam used to block the river completely, until it was broken down in 1980 as part of the nature recovery project. The dam helped the lumber industry to collect lumber sent down stream, but (together with dumped saw dust), it also destroyed a large part of the fish population, which was already reported by local fishermen in the 1880s.
At the exit of Fundy National National Park, the small fishing village Alma is located. With a general store and a fish market right at the park exit, entry it's a good place to go for park visitors. We On our way past, we enjoyed a breakfast with fluffy pancakes, scrambled eggs and sausages, and and lobster lunch omelet at the local coffee shop. After that we visited the harbour and fish market, buying fresh haddock and coquilles 'for the road'. The haddock ended up on the barbecue the same evening, the coquilles entered the RV freezer for a few days.
That barbecue took place in Moncton, our last stop before a full day of driving to Trois Pistoles in Quebec, where we will take the ferry across the Lawrence River.