並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 47件

新着順 人気順

program using if else statement in javaの検索結果1 - 40 件 / 47件

  • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

    (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

      ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
    • 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
      • 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

          • Parsing SQL - Strumenta

            The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

              Parsing SQL - Strumenta
            • 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
              • 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

                • The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs

                  emerging threats and vulnerabilities The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation November 1, 2022 emerging vulnerability On November 1, 2022, the OpenSSL Project released a security advisory detailing a high-severity vulnerability in the OpenSSL library. Deployments of OpenSSL from 3.0.0 to 3.0.6 (included) are vulnerable and are fixed in

                    The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs
                  • The life and times of an Abstract Syntax Tree

                    You’ve reached computer programming nirvana. Your journey has led you down many paths, including believing that God wrote the universe in LISP, but now the truth is clear in your mind: every problem can be solved by writing one more compiler. It’s true. Even our soon-to-be artificially intelligent overlords are nothing but compilers, just as the legends foretold. That smart contract you’ve been wr

                      The life and times of an Abstract Syntax Tree
                    • 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
                      • The Go Programming Language and Environment – Communications of the ACM

                        Go is a programming language created at Google in late 2007 and released as open source in November 2009. Since then, it has operated as a public project, with contributions from thousands of individuals and dozens of companies. Go has become a popular language for building cloud infrastructure: Docker, a Linux container manager, and Kubernetes, a container deployment system, are core cloud techno

                        • In Praise of dhh

                          In Praise of dhh November 8, 2025 | #tech #politics A reflection on Ruby’s past, present, and future. This is a long essay. I strongly recommend you read it from the beginning, but to help navigate it I have created this table of contents. Prologue The Past How I Learned To Love Ruby A Breath Of Fresh Air A Shared Worldview The Present Tragedy Strikes Recent Conflict In The Community Strength and

                          • JEP 425: Virtual Threads (Preview)

                            Summary Introduce virtual threads to the Java Platform. Virtual threads are lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications. This is a preview API. Goals Enable server applications written in the simple thread-per-request style to scale with near-optimal hardware utilization. Enable existing code that uses the j

                            • Darker Corners of Go – Rytis Biel

                              Note: this article is available as an ebook and as a printed book for easier reading Introduction What is this? When I was first learning Go, I already knew several other programming languages. But after reading an introductory book and the language specification I felt like I really didn’t know enough about Go to use it for real world work. I felt I’d probably need to fall into many traps before

                                Darker Corners of Go – Rytis Biel
                              • prompts.chat

                                Welcome to the “Awesome ChatGPT Prompts” repository! While this collection was originally created for ChatGPT, these prompts work great with other AI models like Claude, Gemini, Hugging Face Chat, Llama, Mistral, and more. ChatGPT is a web interface created by OpenAI that provides access to their GPT (Generative Pre-trained Transformer) language models. The underlying models, like GPT-4o and GPT-o

                                • V Language Review (2022)

                                  V is a programming language promising to be “Simple, fast, safe, compiled. For developing maintainable software.” V has a controversial past but what is the state of V in 2022? Is V worth checking out? In this post, we’ll take a look at V as it exists in May 2022. TLDR Read the summary Rules of engagement I’ll be using the current version of V built from git which is 50ab2cfd1ae02d4f4280f38c60b8db

                                  • HuggingFaceFW/fineweb · Datasets at Hugging Face

                                    "},"dump":{"kind":"string","value":"CC-MAIN-2013-20"},"url":{"kind":"string","value":"http://%20jwashington@ap.org/Content/Press-Release/2012/How-AP-reported-in-all-formats-from-tornado-stricken-regions"},"date":{"kind":"string","value":"2013-05-18T05:48:54Z"},"file_path":{"kind":"string","value":"s3://commoncrawl/crawl-data/CC-MAIN-2013-20/segments/1368696381249/warc/CC-MAIN-20130516092621-00000-

                                      HuggingFaceFW/fineweb · Datasets at Hugging Face
                                    • Sayonara, C++, and hello to Rust!

                                      This past May, I started a new job working in Rust. I was somewhat skeptical of Rust for a while, but it turns out, it really is all it’s cracked up to be. As a long-time C++ programmer, and C++ instructor, I am convinced that Rust is better than C++ in all of C++’s application space, that for any new programming project where C++ would make sense as the programming language, Rust would make more

                                      • research!rsc: Programming Language Memory Models (Memory Models, Part 2)

                                        Programming language memory models answer the question of what behaviors parallel programs can rely on to share memory between their threads. For example, consider this program in a C-like language, where both x and done start out zeroed. // Thread 1 // Thread 2 x = 1; while(done == 0) { /* loop */ } done = 1; print(x); The program attempts to send a message in x from thread 1 to thread 2, using d

                                        • Using a Framework will harm the maintenance of your software

                                          In this article I’m putting together my quotes, thoughts and notes on the idea that Frameworks harm the maintainability of the software you build in that framework. I’m proposing that Frameworks: are harming maintainability, but not deliberate. have different goals than you or your team. make trade-offs that harm maintainability of the projects built in them. are designed to take your project host

                                          • 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

                                              • Faster virtual machines: Speeding up programming language execution - Mort's Ramblings

                                                Date: 2023-01-15 Git: https://gitlab.com/mort96/blog/blob/published/content/00000-home/00015-fast-interpreters.md In this post, I hope to explore how interpreters are often implemented, what a "virtual machine" means in this context, and how to make them faster. Note: This post will contain a lot of C source code. Most of it is fairly simple C which should be easy to follow, but some familiarity w

                                                • https://cheats.rs/rust_cheat_sheet.pdf

                                                  Rust Language Cheat Sheet 26. August 2021 Contains clickable links to The Book , Rust by Example , Std Docs , Nomicon , Reference . Data Structures Data types and memory locations defined via keywords. Example Explanation struct S {} Define a struct with named fields. struct S { x: T } Define struct with named field x of type T. struct S ​(T); Define "tupled" struct with numbered field .0 of type

                                                  • Amazon Marketplace SP-API の使い方:認証・各種必要な設定から実際のリクエストまで - CData Software Blog

                                                    こんにちは。CData Software Japanリードエンジニアの杉本です。 MWS APIを使っている方であればすでにご存知かとは思いますが、最近Amazon Marketplace からとても重要なお知らせがありましたね! 今まではMWSというAPIを通じてAmazon Marketplaceの注文データやレポートが取得できたのですが、今年9月30日でこのAPIの提供を終了し、新しい仕様のAPI・SP-APIに移行するようにとの告知です。 sellercentral.amazon.co.jp CData Software でもこのMWS APIを使って、以下のAmazon Marketplace Driverという製品を提供しており、絶賛この対応を進めています。 www.cdata.com そしてこの対応にあたって、最新のSP-APIを調べていたのですが、今までのAmazon Ma

                                                      Amazon Marketplace SP-API の使い方:認証・各種必要な設定から実際のリクエストまで - CData Software Blog
                                                    • 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
                                                        • cuneicode, and the Future of Text in C

                                                          Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                                            cuneicode, and the Future of Text in C
                                                          • Secure Randomness in Go 1.22 - The Go Programming Language

                                                            Computers aren’t random. On the contrary, hardware designers work very hard to make sure computers run every program the same way every time. So when a program does need random numbers, that requires extra effort. Traditionally, computer scientists and programming languages have distinguished between two different kinds of random numbers: statistical and cryptographic randomness. In Go, those are

                                                              Secure Randomness in Go 1.22 - The Go Programming Language
                                                            • 🤓 So you're using a weird language 🧠

                                                              Tuesday, September 13, 2022 :: Tagged under: engineering. ⏰ 11 minutes. Hey! Thanks for reading! Just a reminder that I wrote this some years ago, and may have much more complicated feelings about this topic than I did when I wrote it. Happy to elaborate, feel free to reach out to me! 😄 🎵 The song for this post is I, Don Quixote from the musical Man of La Mancha, composed by Mitch Leigh and Joe

                                                                🤓 So you're using a weird language 🧠
                                                              • Rust needs an official specification - Blog - Tweede golf

                                                                Can we currently reason about Rust code with absolute certainty? Not really, but we should be able to. In this article, we dive into the reasons why it may be time for a Rust specification. A simple C++ questionIf you know a little bit of C++: can you tell me what the output of the following program is? #include <stdio.h> struct Foo { ~Foo() { puts("Goodbye!"); } // runs when Foo is destructed };

                                                                  Rust needs an official specification - Blog - Tweede golf
                                                                • The Koka Programming Language

                                                                  1. Getting started Welcome to Koka – a strongly typed functional-style language with effect types and handlers. Why Koka? A Tour of Koka Install Discussion forum Github Libraries Note: Koka v3 is a research language that is currently under development and not ready for production use. Nevertheless, the language is stable and the compiler implements the full specification. The main things lacking a

                                                                  • Integrating Code Completion in Visual Studio Code - Strumenta

                                                                    Integrating Code Completion in Visual Studio Code – With the Language Server Protocol Introduction Automatic code completion, also known as IntelliSense, is an important part of the modern software development experience. No matter if you’re a programmer writing code in a general-purpose programming language, or a business expert writing rules in some domain-specific language; your editor is incom

                                                                      Integrating Code Completion in Visual Studio Code - Strumenta
                                                                    • Why Rust?

                                                                      I've been a programmer for 20+ years, and few things excite me as much as Rust. My background is mostly in C++, though I have also worked in Python and Lua, and dabbled in many more languages. I started writing Rust around 2014, and since 2018 I've been writing Rust full time. In my spare time I've developed a popular Rust GUI crate, egui. When I co-founded Rerun earlier this year, the choice of l

                                                                        Why Rust?
                                                                      • JavaScript Interview Questions

                                                                        Here is a list of common JavaScript interview questions with detailed answers to help you prepare for the interview as a JavaScript developer. JavaScript continues to be a cornerstone of web development, powering dynamic and interactive experiences across the web. As the language evolves, so does the complexity and scope of interview questions for JavaScript developers. Whether you’re a fresher de

                                                                          JavaScript Interview Questions
                                                                        • Renato Athaydes

                                                                          Revisiting Prechelt’s paper and follow-ups comparing Java, Lisp, C/C++ and scripting languages A discussion on programming languages' impact on productivity and program efficiency. In 1999, Lutz Prechelt published a seminal article on the COMMUNICATIONS OF THE ACM (October 1999/Vol. 42, No. 10) called Comparing Java vs. C/C++ Efficiency Differences to Interpersonal Differences, henceforth Java VS

                                                                          • What Makes the Zig Programming Language Unique?

                                                                            Zig mascot Zero the ZiguanaCompile-time computing was pioneered by the Lisp programming language in the 1960s. Compile-time computing means that the code you later compile isn’t just what you wrote down. What you compile later is also code that is “written” by your code. Code generating code. While a common feature in dynamically typed languages such as Lisp and Julia, it has been rare in statical

                                                                              What Makes the Zig Programming Language Unique?
                                                                            • Docker optimization guide: the 12 best tips to optimize Docker image security

                                                                              You should always build and push images in a clean environment, e.g. a CI/CD pipeline, where the build agent clones your repository into a new directory. The problem with using your local development machine for building is that your local “working tree” of the Git repository might be dirty. For instance, it might contain files with secrets that you need during development, e.g. access keys to sta

                                                                                Docker optimization guide: the 12 best tips to optimize Docker image security
                                                                              • James Shore: Testing Without Mocks: A Pattern Language

                                                                                Automated tests are important. Without them, programmers waste a huge amount of time manually checking and fixing their code. Unfortunately, many automated tests also waste a huge amount of time. The easy, obvious way to write tests is to make broad tests that are automated versions of manual tests. But they’re flaky and slow. Folks in the know use mocks and spies (I say “mocks” for short in this

                                                                                • (How to Write a (Lisp) Interpreter (in Python))

                                                                                  This page has two purposes: to describe how to implement computer language interpreters in general, and in particular to build an interpreter for most of the Scheme dialect of Lisp using Python 3 as the implementation language. I call my language and interpreter Lispy (lis.py). Years ago, I showed how to write a semi-practical Scheme interpreter Java and in in Common Lisp). This time around the go