並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 61件

新着順 人気順

python inline if else returnの検索結果1 - 40 件 / 61件

  • Pythonが速度改善に本気出すと聞いたので恒例のたらい回しベンチをとってみたら、RubyがYJITですごく速くなっていて驚いた話 - Smalltalkのtは小文字です

    2022-09-09改訂: gcc バージョンが古すぎたのと、C が内部計測でなかった点を改め計測しなおしました。結果、Rust は C より速くはなくなりました。紛らわしいことで、ごめんなさい。また、gcc のバージョンアップに伴い、Python および Ruby についてはビルドと計測をしなおしたので、これらも少し速い値に変わっています。この点もどうぞあしからず。 2022-09-10追記:ご要望のあった Python numba.njit 使用時と Go の結果を追加しました。PHP は JIT 有効化が面倒だったので断念しました^^; 2022-09-10追記2:C の計測で clock() を使うのはフェアではないという指摘がありましたので、念のため clock_gettime() を使用したコードに差し替えました。結果に大きな差はありません。 2022-09-10追記3:PHP

      Pythonが速度改善に本気出すと聞いたので恒例のたらい回しベンチをとってみたら、RubyがYJITですごく速くなっていて驚いた話 - Smalltalkのtは小文字です
    • プロと読み解く 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 - クックパッド開発者ブログ
      • プロと読み解く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
        • The Prompt Engineering Playbook for Programmers

          Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

            The Prompt Engineering Playbook for Programmers
          • 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

            • copilot-explorer

              Copilot Internals | thakkarparth007.github.io Github Copilot has been incredibly useful to me. It can often magically read my mind and make useful suggestions. The thing that surprised me the most was its ability to correctly “guess” functions/variables from surrounding code – including from other files. This can only happen, if the copilot extension sends valuable information from surrounding cod

              • 近傍探索ライブラリ「Annoy」のコード詳解 - ZOZO TECH BLOG

                はじめまして、ZOZO研究所福岡の家富です。画像検索システムのインフラ、機械学習まわりを担当しています。 今回は画像検索システムでお世話になっているAnnoyについてじっくり紹介したいと思います。 目次 目次 Annoyについて 近傍探索について Annoyのソースコードを読むときのポイント AnnoyIndexというクラスのインスタンスを作る インストール過程について PythonのC/C++拡張 Annoyの実装 1. add_item 2. build 3. get_nns_by_vector 4. build再考 他に問題となる点について CPU依存部分 ディスクかメモリか まとめ さいごに Annoyについて Annoyは、SpotifyによるPython近傍探索ライブラリです。 github.com 弊社のテックブログでも以前に取り上げています。 techblog.zozo.c

                  近傍探索ライブラリ「Annoy」のコード詳解 - ZOZO TECH BLOG
                • 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株式会社
                  • 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 start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                      Prototyping in Rust | corrode Rust Consulting
                    • 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
                      • 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
                        • Amazon ECS deployment circuit breaker のご紹介 | Amazon Web Services

                          Amazon Web Services ブログ Amazon ECS deployment circuit breaker のご紹介 ※日本語字幕の表示には、設定 → 字幕 → 自動翻訳 → 日本語をご選択ください EC2 および Fargate コンピュートタイプ用の Amazon ECS deployment circuit breaker をパブリックプレビューで発表しました。この機能により、Amazon ECS をご利用のお客様は、手動での作業を行うことなく、不健全なサービスデプロイを自動的にロールバックできるようになります。これにより、お客様は失敗したデプロイを迅速に発見できるようになり、失敗したタスクのためにリソースが消費されたり、デプロイが無期限に遅延したりすることを心配する必要がなくなります。 以前は、Amazon ECS でデプロイメントタイプにローリングアップデートを使

                            Amazon ECS deployment circuit breaker のご紹介 | Amazon Web Services
                          • A new way to bring garbage collected programming languages efficiently to WebAssembly · V8

                            Show navigation A recent article on WebAssembly Garbage Collection (WasmGC) explains at a high level how the Garbage Collection (GC) proposal aims to better support GC languages in Wasm, which is very important given their popularity. In this article, we will get into the technical details of how GC languages such as Java, Kotlin, Dart, Python, and C# can be ported to Wasm. There are in fact two m

                            • Kalyn: a self-hosting compiler for x86-64

                              Over the course of my Spring 2020 semester at Harvey Mudd College, I developed a self-hosting compiler entirely from scratch. This article walks through many interesting parts of the project. It’s laid out so you can just read from beginning to end, but if you’re more interested in a particular topic, feel free to jump there. Or, take a look at the project on GitHub. Table of contents What the pro

                              • A Walk with LuaJIT

                                The following is a chronicle of implementing a general purpose zero-instrumentation BPF based profiler for LuaJIT. Some assumptions are made about what this entails and it may be helpful to read some of our other work in this area. One major change from prior efforts is that instead of working with the original Parca unwinder we are now working with the OpenTelemetry eBPF profiler. If you missed t

                                  A Walk with LuaJIT
                                • 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

                                  • So You Want To Remove The GVL?

                                    I want to write a post about Pitchfork, explaining where it comes from, why it is like it is, and how I see its future. But before I can get to that, I think I need to share my mental model on a few things, in this case, Ruby’s GVL. For quite a long time, it has been said that Rails applications are mostly IO-bound, hence Ruby’s GVL isn’t that big of a deal and that has influenced the design of so

                                    • Rustacean のための F# 入門

                                      また、 F# の decimal 型は Rust には標準で存在しませんが、 5m という書き方をします。 数字の間に _ を入れて読みやすくすることができるのも同様です。 let num = 8_000_000; その他の型について ... F# の char は Rust の char に似ていますが、 前者が UTF-16 なのに対し、 Rust の char は UTF-32 で常に 4bytes です。これは、 Rust とは違い、 char の配列がほぼそのまま string として扱えることを示しています。 Rust の unit と F# の unit は両方とも () で表され、役割も同じです。 文字列型に関しては Rust には色々あるので、簡単な比較はできませんが、 string は immutable な char の配列で、 mutable に扱いたい場合は St

                                        Rustacean のための F# 入門
                                      • 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

                                        • Cursor はどこが GitHub Copilot より優れているのか(独自機能Docsの実力) - GMOインターネットグループ グループ研究開発本部

                                          D.M. です。 AI 搭載で話題の IDE である Cursor について、 GitHub Copilot と比べた場合の利点を掘り下げてみます。 結論ファースト ・現段階では一長一短。Cursor にしかない機能もあれば、 GitHub Copilotにしかない機能もある。 → 特に Cursor の Docs は独自機能(GitHub Cipolotにはない) ・両方併用できる。 ・Cursor のAI自動プログラミングスキルは既存の「GPT-4」と同等(ただ、モデルを変更できる) 簡単な単発バッチ処理は高速で実装できる。 複雑化すると100点は難しい。 現段階では、AIに全部書かせるのではなく、補助ツールとしてとらえるほうが効果的。 導入編:Cursorとは AI がプログラミングしてくれる時代 2022年11月にChatGPTが発表されて以降、 LLM は簡単なプログラミングが可

                                          • September 2024 (version 1.94)

                                            Update 1.94.1: The update addresses this security issue. Update 1.94.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the September 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Find in Explorer - Quickly find file

                                              September 2024 (version 1.94)
                                            • prompts.chat

                                              Welcome to the “Awesome ChatGPT Prompts” repository! While this collection was originally created for ChatGPT, these prompts work great with other AI models like Claude, Gemini, Hugging Face Chat, Llama, Mistral, and more. ChatGPT is a web interface created by OpenAI that provides access to their GPT (Generative Pre-trained Transformer) language models. The underlying models, like GPT-4o and GPT-o

                                              • January 2023 (version 1.75)

                                                Update 1.75.1: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Profiles - Create and share profiles to configure extensions, settings, shortcuts, and more. VS

                                                  January 2023 (version 1.75)
                                                • Rust on MIPS64 Windows NT 4.0

                                                  Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

                                                    Rust on MIPS64 Windows NT 4.0
                                                  • August 2021 (version 1.60)

                                                    Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.60.1: The update addresses these issues. Update 1.60.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the August 2021 release of Visual Studio Code. There are many updates in this version that we hope you w

                                                      August 2021 (version 1.60)
                                                    • o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama

                                                      はじめに自律的にプログラミングをしてくれるAIエンジニアをいい感じに動かせるようになってきたので、今日はChatGPT + devinで研究的なことをさせてみます。 自動研究といえば、昨年の夏に話題になった、Sakana AIのAIサイエンティストが有名です。 ただ、研究のネタを考えるのはまだあまり得意でない気がしたので、今回は適宜、そこはスマホで指示を出しながら、human in the loopで進めていきます。 最初のセットアップを除いて、チャットをするだけで、基本的な研究作業をこなせそう感じでした。 下準備: リポジトリを作ってdevinに登録するはじめに、パソコンを使って設定をします。このセクションの作業以降は、スマホがあればOKです。 githubでレポジトリを作り、一つだけ、開発方針に関するファイルを作っておきます。 DevelopmentPolycy.md 開発、コメントな

                                                        o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama
                                                      • A 2025 Survey of Rust GUI Libraries

                                                        I did this in 2020 and then again in 2021, but I’m in the mood to look around again. Let’s look through Are We GUI Yet? and see what’s up these days. The task today is to have a text label and an input field that can change the text in the label. In React, for example, this is basically free: const Demo = () => { let [state, setState] = useState("Hello, world!"); return ( <div> <p>{state}</p> <inp

                                                        • What's New in Emacs 28.1?

                                                          Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                                          • Type Parameters Proposal

                                                            Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                                            • bytecode interpreters for tiny computers ⁑ Dercuano

                                                              Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                              • A Lisp REPL as my main shell

                                                                If you enjoy this article and would like to help me keep writing, consider chipping in, every little bit helps to keep me going :) Thank you! Update: As of 2021-02-07, not all the code and configurations used in this presentation have been published. Should happen in the coming days, stay tuned! Introduction video The concepts I’m going to present in this article were featured in a presentation at

                                                                • A string formatting library in 65 lines of C++

                                                                  In this write-up, I will walk you through an implementation of a string formatting library for C++ I came up with for my video game. The end result came out really compact, at only 65 lines of code—providing a skeleton that can be supplemented with additional functionality at low cost. Usage Given a format buffer… char buffer[64]; String_Buffer buf = {str, sizeof str}; …the fmt::format function pr

                                                                  • Gregory Szorc's Digital Home | Rust is for Professionals

                                                                    A professional programmer delivers value through the authoring and maintaining of software that solves problems. (There are other important ways for professional programmers to deliver value but this post is about programming.) Programmers rely on various tools to author software. Arguably the most important and consequential choice of tool is the programming language. In this post, I will articul

                                                                    • Plan 9 Desktop Guide

                                                                      PLAN 9 DESKTOP GUIDE INDEX What is Plan 9? Limitations and Workarounds Connecting to Other Systems VNC RDP SSH 9P Other methods Porting Applications Emulating other Operating Systems Virtualizing other Operating Systems Basics Window Management Copy Pasting Essential Programs Manipulating Text in the Terminal Acme - The Do It All Application Multiple Workspaces Tiling Windows Plumbing System Admin

                                                                      • [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO

                                                                        Introduction eBPFは、Linuxカーネル対して動的に機能を拡張する技術で、 カーネルで独自のプログラムを安全に実行することができます。 これらのプログラムは任意のポイントに設定可能で、さまざまなタイミングで 実行できます。 eBPFは、カーネル再構築なしでカーネルの動作をカスタマイズすることができるため、 近年いろいろな用途に使われています。 今回はBCC/bpftoolで少しeBPFを使ってみた後、 Aya(eBPF用Rustフレームワーク)を使ってXDPのサンプルをつくってみます。 eBPF? eBPFはExtended Berkeley Packet Filterの略で、 もともとはLinuxでデータパケットを効率的にフィルタリングするために 開発された技術ですが、現在はその機能が拡張されて、 カーネルのコード変更やモジュール追加なしで 独自のプログラムをカーネルで実

                                                                          [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO
                                                                        • May 2023 (version 1.79)

                                                                          Update 1.79.1: The update addresses this security issue. Update 1.79.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the May 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Read-only mode - Mark specific files and f

                                                                            May 2023 (version 1.79)
                                                                          • Writing Pong in Rust for my OS Written in Rust – Stephen Marz

                                                                            This post is part of a larger effort you can view over here: https://osblog.stephenmarz.com. Pong being played on my custom, RISC-V OS in Rust! Video Contents OverviewApplication Programmer’s Interface (API)Starting RoutinesSystem CallsDrawing PrimitivesEvent HandlingStart Our GameGame LoopPLAY Overview We last left off writing a graphics driver and an event driver for our operating system. We als

                                                                            • 開発生産性があがる生成AIを使った開発ツールの紹介 | CyberAgent Developers Blog

                                                                              これはCyberAgent Developers Advent Calendar 2023の13日目の記事です よければ他の記事も見てみてください はじめに Developer Productivity室(DP室)のuncle__koです。 DP室ではサイバーエージェントグループにおける事業開発の開発生産性(主にソフトウェアデリバリー領域)を大きく前進させるための開発に従事してます。 OpenAI社が2022年11月30日に公開したChatGPTを皮切りに、いまでは生成AIを聞かない日はないムーブメントになっているかと思います。 ChatGPTやGitHub Copilotの登場によって、日々の開発業務もかなり効率的に生産性が上がっていることかと思います。 今回は生成AI x Developer Productivityをテーマに、開発生産性があがりそうな、個人的に気になっている生成AIを

                                                                                開発生産性があがる生成AIを使った開発ツールの紹介 | CyberAgent Developers Blog
                                                                              • cuneicode, and the Future of Text in C

                                                                                Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                                                                  cuneicode, and the Future of Text in C
                                                                                • Six Programming Languages I'd Like to See

                                                                                  July 13, 2022 Six Programming Languages I'd Like to See A few weird ideas for programming languages I came up with that it'd be "really" "cool" if someone made (wink) I got 1,000 words into "what, exactly, is software complexity" before remembering that this is supposed to be less effort than the blog. So instead I'm going to list some ideas I had for programming languages. I think all of these ar

                                                                                    Six Programming Languages I'd Like to See