並び順

ブックマーク数

期間指定

  • から
  • まで

41 - 80 件 / 183件

新着順 人気順

parserの検索結果41 - 80 件 / 183件

  • GitHub - zesterer/chumsky: Write expressive, high-performance parsers with ease.

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

      GitHub - zesterer/chumsky: Write expressive, high-performance parsers with ease.
    • Building a high performance JSON parser

      JSON is important, damn near everything that we do as programmers or operators involves JSON at some point. JSON decoding is expensive, if your product talks JSON then performance of marshalling data in and out of JSON is important. This is a talk about designing an efficient replacement for encoding/json.Decoder.

      • Big Sky :: コメントも扱える高機能な C++ 向け JSON パーサ「jsoncpp」

        おなじみC/C++から使えるJSONライブラリを紹介するコーナー。まずは過去のまとめ。 ヘッダファイルだけでC++から使えるJSONパーサ「picojson」が凄い! 何も見ずにC++でjsonパーサが書けるか試してみた。 C言語から使えるJSONパーサ、JSMNを試してみた。 僕がboost::asioとboost::property_treeを使いHTTPプロキシ環境下で非同期にGoogle Search APIから検索するまでにやった、たった一つの事。 C言語から使えるJSONパーサ、parson が思った以上に良い仕事をしている。 最速と言われる JSON パーサ「rapidjson」が本当に爆速なのか試してみた。 C言語から使えるJSONパーサ、jansson がとても直感的で良い C++ で STL フレンドリに扱えるJSONパーサ「json.hpp」 これまで C++ から扱

          Big Sky :: コメントも扱える高機能な C++ 向け JSON パーサ「jsoncpp」
        • 新しいRubyパーサーPrism利用時の開発体験の変化

          この記事で扱っていること 本記事ではRuby 3.3で導入されたPrismという新しいパーサーについて扱っています Prismが持つ「パース時に問題が発生した場合でも可能な限り意味のある結果を返却する」という機能に着目して下記について話します Rubyを記述する際の開発者体験がどれくらい向上しているのか? 「可能な限り意味のある結果」をどうやって組み立てているのか? 最後に主テーマから外れますが、Prismの動かし方についても話しています はじめに こんにちはウォンテッドリーで推薦基盤の改善をやっているnasaです 去年の12/25にもRubyの最新バージョンがサンタさんから届きました。https://www.ruby-lang.org/ja/news/2023/12/25/ruby-3-3-0-released/ 最新バージョンのRuby 3.3.0ではPrismという新しいパーサーが導

            新しいRubyパーサーPrism利用時の開発体験の変化
          • 計算式Editorの作り方 - HRBrain Blog

            この記事はHRBrain Advent Calendar 2022の19日目の記事です。 qiita.com はじめに HRBrainではタレントマネジメントシステムHRBrainを提供しています。 社員名簿機能では、運用に合わせて自由に社員情報に紐付く項目を作成・編集することで、あらゆるデータを管理できます。 項目には種類があり、文字列や数値、カスタムプルダウン、計算式など項目の種類も選ぶことが可能です。 レイアウト編集画面(このレイアウト編集画面も一年半ほど前に自分が実装を担当しました。) 計算式項目はさまざまな用途に利用されています。 例えば生年月日から年齢を算出したい場合の計算式は下記の通りです。 ISBLANK({生年月日}) ? '' : DATEDIF({生年月日}, NOW(), 'Y') 計算式の言語仕様は下記をサポートしています。 ISBLANKやDATEDIFなどの関

              計算式Editorの作り方 - HRBrain Blog
            • Building a high performance JSON parser

              This talk is a case study of designing an efficient Go package. I’m going to use the example of building a high performance JSON parser. Supports streaming operations It’s unrealistic to expect to have the entire input in memory. Buffering in memory is a availability risk, input sizes are usually unknown and potentially unbounded. Buffering before processing introduces latency. Streaming reads let

              • LALR parser generatorの作り方

                BuriKaigi 2024 https://burikaigi.dev/

                  LALR parser generatorの作り方
                • Ruby Parser開発日誌 (5) - Lrama LALR (1) parser generatorを実装した - かねこにっき

                  前回のあらすじ Ruby Parser開発日誌 (4) - かねこにっき Error Recoveryに関する理解も深まり、Rubyのparserへ実装するために3つの実装方法を検討しましたが、どれもあまり簡単な方法ではありませんでした。この問題を解決するためにLALR parser generatorを実装したので今回はその紹介をしたいとおもいます。 Lrama LALR (1) parser generator github.com 前回検討したとおりBisonを使ってError RecoveryをRubyに実装していくのは困難を伴います。これを解決するために自前でparser generatorを実装し、generatorおよびtemplateの両方を自分で管理するという方法を思いついたので実装しました。 名前の由来 Lramaでリャマと読みます。LALR parser genera

                    Ruby Parser開発日誌 (5) - Lrama LALR (1) parser generatorを実装した - かねこにっき
                  • moonbit で json パーサーを書いてみた 感想

                    エアプにならないために、実際に moonbit を使ってコードを書いてみた感想を書く。 JSON Parser を書いた パッケージレジストリである https://mooncakes.io を見た限り、使いやすい json parser がなさそうなので、とりあえず自分用のをでっち上げた。 mooncakes.io に publish してあるので、 moon add mizchi/json で使える。品質が良くなくても ネームスペース付きで publish するので別に邪魔にならない気がした。 なんで作ったかというと、公式 example の cloudflare workers の example は単純なフィボナッチを計算するだけで、構造的なデータを返すことができない。 moonbit と js 間の文字列の受け渡しについては、あとで別の記事を書く。 使い方 fn main { l

                      moonbit で json パーサーを書いてみた 感想
                    • Next.js で Node.js の API がいつ入ったのかわかる表を作る

                      Node.js の API がいつ入ったのかを調べる必要が出てきた。 もちろんリリースノートを見たり、ドキュメントの History を見れば調べられることが多いが、普通に面倒くさいので、いい感じの表とかを自動で生成できたら嬉しい。 どうやら公式ドキュメントは Markdown で管理されており、Added の情報はその Markdown の中のコメントに YAML として書かれているらしい。 なので、Markdown の内容を fetch して Markdown としてパースし、その中の特定のコメントをさらに YAML としてパースすることでデータがとれそうだった。 そして、そのデータをビルド時にひっぱってくる静的サイトがあればいつでも見れて便利だし、ビルド時にしか fetch しないので比較的行儀も良い。 ということで作ったみた。 実際のサイトはこちら https://nodejs-a

                        Next.js で Node.js の API がいつ入ったのかわかる表を作る
                      • Remark で広げる Markdown の世界

                        はじめましてこんにちは、はるさめです。本誌は名目上 Vivliostyle について紹介する同人誌なのですが、またしても空気を読まず Vivliostyle ではない OSS プロジェクト「Remark」について紹介したいと思います。 Remark Remark とは「Markdown processor」という紹介文の通り、Remark で書かれたテキストを読み込み様々な変換を施すことができる JavaScript 製のライブラリです。Remark は様々なライブラリと組み合わせて目的の形式のテキストに変換でき、Rehype と一緒に使うことで Markdown を HTML に変換できます。同様の処理をしてくれるライブラリとしては Marked.js が有名ですが、Remark の強力な機能は、Markdown を 抽象構文木(AST)に変換することで、より柔軟に構文を改造できる点です

                        • RubyKaigi 2024が終わったのでまずはクソデカ感情の処理をさせてください - そんなことはさておいて

                          次回の会場の件といい、登壇といい、DJの本番といい、ほんと巨大な憑き物が落ちた— sylph01 (@s01) 2024年5月17日 タイトルの通りです。ひでえタイトルだな!!! RubyKaigi 2024の記事のPart 1の予定です。ここ最近Part 1詐欺をしすぎて以下の記事を積んでいることの認識があるのですが、2024年7月中旬までに片付けようと思います。 ここまでに積んでる記事一覧: - IETF118遠征のプラハ・クラクフの観光サイドの記事 - RubyConf Taiwan 2023のトークの技術記事 - まだ表にできない記事のレビュー対応 - RubyKaigi 2024のトークの日本語版記事 下の2つを優先的に対応してIETF120に行くまでには全部消化することを目指します— sylph01 (@s01) 2024年5月19日 これのうち、RubyKaigi 2024の

                            RubyKaigi 2024が終わったのでまずはクソデカ感情の処理をさせてください - そんなことはさておいて
                          • GitHub - oxc-project/javascript-parser-in-rust: Tutorial on writing a JavaScript Parser in Rust

                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

                              GitHub - oxc-project/javascript-parser-in-rust: Tutorial on writing a JavaScript Parser in Rust
                            • Parsing SQL - Strumenta

                              The tomassetti.me website has changed: it is now part of strumenta.com. You will continue to find all the news with the usual quality, but in a new layout. 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

                                Parsing SQL - Strumenta
                              • Tree-sitter|Introduction

                                ☰ Introduction Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be: General enough to parse any programming language Fast enough to parse on every keystroke in a text editor Robust enough to provide useful results even in the prese

                                • Ruby構文解析器 開発日録#1

                                  こんにちはydahです。最近はPure Ruby LALR parser generatorであるLramaにパッチを送っています。 気がつけば12月もあとわずかとなり、Ruby3.3.0のリリース日も近づいてきましたね。5月半ばに開催されたRubyKaigi 2023で金子さん(@spikeolaf)の「The future vision of Ruby Parser」を聞いてから、約半年が経ちました。あの時の自分はまさか半年後には自分がパーサージェネレーターの開発に関わっている人生を送っているとは思いもしなかったと思います。 今回のRuby3.3.0のリリースノートには、私が実装した機能が載っていてとても感慨深いです。 https://www.ruby-lang.org/en/news/2023/12/11/ruby-3-3-0-rc1-released/ Use Lrama inst

                                    Ruby構文解析器 開発日録#1
                                  • Prism in 2024

                                    In Ruby 3.3.0, a new standard library was added to CRuby called Prism. Prism is a parser for the Ruby language, exposed as both a C library (optionally usable by CRuby) and a Ruby library (usable as a Ruby gem). The Prism project represents many person-years worth of effort, and is the result of a collaboration between Shopify, CRuby core contributors, other Ruby implementation authors, and Ruby t

                                      Prism in 2024
                                    • PEG Parsers

                                      Some years ago someone asked whether it would make sense to switch Python to a PEG parser. (Or a PEG grammar; I don’t recall exactly what was said by whom, or when.) I looked into it a bit and wasn’t sure what to think, so I dropped the subject. Recently I’ve learned more about PEG (Parsing Expression Grammars), and I now think it’s an interesting alternative to the home-grown parser generator tha

                                      • Lrama LRパーサジェネレータが切り開く、Rubyの構文解析の未来 | gihyo.jp

                                        Ruby 3.3リリース! 新機能解説 Lrama LRパーサジェネレータが切り開く⁠⁠、Rubyの構文解析の未来 シンプルで強力な文法はRubyの特徴のひとつだと言われています。その文法を技術的に支えているのがパーサです。Ruby 3系のひとつの目標として、LSPやRBS、TypeProfをはじめとした各種ツールの拡充があります。それらのツールは多くの場合AST(抽象構文木)というプログラムをパースした結果を対象に解析を行います。そこでこれらのツールに対してより良いAPIを提供するべく、Rubyのパーサを刷新する動きが活発になっています。 最新のRuby 3.3ではパーサの内部に大規模な改善が入っています。この記事ではRuby 3.3で導入されたLrama LALR (1) パーサジェネレータについて紹介します。 パーサジェネレータ —⁠—パーサをどのようにして実装するか パーサを実装す

                                          Lrama LRパーサジェネレータが切り開く、Rubyの構文解析の未来 | gihyo.jp
                                        • Play with Rubys AST

                                          数学の勉強のために Ruby の構文木と遊んでいる話 2020.02.11. 大江戸 Ruby 会議 08

                                            Play with Rubys AST
                                          • GitHub - alvarlagerlof/rsc-parser: A parser for the React Server components when sent over the network

                                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                              GitHub - alvarlagerlof/rsc-parser: A parser for the React Server components when sent over the network
                                            • What is expected?

                                              Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit

                                                What is expected?
                                              • GitHub - wooorm/markdown-rs: CommonMark compliant markdown parser in Rust with ASTs and extensions

                                                You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                  GitHub - wooorm/markdown-rs: CommonMark compliant markdown parser in Rust with ASTs and extensions
                                                • ノータブルコード2 - 斬新なコメントでコードの可読性を高める - 2020-01-15 - ククログ

                                                  この新しいコーナー「ノータブルコード」では、私たちが開発の折々に目にした興味深いコードをご紹介しています。世の中の実際のプロジェクトから、興味深い素材を肩の凝らない形でご紹介していきたいと思いますので、楽しみにしていてください。 Brubeck - 創造的なコメントで見通しを良くする 第2回目に紹介するのは、GitHubが開発したStatsD互換サーバー Brubeck からの一コマです。 int brubeck_statsd_msg_parse(struct brubeck_statsd_msg *msg, char *buffer, char *end) { *end = '\0'; /** * Message key: all the string until the first ':' * * gaugor:333|g * ^^^^^^ */ { msg->key = buffer

                                                    ノータブルコード2 - 斬新なコメントでコードの可読性を高める - 2020-01-15 - ククログ
                                                  • Ruby Parser開発日誌 (11) - RubyKaigi 2023 follow upで進捗について話してきた - かねこにっき

                                                    8/19に開催されたRubyKaigi 2023 follow upで、Rubyのparserとparser generatorに関する進捗と今後の方針について話をしてきました。 rhc.connpass.com 当日の資料はこちらにアップロードしてあります。 speakerdeck.com 進捗とこれからの話 RubyKaigiでの発表を踏まえて3つの点についてRubyKaigiからの進捗とこれからの話をしました。 Error-tolerant Universal Parser Maintainability Lramaとは github.com RubyでかかれたLALR parser generatorです。BNFをベースにしたDSL(parse.y)を受け取って、C言語実装のLALR parserを生成します。現在のCRubyはLramaが生成したparserを使用しています。 E

                                                      Ruby Parser開発日誌 (11) - RubyKaigi 2023 follow upで進捗について話してきた - かねこにっき
                                                    • GitHub - lovasoa/bad_json_parsers: Exposing problems in json parsers of several programming languages.

                                                      Many JSON parsers (and many parsers in general) use recursion to parse nested structures. This is very convenient while programming the parser, but it has consequences on what the parser can parse: indeed, the size of the call stack is usually limited to a value several orders of magnitude smaller than the available RAM, and this implies that a program with too many levels of recursion will fail.

                                                        GitHub - lovasoa/bad_json_parsers: Exposing problems in json parsers of several programming languages.
                                                      • GitHub - ruby/prism: Prism Ruby parser

                                                        . ├── Makefile configuration to compile the shared library and native tests ├── Rakefile configuration to compile the native extension and run the Ruby tests ├── bin │   ├── lex runs the lexer on a file or string, prints the tokens, and compares to ripper │   ├── parse runs the parse on a file or string and prints the AST │   └── prism a CLI for development and debugging ├── config.yml specificati

                                                          GitHub - ruby/prism: Prism Ruby parser
                                                        • GitHub - webtoon/psd: Fast zero-dependency PSD parser for the web and Node.js

                                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                            GitHub - webtoon/psd: Fast zero-dependency PSD parser for the web and Node.js
                                                          • Laurence Tratt: Which Parsing Approach?

                                                            We all know that parsing is an important part of designing and implementing programming languages, but it’s the equivalent of Brussels sprouts: good for the diet, but a taste that only a select few enjoy. Unfortunately, I’ve come to realise that our general distaste for parsing is problematic. While many of us think that we’ve absorbed the advances of the 1960s into our collective understanding, I

                                                            • Ruby Parser開発日誌 (8) - Universal Parserへの道 - かねこにっき

                                                              前回のあらすじ Ruby Parser開発日誌 (7) - doについて考える - かねこにっき Rubyのdoのもつ複雑さを中心にMaintainabilityの改善方法について考えました。Practical LR Parser Generationで紹介されているNonterminal attributesというアプローチにprecedence(優先度)をさらに組み合わせることで、lexerの状態として管理しているものを構文に組み込むことに成功したのでした。 ところでRuby Committers vs The Worldの2022や2021をあらためてみると、おもに次の3つが解くべき問題だと言われています。 Usability (Error-tolerant parser) Maintainability Universal Parser 1と2についてはすでに分析と実装をしてきまし

                                                                Ruby Parser開発日誌 (8) - Universal Parserへの道 - かねこにっき
                                                              • RubyKaigi 2024 に登壇した - koicの日記

                                                                発表について RuboCop から見た Ruby パーサーの世界の今後 廊下会議し損ねた気になり点 今後の 362 日 登壇以外に得られた会話など 今回のRubyKaigiでの気づき RubyKaigi 2024 に登壇した。 rubykaigi.org 当日の発表スライドは以下です。 発表について 今回は、RubyKaigi 2023 の帰り道に Justin Searls とばったり松本駅で遭遇してからの、362 日の Rubyist 活動をストーリーにしたものでした。 もともとは、LSP の話を中心にして Prism の話は少し出るくらいという『RuboCop Evolution with LSP』というプロポーザルを出して通過したところ、Rails/OSSパッチ会で松田さんから「Lrama の話が3本あって、Prism の話がないんですよ。」という感じでタイトルに Prism を入

                                                                  RubyKaigi 2024 に登壇した - koicの日記
                                                                • Simply Parse in C

                                                                  by Chloe Kudryavtsev People are terrified of parsers and parsing. To the point of using magical libraries with custom syntaxes to learn just to get started. In the hopes of completely shattering this preconception, I will write a parser for the “ini” file format in about 150 lines of pure and readable ISO C99. Furthermore, this parser will be something that's nice to use and has error correcting f

                                                                    Simply Parse in C
                                                                  • Prism

                                                                    This deck presented the prism parser as Ruby World 2023.

                                                                      Prism
                                                                    • Parolというパーサ生成ツールがすごい

                                                                      parolというLL(k)パーサを生成するcrateがあるのですが、とにかくすごいので紹介します。 parolを知って、Rustでパーサをつくることに関して新しい時代が始まったなと思いました。 パーサコンビネータ Rustでパーサといえばnomやchumskyといったパーサコンビネータが主流の印象です。 これはjsonのように既に文法が定義されている場合やプログラミング言語のプロトタイピングに向いていると思います。 nomのREADMEにも後者について以下のように言及されています。 While programming language parsers are usually written manually for more flexibility and performance, nom can be (and has been successfully) used as a proto

                                                                        Parolというパーサ生成ツールがすごい
                                                                      • GitHub - axa-group/Parsr: Transforms PDF, Documents and Images into Enriched Structured Data

                                                                        You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                          GitHub - axa-group/Parsr: Transforms PDF, Documents and Images into Enriched Structured Data
                                                                        • Lezer

                                                                          I keep coming across people who consider parser technology a forbidding, scary field of programming. This is nonsense—a small parser can be very, very simple, and provide a wholesome exercise in recursive thinking. At the same time, it is true that you can make parsing extremely complicated. Mostly, this tends to happen when you generalize parsing techniques to work for different grammars. Since c

                                                                          • RubyファイルにGoコードを書いてRuby Nextで動かす(翻訳)|TechRacho by BPS株式会社

                                                                            概要 原著者の許諾を得て翻訳・公開いたします。 英語記事: A no-go fantasy: writing Go in Ruby with Ruby Next — Martian Chronicles, Evil Martians’ team blog 原文公開日: 2021/11/09 原著者: Svyatoslav Kryukov、Travis Turner サイト: Evil Martians -- ニューヨークなどに拠点を構えるRuby on Rails開発会社です。良質のブログ記事を多数公開し、多くのgemのスポンサーでもあります。 日本語タイトルは内容に即したものにしました。 no-go: うまくいかない、立入禁止 Rubyは素晴らしい言語です。私たちはRubyの読みやすさ、柔軟性の高さ、そして開発者中心主義を愛しています。しかしここ火星ではGo言語も愛されています。Goにも

                                                                              RubyファイルにGoコードを書いてRuby Nextで動かす(翻訳)|TechRacho by BPS株式会社
                                                                            • Rubyで「expected tokens」をどうやって知るか? Part.1

                                                                              平成生まれのRubyエンジニアで集まり、ステップアップして行きたいという思いで作ったコミュニティ、平成.rbが主催した「平成Ruby会議」。キーノートとして、Yuichiro Kaneko氏が「ある時点で次に来ることができる文字列のトークンをどうやって知るか」について語りました。 次に来ることができる文字列のトークンを知る Yuichiro Kaneko氏:「What is expected?」という話をします。 まず私の自己紹介です。金子雄一郎と申します。今日はArm Treasure Dataという会社から来ました。ふだんはAudienceチームというところに所属をしていて、Prestoのクエリの最適化をしたり、Digdagのワークフローを動的に生成するようなRuby on Railsのアプリケーションを書いたり、あまり得意じゃないですがJavaのKey-Value Storeのサービ

                                                                                Rubyで「expected tokens」をどうやって知るか? Part.1
                                                                              • Client-Side SQL Query Parsing with ANTLR

                                                                                Multiple Queries in the Console Query Editor Rockset Console’s query editor allows users to type and run queries over collections. Until now, however, whatever was typed in the editor was run and parsed as a single query. This means that, for a user, it wasn’t that easy to switch between multiple queries in our editor. They would have to comment out the queries they didn’t want to run, or keep all

                                                                                  Client-Side SQL Query Parsing with ANTLR
                                                                                • Metaprogramming in Zig and parsing CSS | notes.eatonphil.com

                                                                                  I knew Zig supported some sort of reflection on types. But I had been confused about how to use it. What's the difference between @typeInfo and @TypeOf? I ignored this aspect of Zig until a problem came up at work where reflection made sense. The situation was parsing and storing parsed fields in a struct. Each field name that is parsed should match up to a struct field. This is a fairly common pr