『シン・ゴジラ』は僕のツボにはまったんですよね。コワ面白かった! 最近、もうひとつ「これは面白い!」と思っていることがあります。微分幾何の応用の話です。多くの人が「応用」という言葉から連想する内容とはちょっと違います。微分幾何を換骨奪胎して、その枠組を、微分とも幾何ともまったく無関係と思える分野にも適用するのです。 「微分とも幾何ともまったく無関係と思える分野」には、コンピュータ科学や組み合わせ論が含まれます。これには驚きました。好奇心を刺激されて、しばらく猿になって調べまくってました。 調べても理解できないことがたくさんあるので、断片的で中途半端な知識を推測(妄想?)でつなぎ合わせるという手法(いつものやり口)で語ってみます。圏と多様体の定義くらいは仮定しますが、それ以外の知識は要求しないオハナシ調です。 内容: リソース計算が微分計算だってぇぇ?! 微分の計算が出来る圏 組み合せ論とデ
It is the moment you have all been waiting for!...ish. I am sticking one toe in the water and putting out a very, very unpolished release of the very first version of the engine (the isometric engine, which differs from what I previously said I would release first, due to demand). Other versions are to follow. It was a fair amount of work to prep just this release, as unpolished as it is. And ther
I’m very excited to announce a project that has been a long time in the making. Tokio is a network application framework for rapid development and highly scalable deployments of clients and servers in the Rust programming language. It strives to make writing robust, scalable, and production ready network clients and servers as easy as possible. It does this by focusing on small and reusable compon
Key takeaways The traits in std::convert provide a uniform API for converting values to other types From<T> and Into<U> are for conversions that cannot fail and consume the original value From<T> for U converts a value of type T into one of type U Into<U> for T inverts From<T>’s subject-object relationship Implementing From<T> for U gives us an automatically derived Into<U> for T implementation Tr
Aug 03, 2016 (updated on Nov 01, 2016) No longer updated! You are viewing the a post of the first edition of “Writing an OS in Rust”, which is no longer updated. You can find the second edition here. In this post, we explore exceptions in more detail. Our goal is to print additional information when an exception occurs, for example the values of the instruction and stack pointer. In the course of
コンピュータ上で実数を表現する際には浮動小数点数を使うのですが、浮動小数点数の計算では誤差が発生します。 簡単な例を見てみます。 #include <cstdio> int main(void) { float a = 0.0; for(int i=0; i<10000; ++i) a += 0.01; printf("%.10f\n", a); } という0.01を10000回足すプログラムを実行すると結果は100.0029525757となり、期待される100.000000000に比べて0.003ほどの誤差が発生しています。 浮動小数点数計算での誤差を抑える一番簡単な方法はfloatではなくdoubleなどのより精度の高い型を使って計算精度を上げることですが、どうしても限界はあります。 他にも問題ごとにテクニックは存在しますが、誤差を完全に無くすことはできません。 正確な計算のためには誤
Gradient descent is a standard tool for optimizing complex functions iteratively within a computer program. Its goal is: given some arbitrary function, find a minumum. For some small subset of functions - those that are convex - there's just a single minumum which also happens to be global. For most realistic functions, there may be many minima, so most minima are local. Making sure the optimizati
はじめに 『Servoにおける単位系の静的チェック』という記事を読んでから、これを実現する方法がずっと気になっていたのだが、現状、 std::marker::PhantomData についての日本語文献が見当たらないので、メモ書きとして本稿を描いた次第である。 なお、使用したコンパイラのバージョンは rustc 1.10.0 (cfcb716cf 2016-07-03) 。 Phantom Type (幽霊型) について 幽霊型とは、型検査を利用したデザインパターンの一つ。インスタンスの状態を数値や文字列といった実際の値として持つのではなく、型パラメータとして持つことで状態の検査を実行時ではなくコンパイル時に行う。実行時にはこのパラメータが存在しないことから幽霊型と呼ばれる。(2016年9月2日訂正)改めて調べてみたところ、見た目上は現れない制約を付与するところがあたかも幽霊のようであるこ
Computer science, programming, and whatnot. Writing a JPEG decoder in Rust - Part 1: Background In the past months I have spent the evenings and weekends on a little project:a JPEG decoder and encoder, written in Rust. First, I should drop a little disclaimer: at the time I'm writing this post, I have successfully decoded multiple test images, but these are fairly standard type images, so more exo
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く