Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
alexlarsson
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
121.
▲
by
alexlarsson
14y ago
Thats only true if you only negotiate via data in the pipe. dtools (in the article) uses non-mandatory file locks to do the content negotiation on the pipe.
122.
▲
by
alexlarsson
14y ago
"automatically knew", in a post which talks about format negotiation. It was fairly obvious to me he meant that it would use the format negotiation to automatically enable the --null switch.
123.
▲
by
alexlarsson
14y ago
I don't expect every user to create unix pipes 2.0, so the difficulty of that is not really what needs to be compared. It will only have to be done once. And once this is done any user can avoid having to painstakingly construct pipelines t
124.
▲
by
alexlarsson
14y ago
Yes, in other words, the parent is right that zero termination is currently not automatic.
125.
▲
by
alexlarsson
14y ago
Regarding order. The dtools approach uses a stream (i.e. potentially infinite) of variants. Each variant is a self contained typed data chunk which is by itself not "streamable" (i.e. you have to read all of it). The data chunk is strongly
126.
▲
by
alexlarsson
14y ago
The GVariant/dbus typesystem has both "string" which is a UTF8 text string and "bytestring" which is an array of bytes. The later is what you would use for filenames and would avoid problems with weird characters in filenames, etc.
127.
▲
by
alexlarsson
14y ago
A textual format needs parsing though at every stage in the pipeline. Thats why I think using an (optional, when supported) binary format is important.
128.
▲
by
alexlarsson
14y ago
Obviously a lot can be done, but its hardly easy, you yourself call it black magic. But its very easy to do with typed data, and only the beginning of what you can do.
129.
▲
by
alexlarsson
14y ago
The inverse of dtable? Yeah, that would be very nice.
130.
▲
by
alexlarsson
14y ago
Having to many different formats is also a problem though, as incompatible formats means you can't combine two apps in a pipepine. The negotiations in dtools is made using a F_GETLK hack with a magic value offset. That approach could easily
131.
▲
by
alexlarsson
14y ago
My code does format negotiation on the pipe to determine whether to send the data in textual form or binary form. It uses file locks (F_SETLK) on the pipe with a magic offset value offset to do the negotiation.
132.
▲
by
alexlarsson
14y ago
Obviously for many cases avoiding output is better than post-output filtering. For these cases the originating process should do the filtering. However, in many practical situations the data sets are small enough to not matter, or the opera
133.
▲
by
alexlarsson
14y ago
Thats not at all true. The original OpenGL API is very much a direct mapping of the original SGI graphics hardware. Most openGL calls on SGI are single cpu instructions feeding the data to the hardware, which fully implements the whole Open
134.
▲
by
alexlarsson
15y ago
Reading this thread makes me pretty sad. Usually there are people on hacker news that at least know the background, and generally there is a measure of respect that other people might actually know something about what they work on. The Gno