並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 57件

新着順 人気順

Compilerの検索結果1 - 40 件 / 57件

  • 新刊『型システムのしくみ』の発売を4/18に予定しています

    ご来店ありがとうございます。新刊発売予定のお知らせです。 2025年4月18日(金)、遠藤侑介著『型システムのしくみ ― TypeScriptで実装しながら学ぶ型とプログラミング言語』の発売を予定しています。なお、2025年4月16日(水)から開催されるRubyKaigi 2025会場のBOOKSTOREにて、著者サイン会に合わせた先行発売を予定しています(紙書籍のみ。部数には限りがあります)。ジュンク堂池袋本店様でも4月16日から販売していただける予定です。 『型システムのしくみ』について 多くのプログラミング言語では、さまざまな場面で「型」が登場します。特に静的型付き言語では、プログラムを実行せずに潜在的な問題をあぶり出す「型検査」の有用性が広く知られるようになりました。最近では動的型付き言語でも、型ヒントや静的解析ツールとして、この機能を部分的に取り入れる動きがあります。 型検査の背

      新刊『型システムのしくみ』の発売を4/18に予定しています
    • 元Google植山 類の“実装力”の源をSakana AI・秋葉拓哉が探る「集団開発のしがらみに、個人開発で殴りこむ」 - エンジニアtype | 転職type

      moldを作ったのは「大学院の単位を取るため」だった 秋葉:植山さんと最初に接点を持ったのは、僕がマウンテンビューのMicrosoft Researchでインターンをしていた時だったと記憶しています。エンジニアならば誰が見ても驚くような開発を成し遂げ続けているので、ぜひ詳しくお話を聞きたいと思い対談のリクエストをさせていただきました。 植山:ありがとうございます。初めてお会いした当時から、秋葉さんはプログラミングコンテストの上位ランカーで実力があって、おまけに話も上手かった。なかなか直接関わる機会はなかったけど、時流に乗ってディープラーニングに着手して活躍しているという話はよく耳にしていました。 秋葉:確かに、植山さんと知り合った頃はまだディープラーニングには手を出していなかったですね。今ではAIへと専門領域を移して久しいので、振り返ると長い時間が経ちました。 今回は、個人の力で優れたプロ

        元Google植山 類の“実装力”の源をSakana AI・秋葉拓哉が探る「集団開発のしがらみに、個人開発で殴りこむ」 - エンジニアtype | 転職type
      • TypeScript の Go 移植に備えて知っておくべきこと

        はじめに こんにちは、ダイニーの ogino です。 TypeScript のコンパイラは今まで TypeScript で実装(セルフホスト)されていました。 それが TypeScript 7.0 から、Go による実装に移植され、10 倍高速になります。 本記事は、移植に関して筆者が疑問に感じた点を、GitHub discussion や TypeScript lead architect のインタビュー動画などから調べてまとめたものです。 移行の背景 今回 Go に移植される背景は、大規模な TypeScript コードベースをコンパイルする際のスピードの遅さにあります。 例えば VSCode のコードベース (150 万行) に対して tsc を実行すると、約 80 秒もかかります。 TypeScript のコンパイルは大きく以下の段階に分けられ、その内の check が特に複雑で重

          TypeScript の Go 移植に備えて知っておくべきこと
        • 型システムを知りたい人のための型検査器作成入門

          @ 関数型まつり2025(2025-06-14) https://fortee.jp/2025fp-matsuri/proposal/5699c262-e04d-4f58-a6f5-34c390f36d0d

            型システムを知りたい人のための型検査器作成入門
          • 最高の構文木の設計 2024年版

            Osaka RubyKaigi 04 https://regional.rubykaigi.org/osaka04/

              最高の構文木の設計 2024年版
            • TypeScriptのコンパイラをGo言語でネイティブ化、10倍速にした「TypeScript Native Previews」が公開

              TypeScriptのコンパイラをGo言語でネイティブ化、10倍速にした「TypeScript Native Previews」が公開 マイクロソフトは、TypeScriptのコンパイラを始め各種ツール群をGo言語に移植することでコンパイラの処理速度を10倍速にした新バージョンとなるTypeScriptのプレビュー版「TypeScript Native Previews」の公開を発表しました。 Today we're announcing previews of the native port of TypeScript! These nightly previews will be available on npm and the VS Code marketplace! npm install -D @​typescript/native-preview npx tsgo --vers

                TypeScriptのコンパイラをGo言語でネイティブ化、10倍速にした「TypeScript Native Previews」が公開
              • Announcing TypeScript Native Previews - TypeScript

                This past March we unveiled our efforts to port the TypeScript compiler and toolset to native code. This port has achieved a 10x speed-up on most projects – not just by using a natively-compiled language (Go), but also through using shared memory parallelism and concurrency where we can benefit. Since then, we have made several strides towards running on large complex real-world projects. Today, w

                  Announcing TypeScript Native Previews - TypeScript
                • マイクロソフト、TypeScriptのコンパイラなどをGo言語に移植することで10倍の処理速度に

                  マイクロソフトのテクニカルフェローで、TypeScriptのリードアーキテクトであるアンダース・ヘルスバーグ(Anders Hejlsberg)氏は、TypeScriptのコンパイラを始め各種ツール群をGo言語に移植する「Project Corsa」を実施中であり、結果としてコンパイラの処理速度などが約10倍速になることを明らかにしました。 これによりTypeScriptからJavaScriptへの変換が高速になり、コードエディタでTypeScriptを記述するときの補完や検索などのコードアシスト機能も迅速になるなど、さまざまな開発者体験が向上すると説明されています。 ヘルスバーグ氏はTurbo Pascalの作者であり、その後もDelphi、C#などの優れたプログラミング言語の開発に携わってきたことで知られています。 TypeScriptの処理速度やスケーラビリティに課題 TypeScr

                    マイクロソフト、TypeScriptのコンパイラなどをGo言語に移植することで10倍の処理速度に
                  • 自作インタープリターをJITコンパイルで高速化する

                    かねてよりJITコンパイラに興味があったので、実装してみました。 今回はフィボナッチ数を計算する関数に絞って、これを高速化することを考えます。 リポジトリ 対象のコード 独自言語ですが、まあ説明は不要でしょう。 再帰関数になっているfib関数を高速化します。 fun fib(n) do if (n == 0) do return 1; end if (n == 1) do return 1; end return fib(n - 1) + fib(n - 2); end インタープリターを作る まずは普通にインタープリターを作ります。今回はZig言語を使ってみることにしました。 (Zig歴がまだ3日くらいの頃に書いているので、コードは拙いです) 中身はただの、LexerとParserとEvaluatorを組み合わせただけのものです。 そして書いたインタープリターのパフォーマンスを計測してみ

                      自作インタープリターをJITコンパイルで高速化する
                    • C言語を学びたての人のための電卓自作

                      電卓を通じて、再帰下降構文解析を使った構文解析を行います。インタプリタ自作やコンパイラ自作の前段階として挑むとちょうど良いのではと思います。 ステップ1からステップ15まであります。ステップ1のファイルにどんどん加筆していくと、最終的に括弧を使った四則演算の式を解析できる電卓が出来上がります。各ステップは少しづつの書き換えだけで済むようになっています。 「大学に入ってからプログラミングを始めて、1年生でC言語を学んでいる」という人に向けて書きました。 「このステップは難しすぎる」「説明が分からない」「ここの説明は間違っている」等があれば、sou7まで連絡を頂けるとありがたいです。また、実装してみて「みてみて!電卓が実装できたよ!」というときにも連絡を頂けると嬉しいです。 参考実装はこちらにありますCommits · soukouki/c-calc · GitHub。ステップごとにコミットを

                      • 低レイヤを知りたいPHPerのためのCコンパイラ作成入門 完全版 / Building a C Compiler for PHPers Who Want to Dive into Low-Level Programming - Expanded

                        PHP Conference Japan 2025の資料です

                          低レイヤを知りたいPHPerのためのCコンパイラ作成入門 完全版 / Building a C Compiler for PHPers Who Want to Dive into Low-Level Programming - Expanded
                        • 自作Cコンパイラ 8時間の奮闘

                          2024-09-07 セキュリティキャンプ アフターイベント 2024-09-14 traP & Zli 合同LT で発表したスライドになります。

                            自作Cコンパイラ 8時間の奮闘
                          • 500行以内で自作言語作ってみた - Qiita

                            はじめに 昨今、Rustの登場によりプログラミング言語は複雑化しつつあります。(彼にRustを貶す意図はありません) この現状を打破するため、私は最高にシンプルで完璧な言語作りに取り組みました。(彼は冗談を言っています) 最終的に当初の目論見とはかけ離れた言語になりましたが、その過程で苦労したことなどを綴っていこうと思います。 完成品はこちらになります 一応GCCでコンパイルして実行すれば乱数生成器が動くようになっています。 https://github.com/sxclij/sxcscript 特徴 C言語かつ500行以内のソースコード。(C言語を触ったことのある人なら無茶振り度合いがわかってくれるはず...) 動的メモリ確保なし(多分)固定長配列最高! 3種類の記号で記述可能。(なんというシンプル! 使用ライブラリはfcntl.h,stdint.h,unistd.hのみ 500行で収め

                              500行以内で自作言語作ってみた - Qiita
                            • 型システムのしくみ ― TypeScriptで実装しながら学ぶ型とプログラミング言語

                              紙書籍をお届けします(PDFがついてきます) PDFのみ必要な場合は、こちらからPDF単体を購入できます 通常はご注文から2~3営業日で発送します。 年末年始や大型連休など、1週間から10日程度、配送のお休みをいただく場合があります。詳しくはお知らせをご覧ください。 型システムがようやくわかった! 遠藤侑介 著 184ページ A5判/1色刷 ISBN:978-4-908686-20-7 2025年4月15日 第1版第1刷 現代の開発環境では、エディタ上でコードを書いている最中から、実行もせずにエラーが判明することがあります。コードの補完でも、文脈に適した候補が魔法のように提示されてきます。こうした機能で中心的な役割を果たすのが「型システム」です。 では、なぜ型システムはプログラムのエラーを早期に発見したり、適切な補完候補を絞り出せたりするのでしょうか? 背景となる数学の理論を教科書で学ぶ以

                                型システムのしくみ ― TypeScriptで実装しながら学ぶ型とプログラミング言語
                              • tbsp - tree-based source-processing language

                                tbsp - tree-based source-processing language tbsp is an awk-like language that operates on tree-sitter syntax trees. to motivate the need for such a program, we could begin by writing a markdown-to-html converter using tbsp and tree-sitter-md [0]. we need some markdown to begin with: # 1 heading content of first paragraph ## 1.1 heading content of nested paragraph for future reference, this markdo

                                • WebAssemblyに特化した言語「MoonBit」のコンパイラがGitHubで公開

                                  WebAssemblyに特化したプログラミング言語「MoonBit」のコンパイラが、GitHubで公開されたことを、開発元である中国広東省深セン市にある研究組織「International Digital Economy Academy (IDEA)」が発表しました。 Today is the day! The MoonBit compiler is now publicly available on GitHub! After 2 years of private development, we’re ready to build an open, collaborative community around MoonBit.https://t.co/M8y3e9rkn2 pic.twitter.com/BbJRLf7Vnm — MoonBit (@moonbitlang) Decemb

                                    WebAssemblyに特化した言語「MoonBit」のコンパイラがGitHubで公開
                                  • Porffor

                                    An ahead-of-time JavaScript compiler Porffor compiles JavaScript ahead-of-time to WebAssembly and native binaries. It is currently in pre-alpha with usability beginning in 2025. JS -> Wasm Porffor's WebAssembly output is 10-30x smaller and faster compared to existing JS -> Wasm projects as Porffor compiles JS instead of bundling an interpreter in the Wasm output. JS as Wasm allows for sandboxed ex

                                    • GitHub - drogus/jawsm: JavaScript to WASM compiler

                                      I started this project while working on a stress testing tool called Crows that runs WebAssembly scenarios. At the moment it only supports code compiled from Rust to WASM. As much as I love writing Rust, I also know it's not a widely popular language and besides, small tests are often easier to write in interpreted languages. The problem is, running scripting languages on top of WASM is not ideal

                                        GitHub - drogus/jawsm: JavaScript to WASM compiler
                                      • Beating the compiler

                                        In modern times, everyone knows that writing assembly is a fool's errand: compilers are the result of literal engineer-centuries of work, and they know the processor much better than you do. And yet – one hears rumors. Written in ancient tomes, muttered in quiet watering holes, scrawled on the walls of bygone temples, hinted at by mysterious texts; the rumors paint a specific picture: Compilers ar

                                        • Swiftコンパイラ開発入門

                                          背景 SwiftコンパイラがOSSになってから随分と年月が経ち改善が進んだことで、コンパイラ開発に参加しやすくなってきています。一方で、開発チームが多忙なためなのか、issueを報告しても対応されない状況が続いています。そのため、Swiftユーザが自らパッチを提出する必要性が高まっています。 想定読者 そこでこの記事では、一般的なSwiftユーザの方向けに、Swiftコンパイラの開発を始めるためのノウハウや手順を解説します。こうすることで読者が自らパッチを提出できるようになり、Swiftコンパイラの改善が加速するでしょう。そして、全てのSwiftユーザがその恩恵を受けることでしょう。 なお、マシンはほどほどのスペックのmacを前提とします。また、Apple Siliconを推奨し、記事中ではそれを前提とします。Intelの方は適宜読み替えてください。 手元の環境構築 まずは手元のマシンの環

                                            Swiftコンパイラ開発入門
                                          • GitHub - keyvank/30cc: 30 C Compiler

                                            30cc (Pronounced as CCC, because in the Persian language, the number 30 is pronounced as C) is a toy C compiler written in C, which is strong enough to compile itself 🤝 This was my first attempt in writing a self-hosting software! What is a self-hosting software? Imagine 30cc gets strong enough to be able to compile itself. I will first compile 30cc with gcc to get the 30cc compiler's binary. I w

                                              GitHub - keyvank/30cc: 30 C Compiler
                                            • gccrs: An alternative compiler for Rust | Rust Blog

                                              Nov. 7, 2024 · Arthur Cohen on behalf of the gccrs project This is a guest post from the gccrs project, at the invitation of the Rust Project, to clarify the relationship with the Rust Project and the opportunities for collaboration. gccrs is a work-in-progress alternative compiler for Rust being developed as part of the GCC project. GCC is a collection of compilers for various programming languag

                                                gccrs: An alternative compiler for Rust | Rust Blog
                                              • Lightstorm: minimalistic Ruby compiler

                                                Some time ago I was talking about an ahead-of-time Ruby compiler. We started the project with certain goals and hypotheses in mind, and while the original compiler is at nearly 90% completion, there are still those other 90% that needs to be done. In the meantime, we decided to strip it down to a bare minimum and implement just enough features to validate the hypotheses. Just like the original com

                                                • TB

                                                  Tilde, my LLVM alternative I'm Yasser and I've made it my mission to produce an alternative to LLVM, the current king of compiler backend libraries. I'm calling it Tilde (or TB for tilde backend) and the reasons are pretty simple, i believe it's far too slow at compiling and far too big to be fixed from the inside. It's been 20 years and cruft has built up, time for a "redo". As a test case i wrot

                                                  • Ruby は String をメモリ上でどのように扱っているのか? | IIJ Engineers Blog

                                                    電子メール、ネットワーク機器集中管理、異常検知、分散処理、クラウド基盤などのシステム開発に従事。古代Rubyist。 先日、 Ruby (CRuby) が String をメモリ上でどのように扱っているのか気になって調べていました。そこで String の構造体やメモリの扱いとその変遷が興味深いと思ったので、ちょっとまとめてみました。 Ruby のオブジェクトのデータ構造 まず前提知識として、そもそも Ruby が C の世界でオブジェクトをどのようなデータ構造で持っているかをざっくりおさらいします。 VALUE 型 Ruby の内部ではオブジェクトを VALUE 型という型の変数で取り扱っています。 // include/ruby/internal/value.h typedef unsigned long VALUE; 宣言の通り VALUE 型の実体は unsigned long で

                                                      Ruby は String をメモリ上でどのように扱っているのか? | IIJ Engineers Blog
                                                    • GitHub - aspizu/goboscript: goboscript is the Scratch compiler

                                                      Installation and documentation goboscript is a text-based programming language that compiles to Scratch. Write Scratch projects in text, and compile it into a .sb3 file -- which can be opened in the Scratch editor, TurboWarp or be uploaded to the Scratch website. goboscript makes developing advanced Scratch projects FAST. goboscript syntax is concise and easy to read. Use a version-control system

                                                        GitHub - aspizu/goboscript: goboscript is the Scratch compiler
                                                      • Common Misconceptions about Compilers

                                                        Don't want to miss any updates? You can follow this RSS feed or sign up for my newsletter: Compilers have always been surrounded by an air of mystery and magic. This has led many of us to believe that they do things (well) that they don't, or that they don't do things (well) that they do.1 In this article is one some way a follow-up of a previous one on compiler optimization. Here, I've collected

                                                          Common Misconceptions about Compilers
                                                        • leontrolski - adding Python syntax

                                                          ⇦ 2024-10-17 Adding syntax to the cpython interpreter Condensed version of this cool blog post. Let's add some new syntax to Python! Making a small change is not so hard. Our aim is to make ternary statements default to None as they do in Ruby: >>> "hello" if 2 + 2 == 4 "hello" >>> "hello" if 2 + 2 == 5 None In existing Python, we get an error: File "<python-input-0>", line 1 "hello" if 2 + 2 == 5

                                                          • Home - Playing with code

                                                            TinyCompiler: a compiler in a week-end Introduction Have you ever wondered how a compiler works, but you never found courage to find out? Then this series of articles is for you. I have never had the chance to look under the hood either, but one week-end I have decided to to write a translator from the esoteric programming language wend (short for week-end), which I just invented myself, into regu

                                                            • Going REPLing with Haskeline

                                                              October 31, 2024 A twenty-six minute read 10 💬 4 🗣️ ❤️ 14 🔁 Tags: programmingprogramming-languagesinterpretershaskell So you went ahead and created a new programming language, with an AST, a parser, and an interpreter. And now you hate how you have to write the programs in your new language in files to run them? You need a REPL! In this post, we’ll create a shiny REPL with lots of nice features

                                                                Going REPLing with Haskeline
                                                              • GitHub - sef-computin/rubyk: RubyK - TinyRuby compiler

                                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                  GitHub - sef-computin/rubyk: RubyK - TinyRuby compiler
                                                                • GitHub - mazeppa-dev/mazeppa: A modern supercompiler for call-by-value functional languages

                                                                  Supercompilation 1 is a program transformation technique that symbolically evaluates a given program, with run-time values as unknowns. In doing so, it discovers execution patterns of the original program and synthesizes them into standalone functions; the result of supercompilation is a more efficient residual program. In terms of transformational power, supercompilation subsumes both deforestati

                                                                    GitHub - mazeppa-dev/mazeppa: A modern supercompiler for call-by-value functional languages
                                                                  • Why I love Rust for tokenising and parsing

                                                                    Nov 4, 20243931 Words19 Minute readTable of Contents I am currently writing a analysis tool for Sql: sqleibniz, specifically for the sqlite dialect. The goal is to perform static analysis for sql input, including: syntax checks, checks if tables, columns and functions exist. Combining this with an embedded sqlite runtime and the ability to assert conditions in this runtime, creates a really great

                                                                    • GitHub - xqb64/ucc: An optimizing compiler for a large subset of the C programming language

                                                                      You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                        GitHub - xqb64/ucc: An optimizing compiler for a large subset of the C programming language
                                                                      • Reflections on 2 years of CPython’s JIT Compiler: The good, the bad, the ugly

                                                                        Reflections on 2 years of CPython’s JIT Compiler: The good, the bad, the ugly 5 July 2025 This blog post includes my honest opinions on the CPython JIT. What I think we did well, what I think we could have done better. I’ll also do some brief qualititative analysis. I’ve been working on CPython’s JIT compiler since before the very start. I don’t know how long that is at this point … 2.5, maybe alm

                                                                        • Land ahoy: leaving the Sea of Nodes · V8

                                                                          V8’s end-tier optimizing compiler, Turbofan, is famously one of the few large-scale production compilers to use Sea of Nodes (SoN). However, since almost 3 years ago, we’ve started to get rid of Sea of Nodes and fall back to a more traditional Control-Flow Graph (CFG) Intermediate Representation (IR), which we named Turboshaft. By now, the whole JavaScript backend of Turbofan uses Turboshaft inste

                                                                          • GitHub - yassinebenaid/bunster: Compile shell scripts to machine code.

                                                                            Have you ever wished your shell scripts could be faster, more portable, and secure ? Bunster brings this to life by transforming your shell scripts into efficient, standalone binaries that are easy to distribute and deploy across platforms (only unix is supported at the moment). Unlike other tools, Bunster doesn’t just wrap your scripts in a binary—it compiles them down to efficient native machine

                                                                              GitHub - yassinebenaid/bunster: Compile shell scripts to machine code.
                                                                            • Garbage collection and closures

                                                                              Me, Surma, and Jason were hacking on a thing, and discovered that garbage collection within a function doesn't quite work how we expected. function demo() { const bigArrayBuffer = new ArrayBuffer(100_000_000); const id = setTimeout(() => { console.log(bigArrayBuffer.byteLength); }, 1000); return () => clearTimeout(id); } globalThis.cancelDemo = demo(); With the above, bigArrayBuffer is leaked fore

                                                                                Garbage collection and closures
                                                                              • Rust's incremental compiler architecture [LWN.net]

                                                                                The traditional structure of a compiler forms a pipeline — parsing, type-checking, optimization, and code-generation, usually in that order. But modern programming languages have requirements that are ill-suited to such a design. Increasingly, compilers are moving toward other designs in order to support incremental compilation and low-latency responses for uses like integration into IDEs. Rust ha

                                                                                • Compiling to Assembly from Scratch

                                                                                  Have you been trying to learn how compilers and programming languages work? Then come along! Let’s make a compiler that goes all the way from source to assembly from scratch—no shortcuts! This book will teach you enough compiler theory and assembly programming to get going. It uses a subset of TypeScript that reads like pseudocode and targets ARM 32-bit instruction set. Table of Contents Introduct