tan is currently certified at Journeyer level.

Name: Olivier Parisy
Member since: 2006-07-27 21:26:59
Last Login: 2009-03-02 12:18:50

FOAF RDF Share This

Notes:

Just a no-fuss diary I use to keep some notes. May be useful to others too?

I am currently making some not-exactly-convincing efforts to practically grasp Python, and especially networking (Twitter) and webapps (Django) frameworks. But I'm lacking time to implement medium-sized "training" projects beyond the obvious tutorials...

Should you share some of my interests, this is my del.icio.us account.

Oh, and I'm giving a try to OpenID too. I chose to use ClaimID: Olivier Parisy' ClaimID

Recent blog entries by tan

Syndication: RSS 2.0
16 Sep 2008 (updated 16 Sep 2008 at 20:52 UTC) »

Stack Overflow is finally alive! Nice!

I tried to register yesterday, and stumbled upon an OpenID form for the first time.

I'm afraid I have no OpenID provider for now; it does seem like something I should choose with some care.

Does anyone here have a nice OSS-oriented OpenID provider to suggest? On a related note, is there any chance that Advogato will provide this service someday?

Edit: I did find out about the site on Joel's newsletter, not on Slashdot! Honest! :-D

Some Good ol' Benchmarking

Tom Tromey just posted on the gcj mailing-list a link to an interesting Java to C benchmark. It's actually a followup to a previous one, to which other Java runtimes have been added.

Basically, that's a comparison of micro-benchmarks between some "classical" (JITed) Java environments, compiled ones (GCJ and JET) and the equivalent C programs.

As I understand it, the results show that comparing Java to C performance-wise does not have much meaning. Depending on the task at hand, Java timings are in a +30% to -30% interval with respect to C performances.

If such a worn-out subject interest you, I would recommend reading the classical "An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl". I suppose some shootout results would be a nice read too (their FAQ is a must-read). Oh, look, there's even a detailed wikipedia page about languages comparison.

My Dream Language

I'm actually more interested, as stated in my previous post, by what may or may not help a library to gain acceptance. Execution time of "scripted" or VM-based languages is a typical FUD; runtime memory usage is more of a concern (especially when compiling to native). Linking to other languages is probably what matters more, actually. That's the only argument I could imagine in favor of C.

For application writing, it's clear to me that using a garbare-collected, multi-paradigms language (especially with a rich functional expressiveness) is a no-brainer, from a productivity and maintainability point of view. But for maximum reuse, what's needed is multiple, clearly-defined libraries. For which I'm afraid no perfect implementation environment exists.

I would love the above high-level characteristics (which rules out C, C++ and to a lesser extend Java), easy linking with existing C libraries (that one is OK with most languages), and natural, efficient reuse from other popular languages and environments (Java, C#, C++, Python and PHP easily come to mind).

Now I'm getting Boring

Ahh, the good old Graal of universal, transparent componentry... Perhaps some agnostic glue is needed... CORBA failed us, Web Services are overkill to fit together applicative components... Wouldn't D-BUS be more interesting in this case (but calls granularity should be properly thought out)?

So which paradigm/language/framework could provide us with some kind of universal "software mashup"? Any opinion (or better, bibliography) on this matter, which I feel is quite the opposite of a language comparison (would you fear the trolling)? Am I getting boring? :-)

If You're still with me

In (not so) other news, I noticed a revised edition of the Dragon Book was available. Among the new topics are better code analyze and optimization, JIT compiling, garbage collecting... I need this (pricy) beast!

Hi all,

I've been toying with the idea of implementing some networking protocol stuff for some time now. That was actually one of my motivations for working with native compilation of Java code to Win32 platform, but that proved disappointing. J2SE has a big, tightly coupled runtime / libraries set, and it seems difficult to produce lean and mean binaries out of it (that's my current experience anyway).

In the mean time since my last post on this matter, more than a year and a half ago, I gradually understood Java was not the weapon of choice for small, nicely desktop integrated tools (please disprove me!). It can be done, but I feel it goes against Java basic design decisions, which mean you're then kind of fighting against your platform. Productivity killer. Baaad.

So I'm kind of confused. What I want to do is some networking code. I will develop it as one or some libraries, and build some apps above it, since I feel there's nothing sadder that a great idea intermixed with some application code (at the end of the day, if someone want to reuse it, he'll spend a hell of a time figuring out which parts he actually needs).

The apps will be coded in a nice, productive language (I lean toward Python, or perhaps something more exotic to me like Factor).

The libraries would be coded under an LGPL or BSD license, for best reuse; but which language would you choose?

  • I can use some nice, high-level language; but I do not want to restrict reuse opportunities with the age-old "how sad this is coded in X when I'm coding in Y, I'll have to port/rewrite it".
  • I could code it using C, and provide bindings for some higher-level languages (which, I suppose, excludes C++ from the loop, as it's more difficult to bind to anything else than C). But as good as this is from a reuse point of view, and even if I'm a capable C coder, that is definitively a productivity killer and a sad jump in the past (no offence intended to enthusiast C coders, but I'm kind of accustomed to OOP, generics and automatic memory management now).

There's no win/win solution here, I'm afraid. So I'd like to get your opinion on this matter of maximum reuse / acceptation of a library, at the cost of language expressiveness.

On a related note: should I code in C, I'd prefer to use a portable foundation library since I'd like to target at least the linux and Win32 platform. It would be that less low-level details to bother with. It seems like the Apache Portable Runtime is a good candidate. Does it provide an NIO/select-like abstraction (event-driven networking)? Are there other similar platform-abstraction toolkits you could hint me to?

Regards.

rmathew proposed a patch following our discussion. It solved my SWT crashing issue and made its way to gcc trunk. Helping fixing this bug was a rather enjoyable experience, and remembered me how much I liked assembly language and low-level issues.

Anyway, a canonical SWT "HelloWorld" now works properly, as well as the tray variation I've initially chosen as a simple example.

Now that this code compiles and runs properly, I'm focusing on its packaging. NSIS seems like an obvious choice, but I'd first like to "clean" my compiled app.

Indeed, I'm kind of surprised by its size; this basic example weights 52MB. Stripping it and compressing it with the excellent UPX leads to a 4MB executable, but it still does feel like an awful lot. Perhaps some code analysis could remove unneeded parts? I'll have to goggle about this.

Following rmathew's advice, I looked for a cl.exe (the Win32 compiler) flag equivalent to gcj's -fno-omit-frame-pointer. Which actually exists.

I then had a fun little time disassembling the resulting library to ensure this flag had the desired effect (I used REC for this purpose, a nice but sadly not open-sourced software).

Well, it did, but this did not solve my crashing issues. At this point, it seems like I really should study and trace gcj's stack unwinding code...

5 older entries...

 

tan certified others as follows:

Others have certified tan as follows:

  • wingo certified tan as Journeyer

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

X
Share this page