並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 111件

新着順 人気順

if else statement in c syntax and exampleの検索結果1 - 40 件 / 111件

  • Google TypeScript Style Guide

    // Good: choose between two options as appropriate (see below). import * as ng from '@angular/core'; import {Foo} from './foo'; // Only when needed: default imports. import Button from 'Button'; // Sometimes needed to import libraries for their side effects: import 'jasmine'; import '@polymer/paper-button'; Import paths TypeScript code must use paths to import other TypeScript code. Paths may be r

    • Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ

      こんにちは。カミナシで「カミナシレポート」の開発を担当しているソフトウェアエンジニアの佐藤です。 カミナシレポートのバックエンドは Go で開発しており、データベースには Amazon Aurora MySQL を使用しています。また、データベースアクセスには ORM ライブラリの GORM を採用しています。 ほとんどのテーブルでは、プライマリキー(ID列)に AUTO INCREMENT を利用しています。これらのテーブルに GORM の Create メソッドなどを使って新しいレコードを挿入すると、AUTO INCREMENT で採番された値が自動的に対応する Struct のフィールドに反映されます。 AUTO INCREMENT による値の採番は MySQL 側で実行されているため、Go 側の Struct のフィールドに反映させるためには、Go アプリケーション側が何らかの方法

        Go の ORM はどのようにして AUTO INCREMENT で採番された値を取得しているのか? - MySQL 編 - カミナシ エンジニアブログ
      • Introducing Deopt Explorer - TypeScript

        Over the past few months, during the lead-up to the TypeScript 5.0 beta, our team spent a good portion of our time looking for ways to improve the performance of our compiler so that your projects build faster. One of the ways we improved was by looking into an oft overlooked aspect of many JavaScript VMs: inline caching. A Brief Primer on Inline Caching Inline caching is an optimization often use

          Introducing Deopt Explorer - TypeScript
        • The Linux Kernel Module Programming Guide

          Peter Jay Salzman, Michael Burian, Ori Pomerantz, Bob Mottram, Jim Huang 1 Introduction 1.1 Authorship 1.2 Acknowledgements 1.3 What Is A Kernel Module? 1.4 Kernel module package 1.5 What Modules are in my Kernel? 1.6 Is there a need to download and compile the kernel? 1.7 Before We Begin 2 Headers 3 Examples 4 Hello World 4.1 The Simplest Module 4.2 Hello and Goodbye 4.3 The __init and __exit Mac

          • JavaScript Best Practices | The WebStorm Blog

            IDEs CLion DataGrip DataSpell Fleet GoLand IntelliJ IDEA PhpStorm PyCharm RustRover Rider RubyMine WebStorm Plugins & Services Big Data Tools Code With Me JetBrains Platform Scala Toolbox App Writerside JetBrains AI Grazie Junie JetBrains for Data Kineto Team Tools Datalore Space TeamCity Upsource YouTrack Hub Qodana CodeCanvas .NET & Visual Studio .NET Tools ReSharper C++ Languages & Frameworks K

              JavaScript Best Practices | The WebStorm Blog
            • Rust 1.51を早めに深掘り - OPTiM TECH BLOG

              こんにちは、R&Dチームの齋藤(@aznhe21)です。書きたい記事がいっぱいあるのに時間が取れません。悲しい。 さて、本日、日本時間3/26(金)、Rust 1.51がリリースされました。 この記事ではRust 1.51での変更点を詳しく紹介します。 3/26は普通選挙法成立の日 ピックアップ ジェネリクスの引数として定数を使えるようになった 配列要素の所有権を奪いつつイテレート出来るようになった featureの新しい解決機構が使えるようになった 安定化されたAPIのドキュメント Arc::decrement_strong_count 安全性 サンプル Arc::increment_strong_count 安全性 サンプル Once::call_once_force サンプル Peekable::next_if_eq サンプル Peekable::next_if サンプル Seek:

                Rust 1.51を早めに深掘り - OPTiM TECH BLOG
              • 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

                • Prettier 3.0: Hello, ECMAScript Modules! · Prettier

                  We are excited to announce the release of the new version of Prettier! We have made the migration to using ECMAScript Modules for all our source code. This change has significantly improved the development experience for the Prettier team. Please rest assured that when using Prettier as a library, you can still use it as CommonJS as well. This update comes with several breaking changes. One notabl

                    Prettier 3.0: Hello, ECMAScript Modules! · Prettier
                  • Rust 1.50を早めに深掘り - OPTiM TECH BLOG

                    こんにちは、R&Dチームの齋藤(@aznhe21)です。 さて、本日、日本時間2/12(金)、Rust 1.50がリリースされました。 この記事ではRust 1.50での変更点を詳しく紹介します。 2/12はダーウィンの日 *1 *2 ピックアップ Rust財団が誕生 ディレクトリ内容を変更した際のbuild.rsの再実行 boolの値でOptionを返す関数 値域を制限する関数 配列を同じ値で埋める関数 安定化されたAPIのドキュメント bool::then サンプル btree_map::Entry::or_insert_with_key サンプル f32::clamp パニック サンプル f64::clamp パニック サンプル hash_map::Entry::or_insert_with_key サンプル Ord::clamp パニック サンプル RefCell::take パニ

                      Rust 1.50を早めに深掘り - OPTiM TECH BLOG
                    • Turing Machines

                      ALAN M. TURING 23 June 1912 – 7 June 1954 F | | P(T) R P(u) R P(r) R P(i) R P(n) R P(g) R P( ) R P(M) R P(a) R P(c) R P(h) R P(i) R P(n) R P(e) R P(s) R -> B B | | L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) L P( ) -> F 2024-12-20 Translations: English, Spanish In 1928, David Hilbert, one of the most influential mathematicians of his time, aske

                        Turing Machines
                      • Announcing TypeScript 4.7 - TypeScript

                        Today we’re excited to announce the availability of TypeScript 4.7! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. Types help describe what kinds of values you’re working with and what kinds of functions you’re calling. TypeScript can use this information to help you avoid about mistakes like typos, missing arguments, or forgetting

                          Announcing TypeScript 4.7 - TypeScript
                        • Announcing TypeScript 4.7 Beta - TypeScript

                          Today we are excited to announce the beta release of TypeScript 4.7! To get started using the beta, you can use npm with the following command: npm install typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code and Sublime Text 3. Here’s a quick list of what’s new in TypeScript 4.7! ECMAScript Module Support in Node.js

                            Announcing TypeScript 4.7 Beta - TypeScript
                          • 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
                            • Part 1: How We Fell Out of Love with Next.js and Back in Love with Ruby on Rails & Inertia.js - Hardcover Blog

                              This is part 1 of a series documenting Hardcover’s Alexandria release. We recently migrated our codebase from Next.js to Ruby on Rails, and it’s been amazing so far! It was a learning experience, and I’m excited to share some of our takeaways. I’ll link each article here as it’s written. Introducing Alexandria: Faster, Smoother, Smarter Part 1: How we fell out of love with Next.js and back in love

                              • Decoded: GNU coreutils – MaiZure's Projects

                                Helpful background for code reading The GNU coreutils has its foibles. Many of these utilities are approaching 30 years old and include revisions by many people over the years. Here are some things to keep in mind when reading the code: Tiny programs - These utilities are small, (mostly) single-source file programs designed to do one thing and do it well. They are not designed for long life or to

                                • 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)
                                  • All JavaScript and TypeScript Features of the last 3 years

                                    TypeScript as envisioned by Stable DiffusionThis article goes through almost all of the changes of the last 3 years (and some from earlier) in JavaScript / ECMAScript and TypeScript . Not all of the following features will be relevant to you or even practical, but they should instead serve to show what’s possible and to deepen your understanding of these languages. There are a lot of TypeScript fe

                                      All JavaScript and TypeScript Features of the last 3 years
                                    • 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

                                        • Announcing Parcel v2!

                                          The Parcel team is beyond excited to announce that v2.0.0 stable is now available! 🎉 Parcel 2 brings the zero configuration experience you know and love from Parcel 1, and makes it scalable and extensible to projects of any size and complexity. It is already being used in production at some of the biggest companies in the industry including Atlassian, Adobe, and Microsoft. Check out our new websi

                                            Announcing Parcel v2!
                                          • Rust 1.54を早めに深掘り - OPTiM TECH BLOG

                                            こんにちは、R&Dチームの齋藤(@aznhe21)です。 オリンピックでは日本が金メダルラッシュですね!現地まで見に行けない分テレビ前での応援に力が入ります。 さて、本日、日本時間7/30(金)、Rust 1.54がリリースされました。 この記事ではRust 1.54での変更点を詳しく紹介します。 7/30は映画「モスラ」公開の日 ピックアップ 一部の属性内で値としてマクロを使えるようになった WebAssemblyでSIMDが使えるようになった eBPF向けにビルド出来るようになった 安定化されたAPIのドキュメント BTreeMap::into_keys サンプル BTreeMap::into_values サンプル HashMap::into_keys サンプル HashMap::into_values サンプル arch::wasm32 VecDeque::binary_searc

                                              Rust 1.54を早めに深掘り - OPTiM TECH BLOG
                                            • Announcing Dart 3

                                              Hello from Google I/O 2023. Today, live from Mountain View, we’re announcing Dart 3 — the largest Dart release to date! Dart 3 contains three major advancements. First, we’ve completed the journey to 100% sound null safety. Second, we’ve added major new language features for records, patterns, and class modifiers. Third, we’re giving a preview of the future, where we broaden our platform support w

                                                Announcing Dart 3
                                              • 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
                                                • research!rsc: The xz attack shell script

                                                  Posted on Tuesday, April 2, 2024. Updated Wednesday, April 3, 2024. Introduction Andres Freund published the existence of the xz attack on 2024-03-29 to the public oss-security@openwall mailing list. The day before, he alerted Debian security and the (private) distros@openwall list. In his mail, he says that he dug into this after “observing a few odd symptoms around liblzma (part of the xz packag

                                                  • 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
                                                      • Announcing TypeScript 4.7 RC - TypeScript

                                                        Today we’re excited to announce our Release Candidate (RC) of TypeScript 4.7! Between now and the stable release of TypeScript 4.7, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or use npm with the following command: npm install typescript@rc You can also get editor support by Downloading for Visual Studio 2022/2019 Following

                                                          Announcing TypeScript 4.7 RC - TypeScript
                                                        • 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

                                                          • research!rsc: Storing Data in Control Flow

                                                            A decision that arises over and over when designing concurrent programs is whether to represent program state in control flow or as data. This post is about what that decision means and how to approach it. Done well, taking program state stored in data and storing it instead in control flow can make programs much clearer and more maintainable than they otherwise would be. Before saying much more,

                                                            • Announcing TypeScript 5.5 - TypeScript

                                                              Today we’re excited to announce the release of TypeScript 5.5! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                                Announcing TypeScript 5.5 - TypeScript
                                                              • TypeScript is Surprisingly OK for Compilers

                                                                TypeScript is Surprisingly OK for Compilers Aug 17, 2023 There are two main historical trends when choosing an implementation language for something compiler-shaped. For more language-centric tasks, like a formal specification, or a toy hobby language, OCaml makes most sense. See, for example, plzoo or WebAssembly reference interpreter. For something implementation-centric and production ready, C+

                                                                • 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

                                                                  • Patterns for Building LLM-based Systems & Products

                                                                    Patterns for Building LLM-based Systems & Products [ llm engineering production 🔥 ] · 66 min read Discussions on HackerNews, Twitter, and LinkedIn “There is a large class of problems that are easy to imagine and build demos for, but extremely hard to make products out of. For example, self-driving: It’s easy to demo a car self-driving around a block, but making it into a product takes a decade.”

                                                                      Patterns for Building LLM-based Systems & Products
                                                                    • haku

                                                                      Haku A toy functional programming language based on literary Japanese. Is Haku for you? Haku lets you write programs that look very much like written Japanese. So you need to be familiar with written Japanese to program in Haku. I have added translations and explanations to the documentation. Haku is an experiment, not a practical programming language. Several of its features are rather contrary.

                                                                        haku
                                                                      • 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
                                                                        • How to write Rust in the kernel: part 2

                                                                          In 2023, Fujita Tomonori wrote a Rust version of the existing driver for the Asix AX88796B embedded Ethernet controller. At slightly more than 100 lines, it's about as simple as a driver can be, and therefore is a useful touchstone for the differences between writing Rust and C in the kernel. Looking at the Rust syntax, types, and APIs used by the driver and contrasting them with the C version wil

                                                                          • 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
                                                                              • Announcing TypeScript 5.5 Beta - TypeScript

                                                                                Today we are excited to announce the availability of TypeScript 5.5 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.5! Inferred Type Predicates Control Flow Narrowing for Constant Indexed Accesses Type Imports in JSDoc Regular Expression Syntax Checking Iso

                                                                                  Announcing TypeScript 5.5 Beta - TypeScript
                                                                                • News from WWDC23: WebKit Features in Safari 17 beta

                                                                                  Jun 6, 2023 by Patrick Angle, Jean-Yves Avenard, Marcos Caceres, Ada Rose Cannon, Eric Carlson, Garrett Davidson, Jon Davis, Karl Dubost, Brady Eidson, Matthew Finkel, Simon Fraser, Brent Fulgham, Rachel Ginsberg, David Johnson, Anne van Kesteren, Mark Lam, Sihui Liu, Justin Michaud, Jer Noble, Tim Nguyen, Ben Nham, Richard Robinson, Michael Saboff, Alexey Shvaika, Jen Simmons, Sam Sneddon, Brando

                                                                                    News from WWDC23: WebKit Features in Safari 17 beta