並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 267件

新着順 人気順

python if main syntaxの検索結果1 - 40 件 / 267件

  • Minimal safe Bash script template

    Published on December 14, 2020   ·   Updated on December 16, 2020 Bash scripts. Almost anyone needs to write one sooner or later. Almost no one says “yeah, I love writing them”. And that’s why almost everyone is putting low attention while writing them. I won’t try to make you a Bash expert (since I’m not a one either), but I will show you a minimal template that will make your scripts safer. You

      Minimal safe Bash script template
    • とほほのHaskell入門 - とほほのWWW入門

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

      • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

        はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

          【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
        • コーディングエージェントの能力を拡張する Serena を試してみた

          LSP を活用してセマンティックなコード検索・編集能力を提供する MCP サーバー Serena の導入・使用方法を紹介。Claude Code でのオンボーディングからリファクタリングまでの実践的な活用例を解説します。 Serena はセマンティックなコード検索・編集能力を追加するオープンソースのツールキットです。MCP(Model Context Protocol) サーバーとして動作しているため、Claude Code や Cursor, VS Code のように MCP に対応しているクライアントであれば利用できます。またエージェントフレームワークとして Agno を使用しているため、特定の LLM モデルに依存せずに動作します。 Serena は LSP(Language Server Protocol)を使用してセマンティックなコードを解析するのが特徴です。LSP はコードの構

            コーディングエージェントの能力を拡張する Serena を試してみた
          • Building a toy browser

            In the last several weeks, I have been building a toy browser based on an online book, Web Browser Engineering. As someone who spent a fair share of his career on web frontend, it was eye-opening and satisfying. It felt like I had been living on one side of a wall for years and finally visited the other side of the wall. I imagine other web frontend folks would like it as well. The book Web Browse

              Building a toy browser
            • Building a tiny Linux from scratch

              Last week, I built a tiny Linux system from scratch, and booted it on my laptop! Here’s what it looked like: Let me tell you how I got there. I wanted to learn more about how the Linux kernel works, and what’s involved in booting it. So I set myself the goal to cobble together the bare neccessities required to boot into a working shell. In the end, I had a tiny Linux system with a size of 2.5 MB,

                Building a tiny Linux from scratch
              • プロと読み解く 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 - クックパッド開発者ブログ
                • 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
                  • REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js

                    By Jean-Marc Möckel I've created and consumed many API's over the past few years. During that time, I've come across good and bad practices and have experienced nasty situations when consuming and building API's. But there also have been great moments. There are helpful articles online which present many best practices, but many of them lack some practicality in my opinion. Knowing the theory with

                      REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js
                    • GPT-5 の新パラメータとツール|npaka

                      以下の記事が面白かったので、簡単にまとめました。 ・GPT-5 New Params and Tools - OpenAI Cookbook 1. verbosity1-1. 概要「verbosity」は、出力トークン数を調節できます。 ・low : 簡潔なUX、簡潔な文章 ・medium (デフォルト) : バランスの取れた詳細 ・high : 詳細な情報。監査、教育、引き継ぎに最適 1-2. verbosityの効果の確認プロンプトを一定に保ったまま、「verbosity」を変更することで、効果を確認できます。 response = client.responses.create( model="gpt-5", input="人生、宇宙、そして万物に関する究極の問いに対する答えは何でしょうか?", text={ "verbosity": "low" } ) print(response

                        GPT-5 の新パラメータとツール|npaka
                      • プロと読み解く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
                        • GitHub - modelcontextprotocol/servers: Model Context Protocol Servers

                          Official integrations are maintained by companies building production ready MCP servers for their platforms. 21st.dev Magic - Create crafted UI components inspired by the best 21st.dev design engineers. ActionKit by Paragon - Connect to 130+ SaaS integrations (e.g. Slack, Salesforce, Gmail) with Paragon’s ActionKit API. Adfin - The only platform you need to get paid - all payments in one place, in

                            GitHub - modelcontextprotocol/servers: Model Context Protocol Servers
                          • OOP: the worst thing that happened to programming

                            > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

                              OOP: the worst thing that happened to programming
                            • Fish 4.0: The Fish Of Theseus

                              About two years ago, our head maintainer @ridiculousfish opened what quickly became our most-read pull request: #9512 - Rewrite it in Rust Truth be told, we did not quite expect that to be as popular as it was. It was written as a bit of an in-joke for the fish developers first, and not really as a press release to be shared far and wide. We didn’t post it anywhere, but other people did, and we go

                              • Rubyの全バージョンで動くQuine - まめめも

                                このプログラムは、Ruby 0.49(1994年リリース)からRuby 3.2.1(今月リリース)まで、現在確認されているすべてのCRubyで動作するQuineです。 eval($s=("t='eval($s=('+d=34.chr;s=3 2.chr+$s*i=8;v=$VERSION||eval('begin;v=V ERSION;rescue;v||RUBY_VERSION;end');f=('?'*8 +'A|'+'?'*20+'G?c'+'?'*15+'A@CXx@~@_`OpGxCxp@~pO xS|O~G?c?q?xC`AP|q?x_|C_xC_xO@H@cG?G?qA|_|_`GCpOxC|H NFccqq@`_|OF@`?q?x_@x_x_`GB`O``O~G?C@qCxCxP@D@|G~C?pO|C? pO|C?AP|A~HNN`ccxC|Q@L@B"+"GpGpc@p

                                  Rubyの全バージョンで動くQuine - まめめも
                                • Neovimでのフロントエンド開発環境 2021

                                  最近はフロントエンドエンジニア(主にReact)をしているYano (@yuki_ycino) といいます。 この記事では自分が開発に使っているNeovim周りの環境と、その大まかな構成について書いていきます。 追記 後日、自分がNeovimでフロントエンド開発を行っている理由とVSCode という記事を書きました。 合わせて読んでいただけると幸いです。 はじめに 自分は現在フロントエンド開発のほぼ全てをNeovimで行っています。 個人的にはVSCodeと遜色なく(むしろ効率よく)開発できていると思うのですが、VSCodeではシンプルな設定で開発を始められるのに対し、Vimはどうしても設定のハードルが高いです。 具体的には現在5000行弱のVimの設定ファイルと100個前後のプラグインを導入して開発しています。 ただ、それを他の方に勧めるのは無茶なので、この記事ではほぼ最小構成に近いTy

                                    Neovimでのフロントエンド開発環境 2021
                                  • research!rsc: Coroutines for Go

                                    This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

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

                                        • 眠っていたAnsibleを叩き起こす! Ansibleバージョンアップ作業まとめ - RAKUS Developers Blog | ラクス エンジニアブログ

                                          インフラ開発部でテックリードをしております上畑です。 ラクスで利用しているAnsibleコードについて、Ansibleのバージョンアップを行った内容を記事にしました。 この記事が同じような境遇のどなたかの助力になれば幸いです。 1. 背景 2. Ansibleバージョンアップ 2-1. AnsibleとPythonの関係調査 2-2. 各OSの標準Pythonバージョン一覧調査 2-3. Porting Guideによる仕様変更の確認 2-4. バージョンアップ戦略 2-5. Ansibleコード修正内容 [修正対応内容] ansible-2.9.27 to ansible-8.7.0 ansible-8.7.0 to ansible-9.12.0 3. コード修正にはAnsible-Lintの自動修正(autofix)機能を使う 3-1. 実行方法 オプションの使い方 ルール一覧 4.

                                            眠っていたAnsibleを叩き起こす! Ansibleバージョンアップ作業まとめ - RAKUS Developers Blog | ラクス エンジニアブログ
                                          • Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 | Amazon Web Services

                                            AWS News Blog Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 March 15, 2023 – You can now use S3 Object Lambda with Amazon CloudFront to tailor content for end users. August 13, 2024 – Added a note clarifying that, when following the walkthrough, you should not mark the Specify Lambda function version option that was added after this post was p

                                              Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 | Amazon Web Services
                                            • a21_txt01 - essen-wiki

                                              (註)「.exeの大きさ」はWindows向けにgcc(MinGW)でコンパイルした時の大きさです。 しかしここで扱う言語処理系は、Windows専用というわけではなく、他のOSでも問題なく動作するようになっています。 純粋に言語処理系の規模の目安を示すために書いてあります。 基本的には小さければ小さいほどシンプルで、教材として理解しやすいと思っています(可読性を下げてまでのコンパクト化をやらないとして)。 行数を書いているのも同じ意図です。行数だけだと、1行の文字数をうんと増やすことで、見かけ上の行数を減らすことができますが、そんなことをしても実行ファイルサイズは減らないので、 この二つを併記すれば、規模感の目安としては十分だと思っています。 「速度のめやす」は、C言語で10億回ループさせた場合と、この言語で10億回ループさせた場合の処理時間の比を書いています。数が大きいほうが遅いです。

                                              • Interview with Ryan Dahl, Node.js & Deno creator by Evrone

                                                In an interview with Evrone, Ryan Dahl speaks about the main challenges in Deno, the future of JavaScript and TypeScript, and tells how he would have changed his approach to Node.js if he could travel back in time. We met with Ryan Dahl, the creator of Node.js, to discuss the origins of the platform, its impact on JavaScript, and his thoughts on its future. In the interview he also reflected on hi

                                                  Interview with Ryan Dahl, Node.js & Deno creator by Evrone
                                                • ISUCON 13 参加記 (白金動物園)

                                                  白金動物園の sorah です。優勝した ISUCON 9 以来 Writer や Admin (アドバイザー), ポータルのメンテナ係として運営に幽閉されていて長いこと選手をやっていませんでしたが、今回ひさびさに選手として参加したのでその参加記。 結果としては 18 位で 103,838 点で終了。10 万点到達の着順ではわりと早かったチームになれたものの、その後伸ばせず、かなり悔しい。 https://isucon.net/archives/57993937.html 一方で Ruby を利用して NameError や NoMethodError による fail を高速に繰り返していたため「ベンチマーク Fail 回数の多い 3 チーム」として 53 回で TVer からスポンサー賞をもらいました。我々より Fail 数が多いチームは Go だと思うんだけど、コンパイラがそこそこ怒

                                                  • 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
                                                    • 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
                                                      • Go is still not good

                                                        Previous posts Why Go is not my favourite language and Go programs are not portable have me critiquing Go for over a decade. These things about Go are bugging me more and more. Mostly because they’re so unnecessary. The world knew better, and yet Go was created the way it was. For readers of previous posts you’ll find some things repeated here. Sorry about that. Error variable scope is forced to b

                                                        • Tools: Code Is All You Need

                                                          If you’ve been following me on Twitter, you know I’m not a big fan of MCP (Model Context Protocol) right now. It’s not that I dislike the idea; I just haven’t found it to work as advertised. In my view, MCP suffers from two major flaws: It isn’t truly composable. Most composition happens through inference. It demands too much context. You must supply significant upfront input, and every tool invoc

                                                            Tools: Code Is All You Need
                                                          • Okay, I really like WezTerm

                                                            A while back my friend recommended that I try WezTerm. I’d been an iTerm 2 stalwart for the better part of a decade, but not to be too narrow-minded I conceded, started it up, and saw this: Does the job, sure, but doesn’t feel quite right. Okay then, experiment over. Back to iTerm… Fast forward a couple of months and I got the itch to try a new terminal again. I wanted to use one whose config was

                                                              Okay, I really like WezTerm
                                                            • A few words on Ruby's type annotations state

                                                              I don't build systems. I imagine them, then write them. …that were written in a military training camp and accidentally grew to 5k words. I am writing this on my phone, in a barrack that houses some 200+ of my brothers-in-arms in the Ukrainian army’s training camp; I use short periods of rest between training, mostly at night and on Sundays. TBH, since joining the army, I didn’t expect to have tim

                                                              • The yaml document from hell

                                                                written by Ruud van Asseldonk published 11 January 2023 For a data format, yaml is extremely complicated. It aims to be a human-friendly format, but in striving for that it introduces so much complexity, that I would argue it achieves the opposite result. Yaml is full of footguns and its friendliness is deceptive. In this post I want to demonstrate this through an example. This post is a rant, and

                                                                • Onyx, a new programming language powered by WebAssembly · Blog · Wasmer

                                                                  Onyx, a new programming language powered by WebAssemblyLearn about Onyx, a new imperative programming language that leverages WebAssembly and Wasmer for seamless cross-platform support What is Onyx? Onyx is a new programming language featuring a modern, expressive syntax, strict type safety, blazingly-fast build times, and out-of-the-box cross platform support thanks to WebAssembly. Over the past

                                                                    Onyx, a new programming language powered by WebAssembly · Blog · Wasmer
                                                                  • Perl 5.32の連鎖比較(Chained comparisons)はどの様に実装されているのか - Acme::AnaTofuZ->new;

                                                                    この記事はPerl Advent Calendar 2020と琉大 Advent Calendar 2020の11日目の記事です。 PerlはPerl5になって長いですが、現在の最新の安定版のバージョンは5.32です。 Perl5.32で取り入れられた(厳密には5.31からですが)のおもしろ機能として連鎖比較(Chained comparisons)が存在します。 今までPerlで数値などが特定の範囲に含まれているかどうかをif文で判定するには次の様に書く必要がありました。 if (10 < $n && $n <= 20) これがこう書ける様になります!!! if ( 10 < $n <= 20 ) {...} 便利!!!!!!!!!!!!!!!!!!!!!!!! ...........というわけで、この便利な連鎖比較がどの様に実装されているかを探検してみます。 言語処理系の実装 さて今か

                                                                      Perl 5.32の連鎖比較(Chained comparisons)はどの様に実装されているのか - Acme::AnaTofuZ->new;
                                                                    • 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

                                                                        • A Shell for the Container Age: Introducing Dagger Shell | Dagger

                                                                          The Unix shell is over 50 years old, but it still defines how programmers use their computers. We type a few words in a terminal, and milliseconds later an ephemeral factory comes online: the Unix pipeline. Data streams through a network of simple programs working concurrently, like robots on the factory floor, executing a computational choreography we composed seconds ago. Its job done, the facto

                                                                            A Shell for the Container Age: Introducing Dagger Shell | Dagger
                                                                          • 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
                                                                            • 初心者向けプログラミング言語を“高校生”が開発 多言語で書けて、ブラウザ上で実行可能な「Laze」の魅力 | ログミーBusiness

                                                                              2022年10月で開催2周年を迎えた「MS Tech Camp」。 2022年はMicrosoft Base 代官山でオフラインイベントが開催されました。ここで登壇したのは、プログラミング言語「Laze」の開発メンバーである永田直希氏。「Laze」の特徴や仕組み、「Imagine Cup」について話しました。全2回。前半は、「Laze」の2つの特徴とその仕組みについて。 高校生で「Imagine Cup」アジア教育部門を優勝司会者:今日登壇してもらう永田さんは、すごい人です。 (会場笑) 司会者:なぜすごい人かというと、「Imagine Cup」アジア教育部門で高校生で初めて優勝したんです。 (会場拍手) 司会者:高校生でプログラミング言語を作ったんです、高校生で。「はっ?」て(笑)。 (会場笑) 司会者:みなさんが知っているC言語やPythonなど、そういうものを作りました。「どういうこ

                                                                                初心者向けプログラミング言語を“高校生”が開発 多言語で書けて、ブラウザ上で実行可能な「Laze」の魅力 | ログミーBusiness
                                                                              • 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