並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 27 件 / 27件

新着順 人気順

invalid syntax for if statement in pythonの検索結果1 - 27 件 / 27件

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

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

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 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
      • Ruby Parser開発日誌 (1) - かねこにっき

        Error Tolerant parserに関するアイデア 9月半ばに行われたRubyKaigi 2022以来、3ヶ月くらいError Tolerant parserについて調べたり考えたり実装をしたりしています。 途中でもいいからなにかにアウトプットしておくとよいというアドバイスをもらったので、今現在の状況や考えていることを書いておこうと思います。 Error Tolerant parserとは? どうしてそれが欲しいの? 通常parserはユーザーの入力を受け取り その入力がそのプログラミング言語にとって、validなものか否かをチェック validな場合、その後の工程にとって都合のいいデータ構造(例えばAST)に変換し、後工程に渡す invalidな場合、Syntax Errorをレポートする といった処理を行います。 しかしIDEやLSP(Language Server Proto

          Ruby Parser開発日誌 (1) - かねこにっき
        • Python 3.10から導入されたBetter error messagesの深掘り | gihyo.jp

          鈴木たかのりです。今月のPython Monthly Topicsでは、Python 3.10から導入されたBetter error messagesについて紹介します。Better error messagesがどういったものであるかの紹介と、どのようにこのエラーメッセージが出力されているか、Python内部の処理についても触れようと思います。 Better error messagesとは Python 3.10からBetter error messagesという機能が追加されました。この機能は名前のとおり「エラーメッセージを改善」するものです。「⁠エラーメッセージの改善」により以前よりもわかりやすいエラーメッセージが出力され、ユーザーがエラーの意味に気づきやすくなりました。 例として、以下のようなリストの閉じカッコ(])を忘れたコードを実行し、出力されるエラーメッセージを見比べてみま

            Python 3.10から導入されたBetter error messagesの深掘り | gihyo.jp
          • 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

            • April 2022 (version 1.67)

              Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.67.1: The update addresses this security issue. Update 1.67.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2022 release of Visual Studio Code. There are many updates in this version that we hope

                April 2022 (version 1.67)
              • 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

                • Building a Toy Programming Language in Python

                  I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm going to show you how to implement a programming language! The project will parse and execute programs written in a simple language I called my (I know it's a lame name, but hey, it is "my" language).

                    Building a Toy Programming Language in Python
                  • February 2021 (version 1.54)

                    Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.54.1: The update addresses an issue with an extension dependency. Update 1.54.2: The update addresses these issues. Update 1.54.3: The update addresses this issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2021 release of Vi

                      February 2021 (version 1.54)
                    • 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
                        • 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

                          • Eliciting Reasoning in Language Models with Cognitive Tools

                            arXiv:2506.12115v1 [cs.CL] 13 Jun 2025 Eliciting Reasoning in Language Models with Cognitive Tools Brown Ebouky IBM Research - Zurich ETH Zurich Brown.Ebouky@ibm.com Andrea Bartezzaghi IBM Research - Zurich abt@zurich.ibm.com Mattia Rigotti IBM Research - Zurich mrg@zurich.ibm.com Abstract The recent advent of reasoning models like OpenAI’s o1 was met with excited spec- ulation by the AI community

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

                                    • 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

                                      • Node.js — Node.js v22.9.0 (Current)

                                        2024-09-17, Version 22.9.0 (Current), @RafaelGSS New API to retrieve execution Stack Trace A new API getCallSite has been introduced to the util module. This API allows users to retrieve the stacktrace of the current execution. Example: const util = require('node:util'); function exampleFunction() { const callSites = util.getCallSite(); console.log('Call Sites:'); callSites.forEach((callSite, inde

                                          Node.js — Node.js v22.9.0 (Current)
                                        • JupyterLab Changelog — JupyterLab 4.5.0a3 documentation

                                          JupyterLab Changelog# v4.4# JupyterLab 4.4 includes a number of new features (described below), bug fixes, and enhancements. This release is compatible with extensions supporting JupyterLab 4.0. Extension authors are encouraged to consult the Extension Migration Guide which lists deprecations and changes to the public API. Code console improvements# The code console prompt can now be positioned on

                                          • Exhaustive Union Matching in Python - Preferred Networks Research & Development

                                            Pattern matching on algebraic data types is a powerful technique to process a given input and many programming languages have adopted it in one way or another. A check on whether a given match is “exhaustive”, i.e., covers all possible inputs, is helpful to avoid bugs when the set of possible inputs is extended; for example, when new enumeration values are added. In this blog post I will first bri

                                              Exhaustive Union Matching in Python - Preferred Networks Research & Development
                                            • June 2025 (version 1.102)

                                              Release date: July 9, 2025 Update 1.102.1: The update addresses these issues. Update 1.102.2: The update addresses these issues. Update 1.102.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some

                                                June 2025 (version 1.102)
                                              • January 2022 (version 1.64)

                                                Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.64.1: The update addresses these security issues. Update 1.64.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2022 release of Visual Studio Code. There are many updates in this version that we

                                                  January 2022 (version 1.64)
                                                • Ruff: a fast Python linter

                                                  May 2, 2023 This article was contributed by Koen Vervloesem Linters are tools that analyze a program's source code to detect various problems such as syntax errors, programming mistakes, style violations, and more. They are important for maintaining code quality and readability in a project, as well as for catching bugs early in the development cycle. Last year, a new Python linter appeared: Ruff.

                                                  • 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
                                                    • Django for Startup Founders: A better software architecture for SaaS startups and consumer apps

                                                      In an ideal world, startups would be easy. We'd run our idea by some potential customers, build the product, and then immediately ride that sweet exponential growth curve off into early retirement. Of course it doesn't actually work like that. Not even a little. In real life, even startups that go on to become billion-dollar companies typically go through phases like: Having little or no growth fo

                                                      • C++ safety, in context

                                                        Scope. To talk about C++’s current safety problems and solutions well, I need to include the context of the broad landscape of security and safety threats facing all software. I chair the ISO C++ standards committee and I work for Microsoft, but these are my personal opinions and I hope they will invite more dialog across programming language and security communities. Acknowledgments. Many thanks

                                                          C++ safety, in context
                                                        1