並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 38 件 / 38件

新着順 人気順

python inline for loop if elseの検索結果1 - 38 件 / 38件

  • IAM ロールで 100 連鎖してみた | DevelopersIO

    俺達はいつまでも立ち尽くし見つめていた━━━ 数多の IAM ロールが移ろうように連鎖していく、そのさまを。 コンバンハ、「 IAM ロールはお面」おじさんです。 この世で最も大切なもの、それは繋がりであり、そして連なりですよね。 ということで、早速 IAM ロールで 10 連鎖してみました。 いや、せっかくなので 100 連鎖くらい行ってみましょうか。そうしましょう。興奮してきたな。 まとめ IAM ロールはそんな連鎖させるようなもんじゃない。 手始めに IAM ロールを 101 個作ろう 早速、 100 連鎖のために IAM ロールを 101 個作ります。 「 100 連鎖なのに 101 個なの?」と思うかもしれませんが、ヤマタノオロチの「股(首と首の間)」は 7 個しかありませんよね。(「岐」は 8 個あるんですけどね。)それと同じです。 101 個くらいの数なら「温かみのある手作業

      IAM ロールで 100 連鎖してみた | DevelopersIO
    • プロと読み解く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

          • LogLog Games

            The article is also available in Chinese. Disclaimer: This post is a very long collection of thoughts and problems I've had over the years, and also addresses some of the arguments I've been repeatedly told. This post expresses my opinion the has been formed over using Rust for gamedev for many thousands of hours over many years, and multiple finished games. This isn't meant to brag or indicate su

            • 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
                  • 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

                            • 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

                              • 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
                                        • Why We Use Julia, 10 Years Later

                                          Exactly ten years ago today, we published "Why We Created Julia", introducing the Julia project to the world. At this point, we have moved well past the ambitious goals set out in the original blog post. Julia is now used by hundreds of thousands of people. It is taught at hundreds of universities and entire companies are being formed that build their software stacks on Julia. From personalized me

                                            Why We Use Julia, 10 Years Later
                                          • 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

                                              • 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

                                                • 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 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

                                                    • 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

                                                      • 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

                                                        • 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
                                                          • The Pitchfork Story

                                                            A bit more than two years ago, as part of my work in Shopify’s Ruby and Rails Infrastructure team, I released a new Ruby HTTP server called Pitchfork. It has a bit of an unusual design and makes hard tradeoffs, so I’d like to explain the thought process behind these decisions and how I see the future of that project. Unicorn’s Design Is Fine Ever since I joined Shopify over 11 years ago, the main

                                                            • Flipping Pages: An analysis of a new Linux vulnerability in nf_tables and hardened exploitation techniques

                                                              This blogpost is the next instalment of my series of hands-on no-boilerplate vulnerability research blogposts, intended for time-travellers in the future who want to do Linux kernel vulnerability research. Specifically, I hope beginners will learn from my VR workflow and the seasoned researchers will learn from my techniques. In this blogpost, I'm discussing a bug I found in nf_tables in the Linux

                                                              • 地面を見下ろす少年の足蹴にされる私

                                                                Contracts提案(P2900R14)がC++26に向けて採択され、C++26では契約プログラミング機能を言語サポートの下で実践できるようになります。この記事は、その契約プログラミング機能の一部として導入されている違反ハンドラというものについてのお話です。 契約プログラミング機能における違反ハンドラの概要 ユーザー定義違反ハンドラ std::contracts::contract_violation より一般的な利用 外部ツールの共通コールバック機構として 実行時エラーハンドリングのコールバック機能として(P3290R2) プロファイル機能の実行時検査におけるコールバックとして(P3081R0) 未定義動作の実行時ハンドリング機能として(P3100R0, P3229R1, P3205R0) 参考文献 契約プログラミング機能における違反ハンドラの概要 C++26の契約プログラミング機能は

                                                                  地面を見下ろす少年の足蹴にされる私
                                                                • How I write code using Cursor: A review

                                                                  In forums relating to AI and AI coding in particular, I see a common inquiry from experienced software developers: Is anyone getting value out of tools like Cursor, and is it worth the subscription price? A few months into using Cursor as my daily driver for both personal and work projects, I have some observations to share about whether this is a "need-to-have" tool or just a passing fad, as well

                                                                  • Understanding Memory Management, Part 1: C

                                                                    UPDATED: 2025-02-15: Fixed some bugs in the examples and pointed out that you don't usually just want to panic on memory allocation failure. I've been writing a lot of Rust recently, and as anyone who has learned Rust can tell you, a huge part of the process of learning Rust is learning to work within its restrictive memory model, which forbids many operations that would be perfectly legal in eith

                                                                      Understanding Memory Management, Part 1: C
                                                                    • A History of Clojure

                                                                      71 A History of Clojure RICH HICKEY, Cognitect, Inc., USA Shepherd: Mira Mezini, Technische Universität Darmstadt, Germany Clojure was designed to be a general-purpose, practical functional language, suitable for use by professionals wherever its host language, e.g., Java, would be. Initially designed in 2005 and released in 2007, Clojure is a dialect of Lisp, but is not a direct descendant of any

                                                                      • Async Ruby is the Future of AI Apps (And It’s Already Here)

                                                                        After a decade as an ML engineer/scientist immersed in Python’s async ecosystem, returning to Ruby felt like stepping back in time. Where was the async revolution? Why was everyone still using threads for everything? SolidQueue, Sidekiq, GoodJob – all thread-based. Even newer solutions defaulted to the same concurrency model. Coming from Python, where the entire community had reorganized around as

                                                                        • Writing Truly Memory Safe JIT Compilers

                                                                          Last month the V8 team published an excellent blog post on what they call the V8 Sandbox. This isn’t a sandbox for your JavaScript code — it’s intended to mitigate browser exploits caused by bugs in the JIT compiler itself. That’s important work because they report that most Chrome exploits start with a V8 memory safety bug. V8 is written in C++, so it may seem like these are the sort of bugs you’

                                                                            Writing Truly Memory Safe JIT Compilers
                                                                          • Following up on the Python JIT

                                                                            Performance of Python programs has been a major focus of development for the language over the last five years or so; the Faster CPython project has been a big part of that effort. One of its subprojects is to add an experimental just-in-time (JIT) compiler to the language; at last year's PyCon US, project member Brandt Bucher gave an introduction to the copy-and-patch JIT compiler. At PyCon US 20

                                                                            • Hay - Custom Languages for Unix Systems

                                                                              Example Hay could be used to configure a hypothetical Linux package manager: # cpython.hay -- A package definition hay define Package/TASK # define a tree of Hay node types Package cpython { # a node with attributes, and children version = '3.9' url = 'https://python.org' TASK build { # a child node, with Oil code ./configure make } } This program evaluates to a JSON tree, which you can consume fr

                                                                              1