News for hackers. Stuff that matters.
Re:Show HN: Tiny Shell by ChuckMcM on Friday June 29, 2018 @07:11PM (#17428552)
So are we supposed to grade it? :-)

More seriously though it is really useful for people who are going into embedded or systems programming to write a command line interpreter at some point in their studies. It blends a couple of disconnected courses (data structures and parsing) into something tangible and useful.

I wonder if there is a good canonical list of chunks that you should be able to create from a blank sheet of paper in order to demonstrate mastery of CS. I would put an interpreter, a database, a CLI (shell), a compiler, a scheduler, and a device driver as the list but there might be others.

Re:Show HN: Tiny Shell by sowbug on Friday June 29, 2018 @08:13PM (#17428797)
Competence might be a better label than mastery, which is a blue sky or a bottomless pit, depending on your point of view.

Maybe add something to cover graph theory. But it's hard to think of a tool as useful on a small scale (one person, not big data) as the ones you've named.

Re:Show HN: Tiny Shell by bla2 on Friday June 29, 2018 @08:22PM (#17428834)
A simple build system fits the tools listed here and covers graphs. An NFA regex matcher would cover it too.
Re:Show HN: Tiny Shell by tzs on Friday June 29, 2018 @07:56PM (#17428739)
Maybe add something to do with networking? Maybe also graphics?
Re:Show HN: Tiny Shell by sowbug on Friday June 29, 2018 @08:18PM (#17428820)
Almost everything I've ever done with networking was much closer to applied computer science than pure CS, but writing an HTTP client (open socket, construct and parse headers, deal with character encoding) was one of the more eye-opening experiences when I was getting started.
Re:Show HN: Tiny Shell by hazz99 on Friday June 29, 2018 @09:01PM (#17428952)
This is something I'd love to do. Do you have any resources for learning the background info? Everywhere I've looked just plugs in some TCP/socket library, but I think the real learning would come from _making_ the library itself.
Re:Show HN: Tiny Shell by yorwba on Saturday June 30, 2018 @12:59AM (#17429549)
You mean instead of using the TCP stack included in the kernel, you want to write your own? You could use raw sockets (described in man 7 raw) for that (but note that they require elevated privilege). Use socket(PF_INET, SOCK_RAW, IPPROTO_TCP) to get a raw TCP socket, then send and receive TCP packets as raw bytes over the socket.

I found an example demonstrating the approach here: http://www.tenouk.com/Module43a.html

Re:Show HN: Tiny Shell by ctnb on Saturday June 30, 2018 @08:08AM (#17430551)
Here's one of three parts on coding your own TCP/IP stack. I haven't gotten around to it, but it looks solid.

http://www.saminiir.com/lets-code-tcp-ip-stack-1-ethernet-ar...

Re:Show HN: Tiny Shell by dkuebric on Friday June 29, 2018 @07:57PM (#17428743)
OS virtual memory is one of my favorites.