http://www.kt.rim.or.jp/~kbk/zakkicho/index.html - May 26, 2012 6:07:02 PM - Dec 3, 2004 6:54:31 AM
2012年05月26日
■_ redditに訊け
言語設計者が最低限Lispについて知っておくべきこと。 といった感じ?
What's the absolute minimum a language designer should know about Lisp? [StackOverflow] : lisp It got deleted real quick, but I have enough rep on StackOverflow to see deleted questions and answers. I'm trying to describe how Lisp's metaprogramming facilities have influenced the design of later programming languages. I'm wondering which terms should be introduced to people interested in language design as an absolute minimum to enable further discussion and debate. Is there some definitive vocabulary everyone should know? I'm thinking about covering at least namespaces, hygiene and quotations. I suggest starting at the C2 wiki, http://c2.com/cgi/wiki?CommonLisp http://c2.com/cgi/wiki?SchemeLanguage And reading things by Paul Graham, http://paulgraham.com/arc.html And for an example of an "I told you so" from Lisp, see this question: http://stackoverflow.com/questions/8898925/is-there-a-reason-for-cs-reuse-of-the-variable-in-a-foreach Summary: In C#, it used to be that loop variables were reused across the entire loop, which meant that closures created inside the loop would see a loop variable with the most recent value, instead of the value that the closure was created with. This is VERY surprising. The C# people fixed it almost 10 years later, but if they had been big fans of Scheme this never would have happened. JavaScript is getting something similar with the let keyword. C# ではループ変数はループ全体にわたり再利用されていて、 (C# の)ループの内側で生成されたループ変数を抱えたクロージャは そのループ変数の作られた時点の値ではなく直近の値が見えるようになっていました。 これは「非常に」驚くべきことです。 C# 開発者たちがこれを修正したのは十年もあとのことでした。 彼らが Scheme の big fans であったならこんなことが起きることはなかったでしょう。 JavaScript は let というキーワードで同じようなことをしています。 When the Scheme folks talk about "lexical scoping" as if it's a big deal, remember that it is a big deal.Hah, I got bitten by the Loop Variable odd capturing behaviour in Javascript just yesterday. Coming from a Scheme background I found it pretty confusing, indeed!Thanks a lot!You may also be interested in ReadScheme, which is a great repository of knowledge about language design in Scheme. For metaprogramming, see the sections on macros and reflection.readscheme はこちら → Readscheme.org - Functional Programming Resources
■_ Looking for compilers written in Common Lisp for non-Lisp languages
Common Lisp で書いた(Lisp以外の言語の)コンパイラー。
Looking for compilers written in Common Lisp for non-Lisp languages : lisp Looking for compilers written in Common Lisp for non-Lisp languages (self.lisp)Hello, Are there any open source compilers out there that are written in Common Lisp for a non-Lisp language? I'm interested in seeing how that might be done. Ideally, it would be nice if the targeted language were something like C. This seems like something that would exist, but maybe I'm just using the wrong search terms to find it. Thanks for any info, MickThere are a lot of languages that are implemented in Common Lisp. Now, unfortunately, it's often only the early implementation of a language that is written in Lisp. cl-python http://common-lisp.net/project/clpython/ There's a r4rs scheme implementation named Pseudo. http://www.cliki.net/PseudoScheme An early implementation of Yale Haskell. http://www.cliki.net/Yale%20Haskell "In ~2003, Mozilla's CVS tree still contains the original implementation of Javascript... written in Common Lisp." Well, the mozilla/js2/semantics/README that I just checked-out from mozilla CVS says: js/semantics contains experimental code used to generate LR(1) and LALR(1) grammars for JavaScript as well as compile and check formal semantics for JavaScript. The semantics can be executed directly or printed into either HTML or Microsoft Word RTF formats. You may also be interested in Zeta-C although it's not written in Common Lisp http://www.cliki.net/Zeta-C. maxima (which implements a mathematical language similar to macsyma, ie. similar to mathematica, octave or mathlab). http://maxima.sourceforge.net/ acl2 (which is a theorem prover) implements a lisp-like language in CL. http://www.cs.utexas.edu/~moore/acl2/ Qi is implemented in Common Lisp. http://en.wikipedia.org/wiki/Qi_%28programming_language%29 Here is a toy implementation of BASIC in CL: http://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/basic/ And the implementation L.S.E (Langage Symbolique d'Enseignement, a French programming language of the 70's): http://nasium-lse.ogamita.com/ http://fossil.nasium-lse.ogamita.com/nasium-lse/dir?ci=tip And a few more, see http://www.cliki.net/programming%20languageThere is also Vacietis, a C->CL compiler inspired by Zeta-C. It's not finished but does have some basic functionality and may prove interesting as is.You mean like these? http://www.cliki.net/programming%20languageCL-Javascript seems impressive, I have been planning to use it for scripting purposes myself. It's too bad that a lot of these projects are dead since having an option to use a more mainstream language for scripting CL applications is often desirable and is something CL could be very good at.Although it isn't Common Lisp, there's Zeta C, which is written in ZetaLisp (precursor to Common Lisp) and is a C compiler. As Cliki notes, it isn't trivially portable to CL, but it should be indicative of the general style you would use. e: woops, didn't see that this was mentioned above.Initial versions of the Yale Haskell Compiler have been written in Common Lisp, see here.Axiom (axiom-developer.org) is a computer algebra system implemented in Common Lisp. It has a langage called Spad for the algebra. The Spad compiler is all in Lisp.hi, you are looking for this: http://voodoo-slide.blogspot.com/2010/01/amplifying-c.html the guy uses Common Lisp to generate C that is still readable. think of it as a 10x more powerful C toolchain. i'm toying with building something similar in my spare time.
- ソフトウエアエンジニアがUX/UIを考える上で読むべき4冊の良書と名言たち | Think IT
- boostcon/cppnow_presentations_2012
- multiple-value-blog1: 多値のスタックでFORTHの真似事
- PL101: Create your own programming language
- Business Media 誠:杉山淳一の時事日想:鉄道自殺は増えていない。自殺全体が増えている (1/5)
- Business Media 誠:どうなる? 鉄道の未来(5):「空港行き」の電車代、見直さなければいけない (3/3)
- Scratch Dayで子供たち・文系大学生向けのプログラミングについて考える | complicate000 blog
- badcode: a place where terrible code can be among friends
- べき分布する整数データの圧縮方法 - アスペ日記
- Apple II History » 17-Languages, cont.
- Rapid-fire debugging thoughts - GameDev.net
One of the hardest tricks in debugging a complex system is to know when to broaden your search and when to narrow it down.- 「すごいHaskellたのしく学ぼう!」は気配りと楽しさがすごい - keigoiの日記
- 開発の現場から:組み込みソフトウエアの進歩を妨げるもの-保守的な技術者が多い: 組み込み技術者の単身赴任日記
また、一度製品化してしまうと、バグがあってもアップデートする手段がないので、 ソフトウエアの信頼性がもっとも重要であり、そのため、枯れた技術を使うという選択を選びがちである。- Modegramming Style: Scalazの型クラス
整理すると、Monad、Applicative Functor、Pointed Functor、Functorはそれぞれ以下の性質を持っていることになります。- 大修館書店 WEB国語教室
日本の文字とUnicode 第1回 ASCII・Latin1とUnicode- MSXでプレゼン - サンフラットの開発日記
2012年05月25日
天地明察
アフタヌーンの連載を楽しみにして読んでいるので小説とか映画とかどうしたものかと悩みんぐ。読書会参加者募集ちう。
いい本らしいんですが、ちとお高い(が、オンデマンド版を買えば5000円前後で 買えた筈なんだけどどこだったかなああ売ってるの)。 Amazon.co.jp: Algebra of Programming (Prentice-Hall International Series in Computer Science): Richard Bird, Oege De Moor: 洋書(原著買ってたのに)放置してたらこのザマだよっw
■_ 'D' is
D is a dragon, or why D matters for Bioinformatics : programming D is a dragon, or why D matters for Bioinformatics (blog.thebird.nl)How is D much safer than modern C++?The fundamental non-safety comes from pointer arithmetic. When adding or subtracting from a pointer, there is no way to statically determine if the data pointed to by the changed pointer is valid. Hence all the vulnerabilities with buffer overflows, etc. D's solution is to have ranged pointers (called "slices" in D). Slices come as a pair, a pointer to the start of the object, and a size of that object. Adjustments to the pointer can then be done at runtime, and so can be guaranteed memory safe. (You can still do raw pointer manipulation in D if you so desire.) Automatic memory management (garbage collection) eliminates memory corruption problems resulting from freeing invalid pointers and freeing a pointer more than once. Functions in D can be marked as @safe, which will statically guarantee that no constructs are used that could result in memory corruption. Pointer arithmetic, for example, is disallowed in such functions.Good explanation, thanks. D's solution is to have ranged pointers I think in C++ you would normally use STL containers and iterators instead of just plain pointer array data. Iterator itself could be range checked (or not). I don't see much sense in range checked pointer. garbage collection It kills performance. Of course, the article pointed out that you don't have to use it in D, so maybe that's not really a problem. In C++ you can use smart pointer, like reference counted shared_ptr, companied with weak_ptr or simpler unique_ptr, which are totally safe, if used correctly. Note that I'm not C++ expert, I just happen to like the language, and I know almost nothing about D. So my points could as well be garbage (which C++ won't collect).Iterator itself could be range checked (or not). I don't see much sense in range checked pointer. D's ranges are not just range checked iterators. An input range in D is a type with properties front and empty and a method popFront. It's functionality is closer to that of a pair of c++ iterators. You could define a D range on top of a pair of c++ like iterators like this: struct Range(Iterator) { Iterator start; Iterator end; @property auto front(){ return *start; } @property auto empty(){ return start == end; } void popFront(){ start++; } } Functions that would need to take two iterators in C++ can only take one range in D. This makes for much nicer code. Because one instance of a range is needed to represent a sequence, it is practical for functions to return ranges, so you can do stuff like: recurrence!((a, n) => a[n - 1] + a[n - 2])(0, 1) .take(10).reduce!((a, b) => a + b)(); //computes the sum of first 10 fibonacci numbers Of course ranges could be implemented in C++ as well, but they fit really nicely with D's built in array slices (which are ranges themselves) and the D standard library is built on top of them, so it's very convenient to use them in D. To learn more about ranges see http://ddili.org/ders/d.en/ranges.html.D → ドラゴン、Ruby → ポニー、Scala → サラブレッドとはなんの比喩か
Pjotr's Blog › D is a dragon, or why D matters for Bioinformatics D is a dragon, or why D matters for Bioinformatics Ruby is a pony. Everyone loves a pony. Ruby is nice. Scala is a thoroughbred. You know I like Scala – it is beautiful, and runs circles around the pony D is a dragon. Very powerful, and somewhat unpredictable The programming languages Ruby, Python, R and Perl have proven to be very popular in bioinformatics. These languages are interpreted and dynamically typed computer languages. They are all great at parsing and handling genomic information. Results are quick to get, and the development cycle may be gratifying. However, as the language shootout shows, they are also rather slow, and hard to parallelize. It is not easy to get them to use those multi-cores everyone has. Ruby、Python、R、Perl といったプログラミング言語は bioimfomatics においてとても ポピュラーなものです。これらの言語はインタープリター型であり動的に型付けされてる コンピューター言語で、genomic information の解析や処理にとても役に立つものです。 結果をすぐに得られ、それにより開発サイクルが満足いくものになるかもしれません。 しかしながら、言語の性質としてとても遅いものであるし、同時に並行処理が困難でもあります。 マルチコアを活用するのはこれらの言語では容易なことではありません。 Some newer languages, such as Scala and D, are not only strongly typed, which has a real impact on performance, but are also very good at automatically handling types. This means that coding Scala or D, feels similar to coding dynamically typed languages. Also, Scala and D are OOP languages that marry the functional programming paradigm. In practise, that means that we get OOP goodness (and badness), with constructs that make it safer and easier to parallelize code. Scala や D のような一部の新しい言語は強力に型付けされるものであるだけでなく (このことは性能に影響を及ぼします)、型の自動的な扱いが良くできています。 このことは Scala や D でのコーディングが動的型付け言語でのコーディングと 同様の感触を与えることを意味します。 また、Scala と D は関数型プログラミングパラダイムと融合された オブジェクト指向言語でもあります。 In practise, that means that we get OOP goodness (and badness), with constructs that make it safer and easier to parallelize code. 略 Why is D a dragon? D's language is amazingly powerful, but not as carefully designed as Scala's. Scala's design is as powerful, and simply beautiful. D feels more clunky and can get in the way sometimes. I find its functional language implementation less intuitive than that of Scala. Still, it works rather well, and it even has tail end recursion optimization (unlike the JVM). What clinched it for me is that, next to raw runtime speed, there are three areas D beats Scala. First, the D compiler itself is blazingly fast. Second, the D template system (generics) is simpler and easier to understand. Even in my earlier blog examples have trouble with Scala's advanced templating, which is not a good sign. Third, D code generation, or compile time evaluation, rocks. Another thing to look into, there are many examples in the D standard library. In the Beginning Scala book by David Pollack he gives an example of a computer game that featured in _Why the lucky stiff‘s world (for Ruby insiders). What was enlightening to me was the code repetition in David's book, necessary to build the players. That would not be necessary in D's compile time evaluation. There are a few things I miss in D. For example pattern recognition on unpacking data, which is great in Haskell, Erlang, and Scala (see example). D has something for actors, so it may come to the main language. The second thing I miss is that language elements do not always return values. I use that in Ruby all over the place, because it makes for shorter code. なぜ D がドラゴンなのか? D は信じられないほど強力な言語ではありますが、Scala ほどには 注意深く設計されたものではありません。 Sscla の設計は強力であると同時に単純で美しいものなのです。 D feels more clunky and can get in the way sometimes. わたしは D の functional language implementation が Scala のそれよりも less intuitive であると考えていますが、それでも D はよくできていて、 JVM とは異なり末尾再帰の最適化さえ備えているのです。 What clinched it for me is that, next to raw runtime speed, there are three areas D beats Scala. 第一に、D のコンパイラー自身がても高速であること。 第二に、D のテンプレートシステム (ジェネリック) は単純で理解が容易であること。 Even in my earlier blog examples have trouble with Scala's advanced templating, which is not a good sign. 第三に、D のコード生成やコンパイル時評価が素晴らしいということです。 Finally some things that keep cropping up when I bring up D. First, the licensing issues. D, for historical reasons was closed source. That is changing now, with D2 compilers getting part of Fedora and Debian to follow. Second the schism and negativism of D1 users caused by an the move to D2. That you'll find on the Internet. D2 is not compatible with D1, and that has caused grief. D2 was reinvented as the language designers progressed their ideas. If you want to read more about the excellent D2 language I strongly recommend Andrei's book. It is a classic in its own right, describing a next generation programming language. Even if you never get to appreciate the power of the D language itself. This was written by pjotrp. Posted on Friday, January 13, 2012, at 4:57 pm.■_ Learn Lua the Hard Way
このタイトルからして Zed が書いたのかと思ったら別人でした。 Learn Lua the Hard Way | Hacker NewsTwitter / @zedshaw: Just learned that someone ...
Learn Lua the Hard Way | Sanity Phailed.me Sanity Phailed.me Learn Lua the Hard Way This series more or less mirrors the series of the same name for Python. It's in my belief that the only way to learn the in and outs of a language is to learn by practice, and by that virtue, to practice as often as possible until you get the hang of the language.で、そのコメント欄。
Zeljko Dakic It is really nice tutorial, it helps understanding Lua better, however, I think you should pick different name, Zed Shaw has pretty much created his brand and this looks to me like you would like to piggy-back on good will he created. Anyhow, I would just name it differently, it can be Learn Lua the Right Way if you like this expression.Phailure, Life haz phailed me... once again. Hey, thanks for bringing that up. I originally started off with Shaw's python tutorial and that was such an eye-opener that I decided to write something similar for Lua in his honor. I never realized that he began a Learn x the Hard Way series soon after I began. Unfortunately, college and life caught up with me soon afterwards and I haven't really had the time or motivation to update the series. I'll try to come up with another name for this series so Shaw can have the namesake back.© 2011 by Lee Gao.
- 表と裏のITエンジニア: 第01話 ITエンジニアの表と裏
- Excelそっくりな表計算モジュールを実装可能なオープンソースモジュール「Gelsheet」:phpspot開発日誌
- 新「NIFTY-Serve」提供開始、昔のハンドルで“フォーラム”に出入り可能 -INTERNET Watch
- 効率的に情報収集をして差別化を図れ! Twitter4J.org 山本 裕介氏(1/3):CodeZine
- F#3.0で加速する言語指向プログラミング(LOP)。コンピューテーション式はもはやモナドだけのための構文ではない!!! - Bug Catharsis
- How fast are JVM-based languages growing among developers? « Jelastic — Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing
- wrong, rogue and booklog - 「幸福だから笑うのではない、笑うから幸福なのだ」毎日読むアラン『幸福論』:日経ビジネスオンライン
- 5/27(日)あなたの知らない本と出会えるシェア読書会Shablio(シェブリオ)×FaN @Creative Hub 131日本橋大伝馬町 : ATND
- すごいHは難しいのか? - Togetter
- 日本唯一のシェルスクリプトコミュニティ「USP友の会」がお送りするシリーズもの勉強会の第4弾!(最終回:DFDのお話) on Zusaar
- おっちゃんたちの命と尊厳を守る女子大生!生活保護・ホームレス問題と放置自転車問題を一気に解決する「HUBchari」 [マイプロSHOWCASE] | greenz.jp グリーンズ
2012年05月24日
■_
あとで読むタブが減らねえ(減ったけどそれ以上に増えた)…
■_ 10 Software Tools You Should Know
知っておくべき十個のソフトウェアツール。
10 Software Tools You Should Know 10 Software Tools You Should Know Posted by Jason Sachs on May 20 2012 Unless you're designing small analog electronic circuits, it's pretty hard these days to get things done in embedded systems design without the help of computers. I thought I'd share a list of software tools that help me get my job done. Most of these are free or inexpensive. Most of them are also for working with software. If you never have to design, read, or edit any software, then you're one of a few people that won't benefit from reading this. 小さなアナログ電気回路を設計するのでない限り、今日においてコンピューターの助けを借りずに 組み込みシステムをきちんと設計することはとても困難なことになっています。 自分が仕事をしたときに助けになったソフトウェアツールのリストを共有しようと わたしは考えました。そのようなツールの大半は無料であるか、そうでなくとも安価なものです。 また、ソフトウェアに対しても使えるものが大部分です。 もしあなたがソフトウェアの設計をしたことがなかったり、読んだことも編集したこともないのなら この記事を読んでも得るとところはないでしょう。 Disclaimer: the "best" software tools are usually a matter of opinion. You may not agree with my opinion, so just take it for what it's worth. お断り 「最良の」ソフトウェアツールとは a matter of opinion (意見の肝?) であることが通常です。 あなたはわたしの意見に賛成できないかもしれないので、 1. Revision control systems -- whether you work in a team of 100, or you're just by yourself, if you're working on a design, you should be using revision control software. バージョンコントロールシステム (略) 2. File comparison tools -- Whether you're merging source code into a revision control system, or you're just trying to see what the difference is between one file and another, you'll need file comparison software. ファイル比較ツール (略) 3. Editors -- working with text files can be easy or difficult depending on the software you're using. The heavyweight editors are the integrated development エディター (略) 4. Build tools -- if you're starting to write software in an IDE, you can just click "Build" and the program will compile your source code for you. ビルドツール (略) 5. Scripting tools -- Sometimes you need to put together a quick piece of software to do something. (略) 6. Numerical analysis tools -- Unless you are doing something really simple like an internet-enabled traffic light, chances are you're doing some kind of math in an embedded system project. (略) My last word on numerical analysis tools is a plea and a short rant: Don't use Excel for numerical analysis! (略) 7. Documentation utilities -- often you will need to communicate your ideas to others, and there are many different types of software to help do this. ドキュメント作成用ユーティリティ (略) 8. Terminal and communications software: When you need to communicate over serial ports, it's time to use terminal software. ターミナルソフトおよび通信ソフト (略) 9. Software quality assurance (QA) tools: If you write software and you think you write bug-free software, you are fooling yourself. ソフトウェアの品質保証用ツール (略) 10. Basic command-line utilities 基本的なコマンドラインユーティリティ Many of the following programs are UNIX command-line utilities from the days when there were no graphical user interfaces, and things had to be done by hand. Unless there's some revolutionary improvement in GUIs, there will always be a lot more you can do through the command-line, just because there are more combinations of things you can do via scripts. If you're running OSX or Linux, you already have these; if you're running Windows you can download binary versions that will run on your OS at http://unxutils.sourceforge.net/ or http://sourceforge.net/projects/unxutils/ less -- this is probably the one I use most; it lets you display the contents of a file page by page. You can also search for text content, or if you are viewing a log file that is being updated continuously, you can type F and it will continuously show you the latest lines being appended. grep -- lets you search a group of files for a regular expression. touch -- This updates the latest-modified-time of a file to the current date/time, or if a file does not exist, it creates an empty file. tee -- piping a command through tee (e.g. someprog | tee logfile) lets you copy the output of that command to a file while also printing the output to the terminal. which -- If you run a program foo.exe at the terminal and you want to know where that program is located, just type which foo.exe head and tail -- These let you print the first or last N lines of a file. uniq -- filters output to remove identical successive lines. du -- prints disk usage (total space taken) of a directory. wc -- counts lines, words, and characters of a file. (I use it when writing a Letter to the Editor so I can keep my word count under the maximum a newspaper allows.) cp, rm, mv, ls, cat -- these all have DOS equivalents (copy, delete, rename, dir, type), but the UNIX equivalents are sometimes expected by scripts so I have these installed in my path. md5sum -- useful for verifying file integrity by calculating the MD5 hash of a file. gzip and gunzip -- these compress and uncompress individual files; the .gz format is less common than .zip but you will find it occasionally, especially in webpages that are transmitted in compressed form. wget and curl -- these are programs that allow you to download web pages via HTTP outside your browser, for example if you want to download a known webpage directly to a file, or "screen-scrape" the contents of a page. They aren't standard UNIX programs; wget is from the GNU project, and curl is its own special thing. I like curl better in most cases as it lets you do more. Well, that's all for this list. It was difficult paring down my list to 10; a few other programs like 7zip, CPU-Z, and System Explorer would have made the cut, but I wanted to stick to a list of ten. Happy computing!■_
- rubyでpythonのdefaultdictっぽいものを実現する - 射撃しつつ前転
- C++Now! 2012に参加してきました - Faith and Brave - C++で遊ぼう
- Ruby 2.0 リリース週記 (2012/05/14 - 20) - まめめも
- Pythonカンファレンス「PyCon JP 2012」 9月15、16日に開催:CodeZine
- 店舗情報 - ヨドバシAKIBA店
- 朝日新聞デジタル:樫尾俊雄さん死去 世界初の個人用電卓カシオミニ開発 - おくやみ・訃報
- カシオミニ - Wikipedia
- 弱小プログラマーの日記: 第一回関数型言語勉強会 大阪に参加した
気になったのは「こわい」「こわくない」って単語が頻発してたのと、関数型の考え方の何が嬉しいのかの具体例がなかった事。- 本の虫: 今でも乗除算をビット演算に展開する意義はあるんだろうか
現実的なプロダクトを作るならば、このへんは当然おさえておくべきであって、もうちょっとそういうプロダクトのことも考えてあげてください…。- ちんぶろぐ: 宇宙戦
- [Coworking]コワーキングの終焉
- wrong, rogue and booklog - Mathematica版のSimuLinkというかMapleSimというか。SimuLinkやMapl...
- 記者の眼 - 「新卒年収1500万円」は当たり前:ITpro
- 速攻理解! JavaプログラマのためのScalaプログラミング|書籍情報|秀和システム
■_
賞味期限の切れたネタ候補がたくさん…
2012年05月23日
買った。とりあえず紙の方を。 すごいHaskellたのしく学ぼう! | オーム社eStore(β)
昼の、自分のTLの状態を調べたいんだけど自宅のPC繋げっぱなしにしとくというのもアレだし 持ち歩いてる携帯端末では必要な情報を記録できないのでさてどうしよう
■_ 問題
CASL だとローテート命令はないんだっけ? 元データを論理右シフト → 左ローテート(with carry) で必要なビットをとるとか。 簡単には表引きかなあ。 大きさも考えて8ビットくらいで。
casl2の問題がわからないので教えてください。 | OKWave casl2の問題がわからないので教えてください。 任意の16bitの数値について、bitの並び方を上下反転させた任意の番地に格納する。 例えば 41CEh=0100 0001 1100 1110b → 0111 0011 1000 0010b=7382h 投稿日時 - 2012-05-21 14:23:18
- プログラムが完成しなかった時に保険はないのか? | OKWave
- 本当に怖い「第1回 関数型言語勉強会 大阪」の話|システムアーキテクトのごった煮
- 第1回 関数型言語勉強会に参加した+InverseFizzBuzz - .
- 第1回 関数型言語勉強会 大阪に行って話してきた感想とか #fpstudy - 日々常々
- mixi Engineers' Blog » mixiのコードレビューについてご紹介
- 教えて!アロイ人! - トップページ
- Rでちゃんとしたクロス集計表を出力する関数 - はやしのブログ Rev.3
- Why Nikola Tesla was the greatest geek who ever lived - The Oatmeal
- 本の虫: LLVM 3.1がリリースされた
思うに、Pythonは非常に素晴らしいスクリプト言語なので、C++プログラマーは学ぶべきだろう。- 『はじめる! Xtal』β版を公開しました! - 達人出版会日記
- Perl5.16の新機能・変更点をピックアップ - サンプルコードによるPerl入門
- 実践F# 関数型プログラミング入門 | Gihyo Digital Publishing
- Amazon.com: Android Robot Style Rechargeable FM/MP3 Player w/ Stereo Speaker, Micro SD input, 3.5mm headphone plug for all MP3 players, PC, Android, Blackberry, iPhone.: MP3 Players & Accessories
もういろいろとアレで
2012年05月22日
翻訳者の一人が、ついったで今日が発売だと言ってたんですが 池袋のジュンク堂や書泉ブックタワーくらいにしか入ってないらしく買えず。 → すごいHaskellたのしく学ぼう! | オーム社eStore(β)
原著買ってたのにほとんど読み進められなかったw
Zed が(つくったものが)また話題に
Zedshaw/Tir | Hacker News I'm really excited about async programming in what Zed dubs the "natural style": using coroutines to suspend and resume processing at points where input is needed. Can this eliminate the callback hell that plagues the explicitly async frameworks (node.js, jquery, twisted, etc)? But what about the downside? Now your handler is stateful and the language runtime is taking care of suspend / resume of the handler code. Can you migrate the suspended coroutine to another process, possibly on another machine? Or do you just take care to use sticky load balancing for all your stateful routes? HN does something similar right? My understanding is that the fnid=... query param identifies a closure that's serving up a pagination of stories, and the "Unknown or expired link" error message happens when your own personal closure gets garbage collected by Arc. In both the coroutine and closure cases, you've got something on the server side that's consuming resources even when there are no requests. This seems like a problem for scaling.zedshaw Scaling isn't so much the problem, since you can do various things to keep users on specific servers. In my setup, I also solve a lot of the state issues since there isn't a single state for the entire app, but instead for each process that runs a small part of the app. That means you can scale and change up the application easier if you need without impacting the other parts. The real problem with coroutines for storing state is simply that upgrading the code requires you to either kill all the old state, or trickle users off on A/B paired processes. Because the state is tied to the code, you can't just change the code and hope it works. Everything will be off and the coroutines won't continue. Since Tir uses tiny processes, it's easier to do these upgrades in one part without killing the other parts, and since users are never in any one process for very long by design the risk is smaller. But, you definitely have to be more careful than the other models.Try-Catch 構文について
Whiley | Variable Scoping for Try-Catch Blocks in Whiley Variable Scoping for Try-Catch Blocks in Whiley By Dave, on May 22nd, 2012 A friend of mine was talking about how variable scoping for try-catch blocks in Java really frustrated him sometimes. Specifically, the problem was related to variables declared inside try blocks not being visible in their catch handlers. The example would go something like this: int val; try { int tmp = f(); // cannot throw MyException val = g(tmp); // throws MyException } catch(MyException e) { log(tmp); throw e; } return h(val); This code does not compile because tmp is not in scope inside the catch handler. Of course, we can declare tmp outside the catch handler — but this is mildly annoying because it’s only used within that block! Anyhow, during the discussion I realised that Whiley doesn’t have this problem because it uses flow typing. In fact, there is no real notion of scoping for local variables. The rule is fairly simple: if the variable definitely has a value then it’ s in scope. The above example would then look like this in Whiley: try: tmp = f() // cannot throw MyException var = g(tmp) // throws MyException catch(MyException e): log(tmp) throw e // var is in scope return h(var) Here, the flow typing system will reason that there is no control-flow branch within the block until after tmp is assigned. Therefore, tmp can be safely used within the catch handler. Ok, so this particular aspect of flow typing is hardly going to set the world on fire … but I thought it was quite neat!■_
- 5分間キャリア・コンサルティング: 第2回 キャリア発見の流れ
- Functional programming in Bash
- 関数型言語勉強会 大阪に行ってLTとかしてきました #fpstudy - 亀岡的プログラマ(?)日和。
- C++Now! の資料をいくつか読んで - C++でゲームプログラミング
- 【初心者向け】Python、PHP、Scalaハッカソン ~時々チェス~ : ATND
- 何故、関数型言語Haskellを学んでいるのか #fpstudy - capriccioso String Creating(Object something){ return My.Expression(something); }
- 覚え書き: mruby on EFI Shell
- Rubyist Magazine - 0038 号 巻頭言
Ruby 処理系の実装に興味があるのなら、CRuby (や JRuby、rubinious) もさることながら、mruby のソースを読んでみるのもおすすめしたい。- Rubyist Magazine - map と collect、reduce と inject ―― 名前の違いに見る発想の違い
「この処理には、なぜこのような名前が付いているのだろう?」と疑問を持ったら、是非その由来を調べて見てください。きっと新しい発見がありますよ。- Diet Coda
- Rubyにおける一般のブロック内でのnext/break(終了?) - Togetter
- クリアなコードの作り方: 余計なことを書かない - ククログ(2012-05-21)
- 中高生向けRubyプログラミング教室、三鷹市出資の第三セクターが開講 - ニュース:ITpro
- InfoQ: Why is a Monad Like a Writing Desk?
■_
「あとで読む(読み直す)」のグループにあるタブが200個に届こうとしている… Too Many Tabs というアドオンで管理させているのが大半なので ブラウザーはそれほど重くはなっていないのだけど。
2012年05月21日
■_
金環蝕 見ました。ばっちりと。 家を出る時間にはこりゃあだめかなあというくらいの曇り具合だったのですが 蝕が最大になる辺りではちょうど雲が薄くなっているとことにかかって 見ることができたと。 あ、ちゃんと専用グラスは用意しました:)
LL Decade のチケット購入。
中華料理うまかった。
■_ Quotes
いろいろなプログラミング言語に冠する格言(のようなもの)
全部訳そうと思ったけどなんか訳しにくい言い回しががががが
Quotes about programming languages Quotes about programming languages What computer scientists, authors and programmers think of popular programming languages. All languages "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Tony (C.A.R.) Hoare. Computing professor, implemented Algol 60, searcher at Microsoft Research. Algol 60 (Then taken in C) "I couldn't resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years." Tony (C.A.R.) Hoare.↑これは例の「大失敗(選択ミス)」のあれですね。 前者は探せば訳があるだろうなあ。きっと。
Basic "It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration." E. W. Dijkstra in "The Threats to Computing Science" . Edsger Wybe Dijkstra contributed to the first Algol 60 compiler. Known for the Disjkstra algorithm and numerous contributions to computer science. C "A C program is like a fast dance on a newly waxed dance floor by people carrying razors." Waldi Ravens. Programmer. "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." Blair P. Houghton. Programmer. 略 PHP "PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals." Jon Ribbens. Programmer. Bash and other shells "It is easier to port a shell than a shell script." (シェルを移植することはシェルスクリプトを移植するより簡単) Larry Wall. Creator of Perl. And finally... "There are only two kinds of programming languages: those people always bitch about and those nobody uses.” (プログラミング言語にはたった二種類しかない。人々が罵る言語と誰も使わない言語と。) Bjarne Stroustrup. Unfortunately, I believe he is right. However, there have always been two schools, one for clear and safe languages (Pascal, and then scripting languages) and the other for languages facilitating hacking but with random results.■_
R と SAS の関係は Java と COBOL のそれのようなもの
R is to SAS as Java is to COBOL | (R news & tutorials) R is to SAS as Java is to COBOL May 18, 2012 By David Smith (This article was first published on Revolutions, and kindly contributed to R-bloggers) An interview with Revolution Analytics CEO Dave Rich was published this week by BeyeNetwork. During the interview, Dace was asked about how the statistical modeling platforms have changed over the decades: People have been doing statistical modeling and predictive analytics for 50 years now, SAS and SPSS have been around since the early ‘70s. What's different now -- what's making this move toward other statistical and “big data” areas? David Rich: Well, I think obviously SAS and SPSS have been around, as you pointed out, for decades. We call that sort of the first generation of analytics and insight-driven solutions. In my perspective, having been in the business for more than three decades, it reminds me a bit of what COBOL was back in the day relative to business software. I see R as the more modern language. In this analogy, R would represent Java or C++. What happened in the middle of the nineties when the shift occurred is very similar to where we are now with R. Open source is a worldwide collaboration innovation. It's a way to tap into that channel for research, and I think the role that Revolution Analytics can play – very similar to what Red Hat did back in the Linux days – is to be the conduit between the community and enterprise deployment. 以下略SPSS って今でも結構遣われたんですねえ。 IBM の力?
■_ 5.16.0
リリース
Perl 5.16.0 is now available! - nntp.perl.org The Perl 5 development team is gratified to announce the release of Perl 5.16.0! You will soon be able to download Perl 5.16.0 from your favorite CPAN mirror or find it at: https://metacpan.org/release/RJBS/perl-5.16.0/ SHA1 digests for this release are: 56fb8097ff3e472f7a057848b37cb9ede7662b74 perl-5.16.0.tar.bz2 d21de2b409d99440047a4e67a61f0a781ea2f66b perl-5.16.0.tar.gz You can find a full list of changes in the file "perldelta.pod" located in the "pod" directory inside the release and on the web. Perl 5.16.0 represents approximately 12 months of development since Perl 5.14.0 and contains approximately 590,000 lines of changes across 2,500 files from 139 authors. (略)詳しい変更点などはまとめてくださる人が出るでしょう。
2012年05月20日
■_
まだ名乗りを上げた人いないみたいね 誰かDHH氏のキーノートを翻訳しませんか? - ITは芸術だDavid Heinemeier Hansson Keynote JA · newhavenrb/railsconf2012 Wiki
しまった見逃した 次回のOBSLiveは5/19(土)、8bit特集で芸夢狂人さん、TinyProject Hashiさんが登場 - おにたま(オニオンソフト)のおぼえがき
Facebook とか Google+ とかどうしたものかと
■_ My Road to the Python Commit Bit
comit bit を 得るまでの道程
My Road to the Python Commit Bit — Hynek SchlawackMy Road to the Python Commit Bit May 19, 2012 Like many FOSS fans, I always wanted to be an active part of the movement. My last big project was for the Amiga in the past millennium though. Nowadays I'm happy that after years of small-scale dabbling on various projects I've found my haven. I'd like to share my way to my recent gain of push privileges on the Python project and hope to inspire some of you to do the same. The Problem It isn't easy to start contributing to FOSS. Some projects seem even not to be particularly interested in new contributors – because everyone wants to contribute for fame and glory. Others could use help but aren't eager to get new patches because of ample amounts of code rotting in the bug tracker. But there are plenty of projects that want you to help. And yes, even CPython needs your help! That's the reason it's active in its outreach to new contributors. Please note I said “contributors”, you don't have to be a programmer – or do programmer's work – to help.© 2005–2012 Hynek Schlawack All Rights Reserved■_
- 第1回 関数型言語勉強会 大阪に行ってきました « i pensieri stretti & il viso sciolto.
- 第一回 関数型言語勉強会 大阪に行ってきた - 予定は未定Blog版
いけがみさんの発表 (略) が、これは初心者向けどうこうを抜きにして素敵な発表でした。 (略) これ ust とか録画とかなかったのは本当に残念・・・- 海外と日本|僕らのWeb制作戦争のお話*ホームページを作る人のネタ帳
- twcamper/sicp-kindle
- こどもたちにプログラミングを教える CoderDojo Tokyo #1 を開催しました - 僕は発展途上技術者
- Hexenkessel, この一ヶ月ほどで起きた悲惨な交通事故を見て一番強く感じたのは、その原因を「てんかん」や「DQN少年」や...
- Twitter / @hedachi: FF1〜6で自分のキャラが左にいて、モンスターが右に ...
- Twitter / @snapwith: @hedachi 多分当時は横スクロールアクションが ...
- Twitter / @hedachi: @snapwith すみませんFF左右逆でした。。。 ...
- Twitter / @snapwith: @hedachi あーその横スクロールの話は何度も出 ...
- Twitter / @hedachi: @snapwith ふむふむ。初期には逆のゲームがあ ...
- Twitter / @snapwith: @hedachi 単純な話だと思うんですよ。スクロー ...
- *... - neta
- かつてFreeBSD PRESSという雑誌があった - Togetter
- metaparse の meta_hs を使って C++ で Haskell を書く - C++でゲームプログラミング
- 凡人が数学を語学として学ぶ具体的な手続きを説明する/図書館となら、できること番外編 読書猿Classic: between / beyond readers
炭坑の庭師 - steps to phantasien■_
明日(もう今日か)のアレのため早じまいw
←で話題になってたので 10 ways to improve your programming skills ? AntoArts ←リンクを辿ってみたのだけど どうも見覚えがあるし、昨年の日付だからもしやとぐぐると
2012年05月19日
23日発売だから今日辺りあそことかあそこに…と思ったが空振りだった(謎)
■_ C11
C11のはなし
The New C Standard Explored | Dr Dobb's The New C Standard Explored By Tom Plum, May 08, 2012 C11 specifies many security features that require minimal changes to existing code. They greatly reduce unexpected behavior and prevent many kinds of common attacks. C11 では既存のコードの変更を最小限にするような security features を多く規定しています。 それらは主に予期しない振る舞いを少なくし、一般的な攻撃法の多くを防ぎます。 C and C++ are members of the same family of languages. The evolutionary boldness of C++ removes some of the marketplace pressure on C; people who are continually pushing for innovation are naturally drawn to the C++ development process. Each language had a coherent original design (by Dennis Ritchie and Bjarne Stroustrup, respectively), followed by successive refinement in a very competitive marketplace of ideas. Both languages share an extreme concern for performance, with the slogan "don't leave space for a more-efficient systems-programming language underneath our language (C or C++)." However, it's unfair to complain that the original designs assigned too little importance to cybersecurity; both languages pre-date the beginnings of concern for security. But in recent years, as the marketplace has started to emphasize cybersecurity, C and C++ have been responding in several ways. C と C++ は同じ言語ファミリーのメンバーです。C++ の evolutionary boldness は C に関する marketplace pressure の一部を取り除きました。 継続的にイノベーションを行っている人たちは自然に C++ を使った開発プロセスに引きつけられました。 いずれの言語も coherent な original design を持ち、継続した refinment が competitive marketplace of ideas で行われてきました。 どちらの言語も性能に関して非常に関心を払っていて、それは "don't leave space for a more-efficient systems-programming language underneath our language (C or C++)." というスローガンに現れています。 しかし、もともとの設計で cybercecurity にあまり関心を払わなかったことを責めるのは フェアではありません。 どちらの言語にしてもセキュリティが注目されるようになる前に作られたものなのですから。 とはいえ、近年においては市場でもセキュリティが重大な関心事となってきていますから、 C と C++ もいくつかの手段で対応してきています。 In early 2002, Bill Gates' famous "battleship-turning" memo made cybersecurity a top goal for Microsoft. About a year later, Microsoft proposed a new "bounds-checking" library to WG14, which eventually became Technical Report 24731-1. It now is part of C11 as the (optional) Annex K. (An almost-final draft of C11 is available here [PDF].) The C11 Annex K Functions I'll start my tour of Annex K with the fopen_s function. The main innovation is that files are opened with exclusive (also known as non-shared) access. Furthermore, if the mode string doesn't begin with u (such as with code being updated from the older fopen ), then to the extent that the underlying system supports it, the file gets a file permission that prevents other users on the system from accessing the file. (以下略)■_ まぜると
What happens when you mix three research programming languages together : haskell
What happens when you mix three research programming languages together : Inside 233 What happens when you mix three research programming languages together 三つの実験的なプログラミング言語を一緒に使ったときに起きること by Edward Z. Yang “...so that's what we're going to build!” “Cool! What language are you going to write it in?” “Well, we were thinking we were going to need three programming languages...” “...three?” “...and they'll be research programming languages too...” “Are you out of your mind?” This was the conversation in streaming through my head when I decided that I would be writing my latest software project in Coq, Haskell and Ur/Web. I had reasonably good reasons for the choice: I wanted Coq because I didn't actually want to implement a theorem prover from scratch, I wanted Ur/Web because I didn't actually want to hand write JavaScript to get an AJAX interface, and I wanted Haskell because I didn't want to write a bucket of C to get Ur/Web and Coq to talk to each other. But taken altogether the whole thing seemed a bit ludicrous, like an unholy fusion of a trinity of research programming languages. この選択をしたのにはきちんとした理由がありました。 Coq を選んだのは一からきちんと理論を実装することはやりたくなかったからですし、 AJAX インターフェースを手に入れるために JavaScript をごりごり書くのを避けたいから Ur/Web を使いたかったのだし、Ur/Web と Coq を互いにやり取りさせるために やまほど C で書くのは望まなかったので Haskell を必要としたのです。 しかし、これらすべてを一緒に扱うことは少々滑稽で、 三位一体の実験的プログラミング言語の unholy な融合のようなものでした。 In the end, it worked out quite well. Now, what this means depends on your expectations: it was not the case that “everything worked out of the box and had very nice instructions attached.” However, if it was the case that: No single issue ended up requiring an unbounded amount of time and yak shaving, Any patches written made it into upstream, improving the situation of the software for future developers, and The time spent on engineering grease is less than the time it would have taken to build the system with inferior languages, engineering grease に要する時間が低水準言語でシステムを構築したときに要したであろう時間 よりも少なく Everyone involved in the project is willing to learn all of the languages involved (easy if it's only one person), プロジェクトの全員が挙げられたすべての言語を学ぶことを望んでいる then yes, it worked “quite well”. In this post, I'd like to describe in a little more detail what happened when I put these three languages together and speculate wildly about general maxims that might apply when someone is doing something similar. (A description of what the project actually is will unfortunately have to wait a little; it's not quite done yet.) このポストでは三つの言語をまとめて使ったときに起きたことの詳細を説明し、 ほかの人が同様なことをしようとしたときに教訓 (maxims) となるでろうことを書こうと考えています。 (略) Conclusion I've presented six maxims of research polyglottism: research polyglottism (どう訳したものか) について六つの格言 (maxims) を挙げました Interchange formats will be undocumented and just good enough to get the job done. 中間フォーマットはアンドキュメンッテドでとりあえず役目を果たすものになるだろう In ML-like languages, it's very easy to make simple but far reaching changes to a codebase, due to the assistance of the typechecker. ML のような言語では型チェッカーの助けがとても便利 A deterministically reproducible bug in some core functionality will get fixed very quickly by an active original author of the code. core functionality にある deterministicall に再現できるバグは active な code の original author によってすばやく修正されるだろう The less interesting a problem is to the academic, the more likely it is you'll be able to fix it yourself. An FFI is a crucial feature for any DSL, and should be a top priority among tasks involved in preparing a language for general usage. FFI はすべての DSL にとって重要な機能 (crucial feature) であり、 広く使われる言語を得るために必要なタスクで最高の優先順位となるべきものである Make sure you know how to do parsing in all of the languages involved. すべての言語でパージングがどのように行われるのかを熟知すること If you keep all of these maxims in mind, I believe that the tradeoff between some extra bugfixing and yak shaving for the benefits of the research programming language is a compelling one, and one that should be considered seriously. Yes, you have to be willing to muck around with the innards of all the tools you use, but for any sufficiently important tool, this is inevitably true. And what is a more important tool than your compiler?
- 復刻!はるみのゲーム・ライブラリー(予告) - YouTube
- Yoshifumi YAMAGUCHI - Google+ - この間書いた記事(http://d.hatena.ne.jp/ymotongpoo/20120516/13371235…
- C++Now2012体験記 - redboltzの日記
- future sync 次世代技術を中心としたIT系コミュニティ合同勉強会
- いろいろ - みねこあ
- 思い立ったら即配信―無線ライブストリーミング対応ポータブルビデオカメラ「My Broadcast」 - インターネットコム
- 「外国人に人気の日本の観光スポット」トップ20―トリップアドバイザー調べ - インターネットコム
- InfoQ: Objects, Anomalies, and Actors: The Next Revolution
- アセンブリでマクロ - 名古屋313の日記もう一段、二段マクロで生成できそうな気がしないでも
- 「第一回関数型言語勉強会 大阪」に参加しなかった人へ
- Kindle Fire の販売量が急落:iPad 3 と Google Nexus の影響か? « Agile Cat — in the cloud
- なぜ私たちは NodeJS から Ruby on Rails に移行したのか - 杉風呂2.0 - A Lifelog -
- Silexを通して伝えたかったこと ~ PHPカンファレンス関西2012 ~ - ぷぎがぽぎ
- 【金環日食について】 - Yahoo!知恵袋
- Success is a Journey, not a Destination: Yesod の Scaffold を使って Wiki らしきものを作ってみた
- 数学の入門書をゆっくり楽しむ会 : ATND
- Lua構文ハック by rti 7743 on Prezi
- 第一回関数型言語勉強会 大阪 まとめ #fpstudy - Togetter
2012年05月18日
encapsuraltion を 「カプセル化」とするのも問題ありじゃね? とは思うものの、これをさすがに今から変えろというのも無理な話か。
boxing → ボックス化と同じ違和感なんですよね。これも。 最近まで気にならなかったんだけど。
それがなんで気になるようになったかというと、boxing だったりするんですが。
■_ Pythonista
という呼称について。
degrading → 下劣な、不真面目な。
Does anyone else hate the term `Pythonista`? : Python Does anyone else hate the term `Pythonista`? (self.Python)Why do people call themselves this? It's degrading, whatever you use Python for you shouldn't bring yourself down to the level of a barista.shouldn't bring yourself down to the level of a barista What an asshole thing to say.Relevant username perhaps? Either way, you're totally right.Ha! I didn't actually think about that, maybe I'll become the defender of all things coffee-related.It doesn't come from barista. "-ista" is a suffix which when added to a noun denotes someone who practices, believes or is adept in that noun. http://en.wiktionary.org/wiki/-istaShouldn't a barista then be a bartender? or lawyer?Maybe. In that sense I would think someone who goes to bars would be a barista.A barista works a coffee bar you could say.You mean like 'barrister', maybe?That is what it means: barista is the Italian word for barman or barmaid. I guess owing to coffee's Italian heritage, somebody thought it would be funny to refer to the person who works behind the bar at a coffee shop as an Italian bartender. It was probably Starbucks, who loves to co-opt Italian words, such as venti, the Italian word for twenty, since that cup size is 20 fl.oz. Edit: As far as I can tell (and this could be wrong), barrister also derives from bar, but the meaning here is the railing in a UK courtroom that separates the spectators from those that are actually part of the court (judges, defendant, witnesses, etc.) Since it separated those trained in the law from the rest, the word bar became a metonym for the practice of being a lawyer, leading to the licensing exam being called "the bar", and the professional association being called "the Bar Association" and so on.someone at Starbucks thought it funny to call their personel barista A bar in Italy is something quite different than what you think of in the US. Their most important function is to sell coffee. Since Italians take their coffee very seriously a barista is a well trained profession and so internationally a barista has to come to mean a person trained to operate a professional Italian coffee machine. Now, given the poor quality of coffee at Starbucks I don't think their personel actually deserve the title barista at all.The more you know!yourself down to the level of a barista. You aren't better than anyone.I consider myself to be Pythonesque, but I only ever use the word Pythonista ironically.I just call myself a Pythoner.I'm not a fan of the term and don't use it, I always assumed it was derived more from "fashionista", not barista. My biggest gripe with the term is that it's a gender specific (feminine) noun used to describe a gender agnostic group.You could call yourself a "pythonisto," right? It is feminine because of the "a" attached to the end of the word. I agree with you, it's not attached to barista, but fashionista.We need more Python Ninjas too.展開が良くわからんけど、 それはさておきなんでもかんでも -er (-or) ですませがちなのは(ry
10 ways to improve your programming skills : programming10 ways to improve your programming skills — AntoArts
- リアルと電子のハイブリッドで読書量を増やす──新オンライン書店「honto」の狙い - ITmedia ニュース
- 末弘×三国志ブランド赤兎馬「しばちゅうさん」Tシャツ | ホビー | マイナビニュース
- 退職理由は「転職先のモニターのほうが大きい」から? « A-Listers
- 第7回JVMソースコードリーディングの会(OpenJDK6) - [PARTAKE]
- 姫路IT系勉強会 Vol.5 on Zusaar
- IT業界を生き抜く健康生活: 健康について第54回 食について(5) 次世代に引き継ぐ習慣
- Colorful Pieces of Game::海外でのプロジェクトの進め方
- 逆FizzBuzz問題 - 水底で思うこと
- ASCII.jp:リボンUIだけじゃない Windows 8のExplorerの意外な変更点|塩田紳二のWindows 8 IN-N-OUT
- Visualizing the CRAN: Graphing Package Dependencies | (R news & tutorials)
- Github Follower Graph with R | (R news & tutorials)
- dynamic aspects » Back to the future
BS プレミアムで斎藤隆を取り上げた番組をやってまして、 そこでこんな言葉が(自分で作った言葉だそうですが) 雲上在天[d2][d1]衰えゆく自身の体細部の筋肉を毎日3時間のマッサージトレーナーに指示する迄の勉強研究
2012年05月17日
■_
オライリーの ScyPy and NumPy 本まだだったのね。
■_ R, SAS, SPSS
SPSS って結構使われてるんですね。 まあ今は天下の IBM から出てるものだしなあ
How long before R overtakes SAS and SPSS? | (R news & tutorials) How long before R overtakes SAS and SPSS? May 15, 2012 By David Smith (This article was first published on Revolutions, and kindly contributed to R-bloggers) Based on an analysis of Google Scholar data on usage of statistical software, Bob Muenchen makes a forecast: R will overtake SAS and SPSS in 2015. Forecasting is extrapolation — always a tricky business — so Bob also provides these qualitative reasons why R will continue to grow at the expense of SAS and SPSS: R が伸び続ける理由 The continued rapid growth in add-on packages (Figure 10) アドオンパッケージ(の数)が伸び続ける The attraction of R's powerful language 強力な言語としての R の魅力 The near monopoly R has on the latest analytic methods 最近の analytic methods においてほぼ独占状態にある Its free price 無料 The freedom to teach with real-world examples from outside organizations, which is forbidden to academics by SAS and SPSS licenses (it benefits those organizations, so the vendors say they should have their own software license). SAS や SPSS のアカデミックライセンスにはいろいろ不自由がある See how Bob comes up with this forecast (using R, of course!) at the link below.2015 年に追い抜く。と。
Will 2015 be the Beginning of the End for SAS and SPSS? | (R news & tutorials)
■_ coding standard
で、これ。 Joint Strike Fighter (F-35) C++ Coding Standard : programmingF-35 Joint Strike Fighter Coding Standard Documentation | Hacker News conding standard は → http://www2.research.att.com/~bs/JSF-AV-rules.pdf
140ページもあると目を通すのも少々手間がかかるけど、ちまちま眺めてたり。
1 INTRODUCTION The intent of this document is to provide direction and guidance to C++ programmers that will enable them to employ good programming style and proven programming practices leading to safe, reliable, testable, and maintainable code. Consequently, the rules contained in this document are required for Air Vehicle C++ development and recommended for non-Air Vehicle C++ development. As indicated above, portions of Air Vehicle (AV) code will be developed in C++. C++ was designed to support data abstraction, object-oriented programming, and generic programming while retaining compatibility with traditional C programming techniques. For this reason, the AV Coding Standards will focus on the following: 1. Motor Industry Software Reliability Association (MISRA) Guidelines For The Use Of The C Language In Vehicle Based Software, 2. Vehicle Systems Safety Critical Coding Standards for C, and 3. C++ language-specific guidelines and standards. The MISRA Guidelines were written specifically for use in systems that contain a safety aspect to them. The guidelines address potentially unsafe C language features, and provide programming rules to avoid those pitfalls. The Vehicle Systems Safety Critical Coding Standards for C, which are based on the MISRA C subset, provide a more comprehensive set of language restrictions that are applied uniformly across Vehicle Systems safety critical applications. The AV Coding Standards build on the relevant portions of the previous two documents with an additional set of rules specific to the appropriate use C++ language features (e.g. inheritance, templates, namespaces, etc.) in safety-critical environments. Overall, the philosophy embodied by the rule set is essentially an extension of C++'s philosophy with respect to C. That is, by providing “safer” alternatives to “unsafe” facilities, known problems with low-level3 GENERAL DESIGN This coding standards document is intended to help programmers develop code that conforms to safety-critical software principles, i.e., code that does not contain defects that could lead to catastrophic failures resulting in significant harm to individuals and/or equipment. In general, the code produced should exhibit the following important qualities: Reliability: Executable code should consistently fulfill all requirements in a predictable manner. 信頼性 Portability: Source code should be portable (i.e. not compiler or linker dependent). 移植性 Maintainability: Source code should be written in a manner that is consistent, readable, simple in design, and easy to debug. 保守性 ソースコードは一貫したマナーのもと、読みやすく、単純な設計で、かつデバッグが容易であるように 書かれるべきである。 Testability: Source code should be written to facilitate testability. Minimizing the following characteristics for each software module will facilitate a more testable and maintainable module: テスト容易性 1. code size 2. complexity 3. static path count (number of paths through a piece of code) Reusability: The design of reusable components is encouraged. Component reuse can eliminate redundant development and test activities (i.e. reduce costs). 再利用可能性 再利用可能なコンポーネントの設計が推奨される。 コンポーネントの再利用は無駄な開発や test activeties を抑制する (つまりはコストを下げる)。 Extensibility: Requirements are expected to evolve over the life of a product. Thus, a system should be developed in an extensible manner (i.e. perturbations in requirements may be managed through local extensions rather than wholesale modifications). 拡張可能性 Readability: Source code should be written in a manner that is easy to read, understand and comprehend. 可読性 ソースコードは、読みやすく、理解しやすく記述すべきである Note that following the guidelines contained within this document will not guarantee the production of an error-free, safe product. However, adherence to these guidelines, as well as the processes defined in the Software Development Plan [12], will help programmers produce clean designs that minimize common sources of mistakes and errors.Ada では人を思うように集められないとかでC++を採用したといったような 記事を以前に見た覚えがありますが、C++ を使い、かつ、 このような conding standard を設けることで Ada を使わない(使えない)ことの デメリットは解消できるんでしょうか。 見た感じ項目の一つ一つは納得できるものばかりのようだし、 確かにバグが入り込む余地は少なくするように見えます。 が、実際問題どの程度効果があるものなのか知りたいなあと。 どこかにこういった conding standard を採用した場合とそうでない場合の コードの質について論じたものとかないもんだろか。
conding standard の詳細も気が向いたらいずれ取り上げます。
■_ \?
メタキャラクターのはなし
どさにっき \? _ "a?hoge" という文字列の頭の a? を削る。 _ 期待する挙動。 > echo 'a?hoge' | sed 's/a\?//' hoge FreeBSD の sed はちゃんとこのように動く。 _ GNU sed。 $ echo 'a?hoge' | sed 's/a\?//' ?hoge a? ではなく a の1文字だけが削られる。なんで? $ echo 'a?hoge' | sed --posix 's/a\?//' hoge $ sed --version GNU sed version 4.2.1 debian squeeze などに入ってる GNU sed 4.2 なら --posix で意図した挙動になるが、 $ echo 'a?hoge' | sed --posix 's/a\?//' ?hoge $ sed --version GNU sed version 4.1.5 centos5 などに入ってる 4.1 だとそれでもやっぱりおかしい。 _ GNU sed でも $ echo '?hoge' | sed 's/\?//' hoge 頭の "a?hoge" から "a?" を削るのではなく、"?hoge" から "?" を削るのは問題なく動く。 $ echo 'a*hoge' | sed 's/a\*//' hoge ? ではなく * であれば問題ない。 _ とりあえず、 $ echo 'a?hoge' | sed -r 's/a\?//' hoge のように -r とすれば GNU sed でも問題なく動くが、 > echo 'a?hoge' | sed -r 's/a\?//' sed: illegal option -- r usage: sed script [-Ealn] [-i extension] [file ...] sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...] 今度は FreeBSD で動かなくなる。-r は拡張正規表現を使うということなんだけど、\? って拡張か? _ ? が正規表現的に特殊な意味を持つ記号であることはもちろん承知してるが、その特殊な意味を持たせないように \? と表記してるにもかかわらず謎の挙動になる。今のところ sed -r 以外のまともな解決策が見つかってないんだけど、どうするのが正しいんだべ。 << = >>\? は GNU 固有(たぶん)の拡張です。 --posix オプション指定時に動作が変わるのはこの指定によりGNU拡張が disable されるからです(4.2と4.1で違うのは仕様変更かなあ)。 -r オプションは egrep に準ずる正規表現を使うよう指示するオプションなので この場合も \? がメタキャラクターでなくなります。
$ echo '?hoge' | sed 's/\?//'このケースは、 先行するものがないのに繰り返し指定のメタキャラクターがあるために エラーになり、結果的にリテラルとしての ? を置いたのと同じ解釈になっているためです。GNU sed の Info から。
`\+' As `*', but matches one or more. It is a GNU extension. `\?' As `*', but only matches zero or one. It is a GNU extension. `\{I\}' As `*', but matches exactly I sequences (I is a decimal integer; for portability, keep it between 0 and 255 inclusive). `\{I,J\}' Matches between I and J, inclusive, sequences. `\{I,\}' Matches more than or equal to I sequences. `\(REGEXP\)' Groups the inner REGEXP as a whole, this is used to: * Apply postfix operators, like `\(abcd\)*': this will search for zero or more whole sequences of `abcd', while `abcd*' would search for `abc' followed by zero or more occurrences of `d'. Note that support for `\(abcd\)*' is required by POSIX 1003.1-2001, but many non-GNU implementations do not support it and hence it is not universally portable.`REGEXP1\|REGEXP2' Matches either REGEXP1 or REGEXP2. Use parentheses to use complex alternative regular expressions. The matching process tries each alternative in turn, from left to right, and the first one that succeeds is used. It is a GNU extension.POSIX 的には、sed で使用する正規表現 (Basic Regular Expression) には ? (0回または1回) +(1回以上の繰り返し) | (選択) に類するメタキャラクターはありません、
■_
- 逆FizzBuzz問題 (Inverse FizzBuzz) - 猫とC#について書くmatarilloの雑記
- Ideone.com | Online F# Compiler & Debugging Tool
- 逆FizzBuzz問題をTrieでトライ - athosの日記
- 逆FizzBuzz問題 (Inverse FizzBuzz) ? Gist
- 逆FizzBuzz問題 - None is None is None
- Big Sky :: Perl で 逆FizzBuzz
- 逆FizzBuzzの正規表現書いた(解けてないけど) - 北海道苫小牧市出身のPGが書くブログ
- An answer of Inverse Fizzbuzz. ? Gist
- Regex of inverse fizzbuzz. ? Gist
- F#で逆FizzBuzz問題 - Bug Catharsis
- わぁいInverse Fizzbuzz解けたよー - 這い寄るゆろよろ・アンド・ライジングフォース日記
- Inverse Fizzbuzz - scalaとか・・・
- Inverse FizzBuzz in Common Lisp ? Gist
- The Bastards Book of Ruby
- 「情報処理」で読めるLISP関係の記事まとめ-60年代編 - NAVER まとめ
- 「情報処理」で読めるLISP関係の記事まとめ-70年代編 - NAVER まとめ
- 「情報処理」で読めるLISP関係の記事まとめ-80年代編 - NAVER まとめ
- GitHub data analysis | (R news & tutorials)
- Amazon.co.jp: 情報処理教科書 基本情報技術者試験のC言語問題がちゃんと解ける本: 坂下 夕里: 本
- [Haskell] ANNOUNCE: forthcoming O'Reilly book on Parallel and Concurrent Haskell
- Pull Request #144: Support building using C++ compiler by mitchblank ・ mruby/mruby
2012年05月16日
ほかにもあるだろうけど zed のは読まねば。
- Please don't learn to code | Hacker News
- Coding Horror: Please Don't Learn to Code
- Rands In Repose: Please Learn to Write
- Learn Code The Hard Way -- Books And Courses To Learn To Code
- Please Don't Become Anything, Especially Not A Programmer : programming
パタンランゲージ 読んだ。というかまだ途中なんだけど、次の予約が入ってしまったので延長できない ○| ̄|_
結構面白く読めているのだけど(「ミニバス」の話とか)、 正直これからなにがどうやってデザインパターンに言ったのかが良くわからないw 深く考えるだけ無駄な類のものなのかもしれないけど。
ちょっとの変更で実行速度が大違いという話
c# - Why does adding local variables make .NET code slower - Stack Overflow Why does commenting out the first two lines of this for loop and uncommenting the third result in a 42% speedup? int count = 0; for (uint i = 0; i < 1000000000; ++i) { var isMultipleOf16 = i % 16 == 0; count += isMultipleOf16 ? 1 : 0; //count += i % 16 == 0 ? 1 : 0; } Behind the timing is vastly different assembly code: 13 vs. 7 instructions in the loop. The platform is Windows 7 running .NET 4.0 x64. Code optimization is enabled, and the test app was run outside VS2010. [Update: Repro project, useful for verifying project settings.] Eliminating the intermediate boolean is a fundamental optimization, one of the simplest in my 1980's era Dragon Book. How did the optimization not get applied when generating the CIL or JITing the x64 machine code? Is there a "Really compiler, I would like you to optimize this code, please" switch? While I sympathize with the sentiment that premature optimization is akin to the love of money, I could see the frustration in trying to profile a complex algorithm that had problems like this scattered throughout its routines. You'd work through the hotspots but have no hint of the broader warm region that could be vastly improved by hand tweaking what we normally take for granted from the compiler. I sure hope I'm missing something here. Update: Speed differences also occur for x86, but depend on the order that methods are just-in-time compiled. See Why does JIT order affect performance? Assembly code (as requested): var isMultipleOf16 = i % 16 == 0; 00000037 mov eax,edx 00000039 and eax,0Fh 0000003c xor ecx,ecx 0000003e test eax,eax 00000040 sete cl count += isMultipleOf16 ? 1 : 0; 00000043 movzx eax,cl 00000046 test eax,eax 00000048 jne 0000000000000050 0000004a xor eax,eax 0000004c jmp 0000000000000055 0000004e xchg ax,ax 00000050 mov eax,1 00000055 lea r8d,[rbx+rax] count += i % 16 == 0 ? 1 : 0; 00000037 mov eax,ecx 00000039 and eax,0Fh 0000003c je 0000000000000042 0000003e xor eax,eax 00000040 jmp 0000000000000047 00000042 mov eax,1 00000047 lea edx,[rbx+rax]Woz が Aplle についてなにか言ったらしく。 Wozniak calls for open Apple - Strategy - Business - News - iTnews.com.au
Wozniak calls for open Apple | Hacker News Here is a nice comparison. Buy a mobile device and try to use the standard developer tools to put Hello World on it. Android: Download Eclipse (Windows, Linux or Mac) and the Android SDK (Windows, Linux or Mac) - no accounts or registration needed for either of these. In your phone menus enable development and connect via USB. In Eclipse make your hello world project, and hit Run or Debug. Enjoy. Apple: You must buy a Mac. In the App Store (requires an account) or the developer site (requires an account and registration) download Xcode. Create your project. Connect the phone via USB. Right click to enable it for development and then do some song and dance with Apple to get permission to use "your" device for development. (I haven't yet worked out the exact dance required and how much it costs.) I don't know what it looks like for WP7 but assume it is substantially similar to Apple.Apple was hope . now its the new MS ... comes with the territory . if you the one and in bed with CIA who's to say open up ...DEC is the new Unisys. IBM is the new DEC. Microsoft is the new IBM. Apple is the new Microsoft. Linux is the new... err ahh... BSD is the new.. err umm... Screw opening corporations. Break the cycle entirely I say.You forgot one: Java is the new COBOL. Now, more seriously, such cycles do exist and we can observe them easily. History repeats imperfectly in subtly different ways. If Apple is to be the new Microsoft, it won't be exactly like it just as Microsoft is not exactly the new IBM - both have learned from their predecessors. Will they make mistakes that doom themselves? Eventually yes, but they won't be the same mistakes that doomed their predecessors.At the momenent, Apple is even worse than Microsoft. Two ways I can think of now. Microsoft got docked for just bundling IE with their OS. I just installed Netscape back in the day(before switching to IE coz Netscape started sucking). Apple bans all competing browsers. (Windows RT is a different story). The iOS app store forces developers to use their in-app purchasing with a 30% cut for Apple and bans any links to the developer websites to sell services. The Windows App Store does not require this.
- アルゴリズムを学ぼう
- 第8回 FreeBSD勉強会 : ATND
- aa8a34f1e14c53bf7759490bd8e8cf30.png
- 情報処理推進機構:国際標準推進の推進
Ruby国際標準化報告会 2012年6月5日(火)13:45~18:05- ポストPC時代 マイクロソフトの勝算 2012年5月23日号 | 本誌紹介 | ニューズウィーク日本版 オフィシャルサイト
- Coq と実数と停止判定 - Togetter
- 関数型イカ娘本3rd執筆者募集 - Call for Article for Functional Ikamusume Book #3 - [PARTAKE]
- 『すごいHaskellたのしく学ぼう!』見本 - オーム社開発部
- SPSSによる統計入門書2冊同時発行 - オーム社開発部
- 孤独のグルメDVD-BOX発売 「うわあ エロゲ屋で本当に売り始めちゃったぞ」 - アキバBlog
- Inside WindowsR Debugging--A Practical Guide to Debugging and Tracing Strategies in WindowsR
- C++Now! 2012 day2 - Togetter
- LL Decade | 2012年8月4日(土)銀座ブロッサムにて開催
- 日々是横着 - 「サーバ」に対する誤った認識
- Jun Mukai's blog: Go言語の型宣言をHaskellから理解する
- Perlは構文がC言語、Java、PHP、JavaScriptに似ていて親しみやすいスクリプト言語 - サンプルコードによるPerl入門
- VCD りのん :おた☆スケ -おたくのスケジュール帳-
- InfoQ: Deliver Early - There Is No Excuse!
- 【2012年5月】IT技術書新刊・近刊まとめ - @IT自分戦略研究所
2012年05月15日
耳鼻科 実はまだ通ってます。 中耳炎はもう問題ないのですが、 耳鳴りが続いてるので(とはいえこっちもだいぶ良くなった)。 通っている耳鼻科がなかなか興味深くて、気が向いたらその辺を書いてみようかと。
ませまちか ぽんと買えるくらいの稼ぎにはしたいわねえ。
今日の十個のなんのとか
Bertrand Russell’s 10 Commandments for Teachers — Marginal RevolutionMarginal Revolution Bertrand Russell's 10 Commandments for Teachers by Alex Tabarrok on May 6, 2012 at 7:03 am Do not feel absolutely certain of anything. Do not think it worth while to proceed by concealing evidence, for the evidence is sure to come to light. Never try to discourage thinking for you are sure to succeed. When you meet with opposition, even if it should be from your husband or your children, endeavour to overcome it by argument and not by authority, for a victory dependent upon authority is unreal and illusory. Have no respect for the authority of others, for there are always contrary authorities to be found. Do not use power to suppress opinions you think pernicious, for if you do the opinions will suppress you. Do not fear to be eccentric in opinion, for every opinion now accepted was once eccentric. Find more pleasure in intelligent dissent that in passive agreement, for, if you value intelligence as you should, the former implies a deeper agreement than the latter. Be scrupulously truthful, even if the truth is inconvenient, for it is more inconvenient when you try to conceal it. Do not feel envious of the happiness of those who live in a fool's paradise, for only a fool will think that it is happiness.■_ puzzule
C++ むずい
A C++ program puzzle | Pixelstech.netA C++ program puzzle Source : Peter Date : 2012-05-13 02:31:26 Recently I came across a question asked by wang2191195 on a Chinese IT forum CSDN which asks about a C++ program puzzle. He has a code snippet which cannot be compiled. The code is: #include <cstdlib> #include <iostream> using namespace std; class Base{ public: virtual void func(){ cout << "Base::func()" << endl; } virtual int func( int num ){ cout << "Base::func( int " << num << " )" << endl; return 0; } }; class Derived : public Base{ public: virtual void func(){ cout << "Derived::func()" << endl; } }; int main(){ Derived d; d.func(); d.func(1); system("PAUSE"); } The compile result is : (略)Pixelstech.net © 2011-2012 All rights reserved■_
言及先の pdf がなんともすごかった → http://www.softwarepreservation.org/projects/FORTRAN/BackusEtAl-Preliminary%20Report-1954.pdf
こういうのが公開されてるのね。
FORTRAN should virtually eliminate coding and debugging | Hacker News Well, it did eliminate some kinds of coding (the part where human produces machine code from block diagrams) and debugging (the part where you look for errors in the above translation.)Half a century later, people are still overly optimistic about software development. According to recent studies, this is true for everything (and society at large is actually in favor of it). Yet it is particulary visible in computing. Why is that? Side note: bullshit in marketing brochure is here to stay.Half a century later the change isn't from assembly to an actually useful level of abstraction. The bullshit-o-meter is damped further when half the document shows code examples that would be much more difficult in assembly.■_
- Rabin-Karp法による複数文字列(パターン)検索を試す - Negative/Positive Thinking
- 第4回プログラミングの基礎読書会まとめ - Logic Dice
- Topdog.za.net :: Python modules you should know: Scrapy
- C++Builderが15周年だというので、C++自分史を振り返ってみる:Allegro Barbaro:ITmedia オルタナティブ・ブログ
- Giving.Code::Description("Doing good with programming and design")
- 5分間キャリア・コンサルティング: 第1回 キャリアとは何か?
- 開発の現場から:差分とスナップショット: 組み込み技術者の単身赴任日記
- 属人性排除の功罪 - 人と技術のマッシュアップ
- Kyoto.lispに参加して(発表して)きました - IT系で覚醒めたい
- Zipファイル一個で実行可能なPythonアプリケーションを作ってみる - 第2夜 - atsuoishimotoの日記
- なぜあなたが勉強会で共感したことが社内でうまく伝わらないのか? | 世界 - daipresents!!
- PyCon JP 2012 開催します!
- Emacs: Text Pattern Matching (regex) tutorial
2012年05月14日
■_
ボレル集合ってなんですかーっ○| ̄|_
■_ D
D のイケてる機能
Cool features of the D language « Michael Larouche – The Day Dreamer Cool features of the D language 12 05 2012 Since several weeks, I gave a second look at the D programming language after watching videos of talk gave by Andrei Alexandrescu and Walter Bright at Lang.NEXT conference (see Walter video and Andrei video). I decided to explain my favorite and cool features of the language. Of course there's many more, I invite you to take a look at the website to find more information about the language. scope guard statement scope guard statement allows you to write code that will be executed either at the exit of the function, when the function succeeds (when they are no error or expection raised) and when you get failure by error or an exception. スコープガード文は関数を脱出するときに 関数が成功したとき、エラーもしくは例外によって失敗させるとき のいずれかによって実行されるコードを書けるようにします。 It can be used to simulate the RAII pattern. Say you need to write data coming from a database into a File and the API isn't RAII friendly. You could use try-catch-finally statements like this これは RAII パターンをシミュレートするのに使えます。 データベースから持ってきたデータをファイルに書き出す必要があるけれども API が RAII フレンドリーなものでない状況にあるとしましょう。 try-catch-finally 文を使って次のように書けます auto file = new std.stream.File("test.txt", FileMode.In); auto db = new SqlDatabase(); try { db.open(); } catch(SqlException e) { writeln(e); return; } try { db.callFunctionThatFails(file); } catch(SqlException e) { writeln(e); } finally { db.close(); file.close(); } It's a simple code with some flaws (the File object is never closed).If we nest various try-catch statement, code can become pretty cluttered and hard to read. Here's the version with the scope(exit) statement 上記のコードは(Fileオブジェクトが決してクローズされない)いくつかのフローを持った単純なコードです。 いくつかの try-catch 文がネストした場合、コードは pretty cluttered なものとなり 読むのが困難になります。 次のコードは scope(exit) 文を使ったバージョンです。 auto file = new std.stream.File("test.txt", FileMode.In); auto db = new SqlDatabase(); scope(exit) { file.close(); db.close(); } try { db.open(); db.callFunctionThatFails(file); } catch(SqlException e) { writeln(e); } Behind the scene, the compiler will write the correct try-catch statement for you. ((略) Conclusion The D language is powerful and deep and they are many things to learn about this language. For go further, I suggest you read the official documentation on the website and to read Andrei's book The D Programming Language. As for me, I think I've finally found a worthy successor of C++ for my projects that required C++ in the past. I'm currently investigating doing DirectX 11 code using D. D は強力かつ deep であり、この言語について学ぶことはたくさんあります。 web にある公式ドキュメントを読み、さらに Andrei の本 The D Programming Lanugage を 読むことをお勧めします。 わたしは自分がようやく 過去わたしが C++ を必要としていたプロジェクトのための C++ の worthy successor (良い後継者?) を見つけたと考えています。 現在わたしは D を使った DirectX 11 のコードを試しているところです。なかなか痒いところに手が届く機能がいろいろと
■_ coding standard
F-35 のソフトウェア(具体的にどこのというのはなし)で使われた コーディング標準が公開? されているらしく。 Joint Strike Fighter (F-35) C++ Coding Standard : programmingF-35 Joint Strike Fighter Coding Standard Documentation | Hacker News
ちょっと目を通したけど、いかんせん大きい(140ページくらいある)ので結構大変。
■_
- シグネチャのフィールドにある関係の多重度 - たけをの日記@天竺から帰ってきたよ
- スタートAlloyやりました - たけをの日記@天竺から帰ってきたよ
- 「コンプガチャ問題」に見る新興勢力の危機管理と矜持 - Tech Mom from Silicon Valley
- D言語からC言語のコードを呼び出す - c4se記:さっちゃんですよ☆
- Kyoto.lisp TT #1を開催しました - Kyoto.lisp
- [Io][Iolanguage][Python]PythonのStringIOをIoで実装してみた。 - rokujyouhitomaの日記
- Interactive Extensions(Ix) - StartWithメソッド:Gushwell's C# Dev Notes
- Colorful Pieces of Game::ときめきメモリアルの時代の電子書籍版
- Modegramming Style: Scala Tips / Validation (11) - モナド
- 何もしていないのに動かなくなる - ぱたヘネ
ここから得られる教訓は、「何もしていないけど、動かなくなりました」っていう声に対して、何にもしてないわけ無いだろ正直に話せ、と詰め寄ってはいけないという事。- Fixed-point combinator - Wikipedia, the free encyclopedia
- どさにっき 東京観光
- RTLを語る会 : ATND
■_ quotemeta
Perl なら quotemeta 、Ruby なら Regexp.quote なんてのがありまする。 Python は re.escape かな 7.2. re — Regular expression operations — Python v2.7.3 documentation
2012年05月13日
Stallman のその後は?
読んだ浜村渚の計算ノート (講談社文庫)
近々新刊のでるアレのようには数学数学してないけど結構面白かった。 が、ラノベマスターいなばさんによると二巻の方が面白かったらしい。 これから読もう。
浜村渚の計算ノ-ト 2さつめ ふしぎの国の期末テスト (講談社文庫)
三巻ももうすぐ(というか別の版型ですでに出ているんだけど) 浜村渚の計算ノート 3さつめ 浜村渚の水色コンパス (講談社文庫)■_ TAPL読書会
昨日ありまして。
前回は体調が絶不調で欠席しておりまして、今回は二ヶ月ぶり。
前回が Chapter 20で、今回は Chapter 21 の途中まで。
21 Metatheory of Recursive Types 21.1 Induction and Coinduction inductive definition/coinductive definition P(U) パワーセット 巾集合 21.1.1 定義 generating function とは? 21.1.2 1. F-closed 2. F-consistent 3. fixed 21.1.3 U = {a,b,c}; E1(Φ) = {c} ... E1({a,b,c,}) = {a,b,c} 21.1.4 TARSKI 1955 1 2 The union of all F-consistent sets is the greatest fixed point of F. C = {X | X ⊆ F(X)} P = U(C) 21.1.5 21.1.6 21.1.7 Exercise Suppose a generating function E2 on the universe {a.b,c} is defined by the following inference rules. c a b --- --- -------- a b c E2(Φ) … E2({a,b,c}) = {a,b,c} 21.1.8 COROLLARY 1 principle of induction 2 prinsiple of coinduction 21.1.9 F(X) = {0} ∪ {i+1| i ∈ X} 21.2 Finite and Infinite Types → × Top 21.2.1 definition T(・) T(π,σ) T(π) T(π) 21.2.2 exercise Define a tree to be a partial function T ∈ {1,2}* → {→,×,Top} satisfying the following constraints: T(・) is defined; if T(π,σ) is defined then T(π) is defined U すべてのtree の集合 F(X) = {Top} ∪ {T1 × T2 | T1,T2 ∈ X} ∪ {T1 → T2 | T1,T2 ∈ X} 21.3 Subtyping 21.3.1 definition [Finite subtyping] Sf(R) = {(T,Top)|T ∈ Tf} ----------- T <: Top S1 <: T1 S2 <:T2 ------------------------- S1 × S2 <: T1 × T2 T1 <: S1 S2 <:T2 ------------------------- S1 → S2 <: T1 → T2 21.3.3 exercise (Top, Top×Top) 21.3.4 Is there a pair of types (S,T) 無限の型(Top×Top×Top…)を考える 21.3.5 definition 21.3.6 lemma proof νF = F(νF) ← TR(νF) = TR(F(νF)) TR(νF) ⊆ νF 21.3.7 Theorem νS is transitive Proof case U = Top case U = U1 × U2 case U = U1 → U2 21.3.8 subtype relation 21.4 A Digression on Transitivity 「two useful roles」 21.4.1 Propsitions proofうははまるで意味のわからんメモ ○| ̄|_
■_ プログラミング言語の進化とは
The March of Progress (in programming language syntax :) : programming
alan dipert - The March of Progress Jul 31st Fri The March of Progress 1980: C printf("%10.2f", x); 1988: C++ cout << setw(10) << setprecision(2) << showpoint << x; 1996: Java java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance(); formatter.setMinimumFractionDigits(2); formatter.setMaximumFractionDigits(2); String s = formatter.format(x); for (int i = s.length(); i < 10; i++) System.out.print(' '); System.out.print(s); 2004: Java System.out.printf("%10.2f", x); 2008: Scala and Groovy printf("%10.2f", x)いろいろと反響が
Uyt 28 years to lose semicolonsMarcelk Funny, because the semi-colons were in these places not needed in BCPL, the predecessor of C.Christophe de Dinechin C was not widely used on PCs before the 1980s. Back then, we used Pascal, and before that, BASIC. 10 PRINT USING "#######.##", XAnd1hotsauce Or in Python: print "%10.2f" % xAaron Peschel Here is the modern Python alternative: print("{0:10.2f}".format(x))pre 1980: Smalltalk x asFloat printShowingDecimalPlaces: 2Jarppe Clojure ftw: (format "%10.2f" x) One character less than Scala and Goovy :)rbanffy In FORTRAN you could say: write (*, 10) x 10 format (f10.2) but, at least, you didn't need to use semicolons ;-)In modern Fortran you just do: print "(f10.2)", x■_ split
split - odz buffer
しかし、末尾の空文字を削除するのは何なんだろな。awkの仕様から来たのかなあ。ってどうだったっけか。
perlfunc - Perl 組み込み関数 【perldoc.jp】 split /PATTERN/,EXPR,LIMIT split /PATTERN/,EXPR split /PATTERN/ split 文字列 EXPR を文字列のリストに分割して、リストを返します。 デフォルトでは、行頭の空白は 保存され、末尾の空白は削除されます。 (略) 正の数の LIMIT を指定した場合には、EXPR が分割されるフィールドの最大数を 表しますが、実 際に返されるフィールドの数は EXPR の中で何回 PATTERN が マッチするかに依存します。 LIMIT を指定しないかゼロなら、末尾の空フィールドを捨ててしまいます (pop を行なうときには気を付 けないといけません)。 LIMIT が負ならば、LIMIT に任意の大きな数を指定したのと同じことにな ります。 空文字列に評価される EXPR を分割する場合、LIMIT での指定に関わらず 常に空のリス トが返ることに注意してください。 空文字列にマッチするパターン (ヌルパターン // と混同しないでください。 これは、空文字列に マッチするパターンの一つでしかありません) は、 どの場所にもマッチし、EXPR の値を1 文字ず つに分割します。 例えば: print join(':', split(/ */, 'hi there')); は、'h:i:t:h:e:r:e' という出力になります。 (以下略)まあいやらしいっちゃあいやらしい仕様ですねえ> LIMIT に与える値で変わる振る舞い
Is an open-source pacemaker safer than closed-source? - William Edwards, Coder Friday, May 11, 2012 Is an open-source pacemaker safer than closed-source? Richard Stallman recently collapsed; he's OK. But it did of course get attention in the programming world. For those not in the know, Richard - rms - is the leading light in the Free software movement (Free as in ownership, not free as in no-cost) and he really divides programmers into the camps - the minority who follow, the majority who admire without trying to understand, and the vocal minority dead against him. Now him collapsing raises an interesting question: if he needed a medical device that wasn't running Free software, would he use it? He answered a similar question once: (以下略)もし Stallman が不自由なソフトウェアで制御されている医療デバイスを必要とする事態になったら? で、どうなるかという仮定のお話
- Reading mruby by Yuichi Nishiwaki on Prezi
- [パクリの日本文学] 第1章 片岡麻実の「ネットと村上総裁とわたくし」:片岡麻実の「テクノロジーとリベラルアーツが出逢うとき」:ITmedia オルタナティブ・ブログ
- 頭がしびれるテレビ|NHK
- 他人にマインドマップを押し付けない 【 マインドマップ1年生 plus ライフハック! 】
- ハッシュテーブルの季節:柴田 芳樹 (Yoshiki Shibata):So-netブログ
一年間のプログラミング言語Java教育を行っていると、「ハッシュテーブルの季節」と私が呼んでいる時期が到来します。- 泳ぐやる夫シアター みんなでプロ野球12球団紹介スレ その65 牛島和彦物語
- po-ru.com: Ruby propaganda
- JITで関数呼び出し - 七誌の開発日記
- 開創法会事務局からのお知らせ[高野山真言宗 総本山金剛峯寺]
- Oxford Oberon-2 compiler - Spivey's Corner
- 人間よりも計算時間のかかる電卓
- mallocで確保したメモリをfree解放する必要 | OKWave
- 第一回 Kyoto.lisp - ぱたヘネ
- C言語 ダブルポインタを引数にもつAPI | OKWave
ダブルポインタなどと言うおかしな言葉を使わないで考えた方が良いでしょう。2012年05月12日
読書会後カレー
いぬ
■_ 可視化
日本の投手でこれやるとどんな感じになるか → Mariano Rivera's baseball prowess, illustrated with R | (R news & tutorials)
C++ じゃなくて C を使ったのは~というページに対する反応が活発に Why should I have written ZeroMQ in C, not C++ | Hacker NewsWhy should I have written ZeroMQ in C, not C++ : programming
こっちからもおもしろい(と思う)ものをピックアップしてみようかな。
■_ s
- 日本で開催されたLisp系イベント発表動画まとめ - NAVER まとめ
- 本の虫: TIOBE indexをみて考えた
- mathematical-systems/clml
CL Machine-Learning (CLML) は Common Lisp で書かれたハイパフォーマンスかつラージスケールな統計・機械学習パッケージです。- SchemeプログラマがCommon Lispでハマりそうなところ
- wrong, rogue and booklog - Learn Code The Hard Way -- Books And Courses To Learn To Code
ビデオの方も試しに買ってみるかなあ(隠れ Zed ファン)- legoboku.jp: 組み込みアジャイルコーチのJames Grenningさんが組み込みTDD読書会にやってきた!(あ、Skype会議だけどね
- 『オブジェクト指向JavaScript』を献本頂きました - rokujyouhitomaの日記
- 組込み技術とモバイル技術の違い - 人と技術のマッシュアップ
- the Histrory of LT and ドラ娘
channel9 の記事も結構翻訳して欲しいのあるんだよなあ (後ろ向き発言)。 いやまあ、PCに張り付いて動画再生見てるのがあまり好きじゃないってのがあるんだけど (それはいいPCを使っていないからかもしれない)。
Martin O. comments on Scala collections (Lang.NEXT 2012) : haskell Here is an excerpt from the Expert Panel discussion at Lang.NEXT 2012. This excerpt occur at approx. 16:40: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Panel-Web-and-Cloud-Programming "Erik M.: So, Martin, there has been a lot of comments about the Scala libraries where people say you need a Ph.D. to understand the types of, like, inserting into a collection. Martin O.: So I really have to say that nothing could be futher from the truth. You can pick up Scala collections in half an hour. It will make you much more productive than anything else. It's precisely what Java wants with Java 8, so essentially we have it all today. And the point is - so the thing that gets me so upset is that we made a really big break through is Scala that we could have this amazing ease of use in purely functional collections, and we did it with some pretty clever types. But the users never sees the types. So the types are essentially hidden. (略) Which I think is precisely the wrong way. We worked very hard to get the right way, and everyone says you need a Ph.D. to use it which is exactly the opposite from the truth because that we did it to make is easier, not harder." To the point that Martin makes at the end, how does Scala collections differ from the way collections are implemented in Haskell? (note - transcription and any errors are mine)The complexity of Scala's collections are an immediate result of the fact that they have to deal with the Liskov substitution principle as it applies to higher ordered types. This isn't something that you can resolve by better programming, the types are really just that complicated. Note that Martin didn't answer the question of Erik: He asserted that you don't need a PhD to use Scala's collections. What Erik asked was whether you needed a PhD to understand them. Personally, I don't think you quite need a PhD, but you need to spend a lot more time than you'd necessarily want learning about types, subtyping, and co and contravariance. You also have to deal with Scala's sort of nutty type level syntax. There's also the issue that the Scala collections library has gone for the kitchen sink approach. Regardless of whether you have a PhD or not, you're gonna end up spending a lot of time figuring out what the classes you want exactly are.結構興味深いやり取りも
2012年05月11日
1250トンを吊り上げる国内最大級のキャタピラ移動式クレーン「CC8800」同人誌 - アキバBlog を買ってみた。
Amazon.co.jp: まつもとゆきひろ コードの未来: まつもと ゆきひろ: 本 を発見したので購入(本来の発売日はまだです)。
■_ What makes programming languages really powerful?
プログラミング言語を本当に強力にするもの
What makes programming languages really powerful? | sembera's coding thoughts What makes programming languages really powerful? Posted by Lukáš Šembera on May 9, 2012 It is quite common to hear discussions in programmers' circles about how wonderful programming language X is because it has so cool features Y1, Y2, …, Yn and how unfortunate the programmers in Z (Z != X) must be because their language doesn't have them. I always do my best not to get involved because I don't find such discussions productive. Simply everyone should use tools which suit the needs best. However, I would like to have a think about what actually makes programming languages powerful and what only gives an impression of power. プログラミング言語 X にはとても cool な機能 Y1, Y2,…があるのでとてもすばらしく、 そういった機能を持たない (X 以外の) Z でプログラムするプログラマーがいかに不運であるかを プログラマー集まりで議論することはとてもよく耳にします。 わたしはそういった議論に巻き込まれないように常に注意をしています。 なぜならそういった議論は productive であるとは思えないからです。 ただ単に、誰もが必要なものに対して最も適切なツールを使うべきなのです。 しかしながらわたしは、プログラミング言語を強力にするもの、 an impression of power を与えるだけのものについて考えてみたいのです。 (略) Copyright © 2012 sembera's coding thoughts | Powered by WordPress and zBench■_ 火元
Why should I have written ZeroMQ in C, not C++ : programming やら Hacker news で結構盛り上がってます
Why should I have written ZeroMQ in C, not C++ - 250bpm Why should I have written ZeroMQ in C, not C++ Just to be clear from the very beginning: This is not going to be a Torvalds-ish rant against C++ from the point of view of die-hard C programmer. I've been using C++ whole my professional career and it's still my language of choice when doing most projects. Naturally, when I started ZeroMQ project back in 2007, I've opted for C++. The main reasons were: 2007年に ZeroMQ プロジェクトを始めたときには C++ を選択していました。 その主な理由には以下のものがありました Library of data structures and algorithms (STL) is part of the language. With C I would have to either depend on a 3rd party library or had to write basic algorithms of my own in 1970's manner. データ構造やアルゴリズムのライブラリ(STL) が言語の一部でした。 C を使った場合、サードパーティのライブラリに依存するか、さもなければ 1970年代のやり方でもって自分自身で基本的なアルゴリズムから書かなければなりませんでした。 C++ enforces some basic consistency in the coding style. For example, having the implicit 'this' parameter doesn't allow to pass pointer to the object being worked on using several disparate mechanisms as it often happens to be the case with C projects. Same applies to explicit marking of member variables as private and many other features of the language. C++ はコーディングスタイルにおけるいくつかの基本的な consistency を強制します。 たとえば、 オブジェクトへのポインターを渡すことが許されない暗黙の 'this' パラメータを持つことは メンバー変数を private として explicit にマーク付けすることや そのほかの言語機能も同様です。 This point is actually a subset of the previous one, but it's worth of explicit mention: Implementing virtual functions in C is pretty complex and tends to be slightly different for each class which makes understanding and managing the code a pain. この項目は実際にはひとつ前のもののサブセットですが、はっきり言及しておく価値があるでしょう。 C で仮想関数を実装することはとても複雑で、また、クラスごとにかなり異なるものとなる傾向があります。 それはコードの理解と管理を苦痛なものにしてしまいます。 And finally: Everybody loves destructors being invoked automatically at the end of the block. 最後に: ブロックの最後で自動的にデストラクターが起動されるのがみんな好きだった Now, almost 5 years later, I would like to publicly admit that using C++ was a poor choice and explain why I believe it is so. 5年経った今、C++ を使うという publicly admit は poor choice だったと考えています。 そこでなぜそのように考えているのかを説明します。 First, it's important to take into account that ZeroMQ was intended to be a piece of infrastructure with continuous uptime. If should never fail and never exhibit undefined behaviour. Thus, the error handling was of utmost importance. It had to be very explicit and unforgiving. C++ exceptions just didn't fill the bill. They are great for guaranteeing that program doesn't fail — just wrap the main function in try/catch block and you can handle all the errors in a single place. C++ の例外は単に fill the bill しません。 C++ の例外はプログラムが失敗しないということを満足するにはとても great です。 単に main 関数を try/catch ブロックでラップしてしまえば すべてのエラーを一箇所でハンドリングできます。 However, what's great for avoiding straightforward failures becomes a nightmare when your goal is to guarantee that no undefined behaviour happens. The decoupling between raising of the exception and handling it, that makes avoiding failures so easy in C++, makes it virtually impossible to guarantee that the program never runs info undefined behaviour. けれども、failures を straightforward に除去するのに great なそれは (ソフトウェアの)目標が未定義動作が生じることをなくすことである場合には悪夢となります。 例外の発生 (raising of the exception) とその処理を分離することは C++ で failures の除去をとても簡単にしてしまっています。 そして、プログラムが決して未定義動作に落ち込まないことを保証するのを 事実上不可能にしています。 (略) To summarise the above, I believe that requirement for fully-defined behaviour breaks the object-oriented programming model. The reasoning is not specific to C++. It applies to any object-oriented language with constructors and destructors. 以上のことをまとめると、fully-defined behaviour がオブジェクト指向プログラミングモデルを 壊してしまうとわたしは確信しているということです。 それは C++ に限ったものではありません。 コンストラクターとデストラクターを持ったオブジェクト指向言語すべてに言えることです。 Consequently is seems that object-oriented languages are better suited for the environments where the need for rapid development beats the requirement for no undefined behaviour. オブジェクト指向言語は未定義動作に対する requirement を beats する rapid development が必要とされる環境に対しては better suited なようだ というのが結論です。 There's no silver bullet here. The systems programming will have to live on with C. ここ(オブジェクト指向プログラミング?) には銀の弾丸はありません。 システムプログラミングは C とともになければならないでしょう。 By the way, I've started experimenting with translating Crossroads I/O, the fork of ZeroMQ that I am working on now, into C lately. The code looks great! Martin Sústrik, May 10th, 2012
- Linux Today - Richard Stallman falls ill at conference
- Pino by pfultz2
- PyPy Status Blog: STM update: back to threads?
- utf8everywhere.orgを読んで - Giraffe+の開発についてのブログ
- Twitter / @tri_iro: 【フォン・ノイマンのトリック】歪んだコイン(表裏の出 ...
- Amazon.co.jp: PDF構造解説: John Whitington, 村上 雅章: 本
- The Data Journalism Handbook - O'Reilly Media
- えっ、こんなものまで...今後数年以内に消えてしまいそうなIT技術を大予想! : ギズモード・ジャパン
- Jonathan Rasmusson さんインタビュー ( 前編 )
- Python for Data Analysis - O'Reilly Media
- 数学の面白さに目覚める!数学ガールガロア理論発売記念。結城浩さんにインタビュー。 - AppBank
- CoderDojo Tokyo #1 と創始者ジェームズ・ウェルトン氏来日のまとめ « A-Listers
- Google 辞めました - アスペ日記
- 良い教本というのはどういうのだろう:島国大和のド畜生
そんなわけで、C++やら、C#やら、javascriptやら用のこんにちはマイコンがあったら俺が買うので誰か描いてください。- C++Now! 2012に参加してきます - Faith and Brave - C++で遊ぼう
- HP製プリンタの詰め替えインクのスポンジがどんどん小さくなってきている - GIGAZINE
- InfoQ: Panel: Multicore, Manycore, and Cloud Computing
- InfoQ: Dealing with Performance Challenges - Optimized Data Formats
- [Database]LPI-JAPANの資料が恣意的な資料で情けなくなる
- wrong, rogue and booklog - これは第一線で活躍し続けるための唯一無二のアドバイスだと思う。テンプレ化できる。 ...
- hirax.net::日経BP『iPhone/iPadには”見えないデザイン”が込められてる』記事がホントかどうか検証してみた(エミュレータ編)
- Hexenkessel, 日本中、何百というチームを見てきたけど、 子供達を怒鳴り散らしている指導者ばかり。...
- サンディエゴの関数型兄貴達に会って来たよ - もりぐち!!!!
前々から気になっていた、「ClojureとClosureは実際違う発音なのか?」という事を聞いてみました。 さてさて、発音は同じなのか違うのか、驚くべき事実が明かされますよ!実は違いますよ! ホストのRonさんが言うには