Python で実装され、その後 Java にも移植されたソートアルゴリズムである TimSort が盛大にバグっていることが発見されました。 このバグがどのようにして発生するのかについては、以下のドキュメントを精査して下さい。 TimSort fails with ArrayIndexOutOfBoundsException on worst case long arrays OpenJDK’s java.utils.Collection.sort() is broken: The good, the bad and the worst case どんなことが起こるのか 通常の利用では想定しえない場所でArrayIndexOutOfBoundsExceptionが発生します。 例えば、以下のようなスタックトレースになります。 Exception in thread "main" jav
Are you a seasoned Java developer that wishes to learn Python? Perhaps you’ve just joined a project where a chunk of system integration code is written in Python. Or perhaps you need to implement a report generation module in the next sprint and your colleague mentioned that Python would be the perfect tool for the job. In any case, are you in a situation where you have to pick up the Python progr
I was recently looking at the source of a wxPython-based GUI application, about 45.5KLOC in size, not counting the libraries used (e.g. Twisted). The code was written by Java developers who are relatively new to Python, and it suffers from some performance issues (like a 30-second startup time). In examining the code, I found that they had done lots of things that make sense in Java, but which suc
GPL Requires python 2.7 https://github.com/andrewromanenco/pyjvm PyJVM is not full implementation of JVM7. All byte code instructions are supported, but many native methods from Java Api are not. There is good chance your java application will finish with exception: Exception: Op (SOME_NAME_HERE) is not yet supported in natives Which means that this specific native method is not ready yet. See tes
http://nhiro.org/learn_language/with_statement.html Java7は名前の通りtryと抱き合わせになっている。C#とPythonは分離されている。なのでJava7でC#やPythonと同じ挙動をしたければ必要なくても空のfinallyを書くことになる。(追記: finallyやexceptを伴わないtryもOKでした。thanks id:nowokay) 本体が正常終了または例外を投げて異常終了した場合のどちらでも呼ばれる「後片付けメソッド」はC#だとDispose、Java7だとclose、 Pythonだと__exit__。しかしPython以外は引数を取らない。本体が正常に終了したのかどうかはどうやって知るんだろうか。知る必要はないという判断なんだろうか。追記: Pythonがどんな引数を取るのか他の言語の人には想像がつきにくいらしいの
元ネタ: map_between をやってみる - Study08.net 対シンバシ殲滅用人型機動兵器 http://d.hatena.ne.jp/imagawa_yakata/20120105/1325781387 最近、Java のコードばかり書いています。 Java には、Python にはない wikipedia:抽象型 としてのインターフェースがあります。 パーフェクト Java から引用すると、インターフェースは、 オブジェクトにそのインターフェースの決めた振る舞いを期待することの表明 だと説明されています。また Java でプログラミングする上で、インターフェースを意識した抽象化が、複雑さの軽減、保守しやすいコードを書くのに重要だとあります *1 。 以前、EuroPython 2011 のイベントレポートを執筆した際に *2 、私はイテレーターという用語の扱い方に何となく
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く