並び順

ブックマーク数

期間指定

  • から
  • まで

561 - 589 件 / 589件

新着順 人気順

ProgrammingLanguageの検索結果561 - 589 件 / 589件

  • データ型 - The Rust Programming Language 日本語版

    では、どの整数型を使うべきかはどう把握すればいいのでしょうか?もし確信が持てないのならば、 Rustの基準型は一般的にいい選択肢になります。整数型の基準はi32型です: 64ビットシステム上でも、 この型が普通最速になります。isizeとusizeを使う主な状況は、何らかのコレクションにアクセスすることです。 浮動小数点型 Rustにはさらに、浮動小数点数に対しても、2種類の基本型があり、浮動小数点数とは数値に小数点がついたもののことです。 Rustの浮動小数点型は、f32とf64で、それぞれ32ビットと64ビットサイズです。基準型はf64です。 なぜなら、現代のCPUでは、f32とほぼ同スピードにもかかわらず、より精度が高くなるからです。 実際に動作している浮動小数点数の例をご覧ください: ファイル名: src/main.rs fn main() { let x = 2.0; // f6

    • discussion: spec: reduce error handling boilerplate using ? · golang/go · Discussion #71460

      This is a discussion about a new syntax that may be used to handle errors. This is issue #71203 converted into a discussion. I've written a tool that converts ordinary Go code into code that uses the syntax from the proposal at #71203. That tool is available at https://go.dev/cl/643996. In order to build and use it you must first apply the changes in the patch series ending at https://go.dev/cl/64

        discussion: spec: reduce error handling boilerplate using ? · golang/go · Discussion #71460
      • GitHub - hylo-lang/hylo: The Hylo 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 - hylo-lang/hylo: The Hylo programming language
        • Why I like Tcl

          • Lila: a Lil Interpreter in POSIX AWK

            Lila: a Lil Interpreter in POSIX AWK AWK is among the most ubiquitous programming languages in the world. Much like ed, the standard text editor, awk is a mandatory component of any POSIX operating system. On a fresh-out-of-the-box Mac, tunneling into the embedded Linux environment on your router, or scrabbling away at GitBash on a Windows machine, you may not have access to Python, Perl, or even

            • never型があると便利か(言語処理系実装者の観点から) | 雑記帳

              TypeScriptをはじめとするいくつかのプログラミング言語には、never型という型がある。この型は典型的には「制御を返さない関数」の返り値として使われる: function f(x: string): never { console.error(x); throw new Error(); } never型は型システム的には「値を持たない型」「任意の型の部分型」として特徴づけられる。 他のプログラミング言語、例えば私が作っているLunarMLにもnever型があると便利だろうか? 前提:部分型はゼロコストで変換できて欲しい これは私の意見だが、部分型から上位型へはゼロコストで変換できて欲しい。例えば Sub <: Super という関係があった時に、Sub 型の値をゼロコストで Super 型へ変換できて欲しいのはもちろん、関数型についても A -> Sub から A -> Supe

              • GitHub - kparc/ksimple: k/simple is a bare minimum k interpreter for learning purposes by arthur whitney

                in early january 2024, a group of motivated individuals asked arthur whitney to demonstrate the fundamentals of the design, organization and style of his method of writing interpreters in c in the most succinct and approachable way. about a day later, arthur offered a tiny interpreter of a toy vector language, implemented in about 25 lines of c with a small header file. his code is published in th

                  GitHub - kparc/ksimple: k/simple is a bare minimum k interpreter for learning purposes by arthur whitney
                • GitHub - robhagemans/pcbasic: PC-BASIC - A free, cross-platform emulator for the GW-BASIC family of interpreters

                  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 - robhagemans/pcbasic: PC-BASIC - A free, cross-platform emulator for the GW-BASIC family of interpreters
                  • A Brief Introduction to Esoteric Languages

                    It’s implementation-defined what happens if you decrement a 0 cell or move the pointer past the last cell. Every compiler and runtime would make its own decisions. Every other symbol is a noop, which 1) makes brainfuck relatively easy to comment, and 2) means you can secretly embed brainfuck programs in other language programs (multicoding). Brainfuck is in the class of “Turing tarpits”, languages

                    • MacにGoをインストールしてVScodeで開発環境を作る

                      そろそろしっかり手をつけていった方がいいかな? という感覚を持っているプログラミング言語はGoogleが設計したGo(Go言語、Golang)かなと思っています。(根拠はありませんw まあ、Googleなのでという感覚かな?) 日本ではまだすごく盛り上がってるわけでは無いかなぁという感じですけど、ちょこっとは「その時のために」かじっておきたいという感じです。 ということで、私のMac環境にもGoをインストールしていこうと思います。エディタはVScodeを使おうと思います。(ついでにアンインストール方法までやっておきます) MacにGoをインストールする MacにGoをインストールしていきます。Homebrewを使ってもいいのでしょうけど、今回はGoの公式サイト( https://golang.org/ )からインストーラーをダウンロードしてインストールしようと思います。 golang.or

                        MacにGoをインストールしてVScodeで開発環境を作る
                      • Type Inference Zoo

                        Interactive PlaygroundTry out type inference examples and explore various algorithms directly in the browser. Hands-on experience made simple. Unified Syntax and ImplementationA consistent syntax across multiple type inference algorithms—no need to waste time building new parsers or pretty printers.

                        • bisonとflexで自作パーサーを作る

                          前回の続編 前回は、再帰下降法を用いてC言語の数式パーサーを作りました。 再帰下降法でC言語数式パーサーもどきを作ってみる 今回は、bisonとflexを用いて同様のパーサーを作成します。再帰下降法と異なり簡単に字句解析・構文解析が行えるのが特徴です。 ソース一式 今回作成したソースはGistに載せておきます。 flex(The Fast Lexical Analyzer) flexとはlexの上位互換版になります。lexは字句解析ルーチンを生成します。flexはlexよりも少ない時間でテーブルを生成できつつ、効率の良いテーブルとなっています。 bison bisonとはyaccの上位互換版です。bisonは文脈自由文法の仕様を入力として、その文法を解析するためのC言語の関数を生成します。ここではC言語を用いているためC言語関数を生成しますが、Pythonなどのbisonを使用すればPyt

                            bisonとflexで自作パーサーを作る
                          • Adding row polymorphism to Damas-Hindley-Milner

                            Intro to HM Damas-Hindley-Milner (HM) is a type system for Standard ML and the ML-family languages. River and I wrote about it earlier this month. Check out that post if you would like an introduction or refresher. In this post, we’ll add row polymorphism to it. We’ll do it in the context of scrapscript’s implementation of Algorithm J, but the core ideas should be language and algorithm-independen

                            • GitHub - subsetpark/pantagruel: A program specification language with a formal syntax and ad-hoc semantics.

                              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 - subsetpark/pantagruel: A program specification language with a formal syntax and ad-hoc semantics.
                              • GitHub - e-n-f/if-then-else: !!Con West 2019 talk

                                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 - e-n-f/if-then-else: !!Con West 2019 talk
                                • GitHub - iczelia/malbolge-lisp: A lightweight (350MB) Lisp interpreter in Malbolge Unshackled, often dubbed the hardest turing complete 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 - iczelia/malbolge-lisp: A lightweight (350MB) Lisp interpreter in Malbolge Unshackled, often dubbed the hardest turing complete programming language.
                                  • 状態共有並行性 - The Rust Programming Language 日本語版

                                    状態共有並行性 メッセージ受け渡しは、並行性を扱う素晴らしい方法ですが、唯一の方法ではありません。 Go言語ドキュメンテーションのスローガンのこの部分を再び考えてください: 「メモリを共有することでやり取りする。」 メモリを共有することでやり取りするとはどんな感じなのでしょうか?さらに、 なぜメッセージ受け渡しに熱狂的な人は、それを使わず、代わりに全く反対のことをするのでしょうか? ある意味では、どんなプログラミング言語のチャンネルも単独の所有権に類似しています。 一旦チャンネルに値を転送したら、その値は最早使用することがないからです。 メモリ共有並行性は、複数の所有権に似ています: 複数のスレッドが同時に同じメモリ位置にアクセスできるのです。 第15章でスマートポインタが複数の所有権を可能にするのを目の当たりにしたように、 異なる所有者を管理する必要があるので、複数の所有権は複雑度を増さ

                                    • スレッドを使用してコードを同時に走らせる - The Rust Programming Language 日本語版

                                      スレッドを使用してコードを同時に走らせる 多くの現代のOSでは、実行中のプログラムのコードはプロセスで走り、OSは同時に複数のプロセスを管理します。 自分のプログラム内で、独立した部分を同時に実行できます。これらの独立した部分を走らせる機能をスレッドと呼びます。 プログラム内の計算を複数のスレッドに分けると、パフォーマンスが改善します。プログラムが同時に複数の作業をするからですが、 複雑度も増します。スレッドは同時に走らせることができるので、異なるスレッドのコードが走る順番に関して、 本来的に保証はありません。これは例えば以下のような問題を招きます: スレッドがデータやリソースに矛盾した順番でアクセスする競合状態 2つのスレッドがお互いにもう一方が持っているリソースを使用し終わるのを待ち、両者が継続するのを防ぐデッドロック 特定の状況でのみ起き、確実な再現や修正が困難なバグ Rustは、ス

                                      • メッセージ受け渡しを使ってスレッド間でデータを転送する - The Rust Programming Language 日本語版

                                        メッセージ受け渡しを使ってスレッド間でデータを転送する 人気度を増してきている安全な並行性を保証する一つのアプローチがメッセージ受け渡しで、 スレッドやアクターがデータを含むメッセージを相互に送り合うことでやり取りします。 こちらが、Go言語のドキュメンテーションのスローガンにある考えです: 「メモリを共有することでやり取りするな; 代わりにやり取りすることでメモリを共有しろ」 メッセージ送信並行性を達成するためにRustに存在する一つの主な道具は、チャンネルで、 Rustの標準ライブラリが実装を提供しているプログラミング概念です。プログラミングのチャンネルは、 水の流れのように考えることができます。小川とか川ですね。アヒルのおもちゃやボートみたいなものを流れに置いたら、 水路の終端まで下流に流れていきます。 プログラミングにおけるチャンネルは、2分割できます: 転送機と受信機です。転送機

                                        • The jank programming language

                                          Intro Hi everyone! I’m Jeaye Wilkerson, creator of the jank programming language. jank is a dialect of Clojure which I’ve been working on for around eight years now. To start with, jank was an exploration of what my ideal programming language would be. Coming from a background of systems programming and game development, I was very comfortable with C++, but I also was exploring the world of functi

                                          • Python の基本 - Python 入門

                                            ここまでお読みいただき、誠にありがとうございます。SNS 等でこの記事をシェアしていただけますと、大変励みになります。どうぞよろしくお願いします。

                                              Python の基本 - Python 入門
                                            • Type Safe Variadic printf

                                              While C can provide "convenient" string formatting by having hideously unsafe variadics, and dynamic languages, like python, can do the same, many type safe languages, such as Rust, are forced to provide such functionality through the use of a macro. Dependently typed languages, like Idris, can provide a printf like formatting interface, while maintaining both memory and type safety, without the n

                                              • GitHub - moonbitlang/moonbit-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 - moonbitlang/moonbit-compiler
                                                • Redirect

                                                  Click here to be redirected.

                                                    Redirect
                                                  • 自作言語でセルフホストしてみた - Qiita

                                                    はじめに 自作言語でセルフホストできたので,やったこと,考えたこと,得たこと,思ったことなどをまとめました. きっかけなど 「低レイヤを知りたい人のためのCコンパイラ作成入門」がまとまっててうれしい x86_64などのプロセッサで直接動作するアセンブリを生成してみたかった セルフホストできる程度の言語のコンパイラを実装したことがなかった 自作言語を一通り設計・実装したことがなかった 気軽に遊べる言語がほしかった 関数呼び出しで括弧を使わない世界線のRustの雰囲気を感じたかった GitLabの操作に慣れておきたかった 現実逃避 ...などなど コンパイラの名前はnecoです.HaxeのNekoと被るのでnecoにしています.言語の名前は決まってないけど拡張子は.necoにしています.necoは なんちゃら compiler の略ですと言いたいけれども略称はまだ決まってないです. コメントを

                                                      自作言語でセルフホストしてみた - Qiita
                                                    • EYG

                                                      EYG A programming language for predictable, useful and confident development.

                                                        EYG
                                                      • Tokay programming language

                                                        Parsing made simple. Tokay is a new, easy-to-learn programming language, designed for ad-hoc parsing and syntax-based development. 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!

                                                        • Type-erased generic functions for C: A modest non-proposal

                                                          Earlier this year, I read Martin Uecker's proposal N3212 to add parametric polymorphism to C. It's easy to scoff at the idea of adding generic programming to plain C, when C++ already has templates, and nearly every modern systems language has some form of generic programming support, but it got me thinking there is an opportunity to do something meaningfully and usefully different from those othe

                                                          • Yaksha | Home

                                                            A manual memory managed, compiled to C99, programming language with off-side rule syntax, and YakshaLisp sublanguage. Simple. Strict. Speedy. Language syntax is minimalistic and has similarities to Python. Manual memory management is required. Use YakshaLisp to create macros (Hygenic, Non-hygenic, or non-hygenic metamacros). A versatile new tool Yaksha aims to be a simple general purpose language

                                                            新着記事