並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 123件

新着順 人気順

std string empty cの検索結果1 - 40 件 / 123件

  • ルールは現場で死にました - The Rules of Programming の読書感想文 - じゃあ、おうちで学べる

    本日は人生の数ある選択肢のなかから、こちらのブログを読むという行動を選んでくださいまして、まことにありがとうございます。 はじめに 正直に言えば、プログラミングのルール本には懐疑的だった。「Clean Code」も「Effective Java」も読んだ。読んだが、現場でそのまま使えたことは少ない。コンテキストが違う。チームが違う。言語が違う。ルールは理想であり、現実は常に例外だ。 そう思っていた。本書を読むまでは。 Chris Zimmerman氏の「The Rules of Programming」(邦題:ルールズ・オブ・プログラミング ―より良いコードを書くための21のルール)は、私の予想を裏切った。これは「ルールを守れ」という本ではない。「ルールの本質を理解し、現場に合わせて判断しろ」という本だ。著者自身が、読者にこれらのアプローチを鵜呑みにするなと言っている。この謙虚さが、逆にこ

      ルールは現場で死にました - The Rules of Programming の読書感想文 - じゃあ、おうちで学べる
    • UTF-8 の BOM について - 将棋プログラミング

      1.はじめに UTF-8 の文字コードのファイルには、BOM (Byte Order Mark) がある場合とない場合がある。 Unicode の規格では、BOM は、推奨されないが、許容されている。 ja.wikipedia.org 今回、必要があり、色々な OS や言語で、UTF-8 の文字コードのファイルを作成した時、BOM が記録されるか、されないか、を調べた。 2.色々な OS や言語での BOM 2.1 Windows 10, Visual Studio, C++, _wfopen (_tfopen) // Visual Studio 2005 以降 保存 FILE *fp = _wfopen(name, _ L"w, ccs=UTF-8"); if (fp == NULL) { // エラー処理 } fwprintf_s(fp, L"ABC漢字123\n"); fclose(

        UTF-8 の BOM について - 将棋プログラミング
      • Rustのバックエンド開発の最近の動向を追う - Findy Media

        はじめにyukiです。RustのカンファレンスであるRust.Tokyoのオーガナイザーを務めているほか、『実践Rustプログラミング入門』『RustによるWebアプリケーション開発』といった書籍を共著で執筆しました。 この記事のテーマは、近年利用が進み人気が高まるRustのバックエンド開発における動向です。前半で、現在人気のあるライブラリの動向を簡単にまとめます。次に、私が現在開発の動向に注目しているいくつかのライブラリについて紹介します。 人気のバックエンド開発ライブラリの動向Rustによるバックエンド開発[1]では、やはり最近でも次の2つのクレートが選ばれる傾向にあるようです。「デファクトスタンダード」と呼べるくらいには、そろそろなってきたのではないでしょうか。 axum actix-web 数年前であればactix-webが一強ではあったものの、近年はtokioチームが開発するax

          Rustのバックエンド開発の最近の動向を追う - Findy Media
        • Extending SQLite with Rust to support Excel files as virtual tables

          This article explains how SQLite can be extended with Rust. In particular, it will outline SQLite’s mechanism called virtual tables and showcase how we can use it from Rust programming language. In the end, we will have a working extension that can be dynamically loaded and used from SQLite. This article does not claim to be an exhaustive guide about extending SQLite with Rust, but I hope the read

          • Prototyping in Rust | corrode Rust Consulting

            Programming is an iterative process. As much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often begin as quick prototypes. While many experiments remain prototypes, the best programs can evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best

              Prototyping in Rust | corrode Rust Consulting
            • Rust 1.60を早めに深掘り - OPTiM TECH BLOG

              こんにちは、R&Dチームの齋藤(@aznhe21)です。 新オフィスは広くて快適です。 さて、本日4/8(金)にRust 1.60がリリースされました。 この記事ではRust 1.60での変更点を詳しく紹介します。 4/8は釈迦の誕生を祝う花まつりの日 ピックアップ コンパイル時間を計測できるようになった 機能(features)で名前空間付き・弱依存がサポートされた コード網羅率を計測できるようになった [u8]を文字列としてエスケープできるようになった 安定化されたAPIのドキュメント Arc::new_cyclic パニック サンプル Rc::new_cyclic パニック サンプル slice::EscapeAscii <[u8]>::escape_ascii サンプル u8::escape_ascii サンプル Vec::spare_capacity_mut サンプル Maybe

                Rust 1.60を早めに深掘り - OPTiM TECH BLOG
              • 缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる

                はじめに ——あるいは、「知っている」と「理解している」の間 Rustのことは、知っていた。学習もしていた。実務でも使っていた。 でも、それは知っているつもりだった。 知ってるつもり 無知の科学 (ハヤカワ文庫NF) 作者:スティーブン スローマン,フィリップ ファーンバック早川書房Amazon 日々Rustで開発し、BoxとRcとArcを使い分け、tokio::spawnでタスクを生成し、?演算子を当たり前のように書いている。FFI?PyO3使えばいいでしょ。WebAssembly?wasm-bindgenがあるじゃない。技術的には、確かに「使える」レベルにはあった。 でも、心のどこかで感じていた違和感があった。 オートバイのエンジンを分解できる人と、エンジンが動く原理を理解している人は違う。コードが動くことと、なぜそう書くべきかを理解することも違う。私は前者だった。メカニックではあった

                  缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる
                • Learning Async Rust With Entirely Too Many Web Servers

                  I've found that one of the best ways to understand a new concept is to start from the very beginning. Start from a place where it doesn't exist yet and recreate it yourself, learning in the process not just how it works, but why it was designed the way it was. This isn't a practical guide to async, but hopefully some of the background knowledge it covers will help you think about asynchronous prob

                    Learning Async Rust With Entirely Too Many Web Servers
                  • Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming

                    Discuss on Reddit, Lobsters, and Hacker News. Summary I am thrilled to introduce Hypershell, a modular, type-level domain-specific language (DSL) for writing shell-script-like programs in Rust. Hypershell is powered by context-generic programming (CGP), which makes it possible for users to extend or modify both the language syntax and semantics. Table of Contents Estimated reading time: 1~2 hours

                      Hypershell: A Type-Level DSL for Shell-Scripting in Rust | Context-Generic Programming
                    • Rustにしたのに遅い?─ N+1クエリ問題の発見と解決 - じゃあ、おうちで学べる

                      はじめに Rustは速い。だが、Rustで書けば速くなるわけではない。 ある日、APIのレスポンスが突然5秒を超えた。コードを見直してもバグはない。SQLも正しく書けている。途方に暮れながらログを確認すると、1リクエストで300回以上もクエリが発行されていた。原因は、ループ内で著者情報を1件ずつ取得していたこと。これがN+1クエリ問題だ。 見えないものは、直せない。 本記事では、この見落とされがちなN+1クエリ問題の本質と、RustとPostgreSQLを使った5つの解決策を解説する。正直に言うと、どの解決策がベストかは状況による。だからこそ、複数のアプローチを知っておく価値があると私は考えている。 N+1クエリ問題とは 問題のあるコード 本記事では、RustのSQLクライアントライブラリ「sqlx」を使用します。sqlxは型安全なクエリとasync/awaitをネイティブにサポートするラ

                        Rustにしたのに遅い?─ N+1クエリ問題の発見と解決 - じゃあ、おうちで学べる
                      • 大奥を観る | Netflix (ネットフリックス) 公式サイト

                        '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                          大奥を観る | Netflix (ネットフリックス) 公式サイト
                        • 【Yew】Rustでフロントエンド開発 - Rustのマクロを紐解く - - 電通総研 テックブログ

                          こんにちは、電通国際情報サービス(ISID) 金融ソリューション事業部の大場です。 今回は、Rustでフロントエンドの実装ができるYewというライブラリを使ってMarkdownエディタを作った話をします。本記事は、Yewの内部実装に触れながらYewやRustのマクロの動作について理解を深めることを目的としています。これらについて詳しく知りたい方はぜひ本記事を参考にしていただければと思います。 また、本記事で紹介するコードはこちらのリポジトリで公開しています。 https://github.com/ISID/wasm-md-editor 作った背景 採用した主要なCrate 全体像とフロー Yew そもそもWebAssembly(Wasm)とは Yew内部で使われる主要なCrate Yewの実装 手続き型マクロ マクロについての補足 #[function_component]実装 実際に画面

                            【Yew】Rustでフロントエンド開発 - Rustのマクロを紐解く - - 電通総研 テックブログ
                          • 即興演奏のためのオーディオビジュアルセットを作った

                            2024年の9月14日に岡千穂さん、野本直輝さんらからComputer Music Partyというイベントにお誘いいただき、かなり久し振りにソロでの即興演奏、オーディオビジュアルのライブをしました。出演者全員やってることがみんな違ってて、全員何をしているのか全然わからなくて素晴らしいイベントでした。。 Calum Gunn, moxus, Naoki Nomoto & Utah Kawasaki, Satoru Higa, okachiho - Tokyo Gig Guide 本記事はそのイベントの中で何をしていたか、どう作ったか、についての内容となります 実際の演奏中の様子はこちら モチベーション 大学生のころ、専攻ではコンピューターミュージックを学ぶかたわら放課後はジャズ研でドラムを演奏するといった学生生活を送っていました 卒業して早20年程度が経過した今、久しぶりにドラム触りたいけ

                              即興演奏のためのオーディオビジュアルセットを作った
                            • Text Editor Data Structures

                              Text editors can be an interesting challenge to program. The types of problems that text editors need to solve can range from trivial to mind-bogglingly difficult. Recently, I have been on something of a spiritual journey to rework some internal data structures in an editor I have been building, specifically the most fundamental data structure to any text editor: the text. Table of Contents Resour

                                Text Editor Data Structures
                              • Top 10 Movies on Netflix Right Now - Netflix Tudum

                                '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                                  Top 10 Movies on Netflix Right Now - Netflix Tudum
                                • 0.8.0 Release Notes ⚡ The Zig Programming Language

                                  Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                  • Pitfalls of Safe Rust | corrode Rust Consulting

                                    When people say Rust is a “safe language”, they often mean memory safety. And while memory safety is a great start, it’s far from all it takes to build robust applications. Memory safety is important but not sufficient for overall reliability. In this article, I want to show you a few common gotchas in safe Rust that the compiler doesn’t detect and how to avoid them. Why Rust Can’t Always Help Eve

                                      Pitfalls of Safe Rust | corrode Rust Consulting
                                    • ドント・ルック・アップを観る | Netflix (ネットフリックス) 公式サイト

                                      '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                                        ドント・ルック・アップを観る | Netflix (ネットフリックス) 公式サイト
                                      • Netflix Japan - Watch TV Shows Online, Watch Movies Online

                                        '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                                        • sdadams.org

                                          The problem: data corruption I decided it was finally time to build a file server to centralize my files and guard them against bit-rot. Although I would have preferred to use OpenBSD due to its straightforward configuration and sane defaults, I was surprised to find that none of the typical NAS filesystems were supported. In particular I would need three features in such a filesystem. Firstly I w

                                          • ウィンター・オン・ファイヤー: ウクライナ、自由への闘いを観る | Netflix (ネットフリックス) 公式サイト

                                            '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                                              ウィンター・オン・ファイヤー: ウクライナ、自由への闘いを観る | Netflix (ネットフリックス) 公式サイト
                                            • 0.10.0 Release Notes ⚡ The Zig Programming Language

                                              Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                              • llrl programming language

                                                github.com/yubrot/llrl Rust + LLVMで自作言語をセルフホスティングした話 Rust + LLVM による自作プログラミング言語処理系。大きな特徴は以下の 3 つ。 Hindley-Milner ベースの型推論による静的型付け (+型クラス) Lisp-like な S 式によるシンタックスと LLVM JIT によるマクロ 完全なセルフホスティングコンパイラ実装 目標: セルフホスティング llrl は複合的な理由で作り始めたが、とにかく一度完全にセルフホストされた言語処理系を実装したいという気持ちからセルフホスティングを最優先の目標とした。 プログラミング言語のセルフホスティングは、以下のような明確なゴールを設定できる。 何らかの既存のプログラミング言語によって自作言語コンパイラを実装する → 世代 0 自作言語、およびその標準ライブラリをコンパイラを実装

                                                  llrl programming language
                                                • Cloudflare functions with Scala.js

                                                  Indoor VivantsAnton Sviridov. I love reinventing the wheel and I usually use Scala for that. TL;DR We are deploying an app to Cloudflare using Scala.js We are using ScalablyTyped We are using Scala 3 heavily Code on Github Deployed app Cloudflare API bindings Welcome to the "Put ma Scala on yo cloud" series I want to say that I'm kicking off a blog series, but even I don't believe that. If I did,

                                                  • Rust 1.80を早めに深掘り - あずんひの日

                                                    本日7/26(金)にリリースされたRust 1.80の変更点を詳しく紹介します。 もしこの記事が参考になれば記事末尾から活動を支援頂けると嬉しいです。 7月25日は蒸気機関車が初めて走った日 ピックアップ 遅延初期化されるグローバル変数を書けるようになった Optionの値を条件を満たしたときだけ取り出せるようになった スライスをパニックなしに分割できるようになった 配列を含むスライスを一次元化できるようになった パターンとして終端の含まれない範囲を使えるようになった useなしにsize_of等が使えるようになった 安定化されたAPIのドキュメント LazyCell サンプル LazyLock サンプル Duration::div_duration_f32 サンプル Duration::div_duration_f64 サンプル Option::take_if サンプル Seek::se

                                                      Rust 1.80を早めに深掘り - あずんひの日
                                                    • How To Make a Fast Dynamic Language Interpreter

                                                      Original Zef Interpreter The original Zef interpreter was written with almost no regard for performance. Only two performance-aware choices were made: The value representation is a 64-bit tagged value that may hold a double, a 32-bit integer, or a Object*. Doubles are represented by offsetting them by 0x1000000000000 (a technique I learned from JavaScriptCore; the literature has taken to calling t

                                                      • A shiny future with GATs

                                                        This was a surprisingly difficult blog post to write. Between general life things getting in the way and feeling a bit of lost steam, this took much longer than I expected. Before I go further, if you don’t know what GATs (generic associated types) are, then I recommend reading this blog post from August of last year. A bit over a year ago, the traits working group started to talk seriously about

                                                        • strongly-typed-thoughts.net

                                                          Zig; what I think after months of using it What I like Arbitrary sized-integers and packed structs Generic types are just functions at the type level Error Union Types C interop is probably the best The build system is nice What I like less Error handling Shadowing is forbidden Compile-time duck typing No typeclasses / traits comptime is probably not as interesting as it looks No encapsulation Mem

                                                          • Making a Chess Engine in Zig

                                                            I had the honor of speaking at Systems Distributed at the end of June. Since it was hosted by TigerBeetle who is one of the largest zig users, a lot of the zig community was there. After talking to some of them, Zig seemed more interesting for me to try out. Around the same time my youtube algorithm got me hooked on chess content. I’m not a good chess player by any means, but it started giving me

                                                            • ザ・プレイリストを観る | Netflix (ネットフリックス) 公式サイト

                                                              '); doc.close(); } if (!doc) throw Error('base not supported'); var baseTag = doc.createElement('base'); baseTag.href = base; doc.getElementsByTagName('head')[0].appendChild(baseTag); var anchor = doc.createElement('a'); anchor.href = url; return anchor.href; } finally { if (iframe) iframe.parentNode.removeChild(iframe); } }()); } // An inner object implementing URLUtils (either a native URL // ob

                                                                ザ・プレイリストを観る | Netflix (ネットフリックス) 公式サイト
                                                              • Async/Await | Writing an OS in Rust

                                                                この記事は翻訳されたものです: この記事はAsync/Awaitをコミュニティの手により翻訳したものです。そのため、翻訳が完全・最新でなかったり、原文にない誤りを含んでいる可能性があります。問題があればこのissue上で報告してください! 翻訳者: @kahirokunn, @garasubo, @sozysozbot 及び @swnakamura. With contributions from @asami-kawasaki 及び @Foo-x. この記事では、Rustの協調的マルチタスクとasync/await機能について説明します。Rustのasync/await機能については、Future trait の設計、ステートマシンの変換、 pinning などを含めて詳しく説明します。そして、非同期キーボードタスクと基本的なexecutorを作成することで、カーネルにasync/awa

                                                                • RustでWeb漫画更新検知ツールを書いた!たのし~~!!

                                                                  本記事はRust Advent Calendar2025の24日目の記事です。メリークリスマス! 1. この記事のモチベーション 簡単な自分向けプログラムでもRust使えるし楽しいよ。Rust書いたことないor気になっている人も見ていってね、そしてRustを書こう! 2. 概要 昨今、様々な媒体でWeb漫画が公開されています。自分も30作品以上追っていますが、更新通知がないので全部をもれなく追うのは大変です。例えばTwitterでバズったWeb漫画が自分に刺さっても、次の話も同じようにバズって自分のTLに流れてくるわけじゃないのでいつの間にか追跡を忘れていたりしますよね。そこで、登録した漫画の最新話更新状況を一括でチェックして、更新されていたら通知してくれるツールをRustで作ります。理由はRustは書いてて楽しいからです。 また、ドメイン駆動設計とオニオンアーキテクチャを実践します。ソー

                                                                    RustでWeb漫画更新検知ツールを書いた!たのし~~!!
                                                                  • V Language Review (2022)

                                                                    V is a programming language promising to be “Simple, fast, safe, compiled. For developing maintainable software.” V has a controversial past but what is the state of V in 2022? Is V worth checking out? In this post, we’ll take a look at V as it exists in May 2022. TLDR Read the summary Rules of engagement I’ll be using the current version of V built from git which is 50ab2cfd1ae02d4f4280f38c60b8db

                                                                    • zerocal - A Serverless Calendar App in Rust Running on shuttle.rs | Matthias Endler

                                                                      Every once in a while my buddies and I meet for dinner. I value these evenings, but the worst part is scheduling these events! We send out a message to the group. We wait for a response. We decide on a date. Someone sends out a calendar invite. Things finally happen. None of that is fun except for the dinner. Being the reasonable person you are, you would think: “Why don’t you just use a schedulin

                                                                        zerocal - A Serverless Calendar App in Rust Running on shuttle.rs | Matthias Endler
                                                                      • ROFL with a LOL: rewriting an NGINX module in Rust

                                                                        ROFL with a LOL: rewriting an NGINX module in Rust2023-02-24 At Cloudflare, engineers spend a great deal of time refactoring or rewriting existing functionality. When your company doubles the amount of traffic it handles every year, what was once an elegant solution to a problem can quickly become outdated as the engineering constraints change. Not only that, but when you're averaging 40 million r

                                                                          ROFL with a LOL: rewriting an NGINX module in Rust
                                                                        • Rustで始める自作シェル その1 - ぶていのログでぶログ

                                                                          この記事はRust Advent Calender 2021の8日目の記事です。 空白だったので遡って穴埋めしています。 このブログでも何度か話題にしているが、私はreddish-shellという自作シェルをOSSで開発している。 コマンドを実行するだけなら簡単ではあるものの、日常で使える程度にしっかりしたシェルを作ろうとしたら様々なノウハウが必要になる。 そう言ったノウハウはシステムプログラミングとして本やネット上に存在するが、シェルを作ることを目的として紹介されていないので体系的に学びづらいと感じる。というか大変だった…。 私の持つ知識をダンプし、シェルの作り方としてまとめることで、今後シェルを作ろうと思う人の役に立てればと思う*1。 なお、私はシェル作成について独学であるため、間違った内容も書いているかもしれない。 その時は優しくTwitterやコメントで教えていただけると助かります

                                                                            Rustで始める自作シェル その1 - ぶていのログでぶログ
                                                                          • Rust on Nails | Cloak

                                                                            Rust on Nails A full stack architecture for Rust web applications This article is now outdated and has been replaced This article was more popular than we expected and as we added more content grew beyond the size of a blog post. It is now available on it's own mini site at https://rust-on-nails.com The old article To build a web application you need to make architecture decisions across a range o

                                                                            • V8 Torque user manual · V8

                                                                              V8 Torque is a language that allows developers contributing to the V8 project to express changes in the VM by focusing on the intent of their changes to the VM, rather than preoccupying themselves with unrelated implementation details. The language was designed to be simple enough to make it easy to directly translate the ECMAScript specification into an implementation in V8, but powerful enough t

                                                                              • Modular Errors in Rust

                                                                                It is thankfully common wisdom nowadays that documentation must be placed as near as possible to the code it documents, and should be fine-grained to a minimal unit of describability (the thing being documented). The practice provides numerous benefits to the codebase and project as a whole: When editing the source code, contributors are less likely to forget to update the documentation as well, e

                                                                                • Node.js — Node.js v22.18.0 (LTS)

                                                                                  2025-07-31, Version 22.18.0 'Jod' (LTS), @aduh95 Notable Changes Type stripping is enabled by default Node.js will be able to execute TypeScript files without additional configuration: $ echo 'const foo: string = "World"; console.log(`Hello ${foo}!`);' > file.ts $ node file.ts Hello World! There are some limitations in the supported syntax documented at https://nodejs.org/api/typescript.html#type-

                                                                                    Node.js — Node.js v22.18.0 (LTS)