並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 51件

新着順 人気順

like operator in python if statementの検索結果1 - 40 件 / 51件

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

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

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • Introducing Amazon Managed Workflows for Apache Airflow (MWAA) | Amazon Web Services

      AWS News Blog Introducing Amazon Managed Workflows for Apache Airflow (MWAA) As the volume and complexity of your data processing pipelines increase, you can simplify the overall process by decomposing it into a series of smaller tasks and coordinate the execution of these tasks as part of a workflow. To do so, many developers and data engineers use Apache Airflow, a platform created by the commun

        Introducing Amazon Managed Workflows for Apache Airflow (MWAA) | Amazon Web Services
      • 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

          • Rewriting the Ruby parser

            At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C

              Rewriting the Ruby parser
            • Incident Metrics in SRE

              Štěpán Davidovič Incident Metrics in SRE Critically Evaluating MTTR and Friends Boston Farnham Sebastopol Tokyo Beijing Boston Farnham Sebastopol Tokyo Beijing 978-1-098-10313-2 [LSI] Incident Metrics in SRE by Štěpán Davidovič Copyright © 2021 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebas

              • 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

                • Agents

                  Intelligent agents are considered by many to be the ultimate goal of AI. The classic book by Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach (Prentice Hall, 1995), defines the field of AI research as “the study and design of rational agents.” The unprecedented capabilities of foundation models have opened the door to agentic applications that were previously unimaginabl

                    Agents
                  • Weird Lexical Syntax

                    I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                      Weird Lexical Syntax
                    • 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

                      • 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

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

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

                            • Implementing Logic Programming

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

                                Implementing Logic Programming
                              • Font with Built-In Syntax Highlighting

                                Note: I received a lot of great feedback from the discussions at Mastodon and Hacker News, so I've updated the post with some improvements to the font! I've also added some further examples and acknowledgements at the end. Syntax Highlighting in Hand-Coded Websites The problem I have been trying to identify practical reasons why hand-coding websites with HTML and CSS is so hard (by hand-coding, I

                                • Agentic GraphRAG for Commercial Contracts | Towards Data Science

                                  In every business, legal contracts are foundational documents that define the relationships, obligations, and responsibilities between parties. Whether it’s a partnership agreement, an NDA, or a supplier contract, these documents often contain critical information that drives decision-making, risk management, and compliance. However, navigating and extracting insights from these contracts can be a

                                    Agentic GraphRAG for Commercial Contracts | Towards Data Science
                                  • 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

                                    • Little Languages Are The Future Of Programming

                                      I’ve become convinced that “little languages”—small languages designed to solve very specific problems—are the future of programming, particularly after reading Gabriella Gonzalez’s The end of history for programming and watching Alan Kay’s Programming and Scaling talk. You should go check them out because they’re both excellent, but if you stick around I’ll explain just what I mean by “little lan

                                        Little Languages Are The Future Of Programming
                                      • 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

                                        • Zig in 30 minutes

                                          test.md A half-hour to learn Zig This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/ Basics the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with) You'll want to declare a main() function to get

                                            Zig in 30 minutes
                                          • Why People are Angry over Go 1.23 Iterators - gingerBill

                                            NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024). From what I can gather, many people seem to dislike the design. I wanted to give m

                                            • How to write a linter using tree-sitter in an hour

                                              This article was discussed on Hacker News. This is a continuation of my last post on how to write a tree-sitter grammar in an afternoon. Building on the grammar we wrote, now we’re going to write a linter for Imp, and it’s even easier! The final result clocks in less than 60 SLOC and can be found here. Recall that tree-sitter is an incremental parser generator. That is, you give it a description o

                                              • Lesser Known PostgreSQL Features

                                                In 2006 Microsoft conducted a customer survey to find what new features users want in new versions of Microsoft Office. To their surprise, more than 90% of what users asked for already existed, they just didn't know about it. To address the "discoverability" issue, they came up with the "Ribbon UI" that we know from Microsoft Office products today. Office is not unique in this sense. Most of us ar

                                                  Lesser Known PostgreSQL Features
                                                • A guide to React design patterns - LogRocket Blog

                                                  Editor’s note: This guide to React design patterns was last reviewed for accuracy by Isaac Okoro on 12 April 2024. The article was also updated to add four more design patterns, covering prop combination, controlled components, forwardRefs, and conditional rendering. It was previously updated to include information about the render props pattern and state reducer pattern. Check out this article fo

                                                    A guide to React design patterns - LogRocket Blog
                                                  • Engineering Trade-Offs in Automatic Differentiation: from TensorFlow and PyTorch to Jax and Julia - Stochastic Lifestyle

                                                    December 25 2021 in Julia, Programming, Science, Scientific ML | Tags: automatic differentiation, compilers, differentiable programming, jax, julia, machine learning, pytorch, tensorflow, XLA | Author: Christopher Rackauckas To understand the differences between automatic differentiation libraries, let’s talk about the engineering trade-offs that were made. I would personally say that none of thes

                                                      Engineering Trade-Offs in Automatic Differentiation: from TensorFlow and PyTorch to Jax and Julia - Stochastic Lifestyle
                                                    • How it became like this? Ruby Range class

                                                      Understanding the core class design and usage via its evolution Years ago, my studies into the Ruby Evolution started with the persuasion that mastering the programming language to express one’s intentions clearly and efficiently may grow significantly by understanding how it evolved and what intentions were put behind its various elements. Moving back through the history of a change of some eleme

                                                        How it became like this? Ruby Range class
                                                      • The Birth of UNIX - CoRecursive Podcast

                                                        When you work on your computer, there are so many things you take for granted: operating systems, programming languages, they all have to come from somewhere. In the late 1960s and 1970s, that somewhere was Bell Labs, and the operating system they were building was UNIX. They were building more than just an operating system though. They were building a way to work with computers that had never exi

                                                          The Birth of UNIX - CoRecursive Podcast
                                                        • Rust Programming Language Tutorial – How to Build a To-Do List App

                                                          By Claudio Restifo Since its first open-source release in 2015, the Rust programming language has gained a lot of attention from the community. It's also been voted the most loved programming language on StackOverflow's developer survey each year since 2016. Rust was designed by Mozilla and is considered a system programming language (like C or C++). It has no garbage collector, which makes its pe

                                                            Rust Programming Language Tutorial – How to Build a To-Do List App
                                                          • 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

                                                              • Databases in 2023: A Year in Review

                                                                I am starting this new year the same way I ended the last: taking antibiotics because my biological daughter brought home a nasty sinus bug from Carnegie Mellon’s preschool. This was after my first wife betrayed me and gave me COVID. Nevertheless, it is time for my annual screed on last year’s major database happenings and trends since a lot has happened. My goal is to keep my trenchant opinions f

                                                                  Databases in 2023: A Year in Review
                                                                • 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

                                                                  • Python behind the scenes #11: how the Python import system works

                                                                    If you ask me to name the most misunderstood aspect of Python, I will answer without a second thought: the Python import system. Just remember how many times you used relative imports and got something like ImportError: attempted relative import with no known parent package; or tried to figure out how to structure a project so that all the imports work correctly; or hacked sys.path when you couldn

                                                                    • 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

                                                                      • Rust in Perspective

                                                                        We are discussing and working toward adding the language Rust as a second implementation language in the Linux kernel. A year ago Jake Edge made an excellent summary of the discussions so far on Rust for the Linux kernel and we (or rather Miguel and Wedson) have made further progress since then. For the record I think this is overall a good idea and worth a try. I wanted to add some background tha

                                                                          Rust in Perspective
                                                                        • Ubuntu 24.04 LTS (Noble Numbat) Release Notes

                                                                          Noble Numbat Release Notes Table of Contents Introduction New features in 24.04 LTS Known Issues Official flavours More information Introduction These release notes for Ubuntu 24.04 LTS (Noble Numbat) provide an overview of the release and document the known issues with Ubuntu and its flavours. For details of the changes applied since 24.04, please see the 24.04.2 change summary. Support lifespan

                                                                          • redbean 2.0 release notes

                                                                            redbean is a webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share. I introduced this web server about a year ago on Hacker News, where it became the third

                                                                            • Python behind the scenes #6: how Python object system works

                                                                              As we know from the previous parts of this series, the execution of a Python program consists of two major steps: The CPython compiler translates Python code to bytecode. The CPython VM executes the bytecode. We've been focusing on the second step for quite a while. In part 4 we've looked at the evaluation loop, a place where Python bytecode gets executed. And in part 5 we've studied how the VM ex

                                                                              • A Review of Nim 2: The Good & Bad with Example Code

                                                                                I've been using Nim for about 1-2 years now, and I believe the language is undervalued. It's not perfect, of course, but it's pleasant to write and read. My personal website uses Nim. After reading a recent article on Nim ("Why Nim") and the associated HN comments, it's clear that comments and some information about Nim are misleading and outdated. Since Nim 2, a tracing Garbage Collector is not t

                                                                                • std::flip

                                                                                  std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”). To understand how it can be useful, let’s start with a simple example. Consider the following tree node class: struct node { int value; node* parent = nullptr; node*