Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
1amzave
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
1amzave
12y ago
Heck, for a string manipulation that simple you don't even need `sed`, you can just use the shell -- modulo potential escaping errors (I haven't actually tested this), something like this should do the trick: ProxyCommand ss
32.
▲
by
1amzave
12y ago
As of late I've been using a mix of Chrom{e,ium} and Firefox, and frankly at this point I've basically resigned myself to the fact that browsers, as a class of software, are just universally terrible. So I say "fuck it, I&#x
33.
▲
by
1amzave
12y ago
As opposed to LLVM's tblgen?
34.
▲
by
1amzave
12y ago
> CISC was always better externally ...aside from being orders of magnitude more of an ass-pain if you ever have to write software that actually deals with machine code (at least on x86; perhaps other CISCs aren't as bad). Simple
35.
▲
by
1amzave
12y ago
valgrind proper is actually a much more general binary instrumentation/execution engine that supports a number of different useful tools; most of what the article is actually describing is memcheck, the tool it runs by default when y
36.
▲
by
1amzave
12y ago
I sympathize, but I have to say I find it far less annoying than the constant implorings to "follow me on Twitter!" that have become obnoxiously ubiquitous in the last few years.
37.
▲
by
1amzave
12y ago
Maybe the odds of it doing so are smaller, but if you think a broken nvidia.ko can't screw up anyone's data I think you're simply mistaken. Say Nvidia's driver has a use-after-free bug: it kmalloc()s a buffer, kfree()s
38.
▲
by
1amzave
12y ago
That looks neat -- I've been using a somewhat similar little home-baked thing of my own (simple shell script wrapping gpg), largely because I wanted a simple command-line password manager and this 'pass' thing I've been
39.
▲
by
1amzave
12y ago
...and which essentially amount to "hey, look what's in the man page!".
40.
▲
by
1amzave
12y ago
It's less a matter of age than environment -- there are still plenty of places using lots of tape. (It's not like we're talking about vacuum tubes or core memory here...)
41.
▲
by
1amzave
12y ago
I'd say "random access" is basically just a relative term. Tape, yes, is about the least random-access-friendly medium I can think of. Compared to that, HDDs are quite efficient at random access. DRAM then makes HDDs look
42.
▲
Re: compare memcmp with 0
(marc.info)
1 points
by
1amzave
12y ago
|
0 comments
43.
▲
by
1amzave
12y ago
I think there were some older mainframes (CDC? System 360?) that may have done this to some extent -- it'd only really be feasible up to a certain (very low) point though, since you have the potential for an exponential explosion in th
44.
▲
by
1amzave
13y ago
> (I'm not even sure you can load your openssh server key into ssh-agent, can you?) Yes, actually, as of OpenSSH 6.3 you can. (I wrote most of the patch that added that feature.) However, even without doing that the OpenSSH serv
45.
▲
by
1amzave
13y ago
> When the serialization format matches the in-memory format, you can mmap directly into a struct, which is fast and convenient. ...and a non-starter if you ever have data interchange between differing types of machines.
46.
▲
by
1amzave
13y ago
> That's exactly equivalent to having a "size" parameter with the same size as the pointer, except you have to use a substract instruction when you want to get the length of the string, so I'd say it's inferior
47.
▲
by
1amzave
13y ago
I've never understood why people always seem to immediately bring up segfaults as scary C behavior. Is it really that different than Python dying with "AttributeError: 'NoneType' object has no attribute 'foo'&
48.
▲
by
1amzave
13y ago
> immutable structures can't create cycles Perhaps I'm misunderstanding something, but doesn't "tying the knot" in Haskell do just that? (Create a cycle from immutable structures.)
49.
▲
by
1amzave
13y ago
Hmm -- I watched "Computers for Cynics 1 - The Nightmare of Files and Directories" (which I won't bother linking to, because frankly I can't recommend watching it), since file and storage systems are a topic of some inte
50.
▲
by
1amzave
13y ago
> It is kind of impressive that you can write code that is as fast as C without writing C, even if it is ugly. Impressive, perhaps -- but from a maintainability perspective I think I might prefer to pay the cost of jumping the language
51.
▲
by
1amzave
13y ago
Turn it into a real computer -- i.e. materialize a keyboard, decent-sized monitor, and ethernet port out of the aether.
52.
▲
by
1amzave
13y ago
I've been doing the same for a while, despite the fact that C-\ is in fact sort of already "taken" by default (SIGQUIT). That's not something I use often, but when I want it it's still easy enough to get by just
53.
▲
by
1amzave
13y ago
Correct me if I'm wrong here, but I believe lsof can only display files held open at a given point in time (when you run lsof), no? So if a process opens a file, does something with it, and then immediately closes it, you're unli
54.
▲
by
1amzave
13y ago
Very cool overall. However: > Searching for hay in the haystack is not a common use case for a regular expression matcher. Where'd that conclusion come from? Surely "does this pattern exist anywhere in this string?" with the answer
55.
▲
by
1amzave
13y ago
OK, bear with me as we get slightly contrived here...(and deviate a little from my earlier, somewhat less thought out example). Say your workload has some inherent requirement for random (throughout its entire execution) access to a dataset
56.
▲
by
1amzave
13y ago
Say you're running a problem of size N on a processor with a cache of size N/2. Adding another processor with another N/2 cache means your whole problem now fits in cache, so you'll probably suffer fewer cache misses, and thus could end up
57.
▲
by
1amzave
14y ago
> Parallel processing models give you, at best, linear speedup. Most commonly, yes, though in practice superlinear speedups can occur in some situations. (Not that this negates your overall point, just a nitpick.)
58.
▲
by
1amzave
14y ago
> One problem that becomes apparent with a longer interval and longer rebuild times: if the make takes say 30s, and you're rebuilding every 60s, then your site will be updated every 1.5 minutes instead of every minute. Maybe not what y
59.
▲
by
1amzave
14y ago
Though that's not strictly a glob, but brace expansion (it will expand to all the numbers in that range regardless of whether or not files with those names exist). bash does have 'shopt -s extglob', which enables a number of useful globbin
60.
▲
by
1amzave
14y ago
> Is Dropbox a toy too? In this context, yes, for exactly the same reasons as GDrive. No one with any sense is going to be running a relational database or MapReduce out of either one. Note that when I say "toy" in this context it's no
More ›