News 2024-01-13: New release (Changelog)2023-12-09: New release (Changelog) Introduction QuickJS is a small andembeddableJavascript engine.It supports the ES2023 specification including modules, asynchronous generators, proxies and BigInt.It optionally supports mathematical extensions such as big decimal floating point numbers (BigDecimal), big binary floating point numbers (BigFloat) and ope
最近neovimに乗り換えてから、javascriptの編集中にたまに固まる現象が発生して困っていた。 再現条件をいろいろ試したらどうやらvim-javascriptのインデント処理で無限ループしている様子。 という訳でvimの設定を見直してみることにした。 要件としては、インデントはPrettierでやるので、シンタックスハイライトだけ綺麗にやってくれればいい。 調べたら tigris.nvimというプラグインを見つけた。 これはnodeベースのプラグインで、Babylonを使って構文解析をしてハイライトを実現している。 Babylonはbabelプロジェクトの一部で、JSX, Flow,Typescriptを標準でサポートしている。 だからvim-javascriptのようにvimコミュニティが必死で新たな構文のサポートを追いかける必要がない。 ソースコードを覗いたらシンプルな実装だ

Node.js Performance 改善ガイド Memory の場合 メモリリークかどうかを特定する メモリリークではない場合CPU の場合 どこの処理に時間がかかっているのかを確認する v8simple profiler flame graph を取得する File の場合 大きなサイズのファイルをどうしても扱う時Network の場合 keepalive を on にする その他: 全体的にパフォーマンスを改善するためにやること JIT が効いているかを確認する clusterが使えないか検討するC++ addons vsJavaScript libraries まとめ 参考資料 Node.js Performance 改善ガイド この記事は Node.js 2 Advent Calender の 5日目の記事です。 qiita.com Node.js のパフォーマンスに

Node.js のセキュリティアップデート 7/11 に Node.js のセキュリティアップデートがリリースされました。Security updates for all active releaselines, July 2017 | Node.js これには複数の脆弱性が報告されており、今回はそのうちの1つの Hash flooding DoS という脆弱性が何なのか、それに対して採用された対策が何なのかについてお話します。 Hash flooding DoS (hashdos) Denial Of Service 、つまりサービス拒否攻撃の一種です。JavaScript のオブジェクトは内部的にハッシュテーブルとして表現されています。 図はこちらから引用 ハッシュ関数は同じkeyなら同じ値を返しますが、別なkeyなら通常は別な値になります。 ハッシュテーブルのinsert, g

Intro ブラウザにおける新機能の利用においては、非対応ブラウザの考慮も必要となる。 ES Modules の利用においても、いかに非対応ブラウザでフォールバックの手段を提供するかが課題となっていた。 今回は、Modules の対応/非対応を切り分けるための仕様である nomodule 属性を解説する。 script type module classic script (module ではない JS) は、<script> で指定すると、取得解析しそのまま実行される。 type は省略されることが多いが、その場合text/javascript と解釈されている。 <script type=text/javascript src=bundle.js></script> 一方、module script (module として実装された JS) は、import/export の処理や依

