sed-bin

Dev tools

compiler

SHOW HN2020

160points
14comments
#375of 3,028 in 2020
Top 13%of 2020 by points

How HN took it

MixedNo clear lean

3 positive, 3 neutral or asking, 0 mixed, 1 critical, out of 7 comments about the project. Thread score +0.28.

Execution: 2 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 that it translates itself

    From 2 comments
    • So it can translate itself? > Translate the translator (par.sed) with itself: Yes! Congrats!
      tgv on HN
    • wow--impressive! the core is here (https://github.com/lhoursquentin/sed-bin/blob/master/par.sed), and it's 600 lines of beautifully commented sed
      girst on HN
  • Fun project

    From 2 comments
    • Nice! In the why part you speculatively mention better speed. Do you have any concrete benchmark results? If fast, the tool would be very useful for my work where I run an…
      ketanmaheshwari on HN
    • Genuinely very cool. Nice work.
      easytiger on HN

Objections

  • Limited to 8192-byte pattern and hold space, may segfault

    From 2 comments
    • Not the author, but I see that > no pattern/hold space overflow checks, currently both limited to 8192 bytes as per the POSIX spec requirement. Going over that limit will most…
      segfaultbuserr on HN
    • Yep that's exactly right :) ! To clarify my statement POSIX requires at least 8192 bytes for the pattern and hold space, and I chose to allow at most 8192 bytes here, which…
      lhoursquentin on HN
  • C code is rough and unsafe, no overflow checks

    From 1 comment
    • Not the author, but I see that > no pattern/hold space overflow checks, currently both limited to 8192 bytes as per the POSIX spec requirement. Going over that limit will most…
      segfaultbuserr on HN

Requests

  • Support for awk or Python translation

    From 2 comments
    • Now one for Awk and Python please :)
      sheerun on HN
    • I mean awk-to-Python transcompiler, it would be useful for datascience. I wonder if it's possible to use awka to create such thing.
      sheerun on HN
  • Benchmark results

    From 1 comment
    • Nice! In the why part you speculatively mention better speed. Do you have any concrete benchmark results? If fast, the tool would be very useful for my work where I run an…
      ketanmaheshwari on HN

Questions

  • Does it run faster than GNU sed and is there a benchmark?

    From 2 comments
    • Nice! In the why part you speculatively mention better speed. Do you have any concrete benchmark results? If fast, the tool would be very useful for my work where I run an…
      ketanmaheshwari on HN
    • No concrete benchmarks no, I just timed a few scripts I had on hand and generated a bunch of others, and I saw compiled ones performed slightly faster than GNU and toybox sed, so…
      lhoursquentin on HN

Alternatives named

  • elvm (C to sed)

    From 1 comment
    • And for the other direction (C->sed): https://github.com/shinh/elvm
      rkeene2 on HN
  • lex-based sed compilation via bash function

    From 1 comment
    • Not the author, but I had a similar problem. If you specify many replacement rules in sed, it will run in O(num_replacements * num_lines). You should be able to use a state…
      alphaBetaGamma on HN
  • awka (awk to C compiler)

    From 1 comment
    • There's already an awk-to-C compiler [1], even if it seems to be unmaintained. Python has a couple of them, more or less constrained, including Nuitka [2]. [1]…
      mftrhu on HN
  • Nuitka (Python compiler)

    From 1 comment
    • There's already an awk-to-C compiler [1], even if it seems to be unmaintained. Python has a couple of them, more or less constrained, including Nuitka [2]. [1]…
      mftrhu 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/23812894)