並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 23 件 / 23件

新着順 人気順

c# enum assign string valueの検索結果1 - 23 件 / 23件

  • TypeScriptで世界一型安全な型レベルSQL Interpreterを作っている話

    こんにちは。DevOps芸人と化して久しいAndyです。 2020年の秋にTypeScript 4.1へTemplate Literal Typesが導入され、そのインパクトに俄かに一部の界隈がザワついたのは記憶に新しいかと思います。 今回は型プログラミングの可能性を大いに押し広げたTemplate Literal Typesを用いてSQL文を型レベルで解析し、その実行結果を型情報として導出するためのsqlptureというライブラリを作ったので紹介します。 Embedded content: https://github.com/andoshin11/sqlpture SQLの実行/検証対象はPostgreSQL v13です。 tl;dr SQL文を型レベルで解析・評価して返り値型を取得できるmini interpreterを作ったよ 型レベルのSQL validatorも作ってるよ 実際

      TypeScriptで世界一型安全な型レベルSQL Interpreterを作っている話
    • 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

      • The Development of the C Language

        The Development of the C Language* Dennis M. Ritchie Bell Labs/Lucent Technologies Murray Hill, NJ 07974 USA dmr@bell-labs.com ABSTRACT The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager progr

        • Object Structure in JavaScript Engines

          Object Structure in JavaScript EnginesFrom a developer's perspective, objects in JavaScript are quite flexible and understandable. We can add, remove, and modify object properties on our own. However, few people think about how objects are stored in memory and processed by JS engines. Can a developer's actions, directly or indirectly, impact performance and memory consumption? Let's try to delve i

            Object Structure in JavaScript Engines
          • 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
            • Borgo Programming Language

              Borgo is a new programming language that compiles to Go. For a high-level overview of the features and instructions on running the compiler locally, check the README. This playground runs the compiler as a wasm binary and then sends the transpiled go output to the official Go playground for execution. use fmt enum NetworkState<T> { Loading, Failed(int), Success(T), } struct Response { title: strin

              • 即興演奏のためのオーディオビジュアルセットを作った

                2024年の9月14日に岡千穂さん、野本直輝さんらからComputer Music Partyというイベントにお誘いいただき、かなり久し振りにソロでの即興演奏、オーディオビジュアルのライブをしました。出演者全員やってることがみんな違ってて、全員何をしているのか全然わからなくて素晴らしいイベントでした。。 Calum Gunn, moxus, Naoki Nomoto & Utah Kawasaki, Satoru Higa, okachiho - Tokyo Gig Guide 本記事はそのイベントの中で何をしていたか、どう作ったか、についての内容となります 実際の演奏中の様子はこちら モチベーション 大学生のころ、専攻ではコンピューターミュージックを学ぶかたわら放課後はジャズ研でドラムを演奏するといった学生生活を送っていました 卒業して早20年程度が経過した今、久しぶりにドラム触りたいけ

                  即興演奏のためのオーディオビジュアルセットを作った
                • 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
                  • JavaScript metaprogramming with the 2022-03 decorators API

                    More information on the syntax and semantics of decorators (optional section)  # (This section is optional. If you skip it, you can still understand the remaining content.) The syntax of decorator expressions  # A decorator expression starts with a chain of one or more identifiers, separated by dots. Each identifier except the first one can be private (prefix #). Square brackets [] are not allowed

                    • Python コンパイラを作ろう : コンパイラ基礎講座第一回 (理論編 1) - Qiita

                      まえがき この記事は投稿者(NokonoKotlin)の個人サイトの記事から Qiita 用に移植 & 加筆したものです。 (この文言は記事が剽窃でないことを周知するためのものであり、個人サイトの宣伝ではないことをあらかじめご了承ください。) はじめに みなさんはスマブラの勉強をしてゲーム制作の勉強ができると思いますか? プログラミング学習といえば文法やライブラリの学習を想像されるかもしれません。これはその通りなのですが、プログラミングをさらに理解するためには、プログラムが動く裏側で何が起こっているのかを知る必要があります。 インタープリタとコンパイラ みなさん Python はよくご存知のことだと思いますが、今一度 Python が何かを考えてみませんか。ご存知の通り、Python はプログラミング言語であり、インタープリタを介して Python 文で書かれたプログラムを実行します。 処

                        Python コンパイラを作ろう : コンパイラ基礎講座第一回 (理論編 1) - Qiita
                      • Against SQL

                        TLDR The relational model is great: A shared universal data model allows cooperation between programs written in many different languages, running on different machines and with different lifespans. Normalization allows updating data without worrying about forgetting to update derived data. Physical data independence allows changing data-structures and query plans without having to change all of y

                        • All C++20 core language features with examples

                          Introduction The story behind this article is very simple, I wanted to learn about new C++20 language features and to have a brief summary for all of them on a single page. So, I decided to read all proposals and create this “cheat sheet” that explains and demonstrates each feature. This is not a “best practices” kind of article, it serves only demonstrational purpose. Most examples were inspired

                          • Async/Await | Writing an OS in Rust

                            この記事は翻訳されたものです: この記事はAsync/Awaitをコミュニティの手により翻訳したものです。そのため、翻訳が完全・最新でなかったり、原文にない誤りを含んでいる可能性があります。問題があればこのissue上で報告してください! 翻訳者: @kahirokunn, @garasubo, @sozysozbot 及び @swnakamura. With contributions from @asami-kawasaki 及び @Foo-x. この記事では、Rustの協調的マルチタスクとasync/await機能について説明します。Rustのasync/await機能については、Future trait の設計、ステートマシンの変換、 pinning などを含めて詳しく説明します。そして、非同期キーボードタスクと基本的なexecutorを作成することで、カーネルにasync/awa

                            • 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

                              • TypeScript 入門 - RAKUS Developers Blog | ラクス エンジニアブログ

                                こんにちは。新卒のid:w1pと申します。 今回業務でTypeScriptを導入するということで、いい機会なのでTypeScriptについていろいろ調べました。 目次 環境構築 TypeScriptの基本的な文法 型アノテーションの書き方 基本の型 number型 bigint型 string型 boolean型 symbol型 null型 undefined型 型エイリアスで型に別名をつける リテラル型 複合型 object型 array型 tuple型 enum 数値型enumの注意点 class Union型 Intersection型 その他の型 Function型 Index Signitures 特殊な型 any unknown void never インターフェースと型エイリアス インターフェース 2つの違い 宣言のマージ プリミティブ型とUnion型 その他 ジェネリクス

                                  TypeScript 入門 - RAKUS Developers Blog | ラクス エンジニアブログ
                                • Rust製のLinter「Oxlint」が速すぎる

                                  Rust製のLinterである「Oxlint」が2023/12/12に利用可能となったので、ドキュメントをまとめてみました 特徴 ESLintの50倍から100倍速く、CPUコア数に応じてスケールする Node.jsが不要で、コマンドだけで実行可能 デフォルトで他のESLintプラグインのルールを統合 .eslintignore をサポート ESLintコメントの無効化をサポート インストール oxlintはNode.jsを必須としていないので、ダウンロードせずコマンドだけでも利用可能です インストールする時 Lintルール Oxlintはまだプラグインシステムを提供していませんが、TypeScript、React、Jest、Unicorn、JSX-a11y、Importなどの一般的なプラグインからのルールを積極的に統合しています eslint, typescript, eslint-pl

                                    Rust製のLinter「Oxlint」が速すぎる
                                  • 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

                                    • Safer Usage Of C++

                                      Safer Usage Of C++ This document is PUBLIC. Chromium committers can comment on the original doc. If you want to comment but can’t, ping palmer@. Thanks for reading! Google-internal short link: go/safer-cpp Authors/Editors: adetaylor, palmer Contributors: ajgo, danakj, davidben, dcheng, dmitrig, enh, jannh, jdoerrie, joenotcharles, kcc, markbrand, mmoroz, mpdenton, pkasting, rsesek, tsepez, awhalle

                                      • Rails: PORO の attribute に対して ActiveRecord::Enum 風の実装をする|TechRacho by BPS株式会社

                                        2024.12.24 Rails: PORO の attribute に対して ActiveRecord::Enum 風の実装をする 先日業務中に遭遇したちょっとした疑問から ActiveRecord::Enum っぽい実装を POROで再現するアレコレを試してみたくなったのでこの記事を書き起こしてみました。 enum についてはそもそも ActiveRecord::Enum の宣言の仕方からして色々なパターンがあったり、PostgreSQL での enum 型の存在もあったりで Enum 全般での解説、深掘り記事もいつか書いてみたい気持ちもあるのですが、今回は思い立ったが吉日と言うことで、あえて何故かいきなり王道の話題から外れたところに話を絞っていきたいと思います。 (ところで校正してる時に気付きましたが ActiveModel::Enum を導入してみようとする試みとそれを拒否した議論

                                          Rails: PORO の attribute に対して ActiveRecord::Enum 風の実装をする|TechRacho by BPS株式会社
                                        • Zig 言語リファレンス

                                          index.md これは Zig ドキュメント 0.10.1 を DeepL Pro と ChatGPT を利用して翻訳したものです。 一部 master なモノもあります、ごちゃ混ぜです 自分用に翻訳しています zig_doc_0.10.1.md Zig 言語リファレンス はじめに Zig は、堅牢で最適かつ再利用可能なソフトウェアを維持するための汎用プログラミング言語およびツールチェインです。 ロバスト メモリ不足などのエッジケースでも正しく動作する。 最適化 プログラムが最適に動作・実行されるように記述する。 再利用可能 同じコードが、制約の異なる多くの環境で動作します。 保守性 コンパイラや他のプログラマに意図を正確に伝えることができる。コードを読むためのオーバーヘッドが少なく、要件や環境の変化に強い言語です。 新しいことを学ぶのに一番効率的な方法は例を見ることであることが多いので

                                            Zig 言語リファレンス
                                          • Crafting Interpretersの言語実装をRustで進めている話 - ローファイ日記

                                            Rustアドベントカレンダー(その1)3日目の記事です。 qiita.com id:udzura と申します。Rustは2021年になると同時に始めたので、いまだ経験1年未満ですが、僭越ながらも今回アドベントカレンダーに参加いたします。 今回はタイトルの通り、RustでCrafting Interpretersを進めている話です。Crafting Interpretersとは、Loxと名付けられたインタプリタ言語をJavaやCで実装していき、その過程で言語実装の肝要を学ぶことができるという書籍です。Web版は無料で閲覧できます。 craftinginterpreters.com 現在II章まで終わり、実装はGitHubにアップしています。 Lox本体のソースコード部分 と同じMITライセンスにしています。 github.com この記事では、進めた上で工夫した点、頑張った点を小学生の日記の

                                              Crafting Interpretersの言語実装をRustで進めている話 - ローファイ日記
                                            • The evolution of a structural code editor

                                              The top image shows the structural editor, and shell, for the eyg programming language running on a phone. Later on I’ll show it running on a TV. On both devices the structural editor is a better coding experience than a text editor would be. This post outlines the evolution of the editor over several years, and highlights the major changes over time along with some design thoughts and implementat

                                                The evolution of a structural code editor
                                              • Some mistakes Rust doesn't catch

                                                Thanks to my sponsors: Thor Kamphefner, Mike English, Jonas Platte, Mario Fleischhacker, jer, Twan Walpot, Evan Relf, teor, zed, James Rhodes, Corey Alexander, Beat Scherrer, Scott Steele, Santiago Lema, Matt Heise, Matt Jackson, Julian Schmid, Diego Roig, Romet Tagobert, Josh Triplett and 278 more I still get excited about programming languages. But these days, it’s not so much because of what th

                                                  Some mistakes Rust doesn't catch
                                                1