Better HN
topnewbestaskshowjobs
Log inSign up

kritixilithos

45 karma · joined Aug 14, 2018 (8y ago) · 11 submissions

Submissions

1.

Chick Culling(en.wikipedia.org ↗)

2 points · by kritixilithos · 5y ago · discuss

2.

Symbolic Logic (1897)(gutenberg.org ↗)

131 points · by kritixilithos · 6y ago · 25 comments

comment 7y ago · link · parent

Actually the following is even shorter

  /A/{N;d;}
So all together this gives the following

  ls|sed '/A/{N;d;}'

comment 7y ago · link · parent

Nicely done using Unix utils. You can have a pure sed solution (save the `ls` invocation) that is much simpler, albeit obscure, that hinges on the fact that every number has a `data.csv` file.

Given a sorted list of these files (through `ls` or otherwise) the following sed code will print out the data files for which A did not succeed on them.

  /data/!N
  /A/d
  P;D

This works on the fact that there exists a data file for all successful and unsuccessful runs on data, so sed simply prints the files for which there does not exist an `A` counterpart.

If you want to only print out the numbers, you can add a substitution or two towards the end.

  /data/!N
  /A/d
  s/^0*\|_.*//g;P;D
Edit: fixed the sed program

5.

Palaeos – Life Through Deep Time(palaeos.com ↗)

1 points · by kritixilithos · 7y ago · discuss

comment 7y ago · link · parent

Reached 96 bytes (now where would that last byte be hmmmm). And as you can see, my sed skills aren't as good as yours either :)

Nice meeting a fellow golfer, this was fun :)

comment 7y ago · link · parent

Are you tails? Anyways, thanks for helping me tie with first place :)

comment 7y ago · link · parent

There's even an implementation of lisp in sed :) https://github.com/shinh/sedlisp/

comment 7y ago · link · parent

That's probably because you used BSD sed. Running it on my BSD sed also gives an error, presumably because it thinks the `}` is a part of the label in `binput}`.

However it works fine in GNU sed, and now that you mention it, GNU sed's extensions were not used, like the `-z` flag to slurp all input in one "line" to avoid `:input;$!{N;binput}`.

comment 8y ago · link · parent

As another user of iTerm2, I am currently using several keyboard mappings from key to key (like Tab being interpreted as Esc), do you know whether Kitty supports that? As far as I can see in the docs, only examples of key to action are shown.

comment 8y ago · link · parent

Congratulations!

Are you familiar with code golf? If not, I recommend it. In Code Golf, the objective is to complete a programming task in the shortest program possible, measured in bytes. While doing so, you really learn about the nuances of your language and its obscure features.

When I was about your age, I joined the code golf community at Stack Exchange, and since then my JS skills and general programming skills have improved greatly. I hope that you would find it to be useful too.