Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
adobriyan
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
91.
▲
by
adobriyan
15y ago
This is largely theoretical but still. Smart programming languages have bignum integers and seamless promotion between fixnum and bignum versions. Thus they avoid the issue completely, no stupid casts (especially casts which change both sig
92.
▲
by
adobriyan
15y ago
In fact existence of off64_t proves off_t is not OK.
93.
▲
by
adobriyan
15y ago
You didn't understand. Consistent use of one (unsigned) type for lengths would avoid issues because there'd be no casts. off_t is signed and doesn't make sense because file length can't be negative.
94.
▲
by
adobriyan
15y ago
Lengths should always be unsigned. Always. I'd even say they should always be uintmax_t in C.
95.
▲
by
adobriyan
15y ago
Unix pipes are about octet streams not strings.
96.
▲
by
adobriyan
15y ago
I'd say there is nothing complex in correct mathematical definition of O() to warrant simplifying it.
97.
▲
by
adobriyan
15y ago
OP intends to measure time to read data from file and maybe it process into internal representation. cat(1) almost certainly internally buffers data (32KB here) thus context switches occurs. Shell creates pipe which is buffered inside kerne
98.
▲
by
adobriyan
15y ago
like using `gettimeofday()` and not using cat(1), for starters.
99.
▲
by
adobriyan
15y ago
case JSON_INTEGER: obj = QOBJECT(qint_from_int(strtoll(token_get_value(token), NULL, 10))); Why is it so hard to parse integer from string correctly?
100.
▲
by
adobriyan
15y ago
I largely share sqrt17's grief. There is no such thing as "UTF-32 character". Abstract character is not code point. UTF-32 _is_ fixed width because it's defined on code points, not glyphs, not characters.
101.
▲
by
adobriyan
15y ago
And thus forces programmer to think about the order of non-commutative operations.
102.
▲
by
adobriyan
15y ago
We're discussing anything that can do open(), read, write(), provides files and directories. Do you understand that virtual filesystems do not have problems with inode counts? Dupping a directory means a) hw state is saved on open(), in whi
103.
▲
by
adobriyan
15y ago
Regarding speed and knuth argument. At this stage real world examples show that once scale of the state becomes sufficiently large (large number of conntracks on big firewalls), text interface always lose. So, play with toy flat text file i
104.
▲
by
adobriyan
15y ago
> Take atomicity as an example. C has no inherent concept of atomicity. Yet you can acheive atomicity by using C. So why not with a REST or file-based interface? You achieve atomicity because inside kernel handler of relevant imaginary
105.
▲
by
adobriyan
15y ago
> The idea is not to have one unconfigurable binary reciever, It _is_ configurable, why do you think it is not? This idea that somehow one can fit any interaction with hardware into a filesystem ends when hardware becomes complex enough
106.
▲
by
adobriyan
15y ago
Why does signedness matter? Addition is XOR which is sign-agnostic. Multiplication has to be done via table lookups to be fast which also makes it sign agnostic. Well, at least for p=2.
107.
▲
by
adobriyan
15y ago
It doesn't matter. What matters is that KGB is still called KGB. Our western friends no doubt are going to setup colorful clusterfuck like they did it in Georgia/Ukraine/Egypt/Tunis. Without doubt it will happen if it will pass in Russia.
108.
▲
by
adobriyan
15y ago
Oh, youth!
109.
▲
by
adobriyan
15y ago
Because their management told them how to vote.
110.
▲
by
adobriyan
15y ago
RE with backreferences is strictly more powerful then RE without them. Implying that PCRE is somehow inferior due to backreferences support is quite fuddy.
111.
▲
by
adobriyan
15y ago
You need whole distribution of process time, not just mean for simulation.
112.
▲
by
adobriyan
15y ago
Once a problem becomes a non-toy problem, pipelines lose. troff(1) will do all the hyphenation (C or C++ code) in your code. Ironically troff is like TeX, it processes documents.
113.
▲
by
adobriyan
15y ago
You're missing the point (intentionally, I suspect).
114.
▲
by
adobriyan
15y ago
Try hyphenating a text with "simple pipeline".
115.
▲
by
adobriyan
15y ago
#x4DF0
116.
▲
by
adobriyan
15y ago
Actually this is better that switch (or whatever). Some advanced dispatch code can notice that some tuples are dispatched more often that the rest and can check for them first. Ditto for dict lookup. But this would unexpected for switch cod
117.
▲
by
adobriyan
15y ago
This forces programmer to invent dummy names. And Python doesn't support nontrivial lambdas.
118.
▲
by
adobriyan
15y ago
COND, man, COND.
119.
▲
by
adobriyan
15y ago
> Unix says "Everything is a file... except sockets, windows, etc." Unix said that, but in fact meant "everything has a unique descriptor associated (an integer)". Directory is not a file, it's a set of files and other directories. Unix
120.
▲
by
adobriyan
15y ago
But first function returning multiple values. Baby steps. :-)
More ›