並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 191件

新着順 人気順

python if integer valueの検索結果1 - 40 件 / 191件

  • Bulk insertでも20時間以上かかっていたMySQLへのインサート処理を1時間以内にする - エムスリーテックブログ

    この記事はエムスリー Advent Calendar 2022の30日目の記事です。 前日は id:kijuky による チームメンバーのGoogleカレンダーの休暇予定一覧をスプレッドシート+GASで作った でした。 AI・機械学習チームの北川(@kitagry)です。 今回はMySQLへのインサートを20倍以上高速化した話について書きます。 仕事をちゃんとしてるか見張る猫 TL; DR はじめに 今回のテーブル バイナリログを無効化する 追試 LOAD DATA INFILE 追試 テーブルの正規化 インデックスを一時的に剥がす まとめ We are hiring!! TL; DR バイナリログをオフにする LOAD DATA INFILEを使う インデックスを一時的に消す はじめに AI・機械学習チームではサイトトップからアプリに至るまで多くの推薦システムがあります。 そこでは推薦ロ

      Bulk insertでも20時間以上かかっていたMySQLへのインサート処理を1時間以内にする - エムスリーテックブログ
    • とほほのHaskell入門 - とほほのWWW入門

      概要 Haskellとは 関数型言語 純粋関数型言語 インストール Haskell Stack Hello world 基本 予約語 コメント ブロック レイアウト 入出力 型 変数 数値 文字(Char) 文字列(String) エスケープシーケンス リスト([...]) タプル((...)) 演算子 関数 演算子定義 再帰関数 ラムダ式 パターンマッチ ガード条件 関数合成(.) 引数補足(@) 制御構文 do文 let文 if文 case文 where文 import文 ループ データ型 データ型(列挙型) データ型(タプル型) データ型(直和型) 新型定義 (newtype) 型シノニム (type) 型クラス (class) メイビー(Maybe) ファンクタ(Functor) アプリケイティブ(Applicative) モナド(Monad) モジュール (module) 高階関

      • 関数名、メソッド名、変数名でよく使う英単語のまとめ

        プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

          関数名、メソッド名、変数名でよく使う英単語のまとめ
        • プログラミング言語論入門 - riswu’s blog

          第0章. なぜ Scala を使うのか? はじめに 本稿は、John C. Mitchell 氏らによる Concepts in Programming Languages を基に自身の見解を交え、私がなぜ Scala を好んで使うのかを論じた記事になります。 プログラミング言語の歴史 本題に入る前に、プログラミング言語の歴史について紹介します。 年代 言語・イノベーション 1950 Fortran and Cobol 1960 Lisp and Algol 1970 Abstract data types (Simula, C, SQL) 1980 Objects (Smalltalk, C++) 1990 Java, JavaScript, Python, Ruby これは、年代ごとに開発された言語およびイノベーションを表にまとめたものになります。ただし、この表には欠けている事柄があり

            プログラミング言語論入門 - riswu’s blog
          • FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ|ハイクラス転職・求人情報サイト アンビ(AMBI)

            FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ PythonのWebフレームワークとしていま注目を集めるFastAPIは、シンプルにコードが書けるだけでなく、パフォーマンスが高いWebアプリケーションのバックエンドサーバーが構築可能です。同フレームワークの勘所をPythonスペシャリストの杜世橋さんが、初心者向けのハンズオン、そしてより実践的な画像への自動タグ付けサービス実装をとおして解説します。 FastAPIはいま非常に注目されているPythonのWebフレームワークの1つです。Flaskのようにシンプルに書ける一方でPythonのType Hintの機能をうまく活用し、HTTPのリクエスト/レスポンスをPythonの関数の引数/戻り値とシームレスにマッピングして非常に効率的に開発ができるのが最大の特徴です。非同期処理にも対応していてその名

              FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ|ハイクラス転職・求人情報サイト アンビ(AMBI)
            • プロと読み解く Ruby 3.0 NEWS - クックパッド開発者ブログ

              技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、ついに Ruby 3.0.0 がリリースされました。一昨年、昨年に続き、今年も Ruby 3.0 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は一昨年の記事を見てください(なお Ruby 3.0.0 から、NEWS.md にファイル名を変えました)。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ Ruby 3.0 は、Ruby にとってほぼ 8 年ぶりのメジャーバージョンア

                プロと読み解く Ruby 3.0 NEWS - クックパッド開発者ブログ
              • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

                1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

                  大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
                • プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ

                  技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、ついに Ruby 3.1.0 がリリースされました(Ruby 3.1.0 リリース )。今年も Ruby 3.1 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ プロと読み解くRuby 3.0 NEWS - クックパッド開発者ブログ 本記事は新機能を解説することもさることながら、変更が入った背景や苦労な

                    プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ
                  • PostgreSQL Client から自作 DBMS に接続する - goropikariの備忘録

                    最近、Go の練習がてら書いていた自作 DBMS に PostgreSQL client で接続できるようになったので、そのやり方を残しておきます。(これから紹介するサンプルコードはすべて Python ですが) github.com psql --version psql (PostgreSQL) 13.2 pgcon の資料と PostgreSQL の公式 Document、加えて PostgreSQL server と client 間に流れるパケットを眺めると、自作DBMSは client から接続されたときにどういうパケットを返せばいいのかが見えてきます。 https://www.pgcon.org/2014/schedule/attachments/330_postgres-for-the-wire.pdf https://www.postgresql.org/docs/13/

                      PostgreSQL Client から自作 DBMS に接続する - goropikariの備忘録
                    • Hacking the JavaScript Lottery

                      January 2016 boasted a Powerball jackpot of 1.5 billion dollars. This generated a lot of interest in the lottery and the Los Angeles Times released a simulator where you start with 100 dollars and play until that is gone. I had seen previous work for predicting Java’s Math.random() and thought it would be a fun project to replicate for the browser. The first step is to find the algorithm used in t

                        Hacking the JavaScript Lottery
                      • プロと読み解くRuby 3.4 NEWS - STORES Product Blog

                        プロと読み解くRuby 3.4 NEWS テクノロジー部門技術基盤グループの笹田(ko1)と遠藤(mame)です。Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、恒例のクリスマスリリースとして、Ruby 3.4.0 がリリースされました(Ruby 3.4.0 リリース )。今年も STORES Product Blog にて Ruby 3.4 の NEWS.md ファイルの解説をします(ちなみに、STORES Advent Calendar 2024 の記事になります。他も読んでね)。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者

                          プロと読み解くRuby 3.4 NEWS - STORES Product Blog
                        • GPT in 60 Lines of NumPy | Jay Mody

                          January 30, 2023 In this post, we'll implement a GPT from scratch in just 60 lines of numpy. We'll then load the trained GPT-2 model weights released by OpenAI into our implementation and generate some text. Note: This post assumes familiarity with Python, NumPy, and some basic experience with neural networks. This implementation is for educational purposes, so it's missing lots of features/improv

                          • Rubyの型チェッカーのSorbetを導入しました - freee Developers Hub

                            申告チームでテックリードをやらせてもらっている id:nanjakkun です。 freeeではfreee会計をはじめ多くのプロダクトがRuby on Rails(以下Rails)のアプリケーションとして実装されています。 日々の開発の中で、Rubyでも静的な型の解決ができればなあと思うことがあります。 ということで、Rubyの型チェッカーのSorbetをfreee申告に導入してみました。 Sorbet(ソルベ)とは sorbet.org 決済代行サービスのStripeを運営しているStripe社が公開している漸進的型チェッカーです。 ※余談ですがfreeeアプリストアではStripeを決済手段としたアプリの有料販売ができます。 developers.freee.co.jp 有料アプリ販売の準備をする | freee Developers Community 漸進的型付けとは 漸進的型付け

                              Rubyの型チェッカーのSorbetを導入しました - freee Developers Hub
                            • Node/Deno でソースコードにテストを書く

                              tl;dr ファイルをそれ単独で単体テストとして実行するボイラープレートを編み出した そのヘルパとして mizchi/test という実装を作った なぜソースコードにテストを書きたいか Rust や Python の doctest ではソースコードにテストを書く方法があります。 ソースコードにテストを書けると、コードとテストの心理的な距離が近くなってテストが書きやすくなる、という肌感があります。(諸説あります) 実装とテストが混ざって汚れるのが嫌という意見も理解できますが、それはありつつ認めた上で、あとでリファクタする前提で最初の一歩をその実装に書けると嬉しい、という気持ちがあります。 現状の Node だととりあえず assert するだけという単純なテストを書くことは可能ですが、構造化する方法がないので、簡単なスクラッチの時ぐらいしか行われません。 // test.js import

                                Node/Deno でソースコードにテストを書く
                              • Introducing Ezno

                                Ezno is an experimental compiler I have been working on and off for a while. In short, it is a JavaScript compiler featuring checking, correctness and performance for building full-stack (rendering on the client and server) websites. This post is just an overview of some of the features I have been working on which I think are quite cool as well an overview on the project philosophy ;) It is still

                                  Introducing Ezno
                                • Writing a C compiler in 500 lines of Python

                                  A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

                                  • Joining CSV and JSON data with an in-memory SQLite database

                                    19th June 2021 The new sqlite-utils memory command can import CSV and JSON data directly into an in-memory SQLite database, combine and query it using SQL and output the results as CSV, JSON or various other formats of plain text tables. sqlite-utils memory The new feature is part of sqlite-utils 3.10, which I released this morning. You can install it using brew install sqlite-utils or pip install

                                      Joining CSV and JSON data with an in-memory SQLite database
                                    • The AWK Programming Language, Second Edition

                                      Updated Mon Feb 5 10:22:02 EST 2024 Available in paperback and e-book formats. Order at Amazon and other fine booksellers. Introduction This page holds material related to the second edition of The AWK Programming Language. The first edition was written by Al Aho, Brian Kernighan and Peter Weinberger in 1988. Awk has evolved since then, there are multiple implementations, and of course the computi

                                      • RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社

                                        概要 原著者の許諾を得て翻訳・公開いたします。 英語記事: So You Want To Remove The GVL? | byroot’s blog 原文公開日: 2025/01/29 原著者: byroot -- Railsコアコミッター、Rubyコミッターであり、ShopifyのRuby/Railsインフラチームのシニアスタッフエンジニアです 日本語タイトルは内容に即したものにしました。 GVLは「グローバルVMロック」の略ですが、「ジャイアントVMロック」とされることもあります。 参考: Rubyの(グローバル)VMロックをトレースする(翻訳) 参考: スレッド (Ruby 3.4 リファレンスマニュアル) 私がやりたいのは、Pitchforkに関する記事を書いて、これがどんな理由でできたのか、なぜ現在のような形になったのか、そして今後どうなるのかについて説明することです。しかし

                                          RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社
                                        • Ruby Parser開発日誌 (6) - parse.yのMaintainabilityの話 - かねこにっき

                                          前回のあらすじ Ruby Parser開発日誌 (5) - Lrama LALR (1) parser generatorを実装した - かねこにっき Error Recoveryを実装するためにLrama LALR (1) parser generatorを実装しました。 Error Recoveryについては目処がたったので今回はparse.yのMaintainabilityをいかにして改善するか考えたいと思います。 parse.yの難しさ Rubyのparse.yの難しさについては聞く人によって異なる回答が返ってくるところですが、おおよそ以下のようにまとめることができると思います。 ファイルの行数が多い shift/reduce conflictやreduce/reduce conflict時に何が起きているか分かりにくい Bisonが原始的な記法しか提供していないので全ての規則を書

                                            Ruby Parser開発日誌 (6) - parse.yのMaintainabilityの話 - かねこにっき
                                          • Python 3.13 gets a JIT

                                            Happy New Year everyone! In late December 2023 (Christmas Day to be precise), CPython core developer Brandt Bucher submitted a little pull-request to the Python 3.13 branch adding a JIT compiler. This change, once accepted would be one of the biggest changes to the CPython Interpreter since the Specializing Adaptive Interpreter added in Python 3.11 (which was also from Brandt along with Mark Shann

                                              Python 3.13 gets a JIT
                                            • 複数の AWS アカウントの AWS Security Hub 検出結果を Google BigQuery と Google DataPortal(DataStudio) により可視化した話 - Adwaysエンジニアブログ

                                              こんにちは、インフラの天津です。今日は 複数アカウントの AWS Security Hub 検出結果の可視化についてお話したいと思います。 前提 モチベーション AWS Security Hub とは 構想 ツール・サービスの選定 検出結果データのエクスポートについて 可視化用データベース(またはクエリサービス)と可視化ツールについて 構築 全体像 検出結果データエクスポート 検出結果データの S3 -> GCS への転送と BigQuery へのインポート Security Hub からエクスポートしたデータには BigQuery のカラム名に使用できない文字(以下禁則文字)が使用されている件 自動判別で生成されたスキーマでインポートした際に INTEGER 型のカラムに STRING 型のデータが入ってくることがありインポートエラーが発生する件 AWS アカウントデータの S3 ->

                                                複数の AWS アカウントの AWS Security Hub 検出結果を Google BigQuery と Google DataPortal(DataStudio) により可視化した話 - Adwaysエンジニアブログ
                                              • Changing std::sort at Google’s Scale and Beyond

                                                TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

                                                  Changing std::sort at Google’s Scale and Beyond
                                                • Taming Floating-Point Sums | orlp.net

                                                  Suppose you have an array of floating-point numbers, and wish to sum them. You might naively think you can simply add them, e.g. in Rust: fn naive_sum(arr: &[f32]) -> f32 { let mut out = 0.0; for x in arr { out += *x; } out } This however can easily result in an arbitrarily large accumulated error. Let’s try it out: naive_sum(&vec![1.0; 1_000_000]) = 1000000.0 naive_sum(&vec![1.0; 10_000_000]) = 1

                                                  • Optimizing your LLM in production

                                                    Note: This blog post is also available as a documentation page on Transformers. Large Language Models (LLMs) such as GPT3/4, Falcon, and LLama are rapidly advancing in their ability to tackle human-centric tasks, establishing themselves as essential tools in modern knowledge-based industries. Deploying these models in real-world tasks remains challenging, however: To exhibit near-human text unders

                                                      Optimizing your LLM in production
                                                    • Basic Feature Engineering with DuckDB

                                                      Introduction Data preprocessing is a necessary step in any machine learning workflow, affecting both the model’s effectiveness and the ease of maintenance. While scikit-learn is commonly used for preprocessing due to its integration with the broader Python ecosystem, DuckDB offers a practical alternative by enabling SQL-based data transformations within Python. Its declarative syntax supports modu

                                                      • Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew

                                                        Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction In this series of tutorials, we will delve into creating simple 2D games in Common Lisp. The result of the first part will be a development environment setup and a basic simulation displaying a 2D scene with a large number of physical objects. It is assumed that the reader is familiar with some high-level programming language, has a gener

                                                          Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew
                                                        • 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
                                                          • Perl 5.32の連鎖比較(Chained comparisons)はどの様に実装されているのか - Acme::AnaTofuZ->new;

                                                            この記事はPerl Advent Calendar 2020と琉大 Advent Calendar 2020の11日目の記事です。 PerlはPerl5になって長いですが、現在の最新の安定版のバージョンは5.32です。 Perl5.32で取り入れられた(厳密には5.31からですが)のおもしろ機能として連鎖比較(Chained comparisons)が存在します。 今までPerlで数値などが特定の範囲に含まれているかどうかをif文で判定するには次の様に書く必要がありました。 if (10 < $n && $n <= 20) これがこう書ける様になります!!! if ( 10 < $n <= 20 ) {...} 便利!!!!!!!!!!!!!!!!!!!!!!!! ...........というわけで、この便利な連鎖比較がどの様に実装されているかを探検してみます。 言語処理系の実装 さて今か

                                                              Perl 5.32の連鎖比較(Chained comparisons)はどの様に実装されているのか - Acme::AnaTofuZ->new;
                                                            • RFC 9562: Universally Unique IDentifiers (UUIDs)

                                                               Internet Engineering Task Force (IETF) K. Davis Request for Comments: 9562 Cisco Systems Obsoletes: 4122 B. Peabody Category: Standards Track Uncloud ISSN: 2070-1721 P. Leach University of Washington May 2024 Universally Unique IDentifiers (UUIDs) Abstract This specification defines UUIDs (Universally Unique IDentifiers) -- also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform Resou

                                                                RFC 9562: Universally Unique IDentifiers (UUIDs)
                                                              • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                                                                Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                                                                • Snowflakeに中森明菜データレイク(通称NADL)を構築しました | DevelopersIO

                                                                  大阪オフィスの玉井です。 題名の通り、極めて先進的な(?)データレイクの構築に成功したので、当記事にて詳細をお伝え致します。 概要説明 NADL(Nakamori Akina Data Lake)とは? 日本が誇る歌姫である中森明菜氏の(ほぼ)全ての楽曲に関するデータを保存したデータレイクです。 SnowflakeはDWHのイメージが強いですが、データレイクを構築・運用する機能を備えています。今回、Snowflakeのデータレイク周りの機能を活用して、NADLを構築しました。 構築作業の流れ SpotifyのAPIから中森明菜の楽曲データを取得する 楽曲データの取得には Get Track’s Audio Analysisを使用 取得した楽曲データをGoogle Cloud Storage(GCS)にアップロードする 上記のGCS(のバケット)をSnowflakeの外部ステージとして連携す

                                                                    Snowflakeに中森明菜データレイク(通称NADL)を構築しました | DevelopersIO
                                                                  • CohereLabs/c4ai-command-r-plus · Hugging Face

                                                                    ","chat_template":[{"name":"default","template":"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif false == true %}{% set loop_messages = messages %}{% set system_message = 'You are Command-R, a brilliant, sophisticated, AI-assistant trained to assist human users by providing thorough responses. You

                                                                      CohereLabs/c4ai-command-r-plus · Hugging Face
                                                                    • A viable solution for Python concurrency

                                                                      Concerns over the performance of programs written in Python are often overstated — for some use cases, at least. But there is no getting around the problem imposed by the infamous global interpreter lock (GIL), which severely limits the concurrency of multi-threaded Python code. Various efforts to remove the GIL have been made over the years, but none have come anywhere near the point where they w

                                                                      • krish's blog • Parsing JSON in 500 lines of Rust

                                                                        Last semester at university, I took a course called "Syntax-Based Tools and Compilers". It focused on building a scanner, parser, compiler, and so on for a language called PL0. We used Python in the course, but I was really interested in learning Rust at the time. So, I decided to embark on a side project (yes, another one!). This time, I wanted to build a JSON parser in Rust. My goal was to test

                                                                          krish's blog • Parsing JSON in 500 lines of Rust
                                                                        • Hypothesisとpytestを使ってDjangoのユニットテストを書く - 何かを書き留める何か

                                                                          Hypothesisとは何か、プロパティベーステストとは何か Hypothesisは、Python向けのプロパティベーステストのライブラリである。 プロパティベーステストは、生成された多数の入力データに対してプロパティ(性質)が満たされるかどうかをテストする手法である。 HaskellのQuickCheckライブラリが初出で、現在は各プログラミング言語に移植されている。 従来のユニットテストは、ある程度固定したテストデータを指定してテストを行っていた。 その際、境界値分析などで妥当なパラメータを決定していた。 しかし、境界値分析が必ず通用するとは限らないし、人間が行う以上、ミスも発生する。 プロパティベーステストはデータを固定する代わりにそのデータが満たすプロパティを指定してテストを行う。 実際のテストケースはHypothesisがプロパティを満たすパラメータを決めて生成してくれる。 人力

                                                                            Hypothesisとpytestを使ってDjangoのユニットテストを書く - 何かを書き留める何か
                                                                          • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                                                                            233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                                                                            • Ruby: Shopifyによる新しい高速な静的型分析の実験(翻訳)|TechRacho by BPS株式会社

                                                                              概要 CC BY-NC-SA 4.0 Deedに基づいて翻訳・公開いたします。 英語記事: Interprocedural Sparse Conditional Type Propagation | Rails at Scale 原文公開日: 2025/02/24 原著者: Max Bernstein、Maxime Chevalier-Boisvert CC BY-NC-SA 4.0 Deed | 表示 - 非営利 - 継承 4.0 国際 | Creative Commons 日本語タイトルは内容に即したものにしました。 参考: 疎な条件分岐を考慮した定数伝播(Sparse conditional constant propagation) - Wikipedia 11時をお知らせします。皆さんの大事な変数がどこを指しているかちゃんと把握していますか?1 def shout(obj) ob

                                                                                Ruby: Shopifyによる新しい高速な静的型分析の実験(翻訳)|TechRacho by BPS株式会社
                                                                              • How a CPU works: Bare metal C on my RISC-V toy CPU

                                                                                I always wanted to understand how a CPU works, how it transitions from one instruction to the next and makes a computer work. So after reading Ken Shirrif’s blog about a bug fix in the 8086 processor I thought: Well, let’s try to write one in a hardware description language. This post is a write up of my learning experiment. I’ll walk through my steps of creating an emulator, compiling and linking

                                                                                • How I developed a faster Ruby interpreter | Red Hat Developer

                                                                                  In this article, I will describe my efforts to implement a faster interpreter for CRuby, the Ruby language interpreter, using a dynamically specialized internal representation (IR). I believe this article will interest developers trying to improve the interpreter performance of dynamic programming languages (e.g., CPython developers). I will cover the following topics: Existing CRuby interpreter a

                                                                                    How I developed a faster Ruby interpreter | Red Hat Developer