Hacker GitHub

← All repos

moritz/json

View on GitHub ↗ ★ 80 Perl 6

A tiny JSON parser and emitter for Perl 6 on Rakudo

15 mentions on Hacker News by 6 people: 0 stories, 15 comments · first 2012-10-08 · latest 2025-06-28

Mentions per year 15 mentions · busiest year 2015 (3)
20082026
  1. or raku https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
    comment by librasteve · 2025-06-28 · in Parsing JSON in Forty Lines of Awk
  2. …of the argument. Example: turning a data structure into a JSON string, solved with multi dispatch: https://github.com/moritz/json/blob/master/lib/JSON/Tiny.pm#... Another common useful example is constructors. A Date class might have…
  3. …just easier with one.) To see an actual parser I often recommend people look at JSON::TINY::Grammar https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Frankly from my perspective much of the design of "actual parsers" are a…
    comment by b2gills · 2024-11-13 · in Unusual Raku Features
  4. …grouping `(?:…)` with `[…]`, and character classes `[eE]` with `<[eE]>`) This code was copied from https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... but some parts were simplified to be slightly easier to understand. Mainly I…
    comment by b2gills · 2021-06-17 · in Try APL
  5. …when JSON started allowing any value as a top-level result, it actually made the Raku code simpler. https://github.com/moritz/json/commit/9888329771730574967197...
    comment by b2gills · 2020-03-03 · in Was Knuth Really Framed?
  6. …find and fix it within seconds.) A Perl 6 grammar can look remarkably similar in structure to BNF. https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... https://trac.ietf.org/trac/json/browser/abnf/json.abnf
    comment by b2gills · 2018-07-25 · in Designing a Good DSL
  7. An example would be helpful so here is one https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
  8. …generally recommend reading the code for JSON::Tiny::Grammar as a quick example of what it is like. https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
  9. …That said, there are ways to approximate some features of grammars with Perl5 regexes[2]. 1: https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... 2: http://blogs.perl.org/users/brian_d_foy/2013/10/parsing-json...
    comment by kbenson · 2017-07-26 · in Why I’m Learning Perl 6
  10. …in Perl 6 such as this JSON grammar (a Perl 6 grammar is a class containing Perl 6 named regexes): https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
    comment by raiph · 2017-04-22 · in You can't parse [X]HTML with regex
  11. …there's only incomplete doc and no books yet written by the likes of Larry. [1] See, for example, https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
    comment by raiph · 2016-01-12 · in Why Perl 6 is Different (2010)
  12. …[4] http://www.infoworld.com/article/2882300/perl/perl-creator-l... [5] https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra...
  13. …of Perl 5 regexes. http://en.wikipedia.org/wiki/Perl_6_rules http://doc.perl6.org/language/grammars https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Generally matches Perl 5 regexes feature-for-feature but with a much…
    comment by raiph · 2015-02-23 · in Why is perl losing its touch?
  14. …regular expressions that look similar to BNF ) As an example look at this Perl 6 grammar for JSON: https://github.com/moritz/json/blob/master/lib/JSON/Tiny/Gra... Perl 6's best feature is that it combines many features from many languages…
  15. …slides: http://jnthn.net/papers/2012-yapcasia-modules.pdf Modules referenced in Jonathan's talk: * https://github.com/moritz/json/ * https://github.com/jnthn/grammar-debugger/ * https://github.com/jnthn/zavolaj/ *…