see-phit

Languages and libraries

html parsing library

SHOW HN2017

175points
81comments
#201of 2,242 in 2017
Top 9%of 2017 by points

How HN took it

CuriousMostly questions and neutral comments

0 positive, 11 neutral or asking, 2 mixed, 4 critical, out of 17 comments about the project. Thread score -0.19.

Idea: 0 for, 3 againstDesign: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Impressive work and a cool idea

    From 2 comments
    • I am very disappointed with constexpr in C++14 and C++17. The work shown here is impressive, but the point is that it should not be. D has shown that variable initialization at…
      Mmrnmhrm on HN
    • I have nothing to add other than that's both cool and scary.
      cletus on HN

Objections

  • constexpr compile times are very slow and memory hungry

    From 1 comment
    • I am very disappointed with constexpr in C++14 and C++17. The work shown here is impressive, but the point is that it should not be. D has shown that variable initialization at…
      Mmrnmhrm on HN
  • Error messages from template-based code are incomprehensible

    From 1 comment
    • Sadly, the thing that stood out the most to me is the sentence We attempt to make the compiler generate the most sensible error message, followed by an incomprehensible error…
      setzer22 on HN
  • Malformed HTML rules are unclear and HTML5 is complex

    From 2 comments
    • The program will fail to compile if the HTML is malformed By malformed are we talking about incorrectly closed, or actual invalid HTML? HTML doesn't require all tags be closed...
      kbenson on HN
    • > The HTML that browsers accept is loosely defined This has changed since the advent of the HTML5 specification, the primary purpose of which was to retroactively describe…
      lucideer on HN

Requests

  • Support for debugging compile-time code

    From 2 comments
    • Wow. How does one debug complex constexpr code? I assume there's no printf. It'd be really cool if it supported some kind of interpolation, like Jinja templates, so it could…
      tlb on HN
    • I mean through an actual debugger, not printf debugging.
      fooker on HN
  • Constexpr printf support

    From 1 comment
    • constexpr is a subset of what you can do at runtime. So my way of debugging is #define constexpr Which makes all the code plain code that executes at runtime, then you can put…
      rep_movsd on HN

Questions

  • Whether it implements HTML5 parsing

    From 1 comment
    • > The HTML that browsers accept is loosely defined This has changed since the advent of the HTML5 specification, the primary purpose of which was to retroactively describe…
      lucideer on HN
  • How to debug complex constexpr code

    From 1 comment
    • Wow. How does one debug complex constexpr code? I assume there's no printf. It'd be really cool if it supported some kind of interpolation, like Jinja templates, so it could…
      tlb on HN

Alternatives named

  • D compile-time HTML/JSON parsing

    From 2 comments
    • For reference: In D, you could just take a HTML parser then run it at compile time without writing any new code.
      mhh__ on HN
    • Yes. We parse JSON at compile-time with std.json (in D standard library). It probably wasn't even designed with that goal. From a D point of view, compile-time parsers are almost…
      p0nce on HN
  • Common Lisp eval-when and macros

    From 2 comments
    • Likewise in Common Lisp, arguably much more easily.
      reikonomusha on HN
    • Vanilla macros are one option. ``` (defmacro html (string) (some-html-parser-library:parse string)) ``` Or you could use a function and a compiler macro to make it more of an…
      stevelosh on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/14896455)