並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 209件

新着順 人気順

python do nothing in if elseの検索結果1 - 40 件 / 209件

  • Command Line Interface Guidelines

    Contents Command Line Interface Guidelines An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day. Authors Aanand Prasad Engineer at Squarespace, co-creator of Docker Compose. @aanandprasad Ben Firshman Co-creator Replicate, co-creator of Docker Compose. @bfirsh Carl Tashian Offroad Engineer at Smallstep, first e

      Command Line Interface Guidelines
    • とほほのHaskell入門 - とほほのWWW入門

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

      • ついにBitNet Llama8Bが登場! CPUのみで爆速推論するLLM,BitNet.cpp|shi3z

        科学の世界では、それまでの常識が覆ることを俗に「パラダイムシフト」と呼ぶ。 しかし、もしもAIの世界にパラダイムシフトという言葉があるとしたら、今週の人類は一体何度のパラダイムシフトを経験しただろうか。 そのトドメの一撃とも言えるのが、BitNetのLlama8B版だ。 Lllama-8B構造で学習された最初のBitNetであり、全てを変えてしまうゲームチェンジャーでもある。CPUのみで秒間5-20トークンを出力する。超強力なLLM推論エンジンの出現だ。 BitNetとは、そもそも1.58ビットに相当する情報量で、本来は4ビット以上必要な大規模言語モデルの計算を劇的に高速化する技術である。 LLMの推論には通常は巨大な浮動小数点数(8ビットから16ビット)の、大量の乗算(掛け算)が必要なため、GPUなどの特殊な半導体を必要としていた。特にNVIDIAのGPUがこの目的にマッチしていたので今

          ついにBitNet Llama8Bが登場! CPUのみで爆速推論するLLM,BitNet.cpp|shi3z
        • Agentic Coding Recommendations

          There is currently an explosion of people sharing their experiences with agentic coding. After my last two posts on the topic, I received quite a few questions about my own practices. So, here goes nothing. Preface For all intents and purposes, here’s what I do: I predominently use Claude Code with the cheaper Max subscription for $100 a month 1. That works well for several reasons: I exclusively

            Agentic Coding Recommendations
          • Don't write clean code, write CRISP code — Bitfield Consulting

            I’m sure we’re all in favour of “clean code”, but it’s one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it’s for a porn site? The problem, of course, is that few of us can agree on what “clean code” means, and how to get there. A rule like “methods should only do one thing”, looks great on a T-shirt, but it’s not so

              Don't write clean code, write CRISP code — Bitfield Consulting
            • 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
              • Logging in Python like a PRO 🐍🌴

                Beyond exception handling, there's something else I see people struggling with, which is logging. Most people don't know what to log, so they decide to log anything thinking it might be better than nothing, and end up creating just noise. Noise is a piece of information that doesn't help you or your team understand what's going on or resolving a problem. Furthermore, I feel people are uncertain ab

                  Logging in Python like a PRO 🐍🌴
                • Omakub

                  Turn a fresh Ubuntu installation into a fully-configured, beautiful, and modern web development system by running a single command. That’s the one-line pitch for Omakub. No need to write bespoke configs for every essential tool just to get started or to be up on all the latest command-line tools. Omakub is an opinionated take on what Linux can be at its best. Omakub includes a curated set of appli

                    Omakub
                  • How I Hacked my Car

                    Note: As of 2022/10/25 the information in this series is slightly outdated. See Part 5 for more up to date information. The Car⌗ Last summer I bought a 2021 Hyundai Ioniq SEL. It is a nice fuel-efficient hybrid with a decent amount of features like wireless Android Auto/Apple CarPlay, wireless phone charging, heated seats, & a sunroof. One thing I particularly liked about this vehicle was the In-V

                    • 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

                      • Dear Rubyists: Shopify Isn’t Your Enemy

                        I’ve been meaning to write a post about my perspective on Open Source and corporate entities. I already got the rough outline of it; however, I’m suffering from writer’s block, but more importantly, the whole post is a praise of how Shopify engages with Open Source communities. Hence, given the current climate, I don’t think I could publish it without addressing the elephant in the room first anyw

                        • Mojo may be the biggest programming language advance in decades – fast.ai

                          I remember the first time I used the v1.0 of Visual Basic. Back then, it was a program for DOS. Before it, writing programs was extremely complex and I’d never managed to make much progress beyond the most basic toy applications. But with VB, I drew a button on the screen, typed in a single line of code that I wanted to run when that button was clicked, and I had a complete application I could now

                            Mojo may be the biggest programming language advance in decades – fast.ai
                          • How I Use Every Claude Code Feature

                            I use Claude Code. A lot. As a hobbyist, I run it in a VM several times a week on side projects, often with --dangerously-skip-permissions to vibe code whatever idea is on my mind. Professionally, part of my team builds the AI-IDE rules and tooling for our engineering team that consumes several billion tokens per month just for codegen. The CLI agent space is getting crowded and between Claude Cod

                              How I Use Every Claude Code Feature
                            • Scaling containers on AWS in 2022

                              This all started with a blog post back in 2020, from a tech curiosity: what's the fastest way to scale containers on AWS? Is ECS faster than EKS? What about Fargate? Is there a difference between ECS on Fargate and EKS on Fargate? I had to know this to build better architectures for my clients. In 2021, containers got even better, and I was lucky enough to get a preview and present just how fast t

                                Scaling containers on AWS in 2022
                              • Every System is a Log: Avoiding coordination in distributed applications

                                Every System is a Log: Avoiding coordination in distributed applications How Restate works, Part 1Posted January 22, 2025 by Stephan Ewen and Jack Kleeman and Giselle van Dongen ‐ 13 min read Building resilient distributed applications remains a tough challenge. It should be possible to focus almost entirely on the business logic and the complexity inherent to the domain. Instead, you need to revi

                                  Every System is a Log: Avoiding coordination in distributed applications
                                • How does Google Authenticator work? (Part 1)

                                  This post is the first in a three-part series. The remaining two: How does Google Authenticator work? (Part 2) How does Google Authenticator work? (Part 3) When you’re accessing services over the WEB – let’s pick GMail as an example – a couple of things have to happen upfront: The server you’re connecting to (GMail in our example) has to get to know who you are. Only after getting to know who you

                                  • 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

                                    • Lessons from Writing a Compiler

                                      The prototypical compilers textbook is: 600 pages on parsing theory. Three pages of type-checking a first-order type system like C. Zero pages on storing and checking the correctness of declarations (the “symbol table”). Zero pages on the compilation model, and efficiently implementing separate compilation. 450 pages on optimization and code generation. The standard academic literature is most use

                                      • Functional programming is finally going mainstream

                                        Functional programming is finally going mainstream Object-oriented and imperative programming aren’t going away, but functional programming is finding its way into more codebases. Klint Finley // July 12, 2022 Paul Louth had a great development team at Meddbase, the healthcare software company he founded in 2005. But as the company grew, so did their bug count. That’s expected, up to a point. More

                                          Functional programming is finally going mainstream
                                        • Claude Skills are awesome, maybe a bigger deal than MCP

                                          Claude Skills are awesome, maybe a bigger deal than MCP 16th October 2025 Anthropic this morning introduced Claude Skills, a new pattern for making new abilities available to their models: Claude can now use Skills to improve how it performs specific tasks. Skills are folders that include instructions, scripts, and resources that Claude can load when needed. Claude will only access a skill when it

                                            Claude Skills are awesome, maybe a bigger deal than MCP
                                          • 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
                                            • The New Internet: Tailscale's Vision for the Future of Connectivity

                                              Avery Pennarun is the CEO and co-founder of Tailscale. A version of this post was originally presented at a company all-hands. We don’t talk a lot in public about the big vision for Tailscale, why we’re really here. Usually I prefer to focus on what exists right now, and what we’re going to do in the next few months. The future can be distracting. But increasingly, I’ve found companies are startin

                                                The New Internet: Tailscale's Vision for the Future of Connectivity
                                              • 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
                                                • 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
                                                  • Things we learned about LLMs in 2024

                                                    31st December 2024 A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus my attempt at identifying key themes and pivotal moments. This is a sequel to my review of 2023. In this article: The GPT-4 barrier was comprehensively broken Some of those GPT-4 models run on my laptop LLM pri

                                                      Things we learned about LLMs in 2024
                                                    • API Tokens: A Tedious Survey

                                                      API Tokens: A Tedious Survey Author Name Thomas Ptacek @tqbf @tqbf Image by Annie Ruygt We’re Fly.io. This post isn’t about Fly.io, but you have to hear about us anyways, because my blog, my rules. Our users ship us Docker containers and we transmute them into Firecracker microvms, which we host on our own hardware around the world. With a working Dockerfile, getting up and running will take you l

                                                        API Tokens: A Tedious Survey
                                                      • Notes by djb on using Fil-C (2025)

                                                        Notes by djb on using Fil-C (2025) I'm impressed with the level of compatibility of the new memory-safe C/C++ compiler Fil-C (filcc, fil++). Many libraries and applications that I've tried work under Fil-C without changes, and the exceptions haven't been hard to get working. I've started accumulating miscellaneous notes on this page regarding usage of Fil-C. My selfish objective here is to protect

                                                        • Front-end maximalism

                                                          Here's a question that comes up all the time: Q: I have a front end that calls into a back end. It needs to do things now, and might need to do more things later. How much filtering and preprocessing should the back-end do before it passes the data to the front end? And here's an answer I like: A: As little as possible. Some examples: Suppose you have a product page with a long list of products. T

                                                            Front-end maximalism
                                                          • Cheating is All You Need | Sourcegraph Blog

                                                            Heya. Sorry for not writing for so long. I’ll make up for it with 3000 pages here. I’m just hopping right now. That’s kinda the only way to get me to blog anymore. I’ve rewritten this post so many times. It’s about AI. But AI is changing so fast that the post is out of date within a few days. So screw it. I’m busting this version out in one sitting. (Spoiler alert: There’s some Sourcegraph stuff a

                                                              Cheating is All You Need | Sourcegraph Blog
                                                            • 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)
                                                              • The Roc Programming Language

                                                                Examples Roc is a young language. It doesn't even have a numbered release yet, just nightly builds! However, it can already be used for several things if you're up for being an early adopter— with all the bugs and missing features which come with that territory. Here are some examples of how it can be used today. Command-Line Interfaces main! = |args| Stdout.line!("Hello!") You can use Roc to crea

                                                                • 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
                                                                  • CUPID: for joyful coding

                                                                    What started as lighthearted iconoclasm, poking at the bear of SOLID, has developed into something more concrete and tangible. If I do not think the SOLID principles are useful these days, then what would I replace them with? Can any set of principles hold for all software? What do we even mean by principles? I believe that there are properties or characteristics of software that make it a joy to

                                                                    • 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

                                                                      • Hypothesisとpytestを使ってDjangoのユニットテストを書く - 何かを書き留める何か

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

                                                                          Hypothesisとpytestを使ってDjangoのユニットテストを書く - 何かを書き留める何か
                                                                        • Xilem: an architecture for UI in Rust

                                                                          Rust is an appealing language for building user interfaces for a variety of reasons, especially the promise of delivering both performance and safety. However, finding a good architecture is challenging. Architectures that work well in other languages generally don’t adapt well to Rust, mostly because they rely on shared mutable state and that is not idiomatic Rust, to put it mildly. It is sometim

                                                                          • 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
                                                                              • You Want Modules, Not Microservices

                                                                                Blog Home Archive Sections Some of my Favorites (Collections) Management Tips Speaker Tips Developer Relations Thoughts Interop Briefs Some of my Favorites (Individual posts) O/R-M is the Vietnam of Computer Science The Fallacies of Enterprise Computing SSCLI 2.0 Internals Recommended reading list Functional Java On Finding learning The Value of Failure Programming Promises; a Programmer's Hippocr

                                                                                • 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