■_ ところで
例のやさしいC++ですが、 全ページというのは論外として、 適当なページを(それなりの解像度で)スキャンして見てもらえれば どんな本なのかというのは一目瞭然だと思うのですが、 どこか適当な置き場所ないでしょうか?
といっても、スキャンしてpdfにはできるけどjpegとかpngは辛いなあ。 どうしよう(要はスキャナがありません)。
一つ前のページへ
2007年1月(下旬)
一つ後のページへ
2007年12月(中旬)
例のやさしいC++ですが、 全ページというのは論外として、 適当なページを(それなりの解像度で)スキャンして見てもらえれば どんな本なのかというのは一目瞭然だと思うのですが、 どこか適当な置き場所ないでしょうか?
といっても、スキャンしてpdfにはできるけどjpegとかpngは辛いなあ。 どうしよう(要はスキャナがありません)。
昨日の夜にreddit日本語版の上位にいたけど。 第15回 誰でもプログラミング | WIRED VISION
黎明期のパソコンにはBASICインタプリタが標準搭載されていたため、画面に絵を描いたりして 楽しむ日曜プログラマが大量に出現したものですが、最近は計算機が高度化したのと同時にプロ グラミングの敷居まで高くなってしまい、自分でプログラムを作って楽しむ人が昔に比べてかえ って減ってしまいました。 すぐれたソフトウェアが大量に世の中に出回っているため、わざわざ自分で何か作ってみようと いう気にならないのもプログラミングが流行らない理由のひとつかもしれません。プロが作る料 理の1/10のクオリティの料理を自分で作ることは可能かもしれませんが、市販ソフトの1/10のク オリティのソフトウェアを自作することはほとんど不可能ですから、自分でソフトウェアを作っ てみようという気持ちになりにくいでしょう。 (ry ■事情の変化 ところがこのような状況は最近になって変わりつつあります。まず、最近のWebブラウザには JavaScriptが標準装備されていますから、特に開発環境をインストールしなくてもちょっとした プログラミングを簡単に試してみることが可能になりましたし、MITで開発されている Processing のようなシステムを利用すれば「line(10,10,100,100);」のようなプログラムを入 力して「再生ボタン」を押すだけで、画面上にウィンドウが表示されて直線が描画することがで きます。このようなシステムは昔のBASIC並に手軽に使えるうえに、最新のプログラミング技術 やWeb技術も使うことができます。
絵を描くという点では(昔の)BASICに一歩及ばなかったけどその辺の事情も 変わる可能性があると。JavaScriptの天下?
数日前に redditで拾ったネタ。 pdfへのリンクだったのでスルーしかかったけど、内容を読んでみると結構面白かった。
Python vs Erlang Erlangとは ・関数型言語 ・Fault tolerant (ASCII.jp - アスキー デジタル用語辞典 - フォールトトレラント) ・大量のプロセスやスレッドに対してスケーラブルである ・並列なタスクや distibuted なタスク向けに作られた Erlang Distinctions Erlangの特長 ・Pythonと同様対話的なシェルを持っている ・Single assignment “variables” ・強力なパターンマッチング ・“文字列”は int のリストの構文糖(syntactic sugar) ・文字列は Latin-1 が仮定されている ・Erlangは “=”をパターンマッチングのために使用している Concurrency Support 並列性のサポート ・Erlangのプロセスは軽量スレッドのようなもの ・プロセスはメモリを共有しない ・プロセス間のやり取りはメッセージパッシングのみで行われる ・プロセスは非常に高速かつ安価に生成される ・プロセスはリンクすることが可能なので、一つのプロセスが他のプロセス (それがたとえ別のマシン上のものであっても)のエラーを処理することができる Pattern Matching パターンマッチング %% Patterns for multiple dispatch % quicksort:qsort(List) %% Sort a list of items -module(quicksort). -export([qsort/1]). qsort([]) -> []; qsort([Pivot|Rest]) -> qsort([ X || X <- Rest, X < Pivot]) ++ [Pivot] ++ qsort([ Y || Y <- Rest, Y > Pivot]). %% Binary Patterns uuencode(BitStr) -> << (X+32):8 || <<X:6>> <= BitStr >>. uudecode(Text) -> << (X-32):6 || <<X:8>> <= Text >>. Erlang がPythonから取り入れるべきもの ・文字列の取り扱い、特にUnicode ・XMLの処理 ・GUIツールに対するバインディング ・より良い構文 ;-) Python がErlangから取り入れるべきもの ・複数のCPUをまたがるまたぐ軽量スレッド (see http://wiki.python.org/moin/ParallelProcessing) ・ Hot-swappable code #ナニモノ? ・パターンマッチング (see PyLinda, CTypes, Candygram)
vs Icon and Tcl
Iconとは
・高水準な言語
・インタプリタ型
・バイトコードを使っている
・手続き型
・テキスト処理が得意
・アリゾナ大学で開発された
Why Do Pythonistas Care?
なぜPythonista達が注目するのか?
・ジェネレータをもらってきた元である
・Iconではyieldの代わりにsuspendを使っている
・実装に関する良い書籍がある
・Tim Petersがこの言語を愛している
Iconプログラムのサンプル
procedure main(args)
writes("Hello, ")
# Default.
name := "World”
# Try to get the first name.
name := get(args)
# If get'ing list fails, default is used.
writes(name)
Iconに欠けているもの
・規模の大きな標準ライブラリ
・活発なコミュニティ
・手続き型パラダイム以外の何か
・UniconというOOPバージョンがある
Tcl
・テキスト操作をする言語
・Tkのためのもの(?)
・手続き型
・極端なインタプリタ型(VERY interpreted)
・どこでも使える
Cool Features
イカシた機能
・すべてが文字列である
・コードでさえも!
・非常に単純かつ一貫性のある構文
・すべては評価された文字列のようなもの
How Python Is Better
・ Tc.s syntax can be annoying.
Tclの構文にはいらいらするかもしれない
・ E.g., } else { only way to continue a command.
・ EVERYTHING being a string makes it slow.
すべてが文字列なので遅い
vs Ruby
Like Python, Ruby is a dynamically typed object
oriented language
Ruby is a bit more “pure” in its object orientation
(instance variables are not available outside of the
class)
Ruby’s syntax incorporates a mix of ideas from
Smalltalk, Lisp and Perl.
(Arguably) Nice Ruby Syntax
(議論の余地があるかもしれない)ナイスなRubyの構文
Implicit “self”
query_methods? - boolean by convention
danger_methods! - destructive in some way
map/filter/reduce chaining
irb> names = ["abcd", "efgh", "ijklm", "nopq", "stu", "vwx", "yz"]
=> ["abcd", "efgh", "ijklm", "nopq", "stu", "vwx", "yz"]
暗黙の“self”
?が末尾についた問い合わせメソッド - 規約により真偽値を返す
!が末尾についた危険なメソッド - なんらかの破壊的操作を行う
map/filter/reduce の連鎖
Map/filter/reduce chaining
> names = ["abcd", "efgh", "ijklm", "nopq", "stu", "vwx", "yz"]
=> ["abcd", "efgh", "ijklm", "nopq", "stu", "vwx", "yz"]
> names.find_all{|name| name.length>3}.map{|name| name.reverse}.inject({}){|hash, item| hash[item] = item.size; hash}
=> {"qpon"=>4, "mlkji"=>, "hgfe"=>4, "dcba"=>4}
What is a block?
ブロックとは何か?
A block is an anonymous function that closes over the surrounding variable state
ブロックとは、その外側にある変数の状態を包み込んだ名前のない関数(anonymous function)
である
implicitly returns its value passed to a method with special syntax
特殊な構文を有するメソッドに暗黙のうちに値を返す
Blocks in Ruby are kind of like...
Rubyにおけるブロックとはこんな感じのもの…
Lambda functions (except Ruby has a broken lambda too)
lambda関数(ただしRubyにはぶっ壊れたlambdaもある)
Functions as arguments to methods (except you can only have one per method)
メソッドに対する引数としての関数(ただしメソッド一つに対して一つしか渡せない)
Python 2.5 “with” statement and context_manager (except they can iterate)
Python 2.5 の“with”文とコンテキストマネージャ (ただしブロックは iterateできる)
Generators (except sort of reversed)
ジェネレータ (reveresd の類を除く)
Simple blocks versus lambda
単純なブロックと、lambadとの比較
Simple Ruby example:
names.find_all{|name| name.length>3}
Simple Python example with lambda:
names.find_all(lambda name: name.length > 3)
Ruby: bigger block
puts names.find_all{ |name|
if name[0..0]=="a"
length = count_whitespace(name)
elsif name[-1..-1]=="b"
length = count_control_chars(name)
else
length = count_vowels(name)
end
length>3
}
Python multiple lambda
myfunc(lambda x: x.dosomething(), lambda y: do_something(y))
Ugly Rubyisms
いただけないRubyイズム
Three ways to do everything
Massive class and method namespaces
“import *” by default
Global namespace for classes and “top-level”methods
....and many more...
何をやるにも三通りのやり方がある
規模の大きい(massive)クラスとメソッドの名前空間
デフォルトで "import *" の状態
クラスと“トップレベル”のメソッドに対するグローバルな名前空間と
他にもいろいろ…
パパのお言葉。 Python 3.0 alpha 2 Released!
This is just a quick post to let everyone know that Python 3.0a2 is released as of 10:30am PST (18:30 UTC) today (Friday December 7, 2007). I'm grateful to the many people who have contributed to this release, in particular new core developers Christian Heimes and Amaury Forgeot d'Arc. I wish I could list the many things that are new since 3.0a1 was released on August 31, but there are already many places where you can read up on that, so I'll skip this now. 8月31日にリリースした 3.0a1からの数多くのことがらをリストアップしたいのですが それはすでにいろいろなところで目にすることができるので、改めてわたしがここで することはありません。 However, I do want to mention that based upon the feedback for 3.0a1, we've decided to make the 'bytes' type immutable, and create a separate mutable bytes type, 'bytearray'. These two types are mutually compatible, but in the majority of cases you'll be using bytes, not bytearray. しかしここで、3.0aに対するフィードバックに基づいたものに言及したいと思います。 わたしたちは、'bytes’を変更不可能なものとし、変更可能なbyteの型である 'bytearray' を別個に作ることにしました。 これら二つの型は互換性のあるものですが、通常は bytearray ではなく byteのほうを 使うことになるでしょう。 I should also note that we've run into an issue with the Windows installers -- see the release page above. If anyone can help this, please write to python-dev at python.org. (The script that creates the installer is in the distribution as Tools/msi/msi.py.) ここでわたしは、わたしたちがWindowsのインストーラに関する問題に直面している ことを書きとめておかなければなりません。詳しくはリリースページを参照してください。 もしこのことに協力できることがあれば、どうぞ python-dev at python.org で発言してください(インストーラーを生成するスクリプトは Tools/msi/msi.pyに あります)。 And finally, a word of thanks to all the GHOP contestants who contributed documentation updates, and to Georg Brandl for collecting these and submitting them to Subversion. There are still many more tasks available!
なんかダメすぎ。 あと二週間ちょっとの時期にこれでいいのかとても不安。
nmake すると ext/pty で引っかかるのでとりあえずディレクトリごと削除
(先週の時点では何の問題もなかったのに?)。
Microsoft(R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
rc -I. -I. -I./../win32 -r -fomsvcr71-ruby19.res msvcr71-ruby19.rc
dmyext.obj
cl -nologo -LD main.obj dmyext.obj msvcr71-ruby19-static.lib msvcr71-ru
by19.res oldnames.lib user32.lib advapi32.lib shell32.lib ws2_32.lib -Femsvcr71-ruby19.dll -link -incremental:no -debug -opt:ref -opt:icf -def:msvcr71-ruby19.def
ライブラリ msvcr71-ruby19.lib とオブジェクト msvcr71-ruby19.exp を作成中
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "DllMain@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_Sleep@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_Sleep@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_accept@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_accept@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_bind@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_bind@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_connect@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_connect@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostbyaddr@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostbyaddr@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostbyname@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostbyname@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostname@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_gethostname@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getpeername@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getpeername@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getprotobyname@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getprotobyname@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getprotobynumber@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getprotobynumber@4" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getservbyname@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getservbyname@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getservbyport@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getservbyport@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getsockname@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getsockname@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getsockopt@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_getsockopt@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_ioctlsocket@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_ioctlsocket@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_listen@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_listen@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_recv@16" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_recv@16" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_recvfrom@24" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_recvfrom@24" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_select@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_select@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_send@16" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_send@16" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_sendto@24" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_sendto@24" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_setsockopt@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_setsockopt@20" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_shutdown@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_shutdown@8" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_socket@12" は未解決です。
msvcr71-ruby19.exp : error LNK2001: 外部シンボル "rb_w32_socket@12" は未解決です。
msvcr71-ruby19.dll : fatal error LNK1120: 外部参照 25 が未解決です。
NMAKE : fatal error U1077: 'cl' : リターン コード '0x2'
Stop.
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x2'
Stop.
調べてみると、msvcr71-ruby19.def ファイルに書き出しているシンボル名の一部で微妙に 違っているのが原因のようだが、プログラムを追いかけている余裕がないので とりあえず手作業で msvcr71-ruby19.def ファイルを修正して続行。
E:\ruby-src\ruby-trunk-20071210\win32>nmake install
Microsoft(R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.
.\miniruby.exe ./../instruby.rb --dest-dir="" --extout=".ext" --make="nmake" --mflags="" --make-flags=" " --installed-list .instal
led.list --mantype=""
E:/ruby-src/ruby-trunk-20071210/lib/delegate.rb:279:in `each': invalid identifier !~ (NameError)
from E:/ruby-src/ruby-trunk-20071210/lib/delegate.rb:279:in `DelegateClass'
from E:/ruby-src/ruby-trunk-20071210/lib/tempfile.rb:13:in `<top (required)>'
from ./../instruby.rb:12:in `require'
from ./../instruby.rb:12:in `<main>'
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x1'
Stop.
ささださんがMLで言ってたあの変更に関係してたりする? ○| ̄|_
巻頭にゴスリングのインタビュー記事が載っていたので買ってみた。 第二特集がJRubyだってのもあったけど。 インタビューの最後の部分を引用。
日本の開発者に向けて ・楽しくないことやめる 「私の理念の一つに“楽しくないことはやめてしまう”というのがあります。楽しくも ないことを続けるのは難しいからです。それがたとえ仕事だったとしても。 だから、ソフトウェア開発を仕事にしている方やこれから仕事にしていきたい方には、 ぜひコードを書いてモノを動かすことの楽しさを感じてもらいたいです。 “楽しさ”は非常に大きなモチベーションになることを忘れないでください」 ・学ぶ姿勢を大切に 「楽しさが重要とは言っても、勉強することが苦手な人はこの業界には難しいと思います。 なぜなら、ソフトウェア開発のようにIT業界は一年先の動きが見えづらいからです。だから こそ、つねに勉強する姿勢が大切です」
メモ: なんかしらんがrssに引っかかったのでメモ。 今まで公開されてなかったのだっけ? >動画
2007/12/10 講演を記録した動画ファイルを公開しました。
今回調べてみて思ったのが「日本語で書いても海外へ波及するんだ。。。」ということです。英 語で書いてあるページの内容が日本に波及するのは、理解できますが、日本語で書いたページが 海外で話題になってネタが波及するというのも普通にあり得るんですね。どうも、日本語で書い ていると日本国内(もしくは海外在住の日本人)向けだけだと思ってしまいますが、必ずしもそう とは言えないのであると思いました。 でも、確かに英語のサイトを調べて行ってアニメのYouTubeがたくさん貼り付けてあるのを見る と、日本語を読んだり聞いたりして理解したくなってきて勉強を始めるというのも理解できると 思いました。 また、FlickrやYouTubeなどのように国を越えて使われるサイトが登場するようになると、そこ が「コンテンツのるつぼ」になっていくのだろうと思います。これらのサイトでは、他のサイト と比べて言語や文化の壁を乗り越えて行く人が多いのではないかと思います。
ふむ。興味深い。
IBM ビジネスコンサルティングサービス(IBCS)が12月7日に発表した世界の人事担当者を対象 にした調査で、日本企業が社員を辞めさせないためには「会社と個人の価値観が一致しているこ と」が重要と考えていることが分かった。いわば伝統的な「和の文化」を重視する考えとも言え、 世界との違いが鮮明になった。
Brainf*ckの日本語訳は のーみそコネコネ としたい。
それは良いですね♪
3nd?
ここで経済学[*2]が用いる基礎が「人は”より満足しよう”として行動する」というものです. 他の条件を一定にすれば,貧乏よりは金持ちが言い,つらいより楽な方がいい,気持ち悪いより 気持ちいい方がいいというわけです.こう書くと「なんだか経済学って卑賤な学問だな」と思わ れるかも知れない.実際,その程度の認識で経済学を批判する人もいる. でも,経済学は別に「金持ちは貧乏人より正しい」とか「つらい仕事には意味がない」なんて価 値判断の話をしているんじゃないんです.客観的な「人生の目的」を探るのは大作業です.大作 業すぎていつ答えが出るんだかわからない[*3].だから,とりあえずは「大問題を解決しないで も答えを出せる問題から優先的に処理していこうじゃないか」と考えているのです. みんなの幸せのために毎日しかめっ面でを考えている……けれど具体的には何もしてくれない人, みんなのことなんてたま~にしか考えないけどとりあえずたまに寄付をしてくれる人がいたとき. どっちが「みんなのため」になっているでしょう.間違いなく後者じゃあないでしょうか.
経済学は「陰鬱な科学」と呼ばれることがありますが、僕はこれってあんまり妥当じゃないと思 うんです。行動を決定する際にはサンクコストを気にするなということは、「取り返しのつなか ない過去」を考えずに、「これから発生する未来」についてのみを考えて行動するというメッセ ージです。要は「昨日を生きるな、明日を生きろ」ってことですから……こんなプラス思考な社 会科学は他にないんじゃないかしら。これからは経済学のことを「陽気な科学」とよんでやって ください。
僕たちは世界の中にいる。世界の中にいる僕たちが使う言葉や論理で倫理について考えたり、ま してやなんらかの倫理観が正統であると説得するなんてことはできっこありません。ひらったく 言うと……そんな難しいこと言わないで、「俺はあいつが嫌いだ」でいいじゃん、ってなわけ。 そして、もっと悪いことに「倫理! 道徳!」と言ってみたところで問題は何ら改善されないの です。アルバイトが仕事を覚えないのは当然です。だって、昇進や昇給があるわけでもないならば仕事 を覚えてもたいして得にならないんですから。部下が言うことを聞かないときには、あなたの命 令に従うことで部下にはどんな得があるのかよくよく考えてみてください。あなたは彼を出世さ せてやることができますか? あなたについて行くことで彼は仕事上の達成感を得られそうです か? そのような権限・能力があなたにないならば、部下は「合理的判断に基づいて」あなたの 言うことを聴きません。 自分の満足と、相手の満足が一致するようにしてはじめて人を動かすことが出来るというモノで す。
経済学の本を何か読んでみようかと思ったり。 大学一年のときに必修の講義をやっただけだしw
今ちょうど(?)山形さん翻訳の本を読んでいるところだから、これを読み終わった後で 山形さんのかかわった経済学方面の本でも手を出してみようかな。
一昔前、日本の企業の多くは、「年功序列・終身雇用」という制度を実施していて、国外からは 「日本的経営」などともてはやされていた。そのシステムの中に、「ボーナス制度」というのも 加わっていて、これも世界にもあまり例を見ない制度だそうだ。経済学者は、これらのシステム を、きちんとした合理性を持ったシステムだと考えている。年功序列・終身雇用は、リスクシェ アリングであり、ボーナス制度というのは、給与体系の一部に成果主義的な契約を持ち込むこと で、モラルハザードを防ぐ知恵だと説明するわけである。
ボーナスなー、でたけどなー(以下自粛)
「が」も「か」+濁点も正規分解、互換分解でU+304b U+3099となっていることが分かります。ま た、正規合成、互換合成はU+304cになります。 では互換等価の「ア」と「ア」はどうなるでしょう。 ア: 30a2 NFD: 30a2 NFKD: 30a2 NFC: 30a2 NFKD: 30a2 ア: ff71 NFD: ff71 NFKD: 30a2 NFC: ff71 NFKD: 30a2 「ア」は正規化しても変化はありません。一方の「ア」は正規分解、正規合成ではU+ff71のままです。 したがって、「ア」と「ア」を比較するためには互換分解もしくは互換合成が必要なことが、こ の結果からも確認できます。 文字列を比較する場合でも、必要に応じて正規化することを心がけるようにしましょう。
あーたいへんだなあ(棒読み)
ただ来年1月には建物が取り壊しになるんで、目下移転先を探してます。見つからなければこれ が入るだけの倉庫を借りて、とりあえず積み上げちゃう。で、またいい場所が見つかったらそこ でできればいいね、っていうそんな状態です
そういやその昔、バーチャファイターの筐体を個人で買って自宅に設置した人がいるとか 聞いたことがあるけど、その後どうしたんだろうか?
そういった観点からも QA 部門がプロジェクトの早期から関わるのはアリなんじゃないかな…と 思ったのでした。上手く回ればウチらプログラマにとってもワケノワカラン代物の実装をする確 率が減らせるという恩恵があるわけですよ。
この辺でイロイロ書けなくもないのだけど、 少々やばめの情報があったりするので迂闊にこういうところにはかけなかったりする。 まあひとつの考え方としてはありで、確かに利点はあるけど同時に抱え込むデメリットもありますよ。と。
と書くとどういうデメリットか書けよという話になるのだろうけど、 そこがそれちとナニな事情があるところでして。察して♪
これを読んで、例のマシン語騒動のまとめを途中で投げっぱなしにしているのを思い出した。 まあ今更いいよね。とかゆってみる。
仕様凍結予定日を過ぎても仕様がまとまりきらない場合、なんとか納期を守ろうとして、ついつ いいい加減な仕様で開発に着手し、後で問題が出て来たときに対策しようとする事例が多いが、 このやり方は極めて危ない。
それなんてR…と書こうと思ったけど自重。
現在、Javaプラットフォームではスクリプト言語のサポートが急速に進められている。同時に、 Java VM上で動作するさまざまなスクリプト言語の実装が登場しており、Javaプラットフォーム はすでにJava言語という枠を飛び越え、マルチ言語環境に進化しようとしている。本連載第31回 で紹介したBeanShellも、Javaベースのスクリプト言語のひとつだ。
なんですとーッ!?
コメント欄から I have attempted to port GHC to the Nokia 770 -- which is another ARM based system. Doing a unregisterised port is pretty straight-forward -- but really, a fully registerised port is needed. I don't think there is any reason why it could not be done -- my main problems were lack of time and knowledge. If I had the right knowledge, it does not look like more than a few days worth of work. I have heard rumors that GHC 6.10(?) will have a pure ANSI C backend, which might make the porting process a lot easier. The current C backend is GCC specific, and includes a bunch of platform specific hacks to implement tail recursion, strip out unneeded opcodes in the assembly generated by GCC, etc. However, benchmarks showed that the native assembly backend was almost as good or better than the hacky C backend. So, I am guessing they have decided to go with a native code generation backend for speed, and replace the current C backend with one that produces ANSI C, so that porting to new platforms is a lot easier? I am really guessing here, so I could be completely wrong.
すごいのはPythonハッカーだけじゃなかったのねw
Jan writes a call for help for some Erlang and Spidermonkey problems we've been having. It's an interesting reason that Erlang crashes. I spent some time looking at the crash dump and the server didn't look to be in a stressed state. It only had 10's of processes running, most of them part of the core server that are always running. It was only using 12 megs memory total and asking for 2 meg more. How could it fail to allocate 2 megs and then crash because of it?
Paul Graham originally introduced me to the idea that programming in a niche language was a good idea. He makes great arguments for organizations adopting more powerful languages and hiring smaller teams of highly effective programmers that can harness the power of niche languages. Paul Graham made me feel good about working exclusively on Ruby projects. Later I read (the fantastic) My Job Went to India by Chad Fowler. Chad also talks about how being proficient in a niche language can make you a more valuable asset. Again, I felt good about focusing so heavily on Ruby.
コメントから
Depends on the niche language. If the niche language is popular on reddit chances are
the answer will be no. (Exceptions do exist.)
No matter what language they use for fun, everybody should learn an object-oriented
curly-bracket language and become proficient in it. Why? Bitwize's Corollary:
Any sufficiently complicated Common Lisp or Scheme program will eventually be
rewritten in C++, Java, or Python.
However, if you find yourself in the dubiously happy position of happening to know APL,
MUMPS, Ada, BANCstar, or some other language that will win popularity contests the day
after Lena Hyena gets a date for the prom, at a time when some harried manager has
need of maintenance and updates for a legacy code base in this language yesterday,
then you can turn your pocket-universe skill into serious bank.
Refactoring: Improving the Design of Existing Code Martin Fowler with Kent Beck, John Brant, William Opdyke and Don Roberts. In the Addison-Wesley Object Technology Series. Refactoring (as I’ll refer to the book from here on in) is a heavy and beautifully produced 418 page hardback book. Martin Fowler is a UK-based independent consultant who has worked on many large systems and is the author of several other books including UML-Distilled. Refactoring is a self-help book in the tradition of Code Complete by Steve McConnell. It defines its audience clearly as working programmers and provides a set of problems, a practical and easily followed set of remedies and a rationale for applying those techniques.
ONLampでも取り上げられますた。
話は変わるんだけど、 今まで書かなかったんだけどさ、 Catalystっつーとネットワーク機器を連想するのはひょっとしてわしだけ?(笑) こーゆーやつね → イントロダクション - Cisco Catalyst 2960 シリーズ - Cisco Systems
mkc Hmm. This paper is badly in need of a So What? section... w-g It's weird.
ふむ。
If you clicked on this link, chances are you are somewhat familiar with the term monads and monoids in context of functional programming. If not, before you dive into my argument dismissing monads as an overblown idea, I suggest taking an hour out of you day to get an excellent introduction to monads from Microsoft's Channel9: http://channel9.msdn.com/Showpost.aspx?postid=358968
channnel9つーと以前にどこかで紹介されてたのを見てるかもしれない。 ビデオ本体は観てないんだけどw
A few people have asked me to run benchmarks comparing ErlyWeb and other frameworks, especially Ruby on Rails. Benchmarking is pretty boring, which is why I haven’t benchmarked ErlyWeb until now. Plus, although I was pretty confident that ErlyWeb outperforms Rails, I didn’t think proving it mattered that much. People who love Rails generally don’t care much about raw performance, and people who love Erlang and functional programming don’t need much convincing to use ErlyWeb over Rails.
You can see the generated page here (the output is identical for both apps except for
minor whitespace differences).
This is the Rails controller code (songs_controller.rb):
class SongsController < ApplicationController
def index
@songs =
["Sgt. Pepper's Lonely Hearts Club Band",
"With a Little Help from My Friends",
"Lucy in the Sky with Diamonds",
"Getting Better",
"Fixing a Hole",
"She's Leaving Home",
"Being for the Benefit of Mr. Kite!",
"Within You Without You",
"When I'm Sixty-Four",
"Lovely Rita",
"Good Morning Good Morning",
"Sgt. Pepper's Lonely Hearts Club Band (Reprise)",
"A Day in the Life"]
end
end
This is the Rails view code (songs/index.html.erb):
<h1>Songs</h1>
<table>
<% for song in @songs %>
<tr>
<td><%= song %></td>
</tr>
<% end %>
</table>
This is the ErlyWeb controller code (songs_controller.erl):
-module(songs_controller).
-export([index/1]).
index(_A) ->
{data,
[<<"Sgt. Pepper's Lonely Hearts Club Band">>,
<<"With a Little Help from My Friends">>,
<<"Lucy in the Sky with Diamonds">>,
<<"Getting Better">>,
<<"Fixing a Hole">>,
<<"She's Leaving Home">>,
<<"Being for the Benefit of Mr. Kite!">>,
<<"Within You Without You">>,
<<"When I'm Sixty-Four">>,
<<"Lovely Rita">>,
<<"Good Morning Good Morning">>,
<<"Sgt. Pepper's Lonely Hearts Club Band (Reprise)">>,
<<"A Day in the Life">>]}.
This is the ErlyWeb view code (songs_view.et):
<%@ index(Songs) %><h1>Songs</h1>
<table>
<% [song(S) || S <- Songs] %>
</table>
<%@ song(S) %><tr><td><% S %></td></tr>
これ、なんて言語? それとグラフに現れている結果がなんかすげー段違いなんですけど。
http://amforth.sourceforge.net/ amforth 2.5 has been released. It is a Forth implementation for the AVR ATmega microcontroller family. This release includes: the addition of cooperative multitasking support to the library, updated documentation, bug fixes, and other changes.
http://scala-blogs.org/ Scala-Blogs.org has been announced. It is a collection of blog posts pertaining to Scala. Scala is a statically typed, extensible, multi-paradigm language, offering object-oriented and functional support.
It has been announced that Glasgow Haskell Compiler 6.8.2 release candidates are now available. GHC is a portable, open-source, optimising Haskell 98 implementation.
あれ、6.8.1って最近出たばかりでなかったっけ?
http://lua-users.org/wiki/LuaNews LuaNews has been announced. It is a "summary of the latest happenings on the Lua mail list and elsewhere in the Lua world." Lua is a dynamically-typed scripting language offering object-oriented capabilities, designed for extending applications.
from バカ征く
http://www.jitu.org/~tko/cgi-bin/bakagaiku.rb?bakaid=200712091 でも、ほんとコードに無神経なヤツが多いな。 前にも書いたことあるけど、returnの行の前に必ず空行 入れるバカとかな。それに何の意味があるの? 空行と いえども意味がなけりゃノイズなだけだろ。
必ず、ではないですが基本的に return ほげほげ; の行の前は 空行を入れることが多いです。ただし言語にもよりますが。 あと大体において、
int
関数名(引数リスト)
{
変数の宣言部
空行
処理いろいろ
...
return ほげほげ
}
な感じになります。関数の処理の最初でパラメータチェックするときは空行つけずに if のチェックを並べて
if (invalid(ふが)) {
....
return エラーコード
}
if (invalid(ふが)) {
....
return エラーコード
}
/* 処理本体の開始 */
な感じですかね。if じゃなくて else if のときももちろんあります。
空行でひどいのになると: doit(); dothat(); dothis(); なんて、1行おきに空行入れるバカ。だから、その空行に 何の意味があるっていうんだよ。読む人間のこと考えて んのか? 気分だけで空行を入れるんじゃない。空行にも 意味を持たせろっつーの。 つーか、空行なんか、コメントといっしょで、ないに 越したことねぇんだから。あと、カッコの内側にスペース入れるバカな。 doit( var ); とか。職業プログラマとして恥ずかしくないのかね。 カッコなんてスペースみたいなもんで、そんなもんを わずらわしいと思ってるようじゃ修行が足んねぇって ことだろ?
さすがにここまではやりません(^^; が、論理的な単位ごとに空行あけると良いよというのは Kernighan 大先生がどこかで書いていたように記憶しています。 どこだったろう?
って勘違いだったら大恥だなw
Pythonのお勉強 Part22 113 デフォルトの名無しさん [sage] Date:2007/12/10(月) 06:25:24 ID: Be: Python を誰かに教えるとしたら、 どういう順番で教えるのがいいかな? 114 デフォルトの名無しさん [sage] Date:2007/12/10(月) 06:51:25 ID: Be: チュートリアルの最初の方コピペ 115 デフォルトの名無しさん [sage] Date:2007/12/10(月) 09:56:13 ID: Be: >>113 なにはともあれ。 「初めてのPython」と「はじめてのPython」の違いについて教えた方がいい。 116 デフォルトの名無しさん [sage] Date:2007/12/10(月) 10:10:42 ID: Be: >>113 全くプログラミング経験が無い相手なら『Pythonで学ぶプログラム作法』一択 プログラミング経験がある相手なら「チュートリアル読め」で以上 117 デフォルトの名無しさん [sage] Date:2007/12/10(月) 11:09:59 ID: Be: 俺も >116 に一票
本当に、何であんな書名にしたんですかねえ >「はじめてのPython」 (ひらがなの方)
【関数】Erlang【エリクソン】
http://pc11.2ch.net/test/read.cgi/tech/1176479959/290-
290 デフォルトの名無しさん [sage] Date:2007/12/08(土) 23:56:28 ID: Be:
日本語が読めない人が読むコードのコメントに日本語で書くやつはバカ
英語が不自由な人が読むコードのコメントに英語で書くやつはバカ
291 デフォルトの名無しさん [sage] Date:2007/12/09(日) 00:55:22 ID: Be:
>>290
割と柔軟だなw"
柔軟かどうかはともかく、290のいうことには一理あるなw
無料で協力してくれる共同開発者の募集の仕方 -OKWave- C 言語暦 10 年のプログラマです。 お金をできるだけかけずに(できれば無料で), PHP でソフトウェアを開発したい案件があります。 簡単な PHP プログラムなら書けます。 自分でコーディングする以外に, 共同開発者を募る方法はありますでしょうか。 報酬はプログラム完成後に収益があった場合にのみ分配したいと考えています。
自分がそういう話を持ちかけられたとして、果たして参加するか あるいはどういう条件が満たされれば参加するかとか考えたことはないんだろうか?
ごにょごにょ中。今日はあまり進まなかったけど、
The Future Well, so what's the future of scripting? In my completely unbiased opinion, that would be Perl 6. :-)
という部分を見つけて大笑いw これ、日本語に訳すのは大変だなあ(構文的に難しいという意味ではなく)。
構文ハイライト機能がコメントアウトされている文ではどのように機能するのがよいか? というお伺い。
We all agree that Java needs simplicity - we just don’t agree what that means. Several things came together recently that made me think about simplicity in the Java language again, and what that might mean. And one thing is clear: simplicity is not simple!
Javaもいろいろ大変だなあ。
時代はものぐさ(lazy)。 それは違う
In response to Sending modern languages back to 1980s game programmers, one of the questions I received was "Did any 8-bit coders ever use more powerful computers for development?" Sure! The VAX and PDP-11 and other minicomputers were available at the time, though expensive, and some major developers made good use of them, cross-compiling code for the lowly Atari 800 and Apple II. But there was something surprising about some of these systems: It was often slower to cross-assemble a program on a significantly higher-specced machine like the VAX than it was to do the assembly on a stock 8-bit home computer.
Jeff Atwood has just posted an interesting article, Hashtables, Pigeonholes, and Birthdays. Hash Tables are a very interesting subject, you can take almost any aspect of them and follow it down interesting trails.
One of my latest projects has led me to think about making windows executables for a
typical database application. The main requirement was using free software to make
this project, so here's my starting point:
* Clisp, 2.41 (2006-10-13) (full, with readline support)
* ASDF
* IDE: Emacs and SLIME (latest, from CVS at the date of this post)
The first issue I want to get behind is to make windows executables. If I can't make
those, I might as well move to Python - but my programming language preference makes
me stubborn about this one. I found out the magical command, ext:saveinitmem. But this
alone wouldn't work, and I got to the conclusion SLIME was the problem - the binary
image would try to output to slime, and result in an error. The fix is simple enough -
just don't load swank, and make the binary without slime. I made a convenience
build.bat file, with the following:
uxPython is a cross-platform UI toolkit for creating stunning user interfaces. Built from the ground up to empower the developer to create widgets and interaction models that are distinctive and easy to use. uxPython comes with many standard widgets like textboxes,labels, gradient headers and grids. Taking a cue from the highly innovative Swing toolkit for Java and inspired by the creative work being done on the web, uxPython was developed to bring fun and productivity to desktop development. uxPython is free software and is licensed under a MPL/LGPL license making it suitable for inclusion in any proprietary or open source/free software product.
ふむ。どんな使用感なんだろうか。
ちと古い(2003年7月)ドキュメントではあるようだけど。
Ruby1.9で遅くなる項目 - usagidropの日記 Ruby 1.8 vs. 1.9 Benchmarks
ささださんのコメントがついてますが。
ベンチマーク結果を見ると、Ruby1.8と比べてRuby1.9は全般的に高速化されていることが分かる。
しかしすべての項目で高速化されているわけではなく、以下のベンチマークでは逆に遅くなって
いる。
* app_raise (+21%)
* io_file_create (+13%)
* io_file_read (+38%)
* so_count_words (Ruby 1.9 too slow (> 8x))
* so_pidigits (+15%)
* so_reverse_complement (+44%)
* vm2_mutex (+16%)
* vm2_regexp (+37%)
* vm3_thread_create_join (Ruby 1.9 too slow (> 8x))
* lib_coderay (+6%)
* interpreter_start (+118%)
* interpreter_require (+67%)
これをふまえて、Ruby1.9の特徴を考えてみた。
(略)
* vm2_regexp (+37%) により、正規表現が遅くなっていることが分かる。Ruby1.9では正規
表現エンジンが新しくなって機能が強化されているかわりに、スピードが犠牲になってい
るのだろう。個人的には、正規表現の機能は現状でも十分なので、スピードを落とすこと
は止めてほしかった。
ここにちょっと疑問。 鬼車そのもに関しては、小迫さんが結構速度性能を気にして 折に触れて調査をしていて、はてな日記に何回か測定結果を書いていたと思う。 まあ対象が PCREだったりすることもあったけど、 そんなに遅くなるような結果が出てたかなあ? とはいえこのベンチマークもそれなりに説得力のあるもののようなので、 どのような検査をしてこの結果になったのかということは調査しても良いかもしれない。
正規表現の機能云々についてだけど、 従来のエンジンを使う限りは戻り読みを実装することは(多分)不可能なのと、 ライセンス的な問題でエンジンを変えることは大前提だった (だからこそ鬼車が開発されたともいえる)のでにんともかんとも。
Windowsで作った *.cgi ファイルを Linuxで動かすには(もう一度) -OKWave 現在は、Windows XPコンピュータ、Apache, activePerl で、やっていますが、 「*.cgi ファイルをWindows で作成, Webサーバは SuseLinux 10.01 OSS」 としたいのです。 Windows での作業に少しは慣れてきましたので、・・・。しかし、 Windows は、お金がかかりますので・・・。 よろしく、お願いいたします。 ANo.1 とりあえず、Apacheのログをご覧になったらどうでしょうか? もうちょっと詳しいエラーの原因が出ていると思いますよ。 または、コマンドラインから0001Windows.cgiを実行してみるとか。 perl ./0001Windows.cgi パーミッションの設定漏れなんて初歩的な原因ってことも考えられますよ。 この回答へのお礼 まことにありがとうございました。約3ヶ月間困っていたことが解決しました。takbee さんの 「パーミッション」の一言で救われました。Read と Execute にチェックをいれたら、できま した。次は「日本語文字の文字化け」でピンチになりました。エンコード というのが 最初 強制的に ISO になってしまい困りました。 しかし、 print header(-charset => 'EUC-JP'); で解決しました。 takbee さん、救いの一言、ありがとうございました。
これにだけに専念してたってわけじゃあないんだろうけど、 三ヶ月困ってたって一体その間 ナニをやっていたのだよ… 人件費で考えたら、OSその他の料金なんて屁みたいなもんになるんじゃないのか?(^^;
ああ、この方面のアルゴリズムを失念していました。 なつたん: 好きなアルゴリズム
線形補完のアルゴリズム y = 3/5 x のような直線を書くとき、順に3を足していって5を超えたところでyを1増やすと良い感じで直線が書ける。 足すのに使う変数をアキュムレータのaとして、5を超えるとオーバーフローして、超えた分だけの値を保持する。 x y a 0 0 0 aに3を足す 1 0 3 次にaに3を足すと6になってオーバーフローするので、yを1増やし、aは6-5で1になる。 2 1 1 aに3を足す 3 1 4 次にaに3を足すと7になってオーバーフローするので、yを1増やし、aは7-5で2になる 4 2 2 次にaに3を足すと5になってオーバーフローするので、yを1増やし、aは5-5で0になる 5 3 0 以下繰り返し 6 3 3 7 4 1 割り算しなくても、加算器+レジスタで直線が引ける不思議。
そうそう。グラフィック画面に斜めの直線をきれいに描画するって意外に難しいんですよね。 実際にやらせてみると、たいていの人はがたがたな線になってしまったり、 ところどころドットが跳んだり。 まあこれもロストテクノロジーなんですかねえ(de-culture (笑))
アルゴリズム大募集! C&R研究所 - コンテンツ募集 にもこの方面のアルゴリズムは挙げられてないかな?
jijixiさんが早速チェック入れているが、α2がリリースされた模様。 programming: Python 3000 Alpha 2 Is Out → Python 3.0a2 Release んで、Windowsな方々は
Caveats for Windows Users Read this first! The MSI installers for Python 3.0a2 are compiled with the new Visual Studio 2008 Professional version. Therefore Python depends on the Visual C++ runtime library 9.0. The runtime library must be installed prior to the installation of Python 3.0a2. Future releases of Python will automate this step.
というようにコンパイラが変更されているので要注意。 そういや Ruby 1.9.1はどうすんでしょう? VC++ 6のまま? ruby-core でも質問が出てたような (VC++6じゃあ拡張ライブラリ作る人が大変(もう手に入らないから)とか)。 まあ自分は基本的に自前でコンパイルしたのを使うので関係ないといえば関係ないのですが。
…つか、Perlのstrawberry(違ったかも)じゃないけど、 OpenWatcom あたりのコンパイラ指定にしちゃうとかしたほうがいいかも。 ってライセンスとかライブラリの実装状況調べとかないといけないな。 Main Page - Open Watcom Download - Open Watcom ぱっと見だけどライセンス (Open Watcom Public License - Open Watcom) も問題になるようなことはなさそう。
Pythonの話題が出てきたところで。
いろいろ情報を集めたところで、jijixiさんのところにコメントがついていたり jijixiさんも新しくエントリでまとめてたりするが 絶望はしない :)
PEP 3106 はまあすぐに見つかったんですが、 できれば views という名前にした経緯なんかが見つかればなあと いろいろ探してました。この views って、 少なくともハッシュとか二分木のようなメジャーなデータ構造じゃないですよね。
Dictionary .keys() and .values() should return a set [with Python 3000 in mind]
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-07/msg00080.html
Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-07/msg00130.html
Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-07/msg00141.html
Re: Dictionary .keys() and .values() should return a set [with Python3000 in mind]
http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-07/msg00160.html
* From: "Terry Reedy"
* Date: Sun, 2 Jul 2006 16:14:15 -0400
The meaning of dict.keys, etc, will not change for the 2.x series. For
3.0, I believe that Guido already intends that .keys() no longer return a
separate list. For one thing, a major, if not the main use, of the method
is for iteration, as in 'for keys in d.keys():'. For this, creating and
them discarding a separate list is inefficient and, in a sense, silly.
One option is to make .keys be what .iterkeys is today. Another, more
recent, is to make .keys return a new iterable dict view object, details
not yet worked out. Either way, one would make an independent set or list
with set(d.keys()) or list(d.keys)).
Terry Jan Reedy
とまあこの辺はすでに述べられていることなのでよしと。
[Python-3000-checkins] r58255 - python/branches/py3k/Objects/memoryobject.c
http://mail.python.org/pipermail/python-3000-checkins/2007-September/002075.html
python/branches/py3k/Modules/_ctypes/_ctypes.c .... Returns a new reference to a Memory
view object. If no copy is needed, - the memory view object points to the original
memory and ...
[Zopyrus] [Python-3000] PEP Draft: Enhancing the buffer protcol (fwd)
http://zopyrus.itconnection.ru/pipermail/zopyrus/2007-February/085293.html
Re: [Python-Dev] PEP 3118: Extended buffer protocol (new version)
http://www.mail-archive.com/python-dev@python.org/msg22378.html
After suggestions by Greg, I like the idea of the PyMemoryViewObject
holding a pointer to another object (from which it gets memory on
request) as well as information about a slice of that memory.
Thus, the memory view object is something like:
typedef struct {
PyObject_HEAD
PyObject *base;
int ndims;
Py_ssize_t *offsets; /* slice starts */
Py_ssize_t *lengths; /* slice stops */
Py_ssize_t *skips; /* slice steps */
} PyMemoryViewObject;
It is more convenient to store any slicing information (so a memory view
object could store an arbitrary slice of another object) as offsets,
lengths, and skips which can be used to adjust the memory buffer
returned by base.
PEP 3118 -- Revising the buffer protocol
http://www.python.org/dev/peps/pep-3118/
ということで結構大掛かりな仕様変更のようです。 が、なんで view object という名前なのかの謎は解けず。
一応C99準拠らしいがライブラリのサポート状況とかを調べてみる。
C99 Compliance - Open Watcom C99 Compliance From Open Watcom Jump to: navigation, search There is an ongoing effort to improve compliance with the ISO/IEC 9899:1999 standard, also known as C99. Watcom C/C++ version 11.0 already included a number of extensions that were later standardized in C99. That included: * C++ style comments * Non-constant initializers for local aggregrates or unions (-aa mode only) * Commas after last element in enumerator or initializer list After the Watcom tools were open sourced, many improvements have been made by contributors: * Variable argument macros (version 1.2, by JimB) * 64-bit long long integers, based on existing __int64 support (version 1.2, by BartO) * The __func__ identifier (version 1.2, by MichalN) * The inline keyword, based on existing __inline support (version 1.3, by BartO) * Improved wide char literal support (version 1.3, by BartO) * Runtime library functions dealing with long long objects (version 1.3, by BartO and MichalN) * Designated initializers (version 1.4, by BartO) * Support for restrict keyword (version 1.3, by JimS; -za99 mode only) * Partial support for _Bool, _Complex, _Imaginary keywords (version 1.3, by JimS; -za99 mode only) * Wide character memory manipulation routines, ie. wmemcpy() and friends (version 1.4, by MichalN) * Declarations in for loops and anywhere in compound statements (version 1.5, by MichalN) * Numerous updates to C library and headers (ongoing work by BartO, JiriM, MichalN, PeterC, and others) When and if other C99 features will be added depends purely on how much effort contributors want to invest. Some features are fairly esoteric and there appears to be little or no demand for them (eg. complex math). The features most likely to be implemented are the ones that add new functionality that cannot be achieved through other means (eg. hex floating-point constants). Detailed table: からざっと目に付くところを抜き出し。 variable length arrays - universal character names (\u and \U) - compound literals - extended integer types and library functions in <inttypes.h> and <stdint.h> 1.3-1.5 __func__ predefined identifier 1.2 va_copy macro 1.3 additional strftime conversion specifiers 1.6
んー可変長配列がない? あ、compound literals もないな。
ようやっとまとめができました。 ってほとんどもとの文章の翻訳に手間取っていただけなんですが。 結果はこちら→ Excel 2007における数値の表示バグのまとめ
ひとことでいうと、「16ビットコードのわな」ですか。 見た感じCコンパイラが生成したコードじゃなくて、 人がアセンブリ言語で書いたルーチンに(多分高速化しようとして)手を入れて その結果バグった。というところでしょうか。 この修正をした人もこんな結果になるとは思わなかっただろうなあ(笑)
逆アセンブラを駆使して詳細なレポートをしてくれた Chris Lomont に改めて賞賛の拍手を。
Abstract. Haskell is a functional language, with features such as higher order functions and lazy evaluation, which allow succinct programs. These high-level features are dificult for fast execution, but GHC is a ma-ture and widely used optimising compiler. This paper presents a whole-program approach to optimisation, which produces speed improvements of between 10% and 60% when used with GHC, on eight benchmarks.
まあこんなことを気にするほどHaskellでプログラム組めるほどの 腕は持ってないんだけどね。
まったくPython Hackerは手が早いw (CPANはチェックしてないけど)
Best of all, this approach to “debugging the organization” addresses complex social issues without fuzziness. You don’t even have to be a “people person” to use it - that’s the benefit of solid understanding.
ナイーブな実装には落とし穴がありますた。と。 ruby-list でもその昔この手の議論があったような。
scala ブログなんてあるのか。
まて、なんだその1.6から1.7への間での落差はw
programming: Ask programming.reddit: Must-read programming books? ざっと抜き出してみました。 重複は取り除いたつもりですが、まだ残っているかも知れません。
で書名のリスト。順不同(大体ページに登場した順です。 TAPLの正式名称って何だっけ? Type ほげほげ Programming Lanuguage? あまりにも面倒なのでアサマシリンクを張る気にもなりませんw
翻訳版でもいいのなら、結構読んでるのがあるなあ。
興味深い流れだw
推薦図書/必読書のためのスレッド 37
http://pc11.2ch.net/test/read.cgi/tech/1190192944/767-
767 デフォルトの名無しさん [sage] Date:2007/12/08(土) 09:26:43 ID: Be:
今あえてCのみをがっつり勉強する意味ってあるんかいな?
768 デフォルトの名無しさん [sage] Date:2007/12/08(土) 09:34:34 ID: Be:
>>767
Cは組み込み関係で奴隷が必要だから
必要っていうくだらない理由以外で
必要とされていない言語
絶対覚えない方がいい
769 デフォルトの名無しさん [sage] Date:2007/12/08(土) 09:38:51 ID: Be:
冗談にしては笑えん
770 デフォルトの名無しさん [sage] Date:2007/12/08(土) 09:55:19 ID: Be:
うーん、ハードとやり合うような人たち以外はほとんど使う機会ないよね
もちろん知っとくのは悪くないけど、K&Rみたいのでがっつりやる意味はないと思うんだ
771 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:03:44 ID: Be:
直接使う機会は無いが、知っておいたほうがいい知識もあるんだよ
772 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:22:47 ID: Be:
そりゃ知識はあればあるだけいいだろうけど、優先度としては決して高くない
773 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:24:43 ID: Be:
スレ違いです。
馬鹿はマ板に行ってください。
774 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:26:20 ID: Be:
人が書いたコード読んだりしないのかな?
Cのコードサンプルは多いと思うよ
書籍の中でも使われてるし
775 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:33:04 ID: Be:
とりあえず、K&Rも読んでねーのプギャー
とか言う輩は消滅して頂きたい
776 デフォルトの名無しさん [sage] Date:2007/12/08(土) 10:49:06 ID: Be:
K&Rの演習が解けるレベルなら読む必要ないだろうな
777 デフォルトの名無しさん [sage] Date:2007/12/08(土) 11:00:46 ID: Be:
C++をやりたいならまずCからやるべき、とかいう有害な情報を流す輩は無視したほうがいい
778 デフォルトの名無しさん [sage] Date:2007/12/08(土) 11:14:16 ID: Be:
Cは危険な言語だって
某独法様も仰られているわけで
779 デフォルトの名無しさん [sage] Date:2007/12/08(土) 11:44:24 ID: Be:
だって難しいんだもん
でも大学とかだといきなりCを教えてたりするな
780 デフォルトの名無しさん [sage] Date:2007/12/08(土) 11:48:03 ID: Be:
本の話をやれ
781 デフォルトの名無しさん [sage] Date:2007/12/08(土) 12:02:29 ID: Be:
あれか?
「大人になって使うことなんて一切ないから、数学なんて勉強しなくてもいい!」
って、考えるヤツらがプログラマやってる、ってことか?
782 デフォルトの名無しさん [sage] Date:2007/12/08(土) 12:09:36 ID: Be:
買ってきた
783 デフォルトの名無しさん [sage] Date:2007/12/08(土) 12:10:08 ID: Be:
ゆとり厨ばっか
784 デフォルトの名無しさん [sage] Date:2007/12/08(土) 12:17:13 ID: Be:
>>783
はいはい、ゆとりゆとり。
785 デフォルトの名無しさん [sage] Date:2007/12/08(土) 12:55:26 ID: Be:
>>777
C++ の C 的な部分からやれば別に C からやる必要も無いし、
参照とかあるから C より覚えやすいと思うよな。
786 デフォルトの名無しさん [sage] Date:2007/12/08(土) 13:03:54 ID: Be:
>>785
C++の参照は参照で、また話をヤヤコしくしてるけどな
787 デフォルトの名無しさん [sage] Date:2007/12/08(土) 13:04:38 ID: Be:
こばけんはどうなの
788 デフォルトの名無しさん [sage] Date:2007/12/08(土) 14:27:30 ID: Be:
たしかにCが糞なのは同意するが、
C++の解説はほとんどがCの知識を前提としてるから、結局Cからやるのが一番の近道。
俺はC++から勉強したんだが、どこまでがCの機能でどこ以上がC++の機能なんかわからんかった。
あと、突然typedefとか出てきても、Cの下積みがないから混乱したりとか、ろくなことなかったよ。
789 デフォルトの名無しさん [sage] Date:2007/12/08(土) 14:29:41 ID: Be:
こげぱん?
790 デフォルトの名無しさん [sage] Date:2007/12/08(土) 14:35:50 ID: Be:
c#でおすすめの入門書はありますか?
791 デフォルトの名無しさん [sage] Date:2007/12/08(土) 14:58:01 ID: Be:
>>790
ほかの言語やったことあるなら、@itの改訂版C#入門で十分。後は手元で引くためにオライリー本が一冊あれば便利。
プログラミング自体が初めてなら、C#の入門書は少ないと思うよ。
792 デフォルトの名無しさん [sage] Date:2007/12/08(土) 15:18:05 ID: Be:
>>791
ありがとうございます。@it読んでみます。
793 デフォルトの名無しさん [sage] Date:2007/12/08(土) 15:25:37 ID: Be:
>>788
後悔してるんかい?分からなかったらその時に知ればいいんでは?
794 デフォルトの名無しさん [sage] Date:2007/12/08(土) 15:50:21 ID: Be:
>>790
VBやってたなら
VBプログラマのためのC#入門ってのもおすすめ
ただしこれ一冊でどうにかなるってんじゃなくて
あくまでほかの本を読むための下準備的なものだと思ってもらいたい
>>791同様、@itの改訂版C#入門をお勧めするが
実は@itのHPにほとんどの内容がのってるので
金かけたくなければそちらで勉強してもいいかもね
795 デフォルトの名無しさん [sage] Date:2007/12/08(土) 16:06:01 ID: Be:
Java:原付自転車
C++:オートマ車
C:マニュアル車
796 デフォルトの名無しさん [sage] Date:2007/12/08(土) 16:25:25 ID: Be:
>>793
今思えばもちろんそうすべきだったんだろうけど、満足に検索もできない初心者の時にはそれも難しかった。
それなら、最初から全部わからないことが前提のC本読んだら良かった、と確かに後悔したね。
まあそれでも、C++は俺の一番好きな言語だけど。
797 デフォルトの名無しさん [sage] Date:2007/12/08(土) 16:55:51 ID: Be:
>>794
どうもです
一応delphiをやっていたので大丈夫だと思います。
金よりも時間を重視したいので@itがひととおり読み終わったらオライリーを買ってみようと思います
798 デフォルトの名無しさん [sage] Date:2007/12/08(土) 18:18:27 ID: Be:
Java: 世界初の*実用的*OOP言語。弱点はGUIだが、ブラウザがあれば
GUIなんていらない時代になったので王者に。
C++: CにOOPLのパラダイムを盛りこんだキメラ。
工業用なので顧客の要望をなんでもほいほい入れたらこうなった。
最近は関数型が加わってますます化け物に。
C: 高級アセンブリ。読みながらそのまま機械語に変換できるのが強み。
799 デフォルトの名無しさん [sage] Date:2007/12/08(土) 18:55:37 ID: Be:
>>798
C#についての評価もお願いします。
800 デフォルトの名無しさん [sage] Date:2007/12/08(土) 19:04:06 ID: Be:
明解JAVA入門の目次には例外が載ってないんですが
例外についての解説は無いんですか?
入門レベルでは必要ない?
801 デフォルトの名無しさん [sage] Date:2007/12/08(土) 19:35:07 ID: Be:
>C: 高級アセンブリ。読みながらそのまま機械語に変換できるのが強み。
ねーよw
802 デフォルトの名無しさん [sage] Date:2007/12/08(土) 20:22:48 ID: Be:
>>798
Cの解説ワロタw
C++のキメラ化はプログラム言語の中でも際だってるからな。
関数型言語をそのまま使える状態でOOPを取り込もうって言うのがすでに無理なんだよ。
803 デフォルトの名無しさん [sage] Date:2007/12/08(土) 20:47:17 ID: Be:
>>800
Javaって例外なげるメソッドがあったらキャッチするなり、うえに通すなりしなきゃならない仕様だろ?
初心者だからって、スルーできないんじゃないの?
804 デフォルトの名無しさん [sage] Date:2007/12/08(土) 20:48:37 ID: Be:
関数型っぽい機能を取り込むってのは、世の中の流れだろ。
805 デフォルトの名無しさん [sage] Date:2007/12/08(土) 20:55:06 ID: Be:
>>803
なるほど。なら解説があるべきですよね。
何でないんだろ。
806 デフォルトの名無しさん [sage] Date:2007/12/08(土) 20:55:09 ID: Be:
C# F#があれば他は不要
LinuxなんてゴミOSは当然不要
807 デフォルトの名無しさん [sage] Date:2007/12/08(土) 21:07:50 ID: Be:
ここは釣り堀ではありません。
ふと立ち寄った某コンビニで、例のガンダムくじびきがあったんですよ。 で、あのUSBハブも残ってた。 ということで5000円(10回分)つぎ込んで挑戦してみましたが、 ことごとく外しました○| ̄|_ 湯飲みとか三つも四つもあってもうれしくねー(デザイン違うけどさ)w
くじの紹介ページ発見。謎メカUSBハブの写真もあります ITmedia +D LifeStyle:「ファースト世代」をくすぐるコンビニくじ GUNDAM.INFO 面白グッズが必ず当たる!「一番くじ機動戦士ガンダム 脱戦士編」特集1
誰かわたしの代わりにあたりを引いてくれえええw こんなものHUB (一番くじ 機動戦士ガンダム 脱戦士編) - 関心空間
数日前、『Lispの歌』という言葉を目にし、一体何なのかと思ったら、 『かっこうの歌』のことだったんですね。(「かっこう→括弧」という洒落) 某所でネタとしてLisperが実際に歌った由緒正しきモノだそうです。
(たぶん)同時代に作られたものにFORTRANのうたもあります。
やっほー FORTRAN らららん♪
P3を圧縮された350MBの実行可能ファイルからインストールするのは、503GRでは30分かからなかった。 だがa350nではもっと長くかかり、2 時間弱で終わった。オフィスで古い、遅めのシステムを使って いるなら、週末を使ってSP3にアップデートする準備をした方がいい。
伸張したらどれくらいの大きさになって、どのくらいCドライブの容量を喰らってくれるのかが すげー気になるんですが(笑) 大丈夫かなあ、わしのシステム…
参考:
Open Tech Press | Vista:問題点を一括修正 「SP1」の試験版公開へ
そうか、Vistaもリリースから一年になるのね。
どんだけ演算子があるんだッ(笑) → tutorial index / Perl 6
* ! - logische Verneinung, erzwingt Binärkontext; sekundäre Sigil privater
Klassenvariablen
* !! - zweiter Teil des ternären Operators
* !!! - yadda Operator
* ! - Synonym für >=
* != - abgedrehtes Synonym für >
* != - prüft Ungleichheit im numerischen Kontext, kurz für !==
* !=:= - prüft negiert auf Binding
* !== - prüft Ungleichheit im numerischen Kontext, negierte Form
* !=== - prüft Identität, negierte Form
* !> - Synonym für <=
* !>= - Synonym für <
* !~~ - negierter smartmatch Operator
* !eq - Synonym für ne
* !eqv - negierte Form, der dynamischen Eqvivalenz
* !ge - Synonym für lt
* !gt - Synonym für le
* !le - Synonym für gt
* !lt - Synonym für ge
* # - leitet Kommentar ein der bis zum Ende der Zeile geht
* $ - Sigil der Skalare; dereferenziert
* % - gibt Rest einer Modulo-Division, erzingt numerischen Kontext; Sigil der Hashes
* & - junctives and, verlangt das alle Bedingungen erfüllt sind; liefert subref
* && - logisches and, verknüpft Aussagen, beendet Auswertung bei erstem
Ausdruck mit unwahrem, leerem Ergebnis und liefert es zurück
* () - Gruppierung von Werten (Parametern)
* *** - multipliziert Zahlen und erzwingt numerischen Kontext; kennzeichnet slurpy
Arrays in Signaturen; sekundäre Sigil globaler Variablen; Synonym für Inf in
Verbindung mit einem Bereichsoperator (..); kennzeichnet Ende eines Arrays im
Sliceopertor um auf Indizes relativ vom Ende des Arrays zuzugreifen
* **** - potenziert Zahlen und erzwingt numerischen Kontext
* + - addiert Zahlen und erzwingt numerischen Kontext
* +& - bitweises und, numerischer Kontext
* ++ - Autoincrement
* + - link shiften, numerischer Kontext
* +> - rechts shiften, numerischer Kontext
* +^ - bitweises xor, numerischer Kontext
* +| - bitweises oder, numerischer Kontext
* , - Arrayoperator
* * subtrahiert Zahlen und erzwingt numerischen Kontext
* -- - Autodecrement
* --> - alternativer Syntax um Parameter zu typisieren
* >* weist Block benannte Parameter zu (pointy block)
* . - sekundäre Sigil öffentlicher Accessoren (getter/setter)
* .. - arrayerzeugender Bereichsoperator; im Skalarkontext erstellt es ein
Bereichsobjekt, siehe smartmatch
* ... - yadda Operator
* / - Division, numerischer Kontext
* // - err Operator, liefert ersten definierten Wert
* : - konvertiert Dezimalzahl auf andere Basis; pair generation operator
* :: - Namespacetrenner wie in Perl5
* ::= - Binding zur Compiletime
* := - erzeugt Alias auf Variable (Binding)
* ; - trennt Befehle (Ausdrücke) oder Arrayindizes wie z.B. @a[2;3] statt @a[2]3
* - kleiner als, numerischer Vergleichsoperator
* ** - double pointy Syntax um einem Block rw Parameter zuzuweisen
* < - wendet den Operator links als Hyperoperator auf den Array rechts an
* <== - linker feed-Operator im append-mode
* > - circumfixer Operator zum gruppieren mit autoquoting (vormals qw()),
jedoch interpolierend wie ""
* = - kleiner gleich, numerischer Vergleichsoperator
* == - nach links zuweisender feed-Operator
* ** - numerischer Vergleichsoperator, benutzt Order Klasse
* ** circumfixer Operator zum gruppieren mit autoquoting (vormals qw())
* = - infix: Zuweisung; präfix:Zeile aus einem Datenstrom im Skalarkontex.
Ähnlich wie früher Diamantoperator '<>', siehe
* =:= - prüft auf Binding
* == - Gleichheit von Zahlen
* === - Gleichheit von Inhalt und Typ
* ==> - nach rechts zuweisender feed-Operator
* ==>> - feed-Operator, der Werte an vorhande Liste anhängt (append-mode)
* > - grösser als, numerischer Vergleichsoperator; beendet Gruppierung mit
autoquoting (vormals qw())
* >= - grösser gleich, numerischer Vergleichsoperator
* >> - bindet Operator (rechts) als Hyperoperator an einen Array (links);
* ? - konvertiert Wert in Binärkontext; kennzeichnet optionale Parameter in Signaturen;
sekundäre Sigil von konstanten Kompiler-Info-Variablen
* ?& - and-Verknüpfung, erzwingt Binärkontext
* ?? !! - ternärer Operator
* ??? - yadda Operator
* ?^ - xor-Verknüpfung, erzwingt Binärkontext
* ?| - or-Verknüpfung, erzwingt Binärkontext
* @ - Sigil der Arrays
* @@ - Sigil für Multislice-Kontext
* [] - circumfixer Operator der eine Arrayreferenz erstellt, wenn er eine Liste
umschließt; hinter einem Array liefert der Ausdruck einen Teilarray (slice),
der diejenige Elemente des originalen Arrays enthält, deren Index innerhalb
der eckigen Klammern steht; umhüllt auch Reduktionsoperatoren
* \ - Capture Operator, erzeugt Referenz auf folgende Struktur
* ^ - junctives xor, verlangt das ein Wert der Menge die Bedingung erfüllt; bei
Bereichsangaben (..) schliesst es Grenzwerte aus. Im Skalarkontext siehe smartmatch,
im Arraykontext siehe Arrayerzeugende Operatoren; sekundäre Sigil der automatisch
benannten Parameter eines Blocks
* ^^ - logisches xor, verknüpft Aussagen, ist nur einer der verknüpften Werte wahr,
wird dieser zurückgegeben, ansonst liefert er unwahr
* { } - circumfixer Operator: umschließt Blöcke und erstellt eine coderef oder eine
Hashref wenn es als hash gekennzeichnet ist oder ein '=>' enthält
* | - dereferenziert Capture; junctives or, verlangt das eine Bedingung erfüllt ist;
* || - logisches oder, verknüpft Aussagen, beendet Auswertung bei erstem Ausdruck mit
wahrem Ergebnis und liefert es zurück
* ~ - verknüpft Texte und erzwingt String Kontext, Synonym für cat
* ~& - zeichenweises and, erzwingt String Kontext
* ~ - zeichenweiser linksshift, erzwingt String Kontext
* ~> - zeichenweiser rechtsshift, erzwingt String Kontext
* ~^ - zeichenweises xor, erzwingt String Kontext
* ~| - zeichenweises or, erzwingt String Kontext
* ~~ - smartmacht Operator, sucht, ersetzt und prüft (fast) alles
871 デフォルトの名無しさん [sage] Date:2007/12/07(金) 07:53:46 ID: Be:
あーごめんなさい。意味不明だったな。
xyzzy lisp で xyzzy scheme 作ってもあんまりうれしくない気がする。
新しく Scheme ベースのエディタ作ったほうがいいんじゃない?
872 デフォルトの名無しさん [sage] Date:2007/12/07(金) 08:35:53 ID: Be:
>>871
どっかの院生がgauche+gtkのemacsライクなエディタ作ってなかったっけ?
挫折したのか最近情報がないけど。
で、どうなんですか? 本業に忙しくて関わっている暇がない?
When most programmers hear a mention of Forth, assuming they're familiar with it at all, a series of memory fragments surface: stack, Reverse Polish Notation, SWAPping and DUPlicating values. While the stack and RPN are certainly important to Forth, they don't describe essence of how the language actually works. As an illustration, let's write a program to decode modern coffee shop orders. Things like: i'd like a grande skinny latte and gimme a tall mocha with an extra shot to go The catch here is that we're not allowed to write a master parser for this, a program that slurps in the sentence and analyzes it for meaning. Instead, we can only look at a single word at a time, starting from the left, and each word can only be examined once--no rewinding.
Abstract: In this paper we describe the structure of the Essential Haskell Compiler (EHC) and how we manage its complexity, despite its growth from essentials to a full Haskell compiler. Our approach splits both language and implementation into smaller, manageable steps, and uses specific tools to generate parts of the compiler from higher level descriptions.
from comment From the look of things, writing point-free code in Haskell is sort of like writing higher-order functional code in Java. You can do it for sure, and it makes a fun blog entry, but it takes a lot of effort, and you have to imagine the code in your head first and then "compile" it to your target language. Also, stuff like (f . g . h) just looks backwards to me, because h executes first, then g, then f. And then Haskell point-free code have the noise such as . $ and so on. It seems concatenative/stack languages are much better if you want to investigate point-free programming. Are there any situations where you actually want to write point-free code in an applicative language like Haskell?
Beginning in mid-January 2008, Sun and the six open source communities will announce details on how developers can participate in the individual programs. Each community will have its own contest rules and judging criteria. Prize winners will be announced in August 2008. "Developer communities are at the heart of tech industry innovation and are Sun's lifeblood," said Jonathan Schwartz, CEO and President of Sun Microsystems. "Every software product at Sun -- literally billions of dollars in assets -- is going free and open source, and fueling the communities and innovation around these technologies is our top priority. I can't wait to see the creativity, passion, and vibrancy of the program's participants."
む、コメントが(最初に見た時点で)75もついている。 ゆっくり読む価値があるかもしれない。
うわ、こっちは150あるよw
Yukihiro Matsumoto - I just threw this one in for the search engines. Just kidding! This the man that brought us Ruby and proves that even in the land of the rising sun, programmers still need beards. Or at least a five o'clock shadow.
from comment Learning more than one of perl, python or ruby is perhaps not worth the investment of time. They are all fairly close in terms of expressive power and performance and each has considerable libraries to learn (and syntax in some cases - perl probably has the most). They sit in slightly different niches but are close enough that unless you have a good reason (like you need to pick up another of them because you move to a new job) or are otherwise motivated (we all love xkcd) it's probably time better spent learning scheme, common lisp, haskell, erlang or something else a bit further out of the mainstream scripting niche.
只今ごにょごにょちう…→ ごにょごにょ
pdfだからいちいち開くのがめんどうKUSEEE
The 1st European Lisp Symposium has put out a call for papers. The symposium will be held on May 22 and 23, 2008, in Bordeaux, France.
Erlang/OTP R12B-0 has been released. Erlang is a general-purpose language, offering support for concurrency, distribution and fault tolerance. This release includes: SMP support on Windows, a new Inets interface, a new array module, support for bitstrings and binary comprehensions, documentation updates, bug fixes, and other changes.
メモ。 未だに一度も使ったことないんだけどねw
告白するが、少しの間使っていないとすぐにメタキャラクタや文字クラスの意味を忘れるので、 近くにリファレンス本が欠かせない。
その手のチートシート(カンペともいう)代わりのリファレンスということなら、
正規表現デスクトップリファレンス
の方がいいんじゃないかと思うんですがどうでしょうか?
(って原書は版が新しくなっているっぽいンだけど)
ここで自分が関わった本を挙げないところがおゆくかしい(何故か変換できない)ですね。 とかゆーw。
電子立国の三回目だっけか、トランジスタのエピソードやったのは。 あ゛ー観てーよー。
へー。
プログラミングの知識が乏しい方が段階的にハッカーへと成長していく過程があるとして、その 3段目くらいには、「実際にコードを書いてみる」というものがあると思う。将来のハッカー、 つまり現在の初心者にとってこの行動は今後の将来を左右する非常に重要な通過儀式だが、いざ その段になると当初自分が考えたほど思い通りには進まず、ごく基本的なサンプルコードの意味 は理解しても、実際に自分で何かサービスを作ろうとすると、それに必要な知識とのかい離にが くぜんとするといったこともしばしば起こる。そうこうしているうちに「自分にはプログラミン グの才能がないのだ」と距離を置き、別の誰かが作成したプログラムやサービスを「これこれ、 これがほしかったんだ」とブックマークするだけの受動的な行動へ走ってしまう人も少なくない。 「それはもったいない。開発はイノベーティブなもの」とdeveloperWorksでは今回、開発プラ ットフォームとしてはスタンダードな存在になったEclipse、そしてアプリケーションサーバー Apache Geronimoについて、ハンズオン形式でインストールからプログラムの実行までを理解で きるeラーニングコンテンツを用意した。3カ月限定ではあるが無償で利用できる。
ネットワーク部分の拡張が動いてなかった。 たぶんipv6対応のところでしくっているのだと思う。 調査開始。
まとめを書いている時間がNEEE
和んだw
Hop 1.8.0 has been released. Hop is a higher-order language designed for developing Web applications.
Frink 2007-12-04 has been released. Frink is a language which allows for units of measurement to be tracked throughout calculations to help ensure correct answers.
IKVM 0.36 Release Candidate 6 has been released. IKVM is a Java implementation running on Mono and the .NET Framework.
jijixi's diary - Erlang 5.6 , Common Test 事始め , Haskellなんかだとデバッグがえらい大変なイメージがあるんですが、 OCamlはその辺りはどう..
[clip][Python] 3.0a1の新機能 (2) (プログラミング日記) と書いてある、"views" ってなんじゃ?とりあえず『文字列』ではないみたいですが?
SQLの問い合わせのときに出てくる「カーソル」みたいなものじゃないでしょうか? >view
ちなみにこの本、内容はお薦めなんですが、『anonymous function』の訳語が『匿名関数』にな っているのが某一部の方には不評かもしれません :-p
それはいけませんねえ(笑) まあ訳語だけで本の価値が決まるわけでなく、自分は編集者でもなんでもないですから。
http://www.page.sannet.ne.jp/hirasho/diary/diary0712.html#4p2 Visual C++にバグを見つけた。泣く泣く設計を変更する。コンパイルできないのではどうし ようもない。gccなら通るのに。
コンパイルできる/できないのならまだましで、 なまじしれっとコンパイルするんだけど実は生成したコードがバグってました というほうが怖いと思うんだけどどうでしょうか(一回はまった)。
今までこういう質問が出なかったのが不思議といえば不思議。
ruby-core: 13887 Hi, I understand this question is a little bit "earlier" before Ruby 1.9.x debut in Dec. 2007. There will be many big changes in 1.9 release like new VM and M17N based strings. Matz has explained that after 1.9 release the following deliveries will be the version to patch on 1.9 to include people's feedback for 1.9. However, if we look further through year 2008, is there any other big changes ( like VM or M17N ) for Ruby that are going to happen? Is there any place I can find the "roadmap" or "release plan" for the evolution of Ruby?
1.9.x の間はさすがにそんなにでかい変更は入れないんじゃないかなあ。 入るとしたら、2.0になるタイミングでしょう(ってのはどこかでまつもとさんも 云っていたような気がする)。 VMとかに匹敵するほどのでかい変更というとキーワード引数とか?
【えっ】Perlに未来はあるのか?【終わり?】
http://pc11.2ch.net/test/read.cgi/tech/1180713251/181-
181 デフォルトの名無しさん [sage] Date:2007/12/04(火) 14:53:45 ID: Be:
Perl6が別言語覚えるような手間が必要だとすると、
RubyでもPerl6でも新しく使おうとするなら、
たいして差が無いような気もして来るな。
182 デフォルトの名無しさん [] Date:2007/12/04(火) 18:03:04 ID: Be:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::。:::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::。::::::...... ... --─- :::::::::::::::::::: ..::::: . ..::::::::
:::::::::::::::::...... ....:::::::゜::::::::::.. (___ )(___ ) ::::。::::::::::::::::: ゜.::::::::::::
:. .:::::。:::........ . .::::::::::::::::: _ i/ = =ヽi :::::::::::::。::::::::::: . . . ..::::
:::: :::::::::.....:☆彡:::: //[|| 」 ||] ::::::::::゜:::::::::: ...:: :::::
:::::::::::::::::: . . . ..: :::: / ヘ | | ____,ヽ | | :::::::::::.... .... .. .::::::::::::::
::::::...゜ . .::::::::: /ヽ ノ ヽ__/ ....... . .::::::::::::........ ..::::
:.... .... .. . く / 三三三∠⌒>:.... .... .. .:.... .... ..
:.... .... ..:.... .... ..... .... .. .:.... .... .. ..... .... .. ..... ............. .. . ........ ......
:.... . ∧∧ ∧∧ ∧∧ ∧∧ .... .... .. .:.... .... ..... .... .. .
... ..:( )ゝ ( )ゝ( )ゝ( )ゝさようなら perl… ..........
.... i⌒ / i⌒ / i⌒ / i⌒ / .. ..... ................... .. . ...
.. 三 | 三 | 三 | 三 | ... ............. ........... . .....
... ∪ ∪ ∪ ∪ ∪ ∪ ∪ ∪ ............. ............. .. ........ ...
三三 三三 三三 三三
三三 三三 三三 三三
183 デフォルトの名無しさん [sage] Date:2007/12/04(火) 18:23:21 ID: Be:
>>181
CPANモジュールが使えるかどうか、という大きな差があるよ。
184 デフォルトの名無しさん [sage] Date:2007/12/04(火) 22:51:31 ID: Be:
Perl6は確かに演算子が置き換わったりするけど、こうなるとよりPerlらしくなるなあ、
というPerlプログラマーの願望通りの変化なので抵抗は少ないと思う。
185 デフォルトの名無しさん [] Date:2007/12/05(水) 02:02:11 ID: Be:
隊長、我々はいつまで絵に描いたモチ(Perl6)を待ち続ければ良いんですか!
186 デフォルトの名無しさん [sage] Date:2007/12/05(水) 09:58:40 ID: Be:
全線で包囲されたまま補給が途絶え、援軍のアテもないまま玉砕への道を辿る日本兵の集団かよw
187 デフォルトの名無しさん [] Date:2007/12/05(水) 18:00:54 ID: Be:
長い間ごくろうさまでした。ありがとう。
どういう流れだw 今年のクリスマスにも補給はなさそうだしねえ。
第15回 Haskellでのデバッグのコツをつかむ:ITpro
プログラムが思った通りに動かないとき,あるいは他の人が書いたプログラムを理解したいとき には,プログラムの挙動を調べてみるでしょう。例えば,「入力」に対する「出力」を調べたり, プログラムが保持する「状態」を確認することで,挙動を理解しようとするはずです。そうした ときに使う手法が,プログラム動作中の変数の値といった情報を適宜出力する,いわゆるトレース (trace)です。C言語では情報の表示によくprintfを利用することから, printfデバッグとも呼 ばれます。 Haskellでトレースを使うには,二つの問題があります。一つは,Haskellの型は必ずしも値を 表示できるものばかりではない点です。これは回避が容易なので,さほど問題ではないでしょう。 より深刻なのは「Haskellでは,副作用によるバグの発生を防ぐために,I/Oの扱いに対して制約が ある」という点です。この結果,Haskellではトレースが行いにくくなっています。Haskellでは, 値を表示するprintのような副作用を持つ処理を,I/Oモナドなどを通して明示的に扱う必要があり ます。しかし,トレースの対象になるコードがI/Oアクションであるとは限りません。 一体どうすればいいのでしょうか? 今回はこうした疑問に対する答えを提示したいと思います。
こういうのを待ってました。
Cのポインタで躓く人が多いが、Javaの参照で躓く人が少ない理由
Cのポインタは多目的に使われたり、演算が可能だったり 配列と可換のようで微妙に違う場合があるとかで混乱しているのかなあ と思ったり。
MSN相談箱 PHP 正規表現 数字又は数字以外を判別 → MSN相談箱 電話番号 正規表現 ときてこれ。
MSN相談箱 電話番号入力確認 やっぱり分かりません。以前電話番号の入力に関する質問をしていて、いろいろご回答頂き自分で取り組んだのですが、 やはり分かりません。一様、下記のコードを制作したのですが、まだ、ちゃんと動かない状態です。 なぜちゃんと動かないかお分かりの方、おられましたら教えて下さい。 電話番号の判定に関する正規表現 $tel1は市外局番、 $tel2は市内局番、 $tel3はお客様番号 ついでに$tel4は内線番号としたい。 それでどのような判定を正規表現でしたいかというと 1)まず、この電話番号入力欄は入力しても空欄でもよい。 2)ただし、$tel1、 $tel2又は$tel3の一つにでも入力した場合は、他の二つにも(たとえば、 $tel1に入力した場合には$tel2及び$tel3にも)必ず入力しなければならない。 3)$tel4は空欄でも入力しても良いが、$tel4を入力する場合は必ずtel1、 $tel2及び$tel3が 入力されている必要がある。 4)tel1、 $tel2、$tel3及び$tel4に入力がある場合は、数字のみ可能。 これらの判定は、ばらばらに行なうのではなくまとめて行ないます。そのため結果は「電話番号 正確」又は「電話番号不正確」のどちらかが1回のみ出力されるようにします。 以下は、目指す表示結果です。 この場合、「電話番号不正確」としたい。 $tel1 = 123 $tel2 = 空欄 $tel3 = 789 $tel4 = 空欄 この場合、「電話番号不正確」としたい。 $tel1 = a $tel2 = 456 $tel3 = 789 $tel4 = 空欄 この場合、「電話番号不正確」としたい。 $tel1 = 空欄 $tel2 = 空欄 $tel3 = 空欄 $tel4 = 101 この場合、「電話番号不正確」としたい。 $tel1 = 123 $tel2 = 456 $tel3 = 789 $tel4 = a この場合、「電話番号正確」としたい。 $tel1 = 123 $tel2 = 456 $tel3 = 789 $tel4 = 空欄 この場合、「電話番号正確」としたい。 $tel1 = 123 $tel2 = 456 $tel3 = 789 $tel4 = 101 この場合、「電話番号正確」としたい。 $tel1 = 空欄 $tel2 = 空欄 $tel3 = 空欄 $tel4 = 空欄 以下の私のコードはちゃんと動作しません。なぜか分かりません。 <?php $tel_flg1 = 0; $tel_flg2 = 0; $mix = $tel1 . $tel2 . $tel3; if ($tel1 != "" or $tel2 != "" or $tel3 !="" or $tel4 !=""){ if (!ereg("^[0-9]+$", $mix)) { $tel_flg1 = 1; } } if ($tel4 != ""){ if (!ereg("^[0-9]+$", $tel4)) { $tel_flg2 = 1; } } if ($tel_flg1 == 1 or $tel_flg2 == 1) { echo '電話番号不正確'; }else{ echo '電話番号正確'; } ?> コードを修正していただくか、正しいコードを教えていただければ幸いです。 コードが修正可能なら、修正していただいた方がどこを間違えていたのか理解しやすいです。 よろしくお願いします。
で、つきあいのいい回答者がいてアドバイスをしたりするんだけど
×××さん ご回答ありがとうございました。 不足している部分が存在しているのは気が付いていますが、実際コードをどのように修正して よいものやら分かりません。修正コードを教えて下さい。そうしないと、いたちごっこです。 このスレッドでは修正コードをお聞きしています。 実際にコードを試してみてどのような動作が不足しているかは理解できているため、どのような 処理が足りていないかの言葉の表現は余り必要ではありませ。足りない動作が分かっていても コードをどのように修正したらよいか分からないからお聞きしています。
もうね、窓からPC投げ捨てて(以下略)
Amazon から到着。想像以上に重くて驚いた。UPS ってこんなに重量級なハードなのか…。
UPSは実質鉛蓄電池の塊ですからね。駆動時間が長ければ長いほどヘビーになりますね。 某社でサーバーPC用のUPSを設置したときは泣けた。 が、こーゆー動きもあるようです(Yahooのなんでしばらくすると消えます)
デンセイ・ラムダ、リチウムイオンバッテリ搭載の2kgを切るUPS(Impress Watch) - Yahoo!ニュース http://headlines.yahoo.co.jp/hl?a=20071204-00000045-imp-sci デンセイ・ラムダ株式会社は4日、重量1.9kgの小型UPS「DL3120-072JW」を発表した。出荷開始は 2008年1月31日の予定。 本体サイズが200×285×44mm(幅×奥行き×高さ)と、業界最小/最薄/最軽量を謳うUPS。 IP電話/アクセスポイント/監視カメラなど、小型デバイスのバックアップ電源としての利用が 想定されている。 バッテリに従来の鉛充電池ではなくリチウムイオン充電池を使用したことで、8年間メンテ ナンスフリーとした。常時商用給電方式と正弦波出力を組み合わせ、出力容量は72VAと小容量 ながら、災害時でも確実な駆動を実現可能という。 運転モード切替時間は10ms以下、バックアップ時間は30分/50W、50分/35W。
まだPCとかに使うのは無理そうですが (シャットダウンへの時間稼ぎくらいならできる?)。
Impress Watchでのページ発見→ デンセイ・ラムダ、リチウムイオンバッテリ搭載の2kgを切るUPS
jijixi's diary - F# とか や、随分前に手を出してますよと言ってみるテスト。この辺の RSS も登録してますし。まあ、 最近はあんまり追い掛けてないですが。 なんでかっていうと、メインの環境 (Mac OS X/ppc + Mono) で動かないから。一応 Mono に 配慮したファイルとかも入ってるんで動く環境もあるんだろうけど、ともかくウチでは動かな いのでショボンなのです。サブの Windows 機にはたまに気が向いたときに、その時点で一番新 しいのを入れ直したりしてます。
F#の紹介のところに、Objective Camlと云々とあったのと、記憶の片隅に 結構この言語を買っている人がいたというのがあったのでちょっとネタ振りしてみました (2005年のあたりは読んでねーっす(^^;)。 CLR上で動くものなので多分…と思ってましたがやはりそうですか。 Mono上で動かないというのは、Mono側の問題なんでしょうか(未実装な機能があって それが使われちゃってるとか)?
ついでに
http://jijixi.azito.com/cgi-bin/diary/index.rb?date=20071205#p02 ◆ [OCaml,DouKaku] 文字列の八方向検索 2007/12/5 16:25 jijixi [OCaml,DouKaku] 文字列の八方向検索 昨日引用したというフレーズにインスパイアされて、一発実行プレイをしてみた。要するに書き上げるまで一 度も実行せずに (さすがに ocamlc -i で型は確かめるよ)、最初の実行で思ったとおり出力され てバンザーイ……というのをやろうと。 で、ほぼうまく行ったので、そのままリファクタリングとかせずに投稿してみた→#4616 こういうカタルシスは強い静的型付け言語じゃないと味わえないと思う。比較的感触が近いのは テスト駆動開発かな。あれはある意味、型検査に類する何かを自分であらかじめ書いてるような もんだと思うんだよね。で、テストを実行するのは OCaml で言えば ocamlc -i するのと同じよ うなもんで、ちょっとずつ型 (とか、それに類する何か) の整合性を高めていくことで、プログ ラムを完成させていくというか。 スーパーハッカーな人だと、動的型付け言語でもこれくらいの問題なら一発で書けちゃうのかも 知れないけど、わしのような凡人にはそれは無理なわけよ。でも、OCaml ならわりとできちゃう。 「おれってすげぇー」感を感じることができちゃう。そんなところも、わしが OCaml の好きな ところの一つだなーと思う。思った通りの型の関数が定義できただけで, それが正しい定義になっている可能性が高い
なるほど。 Haskellなんかだとデバッグがえらい大変なイメージがあるんですが、 OCamlはその辺りはどうなんでしょうか。って三冊も本買ってるんだから とっとと処理系インストールして試しやがれ。ってとこですね(^^;
たくさんあって絞るのが大変
For those of you playing with JRuby, if you run across benchmarks of any kind that show JRuby running slower than Ruby 1.8.x, we'd appreciate you filing them as bugs: http://jira.codehaus.org/browse/JRUBY In general, performance in JRuby should be better for normal execution, so we'd like to find any remaining performance bottlenecks. Poor performance is a bug! Thanks for your help! - Charlie
Should Java be banned from schools? Posted by: Ke Jin on 12? 03, 2007 DIGG Edsgar W. Dijkstra once said: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." Java CS student seem to be not much better than their predecessors. As Joel Spolsky pointed out in his article The Perils of Java, starting from the easy to learn Java language also has a negative impact on the development of abstraction ability and mental agility. A while ago, I had a conversation with a chief scientist of a Java consulting and service firm. Initially, he sneered at the concept of domain specific modeling (DSM) and claimed that he had been doing similar thing for the last four years . Prepared to hear some insight opinions, I was disappointed to find out that he actually did not have even the lowest level understanding on what he was claiming and commenting about. When the topic changed to Java vs XSLT, he started to criticize the XSLT for not allowing programmatic configuration. Specifically, he was not able to change values of XSLT variables. I thought, by programmatic , what he really meant was imperative. Therefore, I explained to him that this was not a flaw of XSLT. XSLT (at least in 1.0) did not have the concept of mutable variables because it was designed as a declarative language. He should change his mindset for this (imperative to declarative) paradigm shift and learn where and how XSLT was supposed to be used and avoided (in fact, he was wrongly using XSLT for application configurations rather than for data or configuration transformations). However, he disagreed and replied: "By programmatic, I mean the opposite of imperative .... and not force people to make a paradigm shift". So, according his description, his so-called programmatic programming would be something that: 1. is opposite to the imperative programming, 2. does not force mindset shift (to the declarative paradigm), 3. supports mutable variables. If a senior Java professional, after using XSLT for four years, still has neither the idea of declarative vs imperative programmings nor a passion and mental agility to explore new paradigms, what about average Java CS graduates? Is there a large collection of information simply not being taught? Is Java part of the problem, or is it the schools' issues? Message was edited by: joeo@enigmastation.com
comment Schools that teach only one language should be banned. Programmers need to see: Assembly language (doesn't matter which, most will never use it again, but doing hello world in assembly makes one appreciate what is really going on). LISP (scheme is an acceptable substitute), some Algo (C) like language, some functional language, some OO language, some language they are likely to see in the real world, some scripting language, and some research language. Even though many languages will fit more than one catagory, you should not do that, so if Java is your OO language you need to teach C as well for Algo, and then C++ for your real world language. A good programmer will not let language limit them. A programmer who rea
またいつもの流れに… コメントの最後の、A programmer…はどう訳したもんでしょうか。 一つの言語が~するのを知っているだけのプログラマが・・・?
そういや、(Cではなく)C++で拡張を書ける(書きやすい)スクリプティング言語って 割と少ないような気がしますが(Pythonはその少数派の方)、 Luaとかはどんなもんなんでしょうか。あと十日くらいで本が出るから要チェックか。
People who prefer the single exit point tend to feel very strongly about it. But the
reasons they give have never struck me as especially convincing. The following stream
of generic reasons reminds me of the cookie-cutter platitudes that they roll out at
the end of the more nauseating US TV series that seek to emulate ER, over the
soul-grinding background warble of James Blunt:
1. Bailing out early causes resource leaks. That's why we have the "finally" block.
(If you're determined to have a single exit point, finally is the only way to achieve
it. But purists take note, System.exit() still gets around it.)
2. Multiple exit points make code harder to refactor. Yes, because simpler, clearer
code is always harder to maintain.
3. Multiple exit points is a return to GOTO and spaghetti code. Ironically, it's
single-exit-point code that's the anachronism. The whole reason this misguided
principle came about was the reaction to spaghetti code that was structured
programming. In modern languages and runtimes, single-exit-point code is outmoded and
can even be dangerous. For example, the ubiquity of exceptions means that no method is
ever guaranteed to have a single exit point. Code as if it is, and you're asking to be
caught out.
4. Bailing out early creates an invisible "else" clause. What rubbish. A guard
clause such as this:
if (account == null) return;
at the top of a method is much clearer, than:
if (account != null)
{ // 20 lines of code
// (that are totally irrelevant if account is null)
// later...
}
// and out we pop
Sometimes, trying to weave your code into a single return point results in setting of
pointless flags and excessive nesting of "if..else" conditions. It's like wrapping a
paper napkin around a seven-dimensional helix and trying to read the agile
documentation off it. Figuring out whether each block of code is relevant to the
current program state becomes a game of lining up the curly braces to figure out where
each clause finishes.
It's easier to simply say: "Hey, I'm halfway through a method but I'm done. I'm outa
here!" Artificially stretching the program flow to the end of the method just results
in misleading code: implying that a block of code is relevant to a given state when
the runtime really has no business still noodling around in there. If it's time to
exit a method, exit the method already.
Adhering to an outdated maxim like "single exit point" results in a "one size fits
all" approach to programming, which is hardly a good thing. But religiously hacking in
multiple return points would of course be bad as well. If in doubt, go for the simpler,
more expressive option which best communicates what the code means. It's more an
article of faith than anything else. It's important to be able to take a step back and
make a rational judgement call: this alone helps sort out the thinkers from the
believers. R
わたしは積極的に、リターンできるなら即座にする傾向にありますが、 みなさんはいかがでしょうか?
However, iterative planning is harder to sell. Stakeholders want the project delivered by a fixed date on a fixed budget, and an uncertain iterative plan does not help with that. The XpDay keynote also offered three strategies for dealing with that:
Mobile Memory Mouse 8000は、マウス本体に、ワイヤレス受信機と充電ケーブルが付属する(図 1)。それだけなら普通の無線マウスと変わらないが、この製品はワイヤレス受信機を多機能化 している点が新しい。ワイヤレス受信機は、マウス本体からの信号を受信する機能以外に、1GB のメモリーを内蔵しており、USBメモリーとしても利用できる。さらに、充電アダプターとして の機能も備える。
reddit経由で。 Re: Why should I use perl 5.10?
Here are some things of the top of my head that I think are pretty cool:
* state variables
No more scoping variables with an outer curly block, or the naughty my $f if 0 trick.
state 変数 (状態変数でよい?)
もはや変数のスコーピングのための外側にあるブロックは必要なくなりました。
my $f if 0 というオマジナイも同様。
* defined-or
No more $x = defined $y ? $y : $z, instead you can write $x = $y // $z
$x = defined $y ? $y : $z は $x = $y // $z と書けるようになりました。
* regexp improvements
Lots of work done by dave_the_m to clean up the internals, which paved the way
for demerphq to add all sorts of new cool stuff.
内部構造の整理に対するdave_the_m による多大な努力により
* smaller variable footprints
Nicholas Clark worked on the implementations of SVs, AVs, HVs and other data
structures to reduce their size to a point that happens to hit a sweet spot on
32-bit architectures
変数のフットプリントの縮小
Nicholas Clark はSV, AV, HV その他のデータ構造の実装において
32bitアーキテクチャにおいてsweet spot であったそれらのサイズを
縮小することに注力しました
* smaller constant sub footprints
Nicholas Clark reduced the size of constant subs (like use constant FOO => 2).
The result when loading a module like POSIX is significant.
定数 sub のフットプリントの縮小
Nicholas Clark は 定数 sub (use constant FOO => 2 のようなもの)のサイズを
小さくしました。このことは、POSIXのようなモジュールをロードするときに顕著に
効果が現れます。
* stacked filetests
you can now say if (-e -f -x $file). Perl 6 was supposed to allow this, but they
moved in a different direction. Oh well.
if (-e -f -x $file) のように記述することが可能になりました。
Perl 6は以前からこのようにできましたが、
* lexical $_
allows you to nest $_ (without using local).
local を使うことなく $_ をネスとして使うことができるようになりました。
* _ prototype
you can now declare a sub with prototype _. If called with no arguments, gets fed
with $_ (allows you to replace builtins more cleanly).
_ というプロトタイプを使ってサブルーチンを宣言することができるようになりました。
引数なしで呼ばれた場合に $_ で受け取ります。
組み込み関数をより明快に置き換えることができます。
* x operator on a list (リストに対する x 演算子)
you can now say my @arr = qw(x y z) x 4. (Update: this feature was backported to
the 5.8 codebase after having been implemented in blead, which is how Somni notices
that it is available in 5.8.8).
@arr = qw(x y z) x 4 のように記述できるようになりました。
* switch
a true switch/given construct, inspired by Perl 6
Perl 6にインスパイアされた本当の switch/given 構造です。
* smart match operator (スマートマッチ演算子)
(~~) to go with the switch
* closure improvements (クロージャの改良)
dave_the_m thoroughly revamped the closure handling code to fix a number of buggy
behaviours and memory leaks.
* faster Unicode (Unicode関連の高速化)
lc, uc and /i are faster on Unicode strings. Improvements to the UTF-8 cache.
* improved sorts (sortの改良)
inplace sorts performed when possible, rather than using a temporary. Sort
functions can be called recursively: you can sort a tree
可能であれば、一時領域を使わずにその場でのソート(inplace sort)を行います。
sort関数は再帰的に呼び出すことが可能です。これにより木のソートができます。
* map in void context is no longer evil. Only morally.
void コンテキストにおけるmapはもはや邪悪なものではなくなりました。
* less opcodes
used in the creation of anonymous lists and hashes. Faster pussycat!
* tainting improvements
More things that could be tainted are marked as such (such as sprintf formats)
* $# and $* removed
Less action at a distance
* perlcc and JPL removed
These things were just bug magnets, and no-one cared enough about them.
update: ok, in some ways that's just a rehash of perldelta, here's the executive summary:
There has been an awful lot of refactoring done under the hood. Andy "petdance" Lester
added const to just about everything that it was possible to do, and in the process
uncovered lots of questionable practices in the code. Similarly, Nicholas Clark and
Dave Mitchell nailed down many, many, many memory leaks.
Much of the work done to the internals results in a much more robust engine. Far
likelier err, less likely, to leak, or, heavens forbid, dump core. If you have long
running processes that chew through datasets and/or use closures heavily, that is a
good reason to upgrade.
For new developments, there are a number of additions at the syntax level that make
writing Perlish code even better. Things like Mark-Jason Dominus's book on Higher
Order Perl makes heavy use of constructs such as closures that tend to leak in 5.8. If
this style of programming becomes more widespread (and I hope it does, because it
allows one to leverage the power of the language in extraordinary ways) then 5.10 will
be a better fit.
Years ago, having been bitten by nasty things in 5.6, I asked Does 5.8.0 suck?. As it
turns out, it didn't. I think that 5.10 won't suck, either. One big thing that has
changed then is that far more people are smoking all sorts of weird combinations of
build configurations on a number of different platforms, and many corrections are
being made as a result of that. Things that otherwise would have forced a 5.10.1 to be
pushed out in short order.
『なぜワタシは Ruby 1.9.1を使うべきなのか?』 とか書いたら受けるだろうか?
第7回 名前空間のエイリアス修飾子と外部アセンブリ - @IT
プログラミング言語の歴史をひもとくと、構造化プログラミングとオブジェクト指向プログラ ミングの中間に、モジュール化プログラミングという言葉が出てくることがある。例えば、 Modula-2が代表的なモジュール化プログラミング言語である。また、C言語はモジュール化プロ グラミング可能な言語とされる。 さて、説明によっては、オブジェクト指向プログラミングはモジュール化プログラミングの進化 形であるかのように説明されることもある。しかし、すべてにおいてオブジェクト指向プログラ ミングはモジュール化プログラミングよりも強力とは限らない。スコープの制御という観点で見 ると、モジュール化プログラミングの方が強力という解釈もあり得るからだ。
へ? なにそれ? と思いつつも自分が不勉強なせいかもしれないと調べてみる。 とりあえずぐぐる先生に訊いてみる。
http://www.google.co.jp/search?q=%22%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E5%8C%96%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0&btnG=%E6%A4%9C%E7%B4%A2&hl=ja パーソナライズ "モジュール化プログラミング の検索結果 約 608 件中 1 - 10 件目 (0.22 秒)
…えーと。
めげずに英語方面に当たってみる。構造化プログラミングが“Structured Programming”だから “Modulized Programming”とかか?
http://www.google.co.jp/search?hl=ja&rlz=1B3GGGL_jaJP241JP241&q=%22modulized+programming&btnG=%E6%A4%9C%E7%B4%A2&lr= "modulized programming の検索結果 約 0 件中 1 - 3 件目 (0.17 秒)
どうしろとw
“module programming”で検索すると、そこそこ引っかかるように見えますが実は落とし穴が。 “Linux Kernel Module Programming” のように他の言葉の一部が引っかかっただけでした。
WikipediaのModula-2の項目には
Modula-2 is a general purpose procedural language, sufficiently flexible to do systems programming, but with much broader application. In particular, it was designed to support separate compilation and data abstraction in a straightforward way. Much of the syntax is based on Wirth's earlier and better-known language, Pascal. Modula-2 was designed to be broadly similar to Pascal, with some elements removed and the important addition of the module concept, and direct language support for multiprogramming.
の最後にある“module concept”を指して云ってるのかなあ>モジュール化プログラミング
Programming paradigm - Wikipedia, the free encyclopedia の最後に「なんちゃらプログラミング」ってののリストがありますが、 “モジュール化プログラミング”に当たりそうなものは見当たりません。 すみません。この“モジュール化プログラミング”なるものの正体をご存知の方が いらっしゃいましたらご教示くださいませ。
Japan.internet.com コラム/CodeGuru
メタプログラミングとは、別のプログラムを生成できるプログラムを書くことです。この技法は さまざまな言語においてさまざまな目的で使用されています。メタプログラミングは、部分的な 評価を行うことによって1つのプログラムを別のプログラムに変換する方法、言い換えれば、プ ログラミングを自動化する手段であるとも言えます[11]。メタプログラミングの典型例の1つは、 出力としてプログラムを生成するLexやYACCなどのコンパイラ構築ツールです。コンパイラ自体 もこのカテゴリに含めることができますが、コンパイラの場合は一般にホスト言語とドメイン言 語が異なります[3]。通常、コンパイラは特定の文法に従って書かれたソースを入力として受け 取り、CやC++、Javaなどのプログラムを出力します。 C++ではテンプレートとマクロを使用してコードを作成することができます。ただし、この方 法は綿密に設計された機能というよりはむしろコンパイラの乱用に近いという面が多少あります [12]。 C++コンパイラは、テンプレートがインスタンス化される時点でコードを生成します。同 様に、メタプログラミングの手段として多分最も古いものであるプリプロセッサも、マクロを展 開してコードを生成します。C++のメタプログラムでは、プログラムのホスト言語とドメイン言 語はどちらもC++であり、テンプレートがインスタンス化される時点で、C++のコンパイラによっ てC++のコードが生成されます。つまり、テンプレートによるメタプログラムの実行は、プログ ラムの実行時ではなくコンパイル時に行われます。従って、C++は2つのレベルから成る言語であ るとも考えられます[6][12][15]。
この方面で日本語で読める適当な(できれば入門レベルの)本なんてでてないですよねえ(^^;
ひょっとしたらこの辺も関係するかもしれないのでぺたり。 ヒトデはクモよりなぜ強い 21世紀はリーダーなき組織が勝つ - 目指せ一人前のプログラマ
ご苦労なこって。
下のプログラムは、ファイルに書いてある、姓と名のデータを 構造体にもたせ、それぞれ出力させるというものです。 これの応用として、関数を使って構造体にデータをもたせる プログラムに改良したいのですが、よくわかりません。 根本的なものはあまり変わらないと思っているのですが、 どなたか、詳しくアドバイスお願いします。
下のプログラムは、ファイルに書いてある、姓と名のデータを 構造体にもたせ、それぞれ出力させるというものです。 これの応用として、関数を使って構造体にデータをもたせる プログラムに改良したいのですが、よくわかりません。 根本的なものはあまり変わらないと思っているのですが、 どなたか、詳しくアドバイスお願いします。
コピペしたかのごとく改行位置まで同じでやがるw 探せば他でも投稿しているかも知れんな。
ぐぐってみたら プログラミング総合掲示板 が引っかかった。
twitterって、みんな会社のパソコン&会社の回線で更新してるの? どうしてるの? そうだとしたら、仕事中に遊んでるみたいでなんとなくやりづらいんだけど。
これはわたしも気になるところです。 つか、twitter関連はブロックされてるから仕事中は見聞きできないw
Joelの新作。
遷移図の生成部分だけでもくれないかなあ(笑)
リンクを辿ると (Visualizing Regular Expressions at Oliver Steele から Oliver Steele: Sourcesあたり) ソース非公開ってワケでもなさそう?
The front end is written in OpenLaszlo, and compiled to Flash. It uses AJAX and JSON to request the FSAs and the graphs. The back end is written in Python and C. The Python part is my PyFSA library, plus a bit of glue to turn various JavaScript objects and graph files into JSON strings. There’s also a cache so that my shared server doesn’t get quite so stressed even if the site becomes popular. (Having the front end logic on the client should help here too.) The C portion is the wonderful GraphViz. PyFSA creates a .dot file for each FSA, and uses GraphViz to lay out the graph. The server parses the annotated .dot file into a JavaScript object, and uses JSON to download the resulting graph to the client. An OpenLaszlo class on the client interprets the JavaScript graph description into a sequence of drawing instructions. It also saves the node positions, so that it can animate against them.
An example will help make this concrete by demonstrating a case where a lookahead is useful. Consider a simple pattern to match a filename and split it apart into a base name and an extension, separated by a ".". For example, in "news.rc", "news"is the base name, and "rc" is the filename's extension. The pattern to match this is quite simple: .*[.].*$ Notice that the "." needs to be treated specially because it's a metacharacter; I've put it inside a character class. Also notice the trailing $; this is added to ensure that all the rest of the string must be included in the extension. This regular expression matches "foo.bar" and "autoexec.bat" and "sendmail.cf" and "printers.conf". Now, consider complicating the problem a bit; what if you want to match filenames where the extension is not "bat"? Some incorrect attempts: .*[.][^b].*$ The first attempt above tries to exclude "bat" by requiring that the first character of the extension is not a "b". This is wrong, because the pattern also doesn't match "foo.bar". .*[.]([^b]..|.[^a].|..[^t])$ The expression gets messier when you try to patch up the first solution by requiring one of the following cases to match: the first character of the extension isn't "b"; the second character isn't "a"; or the third character isn't "t". This accepts "foo.bar" and rejects "autoexec.bat", but it requires a three-letter extension and won't accept a filename with a two-letter extension such as "sendmail.cf". We'll complicate the pattern again in an effort to fix it. .*[.]([^b].?.?|.[^a]?.?|..?[^t]?)$ In the third attempt, the second and third letters are all made optional in order to allow matching extensions shorter than three characters, such as "sendmail.cf". The pattern's getting really complicated now, which makes it hard to read and understand. Worse, if the problem changes and you want to exclude both "bat" and "exe" as extensions, the pattern would get even more complicated and confusing. A negative lookahead cuts through all this: .*[.](?!bat$).*$ The lookahead means: if the expression bat doesn't match at this point, try the rest of the pattern; if bat$ does match, the whole pattern will fail. The trailing $ is required to ensure that something like "sample.batch", where the extension only starts with "bat", will be allowed. Excluding another filename extension is now easy; simply add it as an alternative inside the assertion. The following pattern excludes filenames that end in either "bat" or "exe": .*[.](?!bat$|exe$).*$
語るに足るLispということでいいのだろうか?
Clojure might just be the Lisp I’ve been waiting for. Here’s why: 1. Clojure targets the JVM. 2. Clojure is functional, i.e. “side-effect free.” 3. Clojure has modern data structures. 4. Clojure fits into the Java ecosystem. 5. Clojure has built-in concurrency support. 6. Clojure abstracts Lisp sequences. 7. Clojure has metadata. 8. Clojure is still Lisp!
なんだ、このコメント数はw
So Lisp, let me know when you've modernised a little, and we'll talk again.
要はLispにケチつけたんで炎上した?
xor, xor …あー、ポインタを保持する変数をケチるあの手法かな? (リンク先を参照しないで推測)
Scala 2.6.1-RC1 has been released. Scala is a statically typed, extensible, multi-paradigm language, offering object-oriented and functional support. This release includes a number of bug fixes.
Ikarus 0.0.2 has been released. "Ikarus is a free optimizing incremental native-code compiler for R6RS Scheme." This release includes: compiler performance improvements, improved code generation, better R6RS conformance, bug fixes, and other changes.
Wraith Scheme 1.30 has been released. It is an R5RS Scheme implementation for the Mac. This release includes enhancements for parallel processing.
Schemeはたくさんあるなあ。
newLISP 9.2.8 has been released. newLISP is a portable, general purpose, Lisp-like scripting language. This release includes: the reworking and extension of get-url, post-url, put-url and delete-url.
It has been announced that the Standard Pascal web site has moved to standardpascal.org. The site contains "various information about the standard versions of Pascal as stated by the ISO and ANSI organizations."
F# 1.9.3.7 has been released. F# is a variant of ML running on .NET, sharing a core language with Objective Caml. This release includes: initial support for access controls, custom attribute targets, multiple custom attributes, library changes, documentation improvements, warnings and deprecations for some language constructs, bug fixes, and other changes.
さすがのjijixiさんもこれには手を伸ばしていない?
このように、和訳するドキュメント全部が実際に試してみないとわからないほど難しいわけでは ありませんが、動かしてみたり、ソースコードを眺めてみたりを繰り返しているうちに、翻訳に かかわった部分については詳細にわたり正確な知識が身につくというメリットがありました。通 常、興味をもっているソフトウェアのドキュメントを翻訳しようと思ってはじめるので、知りた い気持ちも手伝って、すっかりその道のエキスパートになっていった人たちは少なくありません。
俺々、ってエキスパートぢゃないけどさw
もうひとつ、和訳の苦労はオリジナルの英語サイトの更新の速さになかなかついていけないとい う点でした。とにかく、ソフトウェアのバージョンアップのスピードは速いし、Webサイトの更 新も速いです。ところが、日本語に翻訳するペースを速くするのは簡単ではありません。プロジ ェクトに参加して和訳しようという人はなかなか増えませんし、仕事の合間のボランティアです から思うように時間がとれない難しさもあります。加えて、メジャーなソフトウェアになってし まって日本語の情報が増えると、和訳ドキュメントの重要度も減ってしまうので、がんばって追 い付いて翻訳していこうというモチベーションも下がってきます。
みんな同じなんだねえ(しみじみと遠い目)。
そう!僕たちが目指すべきは「自分だけは競争から守られている」状態なのです。
しかし、こういう話題となると急に元気になって公開しろと迫る外野の人が居るね。問題の有無 はともかくとして、具体的な落しどころは当事者間で納得のいく話し合いの結果ならそれでいい と思うのだけど。
のシーンででてくる謎のメカ(笑)ってあるじゃないですか。 一部のコンビニでやっている、ガンダム関連グッズのくじの景品に あの謎メカの外見をしたUSBハブがあるんですよね。 実に欲しいんですが、店に入っている1セットにつき一つしかないらしく 何枚か買ってみてのですが当然のごとくはずしました。
んで、今日行ってみたらあたりが引かれてしまっていてなくなっていました○| ̄|_
んーいくらかなら出しても良いけど、 ヤフオクあたりにでても高い値になりそうだしなあ。
ガンダムねたでもう一つ。
G20買ってたなあ。薄い本だったから多分捨ててないと思うんだけど
どこに潜り込んでいるやら(笑)
くねくね科学探検日記
くねくね科学探検日記
くねくね科学探検日記
くねくね科学探検日記
くねくね科学探検日記
くねくね科学探検日記
くねくね科学探検日記
過去において文明は、周りの環境を壊しながら、手近な資源を使い尽くし、滅びていった。この 轍を、今の文明にも踏ませてはならない。 宇宙へと到達できる可能性を獲得した文明は、この宇宙でもかなり貴重なもののはずだ。この レベルに育った文明超生命体を、宇宙へ産まれ落とすことが、これから50年あまりの大きな課 題だと思う。上手にやらなければ、この超生命体の胎児は、宇宙へ産まれることなく流産してし まうだろう。 そうなったとき、文明は過去とおなじように、環境を壊し手近な資源を取り尽くして、徐々に 崩壊していく他なくなる。
LL(1)パーサってのは、1トークン読むだけで、それがどの構文に相当するのか確定できなきゃいけ ないわけで、識別子を読んだ時点でそれが手続き呼び出しか代入文かわからないPascalは、LL(1)で はないですよね。 CがLALR(1)であるというのと同程度にはPascalもLL(1)なんだろうと思うけど、ちょっとGoogleしたら、 そのへんの補足なしに「PascalはLL(1)」と書いてあると思える記事がいくつかあって気になったので。
LL(1) の (1) って、先読みトークンが一個あるって意味じゃなかったっけ? 先読みトークンがあれば、識別子を読み取ってなおその先にある
id ; id := var;
で区別がつくと思うんだけど、わし、何か勘違いしてるかな?
12/4 追記:
勘違いでした。LL(1)の場合、上記の例は文法の外にある情報を使わなければ
手続き呼び出しと代入文とを識別子を読んだ段階で一意に決定することができません。
Schemeをつくろう(6) GCCの関数評価順序 - ボクノス
GCCで表示される値は? printf("test> ", printf("1 "), printf("2 "), printf("3 "), printf("4 "));4 3 2 1 test> 勘弁して(泣
そんなにひっかかりやすいかなあ。 確かにこの辺は規格でも規定されていない(しようがない)ぶぶんだけど、 x86あたりに限定して考えれば(他のCPUでも大概は該当すると思うけど)、 後ろの引数から評価していくのはむしろ自然だと思うんだけど。
Ruby 1.9.0開発版、大幅な性能向上 - 12月末のリリースか | エンタープライズ | マイコミジャーナル
ベンチマークの結果が実際のアプリケーションの実行速度にそのまま反映されるわけではないが、 多くの結果で数倍から十数倍の実行速度向上が測定されており、1.8.6から1.9.0への移行で充分 に期待できる速度向上が実現されるのは確実といえそうだ。1.9.0の正式版は2007年12月末ごろ にリリースされるのではないかとみられている。
大丈夫かなあ、リリース。って、リリースされるのは1.9.0ぢゃないよっ (1.9.0は常にHEAD扱いになって、stableは1.9.1から番号が振られる)
なんで今ごろこんな古いのが発掘されて? という気がするけどまあいいや。 時間的な問題で
That was really interesting. Too bad the linked files are missing :(
というのは仕方がないところなのかもしれない。
セキュリティ重要。と。
CERT Secure Coding Initiative
Additional efforts in developing secure coding standards are originating outside of
formal standards organizations. CMU’s Software Engineering Institute (SEI) CERT
program has deployed a secure coding Web site at <www.securecoding.cert.org> to
cooperate with the software development community in codifying a practical and
effective set of secure coding practices for popular programming languages. These
coding practices can be used by software developers to eliminate vulnerabilities
before software is operationally deployed.
CERT’s initial efforts are focused on the development of secure coding practices for
the C and C++ programming languages. C and C++ were selected because a large
percentage of critical infrastructure is developed and maintained using these
programming languages. C and C++ are popular and viable languages, although they have
characteristics that make them prone to security flaws. The CERT C programming
language secure coding standard is scheduled for publication in January 2008 while the
C++ standard is not scheduled for publication until January 2009. However, working
drafts for both documents are available on the secure coding Web site.
(略)
A secure coding standard consists of rules and recommendations . Coding practices are
defined to be rules when all of the following conditions are met:
1. Violation of the coding practice will result in a security flaw that may result
in an exploitable vulnerability.
2. An enumerable set of exceptional conditions (or no such conditions) in which
violating the coding practice is necessary to ensure the correct behavior for the
program. One example of a rule with an exception condition is to ensure that integer
operations do not result in an overflow. While overflow generally indicates an error
condition, if the code was designed assuming module behavior then it is necessary to
provide an exception for overflows resulting from this behavior.
3. Conformance to the coding practice can be verified.
In today’s software-oriented world, software ownership frequently changes. It is difficult, if not sometimes impossible, to keep track of who has a certain piece of software at any given time. This presents a problem for those who wish to keep the software internal operations a secret. Languages such as Java, which preserves a lot of high-level information in its byte code, present a problem from the standpoint of source ownership and securing it from program de-compilation. Releasing Java classes can compromise sensitive information embedded in the software, such as a missile intercept computation. Java class files contain the byte code instructions interpreted by the Java Virtual Machine (JVM). These files are easily read by programs that can recreate a source file from the class file. Java obfuscation techniques were developed to make reverse engineering harder, but many of these techniques can be defeated.
ああ、これ自分でも調べよう調べようと思いながら放置してたネタだ。 ありがたや。
A common misconception about regular expression performance is that lazy quantifiers (also called non-greedy, reluctant, minimal, or ungreedy) are faster than their greedy equivalents. This is generally not true, but with an important qualifier: in practice, lazy quantifiers often are faster. This seeming contradiction is due to the fact that many people rely on backtracking to compensate for the impreciseness of their patterns, often without realizing this is what they're doing. Hence, the previously mentioned misconception stems from that fact that lazy quantifiers often result in much less backtracking when combined with long subject strings and the (mis)use of overly flexible regex tokens such as the dot. Consider the following simple example: When the regexes <.*?> and <[^>]*> are applied to the subject string "<0123456789>", they are functionally equivalent. The only difference is how the regex engine goes about generating the match. However, the latter regex (which uses a greedy quantifier) is more efficient, because it describes what the user really means: match the character "<", followed by any number of characters which are not ">", and finally, match the character ">". Defined this way, it requires no backtracking in the case of any successful match, and only one backtracking step in the case of any unsuccessful match. Hand-optimization of regex patterns largely revolves around the ideas of reducing backtracking and the steps which are potentially required to match or fail at any given character position, and here we've reduced both cases to the absolute minimum. So what exactly is different about how a backtracking, leftmost-first regex engine (your traditional NFA engine type, which describes most modern, Perl-derivative flavors) goes about matching our subject text when working with these two regexes? Let's first take a look at what happens with <.*?> (I'll use the RegexBuddy debugger style to illustrate each step).(略)In short:
- Be careful about using the more appropriate type of quantification (to your best approximation, since this often depends on the subject string) even when it has no impact on the text matched by your regex.
- Try to make your patterns as explicit as possible, to better guide the regex engine and avoid backtracking.
- If possible, avoid greedy quantification of the dot and other needlessly flexible tokens.
んー予想通りだった。
つまり、ものぐさマッチ(いわゆる最短マッチ)の場合、マッチする文字列を伸ばしていくのは バックトラッキング動作にほかならないので、そのバックトラッキングの回数が多ければ 多いほど時間をロスするよ、と。 ただ、この例に挙げられているような[^<]* 単純なものならいいけど、</div>のような文字列まで ものぐさマッチをするものを、通常の欲張りマッチに書き直すのは結構手間がかかる。
通常のマッチングのように fastmapを使って、バックトラックなしでマッチング結果を 伸ばすことができるような気がするけど気のせいかもしれない。
シュレディンガーってこう綴るのか。 と関係ないところに感心してみる。
質問その5:普段、吉野家ではバイトをしている方に「まかない」が出されているのでしょうか? まかないはありますが無料ではありません。直営店の場合、7割引になります。3年前は無料でした。
へー。
記者の方と色々お話したのですが、その中で「技術力があって著名な人物の声を世に伝えること も重要だが、普通の人でも頑張ればそこそこすごいことができるんだということを世間に知らせ ることも同じくらい大切だ」とおっしゃっていたのが印象に残っています。
そこで気になるのが,本屋の中で非常に大きな売り場面積を占めているコンピュータ関連の本の 中身であり,レベルである。政府をはじめとして,「IT,IT」と,ITを口にしない者は人に非ず という感の深い昨今であるにもかからず,わが国のITレベルがどの程度のものであるかというこ とは,大きな本屋のコンピュータ関連書籍の売場に行けばひと目で分かる。 (略) 「アルゴリズムなどという古いものを教えるよりも,インターネットやグループウエアなどの 最新の技術を教えるほうが重要である」という恐ろしいことを仰せになる一流大学の教授も少な くない。ソフト会社の社長やユーザー企業の情報システム部門の長が,「原理原則よりソフト・ ベンダーの資格認定試験」と考えても何ら不思議はない。原理を知らないIT専門家が増える では,IT関連の仕事をする者にとって計算機科学や情報学に関する原理原則はもはや不要なの か。断じてそうではない。 情報システムの運用の仕事に携わっている者にとって頭痛の種の一つは,処理時間の問題であ る。データの件数をnとするとき,処理時間はnのどのような関数になるか。現実の情報システム の場合はいろいろな要因が絡み合うので大変な難問になるが,データの整列(ソート)や表の探 索などのような基本的なアルゴリズムの場合には答えが分かっている。 京都大学の情報学科の場合を例にとると,このような計算量に関する問題は,計算論概論とし て第1学年の後期に学習することになっている。しかるべき大学の情報関連学科でも似たような ものであろう。これらの問題は通産省の情報処理技術者試験でも毎年のように出題されているの で,この試験の合格者は情報学科卒業生に準ずる知識をもっていると言ってよかろう。ただし, ソフト・ベンダーの資格試験の合格者がこうした知識を持っているかというと,かなり怪しい。
誰か知っている人で受けた人入るのかな?
増井さんの連載。
勉強そのものがつまらない場合でも、他人に勝つことに喜びを見出だせる人にとっては競争自体 が楽しみになるので、人より頑張って勉強しようとするものです。それほど競争が好きでなくて も、他人の勉強状況が目に見える場合、人が頑張っているんだから自分も頑張らなきゃという気 になるものです。
アマゾンも日通なんか切ってヤマトにしろよ。いまだに 週末配達指定すらできねーんだから。あきれる。
プレミアム会員になって、お急ぎ便で購入するとクロネコできますよ♪
…ってそれでは意味がないのか。
半日自室のガーベジコレクトをしておりました。 だいぶごみが出ましたが、にもかかわらず世代別GCのため ふるーいオブジェクトが残ったままです。 どうしましょうw
人間ガーベジコレクタしながら考えていたのですがw、 もし C++ ではなく Objective-C がWindows等のプログラム開発における 主流になっていたらどうなっていただろうか、とか。 というのもちょっと前に reddit経由で読んだどこかのblogで、 OS X のあのインターフェースは Objective-C の動的性があってこそ云々とか いうのを読んだのが記憶に残っていたからなんですが、 まあ思考実験としては面白いかもしれませんが、 現実にありえたかどうかという点ではほぼ0%でしょうねえ。
というのも、C++には Zortech C++を嚆矢としてDOS時代からコンパイラがあり (たぶんZortechが最初の商用C++コンパイラで間違いないと思うんですが 違ってたら何かしらの形で指摘してください)、Windows 3.1あたりの ハードウェアスペックでは、Objective-C で開発したプログラムが パフォーマンス的に満足できるものができたかどうかに疑問があるためです。 C++はすっぽすっぽ先生(by あろはさん)が明言しているように パフォーマンスをできるだけ下げない方向で言語仕様を決めてますしね。 その結果が MFCってのは良いのか悪いのかはわたしにはちと判断できかねますがw (功罪相半ば。罪勝ちと多いか?くらいか)
例によって結論はありません(笑)
Despite the language being over 30 years old, Russell feels that it should still remain an essential tool to any serious programmer. He discusses why despite the emergence of other languages that have "flavour of the month" status, C still continues to remain relevant.
ビデオその1
ビデオその2。 John Backusってこういう雰囲気の人だったのか。
聞いた名前のようなそうでないような… Scheme界隈は追いかけてないしなあ。
プログラマの分類らしい。
We have three primary personas across the developer division: Mort, Elvis and Einstein. Mort, the opportunistic developer, likes to create quick-working solutions for immediate problems and focuses on productivity and learn as needed. Elvis, the pragmatic programmer, likes to create long-lasting solutions addressing the problem domain, and learn while working on the solution. Einstein, the paranoid programmer, likes to create the most efficient solution to a given problem, and typically learn in advance before working on the solution.
Operaを忘れてくれるな、と。
This is my proposed definition for a class of languages, which have been referred to, with increasing frequency, as concatenative languages. Some examples of compositional programming languages (according to the definition I’ ve proposed) are: PostScript, Forth, Joy, Factor, and Cat. While most stack-oriented languages are also compositional languages, compositional languages are not neccessarily stack-oriented. Some non-stack-oriented compositional programming languages include: Enchilada and XY. These two languages are both self-identified as being concatenative. The term “concatenative” is frequently used as a synonym for compositional languages, but the definition of “concatenative” is not widely agreed upon.
previewだせってのも急かしたほうがいいのかなあ。 少なくともインストールがらみの問題はつぶせるだけつぶしといた方が良いと思うのだけど。
ソースを見る。 JRubyのソースアーカイブ自体に jregex というディレクトリがあって、 そこに正規表現関連のソースが置かれていた。 しまった、本家Javaのソースと同じかどうかわからんw
/** * Copyright (c) 2001, Sergey A. Samokhodkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: *
ソース冒頭のクレジットはこんな感じ。
Joniってやつのほうはどこでソースが手に入るのだろう? ぐぐってもなんか関係ないページが多くてよくわかんね。
JRubyの正規表現エンジンを鬼車ベースのものにするってのは mputさんのRubyConf2007レポートにもあった。あう。
JRubyのデザインについて
・jruby.jarに必要なランタイムが全部入っている
・bin/jrubycってのがあるんだね
・パーサは手書きでやっていたが今はBisonベースLALRに移行
・パーサ自家製なのでNetBeans IDEで補完やシンタックスハイライトができる。
・おお、メソッド/変数のリネームとかまでできるのか。これは結構がんばるな。
・コアクラスの実装はJavaで書いてあるかC#で書いてあるかが違うだけでIronRubyとほとんど
同じだな
・評価機はASTを走査する方式でとてもシンプル
・JRuby1.1からJava Bytecodeへのバイトコードコンパイラが入る予定
・コンパイラの最適化で3倍くらい速くなってるなあ
・ただしeval不可。
・ObjectSpaceはJVMのGCとタイトに関連してくるのでとても難しい。
・ObjectSpace.each_objectは普段は無効になっていて、フラグを付けると有効になる(Java
レベルですべてのWeakReferenceを追跡するようになる。パフォーマンスインパクト大)
・StringBufferによるRubyStringの実装など独自のコアクラス実装をしたようだ
・正規表現エンジンはいろいろの変遷を経て1.1ではJoni(Java版鬼車)になりそうとのこと
・あー、さっきからMRIってなにかなーと思ってたけどMatz's Implementation of Rubyの略かー
・OSネオティブスレッド利用可能。スレッドプールを利用して起動時間の短縮をはかっている
from reddit。 Programatic - Post details: Take the data literacy test にチェックリストなるものがあります。
以上の各項目のそれぞれについて、 よく理解しているのであれば1点。 どういう意味の言葉かは知っているけど詳しくはしらないということなら0.5点 として加算していってその合計を求めろということのようです。
合計が求まったら次の一覧で当てはまるところをチェック。
0-14 You are a beginning programmer, probably in your first year of computer science in school or teaching yourself your first programming language. You can learn a lot by reading one of the books listed in the next subsection. Many of the descriptions of techniques in this part of the book are addressed to advanced programmers, and you'll get more out of them after you've read one of these books. 15-19 You are an intermediate programmer or an experienced programmer who has forgotten a lot. Although many of the concepts will be familiar to you, you too can benefit from reading one of the books listed below. 20-24 You are an expert programmer. You probably already have the books listed below on your shelf. 25-29 You know more about data types than I do. Consider writing your own computer book. (Send me a copy!) 30-32 You are a pompous fraud. The terms "elongated stream," "retroactive synapse," and "value chain" don't refer to data types-I made them up. Please read the "Intellectual Honesty" section in Chapter 33, "Personal Character"!
わたし? 怖くてまだチェックしてませんw
一通り見るだけでも一苦労になりそうな。 って前にもこんな感じのリストを見たことがあるような…
For applications that run internally we use Ruby on Rail. Because we enjoy using it, its fast to develop with, straight forward to use and because we use it (i.e. to reduce knowledge transfer and training requirements) we decided to follow the same design patterns and coding conventions used in Rails when we built our MVC framework. Yes that's right we've built Perl on Rails.
挙げられていた本は以下の通り。
最後の本がなぜここにあるのかよくわからない。
mikaelhg Kent Beck: Implementation Patterns Mary Poppendieck: Implementing Lean Software Development
とコメントしている人もいますね。
昨日チェックした分
I did this talk at the CCC camp 2007. As you can see, C++ is really complex, and so a few mistakes crept in. First of all, exceptions in constructors do call local destructors, but only if the exception is caught. I did not catch it when I tested this, and in that case the runtime just calls terminate, which immediately terminates the process without cleaning anything up. I should have tried that but did not and just assumed the other case is handled in the same way. Here is my test program, and here is one that shows it works if you catch the exception. 見てわかる通り、C++は実に複雑な代物で、そこにはいくつかの設計上のミスがあります。 一つには、コンストラクタ内で発生した例外によって局所的なデストラクタ(local destrucors) が呼び出されますが、例外が捕捉された場合だけです。 わたしがこの検査をしたときには catch を指定してはいませんでした。そして それによってランタイムライブラリは単純にプログラムを終了するということになりました。 このとき、プロセスは終了処理を一切せずに即座に終了します。 Also, I botched the constructor and vtable of base class slide. The issue is more complex than that. This C++ source code illustrates the issue. It was taken from this nice list of C++ pitfalls. Thanks to Immanuel Scholz for pointing these out.
テストに使われたプログラム→ http://www.fefe.de/c++/exception-constructor.C
Being a self-proclaimed Agile Advocate I seem to find myself in discussions regard the bad points about agile. Books, articles, and talks on the subject of agile always paint the rosy happy story about using agile. I’m no fool, and I realize that things aren’t quite as happy as some people make it out to be. No one said that agile was a silver bullet. The reason that I’m an advocate for it is because I believe it is simply a better way to write software. Let’s get down to the meat of things. What is the “Dark” side of agile? 1)Increased Visibility can cause organization crisis. Agile, if nothing else, exposes all of the problems an organization has. If no one wants to take responsibility for these problems, then a crisis can (does)arise. 2)Lose of titles. What does it mean to be a “Senior QA Tester” on an agile team? Since everyone is responsible for getting the product done, titles/roles get blurred. Some people have definite problems with this. Especially when it comes time to do the yearly performance review. 3)People have to work together. Which, going back to item one, creates those pesky people issues. Normally you can avoid this on a traditional project by segregating opposed personalities. It isn’t easy to do in an agile project. 4)Projects fail fast. This is a negative because in a traditional project, money from the budget usually keeps coming in because everything is “moving smoothly”. But in an agile project more visibility may produce angry bean counters if the project goes directly into a dive. Again, there is no where to hide your dirty laundry on an agile type project. 5)Sustainable pace. We are used to slacking off at the beginning of a project and death marching the end. So most traditional projects see spikes in productivity. Agile projects push to establish a sustainable pace among the team. This means the developers are always busy and don’t get a “break” from work. People are turned off by that (odd I know). 6)Feeling of micro-management. Agile promotes increased visibility. How do you get increased visibility? Your workers update their statuses in a daily manner. This can cause a definite feeling of micro management amongst the team. 7)Less up front design. Architects are perhaps the most difficult types of people to convince to use agile. This makes sense because these people are the ones who try and minimize risk from a technical aspect. Having a methodology that says, just do the minimum that is needed, to them is risky and goes against everything they have been trained on. I think it is important to remember that agile doesn’t mean no design, just no unneeded design. 8)Flawed implementation of agile. If you rush, don’t plan, are unsupported, and don’ t get team commitment you are likely to leave the organization with a mess on it’s hands. The organization is likely to stay away from anything agile after getting such a bad taste in it’s mouth. 9)Physical reorganization costs. A team is likely to want to remove the cubes and create a team room. Or at the very least reorganize their cubes in order to be closer to each other. There is a cost associated with doing this. Same is true for when the team demands newer hardware to do development. I’m all for new hardware, just realize that again, this is a cost that isn’t obvious to an adoption of agile. 10)Loss of privacy. Well, no one said you had privacy at work anyway. But when you implement agile, this loss becomes a bit more apparent. Team rooms, pair programming, these things all attribute to some loss of privacy. Have to make a personal call? Before you may have sat in your cube. Now with agile you might have to go outside the office to have it be personal. Want to check your personal email? That is harder when your workstation is in the middle of the team room. Change is hard, take time and do things the right way and make sure everyone understands what is happening. Remember that these problems listed above are not show-stoppers. With good leadership and good people they can all be moved out of the way. But I don’t want you to go into this with your eyes closed. Know that there is a large possibility that you will see some of these dark sides. Be prepared and don’t give up.
その数学が戦略を決める
訳者が山形さんだったのでぱらぱらとあとがきやらを読んでみたところ
結構面白そうだったので購入。
プログラミング言語Erlang入門
無事購入。
一つ前のページへ
2007年11月(下旬)
一つ後のページへ
2007年12月(中旬)
メールの宛先はこちら