Hacker News new | past | comments | ask | show | jobs | submit login

I see this question as analogous to 'how useful is building a car from scratch?'

The person building a cat from scratch will undoubtedly understand more than others, and may be able to fix that home brew car. They may, with some difficulty be able to apply that understanding to other cars.

But, you definitely don't need to build a car from scratch to be a race car driver.




building a cat from scratch

That would be an interesting project.


> building a cat from scratch

> That would be an interesting project.

Here is the source code of the OpenBSD implementation of cat:

> https://github.com/openbsd/src/blob/master/bin/cat/cat.c

and here of the GNU coreutils implementation:

> https://github.com/coreutils/coreutils/blob/master/src/cat.c

Thus: I don't think building a cat from scratch or creating a tutorial about that topic is particularly hard (even though the HN audience would likely be interested in it). :-)


Building a shell from scratch (or some pre-made starting point) seems to be an exercise in a lot of operating systems courses and also in Tanenbaum's book on Operating Systems.

There is this guide, divided in parts: https://github.com/tokenrove/build-your-own-shell

I think you right, and implementing core utils is a nice exercise in system programming. Maybe, it even can be used to create some automated tasks with tests on codewars.

Once upon a time I implemented expr(1) but it was too simple, without regex part.


I'm 99% sure that kjs3 was joking about building the kind of cat that goes "meow", not a program. ;)


100%. And considering the OP mistyped "car" as "cat", I'm really, really hoping aleph_minus_one was making a different kind of attempt at humor, but around here you never know.


You should then alias "cat" to print "meow" instead of concatenating files.

;-) ;-) ;-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: