Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:OSGi is great (Score 1) 63

We have had different experiences. When I started using it, I definitely struggled many times with OSGi (or more like setting up some containers for my specific needs), but not any more than I did with any other 'advanced' framework (including JEE). But on the (full-OSGi) project I'm working on, OSGi is not costing us anything. We're doing agile development (Scrum) and we're very much feature driven. If we were wasting too much time fighting against OSGi, I'd totally agree with you. But we're not. And our team has members that are just "Java developers" that don't know the specifics of OSGi that much, but we integrated OSGi best practices into our coding guide and it's working well.

In fact, I think OSGi is costing us *less*, because for an application like the one we're developing that requires modularity, we would have ended up writing our own inferior, more expensive and most of all not standardized "plugin system". In fact, in my company there are many different kinds of modules systems that were previously developed and we can't easily exchange modules between those systems (developed for different projects, clients, etc). With OSGi, we can start to share more than just classes or jars. Good bundles do half the integration work.

Anyway I'm not trying to convince you. OSGi is no silver bullet, and it can be difficult in practice when you're plugging into legacy. But when it's working, then it's really nice. My non-OSGi inclined co-workers even grew to like it.

Comment Re:OSGi is great (Score 2, Interesting) 63

I do agree there's a problem with legacy Java code that makes use of features that are hardly reconcilable with OSGi. I think most of those libs that don't get along well with OSGi are doing something wrong, but sometimes they're trying to be too smart ;). Incompatible legacy code is pretty much the only reason one should run classloader issues, because frankly I find OSGi makes things easier here (especially if you generate your manifest with bnd, which avoids most of the mistakes). One way or another, I agree we most often have no choice but to use those libraries (legacy or not). We can't know "before" if the third party Jars we're using will get along well. At work, I was lucky for one huge software stack (which included C++ parts) and had basically no trouble (beside the initial pain to help my co-workers going) porting the whole thing to OSGi. Another stack is still not ported because of dependencies on those bad JARs (packages split across Jars, having API that's not theirs, etc).

A lot of Java projects are now OSGi-ready though. It's really taking off. I also agree that the tooling is not perfect yet, but it's improving. If you are using Eclipse, I recommend using BndTools rather than PDE. It's a lot less stressful.

