academic, developer, with an eye towards a brighter techno-social life [prev] [next] 2022-07-04 Your next C compiler is a D compiler: Introducing DMD's ImportC In my never ending quest to have oksh support every C compiler in existence, I sometimes find C compilers in places you wouldn't expect them. Today, I'd like to demonstrate the C compiler built into the Digital Mars D compiler, or DMD for s
Ownership and Borrowing in D – The D Blog を 許可を得て 翻訳しました。 誤訳等あれば気軽に Pull requestを投げてください。 ほとんどのプログラムはメモリを確保し、管理します。 プログラムが複雑になり、失敗がより大きな損害を引き起こすようになるにつれて、 メモリ管理を正しく行うことはますます重要になってきています。 一般的には以下のような問題があります。 メモリリーク(使っていないメモリを解放しない)二重フリー(複数回メモリを解放する)use-after-free(すでに開放されたメモリを参照する)問題は、どのポインタがメモリを解放する責任を持つか(つまり、メモリを所有しているか)、 どのポインタがメモリを参照しているか、どれが(スコープ内で)アクティブかです。 一般に以下のような解決策があります。 ガベージコレクション(Garbage
I’ve recently completed an overhaul of the graphics package of my D library. The goals for the overhaul were inspired by D’s std.algorithm and std.range modules: Present everything as small, composable components Avoid implicit copying and prefer lazy evaluation Use templates for efficient code From its first iteration, all components of the image processing package were templated by the color typ
Pragmatic D Tutorial¶ This is a pragmatic introduction to the D Programming Language. Audience¶ While the goal is to be generic, there are a few assumptions about you, the reader. You can program already. This is not a general tutorial to learn programming. You should know the basics like variables, if-statements, pointers and functions. You can use a command line interface. This tutorial covers c
Currently we allow the following HTML tags in comments: Single tags These tags can be used alone and don't need an ending tag. <br> Defines a single line break <hr> Defines a horizontal line Matching tags These require an ending tag - e.g. <i>italic text</i> <a> Defines an anchor <b> Defines bold text <big> Defines big text <blockquote> Defines a long quotation <caption> Defines a table caption <c
mruby という軽量 Ruby 実装を使うと、D言語のソースコード内に Ruby が書けます。 // dmd 2.063 extern (C) { struct mrb_state; mrb_state* mrb_open(); void mrb_close(mrb_state*); void mrb_load_string(mrb_state*, const char*); } void main() { auto mrb = mrb_open(); scope (exit) mrb_close(mrb); auto source = "puts (1..100).map {|n| f = n % 3 == 0 b = n % 5 == 0 if f || b ((f)? 'fizz': '') << ((b)? 'buzz': '') else n.to_s end }"; mrb_
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く