Linked by Thom Holwerda on Sat 11th May 2013 21:41 UTC
Windows "Windows is indeed slower than other operating systems in many scenarios, and the gap is worsening." That's one way to start an insider explanation of why Windows' performance isn't up to snuff. Written by someone who actually contributes code to the Windows NT kernel, the comment on Hacker News, later deleted but reposted with permission on Marc Bevand's blog, paints a very dreary picture of the state of Windows development. The root issue? Think of how Linux is developed, and you'll know the answer.
Permalink for comment 561685
To read all comments associated with this story, please click here.
RE[18]: Too funny
by satsujinka on Wed 15th May 2013 22:09 UTC in reply to "RE[17]: Too funny"
Member since:

Okay, so moving out of the logging topic to databases in general as a organizational system for an operating system.

About CSV vs. XML: Considering Golang's csv and xml packages: both of the 2 go files for CSV have a combined size smaller than xml's 3 of the 4 go files for xml (the 4th is approximately the same size as csv's reader.go). To me this implies that CSV doesn't have any escaping issues that are particularly harder to solve then XML or JSON (JSON actually has the most code dedicated to it.)

Of course, part of this is that csv provides the smallest feature set. However, comparing similar functionality leads to the same conclusion.

As for metadata: you have to provide a schema no matter what data format you choose. XML isn't better in this regard; usually you match tag to column name. CSV has a similar rule: match on column position. I know in relational theory the columns are unordered; but in practice the columns are created/displayed with an order; just use that. Optionally, you can write a schema to do the matching. This is actually a better situation then XML which requires a schema all the time (what do we do with nesting? I can think of 3 reasonable behaviors off the top of my head.)


I think all programs should be using a structured library interface directly without bothering with the text conversion at all. It could be a library call similar to printf, but it would have to be capable of maintaining field metadata. This call would not output text (optionally it could for interactive debugging), instead it would transmit the log record to the system logger.

I'm not opposed to this in principle. However, I fear figuring out what this "printf"'s interface should be will not be so simple. Does it expect meta-data co-mingled with data? Does it take a schema as a parameter? Isn't "%s:%d" a schema already (one whose fields are anonymous, but paired with scanf, you can write and retrieve records with it)? Also, what should we use for a schema format? Or should we just choose to support as many as possible?

The vision was not just for logging, but actually to replace all sorts of text I/O streams with data tupples.

What would these data tuples look like? You'll need some data to mark where these tuples begin and end, their fields, and their relation. End can double as begin, so only 3 symbols are necessary (but the smallest binary that can hold 3 is 2 bits so you may as well use 4.) If you omit table separators, then you need to include a relation field.

With 4 symbols:
Bin Txt Description
00 - ( - tuple start
01 - , - field break
10 - ) - tuple end
11 - ; - table end

(Id,First Name,Last Name)(001,John,Doe)(002,Mary,Jane);

With 3 symbols:
00 - , - field break
01 - \n - tuple end
10 - \d - table end

Id,First Name,Last Name
... Hey, wait a minute that's CSV! ;)

With 2 symbols:
0 - , - field break
1 - ; - tuple break

Person,Id,First Name,Last Name;

Just to make it clear: I too want a standard format that everything uses. It's just that saying "use tuples" ignores the fact that we still have to parse information out of our inputs in order to do anything. You do go on to say "redesign bash to handle this". I assume you also mean "provide a library that has multiplexed stdin/stdout" as you also have to write and read from an arbitrary number of stdin/stdouts (as corresponds to the number of fields.) Alternately, you could shift to use a byte code powered shell (so that all programs use the same representations as the shell and can simply copy their memory structures to the shell.)

Reply Parent Score: 2