1,089 karma · joined March 1, 2007
C, Unix system and shell, Python, X Windows, ARM, ...
The site used to use them far more but because only the last N continuations were kept, at times of high load users would find the links on the page they were viewing broke on trying to use them; the fnid they referred to had disappeared because N more had been created since. One solution is to increase N. However, any trivial means of generating another M fnids means it's easy for a single attacker to cause N more to be generated.
As troels says, RESTful is the way to go. Continuation in my view are flawed for web apps. AIUI pg got away with it for Yahoo Store because they were only used in the shop design side of things where each shop owner could be given his own N storage of fnids, isolated from others.
It's been discussed before on here, in particular a post by me around end of April/start of May 2007 that caused pg to email me privately about thinking up new "ddos attacks". A while after that, most of the usage of fnids were replaced by conventional-style URLs so also some remain, M is smaller than it used to be.
I can't see a good way around this as long as the server keeps the continuations instead of offloading it to the client.
It's not hard to count the column and you can always do a
... | awk '{print $6}' | sort | uniq -c
to see if you've got it right. In fact, a common way to develope the pipeline for a one-off task is to keep appending a pipe and another command to the previous pipeline command. That way, you can see a sample of what's being produced instead of imagining it.You couldn't have analysed the results of grep, discarding the non-month matches of "Dec" in the time taken to count up to field 6 if the number of lines was at all significant. Don't be silly.
If I did miscount and no lines matched I may be suspicious and look more closely. If some lines matched but on a different column than intended I may notice. I can re-run the command after correction or try the {print $6} idea. How would you notice if your manual* analysis failed to spot the extra result from grep here and there. Would you do your manual analysis twice? Ask someone else to do it too? Or just think "good enough" and use the data for the next stage?
When you want to put a file into a directory structure where theres several levels of directories to avoid one directory containing many files, e.g. com/ycombinator/news/foo.
> For someone who was trying to save a few keystrokes, instead of trying waste time getting the right field for awk, just use grep. Its easy, you can't mess it up, and unless the formatting really matters its the best option.
The FA shows grep fails because 'Dec' matches part of the filename instead of just on the date. awk's a worthy solution in that case and formatting of the output wasn't relevant to the point made.
The backslashes aren't needed in listing 9 since the shell expects more input after `&&' or `||' and automatically switches to PS2.
Using xargs is more subtle than they suggest. If may kick off the given command multiple times. This would make a difference, e.g. `xargs wc' would give multiple totals.
$ date
2008-01-24 12:35:00 +0000 Thu
$ wget -qO- http://news.ycombinator.com/rss |
> tr \> \\012 |
> grep -c comitem
0
$ $ date
2008-01-23 12:21:20 +0000 Wed
$ wget -qO- http://news.ycombinator.com/rss |
> tr \> \\012 |
> grep -c comitem
27
$For those that wonder what we're wittering on about, visit http://www.cs.kent.ac.uk/teaching/07/modules/CO/6/31/slides/ and read these PDF slides in this order.
motivation.pdf -- just pages 1-39
basics.pdf
applying.pdf
choice.pdf
replicators.pdf
protocol.pdf
shared-etc.pdf
Ignore the crufty Occam (Transputer anyone?) syntax, just concentrate on the concepts. Although some of the PDFs seem to have many pages, often a page is the same as the previous with a minor change; they're slides!I then realised that the remaining up arrow could be used as a `I've read this post' indicator and started clicking all of them as I read old posts. Very useful to help pick up reading where I left off. Funnily enough, I'm not aware of anyone complaining that they'd got lots of up votes over the period I was doing it. :-)
Yes.
Channels with co-operating threads are easy to reason about. See Russ Cox's overview page http://swtch.com/~rsc/thread/ for more.