※2022/4/19追記:ここで使っている仕様は古くなり、非推奨になっているため、新しい記事を書きました。そちらを参照してください。 「クリップボードにコピー」はJavaScriptのみでは不可能だと、昔に思い込んだままだったのですが、HTMLの各種APIとJavaScriptを組み合わせることで、ほとんどのブラウザで実現できるようになってきたようです。HTMLとJavaScriptのコード <p class="copyTarget">コピーしてもらいたいテキスト</p> <button class="copyBtn">クリップボードにコピーする</button> function copyText () { var $target = document.querySelector('.copyTarget'); if (!$target) { return false; } var r
待望されたYarnサポートの入ったRails5.1が2017年4月にリリースされました。Ruby onRails 5.1 ReleaseNotes —Ruby onRailsGuides 他にもjQueryがデフォルトdependencyから外されたり、Optionalでwebpackサポートが入ったりしており、Railsのフロントエンドは大きな転換点を迎えたと言ってよいでしょう。本エントリではRailsのフロントエンド技術の今を振り返り、今後どうなっていくかをまとめてみたいと思います。 DisられてきたRailsフロントエンドRailsのフロントエンド技術スタックは、フロントエンドを専業とするエンジニアにDisられるものでした。具体的には下記の技術要素です。 jQueryCoffeeScriptAssets Pipeline (sprockets)gemのエコシステムに乗っ

*Prepack is still in anearly development stage and not ready for production usejust yet. Please tryit out, give feedback, and help fix bugs. What doesit do? Prepack is a tool that optimizesJavaScript source code: Computations that can be done at compile-time instead of run-time get eliminated. Prepack replaces the global code of aJavaScriptbundle with equivalent code that is asimple sequen
WebアプリにしろWebサイトにしろパフォーマンスはとても重要です。どんなに高機能であっても、どんなにデザインが良くても、パフォーマンスが悪ければユーザーは離れてしまいます。 とは言え現場はキツキツのスケジュールで、パフォーマンスにまでこだわる余裕がないよ!パフォーマンスはひとまずできる限りのところまで頑張るよ!となってしまうこともあるかと…。 この問題の解決の糸口はパフォーマンスを良くする手段をどれだけ知っているかです。仕様を決めるとき、デザインを決めるとき、実装するとき、それぞれのフェーズでパフォーマンスを常に意識していると自ずとハイパフォーマンスに近づきます。 というわけで今回はフロントエンドの観点から、イマドキのパフォーマンス改善手法をまとめてみました。イマドキと謳っておきながら2年前くらいの技術が出てきたりして最新の話題でもないのですが。 ちなみに、本題に入る前にWebパフォーマ

Async/await in Node.js opens up a host of powerful design patterns. Tasks that used to take complex libraries or intricate promise chaining can now be done with rudimentary if statements and for loops. I already wrote about these kind of design patterns with co, but async/await makes these patterns accessible in vanilla Node.js, no outside libraries required. Retrying FailedRequests The power of

There’s an ECMAScript proposal forObservables in the works. In this article we explore the proposal, theAPI, and look at a few use cases.Observables inJavaScript were largely popularized by libraries such as RxJS and Bacon.js. Jafar Husain, aNetflixtech lead and long-time functionalprogramming advocate who’s also on TC39 has been developing a proposal to bringobservables into the core lang

tradeship statically analyzes yourJavaScript code for identifiers that aren't defined and finds the appropriate dependencies to import.It also removes imports that aren't used. tradeship is meant to be used as an editor plugin that manages your imports. Features Imports dependencies from node.js standard libraries, npm packages listed in package.json, and other files within your project director

Quokka.js runsJavaScript andTypeScript with instant feedback, displaying runtime values in your editor as you type. Quokka makes exploring, learning, and testingJavaScript /TypeScriptblazingly fast. By default no config is required,simply open a new Quokka file and start experimenting. Focus on writing code instead of writing bespoke config filesjust to try asimple idea or learn a new lang

Thisblog post is outdated. Please read chapter “Metaprogramming with proxies” in “Exploring ES6”. Thisblog post explains the ECMAScript 6 (ES6) feature proxies. Proxies enable you to intercept and customize operations performed on objects (such as getting properties). They are a metaprogramming feature. The code in this post occasionally uses other ES6 features. Consult “Using ECMAScript 6 toda
ng-kyoto.connpass.com 2015/11/22に開催された ng-kyoto meetup #3 で発表してきた。 経緯 10月頭頃、ng-kyoto が弊社オフィスで開催されるという知らせを聞いた。 ng-kyoto の存在は以前から知っていた。 京都はエンジニアコミュニティが少ないので、せっかくだから交流してみたいと思い、発表に名乗りでた。 自分のトークについてspeakerdeck.com ng2 の Decorator、なんか特殊じゃね?と探っていったら AtScript の Annotation にぶち当たったという話。Angular は1年前に4週間だけ触ったことがあるのだけど、それ以降の変化は全く追っていないし知見もない。 そこで、もうすぐベータがリリースされると噂のAngular2 を触ってみることにした。 まずは公式サイトの QuickStart

リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く