並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 11 件 / 11件

新着順 人気順

python check if integer is oddの検索結果1 - 11 件 / 11件

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

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

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

      I recently stumbled upon this screenshot while researching social media on the train. Of course, it was followed by a cascade of spiteful comments, criticizing this fresh programmer’s attempt to solve a classical problem in computer science. The modulus operation. Now, in a world where AI is replacing programmers by the minute, taking their jobs and revolutionizing the way we think about code, may

      • 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

        • Renato Athaydes

          Revenge of Lisp (Part 1⁄2) Background vector created by upklyak - www.freepik.com This may surprise you if you know me, but I’ve been learning Common Lisp for a few weeks now. It all started when I was reading, funnily enough, a blog post about another, much more hyped, language called Julia. The post was titled Julia and the reincarnation of Lisp, and in it the author lamented that despite his lo

          • The Alkyne GC · mcyoung

            Alkyne is a scripting language I built a couple of years ago for generating configuration blobs. Its interpreter is a naive AST walker1 that uses ARC2 for memory management, so it’s pretty slow, and I’ve been gradually writing a new evaluation engine for it. This post isn’t about Alkyne itself, that’s for another day. For now, I’d like to write down some notes for the GC I wrote3 for it, and more

              The Alkyne GC · mcyoung
            • Breaking CityHash64, MurmurHash2/3, wyhash, and more... | orlp.net

              Hash functions are incredibly neat mathematical objects. They can map arbitrary data to a small fixed-size output domain such that the mapping is deterministic, yet appears to be random. This “deterministic randomness” is incredibly useful for a variety of purposes, such as hash tables, checksums, monte carlo algorithms, communication-less distributed algorithms, etc, the list goes on. In this art

              • A from-scratch tour of Bitcoin in Python

                I find blockchain fascinating because it extends open source software development to open source + state. This seems to be a genuine/exciting innovation in computing paradigms; We don’t just get to share code, we get to share a running computer, and anyone anywhere can use it in an open and permissionless manner. The seeds of this revolution arguably began with Bitcoin, so I became curious to dril

                • k-NN (k-Nearest Neighbors) in Supervised Machine Learning

                  K-nearest neighbors (k-NN) is a Machine Learning algorithm for supervised machine learning type. It is used for both regression and classification tasks. As we already know, a supervised machine learning algorithm depends on labeled input data, which the algorithm learns to produce accurate outputs when input unlabeled data. k-NN aims to predict the test data set by calculating the distance betwee

                    k-NN (k-Nearest Neighbors) in Supervised Machine Learning
                  • Loopr: A Loop/Reduction Macro for Clojure

                    I write a lot of reductions: loops that combine every element from a collection in some way. For example, summing a vector of integers: (reduce (fn [sum x] (+ sum x)) 0 [1 2 3]) ; => 6 If you’re not familiar with Clojure’s reduce, it takes a reducing function f, an initial accumulator init, and a collection xs. It then invokes (f init x0) where x0 is the first element in xs. f returns a new accumu

                    • npm パッケージに Agent Skills を同梱する TanStack intent

                      ライブラリのメンテナが Agent Skills を生成・検証して npm パッケージに同梱することを支援するツールである `@tanstack/intent` を使用して、ライブラリの使用者側と、メンテナ側の両方の観点から Agent Skills を利用する方法を紹介します。 コーディングエージェントがコードを生成する際に、学習データの量と質の多さが生成するコードの品質に大きく影響を与えると言われています。例えば TypeScript や Python は GitHub 上のオープンソースコードの多くを占めているため、LLM の訓練データに含まれる割合が高くなり、結果として言語のイディオムやプラクティスを深く理解しているため、生成されるコードの品質も高くなる傾向があります。 npm や PyPI などのパッケージマネージャーに公開されているコードについても同じことが言えます。例えば R

                        npm パッケージに Agent Skills を同梱する TanStack intent
                      • PgBouncer is useful, important, and fraught with peril

                        Updated 2024-09-17 to reflect updated PgBouncer support for protocol-level prepared statements 🐘 To start, I want to say that I’m appreciative that PgBouncer exists and the work its open source maintainers put into it. I also love working with PostgreSQL, and I’m thankful for the incredible amount of work and improvements that go into it as well. I also think community and industry enthusiasm aro

                          PgBouncer is useful, important, and fraught with peril
                        1