In general, I believe the constraints clean programming in OSGi put on the developer lead to better design/architecture, cleaner separation of concerns, even if you're going to dump OSGi after that. But usually when you reach that point you usually get to like it: like coffee, it tastes bad at first. Unlike coffee though, there are too many ways to do OSGi wrong, because there's a lot of contradicting approaches around there. The common wisdom is to avoid the OSGi API when we can (it can be avoided if we don't have to register services dynamically or do framework-level stuff), but after that all hell breaks lose when it comes to testing, building, what editor to use etc. Too many dissenting voices make it long to find a non-intrusive way, but it exists! :)

Damn, I sound like a commercial, but really OSGi and DI are the only thing that made me enjoy Java. I disliked it before. Also, OSGi is a nice way to do mix polyglot JVM components and that's the "next big thing" (which is not novel at all, but all this has happened before, and will happen again...)

Comment OSGi is great (Score 3, Informative) 63

OSGi and DI frameworks such as Google Guice are giving Java a new life. Of course 95% of Slashdot is stuck using Perl but thanks for your review (in fact I'm mostly replying here to compensate with the retarded posts). Sprint DM have been standardized in OSGi and renamed "OSGi Blueprint Services" and while I've not used them (because Declarative Services were enough for my needs and I never was a Spring user), I plan on checking them soon. A lot of people are using Spring and this is the way to get them interested in OSGi.

By the way, another great (but free/creative commons) book on OSGi is Neil Bartlett's "OSGi in Practice". I can't recommend it enough. Unfortunately, it's still in draft so some parts are not completed, but I learnt more about OSGi reading this book than any other resource I could find (printed or online), except maybe looking at the frameworks' code directly.

Comment Re:Why the fuck bother (Score 1) 204

A branch of the Scala IDE for eclipse shows when there's an implicit conversion by underlining the converted expression. I guess this feature will come to other editors soon enough. Also, to have this conversion, you must have imported it (or its package object). The predefined conversions in scala.Predef are doing what you'd expect them to do and aren't very dangerous (much less, than say, built-in automatic conversion in some dynamic languages).

Implicit parameters are just like dynamic default values. Not a big deal really, especially since Scaladoc hides them by default, you don't even have to know they're here. But they open for a world of possibilities to change the behavior of an API.

In general, implicits in Scala are really a powerful tool and they're useful for API designers more than 'common' users. You said it's not about FP, but Scalaz which is the FP lib for Scala uses them to their fullest extent to replace class inheritance (considered harmful) altogether.

Comment Alternate JVM languages will carry the JVM. (Score 3, Insightful) 558

Although Java-the-language has stagnated a bit (I don't know if JDK 7 will ever be complete, due to all the feature cramming), but there's been a lot of activity during the past few years on other languages that run on Java-the-platform. Groovy and Rhino (Javascript) have been available for the JVM for quite a while. JRuby is actually faster than "native" Ruby for a lot of real-world applications. The Lisp-like Clojure language has a lot of fans. IMO, Scala is the most interesting out of all of these, with a very sophisticated type system, as well as functional features that the cool OCaml and Haskell kids seem to love.

All of these alternate languages can use the wealth of libraries available for Java, generally on all platforms on which the JVM runs. For example, I know of Scala apps that can run on Andriod, which is close enough to Sun's VM.

Comment Re:No mention of X-platform (Score 2, Insightful) 598

Being myself a Scala fan, I agree with you that it is painful that Sun did not make the JVM with language agnosticism in mind, and that is the main superiority of .NET over the Java platform (the very fact that the best I can call it is "the Java platform", while .NET is not called the "C# platform", is a good hint).

Concerning type erasure, as it has been pointed out by my sibling-thread, it's a design choice. Scala also has adopted type erasure with generics. The other choice could have been made, that is encode type annotations for generics in the bytecode. There is nothing in the JVM preventing it to be done, since it can be done manually, the [alternative language] compiler can add the required info. In Scala, the choice has been made to mimics Java (and I guess, the more the generated code will look like Java, the more we will benefit from runtime optimizations). Thanks to Scala's very powerful syntax, there is a library called Manifest that automatically adds the type information and easily allows you to code as if there were no type erasure.

Still, I agree this feels like a weird rule, especially the first time you run into it. It is not the expected uniform behavior. The same goes will tail-call optimization that should be in the JVM (and should be in OpenJDK7), closures, etc. Generally speaking, the JVM should be a generic platform for languages exactly like the .NET framework is.

But I am one of those guys who wouldn't run Scala on .NET, the general anti-NET guy (not anti-Mono). Even if some legal doubt surrounding free .NET implementations remain (even with the recent community promise, but there's always a legal risk with any software you use anyway), this is purely an emotional and political decision. It's fashionable to call my kind "freetards" :). Yet, I've been using and enjoying free software for a long time now, and I remember your stories (notably how you were interviewed by Microsoft and told them you would join them if they changed their business model and developed free software) so I feel you're not the last to take emotional and political decisions. Please note that I appreciate the existence of a Free .NET runtime.

You have done an impressive work with Mono. Don't you think the same effort could have been to make the [renamed] Java platform as generic and powerful at the .NET environment? Sure, there is a lot of inertia with Sun, but if someone could have achieved it, that would have been you. At the end of the day, you are still bound by Microsoft standards, are they so much better than Sun's that it justified starting a free .NET implementation from scratch (granted, neither HotSpot nor the JDK were free at the time, but there were already free partial implementations) ? I have read your reasoning at the time of creation of Mono. Of course, after all this work it is late to have second thoughts and regrets, but in retrospective, was it such a good idea?

We both know the linked article is a joke and Mono doesn't seem to be gaining any real share. Sure, C# and .NET are strong, but from what I see here Mono is only marginally used even for server-side solutions, and there is a lot of rejection on the desktop from the free software community (which I agree with, even if I have had F-Spot and Tomboy, I do think running Mono for two apps is excessive).

At the end of the day, I just regret the Mono vs Java situation created yet another division in the community. Of course, and I thank you for it, you are very much responsible for OpenJDK becoming free. And I agree that Sun's strategy regarding both licensing, evolution and genericity of the Java platform has been awful. Yet, right now, between the two, most free software enthusiasts would choose Java. There is no way to rewrite the past, but maybe there could be a way for a better outcome.

Comment My questions (Score 1) 83

(1) Do you think Jazz could gain from a distributed model, like git does for source control management, where the repositories can be forked and kept synchronized upstream/downstream (a bit like a "progressive fork" where fixes can be shared but the project can be forked for various reasons)? I heard there is a git connector in incubation but it seems to me more than just code artifacts should be distributed. After enjoying the many benefits of distributed SCMs, it's hard to go back, and I think at least issue management could gain from the same model.

(2) Do you think creating your own SCM was the good decision, in opposition with using metadata in combination with SVN or git?

(3) Are there any plans to liberate Jazz under the EPL or another Free license, and do you believe Jazz can really gain enough traction as it is? There are plans to integrate Google Wave in the Eclipse Communications Framework by 2010, EGit is coming fast and has a lot of momentum among Eclipse developers, Mylin is getting better with every release, issue trackers are getting a lot better, continuous integration engines such as Hudson work really well... To me it looks like Free Software alternatives are going to beat Jazz at its game (not as well integrated at first), because this is typically software that companies want for free, and Free Software communities want Free Software (I know Jazz is gratis for Open Source projects).

(4) What's your opinion on the new wave of JVM languages such as Scala or Clojure? Did you try playing with them?

(5) Are you planning on participating in the development of E4? Regarding alternative JVM languages, there is a real need to refactor JDT to extract a "JVM-language" development tooling on which the specific Java - the language - tooling is built. The current architecture has been problematic to the development of good environments for alternative JVM languages (Groovy, Scala, JRuby, ...) and the current solution is using Aspects with EquinoxAspects to hack on JDT (my understanding is that there are many problems with this hack). Refactoring JDT is something that would be great for E4 (and truly useful), but JDT seems very much to be IBM's turf and I don't see it coming. Any opinion on this, as the original lead on JDT? :)

Comment Re:Developer tools - eclipse died in Debian (Score 1) 165

Anyway, Eclipse is one of those self-updating apps with its own package manager/provisioning platform (p2). It's not really designed to be installed as a shared program, unfortunately so. As a Debian user and Eclipse developer, I don't find it such a big deal to simply decompress the Eclipse archive in the home directly.

Comment Re:Seperation of Church and State? Not in France? (Score 1) 890

Oh, you sound like a Redditer, sad (atheist that doesn't feel like trashing religious people here). I think you won't find a country where there is more separation of Church and State than France. The closest countries are Belgium and Turkey. In France no official swears on the Bible. In France at trials people swear on their honor, not on some mythological novel 9/10th of the population doesn't care about. In the United States it is about "all religions" OK in public, and in France about "no religion" in public.

In fact, this goes so far that there is a French word for it that has no exact English equivalent: http://en.wikipedia.org/wiki/La%C3%AFcit%C3%A9

I never figured why you "atheists" need to justify your lack of belief and disprove God's existence. Who gives a shit really? Over here in France, I have maybe met 10-15 true believers of my generation in my whole life, including a few who were simply insane.

Comment Re:Why is multicore programming so hard? (Score 5, Interesting) 256

I know it was partially true, I should remember not to be too lazy when posting on /. :).

Note that I was not talking about automatic parallelization which is indeed possible only with pure languages (and ghc is experimenting on it); but simply about the fact that is is easier to parallelize an application with immutable data structures since you need to care a lot less about synchronization. For instance, the Erlang actors model (also in other languages like Scala on the JVM) still requires the developer to define the tasks to be parallelized, yet immutable data structures make the developer's life a lot easier with respect to concurrent access and usually provide better performance.

My "It is true" was referring to "functional languages" which do usually privilege immutable data structures, not to Haskell or Lisp specifically (which as you said has many variants with mutable structures focused libraries). As you said, Clojure is itself a Lisp-1 and it does privilege immutable data structures and secure concurrent access with Refs/STM or agents. What is more interesting in the Clojure model (compared to Scala's, since they are often compared even though their differences, as functional languages and Java challengers on the JVM) is that it doesn't allow unsafe practices (all must be immutable except in variables local to a thread, etc).

Interesting times on the JVM indeed.

Comment Re:Why is multicore programming so hard? (Score 5, Informative) 256

Haven't video game programmers been doing it forever, doing some things on the CPU, some on the graphics card?

The problem is shared-memory, not multi-processor or core itself. Graphics card have dedicated memory or reserve a chunk of the main memory.

And I heard functional languages like Lisp/Haskell are good at these multi-core tasks, is that true?

It is true, because they privilege immutable data structures which are safe to access concurrently.

Comment Re:Install, did you say? (Score 1) 148

Because they are "Open Source" business-minded and not "Free Software" supporters, meaning they don't give a fuck about providing a full Free stack. I have come to the tragic conclusion that most Open Source contributors are now running Windows.

On the other hand, would they care to make their software Free if it weren't for the Open Source movement? At least we can port the best written software (if its core is not too tightly-coupled to Win32 APIs), so still better than nothing. The biggest problem is that it completely overshadowed the moral aspects of Free Software, which are now to of many corporate Open Source developers nothing but a joke under the pretense of pragmatism and practicality.

Slashdot Top Deals

8 Catfish = 1 Octo-puss

Working...