並び順

ブックマーク数

期間指定

  • から
  • まで

241 - 280 件 / 584件

新着順 人気順

ProgrammingLanguageの検索結果241 - 280 件 / 584件

  • 値の不変性と変数の不変性についての整理 - kubell Creator's Note

    はじめに 先日「関数型まつり2025」にて「成立するElixirの再束縛(再代入)可という選択 - Speaker Deck」という内容で発表させていただいたのですが、関連して、今回、いろいろな言語における値の不変性と変数の不変性について整理したいと思います。 値の不変性と変数の不変性 まず、しばしば混同されがちな「値の不変性」と「変数の不変性」の違いについてです。 値の不変性 (Immutable Value) こちらは、一度作成された値(データ)そのものが変更できない性質を指します。不変な値を変更しようとすると、実際には元の値を変更するのではなく、変更内容を反映した新しい値が作成されます。 変数の不変性 (Immutable Variable) これは、一度値を代入された変数に、別の値を再代入できない性質を指します。多くの言語で const (JavaScript, C++) や fi

      値の不変性と変数の不変性についての整理 - kubell Creator's Note
    • Rustで有名アルゴリズムに挑戦(24) Rustで効率的なFisher–Yatesシャッフルを実装してみよう

      Rustで有名アルゴリズムを実装して、Rustについての理解を深めることが目的の連載です。今回扱うのは、配列のシャッフルについてです。最初に何も考えずに実装してみて、次に効率的に配列の要素をシャッフルするFisher–Yatesシャッフルを実装してみましょう。 Fisher–Yatesシャッフルを実装してみよう コンピューターにとって適当にシャッフルは難しい コンピューターは、人間よりも計算も速く正確に動いてくれるものですが、意外なことが苦手だったりします。そんな苦手なことの一つが「適当にシャッフルする」という作業です。 そもそも計算によって乱数を生成するのは簡単なことではありません。それで、さまざまな乱数生成アルゴリズムが提案されています。また、現在時刻やマウスの移動など、さまざまな物理現象を利用して、乱数生成を行う手法もあります。「適当さ」をコンピューターで再現するのは難しいものなので

        Rustで有名アルゴリズムに挑戦(24) Rustで効率的なFisher–Yatesシャッフルを実装してみよう
      • RuboCop Under a Microscope

        Lint Night #1 https://lintnight.connpass.com/event/263931/

          RuboCop Under a Microscope
        • 括弧で34087重に囲んだ関数を食わせるとg++が死ぬ

          TL;DR ((((printf("Hello World\n")))))みたいに関数をたくさんの括弧で囲むとコンパイラが死ぬので気をつけましょう。 はじめに 以前、printfに4285個アスタリスクをつけるとclang++が死ぬという記事や、GCCに27958段ネストした関数を食わせると死ぬという記事を書きました。 特に、printfにアスタリスクをたくさんつける記事では、clang++がわりとすぐ死んだのに対して、g++は5万個とかつけても大丈夫でした。一般に、コンパイラが死ぬ系のコンパイラいじめは、再帰でスタックを使い切るタイプのものが多く、LLVMよりもGCCの方が頑健という印象です。 さて、C++では、括弧を無駄につけることができます。例えば、

            括弧で34087重に囲んだ関数を食わせるとg++が死ぬ
          • Why Go's Error Handling is Awesome

            Go's infamous error handling has caught quite the attention from outsiders to the programming language, often touted as one of the language's most questionable design decisions. If you look into any project on Github written in Go, it's almost a guarantee you'll see the lines more frequently than anything else in the codebase: if err != nil { return err } Although it may seem redundant and unneces

            • Logica

              Logica is an open source declarative logic programming language for data manipulation. Logica extends syntax of logic programming for intuitive and efficient data manipulation. It compiles to SQL thus providing you access to the power of SQL engines with the convenience of logic programming syntax. Logica can compiles to SQL dialects of DuckDB, SQLite, Google BigQuery and Postgres. This makes it p

                Logica
              • Luau

                Luau Luau (lowercase u, /ˈlu.aʊ/) is a fast, small, safe, gradually typed embeddable scripting language derived from Lua. Around 2006, Roblox started using Lua 5.1 as a scripting language for games. Over the years we ended up substantially evolving the implementation and the language; to support growing sophistication of games on the Roblox platform, growing team sizes and large internal teams wri

                  Luau
                • The Niche Programmer - REPL

                  For the vast majority of my programming career, I've been a mainstream developer. By mainstream, I mean writing in a language and using the tools that most of the category of software development I have been in (mostly web development) has used, such as PHP, JavaScript, and the most popular tools of those ecosystems. But then one day in 2018 I got a job where I had to learn Clojure. I had never he

                  • Cassette

                    Cassette is a small functional programming language. It looks like this: import IO, Net, String ; keeps reading from a connection while there's any data def read_resp(conn) do ; define an iterative loop def loop(received) do let chunk = IO.read_chunk(conn, 1024) ; get the next chunk if #chunk == 0, received ; no more data else loop(received <> chunk) ; concatenate chunk onto received data end ; st

                    • Onyx Programming Language

                      An efficient, procedural, and pragmatic programming language Efficient The Onyx compiler is fast. Turnaround time is non-existent using Onyx's custom WebAssembly code generator. Procedural Onyx uses a simple programming and memory model. It is familiar to anyone with any programming experience.

                      • Onyx, a new programming language powered by WebAssembly · Blog · Wasmer

                        Onyx, a new programming language powered by WebAssemblyLearn about Onyx, a new imperative programming language that leverages WebAssembly and Wasmer for seamless cross-platform support What is Onyx? Onyx is a new programming language featuring a modern, expressive syntax, strict type safety, blazingly-fast build times, and out-of-the-box cross platform support thanks to WebAssembly. Over the past

                          Onyx, a new programming language powered by WebAssembly · Blog · Wasmer
                        • Announcing Rust 1.53.0 | Rust Blog

                          The Rust team is happy to announce a new version of Rust, 1.53.0. Rust is a programming language that is empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via rustup, getting Rust 1.53.0 is as easy as: $ rustup update stable If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detai

                            Announcing Rust 1.53.0 | Rust Blog
                          • kyju.org - Piccolo - A Stackless Lua Interpreter

                            Piccolo - A Stackless Lua Interpreter 2024-05-01 History of piccolo A "Stackless" Interpreter Design Benefits of Stackless Cancellation Pre-emptive Concurrency Fuel, Pacing, and Custom Scheduling "Symmetric" Coroutines and coroutine.yieldto The "Big Lie" Rust Coroutines, Lua Coroutines, and Snarfing Zooming Out piccolo is an interpreter for the Lua language written in pure, mostly safe Rust with a

                            • 言語処理系にSIMD命令を実装することについて(主にx86向け)

                              私は最近、Haskell処理系であるGHCのx86 NCG (native code generator) にSIMDプリミティブを実装する作業をやっています。LLVMなんかはSIMDに対するいい感じの抽象化を提供しているのですが、それを自前でやろうというわけです。 この記事は、x86のSSE等の命令を使ってSIMDプリミティブを実装する際に使う命令などに関するメモです。「SIMD命令比較」も参考になるかもしれません。 この記事では基本的に128ビット幅のベクトルを想定します。shuffle以外は256ビット幅や512ビット幅に応用するのは難しくないと思います。というか、256ビットとかだとAVXを仮定できるので色々楽だと思います。 基本:GCCやClangの出力を確認する 基本的な方針として、既存のコンパイラーの出力するアセンブリコードを参考にすると良いでしょう。 GCCでは型に __a

                                言語処理系にSIMD命令を実装することについて(主にx86向け)
                              • コンパイラを書いてセルフホストした

                                Quartzという言語をデザインしてコンパイラを書いて自身をコンパイルできるところまで到達したので記録として書く (人に使ってもらうことなどは特に想定してないので、ドキュメントなどはありません) Quartzについて 言語機能的にはGoとかに近く、syntax的にはRustに近い言語としてデザインした。ターゲットとしてWASM(wat形式)のみサポート。 元々の想定として、ゲームのスクリプトやアプリケーションのプラグインなど、動的に読み込めて気軽にかけて、型やLSPなどの現代的なDXは提供したいというモチベで作り始めた。 例えばfizzbuzzのコードは以下のような感じ。 fun main() { for i in 1..100 { if i % 15 == 0 { println("FizzBuzz"); } else if i % 3 == 0 { println("Fizz"); }

                                  コンパイラを書いてセルフホストした
                                • The Roc Programming Language

                                  Examples Roc is a young language. It doesn't even have a numbered release yet, just nightly builds! However, it can already be used for several things if you're up for being an early adopter— with all the bugs and missing features which come with that territory. Here are some examples of how it can be used today. Command-Line Interfaces main = Stdout.line! "Hello!" You can use Roc to create script

                                  • Green Vs. Brown Programming Languages

                                    This article explores programming language preferences. You might prefer Earthly. It can streamline your build processes. Check it out. The Data The Stack Overflow Developer Survey1 results are a great source of information about how developers work. I was looking at the 2020 results for some ideas on what programming languages we should add to our documentation on containerized builds, and I noti

                                      Green Vs. Brown Programming Languages
                                    • Announcing the Hare programming language

                                      Announcing the Hare programming language April 25, 2022 by Drew DeVault Hare is a systems programming language designed to be simple, stable, and robust. Hare uses a static type system, manual memory management, and a minimal runtime. It is well-suited to writing operating systems, system tools, compilers, networking software, and other low-level, high performance tasks. Here is my favorite exampl

                                        Announcing the Hare programming language
                                      • Rust 1.59を早めに深掘り - OPTiM TECH BLOG

                                        こんにちは、R&Dチームの齋藤(@aznhe21)です。 初めてのオフィス引っ越し体験が目前でちょっとワクワクしています。 さて、本日2/25(金)にRust 1.59がリリースされました。 この記事ではRust 1.59での変更点を詳しく紹介します。 2/25は映画「未知との遭遇」が日本で公開された日 ピックアップ 定数ジェネリクスでデフォルト値を使えるようになった 分割代入ができるようになった インラインアセンブリが使えるようになった イテレータのzipがフリー関数になった Cargo.tomlでstripを指定できるようになった 安定化されたAPIのドキュメント std::thread::available_parallelism 制限 エラー サンプル Result::copied サンプル Result::cloned サンプル ops::ControlFlow::is_brea

                                          Rust 1.59を早めに深掘り - OPTiM TECH BLOG
                                        • Borgo Programming Language

                                          Borgo is a new programming language that compiles to Go. For a high-level overview of the features and instructions on running the compiler locally, check the README. This playground runs the compiler as a wasm binary and then sends the transpiled go output to the official Go playground for execution. use fmt enum NetworkState<T> { Loading, Failed(int), Success(T), } struct Response { title: strin

                                          • 自作言語の紹介と関数型言語の実装方法の検討

                                            はじめに 私が個人で昨年の 6 月ごろから開発している関数型プログラミング言語を紹介する。言語の名前は「Plato」である。 この言語は昨年の U22 プログラミングコンテスト最終発表会でも発表した。コンテスト後、コンパイラの構成と実装に関して調査し直して、コードを一から書き直した。コンパイラは Haskell で書かれているため、本稿の内容も Haskell の知識をベースとしている。また、型理論の知識もある程度求められる。ただ、大雑把に書いているため、大雑把に読めばよく、このブログの読解に正確さは必要無い。 このブログでは、まず Plato のチュートリアルを示し、実際に何ができるのかを説明する。次に型検査や中間言語の仕様などコンパイラの実装手法を大まかに説明する。最後に今後実現したい機能などについて述べる。理論的に面白いものや有用な機能については、後日それ専用の記事を書く予定。 チュ

                                              自作言語の紹介と関数型言語の実装方法の検討
                                            • moonbit で json パーサーを書いてみた 感想

                                              エアプにならないために、実際に moonbit を使ってコードを書いてみた感想を書く。 JSON Parser を書いた パッケージレジストリである https://mooncakes.io を見た限り、使いやすい json parser がなさそうなので、とりあえず自分用のをでっち上げた。 mooncakes.io に publish してあるので、 moon add mizchi/json で使える。品質が良くなくても ネームスペース付きで publish するので別に邪魔にならない気がした。 なんで作ったかというと、公式 example の cloudflare workers の example は単純なフィボナッチを計算するだけで、構造的なデータを返すことができない。 moonbit と js 間の文字列の受け渡しについては、あとで別の記事を書く。 使い方 fn main { l

                                                moonbit で json パーサーを書いてみた 感想
                                              • mmcはどう失敗したのか - Qiita

                                                「愚者は経験に学び、賢者は歴史に学ぶ」はビスマルクさんの言葉ですが(ググった)、愚者である私は当然経験から学んでおります。経験から学ぶととかく失敗が多いのですが(これも経験から学んだ)、今回は私が5年くらい取り組んでいるmmcが失敗した話でもしたいなと思います。 はじめに 静的型付けであらずんばプログラミング言語であらず 世はまさに大静的型付け時代なわけですが、動的型付け言語が静的型付け言語と同じとかそれ以上の速度で動作したらどうでしょう?実はそのような言語処理系は既に存在し、Stalinなどはその代表です。まあ、静的型付けがもてはやされるのはプログラムの実行速度だけではないので変わらないかもしれませんが。 mmcもStalinと同じようにとにかくどんなにコンパイル時間がかかっても(ここ重要)高速なコードを生成するという目標で開発したRubyからCに変換するトランスレータです。正確には入力

                                                  mmcはどう失敗したのか - Qiita
                                                • 2022年、Rustの未来を探る旅 (1) はじめに

                                                  ※大風呂敷を広げてやる気だけ表明する記事です。まだ中身はない。 はじめに Rustは2009年頃に誕生し、2015年に正式リリースされたプログラミング言語です。その革新性はおよそ以下のように集約されます。 shared XOR mutable とそれに付随する発明 (所有権、ライフタイム) により、ミュータブル参照が正しく扱えるようになった (責任分界点が明確になった) こと。 上記のアイデアにより、高パフォーマンス・低フットプリントが求められるアプリケーションやOS・GC・アロケーターのない環境で動く必要のあるアプリケーションをより安全に書けるようになったこと。 プログラマーが安全に・快適にプログラムを書くための既知の優れた道具 (パッケージマネージャーなど) を計画的に取り入れ、伝統的なプログラミング言語が抱えがちな問題を広範に解決したこと。 これらの革新性から、これまでC/C++が担

                                                    2022年、Rustの未来を探る旅 (1) はじめに
                                                  • Javaはなぜかっこ悪いと思われているのか、ChatGPTと共に原因を探ってみた

                                                    プログラミング分野でよく話題になるのが「どのプログラミング言語が優れているか」というテーマだ。個人的には「どんな言語を使っていようとプログラミングの本質は変わらないので、不毛な議論ではないか」と感じることが多い。それぞれの案件に適した言語を使えばいいだけではないかと思ってしまう。 もっとも、これは日常的にプログラミングをしていない部外者の意見かもしれない。日々のソフトウエア開発業務では、プログラミング言語は最も重要なツールの1つだ。どんなツールを使うかが開発効率に直結することは大いにあり得る。 例えていえば、コード入力に使うキーボードのようなものだろうか。どんなキーボードでも気にしないエンジニアがいる一方で、キーボードのタッチに異様にこだわるエンジニアもいる。後者にとって、特定のキーボードを利用できるかどうかは開発効率を左右する死活問題だ。プログラミング言語にも、それに似た面があるのかもし

                                                      Javaはなぜかっこ悪いと思われているのか、ChatGPTと共に原因を探ってみた
                                                    • Announcing Rust 1.54.0 | Rust Blog

                                                      The Rust team is happy to announce a new version of Rust, 1.54.0. Rust is a programming language empowering everyone to build reliable and efficient software. If you have a previous version of Rust installed via rustup, getting Rust 1.54.0 is as easy as: $ rustup update stable If you don't have it already, you can get rustup from the appropriate page on our website, and check out the detailed rele

                                                        Announcing Rust 1.54.0 | Rust Blog
                                                      • Appleがシステム構成のためのプログラミング言語「Pkl」をオープンソースでリリース

                                                        Appleがシステム構成を作成するためのプログラミング言語である「Pkl(ピックル)」をオープンソースとしてリリースしました。Pklで構成を記述することで、必要に応じてJSONやYAMLのほか、Kotlin、Ruby、JavaScriptなどの形式で自由に出力することが可能とのことです。 Pkl :: Pkl Docs https://pkl-lang.org/index.html apple/pkl: A configuration as code language with rich validation and tooling. https://github.com/apple/pkl システム構成を記述する際にはJSONやYAML、プロパティリスト(plist)などの静的言語を用いる場合が多いものの、表現力に限界があってコードが頻繁に繰り返されたり、独自の検証を提供しないために構文

                                                          Appleがシステム構成のためのプログラミング言語「Pkl」をオープンソースでリリース
                                                        • A programming language for hardware accelerators

                                                          Researchers created Exo, which helps performance engineers transform simple programs that specify what they want to compute into very complex programs that do the same thing as the specification, only much, much faster. Moore’s Law needs a hug. The days of stuffing transistors on little silicon computer chips are numbered, and their life rafts — hardware accelerators — come with a price. When prog

                                                            A programming language for hardware accelerators
                                                          • GitHubで最も使われている言語はJavaScript、最も利用者が増加したのはRust。AIプロジェクト数はこの1年で3倍増GitHubが年次調査「Octoverse 2023」発表

                                                            GitHubで最も使われている言語はJavaScript、最も利用者が増加したのはRust。AIプロジェクト数はこの1年で3倍増GitHubが年次調査「Octoverse 2023」発表 GitHubは、この1年のGitHubの利用動向などをまとめた年次レポート「Octoverse 2023」を発表しました。 Dive into the latest #Octoverse 2023 insights! 92% of devs are now harnessing #AI coding tools, transforming how we learn & code. Plus, the rise of projects like next.js & nuxt shows open-source as a vibrant learning hub! https://t.co/s9YyztEcq

                                                              GitHubで最も使われている言語はJavaScript、最も利用者が増加したのはRust。AIプロジェクト数はこの1年で3倍増GitHubが年次調査「Octoverse 2023」発表
                                                            • Eve

                                                              Eve: Programming designed for humans Eve is a programming language and IDE based on years of research into building a human-first programming platform. From code embedded in documents to a language without order, it presents an alternative take on what programming could be - one that focuses on us instead of the machine. This is Eve: Eve is about humans, not computers We've made tremendous advance

                                                              • Rustで検討されているKeyword Genericsについての現状

                                                                TL; DR Keyword Generics という新しい言語機能が検討されている。 ある関数などがあったとして、それが async かどうかを自動判別できるようキーワードを新しく追加したいというのが大まかな目的。できればいくつかのキーワードを横断して判定できるような包括的なキーワードも追加したいかも。 これから RFC を書こうとしている段階で、まだ RFC にはなっていない。 ただこれ、うーん、どうなんでしょうね。 マクロでいいような気がする。 プログラミング言語としての哲学が問われている感じがする。 経緯 先日次のようなアナウンスが「Inside Rust」から行われました。 これは昨年の7月末にアナウンスされた「The Keyword Generics Initiative」チームによる続きの報告です。当時のアナウンスは下記です。 先日の2月の発表は、この7月の発表の進捗報告に当

                                                                  Rustで検討されているKeyword Genericsについての現状
                                                                • GitHub - marianoguerra/hiapl: HTML Is A 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 - marianoguerra/hiapl: HTML Is A Programming Language
                                                                  • その名はFlix

                                                                    最強JVM系関数型 論理プログラミング言語、 その名は Flix 第五関数型プログラミング(仮)の会 2024-01-26 knih The Flix Programming Language

                                                                      その名はFlix
                                                                    • GitHub - buzz-language/buzz: 👨‍🚀 buzz, A small/lightweight statically typed scripting 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 - buzz-language/buzz: 👨‍🚀 buzz, A small/lightweight statically typed scripting language
                                                                      • syntaxdesign

                                                                        One of the most recognizable features of a languages is its syntax. What are some of the things about syntax that matter? What questions might you ask if you were creating a syntax for your own language? Motivation A programming language gives us a way structure our thoughts. Each program, has a kind of internal structure, for example: How can we capture this structure? One way is directly, via pi

                                                                        • Implementing Logic Programming

                                                                          Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

                                                                            Implementing Logic Programming
                                                                          • eC Programming Language

                                                                            import "EDA" import "genericEditor" enum MediaType { unknown, tape, dvd, bluRay }; dbtable "Borrowers" Borrower { Borrower id "ID"; String name "Name"; String phoneNumber "Phone Number"; }; dbtable "Movies" Movie { Movie id "ID"; String name "Name"; MediaType mediaType "Media Type"; Date dateAdded "Date Added"; Borrower borrower "Borrower"; Date dateBorrowed "Date Borrowed"; }; DataSource ds; Data

                                                                            • NSA urges orgs to use memory-safe programming languages

                                                                              C/C++ on the bench, as US snoop HQ puts its trust in Rust, C#, Go, Java, Ruby, Swift The NSA has released guidance encouraging organizations to shift programming languages from the likes of C and C++ to memory-safe alternatives – namely C#, Rust, Go, Java, Ruby or Swift. "NSA recommends that organizations use memory safe languages when possible and bolster protection through code-hardening defense

                                                                                NSA urges orgs to use memory-safe programming languages
                                                                              • GitHub - HigherOrderCO/Bend: A massively parallel, high-level 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 - HigherOrderCO/Bend: A massively parallel, high-level programming language
                                                                                • Recto — a truly 2D language

                                                                                  Masato Hagiwara Open in Recto Pad Google Colab Github Recto Pad TL;DR Recto is a 2D programming language that uses nested rectangles as its core syntax, encoding structure and recursion directly in space instead of a linear stream of text. Recto explores new ways to write, parse, and reason about code—and even natural language—spatially. Introduction Open in Recto Pad Virtually all the languages w

                                                                                    Recto — a truly 2D language

                                                                                  新着記事