並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 28 件 / 28件

新着順 人気順

pipe-operatorの検索結果1 - 28 件 / 28件

  • パイプライン演算子の歴史 - まめめも

    (You can read this article in English.) Ruby の開発版にパイプライン演算子(pipeline operator)が試験的に導入されましたが、いろいろあってプチ炎上になっています(チケット)。 せっかくの機会なので、パイプライン演算子の歴史を調べてみました。付け焼き刃の調査なので、間違ってたら教えてください。 パイプライン演算子とは こんな感じのものです。 x |> f |> g |> h # h(g(f(x))) と同じ意味 h(g(f(x))) という関数適用の式は、関数が呼ばれる順序(f→g→h)と、プログラムの字面上の順序(h→g→f)が逆でわかりにくいとされます。この問題は、特に、関数が大きくなったときに顕著になります。 wonderful_process_h( marvelous_process_g( fantastic_process

      パイプライン演算子の歴史 - まめめも
    • JavaScriptを大きく変えうる Dataflow Proposals の概要と論点(Call-this, Pipe Operator)

      Dataflow Proposals とは 以下の5つのプロポーザルをまとめて Dataflow Proposals と呼んでいる。 Stage 2: Pipe operator Stage 1: Call-this operator Stage 1: Partial application(PFA) Stage 1: Extensions Stage 0: Function.pipe and flow 例えば Pipe operator, Call-this operator, Partial application を組み合わせると、以下のように書けるようになる。(提案段階なので変わる可能性アリ) import { getAuth, getIdToken } from "firebase/auth"; function isPublic(article) { return articl

        JavaScriptを大きく変えうる Dataflow Proposals の概要と論点(Call-this, Pipe Operator)
      • React with TypeScript Cheatsheet

        Table of Contents:· Table of Contents: · How to type React props ∘ Creating a type alias for the props ∘ Typing optional props ∘ List of types for React component props · How to type React function components · How to type React hooks ∘ Typing useState hook ∘ Typing useEffect and useLayoutEffect hooks ∘ Typing useContext hook ∘ Typing useRef hook ∘ Typing useMemo hook ∘ Typing useCallback hook ∘ T

          React with TypeScript Cheatsheet
        • GitHub - wader/jqjq: jq implementation of jq

          123, .123, 1.23, 1.23e2, 1.23e+2, "abc", true, false, null Scalar literals Unicode codepoint escape "\ud83d\ude03" Handle surrogate pairs \ud800-\udfff, should translate to codepoint. Control code and quote escape "\"\n\r\t\f\b\\\/" "abc \(123)" String interpolation {key: "value"} Object literal {key} {"key"} {$key} {(f): f} {("a","b"): (1,2), c: 2} Multiple key/value outputs {"\("abc")": 123} Key

            GitHub - wader/jqjq: jq implementation of jq
          • WebAssemblyへのコンパイルだけに特化した新言語「Onyx」登場

            米Wasmer社が、WebAssemblyへのコンパイルだけに特化した新しいプログラミング言語「Onyx」をブログで紹介しています。 Onyxは(Wasmer社ではなく)Brendan Hansen氏が開発に3年を費やしたプログラミング言語です。 (2023/12/13 お詫びと訂正。当初OnyxをWasmer社が開発したと紹介していましたが、Wasmer社とは直接関係のないBrendan Hansen氏が開発した者でした。お詫びして訂正します。タイトルと本文の一部を修正しました) We're so excited about Onyx . A new programming language which solely compiles to #WebAssembly. Read all about it in our new blogpost:https://t.co/L6yZ9Ls5Q

              WebAssemblyへのコンパイルだけに特化した新言語「Onyx」登場
            • JavaScript の Bind Operator プロポーザルが復活した | Yuku Kotani

              Gzemnid はざっくりしていて完璧に信用はできないが、十分に使われていることはわかる。 特に Node や Deno などの JavaScript ランタイムや polyfill 系ライブラリでは、プロトタイプ汚染などを避けるために多用されている。 にもかかわらず、.bind と .call は自然言語の SVO 的な思考の流れに反していてむずかしい。実際のユースケースで見比べてみるとわかる。 // bluebird@3.5.5/js/release/synchronous_inspection.js return isPending.call(this._target()); return this._target()::isPending(); // ajv@6.10.0/lib/ajv.js validate = macro.call(self, schema, parentSc

                JavaScript の Bind Operator プロポーザルが復活した | Yuku Kotani
              • Ruby2.7のpipeline operatorで+や-等の演算子をはじいたのはなぜなんでしょうか?

                回答: Pipeline operatorはまだホットな状態で(2019–06–15現在)、今後も変更が加わる可能性が高いのですが、現状において質問の意味を推測すると、pipeline operator (|>) において、当初 [code]1 |>+ 2 #=> 3 (1.+(2) と同じ意味に解釈されるから) [/code]となる仕様だったのを禁止したのはなぜかということですが、単に読みやすさに貢献しないからです。それだけでなく積極的に読みにくさに貢献してますね。 Pipeline operatorは以下の指摘があり、もっともだと思う点もあるのでなんらかの対処を考えています。 ...

                  Ruby2.7のpipeline operatorで+や-等の演算子をはじいたのはなぜなんでしょうか?
                • Onyx, a new programming language powered by WebAssembly

                  Back to articlesOnyx, a new programming language powered by WebAssemblyLearn about Onyx, a new imperative programming language that leverages WebAssembly and Wasmer for seamless cross-platform support What is Onyx? Onyx is a new programming language featuring a modern, expressive syntax, strict type safety, blazingly-fast build times, and out-of-the-box cross platform support thanks to WebAssembly

                    Onyx, a new programming language powered by WebAssembly
                  • The Ultimate Interactive JQ Guide

                    The Ultimate Interactive JQ Guide Learn how to search, query, and modify JSON data with 25 interactive jq examples and explainations Cover Photo by Pixabay Has this ever happened to you? You’ve just received a massive JSON file that looks like it was designed to confuse you. Or maybe you entered a command, and you got so much JSON that it looks incomprehensible. The data you need is buried inside,

                      The Ultimate Interactive JQ Guide
                    • [ECMAScript] Pipe operator 論争まとめ – F# か Hack か両方か - 株式会社カブク

                      ※ 2021/09/15 時点の話です。議論が活発なので、これからどう流れるか分かりません。この記事ではたくさんのリンクを貼っていますが、議論の焦点を理解するにあたって最も重要なリンクはこれです。 TC39 Pipeline Operator – Hack vs F# https://benlesh.com/posts/tc39-pipeline-proposal-hack-vs-f-sharp/ 2 つの仕様案 TC39 の Pipe operator (以前は Pipeline operator と呼ばれていました、 Wikipedia によれば Pipe operator を日本語で「パイプライン演算子」と呼ぶようです)のプロポーザルには少なくとも 2 つの異なる仕様案「F# pipe」と「Hack pipe」があります。以前はこれらを組み合わせた「Smart mix」案もありました

                        [ECMAScript] Pipe operator 論争まとめ – F# か Hack か両方か - 株式会社カブク
                      • A pipe operator for JavaScript: introduction and use cases

                        The proposal “Pipe operator (|>) for JavaScript” (by J. S. Choi, James DiGioia, Ron Buckton and Tab Atkins) introduces a new operator. This operator is an idea borrowed from functional programming that makes applying functions more convenient in many cases. This blog post describes how the pipe operator works and what its use cases are (there are more than you might expect!). The two competing pro

                        • 2021-11-02のJS: Babel 7.16.0、AVA 4 RC1、ウェブサイトのセキュリティヘッダー

                          JSer.info #564 - Babel 7.16.0がリリースされました。 7.16.0 Released: ESLint 8 and TypeScript 4.5 · Babel Babel 7.16.0ではClass static blocksが@babel/preset-envに含まれるようになっています。 また、TypeScript 4.5 Betaへの対応、Stage 2であるPipe Operatorへのオプションの追加などが行われています。 また、@babel/eslint-parserがESLint 8へ対応しています。 Node.js向けのTest RunnerであるAVA 4 RC1がリリースされました。 Release AVA 4 Release Candidate 1 · avajs/ava AVA 4 RC1の破壊的な変更としてNode 10のサポート終了、

                            2021-11-02のJS: Babel 7.16.0、AVA 4 RC1、ウェブサイトのセキュリティヘッダー
                          • 週刊Railsウォッチ(20200616後編)本番環境をFullstaq Rubyに換えた理由、CSRF発生フローチャート、DBのトランザクション分離レベル比較ほか|TechRacho by BPS株式会社

                            morimorihoge注:本トピックに関するコメントとして、初出時人種差による不平等を容認・揶揄するようにも取れる内容がありましたので当該部分を削除させていただきました。 Twitter上でのご指摘を受けて社内ヒアリングを行ったところ、私を含む参加メンバーで主題の認識違いがあり、主題のすれ違いの中話していた内容をテキスト化した際に公開記事として掲載するにあたって不適切な内容となってしまっていたことが判明いたしました。不快に感じられた方にはこの場を借りてお詫びいたします。 ※BPS株式会社は会社・組織として人種その他先天的・後天的な要因による差別を容認・支持する立場にはありません(弊社代表にも確認済み) 各記事冒頭には⚓でパーマリンクを置いてあります: 社内やTwitterでの議論などにどうぞ 「つっつきボイス」はRailsウォッチ公開前ドラフトを(鍋のように)社内有志でつっついたときの会

                              週刊Railsウォッチ(20200616後編)本番環境をFullstaq Rubyに換えた理由、CSRF発生フローチャート、DBのトランザクション分離レベル比較ほか|TechRacho by BPS株式会社
                            • Feature #15799: pipeline operator - Ruby master - Ruby Issue Tracking System

                              My early thinking about this syntax is it's a very narrow use-case. Is it anything more than . and no need for parentheses in some rare cases? There is also the RHS assignment which feels very unnatural to me. I think there is nothing wrong with having parentheses for Range, I think they actually help readability. Martin's desugared version which works today is actually shorter and I believe most

                              • Next.js の非同期関数 piping と Error 設計

                                getServerSideProps や API Routes で未認証リクエストを弾く方法はいくつかあります。例えば、公式では HOF(Higher-Order Function)を使った例が紹介されていて(withSession関数)認証要件ページで利用できるアプローチです。今回は別のアプローチとして、関数合成を用いたものを紹介します。 関数合成とは 現在 stage2 の Pipe Operator でご存じの方も多いと思いますが、reduce を使って複数の関数を合成するテクニックがあります。合成された関数はシリアルに実行され、戻り値が次関数の引数となり、演算することができます。例えば以下の例では、0 から順番に 100,200,300 と加算していき、最終的に 600 を得ることができます。 function pipeSync(...fns) { return (args) =>

                                  Next.js の非同期関数 piping と Error 設計
                                • 2022-02-09のJS: Babel 7.17.0、Chrome 99 beta、Fetch API in Node.js

                                  JSer.info #578 - Babel 7.17.0がリリースされました。 7.17.0 Released: RegExp 'v' mode and ... 🥁 decorators! · Babel Decorators Proposalを最新のものへ対応する"version": "2021-12"オプションの追加、Stage 2の正規表現リテラルのvフラグと\qシーケンスのサポートされています。 また、Stage 2のPipe OperatorにtopicTokenとして^^と@@を選択できるオプションの追加、@babel/registerに実験的なworkerの実装を追加などが含まれています。 Chrome 99 betaがリリースされました。 Chromium Blog: Chrome 99: CSS Cascade Layers, a New Picker for Inp

                                    2022-02-09のJS: Babel 7.17.0、Chrome 99 beta、Fetch API in Node.js
                                  • Babelは何百万もの人々に使われているのに、どうして我々は飢えようとしているのか - Qiita

                                    フロントエンド界隈でBabelにお世話になったことのない人はいないでしょう。 新しいJavaScript文法を、古いバージョンのブラウザでも動作するように変換してくれるツールです IEが現役だったころはIE向けページになくてはならない存在でしたし、IE亡き今では最新のES機能を最速で採用できる場となっています。 // Pipe Operator "World" |> `Hello, ${#}!` |> alert(#); // 変換後 var _ref, _ref2; _ref2 = (_ref = "World", `Hello, ${_ref}!`), alert(_ref2); 未だどのブラウザもサポートしていないPipe Operatorも、Babelならごらんのとおり既に使えます。 また最近のWebフレームワークには大抵デフォルトで入っていて、気付いていなかったとしても裏で使われ

                                      Babelは何百万もの人々に使われているのに、どうして我々は飢えようとしているのか - Qiita
                                    • 12 Languages in 12 Months

                                      I stumbled across Exercism last year and was immediately charmed. It's a website devoted to teaching programming languages. It's got a great UI, offers free mentoring (by a human!), and is entirely open source. Last January, they announced a new program called 12in23, where they challenged participants to try 12 new programming languages in 2023. Each month would have a theme (such as "Analytical

                                        12 Languages in 12 Months
                                      • From TypeScript To ReScript | Serhii Potapov (greyblake)

                                        About three weeks ago I decided to completely rewrite the frontend of Inhyped.com from TypeScript to ReScript. In this article, I'd like to share my experience and learnings. You can see my tweets regarding the rewriting, they're marked with hashtag #FromTypescriptToRescript. The source code of both TypeScript and ReScript versions is available on GitHub. Why ReScript? I enjoy Rust's type safety a

                                          From TypeScript To ReScript | Serhii Potapov (greyblake)
                                        • R 4.1で入ると噂の|>が開発版のRに入ったので触ってみた。 - Technically, technophobic.

                                          magrittr 2.0のブログ記事で仄めかされていたように、base Rに(というかRの文法レベルで)ネイティブのパイプ演算子|>が入るようです。 それがとうとう開発版のRに実装された、というツイートでTLがざわついていたので触ってみました。 #RStats community, really? It's been like 5 hours now and no one noticed the big news? 😛https://t.co/c4OXTO0WCw Thank you @LukeTierney4 @_lionelhenry @jimhester_ (who else?)#pipypipy pic.twitter.com/5P9QPe1H8a— Henrik Bengtsson (@henrikbengtsson) 2020年12月4日 Dockerでさくっとrocker/

                                            R 4.1で入ると噂の|>が開発版のRに入ったので触ってみた。 - Technically, technophobic.
                                          • Tidy Modeling with R

                                            Hello World Welcome to Tidy Modeling with R! This book is a guide to using a collection of software in the R programming language for model building called tidymodels, and it has two main goals: First and foremost, this book provides a practical introduction to how to use these specific R packages to create models. We focus on a dialect of R called the tidyverse that is designed with a consistent,

                                            • Gleam v0.8 released! – lpil.uk

                                              May 7 2020 It’s been a really good couple months for Gleam. The community has been growing, we’ve been getting new features and improvements, and now it’s time for another release. Let’s take a look! HTML Documentation Documentation has been a bit of sore point up until now. If you wanted to write a program in Gleam there was no other way to see what types functions were available to use. More tha

                                                Gleam v0.8 released! – lpil.uk
                                              • Fun with Redirection - Xe Iaso

                                                Published on 09/22/2021, 2399 words, 9 minutes to read When you're hacking in the shell or in a script, sometimes you want to change how the output of a command is routed. Today I'm gonna cover common shell redirection tips and tricks that I use every day at work and how it all works under the hood. Let's say you're trying to capture the output of a command to a file, such as uname -av: $ uname -a

                                                • Vegard Stikbakke

                                                  March 21, 2020 Pipes are cool! We saw how handy they are in a previous blog post. Let’s look at a typical way to use the pipe operator. We have some output, and we want to look at the first lines of the output. Let’s download The Brothers Karamazov by Fyodor Dostoevsky, a fairly long novel.

                                                  • Things I like about Gleam's Syntax

                                                    Things I like about Gleam’s Syntax Gleam is a Type-Safe programming language that transpiles to ErlangAnd javascript., so you can run its code on the BEAM. I’ve slept on Gleam for a while because its syntax. It was too much Rust and not enough Elixir for me. Recently, I was reminded of Gleam when someone mentioned that Gleam doesn’t have an if statement, but instead uses case for everything. As a

                                                    • Learning Elixir, Phoenix and LiveView: A Primer for Experienced Programmers

                                                      In order to make web apps with Elixir, here’s a short primer on learning the language and major frameworks: First, don’t just learn Elixir. You can and should learn Elixir and Phoenix at the same time. After getting a hang of Phoenix, jump into LiveView. There is a learning curve to the ecosytem. It’s not particularly steep, but it is longer than a language like go but not as long as required by t

                                                      • Writing high performance F# code

                                                        While this post is addressed to F# .NET developers, it introduces much wider concepts starting from hardware architecture to overall .NET runtime and JIT compiler optimizations. It shouldn't be a surprise - optimizing the application performance requires us to understand the relationships between our high level code and what actually happens on the hardware. There's a popular opinion that F# code

                                                        • Comparison of ES dataflow proposals v1 (2021) • JSChoi.org

                                                          JSChoi.org Comparison of JavaScript dataflow proposals v1 J. S. Choi 2021-12-24 Update (2022-03-25): This original article is now out of date. There is an updated version of this article from 2022-03. There are additionally some responses to this original article: 2022-01-06 • Tab Atkins • Holistic Review of TC39 “Dataflow” Proposals 2022-01-26 • TC39 plenary meeting 2022-01-27 • HE Shi-Jun aka Jo

                                                          1