Python-style enumerate for Nemerle

So instead of just whining about Nemerle, here's a something potentially useful. I found I missed Python's built-in enumerate function. It wasn't too hard to implement in Nemerle:

public class Enumerator['a] : IEnumerable[(int * 'a)] {
    private e: IEnumerable['a];
    
    public this(e: IEnumerable['a]) {
        this.e = e;
    }
    
    public GetEnumerator(): IEnumerator[(int * 'a)] {
        mutable i = 0;
        foreach (elem in this.e) {
            yield (i, elem);
            i++;
        }
    }
}

Usage:

foreach ((index, item) in Enumerator(list)) {
    System.Console.WriteLine($"index for $item: $index");
}

The naming might not be optimal, with potential confusion with the standard libraries, but I don't care at the moment. Use and enjoy.

Flow 07: Sunday and Regina & Husky Rescue at the Huvila Festival Tent

Sunday was a whole lot better at Flow than Friday. Everything worked better and the music was lovely. Kudos to the organizers for seeing the problems and acting to correct them.

Highlights:

  • Risto is the king of the world.
  • Tuomo played just the kind of music you'd love to hear on a sunny Sunday afternoon.
  • Korpi Ensemble was easygoing and fun.

On the not quite as good front, it was the first time I had heard of Jenny Wilson and wasn't really very impressed. Nice enough, but didn't really generate any strong feelings. Bebel Gilberto was better, but she arrived late on the stage and I don't think she really captured the audience. We left in the middle of her set.

Monday evening we went to see Regina and Husky Rescue at the Helsinki Festival Huvila Tent. Both were excellent, even though Regina would have clearly worked even better in an envinronment where people wouldn't have been sitting down — the tent doesn't really encourage you to move your ass.

All in all, you get the feeling that Finnish music is doing pretty well.

Flow 07: Friday done

First day of Flow is behind. This year, we bought tickets for Friday and Sunday, we'll skip Saturday. I have a few not-so-great photos online.

The good:

  • The artists. Pepe Deluxé was good, sometimes great. Terry Callier was brilliant. No complaints about the other stuff, but those were the only two complete sets we heard. Well, CocoRosie was, er, slightly too weird for my tastes.
  • The location, the old Suvilahti power station. The outdoor space isn't quite as excellent as last year, but it is pretty nice anyway. And even closer to home. And having the club space in the same place justifies the move pretty well.

The bad:

  • Queues. Queues everywhere. One of the main attractions of Friday for us was Nicole Willis and The Soul Investigators. We spent the time they were on stage in the line outside the festival area, waiting to get in. Partially a timing problem (starting the first set at six o'clock on a Friday evening is just too early), partially a organizational problem (why does it have to be so slow to let people in?) Time to get a beer from the bars next to the main stage: 20-30 minutes. And of course the bar areas are fenced and you aren't allowed to go buy your drinks from another bar and take them to the main stage. Queues to the toilets, too.
  • The main reason causing the queues: too little staff. They would have probably doubled their sales if there was actually enough people staffing the bars. When they opened the club space, there was apparently one person staffing the three bars, serving a couple of hundred potential customers.
  • No schedules anywhere. If you didn't print out the schedule yourself, too bad.
  • Too small venues. The main stage was ok and we didn't really go to the club hall except right when it opened, so no idea how that was later on. But the tent where The Five Corners Quintet, Jukka Eskola, The Stance Brothers and Timo Lassy were the last acts was woefully small, with horrible crowding. We couldn't stand it so had to skip them, which meant that with Nicole Willis missed earlier, we didn't see half the acts we were trying to see.
  • The hot dog stand ran out of buns before hotdogs and gave out all the hot dogs to people when there were still others in the line. Thanks. We would have paid for those. After that, the only food left was a small piece of dry lasagna costing ten euros. This looks like a pretty good business.
  • The beer was Fosters. The cider was Upcider. The wines were JP Chenet.

If we hadn't already bought the tickets for Sunday, we might seriously reconsider our plans: good music, but they made it way too difficult to enjoy it.

© Juri Pakaste 2024