Archive

Author Archive

LLDB is a piece of crap (update: maybe it’s clang) (update 2: it’s actually ccache)

I’ve been really trying to use LLDB for a while now. Not that I really want to, but Apple went out of its way to make sure I had little choice. Not only is LLDB the default on MacOSX now, but GDB is really hard to make work on that platform as well. Can you imagine you have to generate a digital signature?

The first thing I don’t like about LLDB is its totally painful command structure. The LLDB authors published a GDB-to-LLDB conversion map, which they probably think is helpful. But to me, all it shows is that LLDB commands are more complex and more verbose than their GDB counterparts, with no obvious way to infer the LLDB command from either GDB experience, or from any kind of logic.

But the thing I dislike the most is that LLDB plain does not work, even when used with Apple tools, in a number of situations that I happen to hit practically on a daily basis. For example, it appears to be consistently unable to set breakpoints by file name and line number with command-line options that are should be used frequently enough to just work.

Here is an example session that illustrates the problem.

ddd@Marypuce tmp> cat glop.cpp
#include <iostream>

int main()
{
std::cerr << "Hello World\n";
}
ddd@Marypuce tmp> c++ -c -g glop.cpp -mmacosx-version-min=10.6 -o glop.o
ddd@Marypuce tmp> c++ -g glop.o -mmacosx-version-min=10.6 -o glop
ddd@Marypuce tmp> lldb glop
Current executable set to 'glop' (x86_64).
(lldb) b glop.cpp:5
Breakpoint 1: no locations (pending).
WARNING: Unable to resolve breakpoint to any actual locations.
(lldb) ^D
ddd@Marypuce tmp> c++ -g glop.cpp -mmacosx-version-min=10.6 -o glop
ddd@Marypuce tmp> lldb glop
Current executable set to 'glop' (x86_64).
(lldb) b glop.cpp:5
Breakpoint 1: where = glop`main + 22 at glop.cpp:5, address = 0x0000000100000e56

[Update] I initially thought the -mmacosx-version-min=10.6 option was necessary for this problem to show up. But it’s also broken without it. I ran the c++ commands with -v to see what the difference was, and apparently, it’s many little things. So separate compilation with debug symbols just does not work. OK, maybe it’s more a compiler thing than a debug thing. So maybe LLDB is not the piece of crap there. Still, that’s where the problems shows up.

This annoying bug shows how fragile this new support is. By making LLDB the default, and integrating it relatively well within Xcode, Apple is trying to slowly boil a frog here. But if you use the tools in a non-standard way, you might be burnt.

[Update 2] I incorrectly blamed clang and lldb for a problem that is actually with ccache. I am running ccache version 3.1.9 from MacPorts. If I get it out of the way, everything is back to normal. I sent a bug report email to the ccache, clang and lldb mailing lists hoping this will help someone else.

Categories: Apple, C++, MacOS X, Programming

5 Genre-Defining Games Forgotten by History

An interesting video talking about genre-defining games. I wrote one of them, Alpha Waves, as described in an earlier article.

The video author does not seem to like the gameplay of Alpha Waves very much. But some people did love it. Just last year, a computer museum in Nice had Alpha Waves running on an Atari ST, and I remember being amazed to see young kids play with it for extended periods of time.

BOTW (Bug of the Week): iCloud synchronization that won’t

November 12, 2013 1 comment

On my iPhone, I have a guy, let’s call him “Laurent”. And I have his email address there. It looks like this:

Laurent

home: boo@baz.it

Then later I entered a contact on my Mac with full details (phone number, address, etc). I tried to sync by connecting the USB cable. I was naive. On Mavericks and iOS7, you can’t trigger a sync like this. It has to go through iCloud. Boy, do I feel secure giving all my contact data to Apple and the NSA, but that’s another topic. On the Mac, it looks like this:

Laurent

work: foo@bar.com

home: boo@baz.it

So now, after a few seconds, I see that it “sync’ed” something, because now on the Mac, I have the same email address twice. I.e. it looks like this:

Laurent

work: foo@bar.com

home: boo@baz.it

home:boo@baz.it.

Needless to say, I suppress the second address, right? You have to wonder why Contacts didn’t do it by itself. I guess it’s for my own good. So now on the Mac, I’m back to:

Laurent

work: foo@bar.com

home: boo@baz.it

Back to the iPhone, hoping that this time, it had sync’d the entire vCard. But no, it’s waaaay to smart for something that simple. Now, on the iPhone, it removed the email address, but did not add the rest. So my card looks like this:

Laurent

That’s a joke, right?

Categories: Uncategorized Tags:

Connecting Mavericks to a Freebox: Oh the pain!

I’m very frustrated. Today, I wasted basically two or three hours fighting unreliable software implementing one of the most basic features in the world of networking, namely file sharing. I ought to be simple, it used to work, but if my experience is representative, it’s complexly broken nowadays. Grenouille bouillie.

What I tried to do is not that complicated. We have a Freebox at home, it’s basically a DSL modem with many features, including the possibility to act as a NAS. So I connected my external drives, and tried to connect to them with my Macs.

It worked. I was happy. I started copying my files around. I noticed that it was very reactive. For example, I could eject a disk from the NAS user interface (a web GUI that is relatively well designed), and instantly, the file server would restart. I saw a message on the Macs saying that the server had shut down, and a couple of seconds later, I was back in business.

Then something happened, and everything stopped working at once.

It’s frustrating, because I know exactly what I did at that moment. I reformatted a disk with the NAS user interface. That disk was initially formatted as HFS+, which the NAS would expose as read only. So I reformatted it as Ext4.

And suddenly, the file server stopped working, even when I removed the disk in question. That leads me to believe I changed something else without knowing it. Maybe the GUI changed some configuration behind my back? I have no idea. All I know is that I spent the last two hours trying to understand how to revert my configuration so that I would be able to share disks again.

Symptoms: I connect to the NAS, and it refuses to show my disks. If I disable Mac sharing (AFP) and only enable PC sharing (SMB), then I can connect to the NAS, but somewhat unreliably.

I suspect the problem is on the Mavericks side of things, because connexions to another NAS I have at home are equally flaky. One minute it transfers dozen of files per second, the next it’s as if I was writing to a floppy disk. Transfers from other protocols (e.g. using a web browser) are fast and reliable, so I don’t think it’s a Wifi or network issue.

How annoying.

 

Animation and 3D: the web is doing it wrong

In Animation and 3D: the web is doing it wrong, I argue that the way the web does animation and 3D is completely bogus and deserves to die. With Tao Presentations, we offer a dynamic document description language that lets us write shorter code that is much closer to storytelling. We’d like to bring this to the web.

Have you ever created a dynamic animation on a web site, or displayed a 3D object? Really, why is it so complicated? Why should I learn how to use half a dozen libraries, write dozens of line of boilerplate HTML, WebGL and CSS code, just to rotate some text on the screen or display a 3D object? Why do I need three (or four, or five) languages, libraries or frameworks to design a single animated web page?
In the realm of business presentations, Tao Presentations solved this problem with a 3D dynamic document description language, letting you easily create sophisticated interactive 3D animations and presentations. What if we brought this very innovative platform to the web? What kind of applications would become possible if we improved web browsers in the areas of storytelling, interactivity, 3D or multimedia?

La SNCF en flagrant délit d’IP-tracking

La SNCF augmente son prix de 41% en deux minutes

La SNCF augmente son prix de 41% en deux minutes

La SNCF affirme ne pas pratiquer l’IP tracking, J’ai du mal à y croire.

Il y a quelques minutes, ma femme va sur le site Voyages SNCF, et demande un billet Paris-Antibes. Prix du billet: 80€. “Attention, dernières places à ce prix”, bien sûr. Mais à un moment, elle fait une erreur, et décide de refaire une recherche sur le même site. Le même billet passe soudainement à 113€.

Je fais un essai depuis un autre navigateur, puis depuis une autre machine dans la même maison (donc même adresse IP depuis l’extérieur). Le billet reste coincé à 113€.

Mais, histoire de vérifier si les billets à 80€ ont vraiment été épuisés (la théorie du blog de la SNCF ci-dessus), je décide de passer par mon smartphone en 3G. Du coup, forcément, changement d’adresse IP. Et là, surprise (pas vraiment, en fait), je retrouve le billet à 80€. Que j’achète.

Le billet acheté: 80€ seulement !

Le billet acheté: 80€

Alor, si la SNCF ne fait pas d’IP tracking, pourquoi ce que je viens de décrire se passe à chaque fois? Ce phénomène ne peut pas s’expliquer par l’épuisement des billets à un certain palier de tarif; parce que les prix affichés sur un même ordinateur dépendent de l’IP utilisée !

Paul Graham recommends doing things that don’t scale

As usual, Paul Graham writes an interesting piece about startups. He recommends doing things that don’t scale. Thinking like a big company is a sure way to fail. It’s a reassuring piece for the startup creator that I am, because at Taodyne, we are indeed in this phase where you do everything yourself and you’d need 48 hours a day to do the basics. Good to know that the solution to this problem is to keep working.

Connect this to the survivor bias. This is a very serious cognitive bias, which makes us look only at the survivors, at the planes who return from combat, at the successful entrepreneurs. Because we don’t look at the dead startups or planes that were shot down, we build our statistics on a biased sample. As a result, we make incorrect assumptions. For example, if the planes that return have mostly been shot in the tail and wings, you might deduce that this is where planes are being shot at, so that’s the parts you need to protect, when in reality what this proves is that these are the parts that don’t prevent a plane from returning when shot. Very useful.

Last interesting link of the day is the discussion about bullying on the Linux Kernel Mailing List (LKML). Sarah Sharp, a female Intel engineer, stands up to Linus Torvalds and asks him to stop verbal abuse. It’s an interesting conflict between very smart people. To me, there’s a lot of cultural difference at play here (one of the main topics of Grenouille Bouillie). For example, I learned from Torvalds what Management by Perkele means. On one side, it’s legitimate for Sarah to explain that she is offended by Linus’ behavior. On the other hand, it’s legitimate for Linus to keep doing what works.

Sarah reminds me of a very good friend of mine and former colleague, Karen Noel, a very sharp engineer who joined me on the HPVM project and taught me everything I forgot about VMS. Like Sarah, Karen was willing to stand up her ground while remaining very polite.

Apple backups and RAID are not reliable

You’d think that if you use RAID1 and multiple redundant, distributed backups with hourly backups, daily backups, etc, you’d be safe? Think again. If your backup software lies to you, you may not realize it until it’s way too late. If you RAID software does not deem it worthy to mention that a disk failed, what good is it?

Read more…

The Grizzly vs. the Frog

The Grizzly vs. the Frog

Guess who wins when you put a frog in front of a grizzly.

As a french national and entrepreneur myself, I am a bit appalled at how little our government understands the basics of economy. The way French Minister Arnaud Montebourg dealt with Mittal or Titan shows this crass ignorance. It does not save jobs, it just pisses investors off.

Here is one: when a US company wants to buy a plant, you don’t tell them to speak with the unions first. What if Arnaud Montebourg visited the US to negociate a big contract with US airlines to sell them planes, and was told by the US department to get in line at the airport front desk to talk with a company representative?…

Boiled frog syndrom: France has to stop thinking that unions are representative in economic matters. They are only relevant as far as people matters are concerned. For economics, French unions like the CGT have repeatedly demonstrated their ignorance.

Categories: Uncategorized

The promise of glasses-free 3D – Dolby’s vision

The promise of glasses-free 3D – Dolby’s vision

The article is a little low on details. Based on the fact that the article mentions Philips displays, my guess is that this is based on the 2D+Z technology. In other words, the picture is split between a color map and a depth map.

The benefits of this approach is that it is easy to transmit over a regular channel, since the picture is basically the same size and format as a regular HDTV picture. The drawback is that the display has to reconstruct at least two images (and for auto-stereoscopic displays, several pictures) from the information.

It may seem simple to reconstruct the required pictures from a color map and a depth map. But in reality, it’s a bit problematic, because a single color map cannot encode both the color of the front objects and the color of the objects it hides.

Imagine for example that you have a plane in the front, and the sky in the background. The sky is blue, the plane is grey. Now, at the border of the plane, the gray hides the blue. But the two eyes don’t see this limit at the same exact location. It’s a phenomenon called parallax.

So what happens is that for at least one of the pictures, the system has to “invent” colors. Basically, it’s going to extrapolate the background color of the parts you can’s see based on the color of the parts you can see.

This is one of the drawbacks of the Philips approach compared to traditional stereoscopic and auto-stereoscopic systems that send all the pictures separately (meaning that they don’t need to invent colors).

This is not very visible on movies, if at all. That’s because borders of real objects tend to be a bit fuzzy. But for synthetic images as those created by Tao Presentations, this tends to cause relatively visible artifacts.

I wonder if Dolby solved that specific problem…

Follow

Get every new post delivered to your Inbox.

Join 392 other followers

%d bloggers like this: