A compiler translates a program written in a high level language into a program written in a lower level language. For students of computer science, building a compiler from scratch is a rite of passage: a challenging and fun project that offers insight into many different aspects of computer science, some deeply theoretical, and others highly practical. This book offers a one semester introductio
Temporal Dead Zone とは ECMAScript 2015で採用された let/const のスコーピングの仕様をTemporal Dead Zoneと呼びます。 const x = "outer"; { const f = () => x; // console.log(f()); // => Error const x = "inner"; console.log(f()); // => "inner" } 4つの方式 Temporal Dead Zone という名前は、ブロックスコープ変数の挙動を決める際の4つの候補の名前に由来しているようです。 これはECMAScript 4が放棄されて間もない2008年10月のes-discussのログ[1]に言及があります。 A1. Lexical dead zone. References textually prior to
Parsing made simple. Tokay is a programming language designed for ad-hoc parsing. Welcome to the Tokay programming language project website. This is the best place to start learning more about Tokay's features and usage Tokay is a very young project and gains much potential. Volunteers are welcome!
Most people use the mattn/go-sqlite3 package to interact with SQLite in Go. This package uses cgo and bundles the SQLite C amalgamation files with the Go source. But Go developers often prefer not to use cgo (see for example cgo is not go). I mention this because there happens to be an underrated translation of SQLite's C source code to Go. Since it is a translation of C to Go, you don't need to u
May 11, 2022This is a deep dive into the land of async rust. Get a drink, grab a snack, because this is going to be a long one. What the Async? ¶ Async code exists to allow a programming language to offer more control in the way that code can run concurrently. A famous example of an async programming language is JS, which can only execute code using 1 thread, but still needs to support allowing mu
If you peruse the archives of language-summit blogs, you’ll find that one theme comes up again and again: the dream of Python without the GIL. Continuing this venerable tradition, Sam Gross kicked off the 2022 Language Summit by giving the attendees an update on nogil, a project that took the Python community by storm when it was first announced in October 2021. The GIL, or “Global Interpreter Loc
(*)が付いている材料は、コア数分用意できると性能がアップします。 シンプルなProducer-Consumerパターン スレッドを1本だけ使うパターンから紹介します。特に小細工する必要も無いので実装もシンプルになります。 メインスレッドから非同期に実行して欲しい処理をワーカースレッドのキューに積む ワーカースレッドはキューから処理を取り出して実行する 生産者(Producer)・消費者(Consumer)パターンと呼ばれる、非常に古典的なデザインパターンの1つです。 コードにするならこんな感じ。 #include <condition_variable> #include <deque> #include <functional> #include <mutex> #include <thread> class worker { public: worker() : thread_([t
クラウド上でゲームを動かす場合、データ(ゲーム本体のデータ・セーブデータ)をどう管理するかは重要な課題のひとつだ。 そこで、自分が開発に携わっているOOParts のデータ管理を支える技術について紹介する。 ノベルゲームのセーブ事情 OOPartsで提供されているのは主にビジュアルノベルゲームで、セーブデータの形式や場所は実に多種多様である。 ゲーム本体と同じディレクトリにセーブデータを保存するゲームもあれば、ユーザーディレクトリ(マイドキュメント等)以下に保存するゲームもある。 とにかく様々な保存方式があるため複数メーカーのゲームを提供するとなると セーブデータの場所を機械的に特定できない。 唯一言えるのはほとんどのゲームはセーブデータをファイルに保存しているということぐらいだ。 ゲームタイトル毎に設定を持ち、「ゲームAのセーブデータは〇〇で、ゲームBのセーブデータは〇〇で…」とすれば不
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く