A full TCP/IP stack in under 200 LoC (and the power of DSLs)
moserware.com
moserware.com
There are Python and Ruby implementations available. You can play with OMeta here: http://tinlizzie.org/ometa/
http://irbseminars.intel-research.net/ (since this link is very interesting in its own right, i am going to post it directly to HN as an article)
Interview question: what's the important thing TCP provides over UDP?
Fail answer: I don't know.
Push answer: Reliability.
Win answer: Congestion control.
I thought there were only a handful (Tahoe, Reno, Vegas, New Reno et al) of popular algorithms for the congestion control bit but it's all still TCP as specced in RFC 2581, no?
From where does all the complexity come?
That's what TCP actually buys you.
You can make a reliable UDP protocol with a few tens of lines of code. It's called "TFTP", and it's god-awful slow.
Solving a problem is hard. Generalizing it to a class of problems is harder. Encapsulating it in a language with specialized syntax and semantics is harder still.
I think this is one reason that DSLs are not that popular, and is one reason why most new languages mimic existing languages like crazy (apart from for user-familiarity to ease adoption). The exceptions, like brainfuck and lolcats, use familiar semantics; and are only novel in syntax.
As for a Moore's Law for software, I'm going with Fred Brooks' Law of "No Silver Bullet". Complexity is hard, the best we can do is abstract away foundational concepts into components, as we understand them, and then SOTSOG.
The TCP/IP diagram syntax is really cool - but because it's clear, not because it's short; I think the parsing code in C would actually be shorter than the ASCII art.
Note that Fred Brooks argues for conceptual integrity, provided by a single human being, as the most important guarantee of product quality. If you use components, then you are accepting a system partitioning that has been decided many layers above you. If you design languages, then you cut out most of those layers. This gives you far more control over product quality.
Yeah, it's hard. Quality is hard. If your primary goal is anything other than quality, you will probably not produce a product with much of it. That's the real reason why there's no silver bullet.
In what sense do you mean that? Serious question, not sarcastic. It seems to me that if you build a DSL you're not standing on anybody's shoulders, which seems rather a disadvantage, but I say this to show you what I'm not understanding in your point, not as a criticism, as I believe you meant something else.
There's a reason why all the best languages (lisp/forth/etc) are language building languages, not library building languages. A library building language is just a DSL that you can't modify. You can write anything in it, but so what? You can write anything in Brainfuck too - that's what the term "Turing tarpit" was coined to describe.
When someone tells you what their favorite language is, you should ask what that person does. If all they do is write web apps, they probably like their language because it is a good web app DSL. Nothing wrong with that, except that it doesn't scale (webapps scale, but they do it by scaling the database, not the language).
That's impressive. Are you writing your OS for study purposes or you have something special in mind? I am interested in knowing as I am planning to do the same and might want to consult you.
If you want to talk more about it or OS dev in general, feel free to ping me on IRC (Daeken on freenode) or on AIM (bloomfilter).
Let me add that most of his work was for TCP/IP over serial ..
So close to BNF, and so clear in its deviations. Would be nice if I could use something like this to extend Python or JS and compile to them...