並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 42件

新着順 人気順

explain if else statement in javascriptの検索結果1 - 40 件 / 42件

  • 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

    • 「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる

      はじめに 「Just use Postgres」という言葉を初めて聞いたのは、いつだったか覚えていません。Twitter か Hacker News か、あるいは社内の Slack か。どこで聞いたにせよ、私の反応は決まっていました。「また極端なことを言う人がいる」と。 「それ、〇〇でもできますよ」——この手のフレーズはもう100回は聞いてきました。そして大抵の場合、その〇〇は専用ツールに置き換えられていきます。技術が専門分化していくのは自然な流れです。 全文検索なら Elasticsearch。時系列データなら InfluxDB。メッセージキューなら RabbitMQ。それぞれの分野に専門家がいて、専用のソリューションがあって、ベストプラクティスがあります。「とりあえず Postgres で」なんて、それは思考停止ではないか、と。でも、心のどこかで気になっていたんです。 www.mann

        「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる
      • 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
        • How to refactor code with GitHub Copilot

          We’ve all been there—staring at a function that looks like it was written by an over-caffeinated goblin at 3 AM (maybe even your alter ego). You could pretend it doesn’t exist, or you could refactor it. Luckily, GitHub Copilot makes the second option less painful. Let’s get to it. What is code refactoring? Feel free to breeze past this section if you already know what’s involved with refactoring c

            How to refactor code with GitHub Copilot
          • 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

            • 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
              • TypeScript and native ESM on Node.js

                In this blog post, I’ll explain everything you need to know in order to use and produce native ECMAScript modules on Node.js. The GitHub repository iterable is an example of a TypeScript ESM package that works on Node.js. It still uses the "typesVersions" workaround (which isn’t needed in TypeScript 4.7 and later). (Thanks to Guy Beford and Oleg Drapeza for their feedback on this post.) TypeScript

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

                          Do you want to master CSS layouts? I'm building a new course. Learn more I like to think of CSS as a conditional design language. Over the years, CSS was known as a way to style web pages. Now, however, CSS has evolved a lot to the point you can see conditional rules. The interesting bit is that those CSS rules aren’t direct (i.e: there is still no if/else in CSS), but the way features in CSS work

                            Conditional CSS
                          • Why Cities: Skylines 2 performs poorly

                            One of the most highly anticipated PC games of the year Cities: Skylines 2 was released last week to a mixed reception. My impression is that gameplay and simulation-wise it seems to be a step in the right direction, and at least on paper the game seems more well-rounded in terms of features than the original was at launch. There are however significant issues with the game, ranging from balance p

                            • Grant Handy

                              Written 2023-02-24Learn about simple ray casting and discover some fun math by creating a tiny 2KB game with Rust & WebAssembly. IntroductionOn first glance, making a first person game without an engine or a graphics API seems like an almost impossible task. In this post I'll show you how to do that using a simple variant of a method called ray casting. My goal here is to show how something that l

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

                                • Highlights from the Claude 4 system prompt

                                  25th May 2025 Anthropic publish most of the system prompts for their chat models as part of their release notes. They recently shared the new prompts for both Claude Opus 4 and Claude Sonnet 4. I enjoyed digging through the prompts, since they act as a sort of unofficial manual for how best to use these tools. Here are my highlights, including a dive into the leaked tool prompts that Anthropic did

                                    Highlights from the Claude 4 system prompt
                                  • Chapter 8: CSS | CSS-Tricks

                                    In June of 2006, web developers and designers from around the world came to London for the second annual @media conference. The first had been a huge success, and @media 2006 had even more promise. Its speaker lineup was pulled from some of the most exciting and energetic voices in the web design and browser community. Chris Wilson was there to announce the first major release to Microsoft’s Inter

                                      Chapter 8: CSS | CSS-Tricks
                                    • Speeding up the JavaScript ecosystem - eslint

                                      We've talked quite a bit about linting in the past two posts of this series, so I thought it's time to give eslint the proper limelight it deserves. Overall eslint is so flexible, that you can even swap out the parser for a completely different one. That's not a rare scenario either as with the rise of JSX and TypeScript that is frequently done. Enriched by a healthy ecosystem of plugins and prese

                                        Speeding up the JavaScript ecosystem - eslint
                                      • 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

                                        • 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

                                          • How JavaScript Works: A Visual Guide🔥 🤖

                                            JavaScript is one of the most loved and hated language in the world. It is loved because it is potent. You can make a full-stack application by just learning JavaScript and nothing else. It is also hated because it behaves in unexpected and upsetting ways, which, if you’re not invested in understanding the language, might make you hate it 💔. This blog will explain how JavaScript executes code in

                                              How JavaScript Works: A Visual Guide🔥 🤖
                                            • go command - cmd/go - Go Packages

                                              Go is a tool for managing Go source code. Usage: go <command> [arguments] The commands are: bug start a bug report build compile packages and dependencies clean remove object files and cached files doc show documentation for package or symbol env print Go environment information fix update packages to use new APIs fmt gofmt (reformat) package sources generate generate Go files by processing source

                                              • 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

                                                • 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

                                                  • 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

                                                    • If Not React, Then What? - Infrequently Noted

                                                      Over the past decade, my work has centred on partnering with teams to build ambitious products for the web across both desktop and mobile. This has provided a ring-side seat to a sweeping variety of teams, products, and technology stacks across more than 100 engagements. While I'd like to be spending most of this time working through improvements to web APIs, the majority of time spent with partne

                                                        If Not React, Then What? - Infrequently Noted
                                                      • Exploring 2.5 Reasons People Embrace GraphQL in 2024, and the Caveats Behind Its Non-Adoption

                                                        In my day-to-day work, I interact with medium-sized companies like SoundTrackYourBrand (Spotify for Business), TailorTech (Headless ERP) or TravelPass (Travel Management Platform) as well as larger companies like Uber, Ebay, Equinix, Crypto.com and many others. At the same time, I'm also interacting with a lot of people on Twitter, Reddit, and other platforms. What I've noticed is that there seems

                                                          Exploring 2.5 Reasons People Embrace GraphQL in 2024, and the Caveats Behind Its Non-Adoption
                                                        • 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
                                                          • Why APL is a language worth knowing

                                                            “A language that doesn't affect the way you think about programming, is not worth knowing.”, by Alan J. Perlis. Why APL is a language worth knowing Alan Perlis, the computer scientist recipient of the first Turing award, wrote “A language that doesn't affect the way you think about programming, is not worth knowing.” ― Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Not

                                                              Why APL is a language worth knowing
                                                            • 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
                                                              • Paul Graham on Ambition, Art, and Evaluating Talent (Ep. 186)

                                                                August 9, 2023 Paul Graham on Ambition, Art, and Evaluating Talent (Ep. 186) Plus, his bizarre strategy for getting over a fear of flying. Tyler and Y Combinator co-founder Paul Graham sat down at his home in the English countryside to discuss what areas of talent judgment his co-founder and wife Jessica Livingston is better at, whether young founders have gotten rarer, whether he still takes a di

                                                                  Paul Graham on Ambition, Art, and Evaluating Talent (Ep. 186)
                                                                • 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

                                                                  • The Humble For Loop in Rust

                                                                    The Humble For Loop in Rust By Martijn Faassen • 2024-12-11 • Tags: programming, rust Rust has some really nice functional programming facilities built in, all around an iterator concept. Rust being focused on performance and low level control makes it possible to use this without paying a performance cost. Sometimes I still prefer to use the humble for loop though. In quite a few cases, it combin

                                                                    • Bullshit Jobs

                                                                      Notes: ISBN 978-1-5011-4331-1, ISBN 978-1-5011-4334-2 (ebook); Most names and many identifying characteristics have been changed.; Interior design by Carly Loman; Jacket design by David L Itman To anyone who would rather be doing something useful with themselves. Preface: On the Phenomenon of Bullshit Jobs In the spring of 2013, I unwittingly set off a very minor international sensation. It all be

                                                                        Bullshit Jobs
                                                                      • Let’s Create a Custom Audio Player | CSS-Tricks

                                                                        Get affordable and hassle-free WordPress hosting plans with Cloudways — start your free trial today. HTML has a built-in native audio player interface that we get simply using the <audio> element. Point it to a sound file and that’s all there is to it. We even get to specify multiple files for better browser support, as well as a little CSS flexibility to style things up, like giving the audio pla

                                                                          Let’s Create a Custom Audio Player | CSS-Tricks
                                                                        • How JavaScript engines achieve great performance

                                                                          JavaScript is an impressive technology. Not because it’s particularly well-designed (it isn’t). Not because almost every single consumer device with internet access in the world has executed a JavaScript program. Instead, JavaScript is impressive because almost every single feature of the language makes it a nightmare to optimize and yet, it is fast. Think about it. There is no type information. E

                                                                            How JavaScript engines achieve great performance
                                                                          • Combobulate: Structured Movement and Editing with Tree-Sitter

                                                                            Combobulate: Structured Movement and Editing with Tree-Sitter Combobulate is a package that adds advanced structured editing and movement to many programming modes in Emacs. Here's how it works, and how it can enrich your editing experience in Emacs. About a year ago I released an alpha – prototype, really – version of a tool I call Combobulate. I’d been using it personally for a while before I le

                                                                              Combobulate: Structured Movement and Editing with Tree-Sitter
                                                                            • 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
                                                                              • Server-side prototype pollution: Black-box detection without the DoS

                                                                                Published: 15 February 2023 at 16:30 UTC Updated: 28 March 2023 at 09:50 UTC Server-side prototype pollution is hard to detect black-box without causing a DoS. In this post, we introduce a range of safe detection techniques, which we've also implemented in an open source Burp Suite extension. You can shortly try these out for yourself on interactive, deliberately vulnerable labs in our new Web Sec

                                                                                  Server-side prototype pollution: Black-box detection without the DoS
                                                                                • Learn CRUD Operations in JavaScript by Building TODO APP

                                                                                  Today we're gonna learn how to do CRUD Operations in JavaScript by making a Todo App. Let's get started 🔥 This is the app we're making today: Live preview GitHub Repository You can watch this tutorial on YouTube as well if you like 🎥 Table of Contents What is CRUD? Understanding CRUD Principles How to Make a To-Do App using CRUD Operations What is CRUD? CRUD stands for - C: Create R: Read U: Upd

                                                                                    Learn CRUD Operations in JavaScript by Building TODO APP